diff -Nru gnome-chemistry-utils-0.8.6/acinclude.m4 gnome-chemistry-utils-0.10.9/acinclude.m4 --- gnome-chemistry-utils-0.8.6/acinclude.m4 2006-09-24 22:10:54.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/acinclude.m4 2009-11-14 11:30:40.000000000 +0100 @@ -117,3 +117,141 @@ AC_SUBST([MAN]) AM_CONDITIONAL([HAVE_MAN], [test "x$MAN" != "x"]) ]) # GCU_PROG_MAN + +dnl dolt, a replacement for libtool +dnl Copyright © 2007-2008 Josh Triplett +dnl Copying and distribution of this file, with or without modification, +dnl are permitted in any medium without royalty provided the copyright +dnl notice and this notice are preserved. +dnl +dnl To use dolt, invoke the DOLT macro immediately after the libtool macros. +dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it +dnl installed when running autoconf on your project. + +AC_DEFUN([DOLT], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +# dolt, a replacement for libtool +# Josh Triplett +AC_PATH_PROG(DOLT_BASH, bash) +AC_MSG_CHECKING([if dolt supports this host]) +dolt_supported=yes +if test x$DOLT_BASH = x; then + dolt_supported=no +fi +if test x$GCC != xyes; then + dolt_supported=no +fi +case $host in +i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*) ;; +amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) ;; +*) dolt_supported=no ;; +esac +if test x$dolt_supported = xno ; then + AC_MSG_RESULT([no, falling back to libtool]) + LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)' + LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)' +else + AC_MSG_RESULT([yes, replacing libtool]) + +dnl Start writing out doltcompile. + cat <<__DOLTCOMPILE__EOF__ >doltcompile +#!$DOLT_BASH +__DOLTCOMPILE__EOF__ + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +args=("$[]@") +for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do + if test x"${args@<:@$arg@:>@}" = x-o ; then + objarg=$((arg+1)) + break + fi +done +if test x$objarg = x ; then + echo 'Error: no -o on compiler command line' 1>&2 + exit 1 +fi +lo="${args@<:@$objarg@:>@}" +obj="${lo%.lo}" +if test x"$lo" = x"$obj" ; then + echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 + exit 1 +fi +objbase="${obj##*/}" +__DOLTCOMPILE__EOF__ + +dnl Write out shared compilation code. + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +libobjdir="${obj%$objbase}.libs" +if test ! -d "$libobjdir" ; then + mkdir_out="$(mkdir "$libobjdir" 2>&1)" + mkdir_ret=$? + if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then + echo "$mkdir_out" 1>&2 + exit $mkdir_ret + fi +fi +pic_object="$libobjdir/$objbase.o" +args@<:@$objarg@:>@="$pic_object" +"${args@<:@@@:>@}" -fPIC -DPIC || exit $? +__DOLTCOMPILE__EOF__ + fi + +dnl Write out static compilation code. +dnl Avoid duplicate compiler output if also building shared objects. + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +non_pic_object="$obj.o" +args@<:@$objarg@:>@="$non_pic_object" +__DOLTCOMPILE__EOF__ + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $? +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args@<:@@@:>@}" || exit $? +__DOLTCOMPILE__EOF__ + fi + fi + +dnl Write out the code to write the .lo file. +dnl The second line of the .lo file must match "^# Generated by .*libtool" + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +{ +echo "# $lo - a libtool object file" +echo "# Generated by doltcompile, not libtool" +__DOLTCOMPILE__EOF__ + + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "pic_object='$pic_object'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo pic_object=none +__DOLTCOMPILE__EOF__ + fi + + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "non_pic_object='$non_pic_object'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo non_pic_object=none +__DOLTCOMPILE__EOF__ + fi + + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +} > "$lo" +__DOLTCOMPILE__EOF__ + +dnl Done writing out doltcompile; substitute it for libtool compilation. + chmod +x doltcompile + LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' + LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' +fi +AC_SUBST(LTCOMPILE) +AC_SUBST(LTCXXCOMPILE) +# end dolt +]) diff -Nru gnome-chemistry-utils-0.8.6/aclocal.m4 gnome-chemistry-utils-0.10.9/aclocal.m4 --- gnome-chemistry-utils-0.8.6/aclocal.m4 2008-01-25 21:06:14.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/aclocal.m4 2009-11-14 11:45:56.000000000 +0100 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,10 +11,13 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, +[m4_warning([this file was generated for autoconf 2.64. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) dnl AM_GCONF_SOURCE_2 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas @@ -31,8 +34,10 @@ GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE fi - AC_ARG_WITH(gconf-source, - [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",) + AC_ARG_WITH([gconf-source], + AC_HELP_STRING([--with-gconf-source=sourceaddress], + [Config database for installing schema files.]), + [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],) AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) @@ -41,17 +46,20 @@ GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' fi - AC_ARG_WITH(gconf-schema-file-dir, - [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",) + AC_ARG_WITH([gconf-schema-file-dir], + AC_HELP_STRING([--with-gconf-schema-file-dir=dir], + [Directory for installing schema files.]), + [GCONF_SCHEMA_FILE_DIR="$withval"],) AC_SUBST(GCONF_SCHEMA_FILE_DIR) AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) AC_ARG_ENABLE(schemas-install, - [ --disable-schemas-install Disable the schemas installation], + AC_HELP_STRING([--disable-schemas-install], + [Disable the schemas installation]), [case ${enableval} in yes|no) ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;; esac]) AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no]) ]) @@ -159,8 +167,7 @@ #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory - [AC_REQUIRE([AC_CANONICAL_HOST])dnl - USE_NLS=yes + [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no @@ -518,21 +525,29 @@ enable_scrollkeeper=yes) AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"]) +dnl disable scrollkeeper automatically for distcheck +DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS" +AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) + AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"]) ]) # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) # AC_DEFUN([GNOME_DOC_INIT], -[ +[AC_REQUIRE([AC_PROG_LN_S])dnl + ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1]) +AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required]) PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required], [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no]) if test "$gdu_cv_have_gdu" = "yes"; then + AC_MSG_RESULT([yes]) ifelse([$2],,[:],[$2]) else + AC_MSG_RESULT([no]) ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3]) fi @@ -541,9 +556,10 @@ dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) -# serial 36 IT_PROG_INTLTOOL -AC_DEFUN([IT_PROG_INTLTOOL], -[AC_PREREQ([2.50])dnl +# serial 40 IT_PROG_INTLTOOL +AC_DEFUN([IT_PROG_INTLTOOL], [ +AC_PREREQ([2.50])dnl +AC_REQUIRE([AM_NLS])dnl case "$am__api_version" in 1.[01234]) @@ -557,14 +573,21 @@ AC_MSG_CHECKING([for intltool >= $1]) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` - INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` - [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in` + INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` + [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` ] AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) fi +AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) +AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) +AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) +fi + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' @@ -585,30 +608,31 @@ INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -AC_SUBST(INTLTOOL_DESKTOP_RULE) -AC_SUBST(INTLTOOL_DIRECTORY_RULE) -AC_SUBST(INTLTOOL_KEYS_RULE) -AC_SUBST(INTLTOOL_PROP_RULE) -AC_SUBST(INTLTOOL_OAF_RULE) -AC_SUBST(INTLTOOL_PONG_RULE) -AC_SUBST(INTLTOOL_SERVER_RULE) -AC_SUBST(INTLTOOL_SHEET_RULE) -AC_SUBST(INTLTOOL_SOUNDLIST_RULE) -AC_SUBST(INTLTOOL_UI_RULE) -AC_SUBST(INTLTOOL_XAM_RULE) -AC_SUBST(INTLTOOL_KBD_RULE) -AC_SUBST(INTLTOOL_XML_RULE) -AC_SUBST(INTLTOOL_XML_NOMERGE_RULE) -AC_SUBST(INTLTOOL_CAVES_RULE) -AC_SUBST(INTLTOOL_SCHEMAS_RULE) -AC_SUBST(INTLTOOL_THEME_RULE) -AC_SUBST(INTLTOOL_SERVICE_RULE) -AC_SUBST(INTLTOOL_POLICY_RULE) +_IT_SUBST(INTLTOOL_DESKTOP_RULE) +_IT_SUBST(INTLTOOL_DIRECTORY_RULE) +_IT_SUBST(INTLTOOL_KEYS_RULE) +_IT_SUBST(INTLTOOL_PROP_RULE) +_IT_SUBST(INTLTOOL_OAF_RULE) +_IT_SUBST(INTLTOOL_PONG_RULE) +_IT_SUBST(INTLTOOL_SERVER_RULE) +_IT_SUBST(INTLTOOL_SHEET_RULE) +_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) +_IT_SUBST(INTLTOOL_UI_RULE) +_IT_SUBST(INTLTOOL_XAM_RULE) +_IT_SUBST(INTLTOOL_KBD_RULE) +_IT_SUBST(INTLTOOL_XML_RULE) +_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) +_IT_SUBST(INTLTOOL_CAVES_RULE) +_IT_SUBST(INTLTOOL_SCHEMAS_RULE) +_IT_SUBST(INTLTOOL_THEME_RULE) +_IT_SUBST(INTLTOOL_SERVICE_RULE) +_IT_SUBST(INTLTOOL_POLICY_RULE) # Check the gettext tools to make sure they are GNU AC_PATH_PROG(XGETTEXT, xgettext) AC_PATH_PROG(MSGMERGE, msgmerge) AC_PATH_PROG(MSGFMT, msgfmt) +AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi @@ -619,17 +643,17 @@ AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi -# Use the tools built into the package, not the ones that are installed. -AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract') -AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge') -AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update') - AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then - AC_MSG_ERROR([perl not found; required for intltool]) + AC_MSG_ERROR([perl not found]) fi -if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then - AC_MSG_ERROR([perl 5.x required for intltool]) +AC_MSG_CHECKING([for perl >= 5.8.1]) +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + AC_MSG_ERROR([perl 5.8.1 is required for intltool]) +else + IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + AC_MSG_RESULT([$IT_PERL_VERSION]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) @@ -670,42 +694,6 @@ IT_PO_SUBDIR([po]) -dnl The following is very similar to -dnl -dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update]) -dnl -dnl with the following slight differences: -dnl - the *.in files are in ac_aux_dir, -dnl - if the file haven't changed upon reconfigure, it's not touched, -dnl - the evaluation of the third parameter enables a hack which computes -dnl the actual value of $libdir, -dnl - the user sees "executing intltool commands", instead of -dnl "creating intltool-extract" and such. -dnl -dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were -dnl a reason for it. - -AC_CONFIG_COMMANDS([intltool], [ - -for file in intltool-extract intltool-merge intltool-update; do - sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ - -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ - -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ - < ${ac_aux_dir}/${file}.in > ${file}.out - if cmp -s ${file} ${file}.out 2>/dev/null; then - rm -f ${file}.out - else - mv -f ${file}.out ${file} - fi - chmod ugo+x ${file} - chmod u+w ${file} -done - -], -[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' -prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" -INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}']) - ]) @@ -721,6 +709,9 @@ dnl of config.status. AC_CONFIG_COMMANDS_PRE([ AC_CONFIG_COMMANDS([$1/stamp-it], [ + if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then + AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) + fi rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" >"$1/stamp-it.tmp" [sed '/^#/d @@ -729,21 +720,27 @@ '"s|^| $ac_top_srcdir/|" \ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" ] - if test ! -f "$1/Makefile"; then - AC_MSG_ERROR([$1/Makefile is not ready.]) - fi - mv "$1/Makefile" "$1/Makefile.tmp" [sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r $1/POTFILES } - ' "$1/Makefile.tmp" >"$1/Makefile"] + ' "$1/Makefile.in" >"$1/Makefile"] rm -f "$1/Makefile.tmp" mv "$1/stamp-it.tmp" "$1/stamp-it" ]) ])dnl ]) +# _IT_SUBST(VARIABLE) +# ------------------- +# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST +# +AC_DEFUN([_IT_SUBST], +[ +AC_SUBST([$1]) +m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) +] +) # deprecated macros AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) @@ -751,103 +748,1009 @@ # AC_DEFUN([AC_PROG_INTLTOOL], ...) +# lib-ld.m4 serial 3 (gettext-0.13) +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) + +# lib-link.m4 serial 13 (gettext-0.17) +dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ(2.54) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl Autoconf >= 2.61 supports dots in --with options. + define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], +[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIB[]NAME[]_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT -# serial 51 Debian 1.5.24-2 AC_PROG_LIBTOOL +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL +_LT_SETUP +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR +_LT_CHECK_OBJDIR -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) @@ -863,152 +1766,675 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] +double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' -# Constants: -rm="rm -f" - # Global variables: -default_ofile=libtool +ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) +with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC + _LT_PATH_MAGIC fi ;; esac -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) -# _LT_CC_BASENAME(CC) + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT ]) +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* +$RM conftest* ])# _LT_COMPILER_BOILERPLATE @@ -1016,26 +2442,150 @@ # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$RM -r conftest* ])# _LT_LINKER_BOILERPLATE +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -1050,45 +2600,45 @@ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX +])# _LT_SYS_MODULE_PATH_AIX -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP -])# _LT_AC_SHELL_INIT +])# _LT_SHELL_INIT -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$ECHO in +case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac -echo=${ECHO-echo} +ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! : else # Restart under the correct shell. @@ -1098,9 +2648,9 @@ if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift - cat </dev/null 2>&1 && unset CDPATH -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else - # maybe with a smaller string... - prev=: + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi fi fi fi fi -fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good @@ -1236,12 +2789,12 @@ echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; esac fi rm -rf conftest* @@ -1250,79 +2803,79 @@ # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; esac fi rm -rf conftest* @@ -1334,7 +2887,7 @@ CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -1349,37 +2902,74 @@ *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; esac ;; esac fi rm -rf conftest* ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) esac need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= -])# _LT_AC_LOCK +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or @@ -1399,29 +2989,35 @@ if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi - $rm conftest* + $RM conftest* ]) if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) + m4_if([$5], , :, [$5]) else - ifelse([$6], , :, [$6]) + m4_if([$6], , :, [$6]) fi -])# AC_LIBTOOL_COMPILER_OPTION - +])# _LT_COMPILER_OPTION -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" @@ -1433,7 +3029,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1442,22 +3038,28 @@ $2=yes fi fi - $rm conftest* + $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) + m4_if([$4], , :, [$4]) else - ifelse([$5], , :, [$5]) + m4_if([$5], , :, [$5]) fi -])# AC_LIBTOOL_LINKER_OPTION +])# _LT_LINKER_OPTION +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 @@ -1479,7 +3081,7 @@ lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1534,7 +3136,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1545,20 +3147,28 @@ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; @@ -1569,27 +3179,35 @@ else AC_MSG_RESULT(none) fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" @@ -1631,10 +3249,6 @@ # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -1650,9 +3264,9 @@ else puts (dlerror ()); - exit (status); + return status; }] -EOF +_LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? @@ -1667,13 +3281,13 @@ fi fi rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF +])# _LT_TRY_DLOPEN_SELF -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -1689,15 +3303,15 @@ lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= - ;; + ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= - ;; + ;; darwin*) # if libdl is installed we need to link against it @@ -1707,13 +3321,13 @@ lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) - ;; + ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], @@ -1721,7 +3335,7 @@ [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) @@ -1749,7 +3363,7 @@ AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( + _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) @@ -1757,8 +3371,8 @@ if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) @@ -1780,19 +3394,32 @@ *) enable_dlopen_self_static=unknown ;; esac fi -])# AC_LIBTOOL_DLOPEN_SELF +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out @@ -1816,37 +3443,41 @@ then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* + $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out cd .. - rmdir conftest - $rm conftest* + $RM -r conftest + $RM conftest* ]) -])# AC_LIBTOOL_PROG_CC_C_O +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- # Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes - $rm conftest* + $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no @@ -1859,12 +3490,13 @@ else need_locks=no fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null @@ -1876,40 +3508,46 @@ fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- # Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink + _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate + _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported + _LT_TAGVAR(hardcode_action, $1)=unsupported fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || @@ -1917,73 +3555,70 @@ # Fast installation is not necessary enable_fast_install=needless fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) ;; esac fi -])# AC_LIBTOOL_SYS_LIB_STRIP +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB -# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ +m4_if([$1], + [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. @@ -1997,7 +3632,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -2017,10 +3652,23 @@ if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no @@ -2038,7 +3686,7 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -2057,7 +3705,7 @@ aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no @@ -2083,9 +3731,18 @@ ;; amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac ;; beos*) @@ -2108,25 +3765,28 @@ # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ - $rm \$dlpath' + $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -2135,20 +3795,20 @@ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -2172,13 +3832,13 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -2271,18 +3931,18 @@ fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH @@ -2359,6 +4019,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. @@ -2366,7 +4037,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -2395,7 +4066,7 @@ version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' @@ -2416,14 +4087,16 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx*) - version_type=linux +*nto* | *qnx*) + version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; openbsd*) @@ -2432,13 +4105,13 @@ need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no @@ -2510,7 +4183,6 @@ sni) shlibpath_overrides_runpath=no need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -2541,13 +4213,12 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -2557,6 +4228,17 @@ sys_lib_dlsearch_path_spec='/usr/lib' ;; +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2575,363 +4257,150 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi +_LT_EOF + fi ;; + esac + fi + break fi done IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) + MAGIC_CMD=: fi fi -])# _LT_AC_TAGCONFIG +])# _LT_PATH_MAGIC -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD +# LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. @@ -2948,9 +4417,9 @@ [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; @@ -3000,15 +4469,24 @@ AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -])# AC_PROG_LD +_LT_PATH_LD_GNU +AC_SUBST([LD]) +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) +])# LT_PATH_LD -# AC_PROG_LD_GNU -# -------------- -AC_DEFUN([AC_PROG_LD_GNU], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, +# Old names: +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_LD], []) +dnl AC_DEFUN([AC_PROG_LD], []) + + +# _LT_PATH_LD_GNU +#- -------------- +m4_defun([_LT_PATH_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. @@ -3166,7 +4654,7 @@ ;; netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' @@ -3179,12 +4667,12 @@ lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx*) - lt_cv_deplibs_check_method=unknown +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all ;; openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' @@ -3203,6 +4691,10 @@ lt_cv_deplibs_check_method=pass_all ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + sysv4 | sysv4.3*) case $host_vendor in motorola) @@ -3230,7 +4722,7 @@ esac ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) +tpf*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -3238,14 +4730,20 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown -])# AC_DEPLIBS_CHECK_METHOD +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD -# AC_PROG_NM + +# LT_PATH_NM # ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" @@ -3287,16 +4785,51 @@ done IFS="$lt_save_ifs" done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + : ${lt_cv_path_NM=no} fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) -# AC_CHECK_LIBM -# ------------- + +# LT_LIB_M +# -------- # check for math library -AC_DEFUN([AC_CHECK_LIBM], +AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in @@ -3311,4025 +4844,4726 @@ AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - +AC_SUBST([LIBM]) +])# LT_LIB_M -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_CXX]) -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' -_LT_AC_SYS_COMPILER +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# Report which library types will actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. +# Define system-specific variables. case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi +aix*) + symcode='[[BCDT]]' ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' fi - ;; + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -# Source file extension for C++ test sources. -ac_ext=cpp +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE + # Check to see that the pipe works correctly. + pipe_works=no -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi -if test "$GXX" = yes; then - # Set up default GNU C++ configuration + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif - AC_PROG_LD +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + cat <<_LT_EOF >> conftest.$ac_ext - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 fi + rm -rf conftest* conftst* - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) else - GXX=no - with_gnu_ld=no - wlarc= + AC_MSG_RESULT(ok) fi -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc + case $host_os in + aix*) + # All AIX code is PIC. if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi - fi + ;; - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + hppa*64*|ia64*) + # +Z the default ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + ;; + esac ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; esac ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + lynxos*) ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi + m88k*) ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi + netbsd* | netbsdelf*-gnu) ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + psos*) ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + esac ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + vxworks*) ;; *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; -AC_LIBTOOL_CONFIG($1) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; -$rm -f confest.$objext + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# PORTME: override above test on systems where it is broken -ifelse([$1],[CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_AC_TAGVAR(predep_objects,$1)= - _LT_AC_TAGVAR(postdep_objects,$1)= - _LT_AC_TAGVAR(postdeps,$1)= - ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - esac - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - esac - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# Source file extension for f77 test sources. -ac_ext=f + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# Object file extension for compiled f77 test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -_LT_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' -# Source file extension for Java test sources. -ac_ext=java + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' +_LT_EOF + fi + ;; -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -AC_LIBTOOL_CONFIG($1) + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -AC_LIBTOOL_CONFIG($1) + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; + *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi ;; esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no -# A sed program that does not truncate output. -SED=$lt_SED + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -# The names of the tagged configurations supported by this script. -available_tags= + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; -# Whether or not to build static libraries. -build_old_libs=$enable_static + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# An echo program that does not interpret backslashes. -echo=$lt_echo + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes -# A C compiler. -LTCC=$lt_LTCC + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -# Whether we need hard or soft links. -LN_S=$lt_LN_S + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; -# A BSD-compatible nm program. -NM=$lt_NM + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; -# A symbol stripping program -STRIP=$lt_STRIP + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" + *nto* | *qnx*) + ;; -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# Used on cygwin: assembler. -AS="$AS" + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; -# The name of the directory that contains temporary libtool files. -objdir=$objdir + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; -# Object file suffix (normally "o"). -objext="$ac_objext" + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; -# Old archive suffix (normally "a"). -libext="$libext" + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Executable file suffix (normally ""). -exeext="$exeext" + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -# Must we lock files when doing compilation? -need_locks=$lt_need_locks + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -# Do we need a version for libraries? -need_version=$need_version + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Whether dlopen is supported. -dlopen_support=$enable_dlopen + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS -# Library versioning type. -version_type=$version_type -# Format of library name prefix. -libname_spec=$lt_libname_spec +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec +# Source file extension for C test sources. +ac_ext=c -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +# Source file extension for C++ test sources. +ac_ext=cpp -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + if test "$GXX" = yes; then + # Set up default GNU C++ configuration -# This is the shared library runtime path variable. -runpath_var=$runpath_var + LT_PATH_LD -# This is the shared library path variable. -shlibpath_var=$shlibpath_var + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs + else + GXX=no + with_gnu_ld=no + wlarc= + fi -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + gnu*) + ;; -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; -__EOF__ + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] + _LT_TAGVAR(hardcode_libdir_separator, $1)=: -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac + output_verbose_link_cmd='echo' -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' - # Check to see that the pipe works correctly. - pipe_works=no + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo { -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } }; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe else - AC_MSG_RESULT(ok) + echo "libtool.m4: error: problem compiling $1 test program" fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +$RM -f confest.$objext -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes ;; esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; esac - fi -], + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], [ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; +# Source file extension for RC test sources. +ac_ext=rc - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done ]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" +_LT_EOF ;; -esac + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac +} - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} -EOF - fi - ;; +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; +_LT_EOF +esac - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; +_LT_EOF + ;; + esac +]) - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; +# serial 6 ltoptions.m4 - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Do we need to explicitly link libc? +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 # -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +# serial 6 ltsugar.m4 - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. +# Generated from ltversion.in. -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) ]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) + +# nls.m4 serial 3 (gettext-0.15) +dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ(2.50) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- @@ -7490,7 +9724,7 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7502,10 +9736,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' +[am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], +m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -7519,10 +9753,12 @@ # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) +[AM_AUTOMAKE_VERSION([1.11])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -7579,14 +9815,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -7599,6 +9835,7 @@ AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -7612,14 +9849,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 +# serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -7676,6 +9913,16 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -7693,7 +9940,17 @@ done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -7703,19 +9960,23 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -7772,57 +10033,68 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 +#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -7854,13 +10126,13 @@ # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -7877,7 +10149,7 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl +[AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -7928,8 +10200,8 @@ AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -7937,24 +10209,37 @@ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -7965,18 +10250,19 @@ # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7987,7 +10273,14 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -8014,27 +10307,38 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl + AC_SUBST([MAINT])dnl ] ) @@ -8042,13 +10346,13 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MAKE_INCLUDE() # ----------------- @@ -8057,7 +10361,7 @@ [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -8067,24 +10371,24 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -8094,14 +10398,14 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -8118,7 +10422,14 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " @@ -8156,13 +10467,13 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -8179,7 +10490,7 @@ # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -8189,14 +10500,14 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_SANITY_CHECK # --------------- @@ -8205,16 +10516,29 @@ # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ @@ -8267,18 +10591,25 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 2 + # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. diff -Nru gnome-chemistry-utils-0.8.6/AUTHORS gnome-chemistry-utils-0.10.9/AUTHORS --- gnome-chemistry-utils-0.8.6/AUTHORS 2007-05-08 11:31:02.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/AUTHORS 2009-11-14 11:30:40.000000000 +0100 @@ -1,17 +1,24 @@ #utf-8 text -Jean Bréfort +Maintainer + Jean Bréfort Contributors - Nestor Diaz: graphics (icon, logo) - Daniel Leidert + Daniel Leidert Jordan Mantha - + Nestor Diaz: graphics (icon, logo) + Serge Moreau: templates + Julian Sikorski: templates Translators - Costantino Ceoldo : Italian - Michał Sałaban (Polish) - Nikodem Kuznik : Polish - Julian Sikorski (Polish) + Grégoire Jean-François Demets (Brasilian) + Ben Luo (Chinese (continental)) + I-Yuan Chiang (Chinese (Taiwan)) + Christian Neumair (German) Christian Lohmaier (German) Daniel Leidert (German) + Costantino Ceoldo (Italian) + Michał Sałaban (Polish) + Nikodem Kuznik (Polish) + Julian Sikorski (Polish) + Valek Filippov (Russian) diff -Nru gnome-chemistry-utils-0.8.6/ChangeLog gnome-chemistry-utils-0.10.9/ChangeLog --- gnome-chemistry-utils-0.8.6/ChangeLog 2008-01-20 12:02:26.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/ChangeLog 2009-11-14 11:30:40.000000000 +0100 @@ -1,93 +1,1985 @@ ##Text encoding: utf-8 -2008-01-20 Jean Bréfort - * gcu/filechooser.cc: fix print and image export when off-screen - rendering does not work, previous fix was not enough. [#21946] - * gcu/glview.cc: ditto. - -2008-01-19 Daniel Leidert - * configure.ac: Do not run pkg-config if XULRUNNER_CLIENT is empty. +2009-10-28 Jean Bréfort + * libs/gcu/glview.cc: fixed behavior with gtk+-2.18. + * mozilla-plugin/chem-viewer.cc: do not load an object more than once. + +2009-10-24 Jean Bréfort + * mozilla-plugin/moz-plugin.c (ChemNew): fix parameters management (don't + crash anymore). + +2009-10-19 Jean Bréfort + * libs/gcp/application.cc: fixed color in tool buttons. [#27746] -2008-01-19 Daniel Leidert - * Makefile.am: Set required automake version to 1.7. Cleaning a bit. - (DISTCHECK_CONFIGURE_FLAGS): Added --disable-schemas-install to make - distcheck pass. - * configure.ac: Cleaning and reordering stuff a bit. Add GCU_* - directly to CFLAGS, CXXFLAGS and LIBS, so there is no need to use them - in every Makefile.am. Fixed some macro usages and formatting and added - two variables MOZILLA_CONFIG and XULRUNNER_CLIENT to override the - automatic detection. - * gcu/Makefile.am: Drop INCLUDES (deprecated) in favour of - AM_CPPFLAGS. Drop Windows specific LDFLAGS changes, as this is handled - by configure. Removed GCU_* variables, handled by configure too. +2009-10-15 Jean Bréfort + * plugins/paint/bonds/chaintool.cc: Do not crash when changing the bond + angle in the chain tool. [sr #107062] + +2009-10-07 Jean Bréfort + * database/isotopes.xml.in: fixed three typos. [#27619] + +2009-09-20 Jean Bréfort + * goffice/gogcpwin.cc: fixed window title for component edition. + * libs/gcp/document.cc: ditto. + +2009-09-19 Jean Bréfort + * themes/paint/Wikipedia: revised theme (Matthias Mailänder). + +2009-09-18 Jean Bréfort + * libs/gcp/docprop.cc: unregister from themes when destroying. [#27419] + +2009-09-07 Jean Bréfort + * configure.ac: post release version bump (0.10.9). + +2009-09-06 Jean Bréfort + * configure.ac: post release version bump (0.10.8). + * libs/gcu/goffice-compat.h: update after last changes in goffice API. + +2009-09-03 Daniel Leidert + * goffice/Makefile.am: Don't use @foo@ syntax for variables like + CFLAGS. + * libs/canvas/Makefile.am: Ditto. + * libs/gcp/Makefile.am: Ditto. + * libs/gcu/Makefile.am: Ditto. * mozilla-plugin/Makefile.am: Ditto. + * plugins/loaders/cdx/Makefile.am: Ditto. + * plugins/loaders/cdxml/Makefile.am: Ditto. + * plugins/paint/arrows/Makefile.am: Ditto. + * plugins/paint/atoms/Makefile.am: Ditto. + * plugins/paint/bonds/Makefile.am: Ditto. + * plugins/paint/cycles/Makefile.am: Ditto. + * plugins/paint/residues/Makefile.am: Ditto. + * plugins/paint/selection/Makefile.am: Ditto. + * plugins/paint/templates/Makefile.am: Ditto. + * plugins/paint/text/Makefile.am: Ditto. + * plugins/paint/wikipedia/Makefile.am: Ditto. * programs/3d/Makefile.am: Ditto. * programs/calc/Makefile.am: Ditto. * programs/crystal/Makefile.am: Ditto. + * programs/paint/Makefile.am: Ditto. + * programs/spectra/Makefile.am: Ditto. * programs/table/Makefile.am: Ditto. * tests/Makefile.am: Ditto. - * database/Makefile.am: Just minor cosmetic changes. - * glade/Makefile.am: Ditto. - * glade/crystal/Makefile.am: Ditto. - * glade/table/Makefile.am: Ditto. - * pixmaps/Makefile.am: Ditto. - * samples/Makefile.am: Ditto. -2008-01-08 Daniel Leidert - * configure.ac: Call AC_LIBTOOL_WIN32_DLL. Added some stuff to - determine, if we try to compile on a Windows system [#21875]. - * gcu/Makefile.am (LDFLAGS): Set -no-undefined on Windows - systems [#21875]. Thanks to the submitter of the report. - * gcu/formula.cc: Fix a compilation error on Cygwin [#21875]. - * programs/calc/gchemcalc.cc: Ditto. - * programs/crystal/Makefile.am: Reordered. - * programs/table/Makefile.am: Ditto. +2009-09-02 Jean Bréfort + * configure.ac: set version to 0.10.7. + * libs/gcu/goffice-compat.h: new compatibility macro. + +2009-08-31 Jean Bréfort + * libs/gcu/spectrumdoc.cc: make things compile after go-color.h changes. + * plugins/paint/text/texttool.cc: ditto. + * programs/3d/window.cc: ditto. -2007-12-21 Jean Bréfort - * configure.ac: post release version bump (0.8.6). +2009-08-31 Jean Bréfort + * configure.ac: fixed a build issue. + * libs/gcu/Makefile.am: explicitly link with libglade. + +2009-08-31 Jean Bréfort + * libs/gcu/Makefile.am: make compile with most recent goffice (again). + * libs/gcu/goffice-compat.h: prepare for changes to come in goffice. + +2009-08-20 Jean Bréfort + * configure.ac: make compile again after a new goffice API change. + * libs/gcu/Makefile.am: ditto. + * libs/gcu/cmd-context.cc: ditto. + * libs/gcu/goffice-compat.h: ditto. + * libs/gcu/loader.h: ditto. + +2009-08-15 Jean Bréfort + * libs/gcp/theme.cc: fixed localization in themes. + * themes/paint/Wikipedia: ditto. + +2009-07-28 Jean Bréfort + * libs/gcp/application.cc: do not loose spaces while loading. [#27131] + * libs/gcp/text.cc: ditto. + +2009-07-10 Jean Bréfort + * libs/gcp/window.cc: do not use a freed string in a message box. + +2009-06-25 Jean Bréfort + * configure.ac: post release version bump (0.10.6). + +2009-06-17 Jean Bréfort + * *: make things compile with latest goffice. + +2009-05-22 Jean Bréfort + * configure.ac: make it compile with latest goffice. + * programs/table/gchemtable-curve.cc: fixed vector selections. + * programs/table/gchemtable-data-allocator.cc: make it compile with latest + goffice. + * programs/table/gchemtable-data.cc: fix min max calculation for vectors. + +2009-04-30 Jean Bréfort + * configure.ac: add check for go_data_serialize. + * programs/calc/gchemcalc.cc: update to new GOData API if present. + * programs/spectra/window.cc: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-data-allocator.cc: ditto. + * programs/table/gchemtable-data.cc: ditto. -2007-12-19 Jean Bréfort - * gcu/object.cc: fix loading grouped arrows in gchempaint. +2009-04-12 Jean Bréfort + * libs/gcp/preferences.cc: take new PANGO_WEIGHT_* values into account. + * libs/gcp/theme.cc: ditto. + +2009-04-10 Jean Bréfort + * libs/gcu/spectrumdoc.cc: take more goffice changes into account. + * libs/gcu/spectrumview.cc: ditto. + * programs/calc/gchemcalc.cc: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-data.cc: ditto. -2007-12-13 Jean Bréfort - * docs/reference/Doxyfile.in: removed obsolete tags. - * gcu/application.cc: add missing headers. [#21764] - * gcu/atom.cc: ditto. - * gcu/chem3ddoc.cc: ditto. - * gcu/chemistry.cc: ditto. - * gcu/crystalline.cc: ditto. - * gcu/crystalview.cc: ditto. - * gcu/document.cc: ditto. - * gcu/element.h: ditto. - * gcu/gtkchem3dviewer.cc: ditto. - * gcu/object.cc: ditto. - * gcu/value.cc: ditto. and fixed some const issues. - * gcu/value.h: ditto. - * mozilla-plugin/chem-viewer.cc: add missing headers. +2009-04-07 Jean Bréfort + * goffice/gchemutils.cc: make our code compatible with new goffice API. + [#26105] + * libs/gcu/cmd-context.cc: ditto. + * libs/gcu/gtkcomboperiodic.c: ditto. + * libs/gcu/loader.cc: ditto. + * libs/gcu/spectrumdoc.cc: ditto. + * libs/gcu/spectrumview.cc: ditto. + * mozilla-plugin/chem-viewer.cc: ditto. + * programs/calc/gchemcalc.cc: ditto. + * programs/spectra/gspectrum.cc: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-data-allocator.cc: ditto. + * programs/table/gchemtable-data.cc: ditto. + * programs/table/gchemtable-main.cc: ditto. + +2009-03-19 Jean Bréfort + * configure.ac: post release version bump (0.10.5). + +2009-03-18 Jean Bréfort + * docs/man/gchem3d.1: updated man page. + * docs/man/gcrystal.1: ditto. + * docs/man/gspectrum.1: ditto. + * programs/crystal/document.cc: fixed file comment update. + +2009-03-18 Jean Bréfort + * libs/gcp/theme.cc: fixed an issue related to file themes. + +2009-03-17 Jean Bréfort + * plugins/paint/text/fragmenttool.cc: Another fix to #25888. + * plugins/paint/text/texttool.cc: ditto. + +2009-03-16 Jean Bréfort + * libs/gcp/tool.h: Fixed crashes while copying text. [#25888] + * libs/gcp/widgetdata.cc: ditto. + * libs/gcp/widgetdata.h: ditto. + * plugins/paint/text/texttool.cc: ditto. + +2009-03-14 Jean Bréfort + * libs/gcu/object.cc: load "text" nodes when they have children. + +2009-03-09 Jean Bréfort + * plugins/loaders/cdx/cdx.cc: fix integer loading on big endian machines. + +2009-03-08 Jean Bréfort + * plugins/paint/bonds/chaintool.cc: dont resize the atom array + when not needed. + +2009-03-06 Jean Bréfort + * glade/crystal/prefs.glade: set page size to 0 for spin buttons to + avoid a warning when using gtk+-2 >= 2.14.0. + * glade/crystal/view-settings.glade: ditto. + * glade/image-resolution.glade: ditto. + * glade/image-size.glade: ditto. + * glade/paint/preferences.glade: ditto. + * glade/paint/zoom.glade: ditto. + * glade/print-setup.glade: ditto. + * glade/table/state-thermometer.glade: ditto. + * plugins/paint/arrows/arrowtool.glade: ditto. + * plugins/paint/bonds/bond.glade: ditto. + * plugins/paint/bonds/chain.glade: ditto. + * plugins/paint/cycles/cycle.glade: ditto. + * plugins/paint/cycles/cyclen.glade: ditto. + * plugins/paint/selection/group.glade: ditto. + * plugins/paint/text/fontsel.glade: ditto. + +2009-03-06 Daniel Leidert + * libs/gcp/about.cc: Fixed FSF address. + * libs/canvas/gcp-canvas-i18n.h: ditto. + * libs/canvas/gcp-canvas-text.c: ditto. + * libs/canvas/gcp-canvas-polygon.c: ditto. + * libs/canvas/gcp-canvas-line.c: ditto. + * libs/canvas/gcp-canvas-rect-ellipse.c: ditto. + * libs/canvas/gcp-canvas-text.h: ditto. + * libs/canvas/gcp-canvas-polygon.h: ditto. + * libs/canvas/gcp-canvas-line.h: ditto. + * libs/canvas/gcp-canvas-group.c: ditto. + * libs/canvas/gcp-canvas-rect-ellipse.h: ditto. + * libs/canvas/gcp-canvas-shape.c: ditto. + * libs/canvas/gcp-canvas-group.h: ditto. + * libs/canvas/gcp-canvas-pango.c: ditto. + * libs/canvas/gcp-canvas-shape.h: ditto. + * libs/canvas/gcp-canvas-pango.h: ditto. + * tests/testgtkperiodic.c: ditto. + * tests/testgtkcrystalviewer.c: ditto. + * tests/testgtkchem3dviewer.c: ditto. + + +2009-03-04 Jean Bréfort + * configure.ac: fixed compilation with goffice-0.6.x. + * goffice/Makefile.am: ditto. + * libs/gcp/Makefile.am: ditto. + * libs/gcu/Makefile.am: ditto. + * mozilla-plugin/Makefile.am: ditto. + * plugins/loaders/cdx/Makefile.am: ditto. + * plugins/loaders/cdxml/Makefile.am: ditto. + * plugins/paint/arrows/Makefile.am: ditto. + * plugins/paint/atoms/Makefile.am: ditto. + * plugins/paint/bonds/Makefile.am: ditto. + * plugins/paint/cycles/Makefile.am: ditto. + * plugins/paint/residues/Makefile.am: ditto. + * plugins/paint/selection/Makefile.am: ditto. + * plugins/paint/templates/Makefile.am: ditto. + * plugins/paint/text/Makefile.am: ditto. + * plugins/paint/wikipedia/Makefile.am: ditto. + * programs/3d/Makefile.am: ditto. + * programs/calc/Makefile.am: ditto. + * programs/calc/gchemcalc.cc: reomved an obsolete ifdef. + * programs/crystal/Makefile.am: fixed compilation with goffice-0.6.x. + * programs/paint/Makefile.am: ditto. + * programs/spectra/Makefile.am: ditto. + * programs/table/Makefile.am: ditto. + * tests/Makefile.am: ditto. + +2009-03-04 Jean Bréfort + * configure.ac: try removing as many unused direct shlib dependency + as possible. [#20617] + * glade/crystal/atoms.glade: set page size to 0 for spin buttons to + avoid a warning when using gtk+-2 >= 2.14.0. + * goffice/Makefile.am: fixes for #20617. + * libs/canvas/Makefile.am: ditto. + * libs/gcp/Makefile.am: ditto. + * libs/gcp/application.cc: don't call exit in a library. [#25686] + * libs/gcp/application.h: ditto. + * libs/gcp/window.cc: ditto. + * libs/gcp/window.h: ditto. + * libs/gcu/Makefile.am: fixes for #20617. + * libs/gcu/application.cc: store current directory as an URI. + * libs/gcu/application.h: make Printable a virtual parent class. + * libs/gcu/glview.cc: don't call exit in a library. [#25686] + * libs/gcu/glview.h: ditto. + * mozilla-plugin/Makefile.am: fixes for #20617. + * plugins/loaders/cdx/Makefile.am: ditto. + * plugins/loaders/cdxml/Makefile.am: ditto. + * plugins/paint/arrows/Makefile.am: ditto. + * plugins/paint/atoms/Makefile.am: ditto. + * plugins/paint/bonds/Makefile.am: ditto. + * plugins/paint/cycles/Makefile.am: ditto. + * plugins/paint/residues/Makefile.am: ditto. + * plugins/paint/selection/Makefile.am: ditto. + * plugins/paint/templates/Makefile.am: ditto. + * plugins/paint/text/Makefile.am: ditto. + * plugins/paint/wikipedia/Makefile.am: ditto. + * programs/3d/Makefile.am: ditto. + * programs/calc/Makefile.am: ditto. + * programs/calc/gchemcalc.cc: exits more cleanly (avoids a goffice + critical). + * programs/crystal/Makefile.am: fixes for #20617. + * programs/paint/Makefile.am: ditto. + * programs/spectra/Makefile.am: ditto. + * programs/spectra/document.h: remove unused OpenBabel namespace. + * programs/table/Makefile.am: fixes for #20617. + * tests/Makefile.am: ditto. + +2009-03-01 Daniel Leidert + * gendocs: Grep for lines beginning with DOC_MODULE. + * Makefile.am (MAINTAINERCLEANFILES): Added intltool*.in templates. + * docs/help/3d/Makefile.am (MAINTAINERCLEANFILES): Remove versioned + files created by gendocs. + * docs/help/calc/Makefile.am (MAINTAINERCLEANFILES): Ditto. + * docs/help/crystal/Makefile.am (MAINTAINERCLEANFILES): Ditto. + * docs/help/paint/Makefile.am (MAINTAINERCLEANFILES): Ditto. + * docs/help/spectra/Makefile.am (MAINTAINERCLEANFILES): Ditto. + * docs/help/table/Makefile.am (MAINTAINERCLEANFILES): Ditto. + +2009-03-01 Jean Bréfort + * programs/crystal/document.cc: use the label to name the current file, + not the title which might not exist. + +2009-02-25 Daniel Leidert + * configure.ac: Also check for iceape-plugin.pc. + * Makefile.am (schemasdir): Use $(GCONF_SCHEMA_FILE_DIR). + * programs/paint/Makefile.am (schemasdir): ditto. + +2009-02-25 Jean Bréfort + * configure.ac: add check for npfunctions.h. + * libs/gcu/element.cc: fix compilation with gcc-4.4. [#25628] + * libs/gcu/spectrumdoc.cc: ditto. + * mozilla-plugin/moz-plugin.c: (ChemNew): compiles with the new + xulrunner API. [see #25628] + +2009-02-01 Jean Bréfort + * docs/reference/Makefile.am: do not install API docs. + * libs/canvas/gcp-canvas-pango.c: (gnome_canvas_pango_draw_cairo): + do not end with unfinished cairo paths. + +2009-01-18 Jean Bréfort + * libs/gcp/bond.cc: one more double bond position fix. + * libs/gcp/fragment.cc: always replace main atom when its symbol is gone. + +2009-01-11 Jean Bréfort + * AUTHORS: added brasilian translator. + * Makefile.am: added COPYING-LIBS (for canvas library). + +2009-01-10 Daniel Leidert + * **/cc, **/.h: Fixed FSF address. + +2009-01-05 Jean Bréfort + * configure.ac: post release version bump (0.10.4). + +2008-12-31 Jean Bréfort + * libs/gcp/molecule.cc: fix stereochemistry for InChI and SMILES output. + +2008-12-24 Jean Bréfort + * libs/gcp/zoomdlg.cc: fix spin button callback behavior. + +2008-12-03 Jean Bréfort + * programs/crystal/document.cc: fix loading CIF files. + +2008-12-01 Jean Bréfort + * libs/canvas/gcp-canvas-group.c: a better fix for #24869. + * libs/gcp/application.cc: don't change tool if Tool::Deactivate returns + false. + * libs/gcp/document.cc: fix a possible crasher. + +2008-11-29 Jean Bréfort + * configure.ac: post release version bump (0.10.3). + +2008-11-29 Jean Bréfort + * libs/gcp/application.cc: unescape uri before displaying it. + * libs/gcp/stringdlg.cc: ditto. + * plugins/paint/wikipedia/wikipediatool.cc: ditto. + * programs/crystal/application.cc: ditto. + * programs/crystal/document.cc: ditto. + * programs/spectra/document.cc: ditto. + +2008-11-28 Jean Bréfort + * libs/canvas/gcp-canvas-group.c: (gnome_canvas_group_ext_bounds): take + invisible items into account. Fixes #24869. + * libs/gcp/stringdlg.cc: unescape uri before displaying it. * programs/3d/application.cc: ditto. + * programs/3d/document.cc: ditto. + * programs/calc/gchemcalc.cc: ditto. + * programs/crystal/application.cc: ditto. + * programs/crystal/document.cc: ditto. + * programs/spectra/application.cc: ditto. + * programs/table/gchemtable-app.cc: ditto. + +2008-11-27 Jean Bréfort + * libs/gcp/application.cc: unescape uri before displaying it. + * libs/gcp/document.cc: ditto. + +2008-11-26 Jean Bréfort + * libs/gcp/fragment.cc: fixed issues when loading a fragment with + a residue. + * libs/gcp/molecule.cc: ditto. + * libs/gcu/document.h: fixed typo in documentation. + +2008-11-24 Jean Bréfort + * libs/gcp/atom.cc: fixed font for attached hydrogen atoms. + * libs/gcp/document.cc: fixed printing natural size. + * libs/gcp/view.cc: fixed size for pdf, ps and eps exports. + +2008-11-23 Jean Bréfort + * libs/gcp/application.h: make m_Style accessible. + * plugins/paint/arrows/arrowtool.cc: make samples in property + page visible for dark themes. + +2008-11-21 Jean Bréfort + * goffice/gchemutils.cc: removed remaining #ifdef ENABLE_NLS + * libs/gcu/element.cc: ditto. + * plugins/loaders/cdx/cdx.cc: ditto. + * plugins/loaders/cdxml/cdxml.cc: ditto. + +2008-11-18 Jean Bréfort + * libs/gcp/atom.cc: don't crash or end in an infinite loop when adding + a fourth bond to phophorus. [#24863] + * libs/gcp/bond.cc: avoid a crash when a bond is created between two + molecules. [#24853] + +2008-11-17 Jean Bréfort + * libs/gcp/document.cc: theme reference fix. + * libs/gcp/fragment.cc: major update fixes. + * plugins/paint/bonds/bondtool.cc: fix undo when adding a bond between two + molecules. + * plugins/paint/text/fragmenttool.cc: fix bond update when changing an + atom to a fragment. + +2008-11-16 Jean Bréfort + * libs/gcp/atom.cc: do not add the hydrogens item when there are + no attached hydrogens. + * libs/gcp/bond.cc: a better fix for double bonds drawing. + * libs/gcp/fragment.cc: always set the atom as child. + * libs/gcp/theme.cc: call g_type_init. + * libs/gcu/object.h: fixed documentation. + * libs/gcu/residue.cc: don't free lang before using it. + * plugins/paint/selection/selectiontool.cc: display an error message box + instead crashing when a group creation failed. + +2008-11-16 Jean Bréfort + * configure.ac: post release version bump (0.10.2). + * libs/gcp/bond.cc: fixed second line for a double bond which was too + long in some cases. + +2008-11-15 Jean Bréfort + * libs/gcu/spectrumview.cc: on_max_changed calls OnMaxChanged. + +2008-11-12 Jean Bréfort + * libs/gcu/spectrumdoc.cc: enhance data loading [#24719] and always + update the invert axis check box. + +2008-11-11 Jean Bréfort + * libs/gcp/document.cc: delete previous version when saving. + * libs/gcu/object.cc: remove objects from dirty objects list when + destroying. + * plugins/paint/bonds/chaintool.cc: fixed when the chain starts from a + new atom. + * programs/crystal/document.cc: delete previous version when saving. + +2008-11-10 Jean Bréfort + * libs/gcp/bond.cc: prefer a cycle with cis configuration when drawing + double bonds. [#24802] + +2008-11-09 Jean Bréfort + * plugins/paint/bonds/bondtool.cc: don't allow bonds between molecules not + in the same group. + * plugins/paint/bonds/chaintool.cc: ditto. + +2008-11-08 Jean Bréfort + * plugins/paint/bonds/chaintool.cc: do not create more than one operation + (fixes an undo/redo issue) and correctly check if the addition of bonds + is really possible. + +2008-11-03 Jean Bréfort + * mozilla-plugin/chem-viewer.cc: convert filename to uri when needed. + +2008-11-01 Jean Bréfort + * configure.ac: do not request gnome builds for goffice >= 0.7.3. + * libs/gcu/spectrumdoc.cc: correctly load negative values in + (XY..XY) tables. [#24720] + +2008-10-31 Jean Bréfort + * configure.ac: post release version bump (0.10.1). + +2008-10-31 Jean Bréfort + * configure.ac: changed version to 0.10.0 for release. + * libs/gcp/fragment-atom.h: fixed API documentation. + * libs/gcp/text.h: ditto. + * libs/gcp/view.h: add missing API documentation. + +2008-10-26 Jean Bréfort + * programs/table/gchemtable-app.cc: implement save as image for curves. + * programs/table/gchemtable-app.h: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-curve.h: ditto. + +2008-10-25 Jordan Mantha + * docs/help/spectra/C/gspectrum.xml: miscellaneous typo and style fixes. + Also changed mixed DOS/Unix line endings to Unix. + +2008-10-24 Jordan Mantha + * docs/help/table/C/gchemtable.xml: miscellaneous typo and style fixes. + +2008-10-23 Jean Bréfort + * libs/gcp/fragment.cc: check if Fragment::m_Atom is not NULL before + using it. + +2008-10-18 Jean Bréfort + * configure.ac: post release version bump (0.9.99). + +2008-10-22 Jean Bréfort + * programs/table/gchemtable-curve.cc: sets the application as owner for + the dialog (fixes a memory leak), and add help support to the graph guru. + * programs/table/gchemtable-data.cc: fix minimum and maximum for a series + when the first element is not a number. + * docs/help/table/C/gchemtable.xml: partially update documentation. + * docs/help/table/C/figures/*.png: new updated screenshots. + +2008-10-19 Jean Bréfort + * docs/help/table/C/gchemtable.xml: partially update documentation. + * docs/help/table/C/figures/*.png: new or updated screenshots. + +2008-10-18 Jean Bréfort + * configure.ac: post release version bump (0.9.94). + +2008-10-18 Jean Bréfort + * docs/help/calc/C/gchemcalc.xml: added more documentation. + * docs/help/calc/C/figures/uv-vis-tools.png: new screenshot. + * docs/help/spectra/C/gspectrum.xml: wrote documentation for 0.10. + +2008-10-17 Jean Bréfort + * goffice/gogcpapp.cc: fix embedded object height. + * libs/gcu/spectrumdoc.cc: fix the origin for varian nmr dx files. + * libs/gcu/spectrumdoc.h: ditto. + * docs/help/spectra/C/figures/*: new screenshots. + +2008-10-14 Jean Bréfort + * libs/gcp/fragment-atom.cc: ensure symbol geometry is always + evaluated. + * libs/gcp/molecule.cc: fix contextual menu issues. + * libs/gcp/view.cc: enable selection of an atom even without a + visible item. + * libs/gcu/atom.cc: initalize Z to -1. to avoid confusion with + pseudo-atoms. + * plugins/paint/bonds/bondtool.cc: enable merging with atoms even + without a visible item. + * plugins/paint/cycles/cycletool.cc: ditto. + +2008-10-12 Jean Bréfort + * docs/reference/Doxyfile.in: add an image path. + * libs/gcp/fontsel.h: add a screenshot to the documentation. + * libs/gcp/theme.h: API documentation work (done for 0.10). + +2008-10-08 Jean Bréfort + * libs/gcp/reaction-arrow.cc: update position and length when the + attached object changes. + * libs/gcp/reaction-arrow.h: ditto. + * libs/gcp/settings.h: API documentation work. + * libs/gcp/theme.h: ditto. + * libs/gcp/tool.h: ditto. + +2008-10-05 Jean Bréfort + * libs/gcp/molecule.cc: removed unuseful SetSelected method. + * libs/gcp/molecule.h: API documentation work. + * libs/gcp/preferences.cc: made most methods private and replace them + by a private friend class. + * libs/gcp/preferences.h: ditto. + * libs/gcp/reaction-prop.h: API documentation work. + * libs/gcp/settings.h: ditto. + * libs/gcp/stringdlg.h: ditto. + * libs/gcp/text.h: ditto. + * libs/gcp/tool.cc: ditto. + * libs/gcp/tool.h: ditto. + * libs/gcp/view.h: ditto. + * libs/gcu/atom.h: ditto. + * libs/gcu/object.h: ditto. + +2008-09-29 Jean Bréfort + * configure.ac: post release version bump (0.9.93). + +2008-09-28 Jean Bréfort + * docs/help/crystal/C/gcrystal.xml: fixed validation. + +2008-09-28 Jean Bréfort + * docs/help/calc/C/gchemcalc.xml: added missing tags. + +2008-09-28 Jean Bréfort + * docs/help/3d/C/gchem3d.xml: fixed typo which made it fail + validation. + +2008-09-28 Jean Bréfort + * docs/help/crystal/*: updated Gnome Crystal help. + * libs/gcp/reactant.h: API documentation work. + * libs/gcp/reaction-arrow.h: ditto. + * libs/gcp/reaction-operator.h: ditto. + * libs/gcp/reaction-prop-dlg.h: ditto. + * libs/gcp/reaction-prop.h: ditto. + * libs/gcp/reaction-step.h: ditto. + * libs/gcp/reaction.h: ditto. + +2008-09-27 Jean Bréfort + * libs/gcp/application.cc: use theme colors for tools icons. + * libs/gcp/application.h: ditto. + * libs/gcp/atom.h: API documentation work. + * libs/gcp/bond.h: ditto. + * libs/gcp/fragment.h: ditto. + * libs/gcp/mesomer.h: ditto. + * libs/gcp/mesomery-arrow.h: ditto. + * libs/gcp/mesomery.h: ditto. + * libs/gcp/molecule.h: ditto. + * libs/gcp/newfiledlg.h: ditto. + * libs/gcp/plugin.cc: ditto. + * libs/gcp/plugin.h: ditto. + * libs/gcp/reaction-arrow.h: ditto. + * libs/gcp/text.h: ditto. + * plugins/paint/*/*.png: use transparency instead of grey level. [#24382] + +2008-09-21 Jean Bréfort + * libs/gcp/stringdlg.cc: use "SMILES" instead of "Smiles". + * docs/help/*: applications documentation work. + +2008-09-18 Julian Sikorski + * plugins/paint/residues/residues.glade: worked around "Name" translation problem. + +2008-09-17 Jean Bréfort + * libs/gcu/dialog.cc: do not set the application as default owner. + +2008-09-16 Jean Bréfort + * programs/calc/gchemcalc.cc: inhibit the Ask option which is not + implemented yet. + * programs/crystal/gcrystal.schemas.in: removed a localized string. + +2008-09-14 Jean Bréfort + * configure.ac: post release version bump (0.9.92). + * libs/gcp/fragment.h: API documentation work. + * libs/gcp/text.h: ditto. + * programs/3d/application.cc: fixed color background from + command line. + * docs/help/3d/*: gchem3d help work. + +2008-09-13 Jean Bréfort + * plugins/paint/text/Makefile.am: don't forget the glade file in the + tarball. + +2008-09-13 Jean Bréfort + * Makefile.am: add back intltool-*.in to EXTRA_DIST (needed + by intltool 0.37.1). + +2008-09-13 Jean Bréfort + * configure.ac: downgrade the intltool requirement to 0.37.1. + * docs/help/paint/*: update gchempaint help for 0.10. + +2008-09-09 Jean Bréfort + * plugins/loaders/cdx/cdx.cc: fixed compilation on ppc and other + big-endian machines. + +2008-09-07 Jean Bréfort + * plugins/paint/text/Makefile.am: fix fontsel.glade installation. + +2008-09-07 Jean Bréfort + * libs/gcp/bond.h: API documentation work. + * libs/gcp/document.h: ditto. + * libs/gcp/fontsel.h: ditto. + * libs/gcp/fragment-residue.h: ditto. + * libs/gcp/fragment.h: ditto. + * libs/gcp/residue.h: ditto. + * libs/gcp/view.h: ditto. + * libs/gcu/chemistry.h: ditto. + * libs/gcu/gtkperiodic.h: ditto. + +2008-09-06 Jean Bréfort + * configure.ac: post release version bump (0.9.91). + +2008-09-06 Jean Bréfort + * autogen.sh: reverted Daniels changes about docs links for now. + * configure.ac: ditto. + +2008-09-06 Jean Bréfort + * libs/gcp/residue.cc: no need to care about the delete button for + read-only residues. + * plugins/paint/residues/residues-dlg.cc: ditto. + * programs/calc/gchemcalc.cc: fixed typo. + * programs/spectra/window.cc: ditto. + * programs/table/gchemtable-data-allocator.cc: ditto. + +2008-09-06 Jean Bréfort + * configure.ac: requires goffice-0.6.5 or later. + * docs/help/paint/C/fidures/*.png: new or updated screenshots. + * glade/crystal/docprop.glade: updated the user interface to be + more HIG compliant + * libs/gcp/about.cc: updated copyright. + * libs/gcp/document.h: API documentation work. + * libs/gcp/fragment-residue.cc: fix an issue with residues management. + * libs/gcp/fragment.cc: ditto. + * libs/gcp/residue.cc: ditto. + * libs/gcp/residue.h: ditto. + * libs/gcu/element.cc: add brazilian to known languages. + * plugins/paint/residues/plugin.cc: fix an issue with residues management. + * plugins/paint/residues/residues-dlg.cc: ditto. + * plugins/paint/residues/residues.glade: ditto. + * programs/calc/gchemcalc.cc: updated copyright. + * programs/crystal/Makefile.am: add docprop.*. + * programs/crystal/application.cc: add document properties support. + * programs/crystal/docprop.cc: ditto. + * programs/crystal/docprop.h: ditto. + * programs/crystal/document.cc: ditto. + * programs/crystal/document.h: ditto. + * programs/crystal/window.cc: updated copyright. + * programs/spectra/window.cc: updated copyright. + +2008-09-01 Daniel Leidert + * docs/man/Makefile.am (gcu_man_src): Removed libgcu.3.xml. + (man_MANS): Removed libgcu.3. The filenames now automatically + consider stable/unstable releases. The target to create the manual + pages has been adusted accordingly. + * docs/man/gcu_entities.dtd.in: Define a suffix if built for an + unstable release. Use the API version as version number. + * docs/man/gchem3d.1.xml: Fixed IDs. Add suffix if necessary. + * docs/man/gchemcalc.1.xml: Likewise. + * docs/man/gchempaint.1.xml: Likewise. + * docs/man/gchemtable.1.xml: Likewise. + * docs/man/gcrystal.1.xml: Likewise. + * docs/man/gspectrum.1.xml: Likewise. + * docs/man/gchem3d-viewer-unstable.1: Renamed to docs/man/gchem3d.1 + and updated. + * docs/man/gchemcalc-unstable.1: Likewise. + * docs/man/gchempaint-unstable.1: Likewise. + * docs/man/gchemtable-unstable.1: Likewise. + * docs/man/gcrystal-unstable.1: Likewise. + * docs/man/gspectrum-unstable.1: Likewise. + * docs/man/libgcu-unstable.3: Removed completely. + * docs/man/libgcu.3.xml: Ditto. + +2008-09-01 Daniel Leidert + * docs/reference/Makefile.am: Fixed clean target. The directory is + under version control, so removing it completely is not a good idea. + +2008-09-01 Daniel Leidert + * configure.ac: Fixed some quotation. Fixed fallback value for xulclient + to not be empty. Use AC_CONFIG_LINKS to create the versioned files in + docs/help (also cleans these files/links with distclean). + * autogen.sh: Removed gendocs vall. Done via configure (see above). + +2008-08-27 Jean Bréfort + * autogen.sh: use gendocs. + * gendocs: new script to update help files names. + * libs/gcp/bond.h: API documentation work. + * libs/gcp/document.h: ditto. + * docs/help/paint/C/figures: updated screenshots. + +2008-08-26 Jean Bréfort + * configure.ac: remve G_DISABLE* to make things work with gtk+-2.14. + * libs/gcp/bond.h: API documentation work. + * libs/gcu/gtkchem3dviewer.cc: replaced deprecated gtk* calls. + * libs/gcu/gtkcrystalviewer.cc: ditto. + * libs/gcu/gtkperiodic.c: ditto. + +2008-08-25 Jean Bréfort + * plugins/paint/wikipedia/wikipediatool.cc: removed "unstable" word. + * programs/calc/gchemcalc.cc: ditto. + +2008-08-24 Jean Bréfort + * libs/canvas/gcp-canvas-bpath.h: replaced deprecated GTK_CHECK* macros. + * libs/canvas/gcp-canvas-group.h: ditto. + * libs/canvas/gcp-canvas-line.h: ditto. + * libs/canvas/gcp-canvas-pango.h: ditto. + * libs/canvas/gcp-canvas-polygon.h: ditto. + * libs/canvas/gcp-canvas-rect-ellipse.h: ditto. + * libs/canvas/gcp-canvas-shape.h: ditto. + * libs/canvas/gcp-canvas-text.h: ditto. + * libs/gcp/view.cc: ditto. + * libs/gcu/gtkchem3dviewer.h: ditto. + * libs/gcu/gtkcrystalviewer.h: ditto. + * libs/gcu/gtkperiodic.h: ditto. + * libs/gcu/gtkspectrumviewer.h: ditto. + +2008-08-24 Jean Bréfort + * programs/table/Makefile.am: always create the correct link. + +2008-08-24 Jean Bréfort + * configure.ac: export missing constant. + * programs/3d/Makefile.am: restore missing '['. + * programs/calc/Makefile.am: ditto. + * programs/crystal/Makefile.am: ditto. + * programs/paint/Makefile.am: ditto. + * programs/spectra/Makefile.am: ditto. + * programs/table/Makefile.am: ditto. + +2008-08-24 Jean Bréfort + * configure.ac: post release version bump (0.9.90). + +2008-08-23 Jean Bréfort + * autogen.sh: request /bin/bash. + * configure.ac: fix various build issues. + * docs/help/3d/Makefile.am: ditto. + * docs/help/calc/Makefile.am: ditto. + * docs/help/crystal/Makefile.am: ditto. + * docs/help/spectra/Makefile.am: ditto. + * docs/help/table/Makefile.am: ditto. + * programs/3d/Makefile.am: ditto. + * programs/calc/Makefile.am: ditto. + * programs/crystal/Makefile.am: ditto. + * programs/paint/Makefile.am: ditto. + * programs/spectra/Makefile.am: ditto. + * programs/table/Makefile.am: ditto. + +2008-08-23 Jean Bréfort + * tests/testgtkchem3dviewer.c: fix compilation without gnome-vfs. + +2008-08-23 Jean Bréfort + * docs/man/Makefile.am: removed the unstable keyword. + * docs/man/gcu_entities.dtd.in: ditto. + +2008-08-23 Jean Bréfort + * configure.ac: use versioned help files. + * libs/gcp/application.cc: ditto. + * libs/gcu/application.cc: ditto. + * libs/gcu/spectrumdoc.cc: fixed a variable change bug. + * programs/3d/application.cc: use versioned help files. + * programs/calc/gchemcalc.cc: ditto. + * programs/crystal/application.cc: ditto. + * programs/spectra/application.cc: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-elt.cc: ditto. + * programs/table/gchemtable-main.cc: ditto. + +2008-08-22 Jean Bréfort + * configure.ac: generate the missing Makefile. + +2008-08-22 Jean Bréfort + * docs/help/spectra/C/gspectrum.xml: add missing docs. + * docs/help/spectra/C/legal.xml: ditto. + * docs/help/spectra/Makefile.am: ditto. + * docs/help/spectra/gspectrum.omf.in: ditto. + +2008-08-22 Jean Bréfort + * autogen.sh: use versioned help files. + * docs/help/3d/Makefile.am: ditto. + * docs/help/3d/gchem3d-viewer-unstable.omf.in: ditto. + * docs/help/3d/gchem3d-viewer.omf.in: ditto. + * docs/help/Makefile.am: ditto. + * docs/help/calc/Makefile.am: ditto. + * docs/help/calc/gchemcalc-unstable.omf.in: ditto. + * docs/help/crystal/Makefile.am: ditto. + * docs/help/crystal/gcrystal-unstable.omf.in: ditto. + * docs/help/table/Makefile.am: ditto. + * docs/help/table/gchemtable-unstable.omf.in: ditto. + +2008-08-21 Jean Bréfort + * libs/gcp/tool.h: API documentation work. + * libs/gcp/view.h: ditto. + * libs/gcu/spectrumdoc.cc: more work on X variables switch and fix an + nmr integration issue. + * libs/gcu/spectrumdoc.h: ditto. + +2008-08-20 Jean Bréfort + * libs/gcp/fragment-residue.h: API documentation work. + * libs/gcp/tool.h: ditto. + * libs/gcu/spectrumdoc.cc: allow invertion of X axis and Y variable + selection (switch between absorbance and transmittance ). + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: ditto. + * libs/gcu/spectrumview.h: ditto. + +2008-08-19 Jean Bréfort + * libs/gcp/atom.h: API documentation work. + * libs/gcp/bond.h: ditto. + * libs/gcp/docprop.h: ditto. + * libs/gcp/document.h: ditto. + * libs/gcp/electron.h: ditto. + * libs/gcp/fontsel.h: ditto. + * libs/gcp/fragment-atom.h: ditto. + * libs/gcp/fragment-residue.h: ditto. + * libs/gcp/mesomer.h: ditto. + * libs/gcp/mesomery-arrow.h: ditto. + * libs/gcp/mesomery.h: ditto. + * libs/gcp/molecule.h: ditto. + * libs/gcp/operation.h: ditto. + * libs/gcu/atom.cc: fixed Id setting. + * libs/gcu/molecule.cc: fixed a bug in Molecule::MoleculeFromFormula. + * libs/gcu/object.h: ifxed typo in API documentation. + * libs/gcu/spectrumdoc.cc: inhibit FID transform, but fixed ppm origin + using a Brücker specific field. + * libs/gcu/spectrumdoc.h: ditto. + * plugins/loaders/cdxml/cdxml.cc: import atoms groups. + +2008-08-12 Jean Bréfort + * libs/gcp/atom.h: fixed doc typo. + * libs/gcp/bond.h: API documentation work. + * libs/gcp/docprop.h: ditto. + * libs/gcp/electron.h: ditto. + * libs/gcp/text-object.cc: implement GetProperty for raw text. + * libs/gcp/text-object.h: ditto. + * libs/gcu/atom.cc: fixed Atom::GetProperty. + * libs/gcu/object.cc: removed an empty line. + * plugins/loaders/cdx/cdx.cc: fixed a chemical text import issue. + * plugins/loaders/cdxml/cdxml.cc: import texts. + +2008-08-11 Jean Bréfort + * goffice/gchemutils.cc: make things work with libgoffice >= 0.6. + * goffice/gogcpapp.cc: ditto. + * goffice/gogcpapp.h: ditto. + * goffice/gogcuapp.h: ditto. + * libs/gcp/application.h: API documentation work. + * libs/gcp/arrow.h: ditto. + * libs/gcp/atom.h: ditto. + * libs/gcp/document.h: ditto. + * libs/gcp/fragment.cc: fixed style on import from .cdx. + * libs/gcp/fragment.h: API documentation work. + * libs/gcp/tool.h: ditto. + * libs/gcp/widgetdata.h: ditto. + * libs/gcu/atom.cc: include config.h + * libs/gcu/bond.cc: ditto. + * libs/gcu/document.h: fixed API documentation. + * libs/gcu/gtkcrystalviewer.cc: include config.h + * libs/gcu/object.cc: implement GetProperty for GCU_PROP_ID. + * libs/gcu/object.h: fixed API documentation. + * libs/gcu/sphere.cc: include config.h + * libs/gcu/vector.cc: include config.h + * libs/gcu/window.cc: add Show and Destroy methods. + * libs/gcu/window.h: ditto. + * plugins/loaders/cdxml/cdxml.cc: some work on atoms groups. + * plugins/paint/residues/residues-dlg.cc: fixed for using the new + gcu::Window class. + * plugins/paint/residues/residues-dlg.h: ditto. + * plugins/paint/selection/plugin.cc: removed uused UI. + +2008-08-07 Jean Bréfort + * goffice/Makefile.am: start reimplementation of the gchempaint + goffice plugin. + * goffice/gchemutils-priv.h: ditto. + * goffice/gchemutils.cc: ditto. + * goffice/gogcpapp.cc: ditto. + * goffice/gogcpapp.h: ditto. + * goffice/gogcpwin.cc: ditto. + * goffice/gogcpwin.h: ditto. + * goffice/gogcuapp.cc: ditto. + * goffice/gogcuapp.h: ditto. + * goffice/plugin.xml.in: ditto. + * libs/gcp/application.h: more API documentation work. + * libs/gcp/target.cc: derives from gcu::Window. + * libs/gcp/target.h: ditto. + * libs/gcp/text-object.h: API documentation work. + * libs/gcp/text.h: ditto. + * libs/gcp/tools.h: ditto. + * libs/gcu/Makefile.am: add window.*. + * libs/gcu/application.h: fixed API documentation. + * libs/gcu/window.cc: new window base class. + * libs/gcu/window.h: ditto. + * plugins/paint/residues/residues-dlg.h: add a Show() method. + +2008-08-04 Jean Bréfort + * libs/gcp/application.cc: use gio/gvfs instead of gnomevfs. + * libs/gcp/application.h: ditto. + * libs/gcp/document.cc: ditto. + * libs/gcp/stringdlg.cc: ditto. + * libs/gcp/stringdlg.h: ditto. + * libs/gcp/view.cc: ditto. + * libs/gcp/window.cc: ditto. + * libs/gcu/application.cc: ditto. + * libs/gcu/application.h: ditto. + * libs/gcu/filechooser.cc: ditto. + * libs/gcu/glview.cc: ditto. + * mozilla-plugin/chem-viewer.cc: ditto. + * plugins/paint/wikipedia/wikipediatool.cc: ditto. * programs/3d/main.cc: ditto. + * programs/3d/window.cc: ditto. * programs/calc/gchemcalc.cc: ditto. * programs/crystal/application.cc: ditto. - * programs/crystal/atom.cc: ditto. - * programs/crystal/atomsdlg.cc: ditto. * programs/crystal/document.cc: ditto. - * programs/crystal/line.cc: ditto. * programs/crystal/main.cc: ditto. - * programs/crystal/view.cc: ditto. * programs/crystal/window.cc: ditto. + * programs/paint/main.cc: ditto. + * programs/spectra/gspectrum.cc: ditto. + * programs/spectra/window.cc: ditto. * programs/table/gchemtable-app.cc: ditto. * programs/table/gchemtable-curve.cc: ditto. - * programs/table/gchemtable-elt.cc: ditto. + * programs/table/gchemtable-data-allocator.cc: ditto. + +2008-08-03 Jean Bréfort + * configure.ac: try to replace gnomevfs by gio/gvfs as much as possible. + * libs/gcp/Hposdlg.h: API documentation work. + * libs/gcp/widgetdata.h: ditto. + * libs/gcu/application.cc: try to replace gnomevfs by gio/gvfs as much + as possible. + * libs/gcu/chem3ddoc.cc: ditto. + * libs/gcu/crystalview.cc: ditto. + * libs/gcu/filechooser.cc: ditto. + * libs/gcu/glview.cc: ditto. + * libs/gcu/spectrumdoc.cc: ditto. + * programs/3d/application.cc: ditto. + * programs/3d/main.cc: ditto. + * programs/3d/window.cc: ditto. + * programs/calc/gchemcalc.cc: ditto. + * programs/spectra/Makefile.am: fixed typo. + * programs/table/gchemtable-app.cc: try to replace gnomevfs by gio/gvfs + as much as possible. + * programs/table/gchemtable-main.cc: ditto. + +2008-08-02 Jean Bréfort + * libs/gcp/document.cc: imports new resodues from gchempaint and chemdraw + (.cdx) files. + * libs/gcp/fragment-atom.cc: ditto. + * libs/gcp/fragment-residue.cc: ditto. + * libs/gcp/fragment.cc: ditto. + * libs/gcp/molecule.cc: ditto. + * libs/gcp/operation.h: API documentation work. + * libs/gcp/residue.cc: imports new residues from gchempaint and chemdraw + (.cdx) files. + * libs/gcp/residue.h: ditto. + * libs/gcp/view.h: API documentation work. + * libs/gcp/widgetdata.h: ditto. + * libs/gcp/window.h: ditto. + * libs/gcp/zoomdlg.h: ditto. + * libs/gcu/molecule.cc: imports new residues from gchempaint and chemdraw + (.cdx) files. + * libs/gcu/residue.cc: ditto. + * plugins/loaders/cdx/cdx.cc: ditto. + * plugins/paint/bonds/bondtool.cc: allow adding a bond starting from a + fragment. + * plugins/paint/residues/residues-dlg.cc: imports new residues from + gchempaint and chemdraw (.cdx) files. + +2008-07-30 Jean Bréfort + * configure.ac: define a suffix to add to applications menu entries for + unstable versions. + * libs/gcp/application.h: minor documentation update. + * libs/gcp/document.h: fixed residues import. + * libs/gcp/residue.cc: ditto. + * libs/gcp/residue.h: ditto. + * libs/gcp/target.h: API documentation. + * libs/gcp/window.cc: removed a duplicate member. + * libs/gcp/window.h: API documentation. + * libs/gcp/zoomdlg.h: ditto. + * libs/gcu/molecule.cc: fixed a bug in the constructor. + * libs/gcu/residue.cc: fixed residues import. + * libs/gcu/residue.h: ditto. + * plugins/loaders/cdx/cdx.cc: ditto. + * plugins/paint/residues/plugin.cc: ditto. + * plugins/paint/residues/plugin.h: ditto. + * plugins/paint/residues/residues-dlg.cc: ditto. + * plugins/paint/residues/residues-dlg.h: ditto. + * programs/3d/gchem3d.desktop.in.in: adds the API version number to the + applications menu entry when unstable. + * programs/calc/gchemcalc.desktop.in.in: + * programs/crystal/gcrystal.desktop.in.in: + * programs/paint/gchempaint.desktop.in.in: + * programs/spectra/gspectrum.desktop.in.in: + * programs/table/gchemtable.desktop.in.in: + +2008-07-29 Jean Bréfort + * configure.ac: a better definition of stable versions. + * libs/gcp/application.h: documentation update. + * libs/gcp/arrow.h: ditto. + * libs/gcp/atom.cc: prefer horizontal positions for H atoms. + * libs/gcp/atom.h: documentation update. + * libs/gcp/document.cc: some work on document specific residues. + * libs/gcp/document.h: ditto. + * libs/gcp/residue.cc: ditto. + * libs/gcp/residue.h: ditto. + * libs/gcu/application.h: fixed documentation. + * libs/gcu/document.cc: some work on document specific residues. + * libs/gcu/document.h: ditto. + * libs/gcu/molecule.cc: ditto. + * libs/gcu/residue.cc: ditto. + * libs/gcu/residue.h: ditto. + * plugins/loaders/cdx/cdx.cc: imoort unknown residues. + * plugins/loaders/cdx/plugin.xml.in: remove write support. + * plugins/loaders/cdxml/plugin.xml.in: ditto. + * programs/3d/Makefile.am: use LN_S. + * programs/calc/Makefile.am: ditto. + * programs/crystal/Makefile.am: ditto. + * programs/paint/Makefile.am: ditto. + * programs/spectra/Makefile.am: ditto. + * programs/spectra/gspectrum.desktop.in.in: removed "unstable". + * programs/table/Makefile.am: use LN_S. + +2008-07-26 Jean Bréfort + * glade/paint/H-pos.glade: allow hydrogens above and below atoms. + * libs/gcp/Hposdlg.cc: ditto. + * libs/gcp/about.h: documentation update. + * libs/gcp/application.h: ditto. + * libs/gcp/arrow.h: ditto. + * libs/gcp/atom.cc: allow hydrogens above and below atoms. + * libs/gcp/atom.h: ditto. + * libs/gcp/widgetdata.h: documentation update. + * libs/gcu/application.h: minor documentation update. + * libs/gcu/chemistry.h: ditto. + * libs/gcu/crystalatom.h: ditto. + * libs/gcu/element.h: ditto. + * libs/gcu/object.h: ditto. + +2008-07-23 Jean Bréfort + * libs/gcp/application.cc: cleaned out all unstable stuff. + * libs/gcp/text.cc: serialize anchor. + * libs/gcp/window.cc: fix recent files list. + * libs/gcu/application.cc: use default GtkRecentManager. + * programs/3d/window.cc: fix recent files list. + * programs/crystal/window.cc: ditto. + * programs/spectra/window.cc: ditto. + +2008-07-19 Jean Bréfort + * libs/canvas/gcp-canvas-group.c: (gnome_canvas_group_ext_bounds), + (gnome_canvas_group_ext_class_init): enhance bounds evaluation. + * libs/gcp/atom.cc: start work on H atom position enhancement. + * libs/gcp/atom.h: ditto. + * libs/gcp/bond.cc: finished rewrite of double bnd redering. + * libs/gcp/fragment-atom.cc: minor updates. + * libs/gcp/fragment.cc: ditto. + * libs/gcp/text.cc: support markup property. + * libs/gcp/text.h: ditto. + * libs/gcp/view.cc: ensure that the size is valid. + * libs/gcp/widgetdata.cc: enhance bounds evaluation. + * libs/gcu/application.h: more API documentation work. + * libs/gcu/atom.h: ditto. + * libs/gcu/bond.h: ditto. + * libs/gcu/chain.h: ditto. + * libs/gcu/chem3ddoc.h: ditto. + * libs/gcu/cmd-context.h: ditto. + * libs/gcu/crystalatom.h: ditto. + * libs/gcu/crystalcleavage.h: ditto. + * libs/gcu/crystaldoc.h: ditto. + * libs/gcu/crystalline.h: ditto. + * libs/gcu/crystalview.h: ditto. + * libs/gcu/cycle.h: ditto. + * libs/gcu/cylinder.h: ditto. + * libs/gcu/dialog-owner.h: ditto. + * libs/gcu/dialog.h: ditto. + * libs/gcu/document.h: ditto. + * libs/gcu/element.h: ditto. + * libs/gcu/filechooser.h: ditto. + * libs/gcu/formula.h: ditto. + * libs/gcu/gldocument.h: ditto. + * libs/gcu/glview.h: ditto. + * libs/gcu/isotope.h: ditto. + * libs/gcu/loader.h: ditto. + * libs/gcu/matrix.h: ditto. + * libs/gcu/matrix2d.h: ditto. + * libs/gcu/molecule.h: ditto. + * libs/gcu/object.h: ditto. + * libs/gcu/objprops.h: ditto. + * libs/gcu/print-setup-dlg.h: ditto. + * libs/gcu/printable.h: ditto. + * libs/gcu/residue.h: ditto. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.h: ditto. + * libs/gcu/sphere.h: ditto. + * libs/gcu/value.h: ditto. + * libs/gcu/vector.h: ditto. + * plugins/loaders/cdx/cdx.cc: import text decorations. + * plugins/paint/atoms/chargetool.cc: minor update. + +2008-07-15 Jean Bréfort + * libs/gcp/bond.cc: completed (hopefully) the work on double bonds display. + * libs/gcu/element.h: more API documentation work. + * libs/gcu/glview.h: ditto. + * libs/gcu/isotope.h: ditto. + * libs/gcu/loader.cc: ditto. + * libs/gcu/loader.h: ditto. + * libs/gcu/macros.h: ditto. + +2008-07-13 Jean Bréfort + * docs/reference/Doxyfile.in: fixed include paths. + * libs/gcp/atom.cc: more work on double bonds display. + * libs/gcp/bond.cc: ditto. + * libs/gcu/bond.h: more API documentation work. + * libs/gcu/chain.h: ditto. + * libs/gcu/chem3ddoc.h: ditto. + * libs/gcu/cmd-context.h: ditto. + * libs/gcu/crystalline.h: ditto. + * libs/gcu/crystalview.h: ditto. + * libs/gcu/cycle.cc: ditto. + * libs/gcu/cycle.h: ditto. + * libs/gcu/dialog-owner.h: ditto. + * libs/gcu/document.h: ditto. + * libs/gcu/element.h: ditto. + * libs/gcu/formula.h: ditto. + +2008-07-12 Jean Bréfort + * libs/gcp/application.h: some API documentation work. + * libs/gcp/bond.cc: enhanced more double bonds display. + * libs/gcp/bond.h: some API documentation work. + * libs/gcu/application.h: ditto. + * libs/gcu/atom.h: ditto. + * libs/gcu/bond.h: ditto. + * libs/gcu/chain.cc: ditto. + * libs/gcu/chain.h: ditto. + * libs/gcu/cycle.cc: ditto. + * libs/gcu/cycle.h: ditto. + * libs/gcu/cylinder.h: ditto. + * libs/gcu/object.h: ditto. + +2008-07-11 Jean Bréfort + * libs/gcp/application.h: some API documentation work. + * libs/gcp/bond.cc: enhanced some double bonds display. + * libs/gcu/element.h: some API documentation work. + * libs/gcu/formula.h: ditto. + * libs/gcu/sphere.h: ditto. + * libs/gcu/vector.h: ditto. + +2008-07-08 Jean Bréfort + * libs/gcp/view.cc: reimplement atom change using keyboard which was + broken since the removal of the background rectangle. + +2008-07-07 Jean Bréfort + * libs/gcp/application.cc: fixed a couple of file opening issues. + * libs/gcp/fragment-atom.cc: set ShowSymbol to true so that carbon atoms + are correctly taken into account. + +2008-07-05 Jean Bréfort + * libs/gcp/fragment.cc: Use gcu::Formula to invert the formula when needed. + * libs/gcu/formula.cc: elements can now export text instead of markup. + * libs/gcu/formula.h: ditto. + +2008-07-03 Jean Bréfort + * plugins/loaders/cdx/cdx.cc: fixed generic group loading. + +2008-06-22 Jean Bréfort + * configure.ac: post release version bump (0.9.5). + +2008-06-22 Jean Bréfort + * Makefile.am: use intltoo >= 0.40.0. + * configure.ac: ditto. + +2008-06-22 Jean Bréfort + * libs/gcp/fragment-atom.cc: fixed bounds evaluation. + * libs/gcp/window.cc: correctly exit when requested. + * plugins/loaders/cdx/cdx.cc: fix various new issues. + * programs/table/gchemtable-curve.cc: clear the guru when done. + * programs/table/gchemtable-curve.h: ditto. + +2008-06-21 Jean Bréfort + * libs/canvas/gcp-canvas-group.c: fixed parent class. + * libs/gcp/atom.cc: fix canvas item bounds. + * libs/gcp/fragment-residue.cc: fixed a load time crasher. + * libs/gcp/fragment.cc: fix canvas item bounds. + * libs/gcu/molecule.cc: enhance cdx file loading. + * plugins/loaders/cdx/cdx.cc: ditto. + +2008-06-15 Jean Bréfort + * glade/table/curve.glade: set a default title. + * libs/gcu/application.cc: clear all dialogs before exiting to avoid + a bad goffice shutdown. + * libs/gcu/dialog-owner.cc: add ClearDialogs method. + * libs/gcu/dialog-owner.h: ditto. + * libs/gcu/dialog.cc: always correctly set the owner. + * programs/table/gchemtable-app.cc: fix shutdown. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-curve.h: ditto. + * programs/table/gchemtable-data-allocator.cc: use a GtkEntry for scalar + data. + * programs/table/gchemtable-main.cc: fix shutdown. + +2008-06-08 Jean Bréfort + * libs/gcp/atom.cc: do not draw a white rectangle under the atom anymore. + * libs/gcp/atom.h: ditto. + * libs/gcp/fragment-atom.cc: ditto. + * libs/gcp/fragment-atom.h: ditto. + * libs/gcp/fragment.cc: ditto. + * libs/gcp/fragment-residue.cc: fix a crasher. + * libs/gcu/application.cc: add missing spaces. + * libs/gcu/element.cc: abort when the database can't be loaded. + +2008-06-07 Jean Bréfort + * libs/gcu/spectrumview.cc: fixed number of decimals in X-axis limits. + +2008-05-25 Jean Bréfort + * libs/gcu/spectrumdoc.cc: fixed integration. + +2008-05-23 Jean Bréfort + * programs/table/gchemtable-data-allocator.cc: data can now be changed. + * programs/table/gchemtable-main.cc: allow linear regressions. + +2008-05-22 Jean Bréfort + * libs/gcu/element.h: removed obsolete prototype. + * programs/table/gchemtable-app.cc: add a "New chart" menu item. + * programs/table/gchemtable-app.h: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-data-allocator.cc: use vector type data list. + * programs/table/gchemtable-data.cc: build vector type data list. + * programs/table/gchemtable-data.h: ditto. + * programs/table/gchemtable-main.cc: only allow scatter plots (does not + really work because of a goffice bug). + +2008-05-16 Jean Bréfort + * libs/gcp/atom.cc: don't add hydrogens to metals. + * libs/gcu/element.cc: add Element::IsMetallic. + * libs/gcu/element.h: ditto. + +2008-05-15 Jean Bréfort + * configure.ac: enhanced goffice detection. + * glade/crystal/atoms.glade: add new radii related controls + * libs/gcu/element.cc: fix a crash. + * programs/crystal/atomsdlg.cc: enhance radii managing. + * programs/crystal/atomsdlg.h: ditto. + +2008-05-13 Jean Bréfort + * libs/gcu/crystaldoc.cc: use VdW radii with an effective ratio + of 40% when loading a cif file. + +2008-05-10 Jean Bréfort + * configure.ac: we need to generate the correct desktop files + using the API version in the executable name. + * programs/3d/Makefile.am: ditto. + * programs/3d/gchem3d.desktop.in: ditto. + * programs/3d/gchem3d.desktop.in.in: ditto. + * programs/3d/window.cc: ditto. + * programs/calc/Makefile.am: ditto. + * programs/calc/gchemcalc.desktop.in: ditto. + * programs/calc/gchemcalc.desktop.in.in: ditto. + * programs/crystal/Makefile.am: ditto. + * programs/crystal/gcrystal.desktop.in: ditto. + * programs/crystal/gcrystal.desktop.in.in: ditto. + * programs/crystal/x-gcrystal.desktop.in: ditto. + * programs/crystal/x-gcrystal.desktop.in.in: ditto. + * programs/paint/Makefile.am: ditto. + * programs/paint/gchempaint.desktop.in: ditto. + * programs/paint/gchempaint.desktop.in.in: ditto. + * programs/paint/x-gchempaint.desktop.in: ditto. + * programs/paint/x-gchempaint.desktop.in.in: ditto. + * programs/spectra/Makefile.am: ditto. + * programs/spectra/gspectrum.desktop.in: ditto. + * programs/spectra/gspectrum.desktop.in.in: ditto. + * programs/table/Makefile.am: ditto. + * programs/table/gchemtable.desktop.in: ditto. + * programs/table/gchemtable.desktop.in.in: ditto. + +2008-05-09 Jean Bréfort + * libs/gcp/theme.cc: fixed libgoffice initialization. + * libs/gcu/application.cc: ditto. + * mozilla-plugin/chem-viewer.cc: ditto. + * programs/calc/gchemcalc.desktop.in: add version to executable. + * programs/crystal/gcrystal.desktop.in: ditto. + * programs/paint/gchempaint.desktop.in: ditto. + * programs/spectra/gspectrum.desktop.in: ditto. + * programs/table/gchemtable.desktop.in: ditto. + +2008-05-07 Jean Bréfort + * database/radii.xml.in: add data for all elements, even if no + radius is known, and remove van der Waals and covalent radii. + * libs/gcu/element.cc: use van der Waals and covalent radii from BODR. + * libs/gcu/element.h: enhace GetProperty like methods.. + * libs/gcu/value.h: add a missing const keyword. + +2008-05-01 Jean Bréfort + * libs/gcp/atom.cc: no more white rectangle behind atoms. + * libs/gcp/atom.h: ditto. + * libs/gcp/bond.cc: ditto. + * libs/gcp/fragment-residue.cc: fixed signature of GetSymbol. + * libs/gcp/fragment-residue.h: ditto. + * libs/gcu/residue.cc: do not reload a molecule. + +2008-04-30 Jean Bréfort + * libs/gcu/formula.cc: do not crash when first element in the raw + formula is artificial. + +2008-04-30 Jean Bréfort + * libs/gcu/formula.cc: more work on ambiguous symbols. + * libs/gcu/formula.h: ditto. + * libs/gcu/molecule.cc: ditto. + +2008-04-28 Jean Bréfort + * libs/gcu/formula.cc: more work on ambiguous symbols. + * libs/gcu/formula.h: ditto. + * libs/gcu/molecule.cc: ditto. + * libs/gcu/object.cc: ditto. + * libs/gcu/residue.cc: ditto. + * libs/gcu/residue.h: ditto. + * programs/calc/gchemcalc.cc: ditto. + +2008-04-25 Jean Bréfort + * all: changed build system to make branching easier. + +2008-04-23 Jordan Mantha + * libs/gcp/fragment-residue.cc: add cstring include for g++ 4.3 + * libs/gcp/reaction-prop.cc: ditto + * libs/gcu/loader.cc: ditto + * libs/gcu/printable.cc: ditto + * plugins/loaders/cdx/cdx.cc: ditto + * plugins/loaders/cdxml/cdxml.cc: ditto + * plugins/paint/arrows/retrosynthesis.cc: ditto + * plugins/paint/residues/pseudo-atom.cc: ditto + * plugins/paint/selection/group.cc: ditto + * plugins/paint/text/texttool.cc: ditto + +2008-04-23 Jean Bréfort + * glade/gchemcalc.glade: replaced buttons by menu items. + * libs/gcu/formula.cc: start working on the various modes. + * programs/calc/gchemcalc.cc: update user interface and add print + preview and image export for the isotopic pattern chart. + +2008-04-22 Jean Bréfort + * database/elements.xml.in: add a default valence (might be somewhat + arbitrary in some cases), removed not anymore used atomic weights. + * database/residues.xml.in: add the M generic symbol. + * libs/gcp/application.cc: add ps and pdf to image export. + * libs/gcp/view.cc: reimplemented eps export and add ps and pdf. + * libs/gcu/element.cc: load default valence from elements.xml. + +2008-04-21 Jean Bréfort + * libs/gcp/view.cc: fixed an update issue which blocked showing + 2D structures in the mozilla plugin. + * libs/gcp/widgetdata.cc: enhanced GetObjectBounds. + * libs/gcu/gtkspectrumviewer.cc: really implemented. + * mozilla-plugin/chem-viewer.cc: finished 2D structures support, and + added jcamp-dx support. + * mozilla-plugin/moz-plugin.c: add jcamp-dx support: + +2008-04-20 Jean Bréfort + * libs/gcu/glview.cc: added GLView::RenderToCairo. + * libs/gcu/glview.h: ditto. + * programs/3d/application.cc: add pdf, ps and eps to image export. + * programs/crystal/application.cc: ditto. + +2008-04-19 Jean Bréfort + * acinclude.m4: add dolt m4 code. + * configure.ac: use dolt when possible, and request cairo 1.6 or later. + * libs/gcp/settings.h: add eps format to clipboard. + * libs/gcp/view.cc: cleaned copy code. + * libs/gcp/widgetdata.cc: ditto. + * programs/spectra/application.cc: export eps images. + +2008-04-17 Jean Bréfort + * libs/gcp/atom.cc: don't try to use a non finite angle. + * libs/gcp/fragment-atom.cc: call Fragment:Update when needed. + * libs/gcp/fragment.cc: new Ananlyze and Update methods needed for + cdx(ml) import. + * libs/gcp/fragment.h: ditto. + * libs/gcu/molecule.cc: fix a crasher in MoleculeFromFormula. + * plugins/loaders/cdx/cdx.cc: enhanced atoms groups import. + +2008-04-15 Jean Bréfort + * libs/gcp/bond.cc: moved ReplaceAtom to gcu. + * libs/gcp/bond.h: ditto. + * libs/gcu/bond.cc: ditto. + * libs/gcu/bond.h: ditto. + * libs/gcu/molecule.cc: make MoleculeFromFormula work in some simple + cases, and removed useless Match method. + * libs/gcu/molecule.h: ditto. + * plugins/loaders/cdx/cdx.cc: really compares the string attached to + an atom group and the corresponding molecule. + +2008-04-14 Jean Bréfort + * all files: made some methods const. + * libs/gcu/molecule.cc: add a static MoleculeFromFormula method. + * libs/gcu/molecule.h: ditto. + * plugins/loaders/cdx/cdx.cc: call Molecule::MoleculeFromFormula + when appropriate. + +2008-04-10 Jean Bréfort + * configure.ac: needs libgsf >= 1.14.9 for gio support. + * libs/gcu/application.cc: use libgsf gio support instead of + gnomevfs. + +2008-04-09 Jean Bréfort + * libs/gcp/application.cc: activates image export after loading. + * libs/gcp/fragment.cc: add atom in the objects tree after setting + its ID if necessary. + * libs/gcu/application.cc: in Application::Load should return false + on error. + * libs/gcu/formula.cc: make some classes public. + * libs/gcu/formula.h: ditto. + * libs/gcu/molecule.cc: add a Match method to check if a semi- + developped formula is compatible with the know structure (not + yet fully implemented. + * libs/gcu/molecule.h: ditto. + * plugins/loaders/cdx/cdx.cc: more work on residue import and ensure + cycles are updated after loading. + * plugins/loaders/cdxml/cdxml.cc: ensure cycles are updated after + loading. + +2008-04-05 Jean Bréfort + * libs/gcu/spectrumdoc.cc: add integration support for nmr spectra. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: ditto. + * libs/gcu/spectrumview.h: ditto. + +2008-03-31 Jean Bréfort + * libs/gcp/atom.cc: implement a rough molecule comparison method. + * libs/gcp/atom.h: ditto. + * libs/gcp/fragment-atom.cc: ditto. + * libs/gcp/fragment-atom.h: ditto. + * libs/gcp/fragment.cc: implement Fragment::SetProperty. + * libs/gcp/fragment.h: ditto. + * libs/gcp/molecule.cc: implement a rough molecule comparison method. + * libs/gcp/molecule.h: ditto. + * libs/gcu/atom.cc: ditto. + * libs/gcu/atom.h: ditto. + * libs/gcu/molecule.cc: ditto. + * libs/gcu/molecule.h: ditto. + * libs/gcu/objprops.h: add fragments related properties. + * plugins/loaders/cdx/cdx.cc: import nicks (only standard ones atm). + +2008-03-30 Jean Bréfort + * libs/gcu/spectrumdoc.cc: fixed a crash and always get a correct range + when changing units. + +2008-03-30 Jean Bréfort + * libs/gcu/spectrumdoc.cc: allow choosing x units in nmr between + Hz and ppm. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: ditto. + * libs/gcu/spectrumview.h: ditto. + +2008-03-30 Jean Bréfort + * libs/gcu/spectrumdoc.cc: add widgets to limit visible range. + * libs/gcu/spectrumview.cc: ditto. + * libs/gcu/spectrumview.h: ditto. + * programs/spectra/window.cc: ditto. + +2008-03-29 Jean Bréfort + * libs/gcu/spectrumdoc.cc: load nmr spectra using jcamp-dx 5.x NTUPPLES. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: add ShowAxis method. + * libs/gcu/spectrumview.h: ditto. + +2008-03-27 Jean Bréfort + * libs/gcp/molecule.cc: moved operator== to base class. + * libs/gcp/molecule.h: ditto. + * libs/gcp/residue.cc: add a virtual operator== (Molecule). + * libs/gcp/residue.h: ditto. + * libs/gcu/molecule.cc: moved operator== from gcp::Molecule, and enhance + it a bit. + * libs/gcu/molecule.h: ditto. + * libs/gcu/residue.h: add a virtual operator== (Molecule). + * plugins/loaders/cdx/cdx.cc: test the molecule associated with a nickname. + +2008-03-25 Jean Bréfort + * libs/gcu/spectrumdoc.cc: load VAR_NAME field and associated. + * libs/gcu/spectrumdoc.h: ditto. + +2008-03-24 Jean Bréfort + * libs/gcp/application.cc: ensure loaded objects from cdx(ml) are + visible, and unconned from theme in destructor. + * libs/gcp/document.cc: enable setting a NULL theme (to exit + properly). + * libs/gcp/theme.cc: disconnect all clients before destroying a theme. + * libs/gcu/spectrumdoc.cc: supports peak tables in general and + mass spectra in particular. + * libs/gcu/spectrumdoc.h: ditto. + +2008-03-23 Jean Bréfort + * database/elements.xml.in: accept up to 8 bonds for osmium. + * libs/gcp/application.cc: correctly detects the mime type, even if the + file doesn't exist. [#22686]; accept file names with spaces for files + opened using OpenBabel. [#22695] + * programs/paint/main.cc: no more need to force detection of mime + type from there. + +2008-03-22 Jean Bréfort + * libs/gcu/spectrumdoc.cc: use go-complex instead of complex. + * libs/gcu/spectrumdoc.h: ditto. + +2008-03-19 Jean Bréfort + * configure.ac: post release version bump (0.9.4). + +2008-03-18 Jean Bréfort + * configure.ac: test for gio presence. + * libs/gcp/Makefile.am: add two new source files. + * libs/gcp/application.cc: add headers missing after document.h cleaning. + * libs/gcp/atom.cc: dont try to set an atomic number less that 1. + * libs/gcp/document.cc: save used residues with document. + * libs/gcp/document.h: ditto and replaced unneeded headers by class + forward declarations. + * libs/gcp/fragment-atom.h: made some cleaning and add a way to retrieve + the parent fragment. + * libs/gcp/fragment-residue.cc: initial support for nick names and + generic symbols. + * libs/gcp/fragment-residue.h: ditto. + * libs/gcp/fragment.cc: ditto. + * libs/gcp/mesomery.cc: add headers missing after document.h cleaning. + * libs/gcp/molecule.cc: remocve known cycles before a new search and always + allow to copy to calc. + * libs/gcp/reaction.cc: add headers missing after document.h cleaning. + * libs/gcp/residue.cc: add a document instance to each residue to + store the equivalent molecule. + * libs/gcp/residue.h: ditto. + * libs/gcp/stringdlg.cc: add headers missing after document.h cleaning. + * libs/gcp/view.cc: ditto. + * libs/gcu/atom.h: make Atom::GetSymbol virtual. + * libs/gcu/chem3ddoc.cc: use gio for loading. + * libs/gcu/formula.h: add an enum for ambiguous symbols management mode. + * libs/gcu/macros.h: add new properties macros more suitable for pointers. + * libs/gcu/molecule.cc: avoid duplicate bonds. + * libs/gcu/residue.cc: load all names not only the local one. + * libs/gcu/residue.h: ditto. + * libs/gcu/spectrumdoc.cc: add a complex array for nmr ntuples loading. + * libs/gcu/spectrumdoc.h: ditto. + * plugins/paint/atoms/elementtool.cc: add headers missing after + document.h cleaning. + * plugins/paint/bonds/bondtool.cc: ditto. + * plugins/paint/bonds/chaintool.cc: ditto. + * plugins/paint/cycles/cycletool.cc: ditto. + * plugins/paint/residues/residues-dlg.cc: ditto. + * plugins/paint/selection/erasertool.cc: ditto. + * plugins/paint/templates/templatetool.cc: ditto. + * plugins/paint/text/fragmenttool.cc: ditto. + * plugins/paint/text/texttool.cc: ditto. + * programs/crystal/main.cc: remove commented out instruction. + * programs/paint/main.cc: do not call libgnomeui. + +2008-03-11 Jean Bréfort + * programs/calc/gchemcalc.cc: prints the isotopic pattern. + +2008-03-11 Jean Bréfort + * configure.ac: remove GnomePrint dependency. + * glade/gchemcalc.glade: add buttons for printing. + * libs/canvas/Makefile.am: remove GnomePrint dependency. + * libs/canvas/gcp-canvas-group.c: ditto. + * libs/canvas/gcp-canvas-line.c: ditto. + * libs/canvas/gcp-canvas-pango.c: ditto. + * libs/canvas/gcp-canvas-shape.c: ditto. + * libs/canvas/gnome-print-pango.c: removed obsolete. + * libs/canvas/gnome-print-pango.h: ditto. + * libs/canvas/gprintable.c: remove GnomePrint dependency. + * libs/canvas/gprintable.h: ditto. + * libs/gcp/document.cc: ditto. + * libs/gcp/document.h: ditto. + * libs/gcp/reaction-step.h: add missing header. + * libs/gcp/view.cc: remove GnomePrint dependency. + * libs/gcp/view.h: ditto. + * libs/gcp/window.cc: ditto. + * libs/gcp/window.h: ditto. + * libs/gcu/document.h: ditto. + * libs/gcu/element.cc: ditto. + * libs/gcu/glview.cc: ditto. + * libs/gcu/glview.h: ditto. + * libs/gcu/object.cc: ditto. + * libs/gcu/object.h: ditto. + * libs/gcu/print-setup-dlg.cc: ditto. + * libs/gcu/printable.cc: ditto. + * libs/gcu/printable.h: ditto. + * libs/gcu/spectrumdoc.cc: ditto. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: ditto. + * libs/gcu/spectrumview.h: ditto. + * programs/3d/window.cc: ditto. + * programs/crystal/application.cc: ditto. + * programs/crystal/document.cc: ditto. + * programs/crystal/view.h: ditto. + * programs/crystal/window.cc: ditto. + * programs/spectra/gspectrum.cc: ditto. + * programs/spectra/window.cc: ditto. + * programs/spectra/window.h: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-curve.h: ditto. + +2008-03-05 Jean Bréfort + * plugins/paint/selection/selectiontool.cc: always update the state + of the merge button after using it. [#22485] + +2008-03-04 Jean Bréfort + * libs/gcu/macros.h: add GCU_UPDATE_STRING_KEY. + * libs/gcu/printable.cc: use the new macro for strings. + +2008-03-04 Jean Bréfort + * glade/print-setup.glade: group radio buttons. + * libs/gcu/glview.cc: make GLView derive from Printable and remove + GnomePrint dependencies.. + * libs/gcu/glview.h: ditto. + * libs/gcu/gtkchem3dviewer.cc: replace gtk_chem3d_viewer_print by + gtk_chem3d_viewer_new_pixbuf. + * libs/gcu/gtkchem3dviewer.h: ditto. + * libs/gcu/gtkcrystalviewer.cc: add gtk_crystal_viewer_new_pixbuf. + * libs/gcu/gtkcrystalviewer.h: ditto. + * libs/gcu/print-setup-dlg.cc: manages scled printing. + * libs/gcu/print-setup-dlg.h: ditto. + * libs/gcu/printable.cc: ditto. + * libs/gcu/printable.h:ditto. + * programs/3d/window.cc: moved GtkPrint support to GLView. + * programs/3d/window.h: ditto. + * programs/crystal/application.cc: prints using GtkPrint. + * programs/crystal/application.h: ditto. + * programs/crystal/document.cc: ditto. + * programs/crystal/view.cc: ditto. + * programs/crystal/view.h: ditto. + * programs/crystal/window.cc: ditto. + +2008-03-01 Jean Bréfort + * glade/print-setup.glade: fixed a duplicated widget name. + * libs/gcp/application.cc: fixed gconf key path. + * libs/gcp/document.cc: removed printf debug stuff. + * libs/gcp/theme.cc: initialize goffice. + * libs/gcu/print-setup-dlg.cc: start work on scaled printing. + * libs/gcu/print-setup-dlg.h: ditto. + * libs/gcu/printable.cc: ditto. + * libs/gcu/printable.h: ditto. + * plugins/loaders/cdx/cdx.cc: some work on fragments and nicknames. + * plugins/paint/arrows/arrowtool.cc: use go_conf when available. + * plugins/paint/arrows/plugin.cc: ditto. + * programs/3d/window.cc: fixed printing origin. + +2008-02-26 Jean Bréfort + * libs/gcu/glview.cc: fixed another gconf issue. + * libs/gcu/print-setup-dlg.cc: fixed a signal argument order. + * libs/gcu/printable.cc: initialize centered relatd variables. + * programs/calc/gchemcalc.cc: initialize goffice plugins after goffice. + * programs/table/gchemtable-main.cc: ditto. + +2008-02-25 Jean Bréfort + * glade/print-setup.glade: minor update. + * libs/gcp/application.cc: add a CreateNewDocument. virtual method. + * libs/gcp/application.h: ditto. + * libs/gcp/document.cc: knows new properties. + * libs/gcu/application.cc: add a CreateNewDocument. virtual method. + * libs/gcu/application.h: ditto. + * libs/gcu/document.h: add a virtual Save method. + * libs/gcu/glview.cc: fixed some GConf issues. + * libs/gcu/macros.h: ditto. + * libs/gcu/objprops.h: add new douments properties. + * libs/gcu/print-setup-dlg.cc: add horizontal and vertical centering. + * libs/gcu/print-setup-dlg.h: ditto. + * libs/gcu/printable.h: ditto. + * programs/3d/window.cc: use natural size when printing and support + centered printing. + +2008-02-21 Jean Bréfort + * glade/print-setup.glade: added buttons to save/reload defaults. + * libs/gcu/print-setup-dlg.cc: manage margins. + * libs/gcu/print-setup-dlg.h: ditto. + * libs/gcu/printable.cc: ditto. + * libs/gcu/printable.h: ditto. + +2008-02-19 Jean Bréfort + * configure.ac: check if goffice has go_conf_*. + * gchemutils.schemas.in: minor enhancements. + * glade/print-setup.glade: ditto. + * libs/gcp/application.cc: use go_conf* if available. + * libs/gcp/application.h: ditto. + * libs/gcp/molecule.cc: started work on Molecule::operator==. + * libs/gcp/molecule.h: ditto. + * libs/gcp/preferences.cc: use go_conf* if available. + * libs/gcp/settings.h: ditto. + * libs/gcp/theme.cc: ditto. + * libs/gcp/theme.h: ditto. + * libs/gcu/application.cc: ditto. + * libs/gcu/application.h: ditto. + * libs/gcu/dialog.cc: ditto. + * libs/gcu/glview.cc: ditto. + * libs/gcu/glview.h: ditto. + * libs/gcu/macros.h: ditto. + * libs/gcu/print-setup-dlg.cc: support paper and orientation changes. + * libs/gcu/print-setup-dlg.h: ditto. + * libs/gcu/printable.cc: use go_conf* if available. + * libs/gcu/printable.h: ditto. + * plugins/paint/arrows/arrowtool.cc: ditto. + * plugins/paint/arrows/gchempaint-arrows.schemas.in: fixed paths. + * programs/3d/main.cc: use go_conf* if available. + * programs/3d/window.cc: ditto. + * programs/3d/window.h: ditto. + * programs/calc/gchemcalc.cc: ditto. + * programs/crystal/globals.h: ditto. + * programs/crystal/main.cc: ditto. + * programs/crystal/prefs.cc: ditto. + * programs/paint/gchempaint.schemas.in: fixed paths. + * programs/spectra/gspectrum.cc: use go_conf* if available. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-curve.h: ditto. + * programs/table/gchemtable-main.cc: ditto. + +2008-02-16 Jean Bréfort + * configure.ac: can now use future version (up to 0.8) of goffice. + * glade/Makefile.am: add new dialog. + * glade/print-setup.glade: new dialog imported from gnumeric, and adapted. + * libs/gcp/text-object.h: add alignment related members, not used atm. + * libs/gcp/text.h: ditto. + * libs/gcu/Makefile.am: new files. + * libs/gcu/glview.cc: fix an issue in glView::BuildPixbuf. + * libs/gcu/glview.h: glView::BuildPixbuf is now public. + * libs/gcu/objprops.h: add text alignment. + * libs/gcu/print-setup-dlg.cc: new dialog. + * libs/gcu/print-setup-dlg.h: ditto. + * libs/gcu/printable.cc: new base class aimed at GtkPrint support. + * libs/gcu/printable.h: ditto. + * programs/3d/window.cc: derives from gcu::Printable. + * programs/3d/window.h: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-curve.h: ditto. + +2008-02-12 Jean Bréfort + * Makefile.am: add new schemas. + * gchemutils.schemas.in: ditto. + * libs/gcu/glview.cc: add a key to avoid even trying to use the + off-screen rendering code, and clean everything on exit. + * libs/gcu/glview.h: ditto. + +2008-02-03 Jean Bréfort + * libs/gcp/reaction-arrow.cc: fix loading of double reaction + arrows. [#22223] + +2008-02-02 Jean Bréfort + * glade/gchemcalc.glade: increase width to accomodate more + precise masses. + * libs/gcp/atom.cc: don't crash in Update if the atiem does not exist. + * libs/gcp/bond.cc: ditto. + * libs/gcp/electron.cc: ditto. + * libs/gcp/theme.cc: don't init g_type in destructor. + * libs/gcu/chemistry.cc: get better strings from values. + * libs/gcu/element.cc: use gcu::Value instead of double for masses, and + import atomic molar masses from BODR. + * libs/gcu/element.h: ditto. + * libs/gcu/formula.cc: ditto. + * libs/gcu/formula.h: ditto. + * libs/gcu/isotope.cc: ditto. + * libs/gcu/isotope.h: ditto. + * libs/gcu/value.cc: add some arithmetic. + * libs/gcu/value.h: ditto. + * plugins/paint/arrows/retrosynthesisarrow.cc: don't crash in Update + if the atiem does not exist. + * programs/calc/gchemcalc.cc: load BODR. + * programs/table/gchemtable-elt.cc: display more precise masses. + +2008-01-27 Jean Bréfort + * gcu/filechooser.cc: fix print and image export when off-screen + rendering does not work, previous fix was not enough. [#21946] + * gcu/glview.cc: ditto. + +2008-01-18 Jean Bréfort + * libs/gcu/chem3ddoc.cc: show multiple bonds as multiple cylinders + in ball and stick mode. + * libs/gcu/crystaldoc.cc: really hide hidden objects. + +2008-01-09 Jean Bréfort + * libs/gcp/arrow.cc: implement SetProperty. + * libs/gcp/arrow.h: ditto. + * libs/gcp/mesomery-arrow.cc: set an explicit id prefix. + * libs/gcp/reaction-arrow.cc: implement SetProperty. + * libs/gcp/reaction-arrow.h: ditto. + * libs/gcu/atom.cc: add charge property. + * libs/gcu/atom.h: ditto. + * libs/gcu/objprops.h: ditto. + * plugins/loaders/cdx/cdx.cc:import atom charge and arrows. + * plugins/loaders/cdxml/cdxml.cc: ditto. + +2008-01-06 Jean Bréfort + * plugins/loaders/cdx/cdx.cc: fixed triple bonds import. + * plugins/loaders/cdxml/cdxml.cc: ditto. + +2008-01-03 Jean Bréfort + * plugins/loaders/cdx/cdx.cc: load groups. + * plugins/loaders/cdxml/cdxml.cc: ditto. + * plugins/paint/selection/group.cc: implement gcpGroup::OnLoaded + * plugins/paint/selection/group.h: ditto. + +2008-01-02 Jean Bréfort + * plugins/loaders/cdx/cdx.cc: load colors table. + * plugins/loaders/cdxml/cdxml.cc: ditto. + +2008-01-01 Jean Bréfort + * libs/gcp/Makefile.am: moved the chemical part of molecules from gcp + to gcu. + * libs/gcp/atom.cc: ditto. + * libs/gcp/atom.h: ditto. + * libs/gcp/bond.cc: ditto. + * libs/gcp/bond.h: ditto. + * libs/gcp/chain.cc: ditto. + * libs/gcp/chain.h: ditto. + * libs/gcp/cycle.cc: ditto. + * libs/gcp/cycle.h: ditto. + * libs/gcp/document.h: ditto. + * libs/gcp/molecule.cc: ditto. + * libs/gcp/molecule.h: ditto. + * libs/gcu/Makefile.am: ditto. + * libs/gcu/atom.cc: ditto. + * libs/gcu/atom.h: ditto. + * libs/gcu/bond.cc: ditto. + * libs/gcu/bond.h: ditto. + * libs/gcu/chain.cc: ditto. + * libs/gcu/chain.h: ditto. + * libs/gcu/cycle.cc: ditto. + * libs/gcu/cycle.h: ditto. + * libs/gcu/document.cc: ditto. + * libs/gcu/document.h: ditto. + * libs/gcu/molecule.cc: ditto. + * libs/gcu/molecule.h: ditto. + * libs/gcu/object.cc: ditto. + * libs/gcu/object.h: ditto. + * plugins/loaders/cdxml/cdxml.cc: started export. + * plugins/paint/cycles/cycletool.cc: use gcu::Chain and gcu::Cycle. + * plugins/paint/cycles/cycletool.h: ditto. + +2007-12-31 Jean Bréfort + * libs/gcp/bond.cc: imlementent SetProperty for bond type. + * libs/gcp/bond.h: ditto. + * plugins/loaders/cdx/cdx.cc: load font table and bond type, save header. + * plugins/loaders/cdx/plugin.xml.in: add write flag. + * plugins/loaders/cdxml/cdxml.cc: load font table and bond type. + * plugins/loaders/cdxml/plugin.xml.in: add write flag. + +2007-12-30 Jean Bréfort + * libs/gcp/bond.cc: fix a few possible crashers. + * libs/gcp/text.cc: implemented the SetProperty method. + * libs/gcp/text.h: ditto. + * libs/gcu/objprops.h: add text property. + * plugins/loaders/cdx/cdx.cc: load simple text and fix bond import. + * plugins/paint/selection/selectiontool.cc: fix a crasher. + +2007-12-29 Jean Bréfort + * libs/gcp/document.cc: fix saving with a new name of read only files. + * libs/gcu/application.cc: unref the GSF stream. + * libs/gcu/bond.cc: don't crash when saving invalid bonds. + * libs/gcu/objtypes.h: new file with enumeration of accepted properties. + * plugins/loaders/cdx/cdx.cc: started implementing reading. + * plugins/loaders/cdxml/cdxml.cc: started work on bond types. + +2007-12-29 Jean Bréfort + * all files: implemented new loadin api and make it work minimally + with cdxml files. + +2007-12-21 Daniel Leidert + * plugins/loaders/cdx/Makefile.am: xml_DATA is created my make, so + remove it in the clean target, not in distclean. + (gcu_loader_cdxmldir): Use the $(VERSION) variable. + * plugins/loaders/cdxml/Makefile.am: Likewise. + +2007-12-21 Jean Bréfort + * configure.ac: post release version bump (0.9.3). + * plugins/loaders/Makefile.am: add new cds directory. + * plugins/loaders/cdx/Makefile.am: new plugin. + * plugins/loaders/cdx/cdx.cc: ditto. + * plugins/loaders/cdx/plugin.xml.in: ditto. + +2007-12-19 Jean Bréfort + * configure.ac: use goffice-0.6 >= 0.6.1. + * libs/canvas/gcp-canvas-line.c: do not crash when arrow heads have + not been updated. + * libs/gcp/atom.cc: do not add an object twice. + * libs/gcp/bond.cc: ditto. + * libs/gcp/electron.cc: ditto. + * libs/gcp/fragment.cc: ditto. + * libs/gcp/mesomery-arrow.cc: ditto. + * libs/gcp/reaction-arrow.cc: ditto, and initialize m_TypeChanged and fix + update for full headed reversible reaction arrows. + * libs/gcp/reaction-operator.cc: do not add an object twice. + * libs/gcp/text.cc: ditto. + * libs/gcu/object.cc: fix loading grouped arrows in gchempaint. + * plugins/paint/arrows/retrosynthesisarrow.cc: ditto. + * plugins/paint/residues/pseudo-atom.cc: ditto. + * plugins/paint/selection/group.cc: fix loading of groups with new Add + method. + * plugins/paint/selection/group.h: ditto. + +2007-12-16 Jean Bréfort + * configure.ac: add new directories + * libs/gcp/application.cc: initial work on new loaders. + * libs/gcu/Makefile.am: add new files. + * libs/gcu/cmd-context.cc: new goffice command context. + * libs/gcu/cmd-context.h: ditto. + * libs/gcu/loader.cc: new loader class. + * libs/gcu/loader.h: ditto. + * plugins/Makefile.am: add loaders directory. + * programs/paint/main.cc: initialize loaders. + * plugins/loaders/Makefile.am: new directory. + * plugins/loaders/cdxml/Makefile.am: ditto. + * plugins/loaders/cdxml/cdxml.cc: new cdxml loader (don't work yet). + +2007-12-15 Jean Bréfort + * libs/gcu/spectrumdoc.cc: enhance loading of X++(Y..Y) data. + * libs/gcu/spectrumdoc.h: add new units. + +2007-12-14 Jean Bréfort + * libs/gcu/spectrumdoc.cc: add axes labels and limit transmittance + from 0. to 1.. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: ditto. + * libs/gcu/spectrumview.h: ditto. + +2007-12-13 Jean Bréfort + * all files: fix various compilation issues, fixes build with + gcc snapshot. [#21764] 2007-12-10 Jean Bréfort - * gcu/glview.cc: fix print and image export when off-screen + * libs/gcu/chem3ddoc.cc: fix atoms position. + * libs/gcu/glview.cc: fix print and image export when off-screen rendering does not work. [#21946] - * gcu/glview.h: ditto. - * programs/3d/main.cc: make command line options really work. + * libs/gcu/glview.h: ditto. + * programs/3d/main.cc: don't crash if no display type is given. + +2007-12-05 Jean Bréfort + * libs/canvas/gcp-canvas-shape.c: + (gnome_canvas_shape_ext_export_svg), + (gnome_canvas_shape_ext_draw_cairo): implement the curveto case. [#21715] + * libs/canvas/pango-layout-to-svg.c: (pango_layout_to_svg): fix + vertical text alignment after subscript/superscript. [#21715] + +2007-11-29 Jean Bréfort + * configure.ac: requests goffice-0.5.4. + * goffice/gchemutils.cc: updated after recent changes in goffice api. + * programs/table/gchemtable-curve.cc: ditto. 2007-11-29 Jean Bréfort * configure.ac: ensure goffice has gnome support. +2007-11-21 Jean Bréfort + * */*/*.cc: better use of namespaces. + * */*/*.h:ditto. + * libs/gcp/theme.cc: fixed a crash when adding a file theme for a file + without title. + * mozilla-plugin/Makefile.am: initial support of gchempaint files. + * mozilla-plugin/chem-viewer.cc: ditto. + * mozilla-plugin/moz-plugin.c: (NP_GetMIMEDescription): ditto. + 2007-11-18 Jean Bréfort * programs/crystal/atomsdlg.cc: inactivate the change signal in the radii menu when populating the menu. [#21576] @@ -99,262 +1991,1035 @@ * samples/*.gcrystal: ditto. 2007-11-01 Jean Bréfort - * gcu/crystalview.h: removed commented out obsolete code. - * programs/3d/application.cc: make command line options really work. + * libs/gcp/application.cc: fixed compilation. + * libs/gcu/chem3ddoc.cc: implement wireframe mode. + * programs/3d/application.cc: implement support for command line options. * programs/3d/application.h: ditto. - * programs/3d/main.cc: ditto. + * programs/3d/main.cc: ditto and add wireframe. * programs/3d/window.cc: ditto. -2007-10-30 Jean Bréfort - * configure.ac: post release version bump (0.8.5). +2007-10-29 Jean Bréfort + * lib/application.cc: fix test for file creation. + * lib/document.cc: update m_Empty after each change. 2007-10-25 Jean Bréfort - * configure.ac: add seamonkey to mozilla avatars. - * programs/table/gchemtable-app.cc: removed all references to the - acidity color scheme. - * programs/table/gchemtable-app.h: ditto. + * configure.ac: add seamonkey to mozilla avatars and fix goffice component + installation path. + * gcu-unstable.pc.in: removed. + * gcu.pc.in: removed. 2007-10-23 Daniel Leidert * configure.ac: Fixed AC_CONFIG_FILES and AC_OUTPUT usage. -2007-10-15 Daniel Leidert - * Makefile.am (MAINTAINERCLEANFILES): Remove gnome-doc-utils.make - too. +2007-10-22 Daniel Leidert + * configure.ac (GOFFICE_PLUGINS_DIR): Handle option without a given + value. + +2007-10-21 Jean Bréfort + * glade/paint/preferences.glade: add a default theme key and use it to + set the default theme [sr #106032,item #3]. + * libs/gcp/preferences.cc: ditto. + * libs/gcp/preferences.h: ditto. + * libs/gcp/theme.cc: ditto. + * libs/gcp/theme.h: ditto. + * programs/paint/gchempaint.schemas.in: ditto. + +2007-10-20 Jean Bréfort + * libs/gcp/mesomery.cc: fix an infinite loop condition. + * libs/gcp/view.cc: do not change the default element when changing + the nature of an atom using the keyboard [sr #106032,item #2]. + * libs/gcu/formula.cc: support non ambiguous residues. + * libs/gcu/formula.h: ditto. + * libs/gcu/residue.cc: ditto. + * libs/gcu/residue.h: ditto. + * plugins/paint/residues/residues-dlg.cc: ditto. + +2007-10-17 Daniel Leidert + * libs/Makefile.am: Added MAINTAINERCLEANFILES to remove Makefile.in. + * libs/canvas/Makefile.am: Ditto. + * libs/gcp/Makefile.am: Ditto. -2007-10-14 Daniel Leidert - * programs/3d/gchem3d-viewer.desktop.in: Added Version field to - declare spec version compliance. +2007-10-15 Daniel Leidert + * Makefile.am (MAINTAINERCLEANFILES): Remove gnome-doc-utils.make on + maintainer-clean. + (DISTCHECK_CONFIGURE_FLAGS): Disable schemas installation for + distcheck target. + * configure.ac: Fix broken output indentation. + * gcu.pc.in: Added URL field. Fixed goffice package name. + * gcu-unstable.pc.in: Ditto. + * docs/man/Makefile.am: Formatting changes. Backported the better + version of the 0.8 series. Added new manpages and their sources (all + sources have been renamed!). Removed GNU make extensions usage. + * docs/man/gcu_entities.dtd.in: Added an prefix to easily switch + between stable and development version manpages. Added a central + copyright/legalnotice note. + * gcu_man_legal.xml: Added. + * gchem3d-viewer.1.xml: Updated. Renamed to + gchem3d-viewer-unstable.1.xml. + * gchemcalc.1.xml: Ditto. Renamed to gchemcalc-unstable.1.xml. + * gchemtable.1.xml: Ditto. Renamed to gchemtable-unstable.1.xml. + * libgcu.3.xml: Ditto. Renamed to libgcu-unstable.3.xml. + * gchem3d-viewer.1: Ditto. Renamed to gchem3d-viewer-unstable.1. + * gchemcalc.1: Ditto. Renamed to gchemcalc-unstable.1 + * gchemtable.1: Ditto. Renamed to gchemtable-unstable.1. + * libgcu.3: Ditto. Renamed to libgcu-unstable.3. + * gchempaint-unstable.1.xml: Added. + * gcrystal-unstable.1.xml: Ditto. + * gspectrum-unstable.1.xml: Ditto. + * gchempaint-unstable.1: Ditto. + * gcrystal-unstable.1: Ditto. + * gspectrum-unstable.1: Ditto. + * docs/reference/Makefile.am: Backported from 0.8 series. Removed GNU + make extensions usage. + * plugins/paint/arrows/Makefile.am: Backported cleaner version from + 0.8 series. Formatting fixes. Fixed install-data-local and added + missing uninstall-local targets for schemas installation. + * plugins/paint/atoms/Makefile.am: Ditto. + * plugins/paint/bonds/Makefile.am: Ditto. + * plugins/paint/cycles/Makefile.am: Ditto. + * plugins/paint/residues/Makefile.am: Ditto. + * plugins/paint/selection/Makefile.am: Ditto. + * plugins/paint/templates/Makefile.am: Ditto. + * plugins/paint/wikipedia/Makefile.am: Ditto. + * plugins/paint/text/Makefile.am: Ditto. + (gladedir): Fixed location. + * database/Makefile.am: Inner formatting changes. Drop EXTRA_DIST in + favour of dist_ suffixes. Used alphabetical ordering. + * glade/Makefile.am: Ditto. + * glade/crystal/Makefile.am: Ditto. + * glade/paint/Makefile.am: Ditto. + * glade/table/Makefile.am: Ditto. + * pixmaps/Makefile.am: Ditto. + * plugins/paint/Makefile.am: Ditto. + * programs/3d/Makefile.am: Ditto. + * programs/calc/Makefile.am: Ditto. + * programs/spectra/Makefile.am: Ditto. + * programs/table/Makefile.am: Ditto. + * themes/paint/Makefile.am: Ditto. + * goffice/Makefile.am: Ditto. Further added MAINTAINERCLEANFILES to + remove the created Makefile.in. + * programs/crystal/Makefile.am: Ditto. + (schemasdir): Don't ignore GCONF_SCHEMA_FILE_DIR. + * programs/paint/Makefile.am: Likewise. Added missing + install-data-local and uninstall-local targets for the schemas + installation. + * plugins/Makefile.am: Added MAINTAINERCLEANFILES to remove the + created Makefile.in. + * templates/Makefile.am: Ditto. + * templates/paint/Makefile.am: (xmldir): Fixed installation location. + * po/POTFILES.in: Added missing files to make intltool happy. + * programs/3d/gchem3d-viewer-unstable.desktop.in: Make it compliant to + the latest specification 1.0 of the desktop entry spec. Declare this + version compliancy via the Version key. + * programs/3d/gchem3d-viewer.desktop.in: Ditto. + * programs/calc/gchemcalc-unstable.desktop.in: Ditto. * programs/calc/gchemcalc.desktop.in: Ditto. + * programs/crystal/gcrystal-unstable.desktop.in: Ditto. * programs/crystal/gcrystal.desktop.in: Ditto. + * programs/paint/gchempaint-unstable.desktop.in: Ditto. + * programs/paint/gchempaint.desktop.in: Ditto. + * programs/table/gchemtable-unstable.desktop.in: Ditto. * programs/table/gchemtable.desktop.in: Ditto. + * programs/spectra/gspectrum-unstable.desktop.in: Ditto. + (MimeType): Fixed (must end with semicolon). + * programs/spectra/gspectrum.desktop.in: Likewise. + +2007-10-08 Jean Bréfort + * libs/gcu/formula.cc: initial work to parse formulas with residues. + * libs/gcu/residue.cc: add gcu::Residue::MaxSymbolLength. + * libs/gcu/residue.h: ditto. + +2007-10-01 Jean Bréfort + * programs/spectra/window.cc: implemented printing. + * programs/spectra/window.h: ditto. + +2007-09-30 Jean Bréfort + * configure.ac: requests gtk+>=2.12.0 and goffice>=0.5.1. + * goffice/gchemutils.cc: use the new component API. + * libs/gcp/application.cc: fixed an issue when importing from OpenBabel. + * libs/gcp/document.cc: use new go-math.h path. + * libs/gcu/chem3ddoc.cc: started work on wireframe rendering. + * libs/gcu/element.cc: use new go-math.h path. + * libs/gcu/gtkperiodic.c: (gtk_periodic_init), use new Gtk+ tooltips. + (gtk_periodic_finalize): ditto. + * libs/gcu/spectrumdoc.cc: import spectrum type. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: limit x axis bounds to spectrum bounds. + * libs/gcu/spectrumview.h: ditto. + * programs/spectra/gspectrum-unstable.desktop.in: add mime type. + * programs/spectra/gspectrum.desktop.in: ditto. + * programs/spectra/window.cc: implement copying as Goffice graph or image. + * programs/spectra/window.h: ditto. + * programs/table/gchemtable-curve.cc: update goffice use. + * programs/table/gchemtable-data.cc: use new go-math.h path. + +2007-09-27 Jean Bréfort + * configure.ac: needs gtk+ >= 2.12.0. + * database/residues.xml.in: add five new definitions. + +2007-09-25 Jean Bréfort + * libs/gcu/spectrumdoc.cc: load (XY..XY) data. + +2007-09-25 Jean Bréfort + * libs/gcp/application.cc: emit a mor meaningful message when a file + type is not supported. + * plugins/paint/bonds/bondtool.cc: don't crash if mouse cursor moves + through an item without associated object. + +2007-09-23 Jean Bréfort + * libs/gcu/spectrumdoc.cc: fixed various data reading issues in + (X++(Y..Y)) mode. + +2007-09-22 Jean Bréfort + * libs/gcu/spectrumdoc.cc: load data and display the spectrum. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: ditto. + * libs/gcu/spectrumview.h: ditto. + * programs/spectra/application.cc: ditto. + * programs/spectra/gspectrum.cc: ditto. + * programs/spectra/window.cc: ditto. -2007-10-14 Daniel Leidert - * configure.ac: Fix indentation in help output. - * gcu.pc.in: Added URL field. - * programs/3d/gchem3d-viewer.desktop.in: Fixed to be compliant to - latest specification. - * programs/calc/gchemcalc.desktop.in: Ditto. - * programs/table/gchemtable.desktop.in: Ditto. - * programs/crystal/Makefile.am: Improved format. - (DEFS): Removed unused PKGDATADIR. - (schemasdir): Don't ignore GCONF_SCHEMA_FILE_DIR. +2007-09-17 Jean Bréfort + * libs/gcu/crystaldoc.cc: fixed compilation with OpenBabel-2.1.x. 2007-09-17 Jean Bréfort - * configure.ac: post release version bump (0.8.4). + * configure.ac: post release version bump (0.9.2) and add new + program (gspectrum).. + * libs/gcu/Makefile.am: add new files for spectra support. + * libs/gcu/application.cc: use string instead of char* for cur dir. + * libs/gcu/application.h: ditto. + * libs/gcu/chem3ddoc.cc: removed extra spaces. + * libs/gcu/gtkspectrumviewer.cc: started the imlementation. + * libs/gcu/spectrumdoc.cc: new document class for spectra. + * libs/gcu/spectrumdoc.h: ditto. + * libs/gcu/spectrumview.cc: new view class for spectra. + * libs/gcu/spectrumview.h: ditto. + * pixmaps/Makefile.am: add gspectrum icons. + * pixmaps/gspectrum128.png: ditto. + * pixmaps/gspectrum32.png: ditto. + * pixmaps/gspectrum48.png: ditto. + * pixmaps/gspectrum72.png: ditto. + * programs/3d/main.cc: updated command line help. + * programs/Makefile.am: added spectra directory. + * programs/spectra/Makefile.am: new gspectrum program. + * programs/spectra/application.cc: ditto. + * programs/spectra/application.h: ditto. + * programs/spectra/document.cc: ditto. + * programs/spectra/document.h: ditto. + * programs/spectra/gspectrum-unstable.desktop.in: ditto. + * programs/spectra/gspectrum.cc: ditto. + * programs/spectra/gspectrum.desktop.in: ditto. + * programs/spectra/view.cc: ditto. + * programs/spectra/view.h: ditto. + * programs/spectra/window.cc: ditto. + * programs/spectra/window.h: ditto. -2007-09-03 Jean Bréfort +2007-09-15 Jean Bréfort * configure.ac: rewrote the mozilla plugin related stuff so that it also works with iceweasel. + * docs/reference/Doxyfile.in: add new spectrum related files. + * libs/gcu/Makefile.am: ditto. + * libs/gcu/chem3ddoc.cc: rewrote the Draw method. + * libs/gcu/chem3ddoc.h: ditto. + * libs/gcu/chemistry.h:updated the documentation. + * libs/gcu/crystalatom.cc: remove the Draw method. + * libs/gcu/crystalatom.h: ditto. + * libs/gcu/crystaldoc.cc: rewrote the Draw method. + * libs/gcu/crystaldoc.h: ditto. + * libs/gcu/crystalline.cc: remove the Draw method. + * libs/gcu/crystalline.h: ditto. + * libs/gcu/cylinder.cc: use OpenBabel::vector3. + * libs/gcu/cylinder.h: ditto. + * libs/gcu/gldocument.h: changed the Draw method signature. + * libs/gcu/glview.cc: ditto. + * libs/gcu/gtkchem3dviewer.cc: added cylinders mode (and wireframe + which is not implemented yet). + * libs/gcu/gtkchem3dviewer.h: fixed documentation. + * libs/gcu/gtkspectrumviewer.cc: new widget (not yet implemented). + * libs/gcu/gtkspectrumviewer.h: ditto. + * libs/gcu/matrix.cc: define multipying an OpenBabel::vector3. + * libs/gcu/matrix.h: ditto. + * libs/gcu/sphere.cc: use OpenBabel::vector3. + * libs/gcu/sphere.h: ditto. + * libs/gcu/vector.cc: removed obsolete class Vector3d. + * libs/gcu/vector.h: ditto. + * programs/3d/window.cc: add cylinders mode in menu. + +2007-09-09 Jean Bréfort + * libs/gcp/fontsel.cc: don't crash in case of missing font. + * libs/gcp/theme.cc: don't load themes with duplicate name. + +2007-09-08 Jean Bréfort + * database/residues.xml.in: add new residues. + * libs/gcp/application.cc: use a std::string for old_locale. + * libs/gcp/document.cc: allow clipbloard disabling for residues + dialog box. + * libs/gcp/document.h: ditto. + * libs/gcp/molecule.cc: add Molecule::GetRawFormula and fix + residue loading. + * libs/gcp/molecule.h: ditto. + * libs/gcp/view.cc: don't copy if document does not support clipboard. + * libs/gcp/widgetdata.cc: don't attempt to move an empty selection. + * libs/gcu/bond.cc: use dynamic_cast to identify atoms. + * libs/gcu/residue.cc: initialize m_Generic. + * plugins/paint/residues/residues-dlg.cc: fix various issues. 2007-09-03 Jean Bréfort * programs/crystal/Makefile.am: fix use of --disable-schemas-install [#20943]. +2007-08-30 Jean Bréfort + * libs/gcu/residue.cc: add an bool to check if symbol is + ambiguous (if an element has the same symbol). + * libs/gcu/residue.h: ditto. + * program/calc/Makefile.am: remove residue.*. + * program/calc/gchemcalc.cc: load the residues database. + * program/calc/residue.cc: removed since everything is needed + by gcu::Formula and pertains to libgcu. + * program/calc/residue.h: ditto. + +2007-08-27 Jean Bréfort + * libs/gcu/crystaldoc.cc: update openbabel related code. + * programs/crystal/document.cc: ditto. + +2007-08-26 Jean Bréfort + * database/Makefile.am: add residues database. + * database/residues.xml.in: new residues database. + * libs/gcp/application.cc: fix help file name. + * libs/gcp/document.cc: implement Document::Clear, fix a + memory leak and some potential crashers. + * libs/gcp/document.h: add Document::Clear. + * libs/gcp/residue.cc: more work on residues. + * libs/gcp/residue.h: ditto. + * libs/gcu/residue.cc: ditto. + * libs/gcu/residue.h: ditto. + * plugins/paint/residues/Makefile.am: ditto. + * plugins/paint/residues/plugin.cc: ditto. + * plugins/paint/residues/plugin.h: ditto. + * plugins/paint/residues/pseudo-atom.cc: ditto. + * plugins/paint/residues/pseudo-atom.h: ditto. + * plugins/paint/residues/residues-dlg.cc: ditto. + * plugins/paint/residues/residues-dlg.h: ditto. + * plugins/paint/residues/residues.glade: ditto. + +2007-08-23 Jean Bréfort + * libs/gcp/document.cc: don't duplicate NULL strings. + * libs/gcu/crystaldoc.cc: fix various space groups support + issues. + * libs/gcu/crystaldoc.h: ditto. + * programs/crystal/application.cc: ditto.. + * programs/crystal/document.cc: ditto.. + * programs/crystal/document.h: ditto.. + +2007-08-14 Jean Bréfort + * programs/crystal/application.cc: add missing ). + +2007-08-14 Jean Bréfort + * programs/crystal/application.cc: add appropriate + #ifdef directives. + +2007-08-14 Jean Bréfort + * programs/crystal/document.cc: only compile Import if + an appropriate OpenBabel version is available. + * programs/crystal/document.h: ditto. + +2007-08-14 Jean Bréfort + * libs/gcu/crystaldoc.cc: add ImportOB method. + * libs/gcu/crystaldoc.h: ditto. + * programs/crystal/document.cc: removed ImportOB method. + * programs/crystal/document.h: ditto. + +2007-08-14 Jean Bréfort + * configure.ac: remove -DGTK_DISABLE_DEPRECATED to make things + compile with newer versions. + * libs/gcu/crystaldoc.cc: don't initialize m_SpaceGroup when + it does not exist. + +2007-08-13 Jean Bréfort + * configure.ac: check OpenBabel version. + * libs/gcp/Makefile.am: add new residue files. + * libs/gcp/molecule.cc: changed smiles to SMILES. + * libs/gcp/molecule.h: ditto. + * libs/gcp/residue.cc: new file. + * libs/gcp/residue.h: ditto. + * libs/gcp/target.cc: signal handlers should return false. + * libs/gcu/crystaldoc.cc: add space group support. + * libs/gcu/crystaldoc.h: ditto. + * libs/gcu/residue.cc: more work on residues. + * libs/gcu/residue.h: ditto. + * plugins/paint/residues/residues-dlg.cc: ditto. + * plugins/paint/residues/residues-dlg.h: ditto. + * plugins/paint/residues/residues.glade: ditto. + * plugins/paint/selection/brackets24.png: new brackets tool + (not yet implemented). + * plugins/paint/selection/bracketstool.cc: ditto. + * plugins/paint/selection/bracketstool.h: ditto. + * plugins/paint/selection/Makefile.am: ditto. + * plugins/paint/selection/plugin.cc: ditto. + * programs/calc/gchemcalc.cc: fixed copyright. + * programs/calc/residue.cc: new gccResidue class. + * programs/calc/residue.h: ditto. + * programs/crystal/document.cc: add support for space groups. + * programs/table/Makefile.am: add new files and code to allow + curves customiszation. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-curve.h: ditto + * programs/table/gchemtable-data-allocator.cc: ditto + * programs/table/gchemtable-data-allocator.h: ditto + * programs/table/gchemtable-data.cc: ditto + * programs/table/gchemtable-data.h: ditto + * programs/table/gchemtable-graph-editor.cc: ditto + * programs/table/gchemtable-graph-editor.h: ditto + 2007-08-07 Jean Bréfort - * configure.ac: post release version bump (0.8.3). - * gcu/application.cc: never try using nautilus as an + * libs/gcp/theme.cc: don't load backups [#20705]. + * libs/gcp/view.cc: fix changing the element using the + keyboard [#20706]. + * libs/gcu/application.cc: never try using nautilus as an help viewer. +2007-08-07 Daniel Leidert + * programs/Makefile.in (MAINTAINERCLEANFILES): Remove Makefile.in with + the maintainer-clean target. + +2007-07-29 Jean Bréfort + * libs/gcu/crystalatom.cc: add a new member to enable + using only part of the radius when rendering. + * libs/gcu/crystalatom.h: ditto. + * programs/crystal/application.cc: partially import + cif files. + * programs/crystal/document.cc: ditto. + * programs/crystal/document.h: ditto. + * programs/crystal/main.cc: ditto. + +2007-07-19 Jean Bréfort + * libs/gcp/molecule.cc: no contextual menu for residues. + * libs/gcp/molecule.h: ditto. + +2007-07-16 Jean Bréfort + * libs/canvas/gcp-canvas-shape.c: (gnome_canvas_shape_ext_bounds): + never use a non-existing path. + * libs/gcp/view.cc: don't activate menus when there is no window; + never change a pseudo-atom atomic number. + * plugins/paint/bonds/bondtool.cc: don't modify a locked bond. + * plugins/paint/bonds/chaintool.cc: fix keyboard state related + issues. + * plugins/paint/bonds/chaintool.h: ditto. + * plugins/paint/residues/Makefile.am: add new files. + * plugins/paint/residues/plugin.cc: add new gcpPseudoAtom class. + * plugins/paint/residues/pseudo-atom.cc: ditto. + * plugins/paint/residues/pseudo-atom.h: ditto. + * plugins/paint/residues/residues-dlg.cc: create an initial residue + (methyl) and enhance the GUI.. + * plugins/paint/residues/residues-dlg.h: ditto. + * plugins/paint/residues/residues.glade: ditto. + * plugins/paint/selection/erasertool.cc: do not delete a locked + object. + * plugins/paint/selection/selectiontool.cc:don't activate menus + when there is no window. + 2007-07-13 Jean Bréfort - * docs/help/3d/C/gchem3d-viewer.xml: fixed documentation - version. - * docs/help/calc/C/gchemcalc.xml: ditto. - * docs/help/crystal/C/gcrystal.xml: ditto. - * docs/help/table/C/gchemtable.xml: ditto. - * gcu/application.cc: don't call gtk_main_quit before + * docs/help/paint/C/figures/elt-menu.png: new screenshot. + * docs/help/paint/C/gchempaint-unstable.xml: updated docs + after fixing sr #105937. + * libs/gcp/application.cc: destroy the window, not the doc + when a file load fails. [#20468] + * libs/gcp/document.cc: set current doc to NULL when + destroying. [#20468] + * libs/gcp/view.cc: fixed caps lock state change. + * libs/gcu/application.cc: don't call gtk_main_quit before gtk_main. - * gcu/application.h: ditto. - -2007-07-09 Daniel Leidert - * docs/man/gcu_man_legal.xml: Fixed a typo. + * libs/gcu/application.h: ditto. + * plugins/paint/bonds/chaintool.cc: fixed various issues. + * plugins/paint/bonds/chaintool.h: ditto. + * themes/paint/ACS_Document_1996: new theme (tanks to + Takashi Suyama). [sr #105938] + * themes/paint/Makefile.am: add new theme. + +2007-07-12 Jean Bréfort + * libs/gcp/tool.cc: no more need to search for an atom, this + is already done by the view. + * libs/gcp/tools.cc: add Tools::SetElement. + * libs/gcp/tools.h: ditto. + * libs/gcp/view.cc: change current element using the keyboard + and change the nature of the atom under the cursor if any. + [sr #105937] + * libs/gcp/view.h: ditto. + * plugins/paint/bonds/bondtool.cc: use either CapsLock + or AltGr to change the default direction of a new bond. + * plugins/paint/bonds/bondtool.h: + * plugins/paint/bonds/chaintool.cc: add shortcuts to + change the chain length. + * plugins/paint/bonds/chaintool.h: ditto. + +2007-07-09 Jean Bréfort + * docs/help/paint/C/gchempaint-unstable.xml: updated docs. + * docs/help/paint/C/gchempaint.xml: ditto. + * libs/canvas/gcp-canvas-group.c: (gnome_canvas_group_print_init), + (gnome_canvas_group_ext_draw_cairo): add new cairo backend for + use until we have a cairo based canvas. + * libs/canvas/gcp-canvas-line.c: (gnome_canvas_line_print_init), + (gnome_canvas_line_ext_draw_cairo): ditto. + * libs/canvas/gcp-canvas-pango.c: (gnome_canvas_pango_print_init), + (gnome_canvas_pango_draw_cairo): ditto. + * libs/canvas/gcp-canvas-shape.c: + (gnome_canvas_shape_ext_print_init), + (gnome_canvas_shape_ext_draw_cairo): ditto. + * libs/canvas/gprintable.c: (g_printable_draw_cairo): ditto. + * libs/canvas/gprintable.h: ditto. + +2007-07-05 Jean Bréfort + * configure.ac: add the residues plugin. + * libs/gcp/Makefile.am: add target.*. + * libs/gcp/application.cc: use targets instead of windows, + and add support for dynamic windows menus and command line + options. + * libs/gcp/application.h: ditto. + * libs/gcp/document.cc: ditto. + * libs/gcp/target.cc: new gcp::Target class (a parent for Window). + * libs/gcp/target.h: ditto. + * libs/gcp/window.cc: make gcp::Window derive from gcp::Target. + * libs/gcp/window.h: ditto. + * libs/gcu/Makefile.am: add new files. + * libs/gcu/cylinder.cc: imported from Avogadro. + * libs/gcu/cylinder.h: ditto. + * libs/gcu/macros.h: fixed some issues. + * libs/gcu/matrix.cc: add GLMatrix class. + * libs/gcu/matrix.h: ditto. + * libs/gcu/object.h: updated copyright. + * libs/gcu/residue.cc: new class. + * libs/gcu/residue.h: ditto. + * libs/gcu/sphere.cc: imported from Avogadro. + * libs/gcu/sphere.h: ditto. + * libs/gcu/vector.cc: support for spheres and cylinders imported + from Eigen. + * libs/gcu/vector.h: ditto. + * plugins/paint/Makefile.am: ad new plugin. + * plugins/paint/residues/Makefile.am: ditto. + * plugins/paint/residues/plugin.cc: ditto. + * plugins/paint/residues/plugin.h: ditto. + * plugins/paint/residues/residues-dlg.cc: ditto. + * plugins/paint/residues/residues-dlg.h: ditto. + * plugins/paint/residues/residues.glade ditto.: + * programs/paint/main.cc: supports dynamic command line options. + * programs/paint/standaloneapp.cc: use gcp::Target. 2007-06-30 Jean Bréfort - * configure.ac: post release version bump (0.8.2). - * docs/help/3d/gchem3d-viewer-unstable.omf.in: removed - unstable. - * docs/help/3d/gchem3d-viewer.omf.in: new file with - Applications|Education|Science as category. - * docs/help/calc/gchemcalc-unstable.omf.in: removed - unstable. - * docs/help/calc/gchemcalc.omf.in: new file with - Applications|Education|Science as category. - * docs/help/crystal/C/gcrystal.xml: changed category - Applications|Education|Science. - * docs/help/crystal/gcrystal-unstable.omf.in: removed - unstable. - * docs/help/crystal/gcrystal.omf.in: new file with - to Applications|Education|Science as category. - * docs/help/table/gchemtable-unstable.omf.in: removed - unstable. - * docs/help/table/gchemtable.omf.in: new file with - Applications|Education|Science as category. + * configure.ac: post release version bump (0.9.1). + * docs/help/3d/gchem3d-viewer-unstable.omf.in: + use Applications|Education|Science as category. + * docs/help/3d/gchem3d-viewer.omf.in: ditto. + * docs/help/calc/gchemcalc-unstable.omf.in: ditto. + * docs/help/calc/gchemcalc.omf.in: ditto. + * docs/help/crystal/gcrystal-unstable.omf.in: ditto. + * docs/help/paint/gchempaint-unstable.omf.in: ditto. + * docs/help/paint/gchempaint.omf.in: ditto. + * docs/help/table/gchemtable-unstable.omf.in: ditto. + * docs/help/table/gchemtable.omf.in: ditto. + +2007-06-28 Jean Bréfort + * mozilla-plugin/moz-plugin.c: (ChemNew): fixed a bug. + * programs/crystal/Makefile.am: even better fix. + * programs/paint/Makefile.am: ditto. + +2007-06-28 Jean Bréfort + * programs/crystal/Makefile.am: really fixed. + * programs/paint/Makefile.am: ditto. + +2007-06-28 Jean Bréfort + * Makefile.am: more build fixes. + * programs/crystal/Makefile.am: ditto. + * programs/paint/Makefile.am: ditto. + +2007-06-27 Jean Bréfort + * tests/Makefile.am: fixed paths. + +2007-06-27 Jean Bréfort + * docs/reference/Makefile.am: fixed build issues. + * goffice/Makefile.am: ditto. + * libs/gcp/Makefile.am: ditto. + * plugins/paint/arrows/Makefile.am: ditto. + * programs/paint/Makefile.am: ditto. + +2007-06-27 Jean Bréfort + * libs/canvas/gnome-print-pango.c: (gpc_print_pango_layout_print): + fix a compilation warning. + * libs/gcp/reaction-arrow.cc: can now have one attached + object. + * libs/gcp/reaction-arrow.h: ditto. + * libs/gcp/reaction-prop-dlg.cc: ditto. + * libs/gcp/reaction-prop.cc: ditto. + * libs/gcp/reaction-prop.h: ditto. + * libs/gcp/theme.cc: add a new padding value for arrow + attached objects. + * libs/gcp/theme.h: + * libs/gcp/view.cc: calls EmitSignal when deleting + objects. + +2007-06-27 Jean Bréfort + * libs/gcp/application.cc: new methods to modify menus from + plugins. + * libs/gcp/application.h: ditto. + * libs/gcp/window.cc: ditto. + +2007-06-24 Jean Bréfort + * glade/paint/Makefile.am: add new glade file. + * glade/paint/arrow-object.glade: initial glade file for + reactions arrows attached objects properties. + * libs/gcp/Makefile.am: add reaction-prop-dlg.* + * libs/gcp/application.cc: correctly create the + ReactionProp type. + * libs/gcp/reaction-arrow.cc: select, move and update + children. + * libs/gcp/reaction-arrow.h: ditto. + * libs/gcp/reaction-prop-dlg.cc: new dialog. + * libs/gcp/reaction-prop-dlg.h: ditto. + * libs/gcp/reaction-prop.cc: Load and Save implemented, + and enhanced role support. + * libs/gcp/reaction-prop.h: ditto. 2007-06-20 Jean Bréfort * pixmaps/Makefile.am: use new icons. + * programs/3d/gchem3d-viewer-unstable.desktop.in: ditto. * programs/3d/gchem3d-viewer.desktop.in: ditto. + * programs/calc/gchemcalc-unstable.desktop.in: ditto. * programs/calc/gchemcalc.desktop.in: ditto. + * programs/table/Makefile.am: ditto. + * programs/table/gchemtable-curve.cc: ditto. + * programs/table/gchemtable-curve.h: ditto. + * programs/table/gchemtable-unstable.desktop.in: ditto. * programs/table/gchemtable.desktop.in: ditto. 2007-06-18 Jordan Mantha * Added 32,48,72, and 128 pixel icons for gchem3d-viewer, gchemtable, and gchemcalc +2007-06-16 Jean Bréfort + * configure.ac: removed + * libs/gcp/Makefile.am: new ReactionProp class. + * libs/gcp/application.cc: ditto. + * libs/gcp/reaction-arrow.cc: moved code from reactions + plugin. + * libs/gcp/reaction-arrow.h: ditto. + * libs/gcp/reaction-prop.cc: new ReactionProp class. + * libs/gcp/reaction-prop.h: ditto. + * plugins/paint/Makefile.am: removed obsolete reactions + plugin. + * plugins/paint/reactions/.cvsignore: ditto. + * plugins/paint/reactions/Makefile.am: ditto. + * plugins/paint/reactions/plugin.cc: ditto. + * plugins/paint/reactions/plugin.h: ditto. + +2007-06-11 Jean Bréfort + * templates/paint/templates.xml.in: fixed isoleucine template. + +2007-06-09 Jean Bréfort + * libs/gcp/application.cc: make copying as text optional. + * libs/gcp/settings.cc: ditto. + * libs/gcp/settings.h: ditto. + * libs/gcp/view.cc: ditto. + * libs/gcp/widgetdata.cc: ditto. + * plugins/paint/text/fragmenttool.cc: ditto. + * plugins/paint/text/texttool.cc: ditto. + * programs/paint/gchempaint.schemas.in: ditto. + +2007-06-05 Jean Bréfort + * libs/gcp/text.h: add gcp::Text::SetText (char const*). + * libs/gcp/view.cc: add image/bmp as clipboard target and + gcp::View::BuildPixbuf to support copying pixbufs. + * libs/gcp/view.h: add gcp::View::BuildPixbuf. + * libs/gcp/widgetdata.cc: implement copying pixbufs. + 2007-05-22 Jean Bréfort - * mozilla-plugin/moz-plugin.c: (ChemNew): fixed - compilation warning (and potential crasher). - * programs/table/gchemtable-main.cc: add missing header. + * plugins/paint/cycles/cycletool.cc: fixed two bugs. + [#19932] and [#19933]. 2007-05-20 Jean Bréfort - * configure.ac: post release version bump (0.8.1). - * pixmaps/Makefile.am: fix logo installation. [#19911] * programs/crystal/Makefile.am: add -DPIXMAPSDIR. * programs/crystal/window.cc: use logo in about box. -2007-05-19 Jean Bréfort - * configure.ac: set version to 0.8.0. +2007-05-15 Jean Bréfort + * docs/help/paint/C/figures/Hposdlg.png: add documentation + for the hydrogen position new feature. + * docs/help/paint/C/gchempaint-unstable.xml: ditto. + * plugins/paint/reactions/Makefile.am: added missing. 2007-05-12 Jean Bréfort - * gcu/macros.h: ensure GCU_CONF_GET_STRING returns a - non NULL value if it is provided a default. - * programs/crystal/Makefile.am: add kde mime stuff to - CLEANFILES. + * libs/gcu/macros.h: ensure GCU_CONF_GET_STRING returns + a non NULL value if it is provided a default. -2007-05-10 Jean Bréfort - * glade/crystal/size.glade: don't translate strings which - should not. - * glade/table/eltpage.glade: ditto. +2007-05-11 Jean Bréfort + * AUTHORS: update list. + * libs/gcp/application.cc: don't add two extensions + when saving as image. + * programs/crystal/application.cc: initial work on CIF + support. + * programs/crystal/document.cc: ditto. + * programs/crystal/document.h: ditto. 2007-05-10 Jean Bréfort - * programs/crystal/gcrystal.schemas.in: removed localized - string. + * glade/paint/H-pos.glade: fixed buttons names. + * libs/gcp/Hposdlg.cc: force atom update after a change. + * libs/gcp/atom.cc: fixed typo in Save and force update + when loading. + * templates/paint/haworth.xml.in: updated (Julian Sikorski). -2007-05-09 Jean Bréfort - * gcu.pc.in: requires libgoffice-0.4. [#19835] +2007-05-10 Jean Bréfort + * Makefile.am: remove pc file. + * configure.ac: add reactions plugin. + * gcu-unstable.pc.in: cleaned. + * glade/paint/Makefile.am: add H-pos.glade. [#19842] + * glade/paint/H-pos.glade: ditto. + * glade/paint/preferences.glade: fixed bounds for + all spin buttons. [#19845] + * libs/gcp/Hposdlg.cc: allow changing the position of + hydrogen atoms. [#19842] + * libs/gcp/Hposdlg.h: ditto. + * libs/gcp/Makefile.am: add new Hposdlg.*. [#19842] + and add LOCALEDR and GLADEDIR to DEFS. + * libs/gcp/about.cc: fixed path to logo. + * libs/gcp/atom.cc: fixed memory leaks in BuildContextualMenu, + allow changing the position of hydrogen atoms. [#19842] + * libs/gcp/atom.h: allow changing the position of + hydrogen atoms. [#19842] + * libs/gcp/bond.cc: fixed memory leaks in BuildContextualMenu. + * libs/gcp/docprop.cc: use GLADEDIR. + * libs/gcp/mesomery.cc: fixed memory leaks in BuildContextualMenu. + * libs/gcp/molecule.cc: ditto. + * libs/gcp/newfiledlg.cc: use GLADEDIR. + * libs/gcp/preferences.cc: ditto. + * libs/gcp/reactant.cc: fixed memory leaks in BuildContextualMenu. + * libs/gcp/reaction-arrow.h: + * libs/gcp/reaction.cc: + * libs/gcp/stringdlg.cc: use GLADEDIR. + * libs/gcp/theme.cc: use LOCALEDIR. + * libs/gcp/theme.cc: fixed crashers and use GLADEDIR. + * libs/gcp/tool.h: add some doc. + * libs/gcp/tools.cc: use GLADEDIR. + * libs/gcp/view.cc: don't keep zombies in gcpWidgetData::Items. + Fixes crashes. [#19840] + * libs/gcp/widgetdata.cc: fixed gcp xml namespace. + * libs/gcp/window.cc: fixed a memory leak. + * libs/gcu/object.cc: add support to modify contextual menus + from outside the class code. + * libs/gcu/object.h: ditto. + * pixmaps/Makefile.am: add new pixmaps. + * pixmaps/gchempaint128.png: copied from GChemPaint. + * pixmaps/gchempaint32.png: ditto. + * pixmaps/gchempaint48.png: ditto. + * pixmaps/gchempaint72.png: ditto. + * pixmaps/gchempaint_logo.png: ditto. + * plugins/paint/Makefile.am: add reactions plugin. + * plugins/paint/arrows/retrosynthesis.cc: fixed memory leaks + in BuildContextualMenu. + * plugins/paint/reactions/plugin.cc: new plugin. + * plugins/paint/reactions/plugin.h: ditto. + * plugins/paint/selection/group.cc: fixed memory leaks + in BuildContextualMenu. + * plugins/paint/templates/templatetool.cc: use correct bond + lengths when pasting the template. [#19838] + * plugins/paint/wikipedia/plugin.cc: add a contextual menu + item. + * plugins/paint/wikipedia/plugin.h: minor cosmetic update. + * plugins/paint/wikipedia/wikipediatool.cc: fixed gcp xml + namespace. + * templates/paint/Makefile.am: add new saccharides templates. + * templates/paint/haworth.xml.in: ditto. 2007-05-09 Jean Bréfort - * configure.ac: post release version bump (0.7.96) and - add --with-kde-mime-dir. - * programs/crystal/Makefile.am: add new kde mime support - gor gcrystal. + * configure.ac: add --with-kde-mime-dir. + * gchemutils.keys.in: removed obsolete. + * gchemutils.mime: ditto. + * programs/crystal/Makefile.am: add kde mime file. * programs/crystal/x-gcrystal.desktop.in: ditto. + * programs/paint/Makefile.am: add desktop and schemas files. + * programs/paint/gchempaint-unstable.desktop.in: copied from + GChemPaint. + * programs/paint/gchempaint.desktop.in: ditto. + * programs/paint/gchempaint.schemas.in: ditto. + * programs/paint/x-gchempaint.desktop.in: add kde mime file. + +2007-04-27 Jean Bréfort + * docs/reference/Makefile.am: do not install docs. + * glade/table/curve.glade: remove buttons (they are replaced + by the menus). + * libs/gcu/Makefile.am: don't install headers. + * plugins/paint/wikipedia/wikipediatool.cc: add Author and + Copyright fields to the PNG file. + * programs/table/gchemtable-curve.cc: add page setup and + print preview. + * programs/table/gchemtable-curve.h: ditto. -2007-05-08 Jean Bréfort - * docs/man/Makefile.am: ensure man pages are in the tarball. - -2007-05-07 Daniel Leidert - * docs/man/Makefile.am (EXTRA_DIST): Added missing gcu_man_legal.xml. +2007-04-26 Jean Bréfort + * gchemutils.xml.in: add GChemPaint format. + * libs/gcp/preferences.cc: fix crash when no theme is selected. + * templates/paint/Makefile.am: fixed typo. -2007-05-07 Daniel Leidert - * README: Fixed copyright info. - * docs/man/Makefile.am: Added some more XS parameters. - (gcu_man_src): Added gcrystal. - (man1_MANS, man3_MANS): Fixed. We now use man_MANS. - (check-local): "Hide" the echo commands. - * docs/man/gcu_man_legal.xml: Added. Copyright and legal information. - * docs/man/gcu_entities.dtd.in: Added copyright and legal information. - * docs/man/gchem3d-viewer.1.xml: Ditto. Fixed to use less generic IDs. - * docs/man/gchemcalc.1.xml: Ditto. - * docs/man/gchemtable.1.xml: Ditto. - * docs/man/libgcu.3.xml: Ditto. - * docs/man/gchem3d-viewer.1: Updated. - * docs/man/gchemcalc.1: Ditto. - * docs/man/gchemtable.1: Ditto. - * docs/man/libgcu.3: Ditto. - * docs/man/gcrystal.1: Added. - * docs/man/gcrystal.1.xml: Added. - * programs/Makefile.am: Added maintainer-clean target. - -2007-05-07 Daniel Leidert - * docs/help/3d/Makefile.am: Added -Wno-portability to AUTOMAKE_OPTIONS - to suppress portability warnings from gnome-doc-utils.make. - * docs/help/calc/Makefile.am: Ditto. - * docs/help/crystal/Makefile.am: Ditto. - * docs/help/table/Makefile.am: Ditto. - * docs/man/Makefile.am: Removed portability warnings thrown by - automake by replacing %-style pattern rules with SUFFIX rules and - replacing error/warning/info with echo (& exit) calls. - * gchemutils/docs/reference/Makefile.am: Ditto. - -2007-05-07 Daniel Leidert - * glade/crystal/prefs.glade: Improved wording. - * glade/crystal/view-settings.glade: Ditto. - * glade/crystal/size.glade: Mark the asterisk as untranslatable. - * programs/crystal/cleavagesdlg.cc: Do not translate the indices. - * programs/crystal/linesdlg.cc: Ditto. - -2007-05-05 Jean Bréfort - * configure.ac: change version to 0.7.95 and requires - libgoffice-0.4. +2007-04-24 Jean Bréfort + * Makefile.am: add new directories. + * configure.ac: ditto. + * docs/help/Makefile.am: add paint subdir. + * docs/help/paint/C/figures/*.png: copied from GChemPaint. + * docs/help/paint/C/gchempaint-unstable.xml: ditto. + * docs/help/paint/C/gchempaint.xml: ditto. + * docs/help/paint/C/legal.xml: ditto. + * docs/help/paint/Makefile.am: ditto. + * docs/help/paint/gchempaint-unstable.omf.in: ditto. + * docs/help/paint/gchempaint.omf.in: ditto. + * docs/help/paint/omf.make: ditto. + * docs/help/paint/xmldocs.make: ditto. + * libs/gcp/application.cc: fixed Application::FileProcess + signature. + * libs/gcp/application.h: ditto. + * libs/gcp/document.cc: fixed missing xml namespace and + ensure that view related theme data are always updated. + * libs/gcp/molecule.cc: add a public method to retrieve the + InChI. + * libs/gcp/molecule.h: ditto. + * libs/gcp/preferences.cc: block "changed" signal for font + selectors on theme selection. + * libs/gcp/preferences.h: ditto. + * libs/gcp/theme.cc: fixed crashers. + * libs/gcp/view.cc: fixed a potential crasher. + * libs/gcu/application.cc: allow multiple Application instances. + * plugins/paint/Makefile.am: add wikipedia subdir. + * plugins/paint/text/Makefile.am: add MAINTAINERCLEANFILES. + * plugins/paint/wikipedia/Makefile.am: new plugin. + * plugins/paint/wikipedia/favicon.png: ditto. + * plugins/paint/wikipedia/plugin.cc: ditto. + * plugins/paint/wikipedia/plugin.h: ditto. + * plugins/paint/wikipedia/wikipediatool.cc: ditto. + * plugins/paint/wikipedia/wikipediatool.h: ditto. + * themes/Makefile.am: new file. + * themes/paint/Makefile.am: ditto. + * themes/paint/Wikipedia: first global theme (still experimental). 2007-04-23 Daniel Leidert * programs/crystal/gcrystal.schemas.in: Fixed typos. -2007-04-09 Jean Bréfort - * gchemutils.keys.in: removed obsolete. - * glade/crystal/Makefile.am: removed unused files. - * glade/crystal/bonds.glade: ditto. - * glade/crystal/docprop.glade: ditto. - * glade/table/Makefile.am: ditto. - * glade/table/acidity.glade: ditto. +2007-04-21 Jordan Mantha + * programs/table/gchemtable-app.cc: use explicit casts for + double->guint16 + +2007-04-21 Jordan Mantha + * programs/table/gchemtable-app.cc: added covalent radius and block + color schemes. + * programs/table/gchemtable-app.h: ditto + * glade/table/block.glade: added legend for block color scheme + * glade/table/Makefile.am: ditto + +2007-04-21 Jean Bréfort + * programs/table/gchemtable-app.cc: added some white spaces + for consistency. + +2007-04-19 Jordan Mantha + * programs/table/gchemtable-app.cc: added electronegativity + color scheme to gchemtable + * programs/table/gchemtable-app.h: ditto + +2007-04-14 Jean Bréfort + * libs/gcp/Makefile.am: really fix build. + * libs/gcp/fragment-atom.cc: call gcu::Atom::SetZ instead of + gcp::Atom::SetZ which does not support Z==0. + +2007-04-14 Jean Bréfort + * libs/gcp/Makefile.am: fix build. + * libs/gcp/atom.cc: in Atom::Transform2D, don't call itself, + but the parent class method. -2007-04-06 Jean Bréfort - * gcu/Makefile.am: fixed compilation after crystalbond.* - removal. - * gcu/crystaldoc.h: ditto. +2007-04-13 Jean Bréfort + * Makefile.am: add new directories. + * configure.ac: ditto. + * goffice/Makefile.am: initial work on the goffice plugin. + * goffice/gchemutils-priv.h: ditto. + * goffice/gchemutils.cc: ditto. + * goffice/gchemutils.h: ditto. + * goffice/plugin.xml.in: ditto. + * programs/paint/Makefile.am: enhanced build. + +2007-04-12 Jean Bréfort + * templates/Makefile.am: new subtree. + * templates/paint/Makefile.am: copied from GChemPaint. + * templates/paint/templates.xml.in: ditto. -2007-04-06 Jean Bréfort - * gcu/application.cc: make compilation succeed without - warnings for all known gcc-4.x. - * gcu/application.h: ditto. - * gcu/atom.cc: ditto. - * gcu/bond.cc: ditto. - * gcu/crystalatom.cc: ditto. - * gcu/crystalbond.cc: ditto. - * gcu/crystalbond.h: ditto. - * gcu/crystaldoc.cc: ditto. - * gcu/crystaldoc.h: ditto. - * gcu/crystalline.cc: ditto. - * gcu/crystalview.cc: ditto. - * gcu/dialog.cc: ditto. - * gcu/element.cc: ditto. - * gcu/formula.cc: ditto. - * gcu/glview.cc: ditto. - * gcu/glview.h: ditto. - * gcu/matrix.cc: ditto. - * gcu/matrix2d.cc: ditto. - * gcu/value.cc: ditto. - * gcu/xml-utils.cc: ditto. +2007-04-09 Jean Bréfort + * configure.ac: removed some old tests (gcc < 0.3 not + anymore supported). + * libs/canvas/gnome-print-pango.c: fixed build issues. + [#19523] + * libs/gcp/about.cc: ditto. + * libs/gcp/about.h: ditto. + * libs/gcp/application.cc: ditto. + * libs/gcp/application.h: ditto. + * libs/gcp/arrow.cc: ditto. + * libs/gcp/atom.cc: ditto. + * libs/gcp/bond.cc: ditto. + * libs/gcp/document.cc: ditto. + * libs/gcp/document.h: ditto. + * libs/gcp/electron.cc: ditto. + * libs/gcp/fontsel.cc: ditto. + * libs/gcp/fragment-atom.cc: ditto. + * libs/gcp/fragment.cc: ditto. + * libs/gcp/mesomery.cc: ditto. + * libs/gcp/molecule.cc: ditto. + * libs/gcp/operation.cc: ditto. + * libs/gcp/operation.h: ditto. + * libs/gcp/reaction-arrow.cc: ditto. + * libs/gcp/reaction-operator.cc: ditto. + * libs/gcp/reaction.cc: ditto. + * libs/gcp/settings.cc: ditto. + * libs/gcp/settings.h: ditto. + * libs/gcp/text.cc: ditto. + * libs/gcp/theme.cc: ditto. + * libs/gcp/view.cc: ditto. + * libs/gcp/window.cc: ditto. + * libs/gcu/application.cc: ditto. + * libs/gcu/application.h: ditto. + * libs/gcu/atom.cc: ditto. + * libs/gcu/bond.cc: ditto. + * libs/gcu/chem3ddoc.cc: ditto. + * libs/gcu/chemistry.cc: ditto. + * libs/gcu/chemistry.h: ditto. + * libs/gcu/crystalatom.cc: ditto. + * libs/gcu/crystalbond.cc: ditto. + * libs/gcu/crystalcleavage.cc: ditto. + * libs/gcu/crystaldoc.cc: ditto. + * libs/gcu/crystaldoc.h: ditto. + * libs/gcu/crystalline.cc: ditto. + * libs/gcu/crystalline.h: ditto. + * libs/gcu/crystalview.cc: ditto. + * libs/gcu/dialog.cc: ditto. + * libs/gcu/element.cc: ditto. + * libs/gcu/element.h: ditto. + * libs/gcu/formula.cc: ditto. + * libs/gcu/glview.cc: ditto. + * libs/gcu/glview.h: ditto. + * libs/gcu/matrix.cc: ditto. + * libs/gcu/matrix2d.cc: ditto. + * libs/gcu/object.cc: ditto. + * libs/gcu/object.h: ditto. + * libs/gcu/value.cc: ditto. + * libs/gcu/value.h: ditto. + * libs/gcu/xml-utils.cc: ditto. * mozilla-plugin/moz-plugin.c: ditto. + * plugins/paint/arrows/arrowtool.cc: ditto. + * plugins/paint/arrows/retrosynthesis.cc: ditto. + * plugins/paint/arrows/retrosynthesisarrow.cc: ditto. + * plugins/paint/atoms/chargetool.cc: ditto. + * plugins/paint/atoms/chargetool.h: ditto. + * plugins/paint/atoms/electrontool.cc: ditto. + * plugins/paint/atoms/elementtool.cc: ditto. + * plugins/paint/bonds/bondtool.cc: ditto. + * plugins/paint/bonds/chaintool.cc: ditto. + * plugins/paint/cycles/cycletool.cc: ditto. + * plugins/paint/selection/erasertool.cc: ditto. + * plugins/paint/selection/group.cc: ditto. + * plugins/paint/selection/selectiontool.cc: ditto. * programs/3d/application.cc: ditto. * programs/calc/gchemcalc.cc: ditto. * programs/crystal/application.cc: ditto. * programs/crystal/atom.cc: ditto. + * programs/crystal/atomsdlg.cc: ditto. * programs/crystal/document.cc: ditto. * programs/crystal/line.cc: ditto. * programs/crystal/main.cc: ditto. * programs/crystal/view.cc: ditto. * programs/crystal/window.cc: ditto. + * programs/paint/main.cc: ditto. * programs/table/gchemtable-app.cc: ditto. + * programs/table/gchemtable-curve.cc: ditto. * programs/table/gchemtable-elt.cc: ditto. 2007-04-06 Jean Bréfort - * gcu/element.cc: fixed typo. + * glade/table/family.glade: fixed family names. + * lib/application.cc: remove the unuseful application list, only one + application should exist. + * lib/application.h: ditto. + * lib/atom.cc: update BuildContextualMenu signature. Also add a + RemveElectron method and fix remove/add bonds. + * lib/atom.h: ditto. + * lib/bond.cc: update BuildContextualMenu signature and call + gcpAtom::BuildContextualMenu if the click occur near one end of + the bond. + * lib/bond.h: ditto. + * libs/gcp/document.cc: fixed an infinite loop. + * lib/electron.cc: force update of atom parent when destoying. + * lib/mesomery.cc: update BuildContextualMenu signature. + * lib/mesomery.h: ditto. + * lib/molecule.cc: ditto. + * lib/molecule.h: ditto. + * lib/reactant.cc: ditto. + * lib/reactant.h: ditto. + * lib/reaction.cc: ditto. + * lib/reaction.h: ditto. + * lib/view.cc: ditto. + * libs/gcu/atom.cc: cleaned. + * libs/gcu/document.cc: fixed file name. + * libs/gcu/element.cc: fixed atomic mass unit. * gcu/object.cc: add x and y parameters to BuildContextualMenu. * gcu/object.h: ditto. + * plugins/paint/arrows/retrosynthesis.cc: update BuildContextualMenu signature. + * plugins/paint/arrows/retrosynthesis.h: ditto. + * plugins/paint/selection/group.cc: ditto. + * plugins/paint/selection/group.h: ditto. + * plugins/paint/templates/plugin.cc: update copyright. 2007-04-01 Jean Bréfort - * gcu/element.cc: use "u" as the atomic mass unit. + * plugins/paint/*/*.png: add mssing files necessary to build. + * plugins/paint/arrows/gchempaint-arrows.schemas.in: ditto. + * plugins/paint/templates/Makefile.am: fixed typo. 2007-04-01 Jean Bréfort - * glade/table/family.glade: fixed families names. + * configure.ac: copy remaining plugins for GChemPaint. + * plugins/paint/*: ditto. + +2007-04-01 Jean Bréfort + * plugins/paint/selection/Makefile.am: fixed details. + * plugins/paint/selection/groupdlg.cc: fixed glade dir. + +2007-03-31 Jean Bréfort + * Makefile.am: add gchempaint stuff. + * configure.ac: ditto. + * docs/help/table/C/gchemtable-unstable.xml: fixed typos. + * glade/Makefile.am: add gchempaint stuff. + * glade/table/curve.glade: add printing. + * libs/Makefile.am: add gchempaint stuff. + * programs/Makefile.am: ditto. + * programs/table/gchemtable-app.cc: add an OnAbout method to the class. + * programs/table/gchemtable-app.h: ditto. + * programs/table/gchemtable-curve.cc: add a menu and implement printing. + * programs/table/gchemtable-curve.h: ditto. + +2007-03-30 Jean Bréfort + * glade/paint/*: copied from GChemPaint. + * libs/canvas/*: ditto. + * libs/gcp/*: ditto. + * plugins/Makefile.am: new directory Makefile.am. + * plugins/paint/Makefile.am: ditto. + * plugins/paint/selection/*: copied from GChemPaint. + * programs/paint/*: ditto. -2007-03-22 Jean Bréfort - * configure.ac: removed *_DISABLE_DEPRECATED. - * docs/help/table/C/gchemtable.xml: fixed some typos. +2007-03-09 Jean Bréfort + * configure.ac: make things build again. + * libs/gcu/Makefile.am: ditto. + * mozilla-plugin/Makefile.am: ditto. + * programs/3d/Makefile.am: ditto. + * programs/calc/Makefile.am: ditto. + +2007-03-09 Jean Bréfort + * Makefile.am: updated to new architecture. + * configure.ac: ditto. + * docs/reference/Doxyfile.in: ditto. + * libs/Makefile.am: new file. + * programs/3d/Makefile.am: updated to new architecture. + * programs/calc/Makefile.am: ditto. + * programs/crystal/Makefile.am: ditto. + * programs/table/Makefile.am: ditto. 2007-03-09 Jean Bréfort - * configure.ac: post release version bump (0.7.91). + * gcu/*: moved to libs/gcu. + * libs/gcu/*: moved from gcu. 2007-03-01 Jean Bréfort * programs/3d/window.cc: updated copyright in about box. @@ -363,50 +3028,12 @@ * programs/table/gchemtable-app.cc: ditto. 2007-02-25 Jean Bréfort + * docs/help/crystal/C/gcrystal-unstable.xml: updated history. * programs/3d/main.cc: calls gtk_gl_init. * programs/crystal/main.cc: ditto. -2007-02-24 Jean Bréfort - * docs/help/3d/C/gchem3d-viewer-unstable.xml: renamed. - * docs/help/3d/C/gchem3d-viewer.xml: new name. - * docs/help/3d/Makefile.am: removed unstable. - * docs/help/calc/C/gchemcalc-unstable.xml: renamed. - * docs/help/calc/C/gchemcalc.xml: new name. - * docs/help/calc/Makefile.am: removed unstable. - * docs/help/crystal/C/gcrystal-unstable.xml: renamed. - * docs/help/crystal/C/gcrystal.xml: new name. - * docs/help/crystal/Makefile.am: removed unstable. - * docs/help/table/C/gchemtable-unstable.xml: renamed. - * docs/help/table/C/gchemtable.xml: new name. - * docs/help/table/Makefile.am: removed unstable. - 2007-02-22 Jean Bréfort - * Makefile.am: remove unstable stuff. - * configure.ac: ditto and changed version to 0.7.90. - * database/Makefile.am: remove unstable stuff. - * gcu-unstable.pc.in: ditto. - * gcu.pc.in: ditto. - * gcu/Makefile.am: ditto. - * glade/Makefile.am: ditto. - * glade/crystal/Makefile.am: ditto. - * glade/table/Makefile.am: ditto. - * mozilla-plugin/Makefile.am: ditto. - * po/POTFILES.in: ditto. - * programs/3d/Makefile.am: ditto. - * programs/3d/application.cc: ditto. - * programs/3d/gchem3d-viewer-unstable.desktop.in: ditto. - * programs/calc/Makefile.am: ditto. - * programs/calc/gchemcalc-unstable.desktop.in: ditto. - * programs/calc/gchemcalc.cc: ditto. - * programs/crystal/Makefile.am: ditto. - * programs/crystal/application.cc: ditto. - * programs/crystal/gcrystal-unstable.desktop.in: ditto. - * programs/table/Makefile.am: ditto. - * programs/table/gchemtable-app.cc: ditto. - * programs/table/gchemtable-curve.cc: ditto. - * programs/table/gchemtable-elt.cc: ditto. - * programs/table/gchemtable-unstable.desktop.in: ditto. - * tests/Makefile.am: ditto. + * configure.ac: post branching version bump (0.9.0). 2007-02-21 Jean Bréfort * docs/help/crystal/C/gcrystal-unstable.xml: make it diff -Nru gnome-chemistry-utils-0.8.6/compile gnome-chemistry-utils-0.10.9/compile --- gnome-chemistry-utils-0.8.6/compile 2006-10-19 06:51:14.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/compile 2009-08-12 08:51:00.000000000 +0200 @@ -1,9 +1,10 @@ #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. -scriptversion=2005-05-14.22 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software +# Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,8 +18,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -103,13 +103,13 @@ fi # Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name +# Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break @@ -138,5 +138,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff -Nru gnome-chemistry-utils-0.8.6/config.guess gnome-chemistry-utils-0.10.9/config.guess --- gnome-chemistry-utils-0.8.6/config.guess 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/config.guess 2009-07-23 22:36:54.000000000 +0200 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-27' +timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -170,7 +170,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -656,7 +656,7 @@ # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -822,6 +822,9 @@ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -882,40 +885,17 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif @@ -947,7 +927,7 @@ EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; @@ -1001,14 +981,6 @@ elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -1074,7 +1046,7 @@ i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1182,7 +1154,7 @@ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) diff -Nru gnome-chemistry-utils-0.8.6/config.h.in gnome-chemistry-utils-0.10.9/config.h.in --- gnome-chemistry-utils-0.8.6/config.h.in 2008-01-25 21:06:17.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/config.h.in 2009-11-14 11:45:58.000000000 +0100 @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* API version */ +#undef API_VERSION + /* Path to Blue Obelisk Data Repository */ #undef BODR_PKGDATADIR @@ -9,8 +12,11 @@ /* Package name for internationalization */ #undef GETTEXT_PACKAGE -/* Define to 1 if vector::at can be used. */ -#undef HAS_VECTOR_AT +/* Whether goffice is >= 0.7.8 */ +#undef GOFFICE_HAS_GLOBAL_HEADER + +/* Whether goffice is 0.6.x or later */ +#undef GOFFICE_IS_0_6 /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET @@ -21,12 +27,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_FSTREAM - /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT +/* Define to 1 if you have the `gog_data_editor_set_format' function. */ +#undef HAVE_GOG_DATA_EDITOR_SET_FORMAT + +/* Define to 1 if you have the `go_conf_sync' function. */ +#undef HAVE_GO_CONF_SYNC + +/* Define to 1 if you have the `go_data_serialize' function. */ +#undef HAVE_GO_DATA_SERIALIZE + +/* Define to 1 if you have the `go_error_info_free' function. */ +#undef HAVE_GO_ERROR_INFO_FREE + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -39,11 +54,11 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the header file. */ -#undef HAVE_OSTREAM +/* Define to 1 if you have the header file. */ +#undef HAVE_NPFUNCTIONS_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SSTREAM +/* Whether OpenBabel is >= 2.2.0 */ +#undef HAVE_OPENBABEL_2_2 /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -66,8 +81,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have a Cygwin/Windows OS. */ -#undef OS_WIN32 +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR /* Name of package */ #undef PACKAGE @@ -84,6 +100,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff -Nru gnome-chemistry-utils-0.8.6/config.rpath gnome-chemistry-utils-0.10.9/config.rpath --- gnome-chemistry-utils-0.8.6/config.rpath 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/config.rpath 2009-08-30 16:32:36.000000000 +0200 @@ -0,0 +1,666 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2007 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix4* | aix5*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -65,20 +86,18 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -89,32 +108,271 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: http://savannah.nongnu.org/bugs/?group=gchemutils about +$0: your system, including any error possibly output before +$0: this message. Then install a modern shell, or manually +$0: run the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -128,13 +386,17 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -149,428 +411,142 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit } -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -if as_func_ret_success; then - : +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi else - exitcode=1 - echo as_func_ret_success failed. + as_ln_s='cp -p' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - exitcode=1 - echo positional parameters were not saved. + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi +as_executable_p=$as_test_x -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac -fi +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in +case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac -echo=${ECHO-echo} +ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! : else # Restart under the correct shell. @@ -580,9 +556,9 @@ if test "X$1" = X--fallback-echo; then # used as fallback echo shift - cat </dev/null 2>&1 && unset CDPATH -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else - # maybe with a smaller string... - prev=: + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi fi fi fi fi -fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - exec 7<&0 &1 # Name of the host. @@ -723,16 +694,16 @@ subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='gnome-chemistry-utils' PACKAGE_TARNAME='gnome-chemistry-utils' -PACKAGE_VERSION='0.8.6' -PACKAGE_STRING='gnome-chemistry-utils 0.8.6' +PACKAGE_VERSION='0.10.9' +PACKAGE_STRING='gnome-chemistry-utils 0.10.9' PACKAGE_BUGREPORT='http://savannah.nongnu.org/bugs/?group=gchemutils' +PACKAGE_URL='' -ac_unique_file="gcu/gtkperiodic.c" +ac_unique_file="libs/gcu/gtkperiodic.c" # Factoring default headers for most tests. ac_includes_default="\ #include @@ -769,241 +740,353 @@ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +TESTSSRCDIR +GDK_PIXBUF_CSOURCE +HAVE_MAN_FALSE +HAVE_MAN_TRUE +MAN +XSLTPROC_FLAGS +HAVE_XSLTPROC_FALSE +HAVE_XSLTPROC_TRUE +XSLTPROC +XMLLINT_FLAGS +HAVE_XMLLINT_FALSE +HAVE_XMLLINT_TRUE +XMLLINT +mozlibdir +WITH_MOZILLA_FALSE +WITH_MOZILLA_TRUE +MOZILLA_LIBS +MOZILLA_CFLAGS +MOZILLA_CONFIG +GOFFICE_PLUGINS_DIR +GCU_CFLAGS +GCONF_SCHEMAS_INSTALL_FALSE +GCONF_SCHEMAS_INSTALL_TRUE +GCONF_SCHEMA_FILE_DIR +GCONF_SCHEMA_CONFIG_SOURCE +GCONFTOOL +OB22_LIBS +OB22_CFLAGS +need_goffice_with_gnome_LIBS +need_goffice_with_gnome_CFLAGS +goffice_has_global_header_LIBS +goffice_has_global_header_CFLAGS +GCU_NEEDS_GCONF_FALSE +GCU_NEEDS_GCONF_TRUE +gnome_vfs_LIBS +gnome_vfs_CFLAGS +gconf_LIBS +gconf_CFLAGS +openbabel_LIBS +openbabel_CFLAGS +bodr_LIBS +bodr_CFLAGS +chemical_mime_data_LIBS +chemical_mime_data_CFLAGS +goffice_LIBS +goffice_CFLAGS +gsf_LIBS +gsf_CFLAGS +xml_LIBS +xml_CFLAGS +gtkglext_LIBS +gtkglext_CFLAGS +gnome_canvas_LIBS +gnome_canvas_CFLAGS +glade_LIBS +glade_CFLAGS +gtk_LIBS +gtk_CFLAGS +gio_LIBS +gio_CFLAGS +cairo_LIBS +cairo_CFLAGS +shared_mime_info_LIBS +shared_mime_info_CFLAGS +DOXYGEN_AVAILABLE_FALSE +DOXYGEN_AVAILABLE_TRUE +DOXYGEN +KDEMIMEDIR +WITH_KDE_MIME_FALSE +WITH_KDE_MIME_TRUE +KDECONFIG +WITH_UPDATE_MIME_FALSE +WITH_UPDATE_MIME_TRUE +WITH_UPDATE_DESKTOP_FALSE +WITH_UPDATE_DESKTOP_TRUE +UPDATE_MIME_DATABASE +UPDATE_DESKTOP_DATABASE +GETTEXT_PACKAGE +MKINSTALLDIRS +POSUB +POFILES +PO_IN_DATADIR_FALSE +PO_IN_DATADIR_TRUE +INTLLIBS +INSTOBJEXT +GMOFILES +CATOBJEXT +CATALOGS +MSGFMT_OPTS +GCU_IS_STABLE_FALSE +GCU_IS_STABLE_TRUE +STABILITY_POSTFIX +STABILITY +GCU_API_VER +GCU_VERSION_INFO +HAVE_GNOME_DOC_UTILS_FALSE +HAVE_GNOME_DOC_UTILS_TRUE +DISTCHECK_CONFIGURE_FLAGS +ENABLE_SK_FALSE +ENABLE_SK_TRUE +DOC_USER_FORMATS +OMF_DIR +HELP_DIR +PKG_CONFIG +DATADIRNAME +ALL_LINGUAS +INTLTOOL_PERL +GMSGFMT +MSGFMT +MSGMERGE +XGETTEXT +INTLTOOL_POLICY_RULE +INTLTOOL_SERVICE_RULE +INTLTOOL_THEME_RULE +INTLTOOL_SCHEMAS_RULE +INTLTOOL_CAVES_RULE +INTLTOOL_XML_NOMERGE_RULE +INTLTOOL_XML_RULE +INTLTOOL_KBD_RULE +INTLTOOL_XAM_RULE +INTLTOOL_UI_RULE +INTLTOOL_SOUNDLIST_RULE +INTLTOOL_SHEET_RULE +INTLTOOL_SERVER_RULE +INTLTOOL_PONG_RULE +INTLTOOL_OAF_RULE +INTLTOOL_PROP_RULE +INTLTOOL_KEYS_RULE +INTLTOOL_DIRECTORY_RULE +INTLTOOL_DESKTOP_RULE +INTLTOOL_EXTRACT +INTLTOOL_MERGE +INTLTOOL_UPDATE +USE_NLS +LTCXXCOMPILE +LTCOMPILE +DOLT_BASH +CXXCPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +SED +LIBTOOL +EGREP +GREP +CPP +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXX +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CC +LDFLAGS +CPPFLAGS +CXXFLAGS +CFLAGS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_static +enable_dependency_tracking +with_gnu_ld +enable_rpath +enable_shared +with_pic +enable_fast_install +enable_libtool_lock +enable_nls +with_help_dir +with_omf_dir +with_help_formats +enable_scrollkeeper +enable_update_databases +with_kde_mime_dir +with_gconf_source +with_gconf_schema_file_dir +enable_schemas_install +with_goffice_plugins_dir +enable_mozilla_plugin +with_mozilla_libdir +' + ac_precious_vars='build_alias host_alias target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -MAINTAINER_MODE_TRUE -MAINTAINER_MODE_FALSE -MAINT -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -GCU_VERSION_INFO CC CFLAGS LDFLAGS +LIBS CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE CXX CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE +CCC CPP -GREP -EGREP -SED -LN_S -ECHO -AR -RANLIB -DLLTOOL -AS -OBJDUMP CXXCPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL PKG_CONFIG -HELP_DIR -OMF_DIR -DOC_USER_FORMATS -ENABLE_SK_TRUE -ENABLE_SK_FALSE -HAVE_GNOME_DOC_UTILS_TRUE -HAVE_GNOME_DOC_UTILS_FALSE -USE_NLS -MSGFMT -MSGFMT_OPTS -GMSGFMT -XGETTEXT -CATALOGS -CATOBJEXT -DATADIRNAME -GMOFILES -INSTOBJEXT -INTLLIBS -PO_IN_DATADIR_TRUE -PO_IN_DATADIR_FALSE -POFILES -POSUB -MKINSTALLDIRS -GETTEXT_PACKAGE -INTLTOOL_DESKTOP_RULE -INTLTOOL_DIRECTORY_RULE -INTLTOOL_KEYS_RULE -INTLTOOL_PROP_RULE -INTLTOOL_OAF_RULE -INTLTOOL_PONG_RULE -INTLTOOL_SERVER_RULE -INTLTOOL_SHEET_RULE -INTLTOOL_SOUNDLIST_RULE -INTLTOOL_UI_RULE -INTLTOOL_XAM_RULE -INTLTOOL_KBD_RULE -INTLTOOL_XML_RULE -INTLTOOL_XML_NOMERGE_RULE -INTLTOOL_CAVES_RULE -INTLTOOL_SCHEMAS_RULE -INTLTOOL_THEME_RULE -INTLTOOL_SERVICE_RULE -INTLTOOL_POLICY_RULE -MSGMERGE -INTLTOOL_EXTRACT -INTLTOOL_MERGE -INTLTOOL_UPDATE -INTLTOOL_PERL -ALL_LINGUAS -OS_WIN32_TRUE -OS_WIN32_FALSE -UPDATE_DESKTOP_DATABASE -UPDATE_MIME_DATABASE -WITH_UPDATE_MIME_TRUE -WITH_UPDATE_MIME_FALSE -WITH_UPDATE_DESKTOP_TRUE -WITH_UPDATE_DESKTOP_FALSE -KDECONFIG -WITH_KDE_MIME_TRUE -WITH_KDE_MIME_FALSE -with_kde_mime_dir -GCU_CFLAGS -GCU_LIBS -MOZILLA_CONFIG -XULRUNNER_CLIENT +shared_mime_info_CFLAGS +shared_mime_info_LIBS +cairo_CFLAGS +cairo_LIBS +gio_CFLAGS +gio_LIBS +gtk_CFLAGS +gtk_LIBS +glade_CFLAGS +glade_LIBS +gnome_canvas_CFLAGS +gnome_canvas_LIBS +gtkglext_CFLAGS +gtkglext_LIBS +xml_CFLAGS +xml_LIBS +gsf_CFLAGS +gsf_LIBS +goffice_CFLAGS +goffice_LIBS +chemical_mime_data_CFLAGS +chemical_mime_data_LIBS +bodr_CFLAGS +bodr_LIBS +openbabel_CFLAGS +openbabel_LIBS +gconf_CFLAGS +gconf_LIBS +gnome_vfs_CFLAGS +gnome_vfs_LIBS +goffice_has_global_header_CFLAGS +goffice_has_global_header_LIBS +need_goffice_with_gnome_CFLAGS +need_goffice_with_gnome_LIBS +OB22_CFLAGS +OB22_LIBS MOZILLA_CFLAGS MOZILLA_LIBS -WITH_MOZILLA_TRUE -WITH_MOZILLA_FALSE -with_mozilla_libdir -GCONFTOOL -GCONF_SCHEMA_CONFIG_SOURCE -GCONF_SCHEMA_FILE_DIR -GCONF_SCHEMAS_INSTALL_TRUE -GCONF_SCHEMAS_INSTALL_FALSE -DOXYGEN -DOXYGEN_AVAILABLE_TRUE -DOXYGEN_AVAILABLE_FALSE XMLLINT -HAVE_XMLLINT_TRUE -HAVE_XMLLINT_FALSE XMLLINT_FLAGS XSLTPROC -HAVE_XSLTPROC_TRUE -HAVE_XSLTPROC_FALSE XSLTPROC_FLAGS MAN -HAVE_MAN_TRUE -HAVE_MAN_FALSE -TESTSSRCDIR -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CXX -CXXFLAGS -CCC -CPP -CXXCPP -F77 -FFLAGS -PKG_CONFIG -GCU_CFLAGS -GCU_LIBS -MOZILLA_CONFIG -XULRUNNER_CLIENT -MOZILLA_CFLAGS -MOZILLA_LIBS -XMLLINT -XMLLINT_FLAGS -XSLTPROC -XSLTPROC_FLAGS -MAN' +GDK_PIXBUF_CSOURCE' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -1102,13 +1185,20 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -1121,13 +1211,20 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1318,22 +1415,36 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1353,25 +1464,25 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1380,23 +1491,36 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1410,7 +1534,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1426,23 +1550,21 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1469,13 +1591,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1501,7 +1621,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gnome-chemistry-utils 0.8.6 to adapt to many kinds of systems. +\`configure' configures gnome-chemistry-utils 0.10.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1523,9 +1643,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1535,25 +1655,26 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/gnome-chemistry-utils] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root + [DATAROOTDIR/doc/gnome-chemistry-utils] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1571,11 +1692,12 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gnome-chemistry-utils 0.8.6:";; + short | recursive ) echo "Configuration of gnome-chemistry-utils 0.10.9:";; esac cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful @@ -1583,29 +1705,30 @@ --enable-static[=PKGS] build static libraries [default=no] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --disable-rpath do not hardcode runtime library paths --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --disable-nls do not use Native Language Support --disable-scrollkeeper do not make updates to the scrollkeeper database --enable-update-databases enable (or disable) the running of the update-desktop-database and update-mime-database utilities (mostly useful for package maintainers) [default=yes] - + --disable-schemas-install + Disable the schemas installation --enable-mozilla-plugin build a Mozilla/Firefox chemistry files viewing plugin [default=auto] - --disable-schemas-install Disable the schemas installation - Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-gnu-ld assume the C compiler uses GNU ld default=no --with-pic try to use only PIC/non-PIC objects [default=use both] - --with-tags[=TAGS] include additional configurations [automatic] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-help-dir=DIR path to help docs --with-omf-dir=DIR path to OMF files --with-help-formats=FORMATS @@ -1613,9 +1736,13 @@ --with-kde-mime-dir path to KDE's directory containing MIME .desktop files (automatically detected via kde-config) [default=auto or ${datadir}/mimelnk] + --with-gconf-source=sourceaddress + Config database for installing schema files. + --with-gconf-schema-file-dir=dir + Directory for installing schema files. + --with-goffice-plugins-dir + path to GOffice plugins directory default=auto --with-mozilla-libdir path to mozilla/firefox/... libdir [default=auto] - --with-gconf-source=sourceaddress Config database for installing schema files. - --with-gconf-schema-file-dir=dir Directory for installing schema files. Some influential environment variables: CC C compiler command @@ -1629,18 +1756,67 @@ CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility - GCU_CFLAGS C compiler flags for GCU, overriding pkg-config - GCU_LIBS linker flags for GCU, overriding pkg-config - MOZILLA_CONFIG - The 'mozilla-config' binary with path. Use it to define or - override the location of 'mozilla-config'. - XULRUNNER_CLIENT - Set to xulrunner or a compliant browser. The script will - automatically test for xulrunner seamonkey firefox and mozilla. - You can also use this veriable to override the detection. + shared_mime_info_CFLAGS + C compiler flags for shared_mime_info, overriding pkg-config + shared_mime_info_LIBS + linker flags for shared_mime_info, overriding pkg-config + cairo_CFLAGS + C compiler flags for cairo, overriding pkg-config + cairo_LIBS linker flags for cairo, overriding pkg-config + gio_CFLAGS C compiler flags for gio, overriding pkg-config + gio_LIBS linker flags for gio, overriding pkg-config + gtk_CFLAGS C compiler flags for gtk, overriding pkg-config + gtk_LIBS linker flags for gtk, overriding pkg-config + glade_CFLAGS + C compiler flags for glade, overriding pkg-config + glade_LIBS linker flags for glade, overriding pkg-config + gnome_canvas_CFLAGS + C compiler flags for gnome_canvas, overriding pkg-config + gnome_canvas_LIBS + linker flags for gnome_canvas, overriding pkg-config + gtkglext_CFLAGS + C compiler flags for gtkglext, overriding pkg-config + gtkglext_LIBS + linker flags for gtkglext, overriding pkg-config + xml_CFLAGS C compiler flags for xml, overriding pkg-config + xml_LIBS linker flags for xml, overriding pkg-config + gsf_CFLAGS C compiler flags for gsf, overriding pkg-config + gsf_LIBS linker flags for gsf, overriding pkg-config + goffice_CFLAGS + C compiler flags for goffice, overriding pkg-config + goffice_LIBS + linker flags for goffice, overriding pkg-config + chemical_mime_data_CFLAGS + C compiler flags for chemical_mime_data, overriding pkg-config + chemical_mime_data_LIBS + linker flags for chemical_mime_data, overriding pkg-config + bodr_CFLAGS C compiler flags for bodr, overriding pkg-config + bodr_LIBS linker flags for bodr, overriding pkg-config + openbabel_CFLAGS + C compiler flags for openbabel, overriding pkg-config + openbabel_LIBS + linker flags for openbabel, overriding pkg-config + gconf_CFLAGS + C compiler flags for gconf, overriding pkg-config + gconf_LIBS linker flags for gconf, overriding pkg-config + gnome_vfs_CFLAGS + C compiler flags for gnome_vfs, overriding pkg-config + gnome_vfs_LIBS + linker flags for gnome_vfs, overriding pkg-config + goffice_has_global_header_CFLAGS + C compiler flags for goffice_has_global_header, overriding + pkg-config + goffice_has_global_header_LIBS + linker flags for goffice_has_global_header, overriding + pkg-config + need_goffice_with_gnome_CFLAGS + C compiler flags for need_goffice_with_gnome, overriding + pkg-config + need_goffice_with_gnome_LIBS + linker flags for need_goffice_with_gnome, overriding pkg-config + OB22_CFLAGS C compiler flags for OB22, overriding pkg-config + OB22_LIBS linker flags for OB22, overriding pkg-config MOZILLA_CFLAGS C compiler flags for MOZILLA, overriding pkg-config MOZILLA_LIBS @@ -1657,6 +1833,8 @@ e.g. `--nonet'. MAN The `man' binary with path. Use it to define or override the location of `man'. + GDK_PIXBUF_CSOURCE + The gdk-pixbuf-csource executable. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1669,15 +1847,17 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1713,7 +1893,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1722,82 +1902,560 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gnome-chemistry-utils configure 0.8.6 -generated by GNU Autoconf 2.61 +gnome-chemistry-utils configure 0.10.9 +generated by GNU Autoconf 2.64 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -It was created by gnome-chemistry-utils $as_me 0.8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval - $ $0 $@ +} # ac_fn_c_try_compile -_ACEOF -exec 5>>config.log +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +} # ac_fn_cxx_try_compile -_ASUNAME +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -} >&5 +} # ac_fn_c_try_cpp -cat >&5 <<_ACEOF +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 -## ----------- ## -## Core tests. ## -## ----------- ## +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -_ACEOF +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $2 -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_cxx_try_link + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( cat <<\_ASBOX +## ---------------------------------------------------------------- ## +## Report this to http://savannah.nongnu.org/bugs/?group=gchemutils ## +## ---------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by gnome-chemistry-utils $as_me 0.10.9, which was +generated by GNU Autoconf 2.64. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg @@ -1808,12 +2466,12 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1829,13 +2487,13 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1860,12 +2518,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1894,9 +2553,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1911,9 +2570,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1929,64 +2588,69 @@ echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1996,16 +2660,16 @@ # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -2019,68 +2683,56 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - - - - - - - - + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2090,28 +2742,20 @@ -am__api_version='1.10' +am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2136,22 +2780,23 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2169,17 +2814,29 @@ # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac -done + + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -2192,8 +2849,8 @@ INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2203,21 +2860,34 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ @@ -2227,11 +2897,8 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -2240,83 +2907,193 @@ # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done IFS=$as_save_IFS fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; @@ -2326,10 +3103,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2339,36 +3116,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -2385,12 +3163,12 @@ rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2409,9 +3187,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2427,7 +3203,7 @@ # Define the identity of the package. PACKAGE='gnome-chemistry-utils' - VERSION='0.8.6' + VERSION='0.10.9' cat >>confdefs.h <<_ACEOF @@ -2455,112 +3231,6 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. @@ -2573,17 +3243,18 @@ -{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi - { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -2597,35 +3268,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2641,28 +3304,24 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2679,19 +3338,18 @@ +GCU_VERSION=$VERSION + ac_config_headers="$ac_config_headers config.h" -GCU_VERSION=$VERSION -GCU_VERSION_INFO=`echo $GCU_VERSION | awk -F . '{ print $1+$2":"$3":"$2 }'` -################################################## -# init -################################################## + + # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -2716,6 +3374,12 @@ + + + + + + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -2724,44 +3388,44 @@ am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -2786,10 +3450,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2799,25 +3463,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2826,10 +3490,10 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2839,25 +3503,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2865,12 +3529,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2883,10 +3543,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2896,25 +3556,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2923,10 +3583,10 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2937,18 +3597,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2967,11 +3627,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2982,10 +3642,10 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2995,25 +3655,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3026,10 +3686,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3039,25 +3699,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3069,12 +3729,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3084,98 +3740,82 @@ fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3185,14 +3825,14 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3211,78 +3851,75 @@ else ac_file='' fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then : + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } fi - ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3290,37 +3927,31 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3332,51 +3963,46 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3390,54 +4016,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3448,34 +4054,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3486,35 +4069,12 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3525,42 +4085,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3576,18 +4112,14 @@ CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3644,31 +4176,9 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3679,17 +4189,19 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3699,10 +4211,10 @@ depcc="$CC" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3727,6 +4239,11 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3744,7 +4261,17 @@ done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -3754,19 +4281,23 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3790,8 +4321,8 @@ fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -3806,17 +4337,13 @@ -{ echo "$as_me:$LINENO: checking for library containing strerror" >&5 -echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; } -if test "${ac_cv_search_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 +$as_echo_n "checking for library containing strerror... " >&6; } +if test "${ac_cv_search_strerror+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -3841,471 +4368,229 @@ ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_strerror+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_strerror+set}" = set; then : break fi done -if test "${ac_cv_search_strerror+set}" = set; then - : +if test "${ac_cv_search_strerror+set}" = set; then : + else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 -echo "${ECHO_T}$ac_cv_search_strerror" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 +$as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CXX" && break + done fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_ct_CC" = x; then - CC="" + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CC=$ac_ct_CC + CXX=$ac_ct_CXX fi -else - CC="$ac_cv_prog_CC" fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } done -done -IFS=$as_save_IFS -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ +#ifndef __GNUC__ + choke me +#endif - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi + ac_compiler_gnu=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + GXX= fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4316,73 +4601,12 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ +if ac_fn_cxx_try_compile "$LINENO"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4393,184 +4617,45 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" else - CFLAGS="-g" + CXXFLAGS="-g" fi else - if test "$GCC" = yes; then - CFLAGS="-O2" + if test "$GXX" = yes; then + CXXFLAGS="-O2" else - CFLAGS= + CXXFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +depcc="$CXX" am_compiler_list= -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -4591,10 +4676,15 @@ # directory. mkdir sub - am_cv_CC_dependencies_compiler_type=none + am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4612,7 +4702,17 @@ done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -4622,19 +4722,23 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4645,7 +4749,7 @@ # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode + am_cv_CXX_dependencies_compiler_type=$depmode break fi fi @@ -4654,246 +4758,304 @@ cd .. rm -rf conftest.dir else - am_cv_CC_dependencies_compiler_type=none + am_cv_CXX_dependencies_compiler_type=none fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi + done + ac_cv_prog_CPP=$CPP - test -n "$CXX" && break - done fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. + CPP=$ac_cv_prog_CPP else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext - test -n "$ac_ct_CXX" && break done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -int -main () -{ -#ifndef __GNUC__ - choke me -#endif + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_path_EGREP=$EGREP +fi - ac_compiler_gnu=no + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include int main () @@ -4903,522 +5065,314 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -int -main () -{ - - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { - - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +if ac_fn_c_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -depcc="$CXX" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub + with_gnu_ld=no +fi - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 +$as_echo_n "checking for ld used by GCC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac fi done - - cd .. - rm -rf conftest.dir + IFS="$ac_save_ifs" else - am_cv_CXX_dependencies_compiler_type=none + acl_cv_path_LD="$LD" # Let the user override the test with a path. fi - fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if test "${acl_cv_rpath+set}" = set; then : + $as_echo_n "(cached) " >&6 +else - done - ac_cv_prog_CPP=$CPP + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done fi - CPP=$ac_cv_prog_CPP +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : else - ac_cv_prog_CPP=$CPP + enable_rpath=yes fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +macro_version='2.2.6' +macro_revision='1.3012' - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in *GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break @@ -5426,81 +5380,78 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_SED_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - + if test -z "$ac_cv_path_SED"; then + as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED fi -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + -else - ac_cv_path_GREP=$GREP -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in *GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break @@ -5508,368 +5459,93 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_FGREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_FGREP"; then + as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - ac_cv_path_EGREP=$EGREP + ac_cv_path_FGREP=$FGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include +test -z "$GREP" && GREP=grep -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF -fi +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - IFS="$lt_save_ifs" + test -z "$LD" && LD="$ac_prog" ;; - esac + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - enable_shared=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi - - -# Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done - -fi - -SED=$lt_cv_path_SED - -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${lt_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR @@ -5899,19 +5575,17 @@ LD="$lt_cv_path_LD" if test -n "$LD"; then - { echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. @@ -5999,639 +5655,394 @@ done IFS="$lt_save_ifs" done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + : ${lt_cv_path_NM=no} fi fi -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -NM="$lt_cv_path_NM" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -beos*) - lt_cv_deplibs_check_method=pass_all - ;; +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; + test -n "$ac_ct_DUMPBIN" && break +done -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN fi - ;; +fi -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" fi - ;; +fi +test -z "$NM" && NM=nm -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:5786: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:5789: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:5792: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" fi - ;; + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; - ncr) - lt_cv_deplibs_check_method=pass_all + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 ;; - siemens) - lt_cv_deplibs_check_method=pass_all + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi ;; - pc) - lt_cv_deplibs_check_method=pass_all + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac +fi +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown +max_cmd_len=$lt_cv_sys_max_cmd_len -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 6255 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' ;; +esac -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-cygwin* | *-*-mingw* | *-*-pw32*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 -echo "${ECHO_T}$DLLTOOL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 -echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AS="${ac_tool_prefix}as" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { echo "$as_me:$LINENO: result: $AS" >&5 -echo "${ECHO_T}$AS" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AS="as" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 -echo "${ECHO_T}$ac_ct_AS" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - if test -n "$ac_tool_prefix"; then +if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. @@ -6641,25 +6052,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -echo "${ECHO_T}$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6668,10 +6079,10 @@ ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. @@ -6681,25 +6092,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6707,12 +6118,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6721,854 +6128,597 @@ OBJDUMP="$ac_cv_prog_OBJDUMP" fi - ;; +test -z "$OBJDUMP" && OBJDUMP=objdump -esac -need_locks="$enable_libtool_lock" -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; +beos*) + lt_cv_deplibs_check_method=pass_all + ;; +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; - eval "$as_ac_Header=no" -fi +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; -fi +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; -done +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; - ac_header_compiler=no -fi +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; - ac_header_preproc=no -fi +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------------------------------------- ## -## Report this to http://savannah.nongnu.org/bugs/?group=gchemutils ## -## ---------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown -fi -done -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - done - ac_cv_prog_CXXCPP=$CXXCPP +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - # Passes both tests. -ac_preproc_ok=: -break +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + AR="$ac_cv_prog_AR" fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + -fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - test -n "$F77" && break - done fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - F77=$ac_ct_F77 + STRIP=$ac_ct_STRIP fi +else + STRIP="$ac_cv_prog_STRIP" fi +test -z "$STRIP" && STRIP=: -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu -fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_cv_prog_f77_g=no +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" else - FFLAGS= + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB fi +else + RANLIB="$ac_cv_prog_RANLIB" fi -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +test -z "$RANLIB" && RANLIB=: -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac - + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + # Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : + $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. @@ -7580,33 +6730,18 @@ # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; -hpux*) # Its linker distinguishes data from code symbols +hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' @@ -7631,57 +6766,85 @@ ;; esac +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, then with it. +# Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* - cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; -void nm_test_func(){} +void nm_test_func(void); +void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} -EOF +_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7690,53 +6853,55 @@ fi # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif -EOF +_LT_EOF # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif + cat <<_LT_EOF >> conftest.$ac_ext -/* The mapping between symbol names and symbols. */ +/* The mapping between symbol names and symbols. */ const struct { const char *name; - lt_ptr_t address; + void *address; } -lt_preloaded_symbols[] = +lt__PROGRAM__LTX_preloaded_symbols[] = { -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} }; +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + #ifdef __cplusplus } #endif -EOF +_LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -7754,7 +6919,7 @@ echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f conftest* conftst* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then @@ -7770,6172 +6935,3679 @@ lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -# Constants: -rm="rm -f" -# Global variables: -default_ofile=libtool -can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 6997 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - RANLIB=$ac_ct_RANLIB + DSYMUTIL=$ac_ct_DSYMUTIL fi else - RANLIB="$ac_cv_prog_RANLIB" + DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - STRIP=$ac_ct_STRIP + NMEDIT=$ac_ct_NMEDIT fi else - STRIP="$ac_cv_prog_STRIP" + NMEDIT="$ac_cv_prog_NMEDIT" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - + done +IFS=$as_save_IFS -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" else - MAGIC_CMD=: + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL fi +else + OTOOL="$ac_cv_prog_OTOOL" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ;; -esac - -enable_dlopen=no -enable_win32_dll=yes +done + done +IFS=$as_save_IFS -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - pic_mode=default + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -z "$pic_mode" && pic_mode=default + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Source file extension for C test sources. -ac_ext=c -# Object file extension for compiled C test sources. -objext=o -objext=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8410: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8414: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi -fi -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; +int +main () +{ - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +fi - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; +done - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - rdos*) - lt_prog_compiler_static='-non_shared' - ;; +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; +fi - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; +done - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - *) - lt_prog_compiler_can_build_shared=no - ;; - esac + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - lt_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8700: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8704: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works=yes - fi - fi - $rm conftest* - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } -if test x"$lt_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi fi + fi fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes - fi - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu -if test x"$lt_prog_compiler_static_works" = xyes; then - : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes else - lt_prog_compiler_static= + GXX= fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8804: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8808: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* +int +main () +{ -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" fi else - need_locks=no + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +depcc="$CXX" am_compiler_list= - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type -EOF - fi - ;; + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; + done + ac_cv_prog_CXXCPP=$CXXCPP - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - link_all_deplibs=no - else - ld_shlibs=no - fi - ;; +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +_lt_caught_CXX_error=yes; } +fi -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 +else + _lt_caught_CXX_error=yes +fi -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" ;; esac +else + enable_shared=yes +fi - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; pic_mode="$withval" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + pic_mode=default fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +test -z "$pic_mode" && pic_mode=default -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes fi - fi + done + IFS="$lt_save_ifs" ;; + esac +else + enable_fast_install=yes +fi - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - *) - ld_shlibs=no - ;; - esac - fi -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test -z "$LN_S" && LN_S="ln -s" -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then : + $as_echo_n "(cached) " >&6 else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs fi -need_lib_prefix=unknown -hardcode_into_libs=no +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -freebsd1*) - dynamic_linker=no - ;; -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi ;; +esac -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +# Global variables: +ofile=libtool +can_build_shared=yes -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +with_gnu_ld="$lt_cv_prog_gnu_ld" -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +old_CC="$CC" +old_CFLAGS="$CFLAGS" -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; -rdos*) - dynamic_linker=no +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" ;; +esac +fi -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; *) - dynamic_linker=no + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +fi -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate + MAGIC_CMD=: fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi + fi + ;; +esac -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -fi +# Use C for the default configuration in the libtool script -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; +# Source file extension for C test sources. +ac_ext=c - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; +# Object file extension for compiled C test sources. +objext=o +objext=$objext - darwin*) - # if libdl is installed we need to link against it - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes -fi - ;; - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} -#ifdef __STDC__ -# include -#else -# include -#endif +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -#undef shl_load +# Allow CC to be a program name with arguments. +compiler=$CC -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* - ac_cv_func_shl_load=no -fi +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8770: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8774: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* - ac_cv_lib_dld_shl_load=no fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen + : +fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +fi -#ifdef __STDC__ -# include -#else -# include -#endif -#undef dlopen -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - ac_cv_lib_dl_dlopen=no -fi + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; - ac_cv_lib_dld_dld_link=no -fi + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; -fi + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; -fi + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; -fi + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; -fi + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; -fi + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; - ;; - esac + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + rdos*) + lt_prog_compiler_static='-non_shared' + ;; - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; -#include + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + *) + lt_prog_compiler_can_build_shared=no + ;; esac - else : - # compilation failed - lt_cv_dlopen_self=no fi -fi -rm -fr conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif -#include -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:9109: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:9113: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi fi -rm -fr conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } - fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi -# Report which library types will actually be built -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && enable_shared=no -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - fix_srcfile_path \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - cat <<__EOF__ >> "$cfgfile" -#! $SHELL + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:9214: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:9218: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* -# The names of the tagged configurations supported by this script. -available_tags= +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } -# ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:9269: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:9273: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os -# An echo program that does not interpret backslashes. -echo=$lt_echo -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi -# A C compiler. -LTCC=$lt_LTCC -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS -# A language-specific compiler. -CC=$lt_compiler -# Is the compiler the GNU C compiler? -with_gcc=$GCC -# An ERE matcher. -EGREP=$lt_EGREP -# The linker used to build libraries. -LD=$lt_LD + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } -# Whether we need hard or soft links. -LN_S=$lt_LN_S + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= -# A BSD-compatible nm program. -NM=$lt_NM + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu) + link_all_deplibs=no + ;; + esac -# A symbol stripping program -STRIP=$lt_STRIP + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. -# Used on cygwin: assembler. -AS="$AS" +_LT_EOF + fi + ;; -# The name of the directory that contains temporary libtool files. -objdir=$objdir + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -# Object file suffix (normally "o"). -objext="$ac_objext" + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; -# Executable file suffix (normally ""). -exeext="$exeext" + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; -# Must we lock files when doing compilation? -need_locks=$lt_need_locks + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -# Do we need a version for libraries? -need_version=$need_version +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; -# Whether dlopen is supported. -dlopen_support=$enable_dlopen + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac -# Library versioning type. -version_type=$version_type + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -# Format of library name prefix. -libname_spec=$lt_libname_spec + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds +int +main () +{ -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects +int +main () +{ -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag + darwin* | rhapsody*) -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval + else + ld_shlibs=no + fi -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + ;; -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + freebsd1*) + ld_shlibs=no + ;; -# This is the shared library runtime path variable. -runpath_var=$runpath_var + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -# This is the shared library path variable. -shlibpath_var=$shlibpath_var + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo(void) {} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs + *nto* | *qnx*) + ;; -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; -# ### END LIBTOOL CONFIG + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; -__EOF__ + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi fi -fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= -# Source file extension for C++ test sources. -ac_ext=cpp -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }' -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi -if test "$GXX" = yes; then - # Set up default GNU C++ configuration -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -else - GXX=no - with_gnu_ld=no - wlarc= -fi -# PORTME: fill in a description of your system's C++ link characteristics -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - case $host_cpu in - hppa*64*|ia64*) ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - ld_shlibs_CXX=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - output_verbose_link_cmd='echo' - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no -GCC_CXX="$GXX" -LD_CXX="$LD" -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - for p in `eval $output_verbose_link_cmd`; do - case $p in - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - *) ;; # Ignore the rest. - esac - done - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi -$rm -f confest.$objext -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13686: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13690: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13790: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13794: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi library_names_spec= libname_spec='lib$name' soname_spec= @@ -13949,7 +10621,6 @@ version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" - need_lib_prefix=unknown hardcode_into_libs=no @@ -13967,7 +10638,7 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -13986,7 +10657,7 @@ aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no @@ -14012,9 +10683,18 @@ ;; amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac ;; beos*) @@ -14037,25 +10717,28 @@ # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ - $rm \$dlpath' + $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -14064,20 +10747,20 @@ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -14101,12 +10784,13 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -14199,18 +10883,18 @@ fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH @@ -14287,6 +10971,32 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. @@ -14294,7 +11004,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -14323,7 +11033,7 @@ version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' @@ -14344,14 +11054,16 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx*) - version_type=linux +*nto* | *qnx*) + version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; openbsd*) @@ -14360,13 +11072,13 @@ need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no @@ -14438,7 +11150,6 @@ sni) shlibpath_overrides_runpath=no need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -14469,13 +11180,12 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -14485,6 +11195,17 @@ sys_lib_dlsearch_path_spec='/usr/lib' ;; +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -14496,8 +11217,8 @@ dynamic_linker=no ;; esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -14505,1454 +11226,1124 @@ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac -cfgfile="$ofile" - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os -# An echo program that does not interpret backslashes. -echo=$lt_echo -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS -# A C compiler. -LTCC=$lt_LTCC -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS -# A language-specific compiler. -CC=$lt_compiler_CXX -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX -# An ERE matcher. -EGREP=$lt_EGREP -# The linker used to build libraries. -LD=$lt_LD_CXX -# Whether we need hard or soft links. -LN_S=$lt_LN_S -# A BSD-compatible nm program. -NM=$lt_NM -# A symbol stripping program -STRIP=$lt_STRIP -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" -# Used on cygwin: assembler. -AS="$AS" -# The name of the directory that contains temporary libtool files. -objdir=$objdir -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX -# Object file suffix (normally "o"). -objext="$ac_objext" -# Old archive suffix (normally "a"). -libext="$libext" -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' -# Executable file suffix (normally ""). -exeext="$exeext" -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX -# Must we lock files when doing compilation? -need_locks=$lt_need_locks -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix -# Do we need a version for libraries? -need_version=$need_version -# Whether dlopen is supported. -dlopen_support=$enable_dlopen -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX -# Library versioning type. -version_type=$version_type -# Format of library name prefix. -libname_spec=$lt_libname_spec -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -# This is the shared library runtime path variable. -runpath_var=$runpath_var -# This is the shared library path variable. -shlibpath_var=$shlibpath_var -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; -# ### END LIBTOOL TAG CONFIG: $tagname + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; -__EOF__ + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi + ac_cv_lib_dl_dlopen=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" +fi -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" + ;; -# ltmain only uses $CC for tagged configurations so make sure $CC is set. + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +fi -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +fi -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && enable_shared=no +fi -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= +fi -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' +fi - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; + ;; + esac - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11652 "configure" +#include "confdefs.h" - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; +#if HAVE_DLFCN_H +#include +#endif - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; +#include - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - esac - ;; - esac - ;; + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11748 "configure" +#include "confdefs.h" - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +#if HAVE_DLFCN_H +#include +#endif - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +#include - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); - *) - lt_prog_compiler_can_build_shared_F77=no - ;; + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac + else : + # compilation failed + lt_cv_dlopen_self_static=no fi +fi +rm -fr conftest* -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15367: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15371: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac fi -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15471: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15475: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; esac +fi - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. -EOF - fi - ;; - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - link_all_deplibs_F77=no - else - ld_shlibs_F77=no - fi - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no +CC="$lt_save_CC" - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes +# Source file extension for C++ test sources. +ac_ext=cpp - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null then - # We have reworked collect2 - : + # We have reworked collect2 + : else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else + esac + shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' + shared_flag="$shared_flag "'${wl}-G' fi - fi - fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ - end + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -15966,49 +12357,34 @@ if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ - end + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -16022,6684 +12398,6420 @@ if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no fi - fi - ;; + ;; - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi - ;; - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; + else + ld_shlibs_CXX=no + fi - freebsd1*) - ld_shlibs_F77=no - ;; + ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; + gnu*) + ;; - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_F77=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi ;; - esac - link_all_deplibs_F77=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? + vxworks*) ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + *) + lt_prog_compiler_can_build_shared_CXX=no ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; + esac + fi - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13704: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13708: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +fi - *) - ld_shlibs_F77=no - ;; - esac - fi -{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no # -# Do we need to explicitly link libc? +# Check to make sure the static flag actually works. # -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" -need_lib_prefix=unknown -hardcode_into_libs=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13803: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13807: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13855: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13859: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -freebsd1*) - dynamic_linker=no - ;; -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes + cygwin* | mingw* | cegcc*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; + esac + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +with_gnu_ld_CXX=$with_gnu_ld - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 +$as_echo "$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi ;; +esac -rdos*) - dynamic_linker=no - ;; -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6; } -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - fix_srcfile_path_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac -cfgfile="$ofile" - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os -# An echo program that does not interpret backslashes. -echo=$lt_echo -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS -# A C compiler. -LTCC=$lt_LTCC -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS -# A language-specific compiler. -CC=$lt_compiler_F77 -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 -# An ERE matcher. -EGREP=$lt_EGREP -# The linker used to build libraries. -LD=$lt_LD_F77 -# Whether we need hard or soft links. -LN_S=$lt_LN_S -# A BSD-compatible nm program. -NM=$lt_NM -# A symbol stripping program -STRIP=$lt_STRIP -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" -# Used on cygwin: assembler. -AS="$AS" -# The name of the directory that contains temporary libtool files. -objdir=$objdir -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 -# Object file suffix (normally "o"). -objext="$ac_objext" -# Old archive suffix (normally "a"). -libext="$libext" -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' -# Executable file suffix (normally ""). -exeext="$exeext" -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 -# Must we lock files when doing compilation? -need_locks=$lt_need_locks -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix -# Do we need a version for libraries? -need_version=$need_version -# Whether dlopen is supported. -dlopen_support=$enable_dlopen -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 -# Library versioning type. -version_type=$version_type -# Format of library name prefix. -libname_spec=$lt_libname_spec + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval +freebsd1*) + dynamic_linker=no + ;; -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; -# This is the shared library runtime path variable. -runpath_var=$runpath_var +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -# This is the shared library path variable. -shlibpath_var=$shlibpath_var +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs +int +main () +{ -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 +rdos*) + dynamic_linker=no + ;; -# ### END LIBTOOL TAG CONFIG: $tagname +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; -__EOF__ +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH fi -fi + ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -CC="$lt_save_CC" +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - else - tagname="" - fi - ;; +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi -# Source file extension for Java test sources. -ac_ext=java -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no -old_archive_cmds_GCJ=$old_archive_cmds -lt_prog_compiler_no_builtin_flag_GCJ= -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17671: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17675: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi -fi -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='' - ;; - esac - ;; - esac - ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - rdos*) - lt_prog_compiler_static_GCJ='-non_shared' - ;; - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; + fi # test -n "$compiler" - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17961: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17965: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi + ac_config_commands="$ac_config_commands libtool" -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18065: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:18069: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* + +# Only expand once: + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn + +# dolt, a replacement for libtool +# Josh Triplett +# Extract the first word of "bash", so it can be a program name with args. +set dummy bash; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DOLT_BASH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DOLT_BASH in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOLT_BASH="$DOLT_BASH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DOLT_BASH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOLT_BASH=$ac_cv_path_DOLT_BASH +if test -n "$DOLT_BASH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOLT_BASH" >&5 +$as_echo "$DOLT_BASH" >&6; } else - need_locks=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dolt supports this host" >&5 +$as_echo_n "checking if dolt supports this host... " >&6; } +dolt_supported=yes +if test x$DOLT_BASH = x; then + dolt_supported=no +fi +if test x$GCC != xyes; then + dolt_supported=no +fi +case $host in +i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*) ;; +amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) ;; +*) dolt_supported=no ;; +esac +if test x$dolt_supported = xno ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, falling back to libtool" >&5 +$as_echo "no, falling back to libtool" >&6; } + LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)' + LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)' +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, replacing libtool" >&5 +$as_echo "yes, replacing libtool" >&6; } + + cat <<__DOLTCOMPILE__EOF__ >doltcompile +#!$DOLT_BASH +__DOLTCOMPILE__EOF__ + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +args=("$@") +for ((arg=0; arg<${#args[@]}; arg++)) ; do + if test x"${args[$arg]}" = x-o ; then + objarg=$((arg+1)) + break + fi done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +if test x$objarg = x ; then + echo 'Error: no -o on compiler command line' 1>&2 + exit 1 +fi +lo="${args[$objarg]}" +obj="${lo%.lo}" +if test x"$lo" = x"$obj" ; then + echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 + exit 1 +fi +objbase="${obj##*/}" +__DOLTCOMPILE__EOF__ + + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +libobjdir="${obj%$objbase}.libs" +if test ! -d "$libobjdir" ; then + mkdir_out="$(mkdir "$libobjdir" 2>&1)" + mkdir_ret=$? + if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then + echo "$mkdir_out" 1>&2 + exit $mkdir_ret + fi +fi +pic_object="$libobjdir/$objbase.o" +args[$objarg]="$pic_object" +"${args[@]}" -fPIC -DPIC || exit $? +__DOLTCOMPILE__EOF__ + fi - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +non_pic_object="$obj.o" +args[$objarg]="$non_pic_object" +__DOLTCOMPILE__EOF__ + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args[@]}" >/dev/null 2>&1 || exit $? +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args[@]}" || exit $? +__DOLTCOMPILE__EOF__ + fi fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +{ +echo "# $lo - a libtool object file" +echo "# Generated by doltcompile, not libtool" +__DOLTCOMPILE__EOF__ + + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "pic_object='$pic_object'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo pic_object=none +__DOLTCOMPILE__EOF__ + fi - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "non_pic_object='$non_pic_object'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo non_pic_object=none +__DOLTCOMPILE__EOF__ fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +} > "$lo" +__DOLTCOMPILE__EOF__ -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. + chmod +x doltcompile + LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' + LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' +fi -EOF - fi - ;; - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; +# end dolt - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + +case "$am__api_version" in + 1.01234) + as_fn_error "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 + ;; + *) + ;; +esac + +if test -n "0.37.1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.37.1" >&5 +$as_echo_n "checking for intltool >= 0.37.1... " >&6; } + + INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.37.1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` + INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 +$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + as_fn_error "Your intltool is too old. You need intltool 0.37.1 or later." "$LINENO" 5 +fi + +# Extract the first word of "intltool-update", so it can be a program name with args. +set dummy intltool-update; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_UPDATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE +if test -n "$INTLTOOL_UPDATE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 +$as_echo "$INTLTOOL_UPDATE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "intltool-merge", so it can be a program name with args. +set dummy intltool-merge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_MERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - interix[3-9]*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; + ;; +esac +fi +INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE +if test -n "$INTLTOOL_MERGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 +$as_echo "$INTLTOOL_MERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - link_all_deplibs_GCJ=no - else - ld_shlibs_GCJ=no - fi - ;; +# Extract the first word of "intltool-extract", so it can be a program name with args. +set dummy intltool-extract; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_EXTRACT in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; + ;; +esac +fi +INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT +if test -n "$INTLTOOL_EXTRACT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 +$as_echo "$INTLTOOL_EXTRACT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + as_fn_error "The intltool scripts were not found. Please install intltool." "$LINENO" 5 +fi + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - freebsd1*) - ld_shlibs_GCJ=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_GCJ=no - fi - ;; - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_GCJ=yes - ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi -{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -freebsd1*) - dynamic_linker=no - ;; -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' + + + + + + + + + +# Check the gettext tools to make sure they are GNU +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $XGETTEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes ;; +esac +fi +XGETTEXT=$ac_cv_path_XGETTEXT +if test -n "$XGETTEXT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGMERGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MSGMERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no ;; +esac +fi +MSGMERGE=$ac_cv_path_MSGMERGE +if test -n "$MSGMERGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' ;; +esac +fi +MSGFMT=$ac_cv_path_MSGFMT +if test -n "$MSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes + +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + as_fn_error "GNU gettext tools not found; required for intltool" "$LINENO" 5 +fi +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then + as_fn_error "GNU gettext tools not found; required for intltool" "$LINENO" 5 +fi + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes ;; +esac +fi +INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL +if test -n "$INTLTOOL_PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5 +$as_echo "$INTLTOOL_PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$INTLTOOL_PERL"; then + as_fn_error "perl not found" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5 +$as_echo_n "checking for perl >= 5.8.1... " >&6; } +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + as_fn_error "perl 5.8.1 is required for intltool" "$LINENO" 5 +else + IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 +$as_echo "$IT_PERL_VERSION" >&6; } +fi +if test "x" != "xno-xml"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 +$as_echo_n "checking for XML::Parser... " >&6; } + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + else + as_fn_error "XML::Parser perl module is required for intltool" "$LINENO" 5 + fi +fi + +# Substitute ALL_LINGUAS so we can use it in po/Makefile + + +# Set DATADIRNAME correctly if it is not set yet +# (copied from glib-gettext.m4) +if test -z "$DATADIRNAME"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + DATADIRNAME=share +else + case $host in + *-*-solaris*) + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : + DATADIRNAME=share +else + DATADIRNAME=lib +fi -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + ;; + *) + DATADIRNAME=lib + ;; + esac +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; -rdos*) - dynamic_linker=no - ;; -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ;; +done + done +IFS=$as_save_IFS -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -*) - dynamic_linker=no ;; esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG fi else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi -{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6; } -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - fix_srcfile_path_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" +gdu_cv_version_required=0.3.2 - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking gnome-doc-utils >= $gdu_cv_version_required" >&5 +$as_echo_n "checking gnome-doc-utils >= $gdu_cv_version_required... " >&6; } +if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-doc-utils >= \$gdu_cv_version_required\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gnome-doc-utils >= $gdu_cv_version_required") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + gdu_cv_have_gdu=yes +else + gdu_cv_have_gdu=no +fi -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +if test "$gdu_cv_have_gdu" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error "gnome-doc-utils >= $gdu_cv_version_required not found" "$LINENO" 5 +fi -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static +# Check whether --with-help-dir was given. +if test "${with_help_dir+set}" = set; then : + withval=$with_help_dir; +else + with_help_dir='${datadir}/gnome/help' +fi -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ +HELP_DIR="$with_help_dir" -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os +# Check whether --with-omf-dir was given. +if test "${with_omf_dir+set}" = set; then : + withval=$with_omf_dir; +else + with_omf_dir='${datadir}/omf' +fi -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os +OMF_DIR="$with_omf_dir" -# An echo program that does not interpret backslashes. -echo=$lt_echo -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS -# A C compiler. -LTCC=$lt_LTCC +# Check whether --with-help-formats was given. +if test "${with_help_formats+set}" = set; then : + withval=$with_help_formats; +else + with_help_formats='' +fi -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS +DOC_USER_FORMATS="$with_help_formats" -# A language-specific compiler. -CC=$lt_compiler_GCJ -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ +# Check whether --enable-scrollkeeper was given. +if test "${enable_scrollkeeper+set}" = set; then : + enableval=$enable_scrollkeeper; +else + enable_scrollkeeper=yes +fi -# An ERE matcher. -EGREP=$lt_EGREP + if test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"; then + ENABLE_SK_TRUE= + ENABLE_SK_FALSE='#' +else + ENABLE_SK_TRUE='#' + ENABLE_SK_FALSE= +fi -# The linker used to build libraries. -LD=$lt_LD_GCJ -# Whether we need hard or soft links. -LN_S=$lt_LN_S +DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS" -# A BSD-compatible nm program. -NM=$lt_NM -# A symbol stripping program -STRIP=$lt_STRIP + if test "$gdu_cv_have_gdu" = "yes"; then + HAVE_GNOME_DOC_UTILS_TRUE= + HAVE_GNOME_DOC_UTILS_FALSE='#' +else + HAVE_GNOME_DOC_UTILS_TRUE='#' + HAVE_GNOME_DOC_UTILS_FALSE= +fi -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" -# Used on cygwin: assembler. -AS="$AS" +GCU_VERSION_INFO=`echo $GCU_VERSION | awk -F . '{ print $1+$2":"$3":"$2 }'` -# The name of the directory that contains temporary libtool files. -objdir=$objdir -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +GCU_MAJOR_VERSION=`echo $GCU_VERSION | awk -F . '{ print $1}'` +GCU_MINOR_VERSION=`echo $GCU_VERSION | awk -F . '{ print $2}'` +GCU_MICRO_VERSION=`echo $GCU_VERSION | awk -F . '{ print $3}'` +let GCU_API_MINOR_VERSION=($GCU_MINOR_VERSION+1)/2*2 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ +GCU_API_VER="$GCU_MAJOR_VERSION.$GCU_API_MINOR_VERSION" -# Object file suffix (normally "o"). -objext="$ac_objext" -# Old archive suffix (normally "a"). -libext="$libext" +cat >>confdefs.h <<_ACEOF +#define API_VERSION "$GCU_API_VER" +_ACEOF -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' -# Executable file suffix (normally ""). -exeext="$exeext" +if test "$GCU_API_MINOR_VERSION" = "$GCU_MINOR_VERSION" -o $GCU_MICRO_VERSION -ge 90; then + gcu_is_stable="yes" + STABILITY_POSTFIX="" + STABILITY="" +else + gcu_is_stable="no" + STABILITY_POSTFIX="($GCU_API_VER unstable)" + STABILITY="-unstable" +fi -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len + if test "x$gcu_is_stable" = "xyes"; then + GCU_IS_STABLE_TRUE= + GCU_IS_STABLE_FALSE='#' +else + GCU_IS_STABLE_TRUE='#' + GCU_IS_STABLE_FALSE= +fi -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ -# Must we lock files when doing compilation? -need_locks=$lt_need_locks -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix + for ac_header in locale.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOCALE_H 1 +_ACEOF -# Do we need a version for libraries? -need_version=$need_version +fi -# Whether dlopen is supported. -dlopen_support=$enable_dlopen +done -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self + if test $ac_cv_header_locale_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +$as_echo_n "checking for LC_MESSAGES... " >&6; } +if test "${am_cv_val_LC_MESSAGES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_val_LC_MESSAGES=yes +else + am_cv_val_LC_MESSAGES=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 +$as_echo "$am_cv_val_LC_MESSAGES" >&6; } + if test $am_cv_val_LC_MESSAGES = yes; then -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static +$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ + fi + fi + USE_NLS=yes -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + gt_cv_have_gettext=no -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + CATOBJEXT=NONE + XGETTEXT=: + INTLLIBS= -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" +if test "x$ac_cv_header_libintl_h" = x""yes; then : + gt_cv_func_dgettext_libintl="no" + libintl_extra_libs="" -# Library versioning type. -version_type=$version_type + # + # First check in libc + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 +$as_echo_n "checking for ngettext in libc... " >&6; } +if test "${gt_cv_func_ngettext_libc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Format of library name prefix. -libname_spec=$lt_libname_spec +#include -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec +int +main () +{ +return !ngettext ("","", 1) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_ngettext_libc=yes +else + gt_cv_func_ngettext_libc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 +$as_echo "$gt_cv_func_ngettext_libc" >&6; } -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds + if test "$gt_cv_func_ngettext_libc" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 +$as_echo_n "checking for dgettext in libc... " >&6; } +if test "${gt_cv_func_dgettext_libc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ +#include -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ +int +main () +{ +return !dgettext ("","") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_dgettext_libc=yes +else + gt_cv_func_dgettext_libc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 +$as_echo "$gt_cv_func_dgettext_libc" >&6; } + fi -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ + if test "$gt_cv_func_ngettext_libc" = "yes" ; then + for ac_func in bind_textdomain_codeset +do : + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 +_ACEOF -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib +fi +done -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ + fi -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + # + # If we don't have everything we want, check in libintl + # + if test "$gt_cv_func_dgettext_libc" != "yes" \ + || test "$gt_cv_func_ngettext_libc" != "yes" \ + || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 +$as_echo_n "checking for bindtextdomain in -lintl... " >&6; } +if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char bindtextdomain (); +int +main () +{ +return bindtextdomain (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_bindtextdomain=yes +else + ac_cv_lib_intl_bindtextdomain=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 +$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } +if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 +$as_echo_n "checking for ngettext in -lintl... " >&6; } +if test "${ac_cv_lib_intl_ngettext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ngettext (); +int +main () +{ +return ngettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_ngettext=yes +else + ac_cv_lib_intl_ngettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 +$as_echo "$ac_cv_lib_intl_ngettext" >&6; } +if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 +$as_echo_n "checking for dgettext in -lintl... " >&6; } +if test "${ac_cv_lib_intl_dgettext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dgettext (); +int +main () +{ +return dgettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_dgettext=yes +else + ac_cv_lib_intl_dgettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 +$as_echo "$ac_cv_lib_intl_dgettext" >&6; } +if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : + gt_cv_func_dgettext_libintl=yes +fi -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ +fi -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +fi -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + if test "$gt_cv_func_dgettext_libintl" != "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 +$as_echo_n "checking if -liconv is needed to use gettext... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 +$as_echo_n "checking for ngettext in -lintl... " >&6; } +if test "${ac_cv_lib_intl_ngettext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl -liconv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ngettext (); +int +main () +{ +return ngettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_ngettext=yes +else + ac_cv_lib_intl_ngettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 +$as_echo "$ac_cv_lib_intl_ngettext" >&6; } +if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 +$as_echo_n "checking for dcgettext in -lintl... " >&6; } +if test "${ac_cv_lib_intl_dcgettext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl -liconv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dcgettext (); +int +main () +{ +return dcgettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_dcgettext=yes +else + ac_cv_lib_intl_dcgettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 +$as_echo "$ac_cv_lib_intl_dcgettext" >&6; } +if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then : + gt_cv_func_dgettext_libintl=yes + libintl_extra_libs=-liconv +else + : +fi -# This is the shared library runtime path variable. -runpath_var=$runpath_var +else + : +fi -# This is the shared library path variable. -shlibpath_var=$shlibpath_var + fi -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath + # + # If we found libintl, then check in it for bind_textdomain_codeset(); + # we'll prefer libc if neither have bind_textdomain_codeset(), + # and both have dgettext and ngettext + # + if test "$gt_cv_func_dgettext_libintl" = "yes" ; then + glib_save_LIBS="$LIBS" + LIBS="$LIBS -lintl $libintl_extra_libs" + unset ac_cv_func_bind_textdomain_codeset + for ac_func in bind_textdomain_codeset +do : + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 +_ACEOF -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ +fi +done -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs + LIBS="$glib_save_LIBS" -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then + gt_cv_func_dgettext_libc=no + else + if test "$gt_cv_func_dgettext_libc" = "yes" \ + && test "$gt_cv_func_ngettext_libc" = "yes"; then + gt_cv_func_dgettext_libintl=no + fi + fi + fi + fi -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ + if test "$gt_cv_func_dgettext_libc" = "yes" \ + || test "$gt_cv_func_dgettext_libintl" = "yes"; then + gt_cv_have_gettext=yes + fi -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + if test "$gt_cv_func_dgettext_libintl" = "yes"; then + INTLLIBS="-lintl $libintl_extra_libs" + fi -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ + if test "$gt_cv_have_gettext" = "yes"; then -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "$MSGFMT" != "no"; then + glib_save_LIBS="$LIBS" + LIBS="$LIBS $INTLLIBS" + for ac_func in dcgettext +do : + ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" +if test "x$ac_cv_func_dcgettext" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path +fi +done -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ + MSGFMT_OPTS= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 +$as_echo_n "checking if msgfmt accepts -c... " >&6; } + cat >conftest.foo <<_ACEOF -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: test 1.0\n" +"PO-Revision-Date: 2007-02-15 12:01+0100\n" +"Last-Translator: test \n" +"Language-Team: C \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds +_ACEOF +if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 + ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +echo "$as_me: failed input was:" >&5 +sed 's/^/| /' conftest.foo >&5 +fi -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# ### END LIBTOOL TAG CONFIG: $tagname -__EOF__ + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + CATOBJEXT=.gmo + DATADIRNAME=share else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi + case $host in + *-*-solaris*) + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : + CATOBJEXT=.gmo + DATADIRNAME=share +else + CATOBJEXT=.mo + DATADIRNAME=lib fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - + ;; + *) + CATOBJEXT=.mo + DATADIRNAME=lib + ;; + esac +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$glib_save_LIBS" + INSTOBJEXT=.mo else - tagname="" + gt_cv_have_gettext=no fi - ;; + fi - RC) +fi -# Source file extension for RC test sources. -ac_ext=rc -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext + if test "$gt_cv_have_gettext" = "yes" ; then -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' +$as_echo "#define ENABLE_NLS 1" >>confdefs.h -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" + fi -# ltmain only uses $CC for tagged configurations so make sure $CC is set. + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 +$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } + XGETTEXT=":" + fi + fi -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} + # We need to process the po/ directory. + POSUB=po -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + ac_config_commands="$ac_config_commands default-1" -# Allow CC to be a program name with arguments. -compiler=$CC + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -lt_cv_prog_compiler_c_o_RC=yes -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - fix_srcfile_path_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac -cfgfile="$ofile" - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static + if test "$gt_cv_have_gettext" = "yes"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 +$as_echo_n "checking for catalogs to be installed... " >&6; } + NEW_LINGUAS= + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + NEW_LINGUAS="$NEW_LINGUAS $presentlang" + fi + done + LINGUAS=$NEW_LINGUAS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 +$as_echo "$LINGUAS" >&6; } + fi -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os +GETTEXT_PACKAGE="gchemutils-$GCU_API_VER" -# An echo program that does not interpret backslashes. -echo=$lt_echo -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS +cat >>confdefs.h <<_ACEOF +#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" +_ACEOF -# A C compiler. -LTCC=$lt_LTCC -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS +# Check whether --enable-update-databases was given. +if test "${enable_update_databases+set}" = set; then : + enableval=$enable_update_databases; + if test "x$enableval" != "xno"; then + # Extract the first word of "update-desktop-database", so it can be a program name with args. +set dummy update-desktop-database; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_UPDATE_DESKTOP_DATABASE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $UPDATE_DESKTOP_DATABASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# A language-specific compiler. -CC=$lt_compiler_RC + test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no" + ;; +esac +fi +UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE +if test -n "$UPDATE_DESKTOP_DATABASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5 +$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC -# An ERE matcher. -EGREP=$lt_EGREP + # Extract the first word of "update-mime-database", so it can be a program name with args. +set dummy update-mime-database; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_UPDATE_MIME_DATABASE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $UPDATE_MIME_DATABASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_UPDATE_MIME_DATABASE="$UPDATE_MIME_DATABASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_UPDATE_MIME_DATABASE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# The linker used to build libraries. -LD=$lt_LD_RC + test -z "$ac_cv_path_UPDATE_MIME_DATABASE" && ac_cv_path_UPDATE_MIME_DATABASE="no" + ;; +esac +fi +UPDATE_MIME_DATABASE=$ac_cv_path_UPDATE_MIME_DATABASE +if test -n "$UPDATE_MIME_DATABASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_MIME_DATABASE" >&5 +$as_echo "$UPDATE_MIME_DATABASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Whether we need hard or soft links. -LN_S=$lt_LN_S -# A BSD-compatible nm program. -NM=$lt_NM + else + UPDATE_DESKTOP_DATABASE=no + UPDATE_MIME_DATABASE=no + fi -# A symbol stripping program -STRIP=$lt_STRIP +else -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD + # Extract the first word of "update-desktop-database", so it can be a program name with args. +set dummy update-desktop-database; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_UPDATE_DESKTOP_DATABASE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $UPDATE_DESKTOP_DATABASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" + test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no" + ;; +esac +fi +UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE +if test -n "$UPDATE_DESKTOP_DATABASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5 +$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" -# Used on cygwin: assembler. -AS="$AS" + # Extract the first word of "update-mime-database", so it can be a program name with args. +set dummy update-mime-database; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_UPDATE_MIME_DATABASE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $UPDATE_MIME_DATABASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_UPDATE_MIME_DATABASE="$UPDATE_MIME_DATABASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_UPDATE_MIME_DATABASE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# The name of the directory that contains temporary libtool files. -objdir=$objdir + test -z "$ac_cv_path_UPDATE_MIME_DATABASE" && ac_cv_path_UPDATE_MIME_DATABASE="no" + ;; +esac +fi +UPDATE_MIME_DATABASE=$ac_cv_path_UPDATE_MIME_DATABASE +if test -n "$UPDATE_MIME_DATABASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_MIME_DATABASE" >&5 +$as_echo "$UPDATE_MIME_DATABASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC -# Object file suffix (normally "o"). -objext="$ac_objext" -# Old archive suffix (normally "a"). -libext="$libext" +fi -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' -# Executable file suffix (normally ""). -exeext="$exeext" + if test "x$UPDATE_DESKTOP_DATABASE" != "xno"; then + WITH_UPDATE_DESKTOP_TRUE= + WITH_UPDATE_DESKTOP_FALSE='#' +else + WITH_UPDATE_DESKTOP_TRUE='#' + WITH_UPDATE_DESKTOP_FALSE= +fi -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode + if test "x$UPDATE_MIME_DATABASE" != "xno"; then + WITH_UPDATE_MIME_TRUE= + WITH_UPDATE_MIME_FALSE='#' +else + WITH_UPDATE_MIME_TRUE='#' + WITH_UPDATE_MIME_FALSE= +fi -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC -# Must we lock files when doing compilation? -need_locks=$lt_need_locks +# Check whether --with-kde-mime-dir was given. +if test "${with_kde_mime_dir+set}" = set; then : + withval=$with_kde_mime_dir; KDEMIMEDIR=$withval +else -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix + # Extract the first word of "kde-config", so it can be a program name with args. +set dummy kde-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_KDECONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $KDECONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_KDECONFIG="$KDECONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_KDECONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Do we need a version for libraries? -need_version=$need_version + test -z "$ac_cv_path_KDECONFIG" && ac_cv_path_KDECONFIG="no" + ;; +esac +fi +KDECONFIG=$ac_cv_path_KDECONFIG +if test -n "$KDECONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KDECONFIG" >&5 +$as_echo "$KDECONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Whether dlopen is supported. -dlopen_support=$enable_dlopen -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self + if test "x$KDECONFIG" != "xno"; then + KDEMIMEDIR="`$KDECONFIG --install mime`" + else + KDEMIMEDIR="${datadir}/mimelnk" + fi -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC +fi -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE MIME files (.desktop) installation location" >&5 +$as_echo_n "checking for KDE MIME files (.desktop) installation location... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $KDEMIMEDIR" >&5 +$as_echo "$KDEMIMEDIR" >&6; } + if test "x$KDEMIMEDIR" != "xno"; then + WITH_KDE_MIME_TRUE= + WITH_KDE_MIME_FALSE='#' +else + WITH_KDE_MIME_TRUE='#' + WITH_KDE_MIME_FALSE= +fi -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC +# Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DOXYGEN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Library versioning type. -version_type=$version_type + test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="no" + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Format of library name prefix. -libname_spec=$lt_libname_spec -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec + if test "x$DOXYGEN" != "xno"; then + DOXYGEN_AVAILABLE_TRUE= + DOXYGEN_AVAILABLE_FALSE='#' +else + DOXYGEN_AVAILABLE_TRUE='#' + DOXYGEN_AVAILABLE_FALSE= +fi -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds +libgoffice= +for ver in 0.8 0.6 ; do + if test "x$libgoffice" = x; then + if pkg-config --exists libgoffice-$ver; then + libgoffice=libgoffice-$ver + fi + fi +done +if test "x$libgoffice" = x; then + # Not important. Things will fail below. + libgoffice=libgoffice-0.6 +fi -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared_mime_info" >&5 +$as_echo_n "checking for shared_mime_info... " >&6; } -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds +if test -n "$PKG_CONFIG"; then + if test -n "$shared_mime_info_CFLAGS"; then + pkg_cv_shared_mime_info_CFLAGS="$shared_mime_info_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"shared-mime-info >= 0.12\""; } >&5 + ($PKG_CONFIG --exists --print-errors "shared-mime-info >= 0.12") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_shared_mime_info_CFLAGS=`$PKG_CONFIG --cflags "shared-mime-info >= 0.12" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$shared_mime_info_LIBS"; then + pkg_cv_shared_mime_info_LIBS="$shared_mime_info_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"shared-mime-info >= 0.12\""; } >&5 + ($PKG_CONFIG --exists --print-errors "shared-mime-info >= 0.12") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_shared_mime_info_LIBS=`$PKG_CONFIG --libs "shared-mime-info >= 0.12" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC +if test $pkg_failed = yes; then -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + shared_mime_info_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "shared-mime-info >= 0.12"` + else + shared_mime_info_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "shared-mime-info >= 0.12"` + fi + # Put the nasty error message in config.log where it belongs + echo "$shared_mime_info_PKG_ERRORS" >&5 -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + as_fn_error "Package requirements (shared-mime-info >= 0.12) were not met: -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd +$shared_mime_info_PKG_ERRORS -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC +Alternatively, you may set the environment variables shared_mime_info_CFLAGS +and shared_mime_info_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +Alternatively, you may set the environment variables shared_mime_info_CFLAGS +and shared_mime_info_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } +else + shared_mime_info_CFLAGS=$pkg_cv_shared_mime_info_CFLAGS + shared_mime_info_LIBS=$pkg_cv_shared_mime_info_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cairo" >&5 +$as_echo_n "checking for cairo... " >&6; } -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +if test -n "$PKG_CONFIG"; then + if test -n "$cairo_CFLAGS"; then + pkg_cv_cairo_CFLAGS="$cairo_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.6.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cairo >= 1.6.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_cairo_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.6.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$cairo_LIBS"; then + pkg_cv_cairo_LIBS="$cairo_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.6.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cairo >= 1.6.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_cairo_LIBS=`$PKG_CONFIG --libs "cairo >= 1.6.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -# This is the shared library runtime path variable. -runpath_var=$runpath_var -# This is the shared library path variable. -shlibpath_var=$shlibpath_var +if test $pkg_failed = yes; then -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + cairo_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.6.0"` + else + cairo_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.6.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$cairo_PKG_ERRORS" >&5 -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC + as_fn_error "Package requirements (cairo >= 1.6.0) were not met: -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs +$cairo_PKG_ERRORS -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC +Alternatively, you may set the environment variables cairo_CFLAGS +and cairo_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" +Alternatively, you may set the environment variables cairo_CFLAGS +and cairo_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } +else + cairo_CFLAGS=$pkg_cv_cairo_CFLAGS + cairo_LIBS=$pkg_cv_cairo_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio" >&5 +$as_echo_n "checking for gio... " >&6; } -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +if test -n "$PKG_CONFIG"; then + if test -n "$gio_CFLAGS"; then + pkg_cv_gio_CFLAGS="$gio_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.16.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.16.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gio_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.16.1" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$gio_LIBS"; then + pkg_cv_gio_LIBS="$gio_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.16.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.16.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gio_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.16.1" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC +if test $pkg_failed = yes; then -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + gio_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-2.0 >= 2.16.1"` + else + gio_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.16.1"` + fi + # Put the nasty error message in config.log where it belongs + echo "$gio_PKG_ERRORS" >&5 -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC + as_fn_error "Package requirements (gio-2.0 >= 2.16.1) were not met: -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC +$gio_PKG_ERRORS -# ### END LIBTOOL TAG CONFIG: $tagname +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -__EOF__ +Alternatively, you may set the environment variables gio_CFLAGS +and gio_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables gio_CFLAGS +and gio_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi + gio_CFLAGS=$pkg_cv_gio_CFLAGS + gio_LIBS=$pkg_cv_gio_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk" >&5 +$as_echo_n "checking for gtk... " >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" +if test -n "$PKG_CONFIG"; then + if test -n "$gtk_CFLAGS"; then + pkg_cv_gtk_CFLAGS="$gtk_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gtk_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$gtk_LIBS"; then + pkg_cv_gtk_LIBS="$gtk_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gtk_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi - ;; - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" +if test $pkg_failed = yes; then - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + gtk_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.12.0"` + else + gtk_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.12.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$gtk_PKG_ERRORS" >&5 + as_fn_error "Package requirements (gtk+-2.0 >= 2.12.0) were not met: +$gtk_PKG_ERRORS -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' +Alternatively, you may set the environment variables gtk_CFLAGS +and gtk_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# Prevent multiple expansion +Alternatively, you may set the environment variables gtk_CFLAGS +and gtk_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } +else + gtk_CFLAGS=$pkg_cv_gtk_CFLAGS + gtk_LIBS=$pkg_cv_gtk_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glade" >&5 +$as_echo_n "checking for glade... " >&6; } +if test -n "$PKG_CONFIG"; then + if test -n "$glade_CFLAGS"; then + pkg_cv_glade_CFLAGS="$glade_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.4.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_glade_CFLAGS=`$PKG_CONFIG --cflags "libglade-2.0 >= 2.4.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$glade_LIBS"; then + pkg_cv_glade_LIBS="$glade_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.4.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_glade_LIBS=`$PKG_CONFIG --libs "libglade-2.0 >= 2.4.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test $pkg_failed = yes; then +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + glade_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libglade-2.0 >= 2.4.0"` + else + glade_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libglade-2.0 >= 2.4.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$glade_PKG_ERRORS" >&5 + as_fn_error "Package requirements (libglade-2.0 >= 2.4.0) were not met: +$glade_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables glade_CFLAGS +and glade_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables glade_CFLAGS +and glade_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } +else + glade_CFLAGS=$pkg_cv_glade_CFLAGS + glade_LIBS=$pkg_cv_glade_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnome_canvas" >&5 +$as_echo_n "checking for gnome_canvas... " >&6; } +if test -n "$PKG_CONFIG"; then + if test -n "$gnome_canvas_CFLAGS"; then + pkg_cv_gnome_canvas_CFLAGS="$gnome_canvas_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomecanvas-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libgnomecanvas-2.0 >= 2.4.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gnome_canvas_CFLAGS=`$PKG_CONFIG --cflags "libgnomecanvas-2.0 >= 2.4.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$gnome_canvas_LIBS"; then + pkg_cv_gnome_canvas_LIBS="$gnome_canvas_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomecanvas-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libgnomecanvas-2.0 >= 2.4.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gnome_canvas_LIBS=`$PKG_CONFIG --libs "libgnomecanvas-2.0 >= 2.4.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test $pkg_failed = yes; then +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + gnome_canvas_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libgnomecanvas-2.0 >= 2.4.0"` + else + gnome_canvas_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgnomecanvas-2.0 >= 2.4.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$gnome_canvas_PKG_ERRORS" >&5 + as_fn_error "Package requirements (libgnomecanvas-2.0 >= 2.4.0) were not met: +$gnome_canvas_PKG_ERRORS -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6; } +Alternatively, you may set the environment variables gnome_canvas_CFLAGS +and gnome_canvas_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables gnome_canvas_CFLAGS +and gnome_canvas_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + gnome_canvas_CFLAGS=$pkg_cv_gnome_canvas_CFLAGS + gnome_canvas_LIBS=$pkg_cv_gnome_canvas_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtkglext" >&5 +$as_echo_n "checking for gtkglext... " >&6; } +if test -n "$PKG_CONFIG"; then + if test -n "$gtkglext_CFLAGS"; then + pkg_cv_gtkglext_CFLAGS="$gtkglext_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-1.0 >= 1.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtkglext-1.0 >= 1.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gtkglext_CFLAGS=`$PKG_CONFIG --cflags "gtkglext-1.0 >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac + pkg_failed=untried fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +if test -n "$PKG_CONFIG"; then + if test -n "$gtkglext_LIBS"; then + pkg_cv_gtkglext_LIBS="$gtkglext_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-1.0 >= 1.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtkglext-1.0 >= 1.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gtkglext_LIBS=`$PKG_CONFIG --libs "gtkglext-1.0 >= 1.0.0" 2>/dev/null` else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + pkg_failed=yes fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi + fi else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + pkg_failed=untried fi -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - PKG_CONFIG="" - fi -fi -gdu_cv_version_required=0.3.2 +if test $pkg_failed = yes; then -if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-doc-utils >= \$gdu_cv_version_required\"") >&5 - ($PKG_CONFIG --exists --print-errors "gnome-doc-utils >= $gdu_cv_version_required") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - gdu_cv_have_gdu=yes +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - gdu_cv_have_gdu=no + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + gtkglext_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtkglext-1.0 >= 1.0.0"` + else + gtkglext_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtkglext-1.0 >= 1.0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$gtkglext_PKG_ERRORS" >&5 -if test "$gdu_cv_have_gdu" = "yes"; then - : + as_fn_error "Package requirements (gtkglext-1.0 >= 1.0.0) were not met: + +$gtkglext_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables gtkglext_CFLAGS +and gtkglext_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables gtkglext_CFLAGS +and gtkglext_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - { { echo "$as_me:$LINENO: error: gnome-doc-utils >= $gdu_cv_version_required not found" >&5 -echo "$as_me: error: gnome-doc-utils >= $gdu_cv_version_required not found" >&2;} - { (exit 1); exit 1; }; } + gtkglext_CFLAGS=$pkg_cv_gtkglext_CFLAGS + gtkglext_LIBS=$pkg_cv_gtkglext_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml" >&5 +$as_echo_n "checking for xml... " >&6; } - -# Check whether --with-help-dir was given. -if test "${with_help_dir+set}" = set; then - withval=$with_help_dir; +if test -n "$PKG_CONFIG"; then + if test -n "$xml_CFLAGS"; then + pkg_cv_xml_CFLAGS="$xml_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.4.16\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.4.16") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_xml_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.4.16" 2>/dev/null` else - with_help_dir='${datadir}/gnome/help' + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$xml_LIBS"; then + pkg_cv_xml_LIBS="$xml_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.4.16\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.4.16") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_xml_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.4.16" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -HELP_DIR="$with_help_dir" +if test $pkg_failed = yes; then -# Check whether --with-omf-dir was given. -if test "${with_omf_dir+set}" = set; then - withval=$with_omf_dir; +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - with_omf_dir='${datadir}/omf' + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + xml_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0 >= 2.4.16"` + else + xml_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.4.16"` + fi + # Put the nasty error message in config.log where it belongs + echo "$xml_PKG_ERRORS" >&5 -OMF_DIR="$with_omf_dir" + as_fn_error "Package requirements (libxml-2.0 >= 2.4.16) were not met: +$xml_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables xml_CFLAGS +and xml_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# Check whether --with-help-formats was given. -if test "${with_help_formats+set}" = set; then - withval=$with_help_formats; +Alternatively, you may set the environment variables xml_CFLAGS +and xml_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - with_help_formats='' + xml_CFLAGS=$pkg_cv_xml_CFLAGS + xml_LIBS=$pkg_cv_xml_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi -DOC_USER_FORMATS="$with_help_formats" - +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsf" >&5 +$as_echo_n "checking for gsf... " >&6; } -# Check whether --enable-scrollkeeper was given. -if test "${enable_scrollkeeper+set}" = set; then - enableval=$enable_scrollkeeper; +if test -n "$PKG_CONFIG"; then + if test -n "$gsf_CFLAGS"; then + pkg_cv_gsf_CFLAGS="$gsf_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgsf-1 >= 1.14.9\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libgsf-1 >= 1.14.9") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gsf_CFLAGS=`$PKG_CONFIG --cflags "libgsf-1 >= 1.14.9" 2>/dev/null` else - enable_scrollkeeper=yes + pkg_failed=yes fi - - if test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"; then - ENABLE_SK_TRUE= - ENABLE_SK_FALSE='#' + fi else - ENABLE_SK_TRUE='#' - ENABLE_SK_FALSE= + pkg_failed=untried fi - - - if test "$gdu_cv_have_gdu" = "yes"; then - HAVE_GNOME_DOC_UTILS_TRUE= - HAVE_GNOME_DOC_UTILS_FALSE='#' +if test -n "$PKG_CONFIG"; then + if test -n "$gsf_LIBS"; then + pkg_cv_gsf_LIBS="$gsf_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgsf-1 >= 1.14.9\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libgsf-1 >= 1.14.9") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gsf_LIBS=`$PKG_CONFIG --libs "libgsf-1 >= 1.14.9" 2>/dev/null` else - HAVE_GNOME_DOC_UTILS_TRUE='#' - HAVE_GNOME_DOC_UTILS_FALSE= + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi +if test $pkg_failed = yes; then -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + gsf_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libgsf-1 >= 1.14.9"` + else + gsf_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgsf-1 >= 1.14.9"` + fi + # Put the nasty error message in config.log where it belongs + echo "$gsf_PKG_ERRORS" >&5 + as_fn_error "Package requirements (libgsf-1 >= 1.14.9) were not met: +$gsf_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables gsf_CFLAGS +and gsf_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -for ac_header in fstream ostream sstream -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +Alternatively, you may set the environment variables gsf_CFLAGS +and gsf_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - ac_header_compiler=no +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } +else + gsf_CFLAGS=$pkg_cv_gsf_CFLAGS + gsf_LIBS=$pkg_cv_gsf_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for goffice" >&5 +$as_echo_n "checking for goffice... " >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if test -n "$PKG_CONFIG"; then + if test -n "$goffice_CFLAGS"; then + pkg_cv_goffice_CFLAGS="$goffice_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgoffice >= 0.6.5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgoffice >= 0.6.5") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_goffice_CFLAGS=`$PKG_CONFIG --cflags "$libgoffice >= 0.6.5" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$goffice_LIBS"; then + pkg_cv_goffice_LIBS="$goffice_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgoffice >= 0.6.5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgoffice >= 0.6.5") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_goffice_LIBS=`$PKG_CONFIG --libs "$libgoffice >= 0.6.5" 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=untried fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------------------------------------- ## -## Report this to http://savannah.nongnu.org/bugs/?group=gchemutils ## -## ---------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test $pkg_failed = yes; then +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + goffice_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$libgoffice >= 0.6.5"` + else + goffice_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$libgoffice >= 0.6.5"` + fi + # Put the nasty error message in config.log where it belongs + echo "$goffice_PKG_ERRORS" >&5 -done + as_fn_error "Package requirements ($libgoffice >= 0.6.5) were not met: +$goffice_PKG_ERRORS -################################################## -# i18n -################################################## +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables goffice_CFLAGS +and goffice_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables goffice_CFLAGS +and goffice_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -for ac_header in locale.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + goffice_CFLAGS=$pkg_cv_goffice_CFLAGS + goffice_LIBS=$pkg_cv_goffice_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chemical_mime_data" >&5 +$as_echo_n "checking for chemical_mime_data... " >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if test -n "$PKG_CONFIG"; then + if test -n "$chemical_mime_data_CFLAGS"; then + pkg_cv_chemical_mime_data_CFLAGS="$chemical_mime_data_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"chemical-mime-data >= 0.1.94\""; } >&5 + ($PKG_CONFIG --exists --print-errors "chemical-mime-data >= 0.1.94") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_chemical_mime_data_CFLAGS=`$PKG_CONFIG --cflags "chemical-mime-data >= 0.1.94" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------------------------------------- ## -## Report this to http://savannah.nongnu.org/bugs/?group=gchemutils ## -## ---------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - eval "$as_ac_Header=\$ac_header_preproc" + pkg_failed=untried fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - +if test -n "$PKG_CONFIG"; then + if test -n "$chemical_mime_data_LIBS"; then + pkg_cv_chemical_mime_data_LIBS="$chemical_mime_data_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"chemical-mime-data >= 0.1.94\""; } >&5 + ($PKG_CONFIG --exists --print-errors "chemical-mime-data >= 0.1.94") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_chemical_mime_data_LIBS=`$PKG_CONFIG --libs "chemical-mime-data >= 0.1.94" 2>/dev/null` +else + pkg_failed=yes fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - + fi +else + pkg_failed=untried fi -done - if test $ac_cv_header_locale_h = yes; then - { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 -echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } -if test "${am_cv_val_LC_MESSAGES+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -return LC_MESSAGES - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - am_cv_val_LC_MESSAGES=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - am_cv_val_LC_MESSAGES=no -fi +if test $pkg_failed = yes; then -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi -{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 -echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; } - if test $am_cv_val_LC_MESSAGES = yes; then + if test $_pkg_short_errors_supported = yes; then + chemical_mime_data_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "chemical-mime-data >= 0.1.94"` + else + chemical_mime_data_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "chemical-mime-data >= 0.1.94"` + fi + # Put the nasty error message in config.log where it belongs + echo "$chemical_mime_data_PKG_ERRORS" >&5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_LC_MESSAGES 1 -_ACEOF + as_fn_error "Package requirements (chemical-mime-data >= 0.1.94) were not met: - fi - fi - USE_NLS=yes +$chemical_mime_data_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - gt_cv_have_gettext=no +Alternatively, you may set the environment variables chemical_mime_data_CFLAGS +and chemical_mime_data_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - CATOBJEXT=NONE - XGETTEXT=: - INTLLIBS= +Alternatively, you may set the environment variables chemical_mime_data_CFLAGS +and chemical_mime_data_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - if test "${ac_cv_header_libintl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking libintl.h usability" >&5 -echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + chemical_mime_data_CFLAGS=$pkg_cv_chemical_mime_data_CFLAGS + chemical_mime_data_LIBS=$pkg_cv_chemical_mime_data_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bodr" >&5 +$as_echo_n "checking for bodr... " >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking libintl.h presence" >&5 -echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if test -n "$PKG_CONFIG"; then + if test -n "$bodr_CFLAGS"; then + pkg_cv_bodr_CFLAGS="$bodr_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bodr >= 5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "bodr >= 5") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_bodr_CFLAGS=`$PKG_CONFIG --cflags "bodr >= 5" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------------------------------------- ## -## Report this to http://savannah.nongnu.org/bugs/?group=gchemutils ## -## ---------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - ac_cv_header_libintl_h=$ac_header_preproc + pkg_failed=untried fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } - +if test -n "$PKG_CONFIG"; then + if test -n "$bodr_LIBS"; then + pkg_cv_bodr_LIBS="$bodr_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bodr >= 5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "bodr >= 5") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_bodr_LIBS=`$PKG_CONFIG --libs "bodr >= 5" 2>/dev/null` +else + pkg_failed=yes fi -if test $ac_cv_header_libintl_h = yes; then - gt_cv_func_dgettext_libintl="no" - libintl_extra_libs="" - - # - # First check in libc - # - { echo "$as_me:$LINENO: checking for ngettext in libc" >&5 -echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; } -if test "${gt_cv_func_ngettext_libc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + pkg_failed=untried +fi -#include -int -main () -{ -return !ngettext ("","", 1) - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - gt_cv_func_ngettext_libc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - gt_cv_func_ngettext_libc=no +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + bodr_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "bodr >= 5"` + else + bodr_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "bodr >= 5"` + fi + # Put the nasty error message in config.log where it belongs + echo "$bodr_PKG_ERRORS" >&5 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + as_fn_error "Package requirements (bodr >= 5) were not met: -fi -{ echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 -echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; } +$bodr_PKG_ERRORS - if test "$gt_cv_func_ngettext_libc" = "yes" ; then - { echo "$as_me:$LINENO: checking for dgettext in libc" >&5 -echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; } -if test "${gt_cv_func_dgettext_libc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables bodr_CFLAGS +and bodr_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables bodr_CFLAGS +and bodr_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + bodr_CFLAGS=$pkg_cv_bodr_CFLAGS + bodr_LIBS=$pkg_cv_bodr_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi -#include +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openbabel" >&5 +$as_echo_n "checking for openbabel... " >&6; } -int -main () -{ -return !dgettext ("","") - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if test -n "$PKG_CONFIG"; then + if test -n "$openbabel_CFLAGS"; then + pkg_cv_openbabel_CFLAGS="$openbabel_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openbabel-2.0 >= 2.1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openbabel-2.0 >= 2.1.0") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - gt_cv_func_dgettext_libc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_openbabel_CFLAGS=`$PKG_CONFIG --cflags "openbabel-2.0 >= 2.1.0" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_func_dgettext_libc=no + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$openbabel_LIBS"; then + pkg_cv_openbabel_LIBS="$openbabel_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openbabel-2.0 >= 2.1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openbabel-2.0 >= 2.1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_openbabel_LIBS=`$PKG_CONFIG --libs "openbabel-2.0 >= 2.1.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 -echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; } - fi - if test "$gt_cv_func_ngettext_libc" = "yes" ; then +if test $pkg_failed = yes; then -for ac_func in bind_textdomain_codeset -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + openbabel_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openbabel-2.0 >= 2.1.0"` + else + openbabel_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openbabel-2.0 >= 2.1.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$openbabel_PKG_ERRORS" >&5 -#ifdef __STDC__ -# include -#else -# include -#endif + as_fn_error "Package requirements (openbabel-2.0 >= 2.1.0) were not met: -#undef $ac_func +$openbabel_PKG_ERRORS -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +Alternatively, you may set the environment variables openbabel_CFLAGS +and openbabel_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - eval "$as_ac_var=no" -fi +Alternatively, you may set the environment variables openbabel_CFLAGS +and openbabel_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } +else + openbabel_CFLAGS=$pkg_cv_openbabel_CFLAGS + openbabel_LIBS=$pkg_cv_openbabel_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done +if test "$libgoffice" = "libgoffice-0.6"; then - fi +cat >>confdefs.h <<_ACEOF +#define GOFFICE_IS_0_6 1 +_ACEOF - # - # If we don't have everything we want, check in libintl - # - if test "$gt_cv_func_dgettext_libc" != "yes" \ - || test "$gt_cv_func_ngettext_libc" != "yes" \ - || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then - { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 -echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; } -if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf" >&5 +$as_echo_n "checking for gconf... " >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char bindtextdomain (); -int -main () -{ -return bindtextdomain (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if test -n "$PKG_CONFIG"; then + if test -n "$gconf_CFLAGS"; then + pkg_cv_gconf_CFLAGS="$gconf_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0 >= 2.4.0") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_intl_bindtextdomain=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gconf_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.4.0" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_intl_bindtextdomain=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + pkg_failed=yes fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; } -if test $ac_cv_lib_intl_bindtextdomain = yes; then - { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 -echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } -if test "${ac_cv_lib_intl_ngettext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ngettext (); -int -main () -{ -return ngettext (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$gconf_LIBS"; then + pkg_cv_gconf_LIBS="$gconf_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0 >= 2.4.0") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_intl_ngettext=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gconf_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.4.0" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_intl_ngettext=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + pkg_failed=yes fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } -if test $ac_cv_lib_intl_ngettext = yes; then - { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 -echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; } -if test "${ac_cv_lib_intl_dgettext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + pkg_failed=untried +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgettext (); -int -main () -{ -return dgettext (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_intl_dgettext=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_intl_dgettext=no + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + gconf_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0 >= 2.4.0"` + else + gconf_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.4.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$gconf_PKG_ERRORS" >&5 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; } -if test $ac_cv_lib_intl_dgettext = yes; then - gt_cv_func_dgettext_libintl=yes -fi + as_fn_error "Package requirements (gconf-2.0 >= 2.4.0) were not met: -fi +$gconf_PKG_ERRORS -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables gconf_CFLAGS +and gconf_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - if test "$gt_cv_func_dgettext_libintl" != "yes" ; then - { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 -echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; } - { echo "$as_me:$LINENO: result: " >&5 -echo "${ECHO_T}" >&6; } - { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 -echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } -if test "${ac_cv_lib_intl_ngettext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl -liconv $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +Alternatively, you may set the environment variables gconf_CFLAGS +and gconf_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ngettext (); -int -main () -{ -return ngettext (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_intl_ngettext=yes +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_intl_ngettext=no + gconf_CFLAGS=$pkg_cv_gconf_CFLAGS + gconf_LIBS=$pkg_cv_gconf_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } -if test $ac_cv_lib_intl_ngettext = yes; then - { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 -echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; } -if test "${ac_cv_lib_intl_dcgettext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl -liconv $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnome_vfs" >&5 +$as_echo_n "checking for gnome_vfs... " >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dcgettext (); -int -main () -{ -return dcgettext (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if test -n "$PKG_CONFIG"; then + if test -n "$gnome_vfs_CFLAGS"; then + pkg_cv_gnome_vfs_CFLAGS="$gnome_vfs_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-module-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gnome-vfs-module-2.0 >= 2.4.0") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_intl_dcgettext=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gnome_vfs_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-module-2.0 >= 2.4.0" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_intl_dcgettext=no + pkg_failed=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + fi +else + pkg_failed=untried fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; } -if test $ac_cv_lib_intl_dcgettext = yes; then - gt_cv_func_dgettext_libintl=yes - libintl_extra_libs=-liconv +if test -n "$PKG_CONFIG"; then + if test -n "$gnome_vfs_LIBS"; then + pkg_cv_gnome_vfs_LIBS="$gnome_vfs_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-module-2.0 >= 2.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gnome-vfs-module-2.0 >= 2.4.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gnome_vfs_LIBS=`$PKG_CONFIG --libs "gnome-vfs-module-2.0 >= 2.4.0" 2>/dev/null` else - : + pkg_failed=yes fi - + fi else - : + pkg_failed=untried fi - fi - # - # If we found libintl, then check in it for bind_textdomain_codeset(); - # we'll prefer libc if neither have bind_textdomain_codeset(), - # and both have dgettext and ngettext - # - if test "$gt_cv_func_dgettext_libintl" = "yes" ; then - glib_save_LIBS="$LIBS" - LIBS="$LIBS -lintl $libintl_extra_libs" - unset ac_cv_func_bind_textdomain_codeset -for ac_func in bind_textdomain_codeset -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + gnome_vfs_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnome-vfs-module-2.0 >= 2.4.0"` + else + gnome_vfs_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-module-2.0 >= 2.4.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$gnome_vfs_PKG_ERRORS" >&5 -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + as_fn_error "Package requirements (gnome-vfs-module-2.0 >= 2.4.0) were not met: -#ifdef __STDC__ -# include -#else -# include -#endif +$gnome_vfs_PKG_ERRORS -#undef $ac_func +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +Alternatively, you may set the environment variables gnome_vfs_CFLAGS +and gnome_vfs_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +Alternatively, you may set the environment variables gnome_vfs_CFLAGS +and gnome_vfs_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - eval "$as_ac_var=no" +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } +else + gnome_vfs_CFLAGS=$pkg_cv_gnome_vfs_CFLAGS + gnome_vfs_LIBS=$pkg_cv_gnome_vfs_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + if test "$libgoffice" = "libgoffice-0.6"; then + GCU_NEEDS_GCONF_TRUE= + GCU_NEEDS_GCONF_FALSE='#' +else + GCU_NEEDS_GCONF_TRUE='#' + GCU_NEEDS_GCONF_FALSE= fi -done - - LIBS="$glib_save_LIBS" - - if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then - gt_cv_func_dgettext_libc=no - else - if test "$gt_cv_func_dgettext_libc" = "yes" \ - && test "$gt_cv_func_ngettext_libc" = "yes"; then - gt_cv_func_dgettext_libintl=no - fi - fi - fi - fi - - if test "$gt_cv_func_dgettext_libc" = "yes" \ - || test "$gt_cv_func_dgettext_libintl" = "yes"; then - gt_cv_have_gettext=yes - fi - if test "$gt_cv_func_dgettext_libintl" = "yes"; then - INTLLIBS="-lintl $libintl_extra_libs" - fi - if test "$gt_cv_have_gettext" = "yes"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETTEXT 1 -_ACEOF +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for goffice_has_global_header" >&5 +$as_echo_n "checking for goffice_has_global_header... " >&6; } - # Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$goffice_has_global_header_CFLAGS"; then + pkg_cv_goffice_has_global_header_CFLAGS="$goffice_has_global_header_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgoffice >= 0.7.8\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgoffice >= 0.7.8") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_goffice_has_global_header_CFLAGS=`$PKG_CONFIG --cflags "$libgoffice >= 0.7.8" 2>/dev/null` else - case "$MSGFMT" in - /*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then - ac_cv_path_MSGFMT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" - ;; -esac + pkg_failed=yes fi -MSGFMT="$ac_cv_path_MSGFMT" -if test "$MSGFMT" != "no"; then - { echo "$as_me:$LINENO: result: $MSGFMT" >&5 -echo "${ECHO_T}$MSGFMT" >&6; } + fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$goffice_has_global_header_LIBS"; then + pkg_cv_goffice_has_global_header_LIBS="$goffice_has_global_header_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgoffice >= 0.7.8\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgoffice >= 0.7.8") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_goffice_has_global_header_LIBS=`$PKG_CONFIG --libs "$libgoffice >= 0.7.8" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - if test "$MSGFMT" != "no"; then - glib_save_LIBS="$LIBS" - LIBS="$LIBS $INTLLIBS" - -for ac_func in dcgettext -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +if test $pkg_failed = yes; then -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + goffice_has_global_header_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$libgoffice >= 0.7.8"` + else + goffice_has_global_header_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$libgoffice >= 0.7.8"` + fi + # Put the nasty error message in config.log where it belongs + echo "$goffice_has_global_header_PKG_ERRORS" >&5 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + use_global_header=no +elif test $pkg_failed = untried; then + use_global_header=no +else + goffice_has_global_header_CFLAGS=$pkg_cv_goffice_has_global_header_CFLAGS + goffice_has_global_header_LIBS=$pkg_cv_goffice_has_global_header_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + use_global_header=yes fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +if test "x$use_global_header" = xyes; then + +cat >>confdefs.h <<_ACEOF +#define GOFFICE_HAS_GLOBAL_HEADER 1 _ACEOF fi -done - MSGFMT_OPTS= - { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5 -echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; } - cat >conftest.foo <<_ACEOF -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: test 1.0\n" -"PO-Revision-Date: 2007-02-15 12:01+0100\n" -"Last-Translator: test \n" -"Language-Team: C \n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for need_goffice_with_gnome" >&5 +$as_echo_n "checking for need_goffice_with_gnome... " >&6; } -_ACEOF -if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5 - ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 +if test -n "$PKG_CONFIG"; then + if test -n "$need_goffice_with_gnome_CFLAGS"; then + pkg_cv_need_goffice_with_gnome_CFLAGS="$need_goffice_with_gnome_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgoffice <= 0.7.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgoffice <= 0.7.2") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - MSGFMT_OPTS=-c; { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -echo "$as_me: failed input was:" >&5 -sed 's/^/| /' conftest.foo >&5 -fi - - # Extract the first word of "gmsgfmt", so it can be a program name with args. -set dummy gmsgfmt; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_need_goffice_with_gnome_CFLAGS=`$PKG_CONFIG --cflags "$libgoffice <= 0.7.2" 2>/dev/null` else - case $GMSGFMT in - [\\/]* | ?:[\\/]*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac + pkg_failed=yes fi -GMSGFMT=$ac_cv_path_GMSGFMT -if test -n "$GMSGFMT"; then - { echo "$as_me:$LINENO: result: $GMSGFMT" >&5 -echo "${ECHO_T}$GMSGFMT" >&6; } + fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + pkg_failed=untried fi - - - # Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$need_goffice_with_gnome_LIBS"; then + pkg_cv_need_goffice_with_gnome_LIBS="$need_goffice_with_gnome_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgoffice <= 0.7.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgoffice <= 0.7.2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_need_goffice_with_gnome_LIBS=`$PKG_CONFIG --libs "$libgoffice <= 0.7.2" 2>/dev/null` else - case "$XGETTEXT" in - /*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word" - break - fi + pkg_failed=yes +fi fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac +else + pkg_failed=untried fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test "$XGETTEXT" != ":"; then - { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 -echo "${ECHO_T}$XGETTEXT" >&6; } + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + need_goffice_with_gnome_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$libgoffice <= 0.7.2"` + else + need_goffice_with_gnome_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$libgoffice <= 0.7.2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$need_goffice_with_gnome_PKG_ERRORS" >&5 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + need_gnome_support=no +elif test $pkg_failed = untried; then + need_gnome_support=no +else + need_goffice_with_gnome_CFLAGS=$pkg_cv_need_goffice_with_gnome_CFLAGS + need_goffice_with_gnome_LIBS=$pkg_cv_need_goffice_with_gnome_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + need_gnome_support=yes +fi +if test "x$need_gnome_support" = xyes; then + saved_cflags=$CFLAGS + CFLAGS=$goffice_CFLAGS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include + #ifndef GOFFICE_WITH_GNOME + #error no gnome support present + #endif + int main () { -extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - CATOBJEXT=.gmo - DATADIRNAME=share +if ac_fn_c_try_compile "$LINENO"; then : + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + as_fn_error "you need a libgoffice version with gnome support" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$saved_cflags +fi - case $host in - *-*-solaris*) - { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 -echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; } -if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OB22" >&5 +$as_echo_n "checking for OB22... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$OB22_CFLAGS"; then + pkg_cv_OB22_CFLAGS="$OB22_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openbabel-2.0 >= 2.2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openbabel-2.0 >= 2.2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OB22_CFLAGS=`$PKG_CONFIG --cflags "openbabel-2.0 >= 2.2.0" 2>/dev/null` else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. - For example, HP-UX 11i declares gettimeofday. */ -#define bind_textdomain_codeset innocuous_bind_textdomain_codeset + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$OB22_LIBS"; then + pkg_cv_OB22_LIBS="$OB22_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openbabel-2.0 >= 2.2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openbabel-2.0 >= 2.2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OB22_LIBS=`$PKG_CONFIG --libs "openbabel-2.0 >= 2.2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char bind_textdomain_codeset (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef bind_textdomain_codeset +if test $pkg_failed = yes; then -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char bind_textdomain_codeset (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset -choke me -#endif +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + OB22_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openbabel-2.0 >= 2.2.0"` + else + OB22_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openbabel-2.0 >= 2.2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$OB22_PKG_ERRORS" >&5 -int -main () -{ -return bind_textdomain_codeset (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_bind_textdomain_codeset=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ob22="no" +elif test $pkg_failed = untried; then + ob22="no" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + OB22_CFLAGS=$pkg_cv_OB22_CFLAGS + OB22_LIBS=$pkg_cv_OB22_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ob22="yes" +fi +if test "x$ob22" = "xyes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_OPENBABEL_2_2 1 +_ACEOF - ac_cv_func_bind_textdomain_codeset=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +# Extract the first word of "gconftool-2", so it can be a program name with args. +set dummy gconftool-2; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GCONFTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GCONFTOOL in + [\\/]* | ?:[\\/]*) + ac_cv_path_GCONFTOOL="$GCONFTOOL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GCONFTOOL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GCONFTOOL" && ac_cv_path_GCONFTOOL="no" + ;; +esac fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 -echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; } -if test $ac_cv_func_bind_textdomain_codeset = yes; then - CATOBJEXT=.gmo - DATADIRNAME=share +GCONFTOOL=$ac_cv_path_GCONFTOOL +if test -n "$GCONFTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONFTOOL" >&5 +$as_echo "$GCONFTOOL" >&6; } else - CATOBJEXT=.mo - DATADIRNAME=lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - ;; - *) - CATOBJEXT=.mo - DATADIRNAME=lib - ;; - esac + +if test "x$GCONFTOOL" = "xno"; then + as_fn_error "gconftool-2 executable not found in your path - should be installed with GConf" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$glib_save_LIBS" - INSTOBJEXT=.mo - else - gt_cv_have_gettext=no - fi - fi + if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then + GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` + else + GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE + fi + +# Check whether --with-gconf-source was given. +if test "${with_gconf_source+set}" = set; then : + withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval" fi - if test "$gt_cv_have_gettext" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5 +$as_echo "Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; } -cat >>confdefs.h <<\_ACEOF -#define ENABLE_NLS 1 -_ACEOF + if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then + GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' + fi - fi - if test "$XGETTEXT" != ":"; then - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 -echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; } - XGETTEXT=":" - fi - fi +# Check whether --with-gconf-schema-file-dir was given. +if test "${with_gconf_schema_file_dir+set}" = set; then : + withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval" +fi - # We need to process the po/ directory. - POSUB=po - ac_config_commands="$ac_config_commands default-1" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5 +$as_echo "Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; } - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done + # Check whether --enable-schemas-install was given. +if test "${enable_schemas_install+set}" = set; then : + enableval=$enable_schemas_install; case ${enableval} in + yes|no) ;; + *) as_fn_error "bad value ${enableval} for --enable-schemas-install" "$LINENO" 5 ;; + esac +fi + if test "$enable_schemas_install" != no; then + GCONF_SCHEMAS_INSTALL_TRUE= + GCONF_SCHEMAS_INSTALL_FALSE='#' +else + GCONF_SCHEMAS_INSTALL_TRUE='#' + GCONF_SCHEMAS_INSTALL_FALSE= +fi +bodr_pkgdatadir=`pkg-config --variable=pkgdatadir bodr` +cat >>confdefs.h <<_ACEOF +#define BODR_PKGDATADIR "$bodr_pkgdatadir" +_ACEOF +if test "x$gcu_is_stable" = "xyes"; then + GCU_CFLAGS="-Wall" +else + GCU_CFLAGS="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -Wall" +fi +GOFFICE_PLUGINS_DIR=`pkg-config --variable=PluginDir $libgoffice` +# Check whether --with-goffice-plugins-dir was given. +if test "${with_goffice_plugins_dir+set}" = set; then : + withval=$with_goffice_plugins_dir; + if test "x$withval" != "xyes" -a "x$withval" != "xno" ; then + GOFFICE_PLUGINS_DIR=$withval + fi +fi - if test "$gt_cv_have_gettext" = "yes"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 -echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } - NEW_LINGUAS= - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - NEW_LINGUAS="$NEW_LINGUAS $presentlang" - fi - done - LINGUAS=$NEW_LINGUAS - { echo "$as_me:$LINENO: result: $LINGUAS" >&5 -echo "${ECHO_T}$LINGUAS" >&6; } - fi - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi +saved_cflags=$CFLAGS +saved_libs=$LIBS +CFLAGS=$goffice_CFLAGS +LIBS=$goffice_LIBS +for ac_func in go_conf_sync go_data_serialize gog_data_editor_set_format go_error_info_free +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi +fi +done +CFLAGS=$saved_cflags +LIBS=$saved_libs - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES -GETTEXT_PACKAGE="gchemutils" +################################################## +# Check for xulrunner plugin +################################################## +xulclient= +for pack in xulrunner seamonkey iceape firefox mozilla; do + if test "x$xulclient" = x; then + if pkg-config --exists $pack-plugin; then + xulclient=$pack-plugin + fi + fi +done +if test "x$xulclient" = x; then + # Not important. Things will fail below. + xulclient=mozilla-plugin +fi +MOZILLA_CFLAGS= +build_mozilla_plugin=no -cat >>confdefs.h <<_ACEOF -#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" -_ACEOF +test_mozilla_plugin=true +# Check whether --enable-mozilla-plugin was given. +if test "${enable_mozilla_plugin+set}" = set; then : + enableval=$enable_mozilla_plugin; test_mozilla_plugin="$enableval" +fi -case "$am__api_version" in - 1.01234) - { { echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5 -echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;} - { (exit 1); exit 1; }; } - ;; - *) - ;; + +if test "x$test_mozilla_plugin" != "xno"; then + if test -z "$MOZILLA_CONFIG"; then + # Extract the first word of "mozilla-config", so it can be a program name with args. +set dummy mozilla-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MOZILLA_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MOZILLA_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_MOZILLA_CONFIG="$MOZILLA_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MOZILLA_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_MOZILLA_CONFIG" && ac_cv_path_MOZILLA_CONFIG="no" + ;; esac +fi +MOZILLA_CONFIG=$ac_cv_path_MOZILLA_CONFIG +if test -n "$MOZILLA_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLA_CONFIG" >&5 +$as_echo "$MOZILLA_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -if test -n "0.35.0"; then - { echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5 -echo $ECHO_N "checking for intltool >= 0.35.0... $ECHO_C" >&6; } - - INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` - INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` - INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in` - { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5 -echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; } - test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || - { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.35.0 or later." >&5 -echo "$as_me: error: Your intltool is too old. You need intltool 0.35.0 or later." >&2;} - { (exit 1); exit 1; }; } + fi + + if test "x$MOZILLA_CONFIG" != "xno"; then + MOZILLA_CFLAGS=`mozilla-config --cflags` + mozlibdir=`mozilla-config --libs | sed 's/-L//'` + else + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MOZILLA" >&5 +$as_echo_n "checking for MOZILLA... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$MOZILLA_CFLAGS"; then + pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$xulclient\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$xulclient") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_MOZILLA_CFLAGS=`$PKG_CONFIG --cflags "$xulclient" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$MOZILLA_LIBS"; then + pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$xulclient\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$xulclient") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_MOZILLA_LIBS=`$PKG_CONFIG --libs "$xulclient" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' -INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' - INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' -INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' - INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$xulclient"` + else + MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$xulclient"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZILLA_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mozilla-config not found. Mozilla/Netscape plugin will not be built" >&5 +$as_echo "$as_me: WARNING: mozilla-config not found. Mozilla/Netscape plugin will not be built" >&2;} +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mozilla-config not found. Mozilla/Netscape plugin will not be built" >&5 +$as_echo "$as_me: WARNING: mozilla-config not found. Mozilla/Netscape plugin will not be built" >&2;} +else + MOZILLA_CFLAGS=$pkg_cv_MOZILLA_CFLAGS + MOZILLA_LIBS=$pkg_cv_MOZILLA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + build_mozilla_plugin=yes +fi + mozlibdir=`pkg-config --variable=libdir $xulclient` + fi + if test "x$MOZILLA_CFLAGS" != "x"; then + build_mozilla_plugin=yes + saved_CFLAGS=$CFLAGS + CFLAGS=$MOZILLA_CFLAGS + for ac_header in npfunctions.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "npfunctions.h" "ac_cv_header_npfunctions_h" "$ac_includes_default" +if test "x$ac_cv_header_npfunctions_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NPFUNCTIONS_H 1 +_ACEOF +fi +done + CFLAGS=$saved_CFLAGS + fi +fi +# Check whether --with-mozilla-libdir was given. +if test "${with_mozilla_libdir+set}" = set; then : + withval=$with_mozilla_libdir; mozlibdir=$withval +fi + if test "x$build_mozilla_plugin" = "xyes"; then + WITH_MOZILLA_TRUE= + WITH_MOZILLA_FALSE='#' +else + WITH_MOZILLA_TRUE='#' + WITH_MOZILLA_FALSE= +fi +################################################## +# Check for manpage target applications +################################################## -# Check the gettext tools to make sure they are GNU -# Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Extract the first word of "xmllint", so it can be a program name with args. +set dummy xmllint; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XMLLINT+set}" = set; then : + $as_echo_n "(cached) " >&6 else - case $XGETTEXT in + case $XMLLINT in [\\/]* | ?:[\\/]*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -22707,141 +18819,85 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; esac fi -XGETTEXT=$ac_cv_path_XGETTEXT -if test -n "$XGETTEXT"; then - { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 -echo "${ECHO_T}$XGETTEXT" >&6; } +XMLLINT=$ac_cv_path_XMLLINT +if test -n "$XMLLINT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 +$as_echo "$XMLLINT" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -# Extract the first word of "msgmerge", so it can be a program name with args. -set dummy msgmerge; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z $XMLLINT ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`xmllint' was not found. We cannot validate the XML sources." >&5 +$as_echo "$as_me: WARNING: \`xmllint' was not found. We cannot validate the XML sources." >&2;} ; else - case $MSGMERGE in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmllint >= 2.6.24..." >&5 +$as_echo_n "checking for xmllint >= 2.6.24...... " >&6; } - ;; -esac -fi -MSGMERGE=$ac_cv_path_MSGMERGE -if test -n "$MSGMERGE"; then - { echo "$as_me:$LINENO: result: $MSGMERGE" >&5 -echo "${ECHO_T}$MSGMERGE" >&6; } + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.24\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.24") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + XMLLINT="" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`xmllint' not available or too old. We cannot validate the XML sources." >&5 +$as_echo "$as_me: WARNING: \`xmllint' not available or too old. We cannot validate the XML sources." >&2;} -# Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MSGFMT in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - ;; -esac fi -MSGFMT=$ac_cv_path_MSGFMT -if test -n "$MSGFMT"; then - { echo "$as_me:$LINENO: result: $MSGFMT" >&5 -echo "${ECHO_T}$MSGFMT" >&6; } + +fi + + if test "x$XMLLINT" != "x"; then + HAVE_XMLLINT_TRUE= + HAVE_XMLLINT_FALSE='#' else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + HAVE_XMLLINT_TRUE='#' + HAVE_XMLLINT_FALSE= fi -if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then - { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 -echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} - { (exit 1); exit 1; }; } -fi -xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" -mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" -mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" -if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then - { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 -echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} - { (exit 1); exit 1; }; } -fi -# Use the tools built into the package, not the ones that are installed. -INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' -INTLTOOL_MERGE='$(top_builddir)/intltool-merge' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optional xmllint options to use..." >&5 +$as_echo_n "checking for optional xmllint options to use...... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT_FLAGS" >&5 +$as_echo "$XMLLINT_FLAGS" >&6; } -INTLTOOL_UPDATE='$(top_builddir)/intltool-update' -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Extract the first word of "xsltproc", so it can be a program name with args. +set dummy xsltproc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XSLTPROC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - case $INTLTOOL_PERL in + case $XSLTPROC in [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -22849,257 +18905,62 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS - ;; -esac -fi -INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL -if test -n "$INTLTOOL_PERL"; then - { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 -echo "${ECHO_T}$INTLTOOL_PERL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -if test -z "$INTLTOOL_PERL"; then - { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 -echo "$as_me: error: perl not found; required for intltool" >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then - { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 -echo "$as_me: error: perl 5.x required for intltool" >&2;} - { (exit 1); exit 1; }; } -fi -if test "x" != "xno-xml"; then - { echo "$as_me:$LINENO: checking for XML::Parser" >&5 -echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; } - if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } - else - { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 -echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# Substitute ALL_LINGUAS so we can use it in po/Makefile - - -# Set DATADIRNAME correctly if it is not set yet -# (copied from glib-gettext.m4) -if test -z "$DATADIRNAME"; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - DATADIRNAME=share -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - case $host in - *-*-solaris*) - { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 -echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; } -if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. - For example, HP-UX 11i declares gettimeofday. */ -#define bind_textdomain_codeset innocuous_bind_textdomain_codeset - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char bind_textdomain_codeset (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef bind_textdomain_codeset - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char bind_textdomain_codeset (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset -choke me -#endif - -int -main () -{ -return bind_textdomain_codeset (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_bind_textdomain_codeset=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_bind_textdomain_codeset=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 -echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; } -if test $ac_cv_func_bind_textdomain_codeset = yes; then - DATADIRNAME=share -else - DATADIRNAME=lib -fi - - ;; - *) - DATADIRNAME=lib - ;; - esac -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - - - - - -ac_config_commands="$ac_config_commands intltool" - - - - -################################################## -# windows systems -################################################## - -case "$host" in - *-*-mingw* | *cygwin* | *windows*) - native_win32=yes - ;; -esac - -case "$host_os" in - windows* | cygwin* | mingw*) + ;; +esac +fi +XSLTPROC=$ac_cv_path_XSLTPROC +if test -n "$XSLTPROC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -cat >>confdefs.h <<\_ACEOF -#define OS_WIN32 1 -_ACEOF - { echo "$as_me:$LINENO: platform is... Windows/Cygwin/Mingw" >&5 -echo "$as_me: platform is... Windows/Cygwin/Mingw" >&6;} - ;; -esac +if test -z $XSLTPROC ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`xsltproc' was not found! The manpages cannot be updated from their XML source." >&5 +$as_echo "$as_me: WARNING: \`xsltproc' was not found! The manpages cannot be updated from their XML source." >&2;} ; +fi - if test "x$native_win32" = "xyes"; then - OS_WIN32_TRUE= - OS_WIN32_FALSE='#' + if test "x$XSLTPROC" != "x"; then + HAVE_XSLTPROC_TRUE= + HAVE_XSLTPROC_FALSE='#' else - OS_WIN32_TRUE='#' - OS_WIN32_FALSE= + HAVE_XSLTPROC_TRUE='#' + HAVE_XSLTPROC_FALSE= fi -################################################## -# configure options -################################################## -# Check whether --enable-update-databases was given. -if test "${enable_update_databases+set}" = set; then - enableval=$enable_update_databases; -fi -if test "x$enable_update_databases" != "xno"; then - # Extract the first word of "update-desktop-database", so it can be a program name with args. -set dummy update-desktop-database; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_UPDATE_DESKTOP_DATABASE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optional xsltproc options to use..." >&5 +$as_echo_n "checking for optional xsltproc options to use...... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC_FLAGS" >&5 +$as_echo "$XSLTPROC_FLAGS" >&6; } + + + +# Extract the first word of "man", so it can be a program name with args. +set dummy man; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MAN+set}" = set; then : + $as_echo_n "(cached) " >&6 else - case $UPDATE_DESKTOP_DATABASE in + case $MAN in [\\/]* | ?:[\\/]*) - ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path. + ac_cv_path_MAN="$MAN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -23107,2791 +18968,2779 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_path_MAN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS - test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no" ;; esac fi -UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE -if test -n "$UPDATE_DESKTOP_DATABASE"; then - { echo "$as_me:$LINENO: result: $UPDATE_DESKTOP_DATABASE" >&5 -echo "${ECHO_T}$UPDATE_DESKTOP_DATABASE" >&6; } +MAN=$ac_cv_path_MAN +if test -n "$MAN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAN" >&5 +$as_echo "$MAN" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - # Extract the first word of "update-mime-database", so it can be a program name with args. -set dummy update-mime-database; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_UPDATE_MIME_DATABASE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z $MAN ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`man' was not found. We cannot check the manpages for errors. See README." >&5 +$as_echo "$as_me: WARNING: \`man' was not found. We cannot check the manpages for errors. See README." >&2;} ; +fi + + if test "x$MAN" != "x"; then + HAVE_MAN_TRUE= + HAVE_MAN_FALSE='#' else - case $UPDATE_MIME_DATABASE in - [\\/]* | ?:[\\/]*) - ac_cv_path_UPDATE_MIME_DATABASE="$UPDATE_MIME_DATABASE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + HAVE_MAN_TRUE='#' + HAVE_MAN_FALSE= +fi + + + + +# Extract the first word of "gdk-pixbuf-csource", so it can be a program name with args. +set dummy gdk-pixbuf-csource; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_GDK_PIXBUF_CSOURCE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GDK_PIXBUF_CSOURCE"; then + ac_cv_prog_GDK_PIXBUF_CSOURCE="$GDK_PIXBUF_CSOURCE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_UPDATE_MIME_DATABASE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_GDK_PIXBUF_CSOURCE="gdk-pixbuf-csource" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS - test -z "$ac_cv_path_UPDATE_MIME_DATABASE" && ac_cv_path_UPDATE_MIME_DATABASE="no" - ;; -esac fi -UPDATE_MIME_DATABASE=$ac_cv_path_UPDATE_MIME_DATABASE -if test -n "$UPDATE_MIME_DATABASE"; then - { echo "$as_me:$LINENO: result: $UPDATE_MIME_DATABASE" >&5 -echo "${ECHO_T}$UPDATE_MIME_DATABASE" >&6; } +fi +GDK_PIXBUF_CSOURCE=$ac_cv_prog_GDK_PIXBUF_CSOURCE +if test -n "$GDK_PIXBUF_CSOURCE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDK_PIXBUF_CSOURCE" >&5 +$as_echo "$GDK_PIXBUF_CSOURCE" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else - UPDATE_DESKTOP_DATABASE=no - UPDATE_MIME_DATABASE=no + +################################################## +# Path checks +################################################## + +case $srcdir in + /*) + TESTSSRCDIR="$srcdir/tests" + ;; + *) + TESTSSRCDIR=`pwd`"/$srcdir/tests" + ;; +esac + + + +ac_config_files="$ac_config_files Makefile database/Makefile docs/Makefile docs/help/Makefile docs/help/3d/Makefile docs/help/calc/Makefile docs/help/crystal/Makefile docs/help/paint/Makefile docs/help/spectra/Makefile docs/help/table/Makefile docs/man/gcu_entities.dtd docs/man/Makefile docs/reference/Makefile docs/reference/Doxyfile dtds/Makefile glade/Makefile glade/crystal/Makefile glade/paint/Makefile glade/table/Makefile libs/Makefile libs/canvas/Makefile libs/gcp/Makefile libs/gcu/Makefile plugins/Makefile plugins/loaders/Makefile plugins/loaders/cdx/Makefile plugins/loaders/cdxml/Makefile plugins/paint/Makefile plugins/paint/arrows/Makefile plugins/paint/atoms/Makefile plugins/paint/bonds/Makefile plugins/paint/cycles/Makefile plugins/paint/residues/Makefile plugins/paint/selection/Makefile plugins/paint/templates/Makefile plugins/paint/text/Makefile plugins/paint/wikipedia/Makefile mozilla-plugin/Makefile goffice/Makefile pixmaps/Makefile po/Makefile.in samples/Makefile programs/Makefile programs/3d/Makefile programs/3d/gchem3d.desktop.in programs/calc/Makefile programs/calc/gchemcalc.desktop.in programs/crystal/Makefile programs/crystal/gcrystal.desktop.in programs/paint/Makefile programs/paint/gchempaint.desktop.in programs/spectra/Makefile programs/spectra/gspectrum.desktop.in programs/table/Makefile programs/table/gchemtable.desktop.in templates/Makefile templates/paint/Makefile themes/Makefile themes/paint/Makefile tests/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi fi - if test "x$UPDATE_MIME_DATABASE" != "xno"; then - WITH_UPDATE_MIME_TRUE= - WITH_UPDATE_MIME_FALSE='#' +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' else - WITH_UPDATE_MIME_TRUE='#' - WITH_UPDATE_MIME_FALSE= + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= fi - if test "x$UPDATE_DESKTOP_DATABASE" != "xno"; then - WITH_UPDATE_DESKTOP_TRUE= - WITH_UPDATE_DESKTOP_FALSE='#' +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + + ac_config_commands="$ac_config_commands po/stamp-it" + + +if test -z "${ENABLE_SK_TRUE}" && test -z "${ENABLE_SK_FALSE}"; then + as_fn_error "conditional \"ENABLE_SK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_GNOME_DOC_UTILS_TRUE}" && test -z "${HAVE_GNOME_DOC_UTILS_FALSE}"; then + as_fn_error "conditional \"HAVE_GNOME_DOC_UTILS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GCU_IS_STABLE_TRUE}" && test -z "${GCU_IS_STABLE_FALSE}"; then + as_fn_error "conditional \"GCU_IS_STABLE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_UPDATE_DESKTOP_TRUE}" && test -z "${WITH_UPDATE_DESKTOP_FALSE}"; then + as_fn_error "conditional \"WITH_UPDATE_DESKTOP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_UPDATE_MIME_TRUE}" && test -z "${WITH_UPDATE_MIME_FALSE}"; then + as_fn_error "conditional \"WITH_UPDATE_MIME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_KDE_MIME_TRUE}" && test -z "${WITH_KDE_MIME_FALSE}"; then + as_fn_error "conditional \"WITH_KDE_MIME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DOXYGEN_AVAILABLE_TRUE}" && test -z "${DOXYGEN_AVAILABLE_FALSE}"; then + as_fn_error "conditional \"DOXYGEN_AVAILABLE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GCU_NEEDS_GCONF_TRUE}" && test -z "${GCU_NEEDS_GCONF_FALSE}"; then + as_fn_error "conditional \"GCU_NEEDS_GCONF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then + as_fn_error "conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_MOZILLA_TRUE}" && test -z "${WITH_MOZILLA_FALSE}"; then + as_fn_error "conditional \"WITH_MOZILLA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_XMLLINT_TRUE}" && test -z "${HAVE_XMLLINT_FALSE}"; then + as_fn_error "conditional \"HAVE_XMLLINT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then + as_fn_error "conditional \"HAVE_XSLTPROC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_MAN_TRUE}" && test -z "${HAVE_MAN_FALSE}"; then + as_fn_error "conditional \"HAVE_MAN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST else - WITH_UPDATE_DESKTOP_TRUE='#' - WITH_UPDATE_DESKTOP_FALSE= + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi -# Check whether --with-kde-mime-dir was given. -if test "${with_kde_mime_dir+set}" = set; then - withval=$with_kde_mime_dir; -else +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" - # Extract the first word of "kde-config", so it can be a program name with args. -set dummy kde-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_KDECONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $KDECONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_KDECONFIG="$KDECONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_KDECONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS - test -z "$ac_cv_path_KDECONFIG" && ac_cv_path_KDECONFIG="no" - ;; + ;; esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 fi -KDECONFIG=$ac_cv_path_KDECONFIG -if test -n "$KDECONFIG"; then - { echo "$as_me:$LINENO: result: $KDECONFIG" >&5 -echo "${ECHO_T}$KDECONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' - if test "x$KDECONFIG" != "xno"; then - with_kde_mime_dir="`$KDECONFIG --install mime`" - else - with_kde_mime_dir="${datadir}/mimelnk" - fi +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -fi -{ echo "$as_me:$LINENO: checking for KDE MIME files (.desktop) installation location" >&5 -echo $ECHO_N "checking for KDE MIME files (.desktop) installation location... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $with_kde_mime_dir" >&5 -echo "${ECHO_T}$with_kde_mime_dir" >&6; } - if test "x$with_kde_mime_dir" != "xno"; then - WITH_KDE_MIME_TRUE= - WITH_KDE_MIME_FALSE='#' -else - WITH_KDE_MIME_TRUE='#' - WITH_KDE_MIME_FALSE= -fi +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status -################################################## -# pkgconfig -################################################## +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + as_expr=false +fi - ;; -esac +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6; } + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + as_dirname=false fi +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - ;; +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG + as_ln_s='cp -p' fi else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - + as_ln_s='cp -p' fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - PKG_CONFIG="" - fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -fi -LIBGLADE_REQUIRED_VERSION=2.4.0 -GTKGLEXT_REQUIRED_VERSION=1.0.0 -GNOME_PRINT_REQUIRED_VERSION=2.4.0 -GNOME_VFS_REQUIRED_VERSION=2.4.0 -SHARED_MIME_INFO_REQUIRED_VERSION=0.12 -OPENBABEL_REQUIRED_VERSION=2.1.0 -GTK_REQUIRED_VERSION=2.10.0 -GNOME_OFFICE_REQUIRED_VERSION=0.4.0 -GNOME_OFFICE_MAX_VERSION=0.5.0 -CHEMICAL_MIME_DATA_REQUIRED_VERSION=0.1.94 -BODR_REQUIRED_VERSION=5 - -REQUIREMENTS="libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION \ -gtk+-2.0 >= $GTK_REQUIRED_VERSION \ -gtkglext-1.0 >= $GTKGLEXT_REQUIRED_VERSION \ -libgnomeprintui-2.2 >= $GNOME_PRINT_REQUIRED_VERSION \ -gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION \ -libgoffice-0.4 >= $GNOME_OFFICE_REQUIRED_VERSION \ -libgoffice-0.4 < $GNOME_OFFICE_MAX_VERSION \ -chemical-mime-data >= $CHEMICAL_MIME_DATA_REQUIRED_VERSION \ -shared-mime-info >= $SHARED_MIME_INFO_REQUIRED_VERSION \ -openbabel-2.0 >= $OPENBABEL_REQUIRED_VERSION \ -bodr >= $BODR_REQUIRED_VERSION" +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -pkg_failed=no -{ echo "$as_me:$LINENO: checking for GCU" >&5 -echo $ECHO_N "checking for GCU... $ECHO_C" >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GCU_CFLAGS"; then - pkg_cv_GCU_CFLAGS="$GCU_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIREMENTS\"") >&5 - ($PKG_CONFIG --exists --print-errors "$REQUIREMENTS") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GCU_CFLAGS=`$PKG_CONFIG --cflags "$REQUIREMENTS" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$GCU_LIBS"; then - pkg_cv_GCU_LIBS="$GCU_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIREMENTS\"") >&5 - ($PKG_CONFIG --exists --print-errors "$REQUIREMENTS") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GCU_LIBS=`$PKG_CONFIG --libs "$REQUIREMENTS" 2>/dev/null` +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' else - pkg_failed=yes + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi - fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - pkg_failed=untried + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi +as_executable_p=$as_test_x +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GCU_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$REQUIREMENTS"` - else - GCU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$REQUIREMENTS"` - fi - # Put the nasty error message in config.log where it belongs - echo "$GCU_PKG_ERRORS" >&5 +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - { { echo "$as_me:$LINENO: error: Package requirements ($REQUIREMENTS) were not met: +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by gnome-chemistry-utils $as_me 0.10.9, which was +generated by GNU Autoconf 2.64. Invocation command line was -$GCU_PKG_ERRORS + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" -Alternatively, you may set the environment variables GCU_CFLAGS -and GCU_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -echo "$as_me: error: Package requirements ($REQUIREMENTS) were not met: +_ACEOF -$GCU_PKG_ERRORS +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac -Alternatively, you may set the environment variables GCU_CFLAGS -and GCU_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -Alternatively, you may set the environment variables GCU_CFLAGS -and GCU_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -To get pkg-config, see . -See \`config.log' for more details." >&5 -echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +_ACEOF -Alternatively, you may set the environment variables GCU_CFLAGS -and GCU_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - GCU_CFLAGS=$pkg_cv_GCU_CFLAGS - GCU_LIBS=$pkg_cv_GCU_LIBS - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - : -fi +Usage: $0 [OPTION]... [TAG]... + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE +Configuration files: +$config_files +Configuration headers: +$config_headers -################################################## -# FLAGS/LIBS -################################################## +Configuration commands: +$config_commands +Report bugs to ." -CFLAGS="$CFLAGS -Wall $GCU_CFLAGS" +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +gnome-chemistry-utils config.status 0.10.9 +configured by $0, generated by GNU Autoconf 2.64, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -CXXFLAGS="$CXXFLAGS -Wall $GCU_CFLAGS" +Copyright (C) 2009 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF -if test "x$native_win32" = "xyes"; then - LDFLAGS="$LDFLAGS -no-undefined" -fi +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac -LIBS="$LIBS $GCU_LIBS" + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; -################################################## -# xulrunner -################################################## + # This is an error. + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + esac + shift +done +ac_configure_extra_args= -for pack in xulrunner seamonkey firefox mozilla; do - if test "x$XULRUNNER_CLIENT" = "x"; then - if pkg-config --exists $pack-plugin; then - XULRUNNER_CLIENT=$pack-plugin - fi - fi -done -if test "x$XULRUNNER_CLIENT" = x; then - # Not important. Things will fail below. - libgoffice=mozilla-plugin +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" fi -MOZILLA_CFLAGS= -build_mozilla_plugin=no -enable_mozilla_plugin=yes -# Check whether --enable-mozilla-plugin was given. -if test "${enable_mozilla_plugin+set}" = set; then - enableval=$enable_mozilla_plugin; +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 -if test "x$enable_mozilla_plugin" != "xno"; then - if test -z "$MOZILLA_CONFIG"; then - # Extract the first word of "mozilla-config", so it can be a program name with args. -set dummy mozilla-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_MOZILLA_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MOZILLA_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_MOZILLA_CONFIG="$MOZILLA_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MOZILLA_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' +predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' +postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_flag_spec_ld_CXX \ +hardcode_libdir_separator_CXX \ +fix_srcfile_path_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac done -IFS=$as_save_IFS - test -z "$ac_cv_path_MOZILLA_CONFIG" && ac_cv_path_MOZILLA_CONFIG="no" +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac -fi -MOZILLA_CONFIG=$ac_cv_path_MOZILLA_CONFIG -if test -n "$MOZILLA_CONFIG"; then - { echo "$as_me:$LINENO: result: $MOZILLA_CONFIG" >&5 -echo "${ECHO_T}$MOZILLA_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST fi - fi + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' - if test "x$MOZILLA_CONFIG" != "xno"; then - MOZILLA_CFLAGS=`mozilla-config --cflags` - default_mozilla_libdir=`mozilla-config --libs | sed 's/-L//'` - elif test -n "$XULRUNNER_CLIENT"; then -pkg_failed=no -{ echo "$as_me:$LINENO: checking for MOZILLA" >&5 -echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$MOZILLA_CFLAGS"; then - pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XULRUNNER_CLIENT\"") >&5 - ($PKG_CONFIG --exists --print-errors "$XULRUNNER_CLIENT") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZILLA_CFLAGS=`$PKG_CONFIG --cflags "$XULRUNNER_CLIENT" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$MOZILLA_LIBS"; then - pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XULRUNNER_CLIENT\"") >&5 - ($PKG_CONFIG --exists --print-errors "$XULRUNNER_CLIENT") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZILLA_LIBS=`$PKG_CONFIG --libs "$XULRUNNER_CLIENT" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$XULRUNNER_CLIENT"` - else - MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$XULRUNNER_CLIENT"` - fi - # Put the nasty error message in config.log where it belongs - echo "$MOZILLA_PKG_ERRORS" >&5 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;; + "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "docs/help/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/Makefile" ;; + "docs/help/3d/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/3d/Makefile" ;; + "docs/help/calc/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/calc/Makefile" ;; + "docs/help/crystal/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/crystal/Makefile" ;; + "docs/help/paint/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/paint/Makefile" ;; + "docs/help/spectra/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/spectra/Makefile" ;; + "docs/help/table/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/table/Makefile" ;; + "docs/man/gcu_entities.dtd") CONFIG_FILES="$CONFIG_FILES docs/man/gcu_entities.dtd" ;; + "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; + "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; + "docs/reference/Doxyfile") CONFIG_FILES="$CONFIG_FILES docs/reference/Doxyfile" ;; + "dtds/Makefile") CONFIG_FILES="$CONFIG_FILES dtds/Makefile" ;; + "glade/Makefile") CONFIG_FILES="$CONFIG_FILES glade/Makefile" ;; + "glade/crystal/Makefile") CONFIG_FILES="$CONFIG_FILES glade/crystal/Makefile" ;; + "glade/paint/Makefile") CONFIG_FILES="$CONFIG_FILES glade/paint/Makefile" ;; + "glade/table/Makefile") CONFIG_FILES="$CONFIG_FILES glade/table/Makefile" ;; + "libs/Makefile") CONFIG_FILES="$CONFIG_FILES libs/Makefile" ;; + "libs/canvas/Makefile") CONFIG_FILES="$CONFIG_FILES libs/canvas/Makefile" ;; + "libs/gcp/Makefile") CONFIG_FILES="$CONFIG_FILES libs/gcp/Makefile" ;; + "libs/gcu/Makefile") CONFIG_FILES="$CONFIG_FILES libs/gcu/Makefile" ;; + "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; + "plugins/loaders/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/loaders/Makefile" ;; + "plugins/loaders/cdx/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/loaders/cdx/Makefile" ;; + "plugins/loaders/cdxml/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/loaders/cdxml/Makefile" ;; + "plugins/paint/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/Makefile" ;; + "plugins/paint/arrows/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/arrows/Makefile" ;; + "plugins/paint/atoms/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/atoms/Makefile" ;; + "plugins/paint/bonds/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/bonds/Makefile" ;; + "plugins/paint/cycles/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/cycles/Makefile" ;; + "plugins/paint/residues/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/residues/Makefile" ;; + "plugins/paint/selection/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/selection/Makefile" ;; + "plugins/paint/templates/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/templates/Makefile" ;; + "plugins/paint/text/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/text/Makefile" ;; + "plugins/paint/wikipedia/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/paint/wikipedia/Makefile" ;; + "mozilla-plugin/Makefile") CONFIG_FILES="$CONFIG_FILES mozilla-plugin/Makefile" ;; + "goffice/Makefile") CONFIG_FILES="$CONFIG_FILES goffice/Makefile" ;; + "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; + "programs/Makefile") CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;; + "programs/3d/Makefile") CONFIG_FILES="$CONFIG_FILES programs/3d/Makefile" ;; + "programs/3d/gchem3d.desktop.in") CONFIG_FILES="$CONFIG_FILES programs/3d/gchem3d.desktop.in" ;; + "programs/calc/Makefile") CONFIG_FILES="$CONFIG_FILES programs/calc/Makefile" ;; + "programs/calc/gchemcalc.desktop.in") CONFIG_FILES="$CONFIG_FILES programs/calc/gchemcalc.desktop.in" ;; + "programs/crystal/Makefile") CONFIG_FILES="$CONFIG_FILES programs/crystal/Makefile" ;; + "programs/crystal/gcrystal.desktop.in") CONFIG_FILES="$CONFIG_FILES programs/crystal/gcrystal.desktop.in" ;; + "programs/paint/Makefile") CONFIG_FILES="$CONFIG_FILES programs/paint/Makefile" ;; + "programs/paint/gchempaint.desktop.in") CONFIG_FILES="$CONFIG_FILES programs/paint/gchempaint.desktop.in" ;; + "programs/spectra/Makefile") CONFIG_FILES="$CONFIG_FILES programs/spectra/Makefile" ;; + "programs/spectra/gspectrum.desktop.in") CONFIG_FILES="$CONFIG_FILES programs/spectra/gspectrum.desktop.in" ;; + "programs/table/Makefile") CONFIG_FILES="$CONFIG_FILES programs/table/Makefile" ;; + "programs/table/gchemtable.desktop.in") CONFIG_FILES="$CONFIG_FILES programs/table/gchemtable.desktop.in" ;; + "templates/Makefile") CONFIG_FILES="$CONFIG_FILES templates/Makefile" ;; + "templates/paint/Makefile") CONFIG_FILES="$CONFIG_FILES templates/paint/Makefile" ;; + "themes/Makefile") CONFIG_FILES="$CONFIG_FILES themes/Makefile" ;; + "themes/paint/Makefile") CONFIG_FILES="$CONFIG_FILES themes/paint/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - build_mozilla_plugin=no + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done -elif test $pkg_failed = untried; then - build_mozilla_plugin=no -else - MOZILLA_CFLAGS=$pkg_cv_MOZILLA_CFLAGS - MOZILLA_LIBS=$pkg_cv_MOZILLA_LIBS - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - build_mozilla_plugin=yes +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi - default_mozilla_libdir=`pkg-config --variable=libdir $XULRUNNER_CLIENT` - fi - if test "x$MOZILLA_CFLAGS" != "x"; then - build_mozilla_plugin=yes - else - { echo "$as_me:$LINENO: WARNING: mozilla-config or $XULRUNNER_CLIENT.pc not found." >&5 -echo "$as_me: WARNING: mozilla-config or $XULRUNNER_CLIENT.pc not found." >&2;} - { echo "$as_me:$LINENO: WARNING: Mozilla/Netscape plugin will not be built" >&5 -echo "$as_me: WARNING: Mozilla/Netscape plugin will not be built" >&2;} - fi -fi +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 -# Check whether --with-mozilla-libdir was given. -if test "${with_mozilla_libdir+set}" = set; then - withval=$with_mozilla_libdir; - if test "x$withval" = "xno"; then - { echo "$as_me:$LINENO: WARNING: Use --disable-mozilla-plugin to not build the package." >&5 -echo "$as_me: WARNING: Use --disable-mozilla-plugin to not build the package." >&2;} - with_mozilla_libdir=$default_mozilla_libdir - fi +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then -else - with_mozilla_libdir=$default_mozilla_libdir +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' fi - - - if test "x$build_mozilla_plugin" = "xyes"; then - WITH_MOZILLA_TRUE= - WITH_MOZILLA_FALSE='#' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' else - WITH_MOZILLA_TRUE='#' - WITH_MOZILLA_FALSE= + ac_cs_awk_cr=$ac_cr fi +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -################################################## -# misc -################################################## + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef GOFFICE_WITH_GNOME -#error no gnome support present -#endif +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" -int -main () +} { + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } - ; - return 0; + print line } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: you need a libgoffice version with gnome support" >&5 -echo "$as_me: error: you need a libgoffice version with gnome support" >&2;} - { (exit 1); exit 1; }; } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 +_ACEOF +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# Extract the first word of "gconftool-2", so it can be a program name with args. -set dummy gconftool-2; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_GCONFTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $GCONFTOOL in - [\\/]* | ?:[\\/]*) - ac_cv_path_GCONFTOOL="$GCONFTOOL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GCONFTOOL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_GCONFTOOL" && ac_cv_path_GCONFTOOL="no" - ;; -esac -fi -GCONFTOOL=$ac_cv_path_GCONFTOOL -if test -n "$GCONFTOOL"; then - { echo "$as_me:$LINENO: result: $GCONFTOOL" >&5 -echo "${ECHO_T}$GCONFTOOL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF -if test "x$GCONFTOOL" = "xno"; then - { { echo "$as_me:$LINENO: error: gconftool-2 executable not found in your path - should be installed with GConf" >&5 -echo "$as_me: error: gconftool-2 executable not found in your path - should be installed with GConf" >&2;} - { (exit 1); exit 1; }; } -fi +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. - if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then - GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else - GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi +done +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. -# Check whether --with-gconf-source was given. -if test "${with_gconf_source+set}" = set; then - withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval" -fi - - +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" - { echo "$as_me:$LINENO: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5 -echo "${ECHO_T}Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; } - if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then - GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' - fi +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done -# Check whether --with-gconf-schema-file-dir was given. -if test "${with_gconf_schema_file_dir+set}" = set; then - withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval" -fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. - { echo "$as_me:$LINENO: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5 -echo "${ECHO_T}Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; } +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix - # Check whether --enable-schemas-install was given. -if test "${enable_schemas_install+set}" = set; then - enableval=$enable_schemas_install; case ${enableval} in - yes|no) ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-schemas-install" >&5 -echo "$as_me: error: bad value ${enableval} for --enable-schemas-install" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - if test "$enable_schemas_install" != no; then - GCONF_SCHEMAS_INSTALL_TRUE= - GCONF_SCHEMAS_INSTALL_FALSE='#' -else - GCONF_SCHEMAS_INSTALL_TRUE='#' - GCONF_SCHEMAS_INSTALL_FALSE= -fi + case $ac_mode in + :F) + # + # CONFIG_FILE + # + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF -bodr_pkgdatadir=`pkg-config --variable=pkgdatadir bodr` +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF -cat >>confdefs.h <<_ACEOF -#define BODR_PKGDATADIR "$bodr_pkgdatadir" +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_DOXYGEN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $DOXYGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="no" - ;; -esac -fi -DOXYGEN=$ac_cv_path_DOXYGEN -if test -n "$DOXYGEN"; then - { echo "$as_me:$LINENO: result: $DOXYGEN" >&5 -echo "${ECHO_T}$DOXYGEN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "x$DOXYGEN" != "xno"; then - DOXYGEN_AVAILABLE_TRUE= - DOXYGEN_AVAILABLE_FALSE='#' -else - DOXYGEN_AVAILABLE_TRUE='#' - DOXYGEN_AVAILABLE_FALSE= -fi +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking for vector::at usability" >&5 -echo $ECHO_N "checking for vector::at usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -std::vector v; v.at(0) = 0; - ; - return 0; + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - -cat >>confdefs.h <<\_ACEOF -#define HAS_VECTOR_AT 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ;; + "libtool":C) -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" -fi + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -################################################## -# manpage target -################################################## +# The names of the tagged configurations supported by this script. +available_tags="CXX " +# ### BEGIN LIBTOOL CONFIG -# Extract the first word of "xmllint", so it can be a program name with args. -set dummy xmllint; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_XMLLINT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $XMLLINT in - [\\/]* | ?:[\\/]*) - ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# Whether or not to build static libraries. +build_old_libs=$enable_static - ;; -esac -fi -XMLLINT=$ac_cv_path_XMLLINT -if test -n "$XMLLINT"; then - { echo "$as_me:$LINENO: result: $XMLLINT" >&5 -echo "${ECHO_T}$XMLLINT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared -if test -z $XMLLINT ; then - { echo "$as_me:$LINENO: WARNING: \`xmllint' was not found. We cannot validate the XML sources." >&5 -echo "$as_me: WARNING: \`xmllint' was not found. We cannot validate the XML sources." >&2;} ; -else - { echo "$as_me:$LINENO: checking for xmllint >= 2.6.24..." >&5 -echo $ECHO_N "checking for xmllint >= 2.6.24...... $ECHO_C" >&6; } +# What type of objects to build. +pic_mode=$pic_mode - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.24\"") >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.24") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - XMLLINT="" - { echo "$as_me:$LINENO: WARNING: \`xmllint' not available or too old. We cannot validate the XML sources." >&5 -echo "$as_me: WARNING: \`xmllint' not available or too old. We cannot validate the XML sources." >&2;} +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os -fi +# A sed program that does not truncate output. +SED=$lt_SED -fi +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" - if test "x$XMLLINT" != "x"; then - HAVE_XMLLINT_TRUE= - HAVE_XMLLINT_FALSE='#' -else - HAVE_XMLLINT_TRUE='#' - HAVE_XMLLINT_FALSE= -fi +# A grep program that handles long lines. +GREP=$lt_GREP +# An ERE matcher. +EGREP=$lt_EGREP +# A literal string matcher. +FGREP=$lt_FGREP +# A BSD- or MS-compatible name lister. +NM=$lt_NM -{ echo "$as_me:$LINENO: checking for optional xmllint options to use..." >&5 -echo $ECHO_N "checking for optional xmllint options to use...... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $XMLLINT_FLAGS" >&5 -echo "${ECHO_T}$XMLLINT_FLAGS" >&6; } +# Whether we need soft or hard links. +LN_S=$lt_LN_S +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len +# Object file suffix (normally "o"). +objext=$ac_objext -# Extract the first word of "xsltproc", so it can be a program name with args. -set dummy xsltproc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_XSLTPROC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $XSLTPROC in - [\\/]* | ?:[\\/]*) - ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# Executable file suffix (normally ""). +exeext=$exeext - ;; -esac -fi -XSLTPROC=$ac_cv_path_XSLTPROC -if test -n "$XSLTPROC"; then - { echo "$as_me:$LINENO: result: $XSLTPROC" >&5 -echo "${ECHO_T}$XSLTPROC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi +# whether the shell understands "unset". +lt_unset=$lt_unset +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL -if test -z $XSLTPROC ; then - { echo "$as_me:$LINENO: WARNING: \`xsltproc' was not found! The manpages cannot be updated from their XML source." >&5 -echo "$as_me: WARNING: \`xsltproc' was not found! The manpages cannot be updated from their XML source." >&2;} ; -fi +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP - if test "x$XSLTPROC" != "x"; then - HAVE_XSLTPROC_TRUE= - HAVE_XSLTPROC_FALSE='#' -else - HAVE_XSLTPROC_TRUE='#' - HAVE_XSLTPROC_FALSE= -fi +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd -{ echo "$as_me:$LINENO: checking for optional xsltproc options to use..." >&5 -echo $ECHO_N "checking for optional xsltproc options to use...... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $XSLTPROC_FLAGS" >&5 -echo "${ECHO_T}$XSLTPROC_FLAGS" >&6; } +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS +# A symbol stripping program. +STRIP=$lt_STRIP +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds -# Extract the first word of "man", so it can be a program name with args. -set dummy man; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_MAN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAN in - [\\/]* | ?:[\\/]*) - ac_cv_path_MAN="$MAN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MAN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# A C compiler. +LTCC=$lt_CC - ;; -esac -fi -MAN=$ac_cv_path_MAN -if test -n "$MAN"; then - { echo "$as_me:$LINENO: result: $MAN" >&5 -echo "${ECHO_T}$MAN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -if test -z $MAN ; then - { echo "$as_me:$LINENO: WARNING: \`man' was not found. We cannot check the manpages for errors. See README." >&5 -echo "$as_me: WARNING: \`man' was not found. We cannot check the manpages for errors. See README." >&2;} ; -fi +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - if test "x$MAN" != "x"; then - HAVE_MAN_TRUE= - HAVE_MAN_FALSE='#' -else - HAVE_MAN_TRUE='#' - HAVE_MAN_FALSE= -fi +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# The name of the directory that contains temporary libtool files. +objdir=$objdir -################################################## -# Path checks -################################################## +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL -case $srcdir in - /*) - TESTSSRCDIR="$srcdir/tests" - ;; - *) - TESTSSRCDIR=`pwd`"/$srcdir/tests" - ;; -esac +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD +# Must we lock files when doing compilation? +need_locks=$lt_need_locks -################################################## -# output -################################################## +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL -ac_config_files="$ac_config_files Makefile gcu.pc database/Makefile docs/Makefile docs/help/Makefile docs/help/3d/Makefile docs/help/calc/Makefile docs/help/crystal/Makefile docs/help/table/Makefile docs/man/gcu_entities.dtd docs/man/Makefile docs/reference/Makefile docs/reference/Doxyfile dtds/Makefile gcu/Makefile glade/Makefile glade/crystal/Makefile glade/table/Makefile mozilla-plugin/Makefile pixmaps/Makefile po/Makefile.in samples/Makefile programs/Makefile programs/3d/Makefile programs/calc/Makefile programs/crystal/Makefile programs/table/Makefile tests/Makefile" +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO -_ACEOF +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache +# Old archive suffix (normally "a"). +libext=$libext -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds -DEFS=-DHAVE_CONFIG_H +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink -LTLIBOBJS=$ac_ltlibobjs +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix +# Do we need a version for libraries? +need_version=$need_version -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_SK_TRUE}" && test -z "${ENABLE_SK_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_SK\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_SK\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_GNOME_DOC_UTILS_TRUE}" && test -z "${HAVE_GNOME_DOC_UTILS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_GNOME_DOC_UTILS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_GNOME_DOC_UTILS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi +# Library versioning type. +version_type=$version_type - ac_config_commands="$ac_config_commands po/stamp-it" +# Shared library runtime path variable. +runpath_var=$runpath_var +# Shared library path variable. +shlibpath_var=$shlibpath_var -if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"OS_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"OS_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_UPDATE_MIME_TRUE}" && test -z "${WITH_UPDATE_MIME_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_UPDATE_MIME\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_UPDATE_MIME\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_UPDATE_DESKTOP_TRUE}" && test -z "${WITH_UPDATE_DESKTOP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_UPDATE_DESKTOP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_UPDATE_DESKTOP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_KDE_MIME_TRUE}" && test -z "${WITH_KDE_MIME_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_KDE_MIME\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_KDE_MIME\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_MOZILLA_TRUE}" && test -z "${WITH_MOZILLA_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_MOZILLA\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_MOZILLA\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${DOXYGEN_AVAILABLE_TRUE}" && test -z "${DOXYGEN_AVAILABLE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"DOXYGEN_AVAILABLE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"DOXYGEN_AVAILABLE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_XMLLINT_TRUE}" && test -z "${HAVE_XMLLINT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_XMLLINT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_XMLLINT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_XSLTPROC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_XSLTPROC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_MAN_TRUE}" && test -z "${HAVE_MAN_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_MAN\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_MAN\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. +# Format of library name prefix. +libname_spec=$lt_libname_spec -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds -fi +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# Whether dlopen is supported. +dlopen_support=$enable_dlopen +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' +# The linker used to build libraries. +LD=$lt_LD -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi +# A language specific compiler. +CC=$lt_compiler -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi +# Is the compiler the GNU compiler? +with_gcc=$GCC +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl -# CDPATH. -$as_unset CDPATH +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct -exec 6>&1 +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by gnome-chemistry-utils $as_me 0.8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic -_ACEOF +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs -_ACEOF +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols -Usage: $0 [OPTIONS] [FILE]... +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms -Configuration files: -$config_files +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms -Configuration headers: -$config_headers +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds -Configuration commands: -$config_commands +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec -Report bugs to ." +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -gnome-chemistry-utils config.status 0.8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -_ACEOF +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF ;; esac - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; +ltmain="$ac_aux_dir/ltmain.sh" - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; esac - shift -done +} -ac_configure_extra_args= +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log +# func_opt_split +func_opt_split () { - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} -INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' -prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" -INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} -_ACEOF +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} -cat >>$CONFIG_STATUS <<\_ACEOF +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; - "intltool") CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "gcu.pc") CONFIG_FILES="$CONFIG_FILES gcu.pc" ;; - "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;; - "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "docs/help/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/Makefile" ;; - "docs/help/3d/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/3d/Makefile" ;; - "docs/help/calc/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/calc/Makefile" ;; - "docs/help/crystal/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/crystal/Makefile" ;; - "docs/help/table/Makefile") CONFIG_FILES="$CONFIG_FILES docs/help/table/Makefile" ;; - "docs/man/gcu_entities.dtd") CONFIG_FILES="$CONFIG_FILES docs/man/gcu_entities.dtd" ;; - "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; - "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; - "docs/reference/Doxyfile") CONFIG_FILES="$CONFIG_FILES docs/reference/Doxyfile" ;; - "dtds/Makefile") CONFIG_FILES="$CONFIG_FILES dtds/Makefile" ;; - "gcu/Makefile") CONFIG_FILES="$CONFIG_FILES gcu/Makefile" ;; - "glade/Makefile") CONFIG_FILES="$CONFIG_FILES glade/Makefile" ;; - "glade/crystal/Makefile") CONFIG_FILES="$CONFIG_FILES glade/crystal/Makefile" ;; - "glade/table/Makefile") CONFIG_FILES="$CONFIG_FILES glade/table/Makefile" ;; - "mozilla-plugin/Makefile") CONFIG_FILES="$CONFIG_FILES mozilla-plugin/Makefile" ;; - "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; - "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; - "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; - "programs/Makefile") CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;; - "programs/3d/Makefile") CONFIG_FILES="$CONFIG_FILES programs/3d/Makefile" ;; - "programs/calc/Makefile") CONFIG_FILES="$CONFIG_FILES programs/calc/Makefile" ;; - "programs/crystal/Makefile") CONFIG_FILES="$CONFIG_FILES programs/crystal/Makefile" ;; - "programs/table/Makefile") CONFIG_FILES="$CONFIG_FILES programs/table/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac -done +} +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || +# func_lo2o object +func_lo2o () { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } -# Create a (secure) tmp directory for tmp files. +# func_xform libobj-or-source +func_xform () { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () { - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } -# -# Set up the sed scripts for CONFIG_FILES section. -# +_LT_EOF +esac -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" -_ACEOF +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} +_LT_EOF + ;; + esac -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim -MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim -MAINT!$MAINT$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -GCU_VERSION_INFO!$GCU_VERSION_INFO$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -SED!$SED$ac_delim -_ACEOF + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF + cat <<_LT_EOF >> "$ofile" +# ### BEGIN LIBTOOL TAG CONFIG: CXX -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -DLLTOOL!$DLLTOOL$ac_delim -AS!$AS$ac_delim -OBJDUMP!$OBJDUMP$ac_delim -CXXCPP!$CXXCPP$ac_delim -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -PKG_CONFIG!$PKG_CONFIG$ac_delim -HELP_DIR!$HELP_DIR$ac_delim -OMF_DIR!$OMF_DIR$ac_delim -DOC_USER_FORMATS!$DOC_USER_FORMATS$ac_delim -ENABLE_SK_TRUE!$ENABLE_SK_TRUE$ac_delim -ENABLE_SK_FALSE!$ENABLE_SK_FALSE$ac_delim -HAVE_GNOME_DOC_UTILS_TRUE!$HAVE_GNOME_DOC_UTILS_TRUE$ac_delim -HAVE_GNOME_DOC_UTILS_FALSE!$HAVE_GNOME_DOC_UTILS_FALSE$ac_delim -USE_NLS!$USE_NLS$ac_delim -MSGFMT!$MSGFMT$ac_delim -MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim -GMSGFMT!$GMSGFMT$ac_delim -XGETTEXT!$XGETTEXT$ac_delim -CATALOGS!$CATALOGS$ac_delim -CATOBJEXT!$CATOBJEXT$ac_delim -DATADIRNAME!$DATADIRNAME$ac_delim -GMOFILES!$GMOFILES$ac_delim -INSTOBJEXT!$INSTOBJEXT$ac_delim -INTLLIBS!$INTLLIBS$ac_delim -PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim -PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim -POFILES!$POFILES$ac_delim -POSUB!$POSUB$ac_delim -MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim -GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim -INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim -INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim -INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim -INTLTOOL_PROP_RULE!$INTLTOOL_PROP_RULE$ac_delim -INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim -INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim -INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim -INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim -INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim -INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim -INTLTOOL_XAM_RULE!$INTLTOOL_XAM_RULE$ac_delim -INTLTOOL_KBD_RULE!$INTLTOOL_KBD_RULE$ac_delim -INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim -INTLTOOL_XML_NOMERGE_RULE!$INTLTOOL_XML_NOMERGE_RULE$ac_delim -INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim -INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim -INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim -INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim -INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim -MSGMERGE!$MSGMERGE$ac_delim -INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim -INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim -INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim -INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim -ALL_LINGUAS!$ALL_LINGUAS$ac_delim -OS_WIN32_TRUE!$OS_WIN32_TRUE$ac_delim -OS_WIN32_FALSE!$OS_WIN32_FALSE$ac_delim -UPDATE_DESKTOP_DATABASE!$UPDATE_DESKTOP_DATABASE$ac_delim -UPDATE_MIME_DATABASE!$UPDATE_MIME_DATABASE$ac_delim -WITH_UPDATE_MIME_TRUE!$WITH_UPDATE_MIME_TRUE$ac_delim -WITH_UPDATE_MIME_FALSE!$WITH_UPDATE_MIME_FALSE$ac_delim -WITH_UPDATE_DESKTOP_TRUE!$WITH_UPDATE_DESKTOP_TRUE$ac_delim -WITH_UPDATE_DESKTOP_FALSE!$WITH_UPDATE_DESKTOP_FALSE$ac_delim -KDECONFIG!$KDECONFIG$ac_delim -WITH_KDE_MIME_TRUE!$WITH_KDE_MIME_TRUE$ac_delim -WITH_KDE_MIME_FALSE!$WITH_KDE_MIME_FALSE$ac_delim -with_kde_mime_dir!$with_kde_mime_dir$ac_delim -GCU_CFLAGS!$GCU_CFLAGS$ac_delim -GCU_LIBS!$GCU_LIBS$ac_delim -MOZILLA_CONFIG!$MOZILLA_CONFIG$ac_delim -XULRUNNER_CLIENT!$XULRUNNER_CLIENT$ac_delim -MOZILLA_CFLAGS!$MOZILLA_CFLAGS$ac_delim -MOZILLA_LIBS!$MOZILLA_LIBS$ac_delim -WITH_MOZILLA_TRUE!$WITH_MOZILLA_TRUE$ac_delim -WITH_MOZILLA_FALSE!$WITH_MOZILLA_FALSE$ac_delim -with_mozilla_libdir!$with_mozilla_libdir$ac_delim -GCONFTOOL!$GCONFTOOL$ac_delim -GCONF_SCHEMA_CONFIG_SOURCE!$GCONF_SCHEMA_CONFIG_SOURCE$ac_delim -GCONF_SCHEMA_FILE_DIR!$GCONF_SCHEMA_FILE_DIR$ac_delim -GCONF_SCHEMAS_INSTALL_TRUE!$GCONF_SCHEMAS_INSTALL_TRUE$ac_delim -GCONF_SCHEMAS_INSTALL_FALSE!$GCONF_SCHEMAS_INSTALL_FALSE$ac_delim -DOXYGEN!$DOXYGEN$ac_delim -DOXYGEN_AVAILABLE_TRUE!$DOXYGEN_AVAILABLE_TRUE$ac_delim -DOXYGEN_AVAILABLE_FALSE!$DOXYGEN_AVAILABLE_FALSE$ac_delim -XMLLINT!$XMLLINT$ac_delim -HAVE_XMLLINT_TRUE!$HAVE_XMLLINT_TRUE$ac_delim -HAVE_XMLLINT_FALSE!$HAVE_XMLLINT_FALSE$ac_delim -XMLLINT_FLAGS!$XMLLINT_FLAGS$ac_delim -XSLTPROC!$XSLTPROC$ac_delim -HAVE_XSLTPROC_TRUE!$HAVE_XSLTPROC_TRUE$ac_delim -_ACEOF +# The linker used to build libraries. +LD=$lt_LD_CXX - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +# A language specific compiler. +CC=$lt_compiler_CXX -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -HAVE_XSLTPROC_FALSE!$HAVE_XSLTPROC_FALSE$ac_delim -XSLTPROC_FLAGS!$XSLTPROC_FLAGS$ac_delim -MAN!$MAN$ac_delim -HAVE_MAN_TRUE!$HAVE_MAN_TRUE$ac_delim -HAVE_MAN_FALSE!$HAVE_MAN_FALSE$ac_delim -TESTSSRCDIR!$TESTSSRCDIR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX - case $ac_mode in - :F) - # - # CONFIG_FILE - # +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path_CXX -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $ac_file | $ac_file:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| . 2>/dev/null || -echo X$ac_file | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; - "intltool":C) - -for file in intltool-extract intltool-merge intltool-update; do - sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ - -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ - -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ - < ${ac_aux_dir}/${file}.in > ${file}.out - if cmp -s ${file} ${file}.out 2>/dev/null; then - rm -f ${file}.out - else - mv -f ${file}.out ${file} - fi - chmod ugo+x ${file} - chmod u+w ${file} -done - - ;; "po/stamp-it":C) + if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then + as_fn_error "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 + fi rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" >"po/stamp-it.tmp" sed '/^#/d @@ -25900,17 +21749,11 @@ '"s|^| $ac_top_srcdir/|" \ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" - if test ! -f "po/Makefile"; then - { { echo "$as_me:$LINENO: error: po/Makefile is not ready." >&5 -echo "$as_me: error: po/Makefile is not ready." >&2;} - { (exit 1); exit 1; }; } - fi - mv "po/Makefile" "po/Makefile.tmp" sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r po/POTFILES } - ' "po/Makefile.tmp" >"po/Makefile" + ' "po/Makefile.in" >"po/Makefile" rm -f "po/Makefile.tmp" mv "po/stamp-it.tmp" "po/stamp-it" ;; @@ -25919,11 +21762,13 @@ done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -25943,6 +21788,10 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff -Nru gnome-chemistry-utils-0.8.6/configure.ac gnome-chemistry-utils-0.10.9/configure.ac --- gnome-chemistry-utils-0.8.6/configure.ac 2008-01-19 18:28:46.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/configure.ac 2009-11-14 11:30:40.000000000 +0100 @@ -1,64 +1,59 @@ -AC_INIT([gnome-chemistry-utils], [0.8.6], [http://savannah.nongnu.org/bugs/?group=gchemutils]) -AC_CONFIG_SRCDIR([gcu/gtkperiodic.c]) +AC_INIT([gnome-chemistry-utils], [0.10.9], [http://savannah.nongnu.org/bugs/?group=gchemutils]) +AC_CONFIG_SRCDIR([libs/gcu/gtkperiodic.c]) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE AC_CANONICAL_HOST -AM_CONFIG_HEADER([config.h]) - GCU_VERSION=$VERSION -GCU_VERSION_INFO=`echo $GCU_VERSION | awk -F . '{ print $1+$2":"$3":"$2 }'` -AC_SUBST([GCU_VERSION_INFO]) -################################################## -# init -################################################## +AM_CONFIG_HEADER([config.h]) + +AC_SUBST([CFLAGS]) +AC_SUBST([CXXFLAGS]) +AC_SUBST([CPPFLAGS]) +AC_SUBST([LDFLAGS]) AC_DISABLE_STATIC AC_ISC_POSIX -AC_PROG_CC AC_PROG_CXX AC_HEADER_STDC -AC_LIBTOOL_WIN32_DLL +AC_LIB_RPATH AC_PROG_LIBTOOL +AC_PROG_LN_S +DOLT +IT_PROG_INTLTOOL([0.37.1]) GNOME_DOC_INIT -AC_LANG(C++) -AC_CHECK_HEADERS([fstream ostream sstream]) +GCU_VERSION_INFO=`echo $GCU_VERSION | awk -F . '{ print $1+$2":"$3":"$2 }'` +AC_SUBST([GCU_VERSION_INFO]) -################################################## -# i18n -################################################## +GCU_MAJOR_VERSION=`echo $GCU_VERSION | awk -F . '{ print $1}'` +GCU_MINOR_VERSION=`echo $GCU_VERSION | awk -F . '{ print $2}'` +GCU_MICRO_VERSION=`echo $GCU_VERSION | awk -F . '{ print $3}'` +let GCU_API_MINOR_VERSION=($GCU_MINOR_VERSION+1)/2*2 + +GCU_API_VER="$GCU_MAJOR_VERSION.$GCU_API_MINOR_VERSION" +AC_SUBST([GCU_API_VER]) +AC_DEFINE_UNQUOTED([API_VERSION], ["$GCU_API_VER"], [API version]) + +if test "$GCU_API_MINOR_VERSION" = "$GCU_MINOR_VERSION" -o $GCU_MICRO_VERSION -ge 90; then + gcu_is_stable="yes" + STABILITY_POSTFIX="" + STABILITY="" +else + gcu_is_stable="no" + STABILITY_POSTFIX="($GCU_API_VER unstable)" + STABILITY="-unstable" +fi +AC_SUBST([STABILITY]) +AC_SUBST([STABILITY_POSTFIX]) +AM_CONDITIONAL([GCU_IS_STABLE], [test "x$gcu_is_stable" = "xyes"]) AM_GLIB_GNU_GETTEXT -GETTEXT_PACKAGE="gchemutils" +GETTEXT_PACKAGE="gchemutils-$GCU_API_VER" AC_SUBST([GETTEXT_PACKAGE]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Package name for internationalization]) -IT_PROG_INTLTOOL([0.35.0]) - -################################################## -# windows systems -################################################## - -case "$host" in - *-*-mingw* | *cygwin* | *windows*) - native_win32=yes - ;; -esac - -case "$host_os" in - windows* | cygwin* | mingw*) - AC_DEFINE([OS_WIN32], [1], [Define to 1 if you have a Cygwin/Windows OS.]) - AC_MSG_NOTICE([platform is... Windows/Cygwin/Mingw]) - ;; -esac - -AM_CONDITIONAL([OS_WIN32], [test "x$native_win32" = "xyes"]) - -################################################## -# configure options -################################################## AC_ARG_ENABLE( [update-databases], @@ -68,17 +63,24 @@ enable (or disable) the running of the update-desktop-database and update-mime-database utilities (mostly useful for package maintainers) @<:@default=yes@:>@ ] - ) + ), + [ + if test "x$enableval" != "xno"; then + AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no]) + AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no]) + else + UPDATE_DESKTOP_DATABASE=no + UPDATE_MIME_DATABASE=no + fi + ], + [ + AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no]) + AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no]) + ] ) -if test "x$enable_update_databases" != "xno"; then - AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no]) - AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no]) -else - UPDATE_DESKTOP_DATABASE=no - UPDATE_MIME_DATABASE=no -fi -AM_CONDITIONAL([WITH_UPDATE_MIME], [test "x$UPDATE_MIME_DATABASE" != "xno"]) + AM_CONDITIONAL([WITH_UPDATE_DESKTOP], [test "x$UPDATE_DESKTOP_DATABASE" != "xno"]) +AM_CONDITIONAL([WITH_UPDATE_MIME], [test "x$UPDATE_MIME_DATABASE" != "xno"]) dnl install desktop files for kde if needed AC_ARG_WITH( @@ -89,138 +91,184 @@ path to KDE's directory containing MIME .desktop files (automatically detected via kde-config) @<:@default=auto or ${datadir}/mimelnk@:>@ ] - ),, + ), + [KDEMIMEDIR=$withval], [ AC_PATH_PROG([KDECONFIG], [kde-config], [no]) if test "x$KDECONFIG" != "xno"; then - with_kde_mime_dir="`$KDECONFIG --install mime`" + KDEMIMEDIR="`$KDECONFIG --install mime`" else - with_kde_mime_dir="${datadir}/mimelnk" + KDEMIMEDIR="${datadir}/mimelnk" fi ] ) AC_MSG_CHECKING([for KDE MIME files (.desktop) installation location]) -AC_MSG_RESULT([$with_kde_mime_dir]) -AM_CONDITIONAL([WITH_KDE_MIME], [test "x$with_kde_mime_dir" != "xno"]) -AC_SUBST([with_kde_mime_dir]) +AC_MSG_RESULT([$KDEMIMEDIR]) +AM_CONDITIONAL([WITH_KDE_MIME], [test "x$KDEMIMEDIR" != "xno"]) +AC_SUBST([KDEMIMEDIR]) -################################################## -# pkgconfig -################################################## +AC_PATH_PROG([DOXYGEN], [doxygen], [no]) +AM_CONDITIONAL([DOXYGEN_AVAILABLE], [test "x$DOXYGEN" != "xno"]) -PKG_PROG_PKG_CONFIG +libgoffice= +dnl Only 0.6.x, or later will work +for ver in 0.8 0.6 ; do + if test "x$libgoffice" = x; then + if pkg-config --exists libgoffice-$ver; then + libgoffice=libgoffice-$ver + fi + fi +done +if test "x$libgoffice" = x; then + # Not important. Things will fail below. + libgoffice=libgoffice-0.6 +fi -LIBGLADE_REQUIRED_VERSION=2.4.0 -GTKGLEXT_REQUIRED_VERSION=1.0.0 -GNOME_PRINT_REQUIRED_VERSION=2.4.0 -GNOME_VFS_REQUIRED_VERSION=2.4.0 -SHARED_MIME_INFO_REQUIRED_VERSION=0.12 -OPENBABEL_REQUIRED_VERSION=2.1.0 -GTK_REQUIRED_VERSION=2.10.0 -GNOME_OFFICE_REQUIRED_VERSION=0.4.0 -GNOME_OFFICE_MAX_VERSION=0.5.0 -CHEMICAL_MIME_DATA_REQUIRED_VERSION=0.1.94 -BODR_REQUIRED_VERSION=5 - -REQUIREMENTS="libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION \ -gtk+-2.0 >= $GTK_REQUIRED_VERSION \ -gtkglext-1.0 >= $GTKGLEXT_REQUIRED_VERSION \ -libgnomeprintui-2.2 >= $GNOME_PRINT_REQUIRED_VERSION \ -gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION \ -libgoffice-0.4 >= $GNOME_OFFICE_REQUIRED_VERSION \ -libgoffice-0.4 < $GNOME_OFFICE_MAX_VERSION \ -chemical-mime-data >= $CHEMICAL_MIME_DATA_REQUIRED_VERSION \ -shared-mime-info >= $SHARED_MIME_INFO_REQUIRED_VERSION \ -openbabel-2.0 >= $OPENBABEL_REQUIRED_VERSION \ -bodr >= $BODR_REQUIRED_VERSION" +PKG_CHECK_MODULES(shared_mime_info, [shared-mime-info >= 0.12]) +PKG_CHECK_MODULES(cairo, [cairo >= 1.6.0]) +PKG_CHECK_MODULES(gio, [gio-2.0 >= 2.16.1]) +PKG_CHECK_MODULES(gtk, [gtk+-2.0 >= 2.12.0]) +PKG_CHECK_MODULES(glade, [libglade-2.0 >= 2.4.0]) +PKG_CHECK_MODULES(gnome_canvas, [libgnomecanvas-2.0 >= 2.4.0]) +PKG_CHECK_MODULES(gtkglext, [gtkglext-1.0 >= 1.0.0]) +PKG_CHECK_MODULES(xml, [libxml-2.0 >= 2.4.16]) +PKG_CHECK_MODULES(gsf, [libgsf-1 >= 1.14.9]) +PKG_CHECK_MODULES(goffice, [$libgoffice >= 0.6.5]) +PKG_CHECK_MODULES(chemical_mime_data, [chemical-mime-data >= 0.1.94]) +PKG_CHECK_MODULES(bodr, [bodr >= 5]) +PKG_CHECK_MODULES(openbabel, [openbabel-2.0 >= 2.1.0]) + +if test "$libgoffice" = "libgoffice-0.6"; then + AC_DEFINE_UNQUOTED([GOFFICE_IS_0_6], [1], [Whether goffice is 0.6.x or later]) + PKG_CHECK_MODULES(gconf, [gconf-2.0 >= 2.4.0]) + PKG_CHECK_MODULES(gnome_vfs, [gnome-vfs-module-2.0 >= 2.4.0]) +fi -PKG_CHECK_MODULES([GCU], [$REQUIREMENTS]) +AM_CONDITIONAL([GCU_NEEDS_GCONF], [test "$libgoffice" = "libgoffice-0.6"]) -AC_SUBST([GCU_CFLAGS]) -AC_SUBST([GCU_LIBS]) +dnl check if goffice is >=0.7.8 +PKG_CHECK_MODULES(goffice_has_global_header, [$libgoffice >= 0.7.8], [use_global_header=yes], [use_global_header=no]) +if test "x$use_global_header" = xyes; then + AC_DEFINE_UNQUOTED([GOFFICE_HAS_GLOBAL_HEADER], 1, [Whether goffice is >= 0.7.8]) +fi -################################################## -# FLAGS/LIBS -################################################## +dnl check if goffice <=0.7.2 has gnome support +PKG_CHECK_MODULES(need_goffice_with_gnome, [$libgoffice <= 0.7.2], [need_gnome_support=yes], [need_gnome_support=no]) +if test "x$need_gnome_support" = xyes; then + saved_cflags=$CFLAGS + CFLAGS=$goffice_CFLAGS + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #ifndef GOFFICE_WITH_GNOME + #error no gnome support present + #endif + ]])], [], [AC_MSG_ERROR([you need a libgoffice version with gnome support])]) + CFLAGS=$saved_cflags +fi -AC_SUBST([CFLAGS]) -CFLAGS="$CFLAGS -Wall $GCU_CFLAGS" -AC_SUBST([CXXFLAGS]) -CXXFLAGS="$CXXFLAGS -Wall $GCU_CFLAGS" -AC_SUBST([CPPFLAGS]) -AC_SUBST([LDFLAGS]) -if test "x$native_win32" = "xyes"; then - LDFLAGS="$LDFLAGS -no-undefined" +PKG_CHECK_MODULES(OB22, openbabel-2.0 >= 2.2.0, +[ob22="yes"],[ob22="no"]) +if test "x$ob22" = "xyes"; then + AC_DEFINE_UNQUOTED([HAVE_OPENBABEL_2_2], 1, [Whether OpenBabel is >= 2.2.0]) fi -AC_SUBST([LIBS]) -LIBS="$LIBS $GCU_LIBS" -################################################## -# xulrunner -################################################## +AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no]) +if test "x$GCONFTOOL" = "xno"; then + AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) +fi +AM_GCONF_SOURCE_2 -AC_ARG_VAR( - [MOZILLA_CONFIG], - [ - The 'mozilla-config' binary with path. - Use it to define or override the location of 'mozilla-config'. - ] -) -AC_ARG_VAR( - [XULRUNNER_CLIENT], - [ - Set to xulrunner or a compliant browser. The script will automatically - test for xulrunner seamonkey firefox and mozilla. You can also use this - veriable to override the detection. - ] +dnl retrieve BODR data directory +bodr_pkgdatadir=`pkg-config --variable=pkgdatadir bodr` +AC_DEFINE_UNQUOTED([BODR_PKGDATADIR], ["$bodr_pkgdatadir"], [Path to Blue Obelisk Data Repository]) + +if test "x$gcu_is_stable" = "xyes"; then + GCU_CFLAGS="-Wall" +else + GCU_CFLAGS="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -Wall" +fi +AC_SUBST([GCU_CFLAGS]) + +dnl --without is not handled +GOFFICE_PLUGINS_DIR=`pkg-config --variable=PluginDir $libgoffice` +AC_ARG_WITH( + [goffice-plugins-dir], + AC_HELP_STRING( + [--with-goffice-plugins-dir], + [path to GOffice plugins directory [default=auto]] + ), + [ + if test "x$withval" != "xyes" -a "x$withval" != "xno" ; then + GOFFICE_PLUGINS_DIR=$withval + fi + ] ) -for pack in xulrunner seamonkey firefox mozilla; do - if test "x$XULRUNNER_CLIENT" = "x"; then - if pkg-config --exists $pack-plugin; then - XULRUNNER_CLIENT=$pack-plugin - fi - fi +dnl test some functions +saved_cflags=$CFLAGS +saved_libs=$LIBS +CFLAGS=$goffice_CFLAGS +LIBS=$goffice_LIBS +AC_CHECK_FUNCS(go_conf_sync go_data_serialize gog_data_editor_set_format go_error_info_free) +CFLAGS=$saved_cflags +LIBS=$saved_libs + +AC_SUBST([GOFFICE_PLUGINS_DIR]) + +################################################## +# Check for xulrunner plugin +################################################## +xulclient= +for pack in xulrunner seamonkey iceape firefox mozilla; do + if test "x$xulclient" = x; then + if pkg-config --exists $pack-plugin; then + xulclient=$pack-plugin + fi + fi done -if test "x$XULRUNNER_CLIENT" = x; then +if test "x$xulclient" = x; then # Not important. Things will fail below. - libgoffice=mozilla-plugin + xulclient=mozilla-plugin fi MOZILLA_CFLAGS= build_mozilla_plugin=no -enable_mozilla_plugin=yes +test_mozilla_plugin=true AC_ARG_ENABLE( [mozilla-plugin], AC_HELP_STRING( [--enable-mozilla-plugin], [build a Mozilla/Firefox chemistry files viewing plugin @<:@default=auto@:>@] - ) + ), + [test_mozilla_plugin="$enableval"] ) -if test "x$enable_mozilla_plugin" != "xno"; then +if test "x$test_mozilla_plugin" != "xno"; then if test -z "$MOZILLA_CONFIG"; then AC_PATH_PROG([MOZILLA_CONFIG], [mozilla-config], [no]) fi if test "x$MOZILLA_CONFIG" != "xno"; then MOZILLA_CFLAGS=`mozilla-config --cflags` - default_mozilla_libdir=`mozilla-config --libs | sed 's/-L//'` - elif test -n "$XULRUNNER_CLIENT"; then + mozlibdir=`mozilla-config --libs | sed 's/-L//'` + else PKG_CHECK_MODULES( [MOZILLA], - [$XULRUNNER_CLIENT], + [$xulclient], [build_mozilla_plugin=yes], - [build_mozilla_plugin=no] + [AC_MSG_WARN([mozilla-config not found. Mozilla/Netscape plugin will not be built])] ) - default_mozilla_libdir=`pkg-config --variable=libdir $XULRUNNER_CLIENT` + mozlibdir=`pkg-config --variable=libdir $xulclient` fi if test "x$MOZILLA_CFLAGS" != "x"; then build_mozilla_plugin=yes - else - AC_MSG_WARN([mozilla-config or $XULRUNNER_CLIENT.pc not found.]) - AC_MSG_WARN([Mozilla/Netscape plugin will not be built]) + + dnl test for npfunctions.h + saved_CFLAGS=$CFLAGS + CFLAGS=$MOZILLA_CFLAGS + AC_CHECK_HEADERS([npfunctions.h]) + CFLAGS=$saved_CFLAGS fi fi @@ -230,68 +278,24 @@ [--with-mozilla-libdir], [path to mozilla/firefox/... libdir @<:@default=auto@:>@] ), - [ - if test "x$withval" = "xno"; then - AC_MSG_WARN([Use --disable-mozilla-plugin to not build the package.]) - with_mozilla_libdir=$default_mozilla_libdir - fi - ], - [with_mozilla_libdir=$default_mozilla_libdir] + [mozlibdir=$withval] ) AM_CONDITIONAL([WITH_MOZILLA], [test "x$build_mozilla_plugin" = "xyes"]) AC_SUBST([MOZILLA_CFLAGS]) -AC_SUBST([with_mozilla_libdir]) +AC_SUBST([mozlibdir]) ################################################## -# misc -################################################## - -dnl check if goffice has gnome support -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -#include -#ifndef GOFFICE_WITH_GNOME -#error no gnome support present -#endif -]])], - [], - [AC_MSG_ERROR([you need a libgoffice version with gnome support])] -) - -AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no]) -if test "x$GCONFTOOL" = "xno"; then - AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) -fi -AM_GCONF_SOURCE_2 - -dnl retrieve BODR data directory -bodr_pkgdatadir=`pkg-config --variable=pkgdatadir bodr` -AC_DEFINE_UNQUOTED([BODR_PKGDATADIR], ["$bodr_pkgdatadir"], [Path to Blue Obelisk Data Repository]) - -AC_PATH_PROG([DOXYGEN], [doxygen], [no]) -AM_CONDITIONAL([DOXYGEN_AVAILABLE], [test "x$DOXYGEN" != "xno"]) - -AC_LANG(C++) -AC_MSG_CHECKING([for vector::at usability]) -AC_TRY_COMPILE( - [#include ], - [std::vector v; v.at(0) = 0;], - [ - AC_DEFINE([HAS_VECTOR_AT], [1], [Define to 1 if vector::at can be used.]) - AC_MSG_RESULT([yes]) - ], - [AC_MSG_RESULT([no])] -) - -################################################## -# manpage target +# Check for manpage target applications ################################################## GCU_PROG_XMLLINT GCU_PROG_XSLTPROC GCU_PROG_MAN +AC_ARG_VAR(GDK_PIXBUF_CSOURCE, [The gdk-pixbuf-csource executable.]) +AC_CHECK_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, gdk-pixbuf-csource) + ################################################## # Path checks ################################################## @@ -305,40 +309,68 @@ ;; esac -AC_SUBST(TESTSSRCDIR) - -################################################## -# output -################################################## +AC_SUBST([TESTSSRCDIR]) AC_CONFIG_FILES([ Makefile -gcu.pc database/Makefile docs/Makefile docs/help/Makefile docs/help/3d/Makefile docs/help/calc/Makefile docs/help/crystal/Makefile +docs/help/paint/Makefile +docs/help/spectra/Makefile docs/help/table/Makefile docs/man/gcu_entities.dtd docs/man/Makefile docs/reference/Makefile docs/reference/Doxyfile dtds/Makefile -gcu/Makefile glade/Makefile glade/crystal/Makefile +glade/paint/Makefile glade/table/Makefile +libs/Makefile +libs/canvas/Makefile +libs/gcp/Makefile +libs/gcu/Makefile +plugins/Makefile +plugins/loaders/Makefile +plugins/loaders/cdx/Makefile +plugins/loaders/cdxml/Makefile +plugins/paint/Makefile +plugins/paint/arrows/Makefile +plugins/paint/atoms/Makefile +plugins/paint/bonds/Makefile +plugins/paint/cycles/Makefile +plugins/paint/residues/Makefile +plugins/paint/selection/Makefile +plugins/paint/templates/Makefile +plugins/paint/text/Makefile +plugins/paint/wikipedia/Makefile mozilla-plugin/Makefile +goffice/Makefile pixmaps/Makefile po/Makefile.in samples/Makefile programs/Makefile programs/3d/Makefile +programs/3d/gchem3d.desktop.in programs/calc/Makefile +programs/calc/gchemcalc.desktop.in programs/crystal/Makefile +programs/crystal/gcrystal.desktop.in +programs/paint/Makefile +programs/paint/gchempaint.desktop.in +programs/spectra/Makefile +programs/spectra/gspectrum.desktop.in programs/table/Makefile +programs/table/gchemtable.desktop.in +templates/Makefile +templates/paint/Makefile +themes/Makefile +themes/paint/Makefile tests/Makefile ]) AC_OUTPUT diff -Nru gnome-chemistry-utils-0.8.6/COPYING-DOCS gnome-chemistry-utils-0.10.9/COPYING-DOCS --- gnome-chemistry-utils-0.8.6/COPYING-DOCS 2006-02-27 09:52:26.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/COPYING-DOCS 2009-11-14 11:30:40.000000000 +0100 @@ -1,8 +1,7 @@ GNU Free Documentation License - Version 1.2, November 2002 + Version 1.1, March 2000 - - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -11,12 +10,12 @@ 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other -functional and useful document "free" in the sense of freedom: to -assure everyone the effective freedom to copy and redistribute it, -with or without modifying it, either commercially or noncommercially. -Secondarily, this License preserves for the author and publisher a way -to get credit for their work, while not being considered responsible -for modifications made by others. +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It @@ -34,15 +33,11 @@ 1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that -contains a notice placed by the copyright holder saying it can be -distributed under the terms of this License. Such a notice grants a -world-wide, royalty-free license, unlimited in duration, to use that -work under the conditions stated herein. The "Document", below, -refers to any such manual or work. Any member of the public is a -licensee, and is addressed as "you". You accept the license if you -copy, modify or distribute the work in a way requiring permission -under copyright law. +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with @@ -52,7 +47,7 @@ the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly -within that overall subject. (Thus, if the Document is in part a +within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, @@ -61,40 +56,33 @@ The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. If a -section does not fit the above definition of Secondary then it is not -allowed to be designated as Invariant. The Document may contain zero -Invariant Sections. If the Document does not identify any Invariant -Sections then there are none. +that says that the Document is released under this License. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. A Front-Cover Text may -be at most 5 words, and a Back-Cover Text may be at most 25 words. +the Document is released under this License. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the -general public, that is suitable for revising the document +general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file -format whose markup, or absence of markup, has been arranged to thwart -or discourage subsequent modification by readers is not Transparent. -An image format is not Transparent if used for any substantial amount -of text. A copy that is not "Transparent" is called "Opaque". +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple -HTML, PostScript or PDF designed for human modification. Examples of -transparent image formats include PNG, XCF and JPG. Opaque formats -include proprietary formats that can be read and edited only by -proprietary word processors, SGML or XML for which the DTD and/or +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the -machine-generated HTML, PostScript or PDF produced by some word -processors for output purposes only. +machine-generated HTML produced by some word processors for output +purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material @@ -103,21 +91,6 @@ the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose -title either is precisely XYZ or contains XYZ in parentheses following -text that translates XYZ in another language. (Here XYZ stands for a -specific section name mentioned below, such as "Acknowledgements", -"Dedications", "Endorsements", or "History".) To "Preserve the Title" -of such a section when you modify the Document means that it remains a -section "Entitled XYZ" according to this definition. - -The Document may include Warranty Disclaimers next to the notice which -states that this License applies to the Document. These Warranty -Disclaimers are considered to be included by reference in this -License, but only as regards disclaiming warranties: any other -implication that these Warranty Disclaimers may have is void and has -no effect on the meaning of this License. - 2. VERBATIM COPYING @@ -137,10 +110,9 @@ 3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have -printed covers) of the Document, numbering more than 100, and the -Document's license notice requires Cover Texts, you must enclose the -copies in covers that carry, clearly and legibly, all these Cover +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present @@ -158,15 +130,16 @@ If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy -a computer-network location from which the general network-using -public has access to download using public-standard network protocols -a complete Transparent copy of the Document, free of added material. -If you use the latter option, you must take reasonably prudent steps, -when you begin distribution of Opaque copies in quantity, to ensure -that this Transparent copy will remain thus accessible at the stated -location until at least one year after the last time you distribute an -Opaque copy (directly or through your agents or retailers) of that -edition to the public. +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give @@ -190,8 +163,7 @@ B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has fewer than five), - unless they release you from this requirement. + Document (all of its principal authors, if it has less than five). C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. @@ -203,10 +175,10 @@ G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. -I. Preserve the section Entitled "History", Preserve its Title, and add - to it an item stating at least the title, year, new authors, and +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If - there is no section Entitled "History" in the Document, create one + there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @@ -217,18 +189,17 @@ You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. -K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the section all - the substance and tone of each of the contributor acknowledgements +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. -M. Delete any section Entitled "Endorsements". Such a section +M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. -N. Do not retitle any existing section to be Entitled "Endorsements" +N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material @@ -237,7 +208,7 @@ list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -You may add a section Entitled "Endorsements", provided it contains +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a @@ -265,7 +236,7 @@ versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its -license notice, and that you preserve all their Warranty Disclaimers. +license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single @@ -276,11 +247,11 @@ Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -In the combination, you must combine any sections Entitled "History" -in the various original documents, forming one section Entitled -"History"; likewise combine any sections Entitled "Acknowledgements", -and any sections Entitled "Dedications". You must delete all sections -Entitled "Endorsements". +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS @@ -301,20 +272,18 @@ A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or -distribution medium, is called an "aggregate" if the copyright -resulting from the compilation is not used to limit the legal rights -of the compilation's users beyond what the individual works permit. -When the Document is included in an aggregate, this License does not -apply to the other works in the aggregate which are not themselves -derivative works of the Document. +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one half of -the entire aggregate, the Document's Cover Texts may be placed on -covers that bracket the Document within the aggregate, or the -electronic equivalent of covers if the Document is in electronic form. -Otherwise they must appear on printed covers that bracket the whole -aggregate. +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. 8. TRANSLATION @@ -325,17 +294,10 @@ permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a -translation of this License, and all the license notices in the -Document, and any Warranty Disclaimers, provided that you also include -the original English version of this License and the original versions -of those notices and disclaimers. In case of a disagreement between -the translation and the original version of this License or a notice -or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", -"Dedications", or "History", the requirement (section 4) to Preserve -its Title (section 1) will typically require changing the actual -title. +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. 9. TERMINATION @@ -373,23 +335,19 @@ the License in the document and put the following copyright and license notices just after the title page: - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of diff -Nru gnome-chemistry-utils-0.8.6/COPYING-LIBS gnome-chemistry-utils-0.10.9/COPYING-LIBS --- gnome-chemistry-utils-0.8.6/COPYING-LIBS 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/COPYING-LIBS 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,482 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307 USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff -Nru gnome-chemistry-utils-0.8.6/database/elements.xml.in gnome-chemistry-utils-0.10.9/database/elements.xml.in --- gnome-chemistry-utils-0.8.6/database/elements.xml.in 2006-02-28 21:20:03.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/database/elements.xml.in 2009-11-14 11:30:40.000000000 +0100 @@ -1,582 +1,582 @@ - + <_name>Hydrogen - + <_name>Helium - + <_name>Lithium - + <_name>Beryllium - + <_name>Boron - + <_name>Carbon - + <_name>Nitrogen - + <_name>Oxygen - + <_name>Fluorine - + <_name>Neon - + <_name>Sodium - + <_name>Magnesium - + <_name>Aluminum - + <_name>Silicon - + <_name>Phosphorus - + <_name>Sulfur - + <_name>Chlorine - + <_name>Argon - + <_name>Potassium - + <_name>Calcium - + <_name>Scandium - + <_name>Titanium - + <_name>Vanadium - + <_name>Chromium - + <_name>Manganese - + <_name>Iron - + <_name>Cobalt - + <_name>Nickel - + <_name>Copper - + <_name>Zinc - + <_name>Gallium - + <_name>Germanium - + <_name>Arsenic - + <_name>Selenium - + <_name>Bromine - + <_name>Krypton - + <_name>Rubidium - + <_name>Strontium - + <_name>Yttrium - + <_name>Zirconium - + <_name>Niobium - + <_name>Molybdenum - + <_name>Technetium - + <_name>Ruthenium - + <_name>Rhodium - + <_name>Palladium - + <_name>Silver - + <_name>Cadmium - + <_name>Indium - + <_name>Tin - + <_name>Antimony - + <_name>Tellurium - + <_name>Iodine - + <_name>Xenon - + <_name>Caesium - + <_name>Barium - + <_name>Lanthanum - + <_name>Cerium - + <_name>Praseodymium - + <_name>Neodymium - + <_name>Promethium - + <_name>Samarium - + <_name>Europium - + <_name>Gadolinium - + <_name>Terbium - + <_name>Dysprosium - + <_name>Holmium - + <_name>Erbium - + <_name>Thulium - + <_name>Ytterbium - + <_name>Lutetium - + <_name>Hafnium - + <_name>Tantalum - + <_name>Tungsten - + <_name>Rhenium - + <_name>Osmium - + <_name>Iridium - + <_name>Platinum - + <_name>Gold - + <_name>Mercury - + <_name>Thallium - + <_name>Lead - + <_name>Bismuth - + <_name>Polonium - + <_name>Astatine - + <_name>Radon - + <_name>Francium - + <_name>Radium - + <_name>Actinium - + <_name>Thorium - + <_name>Protactinium - + <_name>Uranium - + <_name>Neptunium - + <_name>Plutonium - + <_name>Americium - + <_name>Curium - + <_name>Berkelium - + <_name>Californium - + <_name>Einsteinium - + <_name>Fermium - + <_name>Mendelevium - + <_name>Nobelium - + <_name>Lawrencium - + <_name>Rutherfordium - + <_name>Dubnium - + <_name>Seaborgium - + <_name>Bohrium - + <_name>Hassium - + <_name>Meitnerium - + <_name>Darmstadtium - + <_name>Roentgenium - + <_name>Ununbium - + <_name>Ununtrium - + <_name>Ununquadium - + <_name>Ununpentium - + <_name>Ununhexium diff -Nru gnome-chemistry-utils-0.8.6/database/isotopes.xml.in gnome-chemistry-utils-0.10.9/database/isotopes.xml.in --- gnome-chemistry-utils-0.8.6/database/isotopes.xml.in 2006-01-25 14:49:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/database/isotopes.xml.in 2009-11-14 11:30:40.000000000 +0100 @@ -1307,7 +1307,7 @@ - @@ -1412,7 +1412,7 @@ - @@ -1675,7 +1675,7 @@ - diff -Nru gnome-chemistry-utils-0.8.6/database/Makefile.am gnome-chemistry-utils-0.10.9/database/Makefile.am --- gnome-chemistry-utils-0.8.6/database/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/database/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -1,16 +1,16 @@ -MAINTAINERCLEANFILES = Makefile.in - EXTRA_DIST = $(xml_in_files) CLEANFILES = $(xml_DATA) +MAINTAINERCLEANFILES = Makefile.in + xml_in_files = \ elements.xml.in \ elecprops.xml.in \ isotopes.xml.in \ - radii.xml.in + radii.xml.in \ + residues.xml.in -xmldir = $(datadir)/gchemutils +xmldir = $(datadir)/gchemutils/@GCU_API_VER@ xml_DATA = $(xml_in_files:.xml.in=.xml) - @INTLTOOL_XML_RULE@ diff -Nru gnome-chemistry-utils-0.8.6/database/Makefile.in gnome-chemistry-utils-0.10.9/database/Makefile.in --- gnome-chemistry-utils-0.8.6/database/Makefile.in 2008-01-25 21:06:18.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/database/Makefile.in 2009-11-14 11:45:59.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -42,6 +44,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -49,16 +52,29 @@ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(xmldir)" -xmlDATA_INSTALL = $(INSTALL_DATA) DATA = $(xml_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -78,26 +94,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -107,35 +126,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -148,14 +153,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -167,6 +179,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -178,31 +192,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -216,32 +255,42 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -MAINTAINERCLEANFILES = Makefile.in +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ EXTRA_DIST = $(xml_in_files) CLEANFILES = $(xml_DATA) +MAINTAINERCLEANFILES = Makefile.in xml_in_files = \ elements.xml.in \ elecprops.xml.in \ isotopes.xml.in \ - radii.xml.in + radii.xml.in \ + residues.xml.in -xmldir = $(datadir)/gchemutils +xmldir = $(datadir)/gchemutils/@GCU_API_VER@ xml_DATA = $(xml_in_files:.xml.in=.xml) all: all-am @@ -250,14 +299,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu database/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu database/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu database/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu database/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -275,6 +324,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -284,20 +334,23 @@ install-xmlDATA: $(xml_DATA) @$(NORMAL_INSTALL) test -z "$(xmldir)" || $(MKDIR_P) "$(DESTDIR)$(xmldir)" - @list='$(xml_DATA)'; for p in $$list; do \ + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(xmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(xmldir)/$$f'"; \ - $(xmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(xmldir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(xmldir)" || exit $$?; \ done uninstall-xmlDATA: @$(NORMAL_UNINSTALL) - @list='$(xml_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(xmldir)/$$f'"; \ - rm -f "$(DESTDIR)$(xmldir)/$$f"; \ - done + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(xmldir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(xmldir)" && rm -f $$files tags: TAGS TAGS: @@ -321,13 +374,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -359,6 +416,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -378,6 +436,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -386,18 +446,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -432,8 +502,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-xmlDATA - @INTLTOOL_XML_RULE@ + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/database/radii.xml.in gnome-chemistry-utils-0.10.9/database/radii.xml.in --- gnome-chemistry-utils-0.8.6/database/radii.xml.in 2005-06-18 08:48:51.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/database/radii.xml.in 2009-11-14 11:30:40.000000000 +0100 @@ -2,28 +2,21 @@ - - - - - - - @@ -31,23 +24,18 @@ - - - - - @@ -55,8 +43,6 @@ - - @@ -65,8 +51,6 @@ - - @@ -75,14 +59,10 @@ - - - - @@ -93,9 +73,7 @@ - - @@ -103,7 +81,6 @@ - @@ -111,15 +88,11 @@ - - - - @@ -127,8 +100,6 @@ - - @@ -136,22 +107,16 @@ - - - - - - @@ -214,7 +179,6 @@ - @@ -234,7 +198,6 @@ - @@ -251,7 +214,6 @@ - @@ -265,9 +227,7 @@ - - @@ -279,7 +239,6 @@ - @@ -291,9 +250,7 @@ - - @@ -301,31 +258,25 @@ - - - - - - @@ -333,8 +284,6 @@ - - @@ -343,8 +292,6 @@ - - @@ -436,7 +383,6 @@ - @@ -446,7 +392,6 @@ - @@ -462,7 +407,6 @@ - @@ -473,15 +417,12 @@ - - - @@ -490,7 +431,6 @@ - @@ -498,8 +438,6 @@ - - @@ -509,8 +447,6 @@ - - @@ -519,8 +455,6 @@ - - @@ -747,7 +681,6 @@ - @@ -756,7 +689,6 @@ - @@ -765,7 +697,6 @@ - @@ -776,7 +707,6 @@ - @@ -787,7 +717,6 @@ - @@ -820,7 +749,6 @@ - @@ -858,7 +786,6 @@ - @@ -930,8 +857,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/database/residues.xml.in gnome-chemistry-utils-0.10.9/database/residues.xml.in --- gnome-chemistry-utils-0.8.6/database/residues.xml.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/database/residues.xml.in 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,495 @@ + + + + R + <_name>Alkyl + + + + + + + + + + + + Ar + <_name>Aryl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X + <_name>Halogen + + + + + + + + + + + + M + <_name>Metal + + + + + + + + + + + + Me + <_name>Methyl + + + + + + + + + + + + Et + <_name>Ethyl + + + + + + + + + + + + + + + + Pr;nPr;n-Pr + <_name>Propyl + + + + + + + + + + + + + + + + + + + + iPr;i-Pr + <_name>Isopropyl + + + + + + + + + + + + + + + + + + + + Bu;nBu;n-Bu + <_name>Butyl + + + + + + + + + + + + + + + + + + + + + + + + sBu;s-Bu + <_name>sec-Butyl + + + + + + + + + + + + + + + + + + + + + + + + iBu;i-Bu + <_name>Isobutyl + + + + + + + + + + + + + + + + + + + + + + + + tBu;t-Bu + tert-Butyl + + + + + + + + + + + + + + + + + + + + + + + + Ph + <_name>Phenyl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ac + <_name>Acetyl + + + + + + + + + + + + + + + + + + + + Bn + <_name>Benzyl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bz + <_name>Benzoyl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ms + <_name>Mesyl + + + + + + + + + + + + + + + + + + + + + + + + Tf + <_name>Triflyl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ts + <_name>Tosyl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/debian/changelog gnome-chemistry-utils-0.10.9/debian/changelog --- gnome-chemistry-utils-0.8.6/debian/changelog 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/changelog 2009-12-05 14:42:25.000000000 +0100 @@ -1,57 +1,184 @@ -gnome-chemistry-utils (0.8.6-1ubuntu7) karmic; urgency=low +gnome-chemistry-utils (0.10.9-1ubuntu1) lucid; urgency=low - * debian/rules: fix build failure due to wrong --with-mozilla-libdir - (LP: #385560) + * manual merge from Debian testing, fixes LP #233963 + * gcu-plugin.dirs, gcu-plugin.links: iceweasel → firefox; iceape → seamonkey + * added MOTU to debian/control - -- Alexander Sack Wed, 10 Jun 2009 15:18:40 +0200 + -- Matthias Mailänder Sa, 05 Dez 2009 09:43:24 +0100 -gnome-chemistry-utils (0.8.6-1ubuntu6) karmic; urgency=low +gnome-chemistry-utils (0.10.9-1) unstable; urgency=low - De-libxul-dev'ification (LP: #352968) - * debian/control: transition build depend from libxul-dev to xulrunner-dev - * debian/rules: add --with-mozilla-libdir=/usr/lib/xulrunner-addons/plugins/ - to configure flags - * debian/gcu-plugin.{links,dirs}: remove not needed debhelper files - * debian/gcu-plugin.install: use mozilla-libdir from above + * New upstream release. + * debian/control (Build-Depends): Dropped iceape-dev (closes: #555907). + (Depends, Description): Plugin doesn't work with WebKit-based browsers. + * debian/gcu-plugin.dirs: Added xulrunner and mozilla paths. + * debian/gcu-plugin.install: Adjusted plugin path. + * debian/gcu-plugin.links: Link to xulrunner and mozilla paths. + * debian/rules (config.status): Use /usr/lib/xulrunner-addons as new plugin + path. + + -- Daniel Leidert (dale) Mon, 16 Nov 2009 04:14:56 +0100 + +gnome-chemistry-utils (0.10.8-1) unstable; urgency=low + + * New upstream release. + * debian/control (Standards-Version): Bumped to 3.8.3. - -- Alexander Sack Wed, 10 Jun 2009 12:39:19 +0200 + -- Daniel Leidert (dale) Tue, 08 Sep 2009 01:20:01 +0200 -gnome-chemistry-utils (0.8.6-1ubuntu5) jaunty; urgency=low +gnome-chemistry-utils (0.10.5-1) unstable; urgency=low - * no changes upload for nss/nspr SONAME mini-transition + * New upstream release. + * debian/control (Vcs-Svn): Fixed vcs-field-uses-not-recommended-uri-format. + (Standards-Version): Bumped to 3.8.2. + * debian/copyright: Updated. + * debian/rules (binary-arch): Dropped deprecated debhelper tools. + * debian/patches/fix_build_with_go_0_7_5__26105.dpatch: Dropped (applied + upstream). + * debian/patches/00list: Adjusted. - -- Alexander Sack Mon, 12 Jan 2009 16:21:55 +0100 + -- Daniel Leidert (dale) Tue, 30 Jun 2009 18:13:43 +0200 -gnome-chemistry-utils (0.8.6-1ubuntu4) intrepid; urgency=low +gnome-chemistry-utils (0.10.4-3) unstable; urgency=low - * fix LP: #272772: packages that Depend/Recommend/Suggest firefox - (meta-package) must alternatively Depend/Recommend/Suggest abrowser - - update debian/control + * debian/patches/fix_build_with_go_0_7_5__26105.dpatch: Added. + - Fix for goffice >= 0.7.5. See http://savannah.nongnu.org/bugs/?26105 + (closes: #527678). + * debian/patches/00list: Adjusted. - -- Alexander Sack Mon, 22 Sep 2008 02:28:58 +0200 + -- Daniel Leidert (dale) Thu, 14 May 2009 18:34:51 +0200 -gnome-chemistry-utils (0.8.6-1ubuntu3) intrepid; urgency=low +gnome-chemistry-utils (0.10.4-2) unstable; urgency=low - * Rebuild for libopenbabel2 -> libopenbabel3 transition (LP: #245201) + * debian/control (Build-Depends): Added docbook-xml to prevent network + access by the gnome-doc-utils/xsltproc. + * debian/rules: Added parallel building support. + (binary-arch): Don't exclude `reference' anymore. The docs are not + installed and this item prevents preferences.glade from being installed + into the gchempaint package. - -- Riccardo Coccioli Fri, 29 Aug 2008 16:18:25 +0200 + -- Daniel Leidert (dale) Thu, 23 Apr 2009 18:14:11 +0200 -gnome-chemistry-utils (0.8.6-1ubuntu2) hardy; urgency=low +gnome-chemistry-utils (0.10.4-1) unstable; urgency=low - * debian/patches: added fix_bodr8_crash.dpatch to fix crash if BODS >= 8 is - used. Can be dropped next sync. + * New upstream release 0.10.4. - -- Jordan Mantha Thu, 27 Mar 2008 01:47:32 -0700 + * debian/control (Standards-Version): Bumped to 3.8.1 (no other changes). + (Build-Depends): Add libxml2-dev. + (Section): libgcu-dbg is in `debug' now. + * debian/rules (binary-arch): Dropped permission fix (fixed upstream). -gnome-chemistry-utils (0.8.6-1ubuntu1) hardy; urgency=low + * debian/patches/configure_iceape_fix.dpatch: Dropped (applied upstream). + * debian/patches/GCONF_SCHEMA_FILE_DIR.dpatch: Ditto. + * debian/patches/label_not_title_to_current_file.dpatch: Ditto. + * debian/patches/fix_gofont_critical.dpatch: Ditto. + * debian/patches/dlerror_dlopen_linker_flag.dpatch: Not necessary anymore. + * debian/patches/00list: Adjusted. + + -- Daniel Leidert (dale) Mon, 06 Apr 2009 17:30:12 +0200 + +gnome-chemistry-utils (0.10.3-1) unstable; urgency=low + + * New upstream release 0.10.3. + - gchempaint has been merged into the gnome-chemistry-utils source. + + * debian/control: Dropped libgcu-dev and libgcu-doc. Added gchempaint. + (Build-Depends): Adjusted for the new requirements. Increased libgoffice + dependency (closes: #455532, #455530). + (Standards-Version): Bumped to 3.8.0. + (Depends): Fixed debhelper-but-no-misc-depends. Dropped iceape-browser. + (Replaces, Conflicts): Dropped conflicts with unofficial, old private + (Section): Fixed binary-control-field-duplicates-source. + public 0.4 packages. libgcu0 replaces some files from gchempaint. + * debian/copyright: Updated and completed. + * debian/gchempaint.*: Added. + * debian/gcrystal.links, + debian/gcu-bin.links: Added to supply manual pages for the `-0.10' + binaries. + * debian/gcrystal.install, + debian/gcu-bin.install, + debian/libgcu0.install: Updated and adjusted. + * debian/gcu-bin.menu (icon, command): Adjusted gchem3d-viewer vs gchem3d. + * debian/libgcu0.lintian-overrides: Added. + * debian/libgcu0.shlibs: Removed in favour of dh_makeshlibs. + * debian/libgcu-dev.*, + debian/libgcu-doc.*: Dropped. + * debian/rules (LDFLAGS): Drop `-Wl,-z,defs' to not FTBFS with plugins. + (config.status): Drop unsupported XULRUNNER_CLIENT variable. + (binary-indep): Emptied. No arch:all packages. + (binary-arch): Exclude .la files and API reference from installation. Also + run several debhelper tools for gchempaint. Add library version + information directly in the dh_makeshlibs call. Added dh_icons call. + * debian/watch: Fixed. + * debian/README.source: Added to be compliant to Debian policy 3.8.0. + * debian/icons/gchem3d-viewer.xpm: Renamed to debian/icons/gchem3d.xpm. + * debian/icons/gspectrum.xpm: Added. + * debian/icons/gchempaint.xpm: Added. + * debian/patches/configure_iceape_fix.dpatch: Added. + - configure: Check for iceape-plugin.pc too to build the plugin. + * debian/patches/mime_icon_prefix.dpatch: Added. + - pixmaps/Makefile.in: Drop `gnome-mime-' prefix from MIME type icons. + * debian/patches/dlerror_dlopen_linker_flag.dpatch: Added. + - libs/gcp/Makefile.in: Link with -ldl for dlopen and dlerror. + * debian/patches/GCONF_SCHEMA_FILE_DIR.dpatch: Added. + - Makefile.in (schemasdir), programs/paint/Makefile.in (schemasdir): Use + $(GCONF_SCHEMA_FILE_DIR) instead of the hardcoded $(sysconfdir). + * debian/patches/label_not_title_to_current_file.dpatch: Added. + - programs/crystal/document.cc (VerifySaved): Use the label to name the + current file, not the title which might not exist. + * debian/patches/fix_gofont_critical.dpatch: Added. + - programs/calc/gchemcalc.cc (on_quit): Exit more cleanly and avoid + goffice critical. + * debian/patches/00list: Adjusted. - * Merge from Debian unstable. Remaining Ubuntu changes: - - Update Maintainer Field according to Debian Maintainer Spec - - debian/control: add firefox support - - debian/gcu-plugin.dirs: ditto - - debian/gcu-plugin.links: ditto + -- Daniel Leidert (dale) Sat, 07 Mar 2009 08:14:48 +0100 - -- Jérôme Guelfucci Sat, 02 Feb 2008 18:39:26 +0100 +gnome-chemistry-utils (0.8.7-2) unstable; urgency=low + + * debian/control (Build-Depends, Depends): xulrunner transition (closes: + #480804). Changed to iceape-dev. + (Depends): -dbg package needs strict versioned dependencies on gcu-bin and + gcu-plugin too. + (Description): Adjusted gcu-plugin description for xulrunner transition. + * debian/gcrystal.install: Install icons from debian/icons/ here. + * debian/gcu-bin.install: Ditto. Forther don't install the .la file. Fixed + bashisms. + * debian/gcu-plugin.install: Adjusted for new plugin directory. + * debian/gcu-plugin.links: Ditto. + * debian/libgcu-doc.install: Removed sourcedir accordingly to change in + debian/rules. + * debian/rules (config.status): Set XULRUNNER_CLIENT and determine new + plugin installation path. + (install): Installation of icons has been turned into dh_install task. + (binary-arch): Remove -a from dh_install to get a better result from + --list-missing. Compression of examples has been made easier. + (binary-indep): Call dh_install from debian/tmp too. + + -- Daniel Leidert (dale) Tue, 13 May 2008 00:00:10 +0200 + +gnome-chemistry-utils (0.8.7-1) unstable; urgency=low + + * New upstream release 0.8.7. + + * debian/patches/gnu_22513_fix_crash_with_bodr_8.dpatch: Removed. Applied + upstream. + * debian/patches/00list: Adjusted. + + -- Daniel Leidert (dale) Tue, 25 Mar 2008 22:05:26 +0100 + +gnome-chemistry-utils (0.8.6-2) unstable; urgency=high + + * debian/control (Description): Fixed gcu-plugin description typo. + (XS-DM-Upload-Allowed): Removed XS- prefix as of dpkg version 1.14.16. + * debian/control (config.status, clean): Copy autotools-dev scripts in the + config.status target. + * debian/libgcu-doc.doc-base (Section): Fixed to comply to the doc-base + policy version 0.8.10. + * debian/patches/gnu_22513_fix_crash_with_bodr_8.dpatch: Added. + - gcu/element.cc (Element::LoadBODR): Apply a patch from upstream to fix a + crasher with bodr 8. + + -- Daniel Leidert (dale) Sat, 08 Mar 2008 11:43:39 +0100 gnome-chemistry-utils (0.8.6-1) unstable; urgency=low @@ -88,16 +215,6 @@ -- Daniel Leidert (dale) Mon, 07 Jan 2008 20:55:35 +0100 -gnome-chemistry-utils (0.8.5-1ubuntu1) hardy; urgency=low - - * Merge from debian unstable, remaining changes (Closes LP: #179296): - - Update Maintainer Field according to Debian Maintainer Spec - - debian/control: add firefox support - - debian/gcu-plugin.dirs: ditto - - debian/gcu-plugin.links: ditto - - -- Jordan Mantha Sat, 05 Jan 2008 18:53:40 -0800 - gnome-chemistry-utils (0.8.5-1) unstable; urgency=low * New upstream release 0.8.5 (closes: #458259). @@ -133,15 +250,6 @@ -- Daniel Leidert (dale) Tue, 18 Dec 2007 00:25:35 +0100 -gnome-chemistry-utils (0.8.4-3ubuntu1) hardy; urgency=low - - * Merge from Debian unstable - * debian/control: add firefox to gcu-plugin dependencies - * Modify Maintainer value to match the DebianMaintainerField - specification. - - -- Jordan Mantha Wed, 12 Dec 2007 20:34:25 -0800 - gnome-chemistry-utils (0.8.4-3) unstable; urgency=low * debian/patches/01_fix_gcrystal_file_recognition.dpatch: Added. @@ -235,28 +343,6 @@ -- LI Daobing Sun, 01 Jul 2007 08:35:30 +0800 -gnome-chemistry-utils (0.6.3-4ubuntu2) gutsy; urgency=low - - * Build on openbabel >= 2.1.1-0ubuntu1 - - -- Jonathan Riddell Fri, 10 Aug 2007 23:50:04 +0100 - -gnome-chemistry-utils (0.6.3-4ubuntu1) gutsy; urgency=low - - * Merge from debian unstable, remaining changes: - - debian/patches/20_use_libgoffice-0.dpatch: Add. - - debian/control (libgcu-dev): - + Don't mention non-existant static library in description - + depend on libgoffice-0-dev instead of libgoffice-1-dev - - debian/control: - + Conflicts/Replaces: libgcu02ca (<< 0.4.9), libgchemutils0c2, - libgchemutils0c2a for libgcu0 - + Conflicts/Replaces: gcu (<< 0.4.9), gchemutils for gcu-bin - + Change build-depends from libgoffice-1-dev to libgoffice-0-dev - * Renumber the libgoffice-0 patch to 20, as Debian now uses 10. - - -- William Grant Sat, 14 Jul 2007 17:31:08 +1000 - gnome-chemistry-utils (0.6.3-4) unstable; urgency=low [ Daniel Leidert ] @@ -271,35 +357,6 @@ -- Daniel Leidert (dale) Mon, 28 May 2007 20:28:28 +0200 -gnome-chemistry-utils (0.6.3-3ubuntu3) gutsy; urgency=low - - * Rebuild for libgoffice transition. - * Mangle 10_use_libgoffice-0.dpatch to support libgoffice 0.4. - * Modify Maintainer field as per spec. - - -- Steve Kowalik Fri, 6 Jul 2007 22:47:51 +1000 - -gnome-chemistry-utils (0.6.3-3ubuntu2) feisty; urgency=low - - * debian/control: libgcu-dev - - depend on libgoffice-0-dev instead of libgoffice-1-dev - - don't mention non-existant static library in description - (Closes Ubuntu: #78550) - - -- Michael Bienia Tue, 9 Jan 2007 17:52:29 +0100 - -gnome-chemistry-utils (0.6.3-3ubuntu1) feisty; urgency=low - - * Merge from debian unstable. - * debian/control: - - Conflicts/Replaces: libgcu02ca (<< 0.4.9), libgchemutils0c2, - libgchemutils0c2a for libgcu0 - - Conflicts/Replaces: gcu (<< 0.4.9), gchemutils for gcu-bin - - change build-depends from libgoffice-1-dev to libgoffice-0-dev - * debian/patches/10_use_libgoffice-0.dpatch: build with libgoffice-0 - - -- Michael Bienia Tue, 9 Jan 2007 00:21:34 +0100 - gnome-chemistry-utils (0.6.3-3) unstable; urgency=low * debian/copyright: Clarify that gnome-chemistry-utils is licensed under the @@ -432,37 +489,6 @@ -- Daniel Leidert (dale) Wed, 8 Jun 2005 15:09:56 +0200 -gnome-chemistry-utils (0.4.1-0dl2ubuntu3) dapper; urgency=low - - * libstdc++ new allocator transition: - + Renaming libgchemutils0c2 to libgchemutils0c2a - * debian/control: - + Adjusted packagenames, conflicts/replaces and dependencies - + Bumped Standards-Version - * debian/rules: - + Adjusted packagenames - * Renamed debian/libgchemutils0c2.{dirs,docs,install,shlibs} to - debian/libgchemutils0c2a.{dirs,docs,install,shlibs} - * debian/libgchemutils0c2a.shlibs: - + Adjusted packagename - - -- Stephan Hermann Sun, 27 Nov 2005 17:29:28 +0100 - -gnome-chemistry-utils (0.4.1-0dl2ubuntu2) breezy; urgency=low - - * rebuild to catch new libopenbabel0c2 dependency - - -- Michael Vogt Wed, 14 Sep 2005 14:43:47 +0200 - -gnome-chemistry-utils (0.4.1-0dl2ubuntu1) breezy; urgency=low - - * renaming libgchemutils0 to libgchemutils0c2 - * renaming debian/*.{install,dirs,docs,shlibs) - * fixed gcu/element.{cc,h}: check -http://savannah.nongnu.org/cgi-bin/viewcvs/gchemutils/gchemutils/gcu/element.cc.diff?r1=text&tr1=1.3&r2=text&tr2=1.3.2.1&diff_format=h - - -- Stephan Hermann Fri, 03 Jun 2005 21:22:19 +0200 - gnome-chemistry-utils (0.4.1-0dl2) unstable; urgency=low * Add supported MIME types to gchem3d-viewer.desktop. diff -Nru gnome-chemistry-utils-0.8.6/debian/control gnome-chemistry-utils-0.10.9/debian/control --- gnome-chemistry-utils-0.8.6/debian/control 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/control 2009-12-05 14:42:25.000000000 +0100 @@ -3,26 +3,27 @@ Priority: optional Maintainer: Ubuntu MOTU Developers XSBC-Original-Maintainer: Debichem Team -Uploaders: Daniel Leidert (dale) , Michael Banck -Build-Depends: debhelper (>= 5), autotools-dev, bodr (>= 5), - chemical-mime-data (>= 0.1.94), dpatch, gawk, intltool, libtool, - doxygen, gnome-doc-utils, libglade2-dev (>= 2.4.0), - libgnomeprintui2.2-dev (>= 2.4.0), libgnomevfs2-dev (>= 2.4.0), - libgoffice-0-dev (>= 0.4.0), libgtk2.0-dev (>= 2.10.0), - libgtkglext1-dev (>= 1.0.0), libopenbabel-dev (>= 2.1.0), - xulrunner-dev, shared-mime-info (>= 0.12), xsltproc, zlib1g-dev | libz-dev -Standards-Version: 3.7.3 +Uploaders: Daniel Leidert (dale) , + Michael Banck +Build-Depends: debhelper (>= 6.0.7), autotools-dev, bodr (>= 5), + chemical-mime-data (>= 0.1.94), docbook-xml, doxygen, dpatch, gawk, gconf2, gnome-doc-utils, + xulrunner-dev, intltool, libtool, shared-mime-info (>= 0.12), xsltproc, + libcairo2-dev (>= 1.6.0), libglade2-dev (>= 2.4.0), libglib2.0-dev (>= 2.16.1), + libgnomecanvas2-dev (>= 2.4.0), libgoffice-0-8-dev (>= 0.6.5), + libgsf-1-dev (>= 1.14.9), libgtk2.0-dev (>= 2.12.0), libgtkglext1-dev (>= 1.0.0), + libopenbabel-dev (>= 2.1.0), libosmesa6-dev, libxml2-dev (>= 2.4.16), + zlib1g-dev | libz-dev +Standards-Version: 3.8.3 Homepage: http://www.nongnu.org/gchemutils/ Vcs-Browser: http://svn.debian.org/wsvn/debichem/ -Vcs-Svn: svn+ssh://svn.debian.org/svn/debichem/unstable/gnome-chemistry-utils/ -XS-DM-Upload-Allowed: yes +Vcs-Svn: svn://svn.debian.org/svn/debichem/unstable/gnome-chemistry-utils/ +DM-Upload-Allowed: yes Package: libgcu0 Architecture: any Section: libs -Depends: ${shlibs:Depends}, chemical-mime-data, bodr (>= 5) -Replaces: libgcu02ca (<< 0.4.9) -Conflicts: libgcu02ca (<< 0.4.9) +Depends: ${shlibs:Depends}, ${misc:Depends}, chemical-mime-data, bodr (>= 5) +Replaces: gchempaint (<< 0.10) Suggests: gcu-bin, gchempaint, gcrystal Description: GNOME chemistry utils (library) The GNOME Chemistry Utils provide C++ classes and Gtk+-2 widgets @@ -31,23 +32,13 @@ . This package provides the shared library. -Package: libgcu-dev -Architecture: any -Section: libdevel -Depends: libgcu0 (= ${binary:Version}), libglade2-dev (>= 2.4.0), libgnomeprint2.2-dev (>= 2.4.0), libgnomevfs2-dev (>= 2.4.0), libgoffice-0-dev (>= 0.4.0), libgtk2.0-dev (>= 2.10.0), libgtkglext1-dev (>= 1.0.0), libopenbabel-dev (>= 2.1.0) -Suggests: libgcu-doc -Description: GNOME chemistry utils (development version) - The GNOME Chemistry Utils provide C++ classes and Gtk+-2 widgets - related to chemistry. They will be used in future versions of both - gcrystal and gchempaint. - . - This package provides the development and header files. - Package: libgcu-dbg Architecture: any -Section: libdevel +Section: debug Priority: extra -Depends: libgcu0 (= ${binary:Version}) +Depends: libgcu0 (= ${binary:Version}), gcu-bin (= ${binary:Version}), + gcu-plugin (= ${binary:Version}), gcrystal (= ${binary:Version}), + gchempaint (= ${binary:Version}), ${misc:Depends} Description: GNOME chemistry utils (debugging symbols) The GNOME Chemistry Utils provide C++ classes and Gtk+-2 widgets related to chemistry. They will be used in future versions of both @@ -57,24 +48,10 @@ the utilities provided by the gcu-bin and gcrystal packages. Install it to get a meaningful backtrace in case of a crash. -Package: libgcu-doc -Architecture: all -Section: doc -Suggests: lynx | www-browser, libgcu0 (= ${source:Version}) -Description: GNOME chemistry utils (documentation) - The GNOME Chemistry Utils provide C++ classes and Gtk+-2 widgets - related to chemistry. They will be used in future versions of both - gcrystal and gchempaint. - . - This package provides the API documentation. - Package: gcu-bin Architecture: any -Section: science -Depends: ${shlibs:Depends}, chemical-mime-data -Replaces: gcu (<< 0.4.9) -Conflicts: gcu (<< 0.4.9) -Suggests: libgcu-doc, gchempaint, gcrystal +Depends: ${shlibs:Depends}, ${misc:Depends}, chemical-mime-data +Suggests: gchempaint, gcrystal Description: GNOME chemistry utils (helper applications) The GNOME Chemistry Utils provide C++ classes and Gtk+-2 widgets related to chemistry. They will be used in future versions of both @@ -85,24 +62,32 @@ * a molecular structures viewer (GChem3D) * a chemical calculator (GChemCalc) * a periodic table of the elements (GChemTable) + * a ... (GSpectrum) Package: gcu-plugin Architecture: any -Section: science -Depends: ${shlibs:Depends}, firefox | abrowser | iceweasel | iceape-browser | galeon | epiphany-browser | xulrunner +Depends: ${shlibs:Depends}, ${misc:Depends}, iceweasel | galeon Description: GNOME chemistry utils (browser plugin) The GNOME Chemistry Utils provide C++ classes and Gtk+-2 widgets related to chemistry. They will be used in future versions of both gcrystal and gchempaint. . - This package provides a browser plugin for Mozilla based browsers, - lice Iceweasel, Iceape, Firefox and the Mozilla Browser suite. + This package provides a browser plugin for Gecko-based browsers. + It does not (yet) work with WebKit-based browsers. Package: gcrystal Architecture: any -Section: science Depends: ${shlibs:Depends}, ${misc:Depends}, chemical-mime-data Description: lightweight crystal structures visualizer GNOME Crystal is a light model visualizer for crystal-structures. It is based on the GNOME Chemistry Utils and should display models of all sorts of crystal microscopic structures using OpenGL. + +Package: gchempaint +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: chemical-mime-data, gcu-bin +Description: 2D chemical structures editor for the GNOME2 desktop + GChemPaint is an editor for 2D chemical structures with a multiple + document interface. Drawn molecules can be searched at NIST Webbook + and PubChem. diff -Nru gnome-chemistry-utils-0.8.6/debian/copyright gnome-chemistry-utils-0.10.9/debian/copyright --- gnome-chemistry-utils-0.8.6/debian/copyright 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/copyright 2009-12-05 14:42:25.000000000 +0100 @@ -1,19 +1,28 @@ -This package was debianized by Daniel Leidert . +This package was debianized by Daniel Leidert . It is +currently maintained by the debichem team . It was downloaded from: http://savannah.nongnu.org/download/gchemutils/ -Copyright: - - Copyright (C) 2002-2007 Jean Bréfort - Upstream Author: Jean Bréfort with patches by several contributors. -License: **/* - GPL v2 +Copyright: + + Copyright (C) 1999-2008 Jean Bréfort + + Partial copyright goes to: + + Copyright (C) 2006,2007 Benoit Jacob + Copyright (C) 2004-2007 Daniel Leidert + + libs/canvas/**: + Copyright (C) 1997-2000 Free Software Foundation + +License: **/* - GPL2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,7 +41,7 @@ On Debian systems, the GNU General Public License (GPL) is available as the file `/usr/share/common-licenses/GPL-2'. -License: mozilla-plugin/moz-plugin.c - LGPL v2.1 +License: libs/canvas/*, mozilla-plugin/moz-plugin.c - LGPL2+, LGPL2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -48,10 +57,11 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - On Debian systems, the GNU Lesser General Public License (LGPL) is available - as the file `/usr/share/common-licenses/LGPL-2.1'. + On Debian systems, the GNU Lesser General Public License (LGPL) 2 is + available as the file `/usr/share/common-licenses/LGPL-2' and version 2.1 + is available as the file `/usr/share/common-licenses/LGPL-2.1'. -License: docs/help/** - GFDL v1.1 +License: docs/help/** - GFDL-1.1+ Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any @@ -61,6 +71,7 @@ On Debian systems, the GNU Free Documentation License (GFDL) is available as the file `/usr/share/common-licenses/GFDL'. -The Debian packaging is (C) 2004-2008, Debichem Team + +The Debian packaging is Copyright (C) 2004-2009 by the debichem team and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff -Nru gnome-chemistry-utils-0.8.6/debian/gchempaint.install gnome-chemistry-utils-0.10.9/debian/gchempaint.install --- gnome-chemistry-utils-0.8.6/debian/gchempaint.install 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gchempaint.install 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,21 @@ +usr/bin/gchempaint* + +usr/lib/gchemutils/*/plugins/paint/ + +usr/share/applications/gchempaint*.desktop + +usr/share/gchemutils/*/glade/paint/ +usr/share/gchemutils/*/paint/ +usr/share/gchemutils/*/pixmaps/gchempaint_logo.png + +usr/share/gconf/schemas/gchempaint*.schemas + +usr/share/gnome/help/gchempaint* + +usr/share/icons/hicolor/*/apps/gchempaint.png + +usr/share/man/man1/gchempaint.1 + +usr/share/omf/gchempaint* + +../../debian/icons/gchempaint.xpm usr/share/pixmaps/ diff -Nru gnome-chemistry-utils-0.8.6/debian/gchempaint.links gnome-chemistry-utils-0.10.9/debian/gchempaint.links --- gnome-chemistry-utils-0.8.6/debian/gchempaint.links 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gchempaint.links 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1 @@ +usr/share/man/man1/gchempaint.1.gz usr/share/man/man1/gchempaint-0.10.1.gz diff -Nru gnome-chemistry-utils-0.8.6/debian/gchempaint.menu gnome-chemistry-utils-0.10.9/debian/gchempaint.menu --- gnome-chemistry-utils-0.8.6/debian/gchempaint.menu 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gchempaint.menu 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,7 @@ +?package(gchempaint):\ + needs="X11"\ + section="Applications/Science/Chemistry"\ + title="GChemPaint"\ + longtitle="2D Chemical Structures Editor"\ + icon="/usr/share/pixmaps/gchempaint.xpm"\ + command="/usr/bin/gchempaint" diff -Nru gnome-chemistry-utils-0.8.6/debian/gcrystal.install gnome-chemistry-utils-0.10.9/debian/gcrystal.install --- gnome-chemistry-utils-0.8.6/debian/gcrystal.install 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcrystal.install 2009-12-05 14:42:25.000000000 +0100 @@ -1,10 +1,18 @@ -usr/bin/gcrystal -usr/share/applications/gcrystal.desktop -usr/share/gchemutils/glade/crystal/ -usr/share/gchemutils/pixmaps/gcrystal_logo.png +usr/bin/gcrystal* + +usr/share/applications/gcrystal*.desktop + +usr/share/gchemutils/*/glade/crystal/ +usr/share/gchemutils/*/pixmaps/gcrystal_logo.png + usr/share/gconf/schemas/gcrystal.schemas -usr/share/gnome/help/gcrystal + +usr/share/gnome/help/gcrystal* + usr/share/icons/hicolor/*/apps/gcrystal.png + usr/share/man/man1/gcrystal.1 -usr/share/omf/gcrystal -usr/share/pixmaps/gcrystal.xpm + +usr/share/omf/gcrystal* + +../../debian/icons/gcrystal.xpm usr/share/pixmaps/ diff -Nru gnome-chemistry-utils-0.8.6/debian/gcrystal.links gnome-chemistry-utils-0.10.9/debian/gcrystal.links --- gnome-chemistry-utils-0.8.6/debian/gcrystal.links 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcrystal.links 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1 @@ +usr/share/man/man1/gcrystal.1.gz usr/share/man/man1/gcrystal-0.10.1.gz diff -Nru gnome-chemistry-utils-0.8.6/debian/gcu-bin.install gnome-chemistry-utils-0.10.9/debian/gcu-bin.install --- gnome-chemistry-utils-0.8.6/debian/gcu-bin.install 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcu-bin.install 2009-12-05 14:42:25.000000000 +0100 @@ -1,9 +1,37 @@ -usr/bin/{gchem3d-viewer,gchemcalc,gchemtable} -usr/share/applications/{gchem3d-viewer,gchemcalc,gchemtable}.desktop -usr/share/gchemutils/glade/gchemcalc.glade -usr/share/gchemutils/glade/table/ -usr/share/gnome/help/{gchem3d-viewer,gchemcalc,gchemtable}/ -usr/share/icons/hicolor/*/apps/{gchem3d-viewer,gchemcalc,gchemtable}.png -usr/share/man/man1/{gchem3d-viewer,gchemcalc,gchemtable}.1 -usr/share/omf/{gchem3d-viewer,gchemcalc,gchemtable} -usr/share/pixmaps/{gchem3d-viewer,gchemcalc,gchemtable}.xpm +usr/bin/gchem3d* +usr/bin/gchemcalc* +usr/bin/gchemtable* +usr/bin/gspectrum* + +usr/share/applications/gchem3d*.desktop +usr/share/applications/gchemcalc*.desktop +usr/share/applications/gchemtable*.desktop +usr/share/applications/gspectrum*.desktop + +usr/share/gchemutils/*/glade/gchemcalc.glade +usr/share/gchemutils/*/glade/table/ + +usr/share/gnome/help/gchem3d* +usr/share/gnome/help/gchemcalc* +usr/share/gnome/help/gchemtable* +usr/share/gnome/help/gspectrum* + +usr/share/icons/hicolor/*/apps/gchem3d.png +usr/share/icons/hicolor/*/apps/gchemcalc.png +usr/share/icons/hicolor/*/apps/gchemtable.png +usr/share/icons/hicolor/*/apps/gspectrum.png + +usr/share/man/man1/gchem3d.1 +usr/share/man/man1/gchemcalc.1 +usr/share/man/man1/gchemtable.1 +usr/share/man/man1/gspectrum.1 + +usr/share/omf/gchem3d* +usr/share/omf/gchemcalc* +usr/share/omf/gchemtable* +usr/share/omf/gspectrum* + +../../debian/icons/gchem3d.xpm usr/share/pixmaps/ +../../debian/icons/gchemcalc.xpm usr/share/pixmaps/ +../../debian/icons/gchemtable.xpm usr/share/pixmaps/ +../../debian/icons/gspectrum.xpm usr/share/pixmaps/ diff -Nru gnome-chemistry-utils-0.8.6/debian/gcu-bin.links gnome-chemistry-utils-0.10.9/debian/gcu-bin.links --- gnome-chemistry-utils-0.8.6/debian/gcu-bin.links 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcu-bin.links 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,4 @@ +usr/share/man/man1/gchem3d.1.gz usr/share/man/man1/gchem3d-0.10.1.gz +usr/share/man/man1/gchemcalc.1.gz usr/share/man/man1/gchemcalc-0.10.1.gz +usr/share/man/man1/gchemtable.1.gz usr/share/man/man1/gchemtable-0.10.1.gz +usr/share/man/man1/gspectrum.1.gz usr/share/man/man1/gspectrum-0.10.1.gz diff -Nru gnome-chemistry-utils-0.8.6/debian/gcu-bin.menu gnome-chemistry-utils-0.10.9/debian/gcu-bin.menu --- gnome-chemistry-utils-0.8.6/debian/gcu-bin.menu 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcu-bin.menu 2009-12-05 14:42:25.000000000 +0100 @@ -3,8 +3,8 @@ section="Applications/Science/Chemistry"\ title="GChem3D"\ longtitle="3D Molecular Structure Viewer"\ - icon="/usr/share/pixmaps/gchem3d-viewer.xpm"\ - command="/usr/bin/gchem3d-viewer" + icon="/usr/share/pixmaps/gchem3d.xpm"\ + command="/usr/bin/gchem3d" ?package(gcu-bin):\ needs="X11"\ section="Applications/Science/Chemistry"\ diff -Nru gnome-chemistry-utils-0.8.6/debian/gcu-plugin.dirs gnome-chemistry-utils-0.10.9/debian/gcu-plugin.dirs --- gnome-chemistry-utils-0.8.6/debian/gcu-plugin.dirs 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcu-plugin.dirs 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,4 @@ +usr/lib/firefox/plugins +usr/lib/seamonkey/plugins +usr/lib/mozilla/plugins +usr/lib/xulrunner/plugins diff -Nru gnome-chemistry-utils-0.8.6/debian/gcu-plugin.install gnome-chemistry-utils-0.10.9/debian/gcu-plugin.install --- gnome-chemistry-utils-0.8.6/debian/gcu-plugin.install 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcu-plugin.install 2009-12-05 14:42:25.000000000 +0100 @@ -1,2 +1,2 @@ usr/lib/gchemutils/chem-viewer -usr/lib/xulrunner-addons/plugins/libmozgcu.* +usr/lib/xulrunner-addons/plugins/*.so diff -Nru gnome-chemistry-utils-0.8.6/debian/gcu-plugin.links gnome-chemistry-utils-0.10.9/debian/gcu-plugin.links --- gnome-chemistry-utils-0.8.6/debian/gcu-plugin.links 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/gcu-plugin.links 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,4 @@ +usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/seamonkey/plugins/libmozgcu.so +usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/firefox/plugins/libmozgcu.so +usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/mozilla/plugins/libmozgcu.so +usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/xulrunner/plugins/libmozgcu.so diff -Nru gnome-chemistry-utils-0.8.6/debian/icons/gchem3d-viewer.xpm gnome-chemistry-utils-0.10.9/debian/icons/gchem3d-viewer.xpm --- gnome-chemistry-utils-0.8.6/debian/icons/gchem3d-viewer.xpm 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/icons/gchem3d-viewer.xpm 1970-01-01 01:00:00.000000000 +0100 @@ -1,203 +0,0 @@ -/* XPM */ -static char *gchem3d-viewer[] = { -/* columns rows colors chars-per-pixel */ -"32 32 165 2", -" c black", -". c #1D1D1D", -"X c gray17", -"o c #323232", -"O c #343434", -"+ c gray21", -"@ c #393939", -"# c #3A3A3A", -"$ c gray26", -"% c #434343", -"& c #444444", -"* c #464646", -"= c gray28", -"- c #484848", -"; c #4E4E4E", -": c gray31", -"> c #505050", -", c #515151", -"< c gray32", -"1 c #535353", -"2 c #565656", -"3 c gray34", -"4 c #5A5A5A", -"5 c gray36", -"6 c #5D5D5D", -"7 c gray37", -"8 c gray38", -"9 c #646464", -"0 c #656565", -"q c #676767", -"w c #686868", -"e c #6A6A6A", -"r c gray42", -"t c #6C6C6C", -"y c #6D6D6D", -"u c gray43", -"i c #717171", -"p c #727272", -"a c gray45", -"s c #747474", -"d c gray46", -"f c #767676", -"g c #777777", -"h c gray47", -"j c #797979", -"k c gray48", -"l c #7B7B7B", -"z c #7C7C7C", -"x c gray49", -"c c #7E7E7E", -"v c gray50", -"b c #808080", -"n c #818181", -"m c #838383", -"M c #848484", -"N c gray52", -"B c #868686", -"V c gray53", -"C c #888888", -"Z c #898989", -"A c gray54", -"S c #8B8B8B", -"D c gray55", -"F c #8D8D8D", -"G c #8E8E8E", -"H c #909090", -"J c gray57", -"K c #929292", -"L c #939393", -"P c gray58", -"I c #959595", -"U c #979797", -"Y c #989898", -"T c gray60", -"R c #9A9A9A", -"E c #9B9B9B", -"W c gray61", -"Q c #9D9D9D", -"! c gray62", -"~ c #9F9F9F", -"^ c #A0A0A0", -"/ c gray63", -"( c #A2A2A2", -") c gray64", -"_ c #A4A4A4", -"` c #A5A5A5", -"' c gray65", -"] c #A7A7A7", -"[ c gray66", -"{ c #A9A9A9", -"} c #AAAAAA", -"| c gray67", -" . c #ACACAC", -".. c gray68", -"X. c #AEAEAE", -"o. c #AFAFAF", -"O. c gray69", -"+. c #B1B1B1", -"@. c gray70", -"#. c #B4B4B4", -"$. c #B6B6B6", -"%. c #B7B7B7", -"&. c gray72", -"*. c #B9B9B9", -"=. c gray73", -"-. c #BCBCBC", -";. c gray74", -":. c gray", -">. c gray75", -",. c #C0C0C0", -"<. c #C1C1C1", -"1. c gray76", -"2. c #C3C3C3", -"3. c gray77", -"4. c #C5C5C5", -"5. c #C6C6C6", -"6. c gray78", -"7. c #C8C8C8", -"8. c gray79", -"9. c #CACACA", -"0. c #CBCBCB", -"q. c gray80", -"w. c #CECECE", -"e. c gray82", -"r. c #D2D2D2", -"t. c LightGray", -"y. c gray83", -"u. c #D5D5D5", -"i. c gray84", -"p. c #D7D7D7", -"a. c #D8D8D8", -"s. c gray85", -"d. c #DADADA", -"f. c gray86", -"g. c gainsboro", -"h. c #DDDDDD", -"j. c gray87", -"k. c #DFDFDF", -"l. c gray88", -"z. c #E1E1E1", -"x. c gray89", -"c. c #E4E4E4", -"v. c gray90", -"b. c #E6E6E6", -"n. c #E9E9E9", -"m. c gray92", -"M. c #ECECEC", -"N. c gray93", -"B. c #EEEEEE", -"V. c #EFEFEF", -"C. c gray94", -"Z. c #F1F1F1", -"A. c gray95", -"S. c #F4F4F4", -"D. c #F6F6F6", -"F. c gray97", -"G. c #F8F8F8", -"H. c #F9F9F9", -"J. c gray98", -"K. c #FBFBFB", -"L. c gray99", -"P. c #FDFDFD", -"I. c #FEFEFE", -"U. c gray100", -"Y. c None", -/* pixels */ -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V ~ ] E h Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V o.e.f.8.E y Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.i ] m.I.I.I.w.E Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.n *.H.I.I.I.c.~ Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V *.F.I.I.I.g.W Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.i W k.F.I.F.<.G Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.q ~ 8.e.*.G r Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V 6.g.W q Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.G i.A.~ Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.J i.A.W Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.J i.A.~ Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I f.A.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I f.m.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.E f.A.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I g.m.~ . Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.# % q E ] g = # Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.: q h V C n r : O Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.O 7 h E ] ] E v q = Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.= i I *.f.c.<.I h : o Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.= 1 i 2 v W w.A.I.c.W n 4 7 1 Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.V W ..W V g V G W $.v g E *.-.-.8.W v i ] J n g q V E ~ E q Y.", -"C ..g.A.k.] ~ o.<.6.8.W r C n h v h C i V 6.<.$.~ J E f.k.w.I y ", -"] f.I.I.F.e.8.6.-...W G 1 y q h v r i 2 V ~ $.-.6.6.8.F.I.I.8.I ", -"] k.I.I.I.f...E G n i 7 % : 4 h v 8 2 = 7 h n G ] $.i.I.I.I.i.] ", -"W 8.H.I.I.c.C 2 Y.Y.Y.Y.Y.7 i G E v g r Y.Y.Y.% q J m.I.I.I.8.E ", -"n ] g.A.c.*.n : Y.Y.Y.Y.8 C -.g.c.e.~ h Y.Y.Y.Y.q J i.A.F.c.] v ", -"Y.8 G W J g Y.Y.Y.Y.Y.Y.v o.A.I.I.I.i.E Y.Y.Y.Y.Y.= G ..*.W g Y.", -"Y.Y.Y.q 7 Y.Y.Y.Y.Y.Y.Y.G 6.H.I.I.I.m.] Y.Y.Y.Y.Y.Y.1 g h r Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I 8.H.I.I.I.c.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.v ] m.H.I.H.8.J Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.C o.w.e.6.E g Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", -"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.n E ] J h Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y." -}; diff -Nru gnome-chemistry-utils-0.8.6/debian/icons/gchem3d.xpm gnome-chemistry-utils-0.10.9/debian/icons/gchem3d.xpm --- gnome-chemistry-utils-0.8.6/debian/icons/gchem3d.xpm 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/icons/gchem3d.xpm 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,203 @@ +/* XPM */ +static char *gchem3d[] = { +/* columns rows colors chars-per-pixel */ +"32 32 165 2", +" c black", +". c #1D1D1D", +"X c gray17", +"o c #323232", +"O c #343434", +"+ c gray21", +"@ c #393939", +"# c #3A3A3A", +"$ c gray26", +"% c #434343", +"& c #444444", +"* c #464646", +"= c gray28", +"- c #484848", +"; c #4E4E4E", +": c gray31", +"> c #505050", +", c #515151", +"< c gray32", +"1 c #535353", +"2 c #565656", +"3 c gray34", +"4 c #5A5A5A", +"5 c gray36", +"6 c #5D5D5D", +"7 c gray37", +"8 c gray38", +"9 c #646464", +"0 c #656565", +"q c #676767", +"w c #686868", +"e c #6A6A6A", +"r c gray42", +"t c #6C6C6C", +"y c #6D6D6D", +"u c gray43", +"i c #717171", +"p c #727272", +"a c gray45", +"s c #747474", +"d c gray46", +"f c #767676", +"g c #777777", +"h c gray47", +"j c #797979", +"k c gray48", +"l c #7B7B7B", +"z c #7C7C7C", +"x c gray49", +"c c #7E7E7E", +"v c gray50", +"b c #808080", +"n c #818181", +"m c #838383", +"M c #848484", +"N c gray52", +"B c #868686", +"V c gray53", +"C c #888888", +"Z c #898989", +"A c gray54", +"S c #8B8B8B", +"D c gray55", +"F c #8D8D8D", +"G c #8E8E8E", +"H c #909090", +"J c gray57", +"K c #929292", +"L c #939393", +"P c gray58", +"I c #959595", +"U c #979797", +"Y c #989898", +"T c gray60", +"R c #9A9A9A", +"E c #9B9B9B", +"W c gray61", +"Q c #9D9D9D", +"! c gray62", +"~ c #9F9F9F", +"^ c #A0A0A0", +"/ c gray63", +"( c #A2A2A2", +") c gray64", +"_ c #A4A4A4", +"` c #A5A5A5", +"' c gray65", +"] c #A7A7A7", +"[ c gray66", +"{ c #A9A9A9", +"} c #AAAAAA", +"| c gray67", +" . c #ACACAC", +".. c gray68", +"X. c #AEAEAE", +"o. c #AFAFAF", +"O. c gray69", +"+. c #B1B1B1", +"@. c gray70", +"#. c #B4B4B4", +"$. c #B6B6B6", +"%. c #B7B7B7", +"&. c gray72", +"*. c #B9B9B9", +"=. c gray73", +"-. c #BCBCBC", +";. c gray74", +":. c gray", +">. c gray75", +",. c #C0C0C0", +"<. c #C1C1C1", +"1. c gray76", +"2. c #C3C3C3", +"3. c gray77", +"4. c #C5C5C5", +"5. c #C6C6C6", +"6. c gray78", +"7. c #C8C8C8", +"8. c gray79", +"9. c #CACACA", +"0. c #CBCBCB", +"q. c gray80", +"w. c #CECECE", +"e. c gray82", +"r. c #D2D2D2", +"t. c LightGray", +"y. c gray83", +"u. c #D5D5D5", +"i. c gray84", +"p. c #D7D7D7", +"a. c #D8D8D8", +"s. c gray85", +"d. c #DADADA", +"f. c gray86", +"g. c gainsboro", +"h. c #DDDDDD", +"j. c gray87", +"k. c #DFDFDF", +"l. c gray88", +"z. c #E1E1E1", +"x. c gray89", +"c. c #E4E4E4", +"v. c gray90", +"b. c #E6E6E6", +"n. c #E9E9E9", +"m. c gray92", +"M. c #ECECEC", +"N. c gray93", +"B. c #EEEEEE", +"V. c #EFEFEF", +"C. c gray94", +"Z. c #F1F1F1", +"A. c gray95", +"S. c #F4F4F4", +"D. c #F6F6F6", +"F. c gray97", +"G. c #F8F8F8", +"H. c #F9F9F9", +"J. c gray98", +"K. c #FBFBFB", +"L. c gray99", +"P. c #FDFDFD", +"I. c #FEFEFE", +"U. c gray100", +"Y. c None", +/* pixels */ +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V ~ ] E h Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V o.e.f.8.E y Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.i ] m.I.I.I.w.E Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.n *.H.I.I.I.c.~ Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V *.F.I.I.I.g.W Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.i W k.F.I.F.<.G Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.q ~ 8.e.*.G r Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.V 6.g.W q Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.G i.A.~ Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.J i.A.W Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.J i.A.~ Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I f.A.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I f.m.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.E f.A.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I g.m.~ . Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.# % q E ] g = # Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.: q h V C n r : O Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.O 7 h E ] ] E v q = Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.= i I *.f.c.<.I h : o Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.= 1 i 2 v W w.A.I.c.W n 4 7 1 Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.V W ..W V g V G W $.v g E *.-.-.8.W v i ] J n g q V E ~ E q Y.", +"C ..g.A.k.] ~ o.<.6.8.W r C n h v h C i V 6.<.$.~ J E f.k.w.I y ", +"] f.I.I.F.e.8.6.-...W G 1 y q h v r i 2 V ~ $.-.6.6.8.F.I.I.8.I ", +"] k.I.I.I.f...E G n i 7 % : 4 h v 8 2 = 7 h n G ] $.i.I.I.I.i.] ", +"W 8.H.I.I.c.C 2 Y.Y.Y.Y.Y.7 i G E v g r Y.Y.Y.% q J m.I.I.I.8.E ", +"n ] g.A.c.*.n : Y.Y.Y.Y.8 C -.g.c.e.~ h Y.Y.Y.Y.q J i.A.F.c.] v ", +"Y.8 G W J g Y.Y.Y.Y.Y.Y.v o.A.I.I.I.i.E Y.Y.Y.Y.Y.= G ..*.W g Y.", +"Y.Y.Y.q 7 Y.Y.Y.Y.Y.Y.Y.G 6.H.I.I.I.m.] Y.Y.Y.Y.Y.Y.1 g h r Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I 8.H.I.I.I.c.] Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.v ] m.H.I.H.8.J Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.C o.w.e.6.E g Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.", +"Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.n E ] J h Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y." +}; diff -Nru gnome-chemistry-utils-0.8.6/debian/icons/gchempaint.xpm gnome-chemistry-utils-0.10.9/debian/icons/gchempaint.xpm --- gnome-chemistry-utils-0.8.6/debian/icons/gchempaint.xpm 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/icons/gchempaint.xpm 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,295 @@ +/* XPM */ +static char *gcrystal[] = { +/* columns rows colors chars-per-pixel */ +"32 32 257 2", +" c #000000", +". c #050905", +"X c #060908", +"o c #0A0603", +"O c #0A0B0B", +"+ c #090B04", +"@ c #0A160C", +"# c #0F1C14", +"$ c #130C04", +"% c #121313", +"& c #171919", +"* c #1B1B12", +"= c #181C1B", +"- c #0F2111", +"; c #1A2917", +": c #182516", +"> c #2F1B07", +", c #251606", +"< c #281D14", +"1 c #371D06", +"2 c #293811", +"3 c #35200D", +"4 c #392617", +"5 c #212323", +"6 c #242D2B", +"7 c #263425", +"8 c #2E3434", +"9 c #323737", +"0 c #373838", +"q c #3A3F3E", +"w c #1E4025", +"e c #1C4C33", +"r c #1C4A38", +"t c #1E5232", +"y c #214024", +"u c #294320", +"i c #254B21", +"p c #2D4831", +"a c #2E4F38", +"s c #244E31", +"d c #275937", +"f c #295437", +"g c #285835", +"h c #33472A", +"j c #305E3C", +"k c #315B33", +"l c #336036", +"z c #386639", +"x c #2B5D41", +"c c #334F40", +"v c #3A6C40", +"b c #3F6A4A", +"n c #3D6750", +"m c #3D7245", +"M c #3F7B5C", +"N c #45260B", +"B c #402A17", +"V c #58310B", +"C c #593A18", +"Z c #64360C", +"A c #603918", +"S c #713C0E", +"D c #4E5939", +"F c #43513D", +"G c #5E4C22", +"H c #406639", +"J c #42693A", +"K c #4D733B", +"L c #546A23", +"P c #70421A", +"I c #604E3D", +"U c #63562F", +"Y c #725E30", +"T c #464747", +"R c #414949", +"E c gray29", +"W c #46534D", +"Q c #4C5453", +"! c gray32", +"~ c #466D4C", +"^ c #406153", +"/ c #4C6658", +"( c #496B52", +") c #4B7244", +"_ c #4B744C", +"` c #4B7D49", +"' c #457540", +"] c #477551", +"[ c #4C7B53", +"{ c #597042", +"} c #557648", +"| c #507B5E", +" . c #5A6463", +".. c #567865", +"X. c #527562", +"o. c #6B5C4A", +"O. c #647B59", +"+. c #647B56", +"@. c #70705C", +"#. c #656F6E", +"$. c gray39", +"%. c #6E7D6F", +"&. c #677969", +"*. c #6D7372", +"=. c #6F7D7C", +"-. c #657473", +";. c #7B7B7A", +":. c #707776", +">. c #5F8630", +",. c #4E9A51", +"<. c #51864D", +"1. c #5D8456", +"2. c #53955D", +"3. c #4B8761", +"4. c #4C9465", +"5. c #5D8763", +"6. c #5E9B62", +"7. c #5BAD69", +"8. c #5EB875", +"9. c #60835E", +"0. c #728E55", +"q. c #739F5D", +"w. c #678065", +"e. c #6C8775", +"r. c #74866F", +"t. c #708861", +"y. c #708E7B", +"u. c #728475", +"i. c #75957F", +"p. c #7FB45D", +"a. c #63B26A", +"s. c #6CB870", +"d. c #72BF72", +"f. c #7ABC78", +"g. c #5FC371", +"h. c #63CD72", +"j. c #6ED475", +"k. c #7FD578", +"l. c #708280", +"z. c #7B8B85", +"x. c #7A8D8B", +"c. c #7D9C86", +"v. c #66DF89", +"b. c #76DE98", +"n. c #6BE68C", +"m. c #7AE88B", +"M. c #6EE8A2", +"N. c #864810", +"B. c #8B4A10", +"V. c #924F14", +"C. c #895B32", +"Z. c #986A3D", +"A. c #AC5B12", +"S. c #A55E1F", +"D. c #BC6315", +"F. c #BD6E29", +"G. c #866A55", +"H. c #A17746", +"J. c #CA6A15", +"K. c #D7751E", +"L. c #DA7418", +"P. c #CF7E34", +"I. c #D57724", +"U. c #E17618", +"Y. c #E67615", +"T. c #93BE3C", +"R. c #809871", +"E. c #88A769", +"W. c #82A06C", +"Q. c #8DAA77", +"!. c #86B367", +"~. c #8EB074", +"^. c #BF9571", +"/. c #8DD87C", +"(. c #96C66F", +"). c #A3CF61", +"_. c #A4DF6A", +"`. c #BCE470", +"'. c #EF801F", +"]. c #E78229", +"[. c #F78C2F", +"{. c #DA985D", +"}. c #C49A76", +"|. c #F29441", +" X c #F69F52", +".X c #F7AC6B", +"XX c #858685", +"oX c #868E8D", +"OX c #82928B", +"+X c #889D8B", +"@X c #849897", +"#X c #899A96", +"$X c #869493", +"%X c #939C9B", +"&X c #989A9A", +"*X c #909595", +"=X c #88A095", +"-X c #91A09E", +";X c #94A2A1", +":X c #98A6A5", +">X c #99A8A6", +",X c #9CABAA", +"X,X! o YXYXYXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYXYX O l.zX6X>X6X,X .X YXYXYXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYXYX % x.zX6X>X6X6X#.O YXYXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYXYX % @XzX6X>X5X3X:.% YXYXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYXYX = X,X3Xz.& YXYXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYXYX 5 7XzX3X:X,X6X$X5 YXYXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYXYX 9 zXzX3X:X3X6X%X8 YXYXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYXYX c cXzX3X;X>X8X:XR YXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYXYX O l.vXzX3X;X:XxX,X*.O YXYXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYX 8 zXvXzX,X;X:X0X7X-X9 YXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYXYX % x.IXIXcX,X%X-X>X,X,X=.= YXYXYXYXYXYXYXYXYXYXYX", +"YXYXYXYXYX . F pXJXHX7X;XoXx.#X-X-X#XW . YXYXYXYXYXYXYXYXYXYX", +"YXYXYXYX 7 E.NXBX2X+XoX%.&.r.z.OX=Xe.6 . YXYXYXYXYXYXYXYXYX", +"YXYXYXYX : 0.iXNXaXQ.R.r.O.9.&.e.y.i.c.( # YXYXYXYXYXYXYXYXYX", +"YXYXYX + L ).gXVXuX~.W.0.O.+.O.1.5.1.5.5.p X YXYXYXYXYXYXYXYX", +"YXYX 2 T.`.CXgX(.!.q.9.{ { K K K ' m [ ( : YXYXYXYXYX ", +"YXYX + >._.ZXSXAXdXqX~.6.<.) K z z l d x | a X o * < o ", +"YXYX : p.jXPXPXhXfXqXh.6.<.` ) J k s e e ../ # $ 4 A Z.}.^.3 ", +"YXYX u fXKXLXUXhXwXk.s.2.` _ ) v k t r r ..&.A V.D.I.I.S.S 4 o ", +"YXYX i wXnXmXMXyXm.j.a.2.] _ b j s h U Z.].].Y.Y.D.S 1 $ o ", +"YXYX @ ,.rXkXlXM.n.j.7.3.n D Y H.{..X X].L.J.B.N o YXYXYX", +"YXYX - z 8.b.M.n.g.4...o.U.[.|.].J.A.N.V , YXYXYXYXYX", +"YXYXYX . - w g z ~ #.XX;.F.J.A.N.V > o YXYXYXYXYXYXYXYX", +"YXYX O 5 ! ;.&X9X9XC.Z 1 $ YXYXYXYXYXYXYXYXYXYX", +" X # 7 I G.o.XXXX;.$.E & YXYXYXYXYXYXYXYXYXYXYXYXYXYX", +"X 6 n | z G A 4 5 O YXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYX", +"X 6 a a y ; $ YXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYX", +" . . YXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYX" +}; diff -Nru gnome-chemistry-utils-0.8.6/debian/icons/gspectrum.xpm gnome-chemistry-utils-0.10.9/debian/icons/gspectrum.xpm --- gnome-chemistry-utils-0.8.6/debian/icons/gspectrum.xpm 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/icons/gspectrum.xpm 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,171 @@ +/* XPM */ +static char *gspectrum[] = { +/* columns rows colors chars-per-pixel */ +"32 26 139 2", +" c black", +". c gray16", +"X c gray17", +"o c #2F2F2F", +"O c #323232", +"+ c gray20", +"@ c gray21", +"# c #337C36", +"$ c #414141", +"% c gray32", +"& c #535353", +"* c gray34", +"= c #585858", +"- c gray39", +"; c gray40", +": c #686868", +"> c DimGray", +", c #6A6A6A", +"< c gray42", +"1 c #6C6C6C", +"2 c #6C6C6D", +"3 c gray43", +"4 c #6F6F6F", +"5 c #747474", +"6 c gray46", +"7 c #767676", +"8 c #7B7B7B", +"9 c #7C7C7C", +"0 c #7E7E7E", +"q c #7F7F7F", +"w c #BA1A1A", +"e c #C01A1A", +"r c #C41A1A", +"t c #C41B1B", +"y c #EC1E1E", +"u c #EC1F1F", +"i c #EE1F1F", +"p c #EB2121", +"a c #ED2020", +"s c #ED2121", +"d c #EE2020", +"f c #1ABD20", +"g c #1AC222", +"h c #21EB28", +"j c #20EC29", +"k c #20ED29", +"l c #20EE28", +"z c #21EC2A", +"x c #21EE2B", +"c c #1E18B4", +"v c #1F19B6", +"b c #201ABE", +"n c #2E28BD", +"m c #211AC3", +"M c #211AC4", +"N c #312BC5", +"B c #2A1FEC", +"V c #281FEE", +"C c #2720ED", +"Z c #2720EE", +"A c #2820EB", +"S c #2820EC", +"D c #2820ED", +"F c #2821ED", +"G c #5D58C2", +"H c #808080", +"J c #838383", +"K c #868686", +"L c gray53", +"P c #888888", +"I c gray54", +"U c gray55", +"Y c #8D8D8D", +"T c #909090", +"R c #929292", +"E c #939393", +"W c gray58", +"Q c #989898", +"! c #9A9A9A", +"~ c #9B9B9B", +"^ c #9D9D9D", +"/ c gray62", +"( c #A0A0A0", +") c #A2A2A2", +"_ c gray64", +"` c #A4A4A4", +"' c #A5A5A5", +"] c #A7A7A7", +"[ c gray66", +"{ c #AAAAAA", +"} c gray67", +"| c gray68", +" . c #AEAEAE", +".. c #AFAFAF", +"X. c gray69", +"o. c #B1B1B1", +"O. c #B4B4B4", +"+. c gray72", +"@. c gray73", +"#. c gray74", +"$. c gray75", +"%. c #C0C0C0", +"&. c #C1C1C1", +"*. c gray76", +"=. c #C3C3C3", +"-. c gray77", +";. c #C5C5C5", +":. c #C6C6C6", +">. c gray78", +",. c gray79", +"<. c #CACACA", +"1. c #CBCBCB", +"2. c gray81", +"3. c #D2D2D2", +"4. c LightGray", +"5. c #D7D7D7", +"6. c gray85", +"7. c gray86", +"8. c #DDDDDD", +"9. c gray87", +"0. c #E2E2E2", +"q. c gray89", +"w. c gray90", +"e. c #E6E6E6", +"r. c gray93", +"t. c #F1F1F1", +"y. c gray95", +"u. c #F3F3F3", +"i. c #F4F4F4", +"p. c gray96", +"a. c gray97", +"s. c #F8F8F8", +"d. c #F9F9F9", +"f. c gray98", +"g. c #FBFBFB", +"h. c #FDFDFD", +"j. c #FEFEFE", +"k. c gray100", +"l. c None", +/* pixels */ +" l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l. l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.D l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.D l.l.l.l.l.8.f.f.3.l.l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.D l.l.l.l.X.d.k.k.p.( l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.D l.l.l.l./ y.j.k.r.l.l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.D l.l.l.l.G o.q.9.) l.l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.i l.l.l.l.l.D l.l.l.A l.: 5. .@ l.l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.a l.l.l.l.l.D l.l.l.C A , u.:.O l.l.z l.l.l.l.l.l.l.l.", +"l.l.l.l.p s l.l.l.l.l.D D l.l.D B < i.;.X l.l.l l.l.l.l.l.l.l.l.", +"l.l.l.l.p s l.l.l.l.l.D D l.l.Z D 1 p.=.l.l.l.j l.l.l.l.l.l.l.l.", +"l.l.l.l.a a l.l.l.l.l.D D l.l.S F 3 p.*.l.l.l.k l.l.l.l.l.l.l.l.", +"l.l.l.l.a a l.l.l.l.l.D D l.l.V F 4 p.%.l.l.l.k l.l.l.l.l.l.l.l.", +"l.l.l.l.a u l.l.l.l.l.D D l.l.S n 2 X.Q $ l.l.k l.l.l.l.l.l.l.l.", +"l.l.l.l.d a y l.l.l.D D D l.l.N ; H I L 7 = x k h l.l.l.l.l.l.l.", +"l.l.l.w r t e l.l.l.b m M c v * P [ =.@.R 6 # g f l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.l.l.l.+ < / 1.s.y.| J % l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.E E l.l.l.R ' ^ > ! -.#.+.} J P _ U l.l.l.9 l.l.l.", +"l.l.l.l.l.l.&.p.g.>.O.-.<.,.$.< J 0 q 5 Y 4 ~ -.:.#.{ ` t.u.;.l.", +"l.l.l.l.l.; r.k.k.0.#.[ K ; o l.& > q 6 - . o ; L { #.4.k.k.s.l.", +"l.l.l.l.l.l.7.h.j.a.8 l.l.l.l.l.l.5 E W l.l.l.l.l.l.P 7.k.k.u.l.", +"l.l.l.l.l.l.K 2.5.] l.l.l.l.l.l.T 6.i.u.>.l.l.l.l.l.l.| e.w.$.l.", +"l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.=.f.k.k.p.T l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.1.d.k.k.p.~ l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.) e.f.f.5.l.l.l.l.l.l.l.l.l.l.l.", +"l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.' ..l.l.l.l.l.l.l.l.l.l.l.l." +}; diff -Nru gnome-chemistry-utils-0.8.6/debian/libgcu0.install gnome-chemistry-utils-0.10.9/debian/libgcu0.install --- gnome-chemistry-utils-0.8.6/debian/libgcu0.install 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/libgcu0.install 2009-12-05 14:42:25.000000000 +0100 @@ -1,9 +1,22 @@ +usr/lib/gchemutils/*/plugins/cdx* + +usr/lib/goffice/*/plugins/gchemutils/ + usr/lib/*.so.* -usr/share/gchemutils/*.xml -usr/share/gchemutils/glade/gtkperiodic.glade -usr/share/gchemutils/glade/image-*.glade -usr/share/icons/hicolor/*/mimetypes/gnome-mime-application-x-gcrystal.png -usr/share/locale/* -usr/share/man/man3/*.3 + +usr/share/gchemutils/*/*.xml +usr/share/gchemutils/*/glade/gtkperiodic.glade +usr/share/gchemutils/*/glade/image-*.glade +usr/share/gchemutils/*/glade/print-setup.glade + +usr/share/gconf/schemas/gchemutils.schemas + +usr/share/locale/ + usr/share/mime/packages/gchemutils.xml + +usr/share/icons/hicolor/*/mimetypes/*application-x-gcrystal.png +usr/share/icons/hicolor/*/mimetypes/*application-x-gchempaint.png + usr/share/mimelnk/application/x-gcrystal.desktop +usr/share/mimelnk/application/x-gchempaint.desktop diff -Nru gnome-chemistry-utils-0.8.6/debian/libgcu0.lintian-overrides gnome-chemistry-utils-0.10.9/debian/libgcu0.lintian-overrides --- gnome-chemistry-utils-0.8.6/debian/libgcu0.lintian-overrides 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/libgcu0.lintian-overrides 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1 @@ +libgcu0: package-name-doesnt-match-sonames libgchempaint-0.10-0 libgcpcanvas-0.10-0 libgcu-0.10-0 diff -Nru gnome-chemistry-utils-0.8.6/debian/libgcu0.shlibs gnome-chemistry-utils-0.10.9/debian/libgcu0.shlibs --- gnome-chemistry-utils-0.8.6/debian/libgcu0.shlibs 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/libgcu0.shlibs 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -libgcu 0 libgcu0 (>= 0.8), libgcu0 (<< 0.9) diff -Nru gnome-chemistry-utils-0.8.6/debian/libgcu-dev.install gnome-chemistry-utils-0.10.9/debian/libgcu-dev.install --- gnome-chemistry-utils-0.8.6/debian/libgcu-dev.install 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/libgcu-dev.install 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -usr/lib/libgcu.so -usr/lib/pkgconfig/* -usr/include/gcu/* diff -Nru gnome-chemistry-utils-0.8.6/debian/libgcu-doc.doc-base gnome-chemistry-utils-0.10.9/debian/libgcu-doc.doc-base --- gnome-chemistry-utils-0.8.6/debian/libgcu-doc.doc-base 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/libgcu-doc.doc-base 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -Document: gnome-chemistry-utils -Title: The GNOME Chemistry Utils documentation -Author: Jean Bréfort -Abstract: This reference describes the GNOME chemistry utils - library, which provides C++ classes and Gtk+-2 widgets related - to chemistry. This reference details how to program using it. -Section: Apps/Programming - -Format: HTML -Index: /usr/share/doc/libgcu-doc/html/index.html -Files: /usr/share/doc/libgcu-doc/html/*.html diff -Nru gnome-chemistry-utils-0.8.6/debian/libgcu-doc.install gnome-chemistry-utils-0.10.9/debian/libgcu-doc.install --- gnome-chemistry-utils-0.8.6/debian/libgcu-doc.install 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/libgcu-doc.install 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -debian/tmp/usr/share/doc/gchemutils/reference/* usr/share/doc/libgcu-doc/html diff -Nru gnome-chemistry-utils-0.8.6/debian/patches/00list gnome-chemistry-utils-0.10.9/debian/patches/00list --- gnome-chemistry-utils-0.8.6/debian/patches/00list 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/patches/00list 2009-12-05 14:42:25.000000000 +0100 @@ -1,2 +1 @@ -misc_mime_support -fix_bodr8_crash +mime_icon_prefix diff -Nru gnome-chemistry-utils-0.8.6/debian/patches/fix_bodr8_crash.dpatch gnome-chemistry-utils-0.10.9/debian/patches/fix_bodr8_crash.dpatch --- gnome-chemistry-utils-0.8.6/debian/patches/fix_bodr8_crash.dpatch 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/patches/fix_bodr8_crash.dpatch 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix_bodr8_crash.dpatch by Jordan Mantha -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Fixes crashes with BODR > 8. Applied upstream in 0.8.7 - -@DPATCH@ -diff -urNad gnome-chemistry-utils-0.8.6~/gcu/element.cc gnome-chemistry-utils-0.8.6/gcu/element.cc ---- gnome-chemistry-utils-0.8.6~/gcu/element.cc 2007-04-06 09:28:29.000000000 -0700 -+++ gnome-chemistry-utils-0.8.6/gcu/element.cc 2008-03-27 01:40:07.000000000 -0700 -@@ -915,15 +915,17 @@ - int val = strtol (buf, NULL, 10); - xmlFree (buf); - buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); -- if (!strcmp (buf, "bo:discoveryDate")) -+ if (elt && !strcmp (buf, "bo:discoveryDate")) - elt->iprops["discoveryDate"] = val; - xmlFree (buf); - } - } - if (props.size () > 0) { -- map :: iterator i, iend = props.end (); -- for (i = props.begin (); i != iend; i++) -- elt->props[(*i).first] = (*i).second; -+ if (elt) { -+ map :: iterator i, iend = props.end (); -+ for (i = props.begin (); i != iend; i++) -+ elt->props[(*i).first] = (*i).second; -+ } - props.clear (); - } - child = child->next; diff -Nru gnome-chemistry-utils-0.8.6/debian/patches/mime_icon_prefix.dpatch gnome-chemistry-utils-0.10.9/debian/patches/mime_icon_prefix.dpatch --- gnome-chemistry-utils-0.8.6/debian/patches/mime_icon_prefix.dpatch 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/patches/mime_icon_prefix.dpatch 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,37 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## mime_icon_prefix.dpatch by Daniel Leidert (dale) +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: * pixmaps/Makefile.in (install-data-hook, uninstall-hook): The gnome-mime- +## FP: prefix is not longer necessary according to the fd.o spec. + +@DPATCH@ +diff -urNad gnome-chemistry-utils~/pixmaps/Makefile.in gnome-chemistry-utils/pixmaps/Makefile.in +--- gnome-chemistry-utils~/pixmaps/Makefile.in 2009-06-25 13:53:13.000000000 +0200 ++++ gnome-chemistry-utils/pixmaps/Makefile.in 2009-06-29 19:00:40.000000000 +0200 +@@ -492,11 +492,11 @@ + $(mkinstalldirs) $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes; \ + $(mkinstalldirs) $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps; \ + $(INSTALL_DATA) $(srcdir)/gcrystal$$i.png \ +- $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gcrystal.png; \ ++ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/application-x-gcrystal.png; \ + $(INSTALL_DATA) $(srcdir)/gcrystal$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gcrystal.png; \ + $(INSTALL_DATA) $(srcdir)/gchempaint$$i.png \ +- $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gchempaint.png; \ ++ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/application-x-gchempaint.png; \ + $(INSTALL_DATA) $(srcdir)/gchempaint$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchempaint.png; \ + $(INSTALL_DATA) $(srcdir)/gchem3d$$i.png \ +@@ -511,9 +511,9 @@ + + uninstall-hook: + for i in 32 48 72 128; do \ +- rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gcrystal.png; \ ++ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/application-x-gcrystal.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gcrystal.png; \ +- rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gchempaint.png; \ ++ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/application-x-gchempaint.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchempaint.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemcalc.png; \ diff -Nru gnome-chemistry-utils-0.8.6/debian/README.source gnome-chemistry-utils-0.10.9/debian/README.source --- gnome-chemistry-utils-0.8.6/debian/README.source 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/README.source 2009-12-05 14:42:25.000000000 +0100 @@ -0,0 +1,7 @@ +gnome-chemistry-utils source for Debian +--------------------------------------- + +This package uses the `dpatch' patch management solution. See +/usr/share/doc/dpatch/README.source.gz. + + -- Daniel Leidert (dale) , Mar 2009 diff -Nru gnome-chemistry-utils-0.8.6/debian/rules gnome-chemistry-utils-0.10.9/debian/rules --- gnome-chemistry-utils-0.8.6/debian/rules 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/rules 2009-12-05 14:42:25.000000000 +0100 @@ -12,7 +12,8 @@ CFLAGS = -Wall -g CXXFLAGS = -Wall -g -LDFLAGS = -Wl,-z,defs -Wl,--as-needed +# -Wl,-z,defs FTBFS +LDFLAGS = -Wl,--as-needed ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 @@ -23,44 +24,43 @@ LDFLAGS += -Wl,-O1 endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + config.status: patch-stamp configure dh_testdir + test -r /usr/share/misc/config.sub && \ + cp -f /usr/share/misc/config.sub config.sub + test -r /usr/share/misc/config.guess && \ + cp -f /usr/share/misc/config.guess config.guess # Add here commands to configure the package. - LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure \ + LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \ + ./configure \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --sysconfdir=/etc \ --with-gconf-schema-file-dir=\$${datadir}/gconf/schemas \ --libexecdir=\$${libdir}/gchemutils \ + --with-mozilla-libdir=\$${libdir}/xulrunner-addons \ --disable-schemas-install \ --disable-scrollkeeper \ - --disable-update-databases \ - --with-mozilla-libdir=/usr/lib/xulrunner-addons/ + --disable-update-databases build: build-stamp - -build-stamp: config.status +build-stamp: config.status dh_testdir - # Add here commands to compile the package. $(MAKE) - touch build-stamp clean: unpatch dh_testdir dh_testroot - - # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) distclean - - test -r /usr/share/misc/config.sub && \ - cp -f /usr/share/misc/config.sub config.sub - test -r /usr/share/misc/config.guess && \ - cp -f /usr/share/misc/config.guess config.guess - rm -rf debian/tmp/ dh_clean po/*.gmo po/.intltool-merge-cache build-stamp patch-stamp @@ -69,48 +69,29 @@ dh_testroot dh_clean -k dh_installdirs - # Add here commands to install the package into debian/gchemutils. $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - install -d $(CURDIR)/debian/tmp/usr/share/pixmaps - install -m 644 debian/icons/*.xpm $(CURDIR)/debian/tmp/usr/share/pixmaps/ - -# Build architecture-independent files here. binary-indep: build install - dh_testdir -i - dh_testroot -i - dh_installchangelogs -i NEWS - dh_installdocs -i - dh_install -i - dh_compress -i - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. binary-arch: build install dh_testdir -a dh_testroot -a dh_installchangelogs -a NEWS dh_installdocs -a - dh_install --sourcedir=$(CURDIR)/debian/tmp --list-missing -a + dh_install -a --sourcedir=$(CURDIR)/debian/tmp --list-missing -X.la dh_installexamples -a dh_installmenu -a - dh_installmime -a -plibgcu0 - dh_desktop -a -pgcu-bin -pgcrystal - dh_gconf -a -pgcrystal - dh_scrollkeeper -a -pgcu-bin -pgcrystal - dh_link -a -pgcu-plugin + dh_installmime -a + dh_lintian -a + # dh_desktop -a # deprecated since debhelper (7.2.8) + dh_gconf -a + # dh_scrollkeeper -a # deprecated since debhelper (7.2.15) + dh_icons -a + dh_link -a dh_strip -a --dbg-package=libgcu-dbg - dh_compress -a -pgcu-bin -Xusr/share/doc/gcu-bin/examples - dh_compress -a -pgcrystal -Xusr/share/doc/gcrystal/examples - dh_compress -a -Ngcu-bin -Ngcrystal + dh_compress -a -Xexamples dh_fixperms -a - chmod 644 $(CURDIR)/debian/gcu-bin/usr/share/doc/gcu-bin/examples/methane.xyz - dh_makeshlibs -a + dh_makeshlibs -a -V'libgcu0 (>= 0.10), libgcu0 (<< 0.11)' dh_installdeb -a dh_shlibdeps -a -L libgcu0 -l debian/libgcu0/usr/lib dh_gencontrol -a diff -Nru gnome-chemistry-utils-0.8.6/debian/watch gnome-chemistry-utils-0.10.9/debian/watch --- gnome-chemistry-utils-0.8.6/debian/watch 2009-12-05 14:42:24.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/debian/watch 2009-12-05 14:42:25.000000000 +0100 @@ -1,4 +1,4 @@ # See uscan(1) for format version=3 -http://download.savannah.gnu.org/releases/gchemutils/([\d\.]+)[02468]/gnome-chemistry-utils-([\d\.]+)\.tar\.gz +http://download.savannah.gnu.org/releases-noredirect/gchemutils/([\d\.]+)[02468]/gnome-chemistry-utils-([\d\.]+)\.tar\.gz diff -Nru gnome-chemistry-utils-0.8.6/depcomp gnome-chemistry-utils-0.10.9/depcomp --- gnome-chemistry-utils-0.8.6/depcomp 2006-10-19 06:51:14.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/depcomp 2009-08-12 08:51:00.000000000 +0200 @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2006-10-15.18 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -87,6 +85,15 @@ depmode=dashmstdout fi +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -192,14 +199,14 @@ ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' -' ' ' >> $depfile - echo >> $depfile +' ' ' >> "$depfile" + echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile + >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -215,34 +222,39 @@ # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -323,7 +335,12 @@ if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -399,7 +416,7 @@ # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -450,32 +467,39 @@ "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no - for arg in "$@"; do + cleared=no eat=no + for arg + do case $cleared in no) set ""; shift cleared=yes ;; esac + if test $eat = yes; then + eat=no + continue + fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix="`echo $object | sed 's/^.*\././'`" + obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" @@ -495,7 +519,7 @@ # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -533,13 +557,27 @@ msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. + # always write the preprocessed file to stdout. "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + IFS=" " for arg do case "$arg" in + -o) + shift + ;; + $object) + shift + ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -552,16 +590,23 @@ ;; esac done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + none) exec "$@" ;; @@ -580,5 +625,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/3d/C/figures/ball-and-stick.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/3d/C/figures/ball-and-stick.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/3d/C/figures/cylinders.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/3d/C/figures/cylinders.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/3d/C/figures/main-window.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/3d/C/figures/main-window.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/3d/C/figures/page-setup.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/3d/C/figures/page-setup.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/3d/C/figures/print-scale.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/3d/C/figures/print-scale.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/3d/C/figures/spacefill.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/3d/C/figures/spacefill.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/3d/C/figures/wireframe.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/3d/C/figures/wireframe.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/3d/C/gchem3d-0.10.xml gnome-chemistry-utils-0.10.9/docs/help/3d/C/gchem3d-0.10.xml --- gnome-chemistry-utils-0.8.6/docs/help/3d/C/gchem3d-0.10.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/3d/C/gchem3d-0.10.xml 2009-11-14 11:46:31.000000000 +0100 @@ -0,0 +1,417 @@ + + + + + + +]> + + + + &app; manual + + + + &app; Manual V&manrevision; + + 2008 + Jean Bréfort + + + + + &legal; + + + GNOME Documentation Project + + + + + Jean + Bréfort + +
jean.brefort@normalesup.org
+
+
+ +
+ + + + + + + &app; Manual V&manrevision; + &date; + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.1 + February 2006 + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + This manual describes version &appversion; of &app;. + + + Feedback + To report a bug or make a suggestion regarding the &app; application or + this manual, go to the + &app; home page. + + + + + &app; allows you to display molecular structures. + +
+ + + + + + Introduction + The &app; application is a simple + molecular structures visualizer. + + + + + + Getting started + + To Start &app; + You can start &app; in the following ways: + + + Applications menu + + Choose + + Science + Molecules Viewer + . + + + + Command line + + Type gchem3d, then press Return. + + + + + + When You Start &app; + When you start &app;, the following window is displayed: +
+ &app; main window + + + + Screenshot of the &app; main window. + + + + + +
+ + The &app; window contains the following + elements: + + Menubar + + The menus on the menubar contain all of the commands you need + to work with files in &app;. + + + Display area + + The display area contains the contents of an opened file + if any. + + + +
+ + To Open a File + To open a file, choose + File Open + + to display the Open File dialog. Select the file + that you want to open, then click OK. The file is + displayed in the &app; main window. + &app; can open files on a distant server. + &app; can open several file formats. Available formats are: + + ChemML files (*.cml) + + MDL MOL files, MDL Structure Data files (*.mol;*.sd;*.sdf) + + PDB files (*.pdb;*.ent) + + XYZ Coordinate Format files (*.xyz) + + + You can open multiple files in &app;. + The application displays each file in its own window. + Recently opened file appear in the File + Open recent sub-menu. + + + To Open Multiple Files from a Command Line + You can run &app; from a command line + and open a single file or multiple files. To open multiple files from a command + line, type the following command, then press Return: + gchem3d-viewer-unstable file1 file2 file3 + +
+ + + Usage + + To Save the View as an Image + To open a file, choose + File Save as Image... + + to display the Save as image dialog. Select a + file name and, if wanted, a file type and a size, then click + OK. Default image size is 300 pixels wide and 300 + pixels high. + Supported types are VRML, Postscript, Encapsulated Postscript, PDF, + and all types that GdkPixbuf can export. + You'll find an exact list in the drop-down file type menu. + If no file type is specified, &app; + tries to determine the type from the file name. If it does not succeed, + the default type (VRML) will be used. + An appropriate extension will be added to the file name if none + is found. + PostScript and PDF files can also be obtained with the Print command. + + + To Print the View + To print a file, choose + File Print... + . + &app; uses a 300 dpi resolution + when printing. + You might want to + change the background color before printing. + File Preview + opens a window with a preview of the printed output. + To tune the printed output, choose + File Page setup... + as explained below. + + The page setup dialog. + the first tab of the dialog concerns the paper and margins setup. + Headers and footers are not supported in the version of &app; +
+ The Page Setup tab. + + + + Screenshot of page setup dialog. + + + + + +
+ The second tab allows you tio choose the scale of the output. With no scaling or + scaling at 100%, the output will have the same size in points as the size in pixels on + the screen. If you choose automatic scaling, you can make the output fill the available + space either horizontally, vertically, or both (none of the options is equivalent to no scaling). + Printing to more than one page is not supported in this version of &app; +
+ The Print Scale tab. + + + + Screenshot of the printing scale page. + + + + + +
+
+
+ + To Change the Model Options + &app; id able to display a molecule + using four model types: the ball and stick model, the compact + model, the cylinders model, and the wireframe model. The first one is the default. + Multiple bonds are displayed as such in the ball and stick model. +
+ The Balls and Sticks model. + + + + Screenshot of the balls and sticks model. + + + + + +
+
+ The Spacefill model. + + + + Screenshot of the spacefill model. + + + + + +
+
+ The Cylinders model. + + + + Screenshot of the cylinders model. + + + + + +
+
+ The Wireframe model. + + + + Screenshot of the wireframe model. + + + + + +
+ To change the mode, choose either View Balls and sticks + , ViewSpace filling + , ViewCylinders + , or ViewWireframe + . + The model can also be selected from the command line: + gchem3d --display3d=cylinders or gchem3d -d cylinders + will open &app; with the cylinders model active. The other models are entered as + ball&stick, spacefill, and wireframe. + You can also change the orientation. Just click somewhere in + the view and drag the mouse until you get the wanted orientation. +
+ + To Change the Background Color + To change the backgound color, choose + View Background color + and select the appropriate color in the palette, or + choose a custom color. + The background color can also be selected from the command line: + gchem3d --bgcolor=white or gchem3d -b white + will open &app; with a white background in windows. Recognized strings are black (the default), + white, and #rrggbb where r, g, and b are hexadecimal digits. + + + To Ask a Question + If you choose Help Ask a question, + your mail agent should pop up with a new message to the Gnome Chemistry Utils + mailing list. + Another way to get some help is to connect on the #gchemutils channel + at irc.gimp.net and ask your question there (if you are not alone on the channel). + + + To Find the Gnome Chemistry Utils on the Web. + If you choose Help Gnome Chemistry Utils on the web, + the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. + The main page is + http://gchemutils.nongnu.org and the project + page at savannah http://savannah.nongnu.org/projects/gchemutils. + + + To Report a Bug + To report a bug, you must use the bug page for the Gnome Chemistry + Utils at Savannah. You can access it by choosing + Help Report Bugs + (hopefully you'll have only one at once to report). + You can also type the bug report page address directly in + the browser. The bug repository is at + https://savannah.nongnu.org/bugs/?group=gchemutils + +
+ + + + + License + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU + General Public License as + published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. + + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + A copy of the GNU General Public License is + included as an appendix to the GNOME Users + Guide. You may also obtain a copy of the + GNU General Public License from the Free + Software Foundation by visiting their Web site or by writing to +
+ Free Software Foundation, Inc. + 51 Franklin St - Fifth Floor + Boston, MA 02111-1307 + USA +
+
+
+ +
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/3d/C/gchem3d-viewer.xml gnome-chemistry-utils-0.10.9/docs/help/3d/C/gchem3d-viewer.xml --- gnome-chemistry-utils-0.8.6/docs/help/3d/C/gchem3d-viewer.xml 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/3d/C/gchem3d-viewer.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,309 +0,0 @@ - - - - - - -]> - - - - &app; manual - - - - &app; Manual V&manrevision; - - 2006 - Jean Bréfort - - - - - &legal; - - - GNOME Documentation Project - - - - - Jean - Bréfort - -
jean.brefort@normalesup.org
-
-
- -
- - - - - - - &app; Manual V&manrevision; - &date; - - Jean Bréfort - jean.brefort@normalesup.org - GNOME Documentation Project - - - - This manual describes version &appversion; of &app;. - - - Feedback - To report a bug or make a suggestion regarding the &app; application or - this manual, go to the - &app; home page. - - - - - &app; allows you to display molecular structures. - -
- - - - - - Introduction - The &app; application is a simple - molecular structures visualizer. - - - - - - Getting started - - To Start &app; - You can start &app; in the following ways: - - - Applications menu - - Choose - - Education - Molecules Viewer - . - - - - Command line - - Type gchem3d-viewer, then press Return. - - - - - - When You Start &app; - When you start &app;, the following window is displayed: -
- &app; main window - - - - Screenshot of the &app; main window. - - - - - -
- - The &app; window contains the following - elements: - - Menubar - - The menus on the menubar contain all of the commands you need - to work with files in &app;. - - - Display area - - The display area contains the contents of an opened file - if any. - - - -
- - To Open a File - To open a file, choose - File Open - - to display the Open File dialog. Select the file - that you want to open, then click OK. The file is - displayed in the &app; main window. - &app; can open files on a distant server using the Gnome Virtual - File System. - &app; can open several file formats. Available formats are: - - ChemML files (*.cml) - - MDL MOL files, MDL Structure Data files (*.mol;*.sd;*.sdf) - - PDB files (*.pdb;*.ent) - - XYZ Coordinate Format files (*.xyz) - - - You can open multiple files in &app;. - The application displays each file in its own window. - Recently opened file appear in the File - Open recent sub-menu. - - - To Open Multiple Files from a Command Line - You can run &app; from a command line - and open a single file or multiple files. To open multiple files from a command - line, type the following command, then press Return: - gchem3d-viewer file1 file2 file3 - -
- - - Usage - - To Save the View as an Image - To open a file, choose - File Save as Image... - - to display the Save as image dialog. Select a - file name and, if wanted, a file type, then click - OK. - Supported types are VRML, and all types that GdkPixbuf can export. - You'll find an exact list in the drop-down file type menu. - If no file type is specified, &app; - tries to determine the type from the file name. If it does not succeed, - the default type (VRML) will be used. - An appropriate extension will be added to the file name if none - is found. - PostScript and PDF files can also be obtained with the Print command. - - - To Print the View - To open a file, choose - File Print... - . - &app; uses a 300 dpi resolution - when printing. - You might want to - change the Background color before printing. - - - To Change the Model Options - &app; id able to display a molecule - using two model types: the ball ans stick model and the compact - model. The first one is the default. - To change the mode, choose either View Balls and sticks - or ViewSpace filling - . - You can also change the orientation. Just click somewhere in - the view and drag the mouse until you get the wanted orientation. - - - To Change the Background Color - To change the backgound color, choose - View Background color - and select the appropriate color in the palette, or - choose a custom color. - - - To Ask a Question - If you choose Help Ask a question, - your mail agent should pop up with a new message to the Gnome Chemistry Utils - mailing list. - Another way to get some help is to connect on the #gchemutils channel - at irc.gimp.net and ask your question there (if you are not alone on the channel). - - - To Find the Gnome Chemistry Utils on the Web. - If you choose Help Gnome Chemistry Utils on the web, - the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. - The main page is - http://gchemutils.nongnu.org and the project - page at savannah http://savannah.nongnu.org/projects/gchemutils. - - - To Report a Bug - To report a bug, you must use the bug page for the Gnome Chemistry - Utils at Savannah. You can access it by choosing - Help Report Bugs - (hopefully you'll have only one at once to report). - You can also type the bug report page address directly in - the browser. The bug repository is at - https://savannah.nongnu.org/bugs/?group=gchemutils - - - - - - - License - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU - General Public License as - published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later - version. - - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - - A copy of the GNU General Public License is - included as an appendix to the GNOME Users - Guide. You may also obtain a copy of the - GNU General Public License from the Free - Software Foundation by visiting their Web site or by writing to -
- Free Software Foundation, Inc. - 51 Franklin St - Fifth Floor - Boston, MA 02111-1307 - USA -
-
-
- -
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/3d/gchem3d-0.10.omf.in gnome-chemistry-utils-0.10.9/docs/help/3d/gchem3d-0.10.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/3d/gchem3d-0.10.omf.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/3d/gchem3d-0.10.omf.in 2009-11-14 11:46:31.000000000 +0100 @@ -0,0 +1,10 @@ + + + + + manual + + + + + diff -Nru gnome-chemistry-utils-0.8.6/docs/help/3d/gchem3d-viewer.omf.in gnome-chemistry-utils-0.10.9/docs/help/3d/gchem3d-viewer.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/3d/gchem3d-viewer.omf.in 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/3d/gchem3d-viewer.omf.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ - - - - - manual - - - - - diff -Nru gnome-chemistry-utils-0.8.6/docs/help/3d/Makefile.am gnome-chemistry-utils-0.10.9/docs/help/3d/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/help/3d/Makefile.am 2007-05-07 14:58:20.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/help/3d/Makefile.am 2009-11-14 11:30:36.000000000 +0100 @@ -1,11 +1,11 @@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml include $(top_srcdir)/gnome-doc-utils.make dist-hook: doc-dist-hook -DOC_MODULE = gchem3d-viewer +DOC_MODULE = gchem3d-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = diff -Nru gnome-chemistry-utils-0.8.6/docs/help/3d/Makefile.in gnome-chemistry-utils-0.10.9/docs/help/3d/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/help/3d/Makefile.in 2008-01-25 21:06:18.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/3d/Makefile.in 2009-11-14 11:46:00.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -39,8 +40,9 @@ ################################################################################ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -66,6 +68,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -73,7 +76,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,26 +95,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -122,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -163,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -182,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -193,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -231,24 +256,33 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ @@ -256,6 +290,7 @@ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ +_xml2po_mode = $(if $(DOC_ID),mallard,docbook) @ENABLE_SK_TRUE@_ENABLE_SK = true ################################################################################ @@ -289,14 +324,16 @@ ################################################################################ _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) +_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ - $(_DOC_C_MODULE) + $(_DOC_C_PAGES) $(_DOC_C_MODULE) _DOC_C_DOCS_NOENT = \ - $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) + $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ @@ -312,12 +349,16 @@ ############################################################################### -_DOC_POFILES = $(if $(DOC_MODULE), \ +_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) +_DOC_LC_PAGES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ + $(lc)/$(notdir $(page)) )) + _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) @@ -329,7 +370,7 @@ $(lc)/$(notdir $(doc)) )) _DOC_LC_DOCS = \ - $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) \ + $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ @@ -349,8 +390,9 @@ _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) -_clean_dir = $(if $(DOC_MODULE),clean-doc-dir) -DOC_MODULE = gchem3d-viewer +_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) +_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) +DOC_MODULE = gchem3d-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = DOC_LINGUAS = @@ -361,14 +403,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/3d/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/help/3d/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/3d/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/help/3d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -386,6 +428,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -415,13 +458,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -452,6 +499,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -471,6 +519,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -479,18 +529,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -587,6 +647,10 @@ DOC_MODULE ?= +DOC_ID ?= + +DOC_PAGES ?= + DOC_ENTITIES ?= DOC_INCLUDES ?= @@ -603,6 +667,7 @@ _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` +_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl @@ -647,16 +712,16 @@ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs)"; \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs); \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi # FIXME: fix the dependancy @@ -665,15 +730,16 @@ $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) if ! test -d $(dir $@); then mkdir $(dir $@); fi if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ + po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \ + if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \ (cd $(dir $@) && \ - $(_xml2po) -e -p \ - "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \ + $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) - $(_xml2po) -e -o $@ $^ + $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) @@ -685,6 +751,8 @@ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) +################################################################################ + .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) @@ -703,7 +771,7 @@ rm -f "$$lc/.xml2po.mo"; \ fi; \ done -clean-doc-dir: +clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ @@ -726,10 +794,12 @@ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) -.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk -doc-dist-hook: \ - $(if $(DOC_MODULE),dist-doc-docs) \ - $(if $(_DOC_C_FIGURES),dist-doc-figs) \ +################################################################################ + +.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk +doc-dist-hook: \ + $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ + $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) @@ -775,9 +845,12 @@ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" +################################################################################ + .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ + $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @@ -793,15 +866,33 @@ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done +check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) + for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + for page in $(DOC_PAGES); do \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ + done; \ + done + check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ - xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ + echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ + xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done +################################################################################ + .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk + install-data-local: \ - $(if $(DOC_MODULE),install-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) @@ -809,42 +900,46 @@ install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ - echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \ - $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \ + echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ + $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - docdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$docdir"; \ + docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ - echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \ + echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ + figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ - elif test -f "C/$$fig"; then \ - figfile="C/$$fig"; \ else \ - figfile="$(srcdir)/C/$$fig"; \ + figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \ + figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ - echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ - $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + if $$figsymlink; then \ + echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ + ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ + else \ + echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ + $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + fi; \ done; \ done @@ -852,22 +947,24 @@ echo install-html install-doc-omf: - $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE) + $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \ + echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ - scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ + echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk +################################################################################ + .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ - $(if $(DOC_MODULE),uninstall-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) @@ -875,27 +972,28 @@ uninstall-doc-docs: @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ - echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ + echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ - echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ + echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ - echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done dist-hook: doc-dist-hook + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/calc/C/figures/braces.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/calc/C/figures/braces.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/calc/C/figures/composition.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/calc/C/figures/composition.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/calc/C/figures/formula.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/calc/C/figures/formula.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/calc/C/figures/page-setup.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/calc/C/figures/page-setup.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/calc/C/figures/pattern.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/calc/C/figures/pattern.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/calc/C/figures/print-scale.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/calc/C/figures/print-scale.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/calc/C/figures/start.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/calc/C/figures/start.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/calc/C/gchemcalc-0.10.xml gnome-chemistry-utils-0.10.9/docs/help/calc/C/gchemcalc-0.10.xml --- gnome-chemistry-utils-0.8.6/docs/help/calc/C/gchemcalc-0.10.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/calc/C/gchemcalc-0.10.xml 2009-11-14 11:46:31.000000000 +0100 @@ -0,0 +1,417 @@ + + + + + + +]> + + + + &app; manual + + + + &app; Manual V&manrevision; + + 2006 + Jean Bréfort + + + + + &legal; + + + GNOME Documentation Project + + + + + Jean + Bréfort + +
jean.brefort@normalesup.org
+
+
+ +
+ + + + + + + &app; Manual V&manrevision; + &date; + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.1 + February 2006 + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + This manual describes version &appversion; of &app;. + + + Feedback + To report a bug or make a suggestion regarding the &app; application or + this manual, go to the&app; + &app; home page. + + + + + &app; allows you to evaluate some molecular properties. + +
+ + + + + + Introduction + The &app; application is a simple + calculator for chemistry. It parses chemical formula to calculate + raw formula, molecular weights, mass composition and isotopic patterns. + + + + + + Getting started + + To Start &app; + You can start &app; in the following ways: + + + Applications menu + + Choose + + Education + Chemical calculator + . + + + + Command line + + Type gchemcalc [formula], then press Return. + [Formula] stands for an optional chemical formula. + + + + + + When You Start &app; + When you start &app;, the following window is displayed: +
+ &app; window + + + + Screenshot of the &app;window. + + + + + +
+ + The &app; window contains the following + elements: + + Menubar + + The menus on the menubar contain all of the commands you need + to work with &app;. + + + Formula entry + + This is where you can type a formula. + + + Results + + The next three lines give the entered formula as parsed + by &app;, the raw formula and the + molecular weight. + + + Notebook + + The first page of the notebook gives the analysis as mass + percent of the elements of the current formula. The second page + displays the isotopic pattern. This page is hidden when the + formula is empty. + + + +
+
+ + + Usage + + Entering a formula + Formulas can be entered from the command line, + from GChemPaint, or directly in the formula entry. + When using the formula entry, just type a valid formula as in the following example: +
+ Entering a formula + + + + Entering a formula. + + + + + +
+ After validating, if the formula has been succesfully parsed, you get: +
+ Results + + + + Result after parsing a formula. + + + + + +
+ The isotopic pattern is displayed on the second page of the notebook: +
+ Isotopic pattern + + + + Result after parsing a formula. + + + + + +
+ If an error occurs while parsing the formula, a message box will pop up and the cursor + will be moved in the entry to the error position. +
+ + Features + &app; supports parenthesis and brackets to any level + provided each one is matched as in the following example: +
+ Using parenthesis and brackets + + + + Using parenthesis and brackets. + + + + + +
+ Abbreviations such as "Ph" for a phenyl substituant are supported. + This is also true for abbreviations such as Pr which might represent either + a praseodymium atom or a propyl group. Three options are available in the + Mode menu: + + Guess + &app; try to guess if the symbol + represents an atom or a group, PrCl is analyzed as propyl chloride, while PrCl3 + is praseodymium chloride; however, this method might fail in some cases such as + PrPr3 which will not be recognized as trypropylpraseodymium, at least + with this version of &app;. + + Atom + Ambiguous symbols are interpreted + as atoms. + + Nickname + Ambiguous symbols are interpreted + as groups. + + + Custom nicknames can be defined using + the GChemPaint application. +
+ + + To Print the Isotopic Pattern Graph + To print a isotopic pattern graph, choose + File Print... + . + File Preview + opens a window with a preview of the printed output. + To tune the printed output, choose + File Page setup... + as explained below. + + The page setup dialog. + the first tab of the dialog concerns the paper and margins setup. + Headers and footers are not supported in the version of &app; +
+ The Page Setup tab. + + + + Screenshot of page setup dialog. + + + + + +
+ The second tab allows you tio choose the scale of the output. With no scaling or + scaling at 100%, the output will have the same size in points as the size in pixels on + the screen. If you choose automatic scaling, you can make the output fill the available + space either horizontally, vertically, or both (none of the options is equivalent to no scaling). + Printing to more than one page is not supported in this version of &app; +
+ The Print Scale tab. + + + + Screenshot of the printing scale page. + + + + + +
+
+
+ + + Export the Isotopic Pattern as an Image. + To export the displayed isotopic pattern to an image, use + File Save As Image + . + Available formats are SVG, EPS, PS, PDF, and the formats with write support in + GdkPixbuf. + To choose a format, you can use an appropriate extension + in the file name, or explicitly select a format in the combo box. + With the first method, if &app; does + not recognize an extension, the exported file will be a SVG + file. &app; will add an extension + to the file name if needed. + You might change the default width and height of the exported image + using the appropriate entries. + Postscript and PDF files can also be produced using the + File Print... + command. + + + Copying the Isotopic Pattern Graph. + To copy the isotopic pattern graph, choose + Edit Copy + and paste in the target application. Graphs will be copied as native graphs to + Abiword and as svg or png data to other applications which support such formats. + +
+ + Support. + + To Ask a Question + If you choose Help Ask a question, + your mail agent should pop up with a new message to the Gnome Chemistry Utils + mailing list. + Another way to get some help is to connect on the #gchemutils channel + at irc.gimp.net and ask your question there (if you are not alone on the channel). + + + To Find the Gnome Chemistry Utils on the Web. + If you choose Help Gnome Chemistry Utils on the web, + the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. + The main page is + http://gchemutils.nongnu.org and the project + page at savannah http://savannah.nongnu.org/projects/gchemutils. + + + To Report a Bug + To report a bug, you must use the bug page for the Gnome Chemistry + Utils at Savannah. You can access it by choosing + Help Report Bugs + (hopefully you'll have only one at once to report). + You can also type the bug report page address directly in + the browser. The bug repository is at + https://savannah.nongnu.org/bugs/?group=gchemutils + + + + + + + License + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU + General Public License as + published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. + + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + A copy of the GNU General Public License is + included as an appendix to the GNOME Users + Guide. You may also obtain a copy of the + GNU General Public License from the Free + Software Foundation by visiting their Web site or by writing to +
+ Free Software Foundation, Inc. + 51 Franklin St - Fifth Floor + Boston, MA 02111-1307 + USA +
+
+
+ +
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/calc/C/gchemcalc.xml gnome-chemistry-utils-0.10.9/docs/help/calc/C/gchemcalc.xml --- gnome-chemistry-utils-0.8.6/docs/help/calc/C/gchemcalc.xml 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/calc/C/gchemcalc.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,317 +0,0 @@ - - - - - - -]> - - - - &app; manual - - - - &app; Manual V&manrevision; - - 2006 - Jean Bréfort - - - - - &legal; - - - GNOME Documentation Project - - - - - Jean - Bréfort - -
jean.brefort@normalesup.org
-
-
- -
- - - - - - - &app; Manual V&manrevision; - &date; - - Jean Bréfort - jean.brefort@normalesup.org - GNOME Documentation Project - - - - This manual describes version &appversion; of &app;. - - - Feedback - To report a bug or make a suggestion regarding the &app; application or - this manual, go to the - &app; home page. - - - - - &app; allows you to evaluate some molecular properties. - -
- - - - - - Introduction - The &app; application is a simple - calculator for chemistry. It parses chemical formula to calculate - raw formula, molecular weights, mass composition and isotopic patterns. - - - - - - Getting started - - To Start &app; - You can start &app; in the following ways: - - - Applications menu - - Choose - - Education - Chemical calculator - . - - - - Command line - - Type gchemcalc [formula], then press Return. - [Formula] stands for an optional chemical formula. - - - - - - When You Start &app; - When you start &app;, the following window is displayed: -
- &app; window - - - - Screenshot of the &app;window. - - - - - -
- - The &app; window contains the following - elements: - - Menubar - - The menus on the menubar contain all of the commands you need - to work with &app;. - - - Formula entry - - This is where you can type a formula. - - - Results - - The next three lines give the entered formula as parsed - by &app;, the raw formula and the - molecular weight. - - - Notebook - - The first page of the notebook gives the analysis as mass - percent of the elements of the current formula. The second page - displays the isotopic pattern. This page is hidden when the - formula is empty. - - - -
-
- - - Usage - - Entering a formula - Formulas can be entered from the command line, - from GChemPaint, or directly in the formula entry. - When using the formula entry, just type a valid formula as in the following example: -
- Entering a formula - - - - Entering a formula. - - - - - -
- After validating, if the formula has been succesfully parsed, you get: -
- Results - - - - Result after parsing a formula. - - - - - -
- The isotopic pattern is displayed on the second page of the notebook: -
- Isotopic pattern - - - - Result after parsing a formula. - - - - - -
- If an error occurs while parsing the formula, a message box will pop up and the cursor - will be moved in the entry to the error position. -
- - Limitations - &app; supports parenthesis and brackets to any level - provided each one is matched as in the following example: -
- Using parenthesis and brackets - - - - Using parenthesis and brackets. - - - - - -
- Abbreviations such as "Ph" for a phenyl substituant are not supported - in this version of &app;. -
- - Copying the isotopic pattern graph. - To copy the isotopic pattern graph, press the Copy button - and paste in the target application. Graphs will be copied as native graphs to - Abiword and as svg or png data to other applications which support such formats. - - - To Ask a Question - If you choose Help Ask a question, - your mail agent should pop up with a new message to the Gnome Chemistry Utils - mailing list. - Another way to get some help is to connect on the #gchemutils channel - at irc.gimp.net and ask your question there (if you are not alone on the channel). - - - To Find the Gnome Chemistry Utils on the Web. - If you choose Help Gnome Chemistry Utils on the web, - the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. - The main page is - http://gchemutils.nongnu.org and the project - page at savannah http://savannah.nongnu.org/projects/gchemutils. - - - To Report a Bug - To report a bug, you must use the bug page for the Gnome Chemistry - Utils at Savannah. You can access it by choosing - Help Report Bugs - (hopefully you'll have only one at once to report). - You can also type the bug report page address directly in - the browser. The bug repository is at - https://savannah.nongnu.org/bugs/?group=gchemutils - -
- - - - - License - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU - General Public License as - published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later - version. - - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - - A copy of the GNU General Public License is - included as an appendix to the GNOME Users - Guide. You may also obtain a copy of the - GNU General Public License from the Free - Software Foundation by visiting their Web site or by writing to -
- Free Software Foundation, Inc. - 51 Franklin St - Fifth Floor - Boston, MA 02111-1307 - USA -
-
-
- -
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/calc/gchemcalc-0.10.omf.in gnome-chemistry-utils-0.10.9/docs/help/calc/gchemcalc-0.10.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/calc/gchemcalc-0.10.omf.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/calc/gchemcalc-0.10.omf.in 2009-11-14 11:46:31.000000000 +0100 @@ -0,0 +1,10 @@ + + + + + manual + + + + + diff -Nru gnome-chemistry-utils-0.8.6/docs/help/calc/gchemcalc.omf.in gnome-chemistry-utils-0.10.9/docs/help/calc/gchemcalc.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/calc/gchemcalc.omf.in 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/calc/gchemcalc.omf.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ - - - - - manual - - - - - diff -Nru gnome-chemistry-utils-0.8.6/docs/help/calc/Makefile.am gnome-chemistry-utils-0.10.9/docs/help/calc/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/help/calc/Makefile.am 2007-05-07 14:58:20.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/help/calc/Makefile.am 2009-11-14 11:30:36.000000000 +0100 @@ -1,11 +1,11 @@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml include $(top_srcdir)/gnome-doc-utils.make dist-hook: doc-dist-hook -DOC_MODULE = gchemcalc +DOC_MODULE = gchemcalc-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = diff -Nru gnome-chemistry-utils-0.8.6/docs/help/calc/Makefile.in gnome-chemistry-utils-0.10.9/docs/help/calc/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/help/calc/Makefile.in 2008-01-25 21:06:18.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/calc/Makefile.in 2009-11-14 11:46:00.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -39,8 +40,9 @@ ################################################################################ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -66,6 +68,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -73,7 +76,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,26 +95,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -122,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -163,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -182,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -193,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -231,24 +256,33 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ @@ -256,6 +290,7 @@ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ +_xml2po_mode = $(if $(DOC_ID),mallard,docbook) @ENABLE_SK_TRUE@_ENABLE_SK = true ################################################################################ @@ -289,14 +324,16 @@ ################################################################################ _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) +_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ - $(_DOC_C_MODULE) + $(_DOC_C_PAGES) $(_DOC_C_MODULE) _DOC_C_DOCS_NOENT = \ - $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) + $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ @@ -312,12 +349,16 @@ ############################################################################### -_DOC_POFILES = $(if $(DOC_MODULE), \ +_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) +_DOC_LC_PAGES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ + $(lc)/$(notdir $(page)) )) + _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) @@ -329,7 +370,7 @@ $(lc)/$(notdir $(doc)) )) _DOC_LC_DOCS = \ - $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) \ + $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ @@ -349,8 +390,9 @@ _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) -_clean_dir = $(if $(DOC_MODULE),clean-doc-dir) -DOC_MODULE = gchemcalc +_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) +_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) +DOC_MODULE = gchemcalc-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = DOC_LINGUAS = @@ -361,14 +403,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/calc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/help/calc/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/calc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/help/calc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -386,6 +428,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -415,13 +458,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -452,6 +499,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -471,6 +519,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -479,18 +529,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -587,6 +647,10 @@ DOC_MODULE ?= +DOC_ID ?= + +DOC_PAGES ?= + DOC_ENTITIES ?= DOC_INCLUDES ?= @@ -603,6 +667,7 @@ _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` +_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl @@ -647,16 +712,16 @@ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs)"; \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs); \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi # FIXME: fix the dependancy @@ -665,15 +730,16 @@ $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) if ! test -d $(dir $@); then mkdir $(dir $@); fi if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ + po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \ + if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \ (cd $(dir $@) && \ - $(_xml2po) -e -p \ - "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \ + $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) - $(_xml2po) -e -o $@ $^ + $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) @@ -685,6 +751,8 @@ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) +################################################################################ + .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) @@ -703,7 +771,7 @@ rm -f "$$lc/.xml2po.mo"; \ fi; \ done -clean-doc-dir: +clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ @@ -726,10 +794,12 @@ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) -.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk -doc-dist-hook: \ - $(if $(DOC_MODULE),dist-doc-docs) \ - $(if $(_DOC_C_FIGURES),dist-doc-figs) \ +################################################################################ + +.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk +doc-dist-hook: \ + $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ + $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) @@ -775,9 +845,12 @@ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" +################################################################################ + .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ + $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @@ -793,15 +866,33 @@ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done +check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) + for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + for page in $(DOC_PAGES); do \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ + done; \ + done + check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ - xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ + echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ + xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done +################################################################################ + .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk + install-data-local: \ - $(if $(DOC_MODULE),install-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) @@ -809,42 +900,46 @@ install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ - echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \ - $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \ + echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ + $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - docdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$docdir"; \ + docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ - echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \ + echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ + figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ - elif test -f "C/$$fig"; then \ - figfile="C/$$fig"; \ else \ - figfile="$(srcdir)/C/$$fig"; \ + figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \ + figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ - echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ - $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + if $$figsymlink; then \ + echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ + ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ + else \ + echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ + $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + fi; \ done; \ done @@ -852,22 +947,24 @@ echo install-html install-doc-omf: - $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE) + $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \ + echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ - scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ + echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk +################################################################################ + .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ - $(if $(DOC_MODULE),uninstall-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) @@ -875,27 +972,28 @@ uninstall-doc-docs: @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ - echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ + echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ - echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ + echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ - echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done dist-hook: doc-dist-hook + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/atoms-dlg.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/atoms-dlg.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/cleavages-dlg.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/cleavages-dlg.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/default-view.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/default-view.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/lattice-dlg.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/lattice-dlg.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/lines-dlg.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/lines-dlg.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/main-window.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/main-window.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/page-setup.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/page-setup.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/print-res.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/print-res.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/print-scale.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/print-scale.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/size-dlg.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/size-dlg.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/crystal/C/figures/view-settings.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/crystal/C/figures/view-settings.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/crystal/C/gcrystal-0.10.xml gnome-chemistry-utils-0.10.9/docs/help/crystal/C/gcrystal-0.10.xml --- gnome-chemistry-utils-0.8.6/docs/help/crystal/C/gcrystal-0.10.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/crystal/C/gcrystal-0.10.xml 2009-11-14 11:46:32.000000000 +0100 @@ -0,0 +1,864 @@ + + + + + + +]> + + + + &app; manual + + + + &app; Manual V&manrevision; + + 2006 + Jean Bréfort + + + + + &legal; + + + GNOME Documentation Project + + + + + Jean + Bréfort + +
jean.brefort@normalesup.org
+
+
+ +
+ + + + + + + &app; Manual V&manrevision; + &date; + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.8.0 + September 2006 + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.6.0 + November 2003 + + Jean Bréfort + jean.brefort@ac-dijon.fr + GNOME Documentation Project + + + + &app; Manual V0.1 + 2001 + + Jean Bréfort + jean.brefort@ac-dijon.fr + GNOME Documentation Project + + + + This manual describes version &appversion; of &app;. + + + Feedback + To report a bug or make a suggestion regarding the &app; application or + this manual, go to the + &app; home page. + + + + + &app; allows you to edit and display crystalline structures. + +
+ + + + + + Introduction + + The &app; application is a simple + crystalline structures visualizer. It uses its own file format, and is also able to + open CIF files (but not save them) when used with OpenBabel version 2.2.x + &app; files can also be displayed in a html page if you use a + mozilla + based navigator. + This document is by no way a crystallography manual and used notions are not + systematically described here in. + + + + + Getting started + + To Start &app; + You can start &app; in the following ways: + + + Applications menu + + Choose + + Education + Gnome Crystal Crystalline Structures Viewer + . + + + + Command line + + Type gcrystal, then press Return. + + + + + + When You Start &app; + When you start &app;, the following window is displayed: +
+ &app; document window + + + + Screenshot of the Gnome Crystal document window. + + + + + +
+ + The &app; window contains the following + elements: + + Menubar + + The menus on the menubar contain all of the commands you need + to work with files in &app;. + + + Main Toolbar + + The toolbar contains a subset of the commands that you can + access from the menubar. + + + Display area + + The display area contains the contents of the file that you are + displaying and/or editing. + + + Statusbar + + The statusbar displays information about current + &app; activity and contextual information about the + menu items. + + + +
+ + To Open a File + To open a file, choose + File Open + + to display the Open File dialog. Select the file + that you want to open, then click OK. The file is + displayed in a new &app; document window. + To Open a recently opened file, choose the appropriate entry + in File Open recent + + &app; can open files on a distant server. + If the file is read-only, the File Save + menu item and the corresponding tool button are disabled. + When opened with &app;, CIF files are always read-only. + You can open multiple files in &app;. + Each file is opened in it's own top-level window. + + + To Open Multiple Files from a Command Line + You can run &app; from a command line + and open a single file or multiple files. To open multiple files from a command + line, type the following command, then press Return: + gcrystal file1 file2 file2 ... where + file1 and others, might be relative, absolute paths or uris. + When the application starts, a &app; window is created + for each file that you specified. + +
+ + + + + General operations + + + To Create a New File + To create a new file, choose + File New + . The application displays a new file in the + &app; window. + + + + To Save a File + You can save files in the following ways: + + To save changes to the current file, choose + File + Save or click Save + on the toolbar. If the file does not have a file name, &app; + displays the Save As dialog. Enter a name for the file in the Save + As dialog, choose a file format, then click OK. + + To save a new file or to save an existing file under a new file name, choose + File Save + As . Enter a name for the file in the Save + As dialog box, choose a file format, then click OK. + + + &app; file names use the .gcrystal extension. You do not have to type + the extension, it will be added automatically. + + + To Export the Current View to a Graphic Format + To export the current file to an image, use + File Save As Image + . + Available formats are VRML, PDF, Postscript, Encapsulated Postscript, and the formats with write support in + GdkPixbuf. + To choose a format, you can use an appropriate extension + in the file name, or explicitly select a format in the combo box. + With the first method, if &app; does + not recognize an extension, the exported file will be a VRML + file. &app; will add an extension + to the file name if needed. + + + To Print the Current View + To print the contents of the current view, use File Print . + &app; uses OpenGL to print the image. The color depth will be for this reason the one used + by the X server. As the printer resolution is much larger than the screen resolution and the buffer used has the same size as the view, the + scene is splitted in as many parts as necessary to build the whole image sent to the printer. The resolution used for printing can be + changed in the Settings Dialog choose Edit Preferences + . The Preferences dialog box opens (see ). Printing can be a lengthy operation + even with a 300 dpi resolution; higher resolutions might be unpracticable. + File Preview + opens a window with a preview of the printed output. + To tune the printed output, choose + File Page setup... + as explained below. + + The page setup dialog. + the first tab of the dialog concerns the paper and margins setup. + Headers and footers are not supported in the version of &app; +
+ The Page Setup tab. + + + + Screenshot of page setup dialog. + + + + + +
+ The second tab allows you tio choose the scale of the output. With no scaling or + scaling at 100%, the output will have the same size in points as the size in pixels on + the screen. If you choose automatic scaling, you can make the output fill the available + space either horizontally, vertically, or both (none of the options is equivalent to no scaling). + Printing to more than one page is not supported in this version of &app; +
+ The Print Scale tab. + + + + Screenshot of the printing scale page. + + + + + +
+
+
+ + To Change &app; Settings + + + Printing resolution +
+ Printer Resolution Page + + + + Screenshot of the Printer Resolution Page. + + + + + +
+ Printing needs that an OpenGL window. The properties page "Printing + parameters" allows you choose the printer + resolution in the list. If your printer resolution is not in the list, select the "Other" option + and give the right value in the appropriate text entry. + As the printer resolution is much larger than the screen resolution and the buffer used has the same size as the view, the + scene is splitted in as many parts as necessary to build the whole image sent to the printer. Printing can be a lengthy operation + even with a 300 dpi resolution; higher resolutions might be unpracticable. +
+ + + Views default parameters +
+ View Defaults Page + + + + Screenshot of the Default View Settings Page. + + + + + +
+ Parameters available in this page are those that will concern every new view when it + is created. To change the same parameters for already opened views, you should use the View menu + (see ) + Available parameters are background color, field of view, and model orientation + defined by Euler's angles. +
+
+
+ + + Defining the crystal. + + Lattice +
+ Lattice Dialog + + + + Screenshot of the Lattice Dialog Box. + + + + + +
+ The unit cell is defined by the length of its three edges + a, b et c + and by the three angles α, β, et γ between two vertices. + Depending upon the selected Bravais lattice, some of these parameters are fixed + or dependents. Only independent parameters may be changed, entries corresponding to constant or + dependent values are disabled. + Lengths must be given in picometers and angles are expressed in degrees. +
+ +Atoms +
+ Atoms Dialog + + + + Screenshot of the Atoms Dialog Box. + + + + + +
+ The screenshot above defines the atoms of a sodium chloride cell. + After adding an atom, it is possible to modify the associated parameters: + + + x + y + z + + + x, y et z are the atom coordinates in the cell given respective to the cell size. + For instance, the triplet 0, 0, 0 puts the atom at the cell vertices and if + the threee coordinates ere equal to 0.5, the atom will rest at the center of the cell. + + + + + Element + + + The element is changed by choosing the corresponding button in the periodic table. + If no button is checked, the element is unknown. + + + + + Charge + + + The charge of the atom. + + + + + Radius + + + The atom is figured as a sphere whose radius is expressed in picometers in the same way as the cell size. + While the radius is null, no atom can be added to the model. Gnome Crystal uses a database for radii. + In the Radius frame, it is possible to choose the type of the radius + (Unknown, Covalent, Ionic, + Metallic, or Van der Waals). Only ionic radii can + be used when the charge of the atom is not zero. Depending on the choice of element, charge and + radius type, a list of corresponding radii from the database is available. If none of these radii is + convenient, choose the Custom option and give a value in the entry. + + + A scaling factor can be applied to the radius so that the diplayed atom might appear + smaller. Acceptable scaling factors are from 1% to 100%. + + + Changes to the radius can apply to only the currently selected atom, all atoms of the current element + or all atoms, at least when an appropriate radius can be found according to the selected + item in the list. + + + + + Color + + + The default color for each element is the color used in the periodic table. To change the color displayed or + for an unknown element atom, use the custom color chooser. + + + + + The number of visible atoms depends on the model size (see ) and on cleavages + (see ). + + Buttons at bottom right are used to manage the atoms list: + + + + + Button Add adds an atom to the list with the current parameters if the radius is not null. + If there is an inappropriate value, a message appears and the action aborts. + + + + + Button Delete deletes the selected atom from the list. + + + + + Button Delete all removes every atom from the list. + + + +
+ +Lines and Bonds +
+ Lines and Bonds Dialog + + + + Screenshot of the Lines and Bonds Dialog Box. + + + + + +
+ Bonds are not really supported in this version of Gnome Crystal. Lines must be used instead. + The difference is that bonds should be defined by the atoms they join when lines are defined by + the coordinates or their extremities. + Some special lines can be easily added, checking the corresponding box: + + + + Cell edges: if the box is checked, a cylinder is added + for each cell edge. + + + + + Diagonals: cylinders are added that join opposite vertices in the cell. + + + + + Medians: cylinders are added that join opposite face centers in the cell. + + + + + For Other lines defined in the list, a cylinder is added to join the points whose coordinates are given in the + appropriate entries. A Cylinder is added for every visible cell if the Single checkbox is not checked. + + These lines need coordinates x1, y1, z1 and x2, y2, z2 + are the coordinates of the two ends of the line or bond. + They must be given in cell coordinates for the two ends in the respective entries. + + For very line present in the model, the two following parameters must be defined + (for special lines, use the appropriate widgets and for the lines added to the list, use the wigets + displayed in the Other lines frame): + + + Radius + + + The radius of the cylinder used to figure the bond or line must be given in pm as is the cell size. + If the radius is null, nothing will be added to the model. + + + + + Color + + + The color of the cylinder used to figure the bond or line is selected by clicking on the button and picking a + color in the dialog box that pops. + + + + + In the screenshot above (got from the diamond sample provided + with the sources), cell edges defined with grey color, a 10 pm radius, and some + bonds with the same radius, are added and will + be repeated in every visible cell. + + Bonds and lines effectively visible depend on model size (see ) and cleavages + (see ). If one end of the cylinder lies outside of the visible part of the model, + the cylinder will be hidden. + + Buttons at bottom right are used to manage the bonds and lines list: + + + + + Button Add adds an item to the list with the current parameters if the radius is not null. + If there is an inappropriate value, a message appears and the action aborts. + + + + + Button Delete deletes the selected item from the list. + + + + + Button Delete all removes every item from the list. + + + +
+ + + Size +
+ Size Dialog + + + + Screenshot of the Size Dialog Box. + + + + + +
+ Model size is expressed as relative cell coordinates. + The necessary values are maximums and minimums of the three coordinates + It is also possible to cut the model using cleavages (see + ) if one wishes to limit the visible part by planes others than those corresponding + to a constant value of a coordinate. +
+ + + Cleavages +
+ Cleavages Dialog + + + + Screenshot of the Cleavages Dialog Box. + + + + + +
+ Cleavages are used to hide from the views atoms from planes with a orientation fixed by the + Miller indices h, k and l. + If x, y and z are the atomic coordinates relative to the cell, Miller indices define planes + as all the points such that hx + ky + lz is a constant. By instance, in a cubic network, (111) planes + are perpendicular to the diagonal of the cubic cell going from vertex 0,0,0 to vertex 1,1,1. + Each define cleavage will hide the chosen number of planes beginning from the greatest value + for hx + ky + lz that is present in the model. To remove planes from the other side of the model, + signs of h, k and l must be reversed. + There is no need to define cleavages of (100), (010) or (001) planes because the same + effect may be obtained more easily by changing the size of the model (see below ). + + When a cleavage is defined, the model is zoomed so that it fills the view as explained elsewhere + (see ). The Fixed model size button allows + to keep remaining atoms at the same place in the view which may be useful to chain + pictures in a presentation. + + + Buttons at bottom right are used to manage the cleavages list: + + + + + Button Add adds acleavage to the list with the current parameters. + + + + + Button Delete deletes the selected cleavage from the list. + + + + + Button Delete all removes every cleavage from the list. + + + +
+
+ + + + + Views operations. + + To Create a New View + To create a new view of the active document, choose Windows Create New Window + . + + A new view of the active document is created. + The new view is identical + to the document active view. This is considered as a modification of the active document. + The new view becomes the active view. + + + + To Close The Current View + To close the current view, choose Windows Close This Window + . + + The active view will be closed. If this view is the only one opened for the document and the document has been changed + but not saved, a dialog box pops so that you can save the changes, ignore them, or abort the operation. + If other views exist, the view is closed without asking anything and the document is marked as dirty. + + + + To Tune a View + To tune a view, choose Edit Settings + . The View Settings Dialog Box opens. +
+ View Settings Page + + + + Screenshot of the View Settings Dialog. + + + + + +
+ This dialog box can be used to change the following parameters: + + + Background color + + + The background color is selected by clicking on the button and picking a + color in the dialog box that pops. + + + + + Field of view + + + The field of view is the angle which sides join the point from which the model is viewed + to the nearest sides of the view. So if the view has a larger horizontal size than its vertical size + the sides taken into account are the horizontal ones, otherwise, the vertical sides are used. + Acceptable values for the field of view are betwwen 0 and 45°. + When a 0° field of view is used the projecton is orthogonal. + With a 1° field of view, the perspective effect + will be hardly perceptible and with a 45° angle, the model will appear sowhat distorted. + The default field of view is 10° (unless you changed it) and gives a sensible perspective. + + + The distance between the viewpoint and the model is calculated to be the shortest so that the whole model remains + visible whatever its orientation is. The only solution to see the model from a longer distance consist, + in the present version, in defining a greater model size (see ) and defining cleavages + to remove extra atoms (see ) while selecting the option of constant model size. + + + + + Spatial model orientation + + + The model may be oriented with the mouse, clicking on the left button inside the view, + dragging until a convenient orientation is obtained, and releasing the button. + It also is possible to use this dialog box to choose an orientation by modifying the three + Euler's angles ψ, θ, and φ. + + + When the three angles are null, c axis is vertical, with positive values up, + b axis is in the view plane with positive values towards the right, + and a axis points in the direction of the viewer. To bring the model + to the position defined by Euler's angles, the operations are, in order: + + + + A rotation by angle φ around the vertical axis oriented upwards. Possible values + for φ are in the range - 180° to 180°. + + + + + A rotation by angle θ around the axis perpendicular to the view and pointing + towards the viewer. Possible values for θ are from 0° to 180°. + + + + + A rotation by angle ψ around the vertical axis oriented upwards. Possible values + for ψ are in the range - 180° to 180°. + + + + + + +
+
+ + + + + Support. + + To Ask a Question + If you choose Help Ask a question, + your mail agent should pop up with a new message to the Gnome Chemistry Utils + mailing list. + Another way to get some help is to connect on the #gchemutils channel + at irc.gimp.net and ask your question there (if you are not alone on the channel). + + + To Find the Gnome Chemistry Utils on the Web. + If you choose Help Gnome Chemistry Utils on the web, + the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. + The main page is + http://gchemutils.nongnu.org and the project + page at savannah http://savannah.nongnu.org/projects/gchemutils. + + + To Report a Bug + To report a bug, you must use the bug page for the Gnome Chemistry + Utils at Savannah. You can access it by choosing + Help Report Bugs + (hopefully you'll have only one at once to report). + You can also type the bug report page address directly in + the browser. The bug repository is at + https://savannah.nongnu.org/bugs/?group=gchemutils + + + + + + + License + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU + General Public License as + published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. + + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + A copy of the GNU General Public License is + included as an appendix to the GNOME Users + Guide. You may also obtain a copy of the + GNU General Public License from the Free + Software Foundation by visiting their Web site or by writing to +
+ Free Software Foundation, Inc. + 51 Franklin St - Fifth Floor + Boston, MA 02111-1307 + USA +
+
+
+ +
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/crystal/C/gcrystal.xml gnome-chemistry-utils-0.10.9/docs/help/crystal/C/gcrystal.xml --- gnome-chemistry-utils-0.8.6/docs/help/crystal/C/gcrystal.xml 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/crystal/C/gcrystal.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,807 +0,0 @@ - - - - - - -]> - - - - &app; manual - - - - &app; Manual V&manrevision; - - 2006 - Jean Bréfort - - - - - &legal; - - - GNOME Documentation Project - - - - - Jean - Bréfort - -
jean.brefort@normalesup.org
-
-
- -
- - - - - - - &app; Manual V&manrevision; - &date; - - Jean Bréfort - jean.brefort@normalesup.org - GNOME Documentation Project - - - - &app; Manual V0.6.0 - November 2003 - - Jean Bréfort - jean.brefort@ac-dijon.fr - GNOME Documentation Project - - - - &app; Manual V0.1 - 2001 - - Jean Bréfort - jean.brefort@ac-dijon.fr - GNOME Documentation Project - - - - This manual describes version &appversion; of &app;. - - - Feedback - To report a bug or make a suggestion regarding the &app; application or - this manual, go to the - &app; home page. - - - - - &app; allows you to edit and display crystalline structures. - -
- - - - - - Introduction - - The &app; application is a simple - crystalline structures visualizer. - &app; files can also be displayed in a html page if you use a - mozilla - based navigator. - This document is by no way a crystallography manual and used notions are not - systematically described here in. - This document refers to a development release of &app;. This means that its use is - unsure. It might crash at any moment and loose or alter your data. - - - - - Getting started - - To Start &app; - You can start &app; in the following ways: - - - Applications menu - - Choose - - Education - Gnome Crystal Crystalline Structures Viewer - . - - - - Command line - - Type gcrystal, then press Return. - - - - - - When You Start &app; - When you start &app;, the following window is displayed: -
- &app; document window - - - - Screenshot of the Gnome Crystal document window. - - - - - -
- - The &app; window contains the following - elements: - - Menubar - - The menus on the menubar contain all of the commands you need - to work with files in &app;. - - - Main Toolbar - - The toolbar contains a subset of the commands that you can - access from the menubar. - - - Display area - - The display area contains the contents of the file that you are - displaying and/or editing. - - - Statusbar - - The statusbar displays information about current - &app; activity and contextual information about the - menu items. - - - -
- - To Open a File - To open a file, choose - File Open - - to display the Open File dialog. Select the file - that you want to open, then click OK. The file is - displayed in a new &app; document window. - To Open a recently opened file, choose the appropriate entry - in File Open recent - - &app; can open files on a distant server using the Gnome Virtual - File System. If the file is read-only, the File Save - menu item and the corresponding tool button are disabled. - You can open multiple files in &app;. - Each file is opened in it's own top-level window. - - - To Open Multiple Files from a Command Line - You can run &app; from a command line - and open a single file or multiple files. To open multiple files from a command - line, type the following command, then press Return: - gcrystal file1 file2 file2 ... where - file1 and others, might be relative, absolute paths or uris. - When the application starts, a &app; window is created - for each file that you specified. - -
- - - - - General operations - - - To Create a New File - To create a new file, choose - File New - . The application displays a new file in the - &app; window. - - - - To Save a File - You can save files in the following ways: - - To save changes to the current file, choose - File - Save or click Save - on the toolbar. If the file does not have a file name, &app; - displays the Save As dialog. Enter a name for the file in the Save - As dialog, choose a file format, then click OK. - - To save a new file or to save an existing file under a new file name, choose - File Save - As . Enter a name for the file in the Save - As dialog box, choose a file format, then click OK. - - - &app; file names use the .gcrystal extension. You do not have to type - the extension, it will be added automatically. - - - To Export the Current View to a Graphic Format - To export the current file to an image, use - File Save As Image - . - Available formats are VRML, EPS, and the formats with write support in - GdkPixbuf. - To choose a format, you can use an appropriate extension - in the file name, or explicitly select a format in the combo box. - With the first method, if &app; does - not recognize an extension, the exported file will be a VRML - file. &app; will add an extension - to the file name if needed. - - - To Print the Current View - To print the contents of the current view, use File Print . - &app; uses OpenGL to print the image. The color depth will be for this reason the one used - by the X server. As the printer resolution is much larger than the screen resolution and the buffer used has the same size as the view, the - scene is splitted in as many parts as necessary to build the whole image sent to the printer. The resolution used for printing can be - changed in the Settings Dialog choose Edit Preferences - . The Preferences dialog box opens (see ). Printing can be a lengthy operation - even with a 300 dpi resolution; higher resolutions might be unpracticable. - - - To Change &app; Settings - - - Printing resolution -
- Printer Resolution Page - - - - Screenshot of the Printer Resolution Page. - - - - - -
- Printing needs that an OpenGL window. The properties page "Printing - parameters" allows you choose the printer - resolution in the list. If your printer resolution is not in the list, select the "Other" option - and give the right value in the appropriate text entry. - As the printer resolution is much larger than the screen resolution and the buffer used has the same size as the view, the - scene is splitted in as many parts as necessary to build the whole image sent to the printer. Printing can be a lengthy operation - even with a 300 dpi resolution; higher resolutions might be unpracticable. -
- - - Views default parameters -
- View Defaults Page - - - - Screenshot of the Default View Settings Page. - - - - - -
- Parameters available in this page are those that will concern every new view when it - is created. To change the same parameters for already opened views, you should use the View menu - (see ) - Available parameters are background color, field of view, and model orientation - defined by Euler's angles. -
-
-
- - - Defining the crystal. - - Lattice -
- Lattice Dialog - - - - Screenshot of the Lattice Dialog Box. - - - - - -
- The unit cell is defined by the length of its three edges - a, b et c - and by the three angles α, β, et γ between two vertices. - Depending upon the selected Bravais lattice, some of these parameters are fixed - or dependents. Only independent parameters may be changed, entries corresponding to constant or - dependent values are disabled. - Lengths must be given in picometers and angles are expressed in degrees. -
- -Atoms -
- Atoms Dialog - - - - Screenshot of the Atoms Dialog Box. - - - - - -
- The screenshot above defines the atoms of a sodium chloride cell. - After adding an atom, it is possible to modify the associated parameters: - - - x - y - z - - - x, y et z are the atom coordinates in the cell given respective to the cell size. - For instance, the triplet 0, 0, 0 puts the atom at the cell vertices and if - the threee coordinates ere equal to 0.5, the atom will rest at the center of the cell. - - - - - Element - - - The element is changed by choosing the corresponding button in the periodic table. - If no button is checked, the element is unknown. - - - - - Charge - - - The charge of the atom. - - - - - Radius - - - The atom is figured as a sphere whose radius is expressed in picometers in the same way as the cell size. - While the radius is null, no atom can be added to the model. Gnome Crystal uses a database for radii. - In the Radius frame, it is possible to choose the type of the radius - (Unknown, Covalent, Ionic, - Metallic, or Van der Waals). Only ionic radii can - be used when the charge of the atom is not zero. Depending on the choice of element, charge and - radius type, a list of corresponding radii from the database is available. If none of these radii is - convenient, choose the Custom option and give a value in the entry. - - - - - Color - - - The default color for each element is the color used in the periodic table. To change the color displayed or - for an unknown element atom, use the custom color chooser. - - - - - The number of visible atoms depends on the model size (see ) and on cleavages - (see ). - - Buttons at bottom right are used to manage the atoms list: - - - - - Button Add adds an atom to the list with the current parameters if the radius is not null. - If there is an inappropriate value, a message appears and the action aborts. - - - - - Button Delete deletes the selected atom from the list. - - - - - Button Delete all removes every atom from the list. - - - -
- -Lines and Bonds -
- Lines and Bonds Dialog - - - - Screenshot of the Lines and Bonds Dialog Box. - - - - - -
- Bonds are not really supported in this version of Gnome Crystal. Lines must be used instead. - The difference is that bonds should be defined by the atoms they join when lines are defined by - the coordinates or their extremities. - Some special lines can be easily added, checking the corresponding box: - - - - Cell edges: if the box is checked, a cylinder is added - for each cell edge. - - - - - Diagonals: cylinders are added that join opposite vertices in the cell. - - - - - Medians: cylinders are added that join opposite face centers in the cell. - - - - - For Other lines defined in the list, a cylinder is added to join the points whose coordinates are given in the - appropriate entries. A Cylinder is added for every visible cell if the Single checkbox is not checked. - - These lines need coordinates x1, y1, z1 and x2, y2, z2 - are the coordinates of the two ends of the line or bond. - They must be given in cell coordinates for the two ends in the respective entries. - - For very line present in the model, the two following parameters must be defined - (for special lines, use the appropriate widgets and for the lines added to the list, use the wigets - displayed in the Other lines frame): - - - Radius - - - The radius of the cylinder used to figure the bond or line must be given in pm as is the cell size. - If the radius is null, nothing will be added to the model. - - - - - Color - - - The color of the cylinder used to figure the bond or line is selected by clicking on the button and picking a - color in the dialog box that pops. - - - - - In the screenshot above (got from the diamond sample provided - with the sources), cell edges defined with grey color, a 10 pm radius, and some - bonds with the same radius, are added and will - be repeated in every visible cell. - - Bonds and lines effectively visible depend on model size (see ) and cleavages - (see ). If one end of the cylinder lies outside of the visible part of the model, - the cylinder will be hidden. - - Buttons at bottom right are used to manage the bonds and lines list: - - - - - Button Add adds an item to the list with the current parameters if the radius is not null. - If there is an inappropriate value, a message appears and the action aborts. - - - - - Button Delete deletes the selected item from the list. - - - - - Button Delete all removes every item from the list. - - - -
- - - Size -
- Size Dialog - - - - Screenshot of the Size Dialog Box. - - - - - -
- Model size is expressed as relative cell coordinates. - The necessary values are maximums and minimums of the three coordinates - It is also possible to cut the model using cleavages (see - ) if one wishes to limit the visible part by planes others than those corresponding - to a constant value of a coordinate. -
- - - Cleavages -
- Cleavages Dialog - - - - Screenshot of the Cleavages Dialog Box. - - - - - -
- Cleavages are used to hide from the views atoms from planes with a orientation fixed by the - Miller indices h, k and l. - If x, y and z are the atomic coordinates relative to the cell, Miller indices define planes - as all the points such that hx + ky + lz is a constant. By instance, in a cubic network, (111) planes - are perpendicular to the diagonal of the cubic cell going from vertex 0,0,0 to vertex 1,1,1. - Each define cleavage will hide the chosen number of planes beginning from the greatest value - for hx + ky + lz that is present in the model. To remove planes from the other side of the model, - signs of h, k and l must be reversed. - There is no need to define cleavages of (100), (010) or (001) planes because the same - effect may be obtained more easily by changing the size of the model (see below ). - - When a cleavage is defined, the model is zoomed so that it fills the view as explained elsewhere - (see ). The Fixed model size button allows - to keep remaining atoms at the same place in the view which may be useful to chain - pictures in a presentation. - - - Buttons at bottom right are used to manage the cleavages list: - - - - - Button Add adds acleavage to the list with the current parameters. - - - - - Button Delete deletes the selected cleavage from the list. - - - - - Button Delete all removes every cleavage from the list. - - - -
-
- - - - - Views operations. - - To Create a New View - To create a new view of the active document, choose Windows Create New Window - . - - A new view of the active document is created. - The new view is identical - to the document active view. This is considered as a modification of the active document. - The new view becomes the active view. - - - - To Close The Current View - To close the current view, choose Windows Close This Window - . - - The active view will be closed. If this view is the only one opened for the document and the document has been changed - but not saved, a dialog box pops so that you can save the changes, ignore them, or abort the operation. - If other views exist, the view is closed without asking anything and the document is marked as dirty. - - - - To Tune a View - To tune a view, choose Edit Settings - . The View Settings Dialog Box opens. -
- View Settings Page - - - - Screenshot of the View Settings Dialog. - - - - - -
- This dialog box can be used to change the following parameters: - - - Background color - - - The background color is selected by clicking on the button and picking a - color in the dialog box that pops. - - - - - Field of view - - - The field of view is the angle which sides join the point from which the model is viewed - to the nearest sides of the view. So if the view has a larger horizontal size than its vertical size - the sides taken into account are the horizontal ones, otherwise, the vertical sides are used. - Acceptable values for the field of view are betwwen 0 and 45°. - When a 0° field of view is used the projecton is orthogonal. - With a 1° field of view, the perspective effect - will be hardly perceptible and with a 45° angle, the model will appear sowhat distorted. - The default field of view is 10° (unless you changed it) and gives a sensible perspective. - - - The distance between the viewpoint and the model is calculated to be the shortest so that the whole model remains - visible whatever its orientation is. The only solution to see the model from a longer distance consist, - in the present version, in defining a greater model size (see ) and defining cleavages - to remove extra atoms (see ) while selecting the option of constant model size. - - - - - Spatial model orientation - - - The model may be oriented with the mouse, clicking on the left button inside the view, - dragging until a convenient orientation is obtained, and releasing the button. - It also is possible to use this dialog box to choose an orientation by modifying the three - Euler's angles ψ, θ, and φ. - - - When the three angles are null, c axis is vertical, with positive values up, - b axis is in the view plane with positive values towards the right, - and a axis points in the direction of the viewer. To bring the model - to the position defined by Euler's angles, the operations are, in order: - - - - A rotation by angle φ around the vertical axis oriented upwards. Possible values - for φ are in the range - 180° to 180°. - - - - - A rotation by angle θ around the axis perpendicular to the view and pointing - towards the viewer. Possible values for θ are from 0° to 180°. - - - - - A rotation by angle ψ around the vertical axis oriented upwards. Possible values - for ψ are in the range - 180° to 180°. - - - - - - -
-
- - - - - Support. - - To Ask a Question - If you choose Help Ask a question, - your mail agent should pop up with a new message to the Gnome Chemistry Utils - mailing list. - Another way to get some help is to connect on the #gchemutils channel - at irc.gimp.net and ask your question there (if you are not alone on the channel). - - - To Find the Gnome Chemistry Utils on the Web. - If you choose Help Gnome Chemistry Utils on the web, - the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. - The main page is - http://gchemutils.nongnu.org and the project - page at savannah http://savannah.nongnu.org/projects/gchemutils. - - - To Report a Bug - To report a bug, you must use the bug page for the Gnome Chemistry - Utils at Savannah. You can access it by choosing - Help Report Bugs - (hopefully you'll have only one at once to report). - You can also type the bug report page address directly in - the browser. The bug repository is at - https://savannah.nongnu.org/bugs/?group=gchemutils - - - - - - - License - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU - General Public License as - published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later - version. - - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - - A copy of the GNU General Public License is - included as an appendix to the GNOME Users - Guide. You may also obtain a copy of the - GNU General Public License from the Free - Software Foundation by visiting their Web site or by writing to -
- Free Software Foundation, Inc. - 51 Franklin St - Fifth Floor - Boston, MA 02111-1307 - USA -
-
-
- -
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/crystal/gcrystal-0.10.omf.in gnome-chemistry-utils-0.10.9/docs/help/crystal/gcrystal-0.10.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/crystal/gcrystal-0.10.omf.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/crystal/gcrystal-0.10.omf.in 2009-11-14 11:46:32.000000000 +0100 @@ -0,0 +1,10 @@ + + + + + manual + + + + + diff -Nru gnome-chemistry-utils-0.8.6/docs/help/crystal/gcrystal.omf.in gnome-chemistry-utils-0.10.9/docs/help/crystal/gcrystal.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/crystal/gcrystal.omf.in 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/crystal/gcrystal.omf.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ - - - - - manual - - - - - diff -Nru gnome-chemistry-utils-0.8.6/docs/help/crystal/Makefile.am gnome-chemistry-utils-0.10.9/docs/help/crystal/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/help/crystal/Makefile.am 2007-05-07 14:58:20.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/help/crystal/Makefile.am 2009-11-14 11:30:35.000000000 +0100 @@ -1,11 +1,11 @@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml include $(top_srcdir)/gnome-doc-utils.make dist-hook: doc-dist-hook -DOC_MODULE = gcrystal +DOC_MODULE = gcrystal-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = diff -Nru gnome-chemistry-utils-0.8.6/docs/help/crystal/Makefile.in gnome-chemistry-utils-0.10.9/docs/help/crystal/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/help/crystal/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/crystal/Makefile.in 2009-11-14 11:46:00.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -39,8 +40,9 @@ ################################################################################ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -66,6 +68,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -73,7 +76,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,26 +95,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -122,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -163,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -182,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -193,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -231,24 +256,33 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ @@ -256,6 +290,7 @@ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ +_xml2po_mode = $(if $(DOC_ID),mallard,docbook) @ENABLE_SK_TRUE@_ENABLE_SK = true ################################################################################ @@ -289,14 +324,16 @@ ################################################################################ _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) +_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ - $(_DOC_C_MODULE) + $(_DOC_C_PAGES) $(_DOC_C_MODULE) _DOC_C_DOCS_NOENT = \ - $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) + $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ @@ -312,12 +349,16 @@ ############################################################################### -_DOC_POFILES = $(if $(DOC_MODULE), \ +_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) +_DOC_LC_PAGES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ + $(lc)/$(notdir $(page)) )) + _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) @@ -329,7 +370,7 @@ $(lc)/$(notdir $(doc)) )) _DOC_LC_DOCS = \ - $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) \ + $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ @@ -349,8 +390,9 @@ _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) -_clean_dir = $(if $(DOC_MODULE),clean-doc-dir) -DOC_MODULE = gcrystal +_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) +_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) +DOC_MODULE = gcrystal-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = DOC_LINGUAS = @@ -361,14 +403,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/crystal/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/help/crystal/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/crystal/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/help/crystal/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -386,6 +428,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -415,13 +458,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -452,6 +499,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -471,6 +519,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -479,18 +529,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -587,6 +647,10 @@ DOC_MODULE ?= +DOC_ID ?= + +DOC_PAGES ?= + DOC_ENTITIES ?= DOC_INCLUDES ?= @@ -603,6 +667,7 @@ _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` +_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl @@ -647,16 +712,16 @@ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs)"; \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs); \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi # FIXME: fix the dependancy @@ -665,15 +730,16 @@ $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) if ! test -d $(dir $@); then mkdir $(dir $@); fi if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ + po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \ + if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \ (cd $(dir $@) && \ - $(_xml2po) -e -p \ - "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \ + $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) - $(_xml2po) -e -o $@ $^ + $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) @@ -685,6 +751,8 @@ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) +################################################################################ + .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) @@ -703,7 +771,7 @@ rm -f "$$lc/.xml2po.mo"; \ fi; \ done -clean-doc-dir: +clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ @@ -726,10 +794,12 @@ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) -.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk -doc-dist-hook: \ - $(if $(DOC_MODULE),dist-doc-docs) \ - $(if $(_DOC_C_FIGURES),dist-doc-figs) \ +################################################################################ + +.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk +doc-dist-hook: \ + $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ + $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) @@ -775,9 +845,12 @@ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" +################################################################################ + .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ + $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @@ -793,15 +866,33 @@ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done +check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) + for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + for page in $(DOC_PAGES); do \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ + done; \ + done + check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ - xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ + echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ + xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done +################################################################################ + .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk + install-data-local: \ - $(if $(DOC_MODULE),install-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) @@ -809,42 +900,46 @@ install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ - echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \ - $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \ + echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ + $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - docdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$docdir"; \ + docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ - echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \ + echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ + figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ - elif test -f "C/$$fig"; then \ - figfile="C/$$fig"; \ else \ - figfile="$(srcdir)/C/$$fig"; \ + figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \ + figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ - echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ - $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + if $$figsymlink; then \ + echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ + ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ + else \ + echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ + $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + fi; \ done; \ done @@ -852,22 +947,24 @@ echo install-html install-doc-omf: - $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE) + $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \ + echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ - scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ + echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk +################################################################################ + .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ - $(if $(DOC_MODULE),uninstall-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) @@ -875,27 +972,28 @@ uninstall-doc-docs: @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ - echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ + echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ - echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ + echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ - echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done dist-hook: doc-dist-hook + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/docs/help/Makefile.am gnome-chemistry-utils-0.10.9/docs/help/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/help/Makefile.am 2006-12-12 07:15:42.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/Makefile.am 2009-11-14 11:30:38.000000000 +0100 @@ -1,3 +1,3 @@ -SUBDIRS = 3d calc crystal table +SUBDIRS = 3d calc crystal paint spectra table MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/docs/help/Makefile.in gnome-chemistry-utils-0.10.9/docs/help/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/help/Makefile.in 2008-01-25 21:06:18.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/Makefile.in 2009-11-14 11:46:00.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -52,15 +55,42 @@ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -80,26 +110,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -109,35 +142,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -150,14 +169,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -169,6 +195,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -180,31 +208,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -218,23 +271,32 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -SUBDIRS = 3d calc crystal table +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = 3d calc crystal paint spectra table MAINTAINERCLEANFILES = Makefile.in all: all-recursive @@ -243,14 +305,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/help/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/help/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -268,6 +330,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -299,7 +362,7 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -333,16 +396,16 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -350,14 +413,14 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -369,39 +432,43 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -422,29 +489,44 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -474,6 +556,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -493,6 +576,8 @@ html: html-recursive +html-am: + info: info-recursive info-am: @@ -501,18 +586,28 @@ install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -533,8 +628,8 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -550,6 +645,7 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/arrow-heads.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/arrow-heads.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/arrow-object1.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/arrow-object1.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/arrow-object2.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/arrow-object2.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/arrow-object3.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/arrow-object3.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/arrow-object-dlg.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/arrow-object-dlg.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/arrow-opts.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/arrow-opts.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/arrows.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/arrows.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/bond-opts.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/bond-opts.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/bond.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/bond.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/chain-opt.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/chain-opt.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/chain.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/chain.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/charges.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/charges.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/choose-elt.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/choose-elt.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/cyclentool-opt.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/cyclentool-opt.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/cyclentool.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/cyclentool.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/cycle-opt.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/cycle-opt.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/cycletools.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/cycletools.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/delocalized-bond.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/delocalized-bond.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/electrons.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/electrons.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/element.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/element.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/elt-menu.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/elt-menu.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/eraser.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/eraser.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/fragment.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/fragment.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/ghemical1.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/ghemical1.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/ghemical2.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/ghemical2.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/ghemical3.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/ghemical3.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/group.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/group.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/Hposdlg.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/Hposdlg.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/main-window.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/main-window.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/mechanism-arrows.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/mechanism-arrows.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/mendeleiev.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/mendeleiev.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/merge1.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/merge1.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/merge2.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/merge2.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/merge3.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/merge3.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/merge.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/merge.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/mesomery1.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/mesomery1.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/mesomery2.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/mesomery2.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/mesomery3.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/mesomery3.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/mesomery-arrow.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/mesomery-arrow.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/mol-menu.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/mol-menu.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/newfile.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/newfile.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/new-template.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/new-template.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/page-setup.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/page-setup.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/phenyl-residue.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/phenyl-residue.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/phenyl-structure.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/phenyl-structure.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/plus.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/plus.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/preferences.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/preferences.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/prefs-arrows.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/prefs-arrows.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/prefs-atoms-font.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/prefs-atoms-font.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/prefs-atoms-other.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/prefs-atoms-other.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/prefs-bonds.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/prefs-bonds.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/prefs-text.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/prefs-text.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/print-scale.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/print-scale.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/properties.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/properties.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/reaction1.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/reaction1.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/reaction2.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/reaction2.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/reaction3.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/reaction3.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/reaction4.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/reaction4.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/reaction5.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/reaction5.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/reaction-arrows.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/reaction-arrows.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/residues.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/residues.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/retrosynthesis1.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/retrosynthesis1.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/retrosynthesis2.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/retrosynthesis2.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/retrosynthesis3.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/retrosynthesis3.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/retrosynthesis4.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/retrosynthesis4.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/retrosynthesis.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/retrosynthesis.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/rotate.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/rotate.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/selection.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/selection.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/stereobonds.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/stereobonds.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/templates.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/templates.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/templates-tools.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/templates-tools.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/text.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/text.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/texttools-bar.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/texttools-bar.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/toolbox.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/toolbox.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/paint/C/figures/wikipedia.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/paint/C/figures/wikipedia.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/paint/C/gchempaint-0.10.xml gnome-chemistry-utils-0.10.9/docs/help/paint/C/gchempaint-0.10.xml --- gnome-chemistry-utils-0.8.6/docs/help/paint/C/gchempaint-0.10.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/paint/C/gchempaint-0.10.xml 2009-11-14 11:46:32.000000000 +0100 @@ -0,0 +1,2424 @@ + + + + + + +]> + + + + &app; manual. + + + + &app; Manual V&manrevision; + + 2005-2008 + Jean Bréfort + + + + + &legal; + + + GNOME Documentation Project + + + + + Jean + Bréfort + +
jean.brefort@normalesup.org
+
+
+ +
+ + + + + + + &app; Manual V&manrevision; + &date; + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.8.2 + July 2007 + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.8.0 + June 2007 + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.6 + August 2005 + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.4 + January 2004 + + Jean Bréfort + jean.brefort@ac-dijon.fr + GNOME Documentation Project + + + + &app; Manual V0.2 + July 2002 + + Jean Bréfort + jean.brefort@ac-dijon.fr + GNOME Documentation Project + + + + This manual describes version &appversion; of &app;. + + + Feedback + To report a bug or make a suggestion regarding the &app; application or + this manual, go to the + &app; home page. + + + + + &app; allows you to draw and display 2D + chemical structures. + +
+ + + + + + Introduction + + The &app; application is a simple chemical 2D-structures + editor. You can use &app; to create and edit chemistry related + files. + + + + + Getting started + + To Start &app; + You can start &app; in the following ways: + + + Applications menu + + Choose + + Science + Chemical Structures Editor + . + + + + Command line + + Type gchempaint, then press Return. + + + + GChemPaint can also be run as a Goffice component. + This makes possible to embed some chemistry in Abiword. Note that you + need an Abiword version using cairo for rendering (not yet released (September 2008)). + + + When You Start &app; + When you start &app;, an empty document window + and a toolbox are displayed: +
+ &app; main window + + + + Screenshot of the GChemPaint document window. + + + + + +
+ + A &app; document window contains the following + elements: + + Menubar + + The menus on the menubar contain all of the commands you need + to work with files in &app;. + + + Toolbar + + The toolbar contains a subset of the commands that you can + access from the menubar. + + + Display area + + The display area contains the contents of the file that you are + editing. + + + Statusbar + + The statusbar displays information about current + &app; activity and contextual information about the + menu items. + + + +
+ &app; toolbox + + + + Screenshot of the GChemPaint toolbox. + + + + + +
+ The toobox contains buttons for every available tool, a current element selector + and a property page for the currently selected element. The screenshot shows the box + with the selection tool selected (this is the default); its property box contains + four buttons. + The toolbox is always displayed along with the active document window. +
+ + To Open a File + To open a file, choose + File Open + + to display the Open File dialog. Select the file + that you want to open, then click OK. The file is + displayed in a new &app; document window. + To Open a recently opened file, choose the appropriate entry + in File Open recent + + GChemPaint can open files on a distant server using the Gnome Virtual + File System. If the file is read-only, the File Save + menu item and the corresponding tool button are disabled. + GChemPaint can open several file formats. Available formats are: + + Native format (*.gchempaint) + + Chemical Markup Language files (*.cml) + + MDL MOL files (*.mol;*.mdl) + + PDB files (*.pdb;*.ent) + + ChemDraw eXchange files (*.cdx) + + ChemDraw eXchange XML files (*.cdxml) + + PubChem ASN.1 ASCII Format files (*.asn) + + PubChem ASN.1 Binary Format files (*.asn;*.val) + + PubChem ASN.1 XML Format files (*.pc) + + XYZ Co-ordinate Animation Format (*.xyz) + + + With the exception of the native format which is always supported, + the other formats will only be supported if the OpenBabel installed + version supports them. For some formats, only reading might be supported. + GChemPaint can also support formats not listed here provided they have a + known mime type, they are supported by OpenBabel and you add the mime type, one + per line to the $HOME/.gchempaint/mime-types file. + Only native format files are opened in the embedded version. + You can open multiple files in &app;. + The application displays each file in its own window. + + + To Open Multiple Files from a Command Line + You can run &app; from a command line + and open a single file or multiple files. To open multiple files from a command + line, type the following command, then press Return: + gchempaint file1 file2 file3 + where file1 and others are relative or absolut paths or uris. + When the application starts, the files that you specified are + displayed in the &app; main window. + +
+ + + + + General operations + + + + To Create a New File + To create a new file, choose + File New + . The application displays a new file in the + &app; window. The new file uses + the default theme. + To create a new file with a differnet theme, + choose File New File with theme... + , choose the appropriate theme and valid. +
+ New File with Theme Dialog + + + + Screenshot of the New File with Theme Dialog Box. + + + + + +
+ This version of &app; is + shipped with only one theme, the default one. + For more informations about &app; + themes, see the Themes editing section. +
+ + + To Save a File + You can save files in the following ways: + + To save changes to the current file, choose + File + Save or click Save + on the toolbar. If the file does not have a filename, &app; + displays the Save As dialog. Enter a name for the file in the +Save + As dialog, choose a file format, then click OK. + + To save a new file or to save an existing file under a new filename, choose + File Save + As . Enter a name for the file in the Save + As dialog box, choose a file format, then click OK. + + + Available file formats are: + + Native format (*.gchempaint) + + Chemical Markup Language files (*.cml) + + MDL MOL files (*.mol;*.mdl) + + PDB files (*.pdb;*.ent) + + XYZ Co-ordinate Animation Format (*.xyz) + + + Of course, only 2D data are exported, even if most + formats support 3D coordinates. + Exept for the native format, files are saved (and read) using the OpenBabel library + . + Saving in a file format other than the native format is unsafe because not all features are + supported by the OpenBabel library. + Other formats might be supported, depending on the OpenBabel + version as explained in the section + To Open a File. + + + + To Edit the Document Properties + You can edit the document properties as follows: + Use the menu item + View + Tools + to open the document properties dialog box. +
+ Document Properties Dialog + + + + Screenshot of the Periodic Table Dialog Box. + + + + + +
+ The fields in this dialog box are: + + Title + + The title of the document. + + + Author's Name + + The default value is the environment variable USERNAME. + + + Author's E-Mail Address + + The default value is the environment variable E_MAIL if it exists. + + + Creation Date + + The time when the file was created. This field cannot be edited. + + + Revision Date + + The last time the file was saved. This field cannot be edited. + + + Theme + + The theme used by the document. Changing the theme of + an existing document is not a recommended operation. Bond lengths + and some other data will not be updated according to the + new theme. + For more informations about &app; + themes, see the Themes editing section. + + + Comments + + This field can contain any useful text. + + + + Dates are created automatically and saved with the file. The other fields are optionnal + and are saved only if they are not empty. +
+ + + To Print the Document + To print a document, choose + File Print... + . + File Preview + opens a window with a preview of the printed output. + To tune the printed output, choose + File Page setup... + as explained below. + + The page setup dialog. + the first tab of the dialog concerns the paper and margins setup. + Headers and footers are not supported in the version of &app; +
+ The Page Setup tab. + + + + Screenshot of page setup dialog. + + + + + +
+ The second tab allows you tio choose the scale of the output. With no scaling or + scaling at 100%, the output will have the same size in points as the size in pixels on + the screen. If you choose automatic scaling, you can make the output fill the available + space either horizontally, vertically, or both (none of the options is equivalent to no scaling). + Printing to more than one page is not supported in this version of &app; +
+ The Print Scale tab. + + + + Screenshot of the printing scale page. + + + + + +
+
+
+ + + To Export an image + To export the current file to an image, use + File Save As Image + . + Available formats are SVG, EPS, PS, PDF, and the formats with write support in + GdkPixbuf. + To choose a format, you can use an appropriate extension + in the file name, or explicitly select a format in the combo box. + With the first method, if &app; does + not recognize an extension, the exported file will be a SVG + file. &app; will add an extension + to the file name if needed. + If what you want is a molecule image for publication in Wikipedia, + you might read the next section. + + + + To Export an image suitable for Wikipedia publication. + To export the current file to an image, use the Wikepedia tool. +
+ Wikipedia Tool + + + + Screenshot of the Wikipedia Tool button. + + + + + +
+ When this tool is active, clicking on a molecule will export the molecule as a png + image using the Wikipedia theme, a transparent background, and containing the InChI for the molecule + embedded in the file. You'll have to choose a file name in the file chooser which pops up. +
+ + + To Edit the Preferences + You can change the current settings using + Edit Preferences + : +
+ Preferences Dialog + + + + Screenshot of the Preferences Dialog Box. + + + + + +
+ + Global settings + &app; has two global settings: + + Compression level + + The compression level used when saving native + files. If not 0 the file will be compressed using gzip. + + + Detachable periodic table + + If set, the drop-down periodic table from the tools box + will be tearable. See the section To Change the Current Element + for more details. + + + + + + Editing Themes. + Each document has an associated theme. When a document + is opened, &app; searches + if a theme already exists with the same name and the same + settings. If found the existing theme is used, otherwise + a new theme is added to the themes set and used only for + this file. It is possible, although not recomended, to change + the theme associated with the file using it's + Properties Dialog. + When the Preferences Dialog Box is opened, the active + document theme is selected. + For each theme, the various settings are spread on + several pages. + + General settings. + This page presents the settings which + did not fit well elsewhere. + + Name + + The name of the theme. This name can + be changed for user define themes and + themes specific to a file. Not for the + default Theme or other pre-defined ones. + + + Scale + + Scale used to convert real distance to + canvas distance expressed in pm per pixel. + + + General padding + + Padding used around text objects such as atoms, + texts and other typographic signs in pixels. + + + Object padding + + Default padding in pixels added between consecutive + objects during an alignment operation. + + + Stoichiometry padding + + Extra padding between a stoichiometric coefficient + and its associated molecule in pixels. + + + Sign padding + + Padding between a '+' sign in a reaction equation + and reactants symbols in pixels. + + + + + + Arrows related settings. +
+ Arrows Page + + + + Screenshot of the Arrows page in the Preferences Dialog Box. + + + + + +
+ + + Length + + Default arrow length (in pm just like bond lengths). + Changing this parameter will have no effect on the lengths + of exisiting arrows. + + + Width + + Arrow line width (in pixels). + + + Distance + + Distance in pixels between two parallel lines (either two arrows or one arrow with two lines). + + + Padding + + Padding added at each end of an arrow (in pixels). + + + Arrow head A + + Distance in pixels from tip of arrowhead to center. + + + Arrow head B + + Distance in pixels from tip of arrowhead to trailing point, measured along shaft. + + + Arrow head C + + Distance in pixels of arrowhead trailing points from outside edge of shaft. + + + +
+ + Atoms related settings. +
+ Atoms Font Page + + + + Screenshot of the Atoms font page in the Preferences Dialog Box. + + + + + +
+ Using this property page, it is possible to select + the font used for atoms and other residues. +
+ Atoms Extra Page + + + + Screenshot of the Atoms extra page in the Preferences Dialog Box. + + + + + +
+ + Charge sign size + + The size in pixels of a localized charge sign, + including the surrounding circle. + + + +
+ + Bonds related settings. +
+ Bonds Page + + + + Screenshot of the Bonds page in the Preferences Dialog Box. + + + + + +
+ + + Length + + Default bond length (pm). + Changing this parameter will have no effect on the lengths + of exisiting bonds + + + Angle + + Default angle between two consecutive bonds in a chain. + + + Width + + Bond line width (in pixels). + + + Distance + + Distance in pixels between two lines representing a multiple bond. + + + Stereo bond width + + Width in pixels at the largest end. + + + Hash width + + Width of hashes in pixels. + + + Hash distance + + Distance between hashes in pixels. + + + +
+ + Text related settings. +
+ Text Page + + + + Screenshot of the Text page in the Preferences Dialog Box. + + + + + +
+ This font selector gives the default font selected + when creating a new text object, unless an other font + has been selected in the + text tool property page. +
+
+
+ + + To Select and Move Objects + To select objects, you can either use the + Edit + Select All menu command + or activate the Selection Tool. With the selection tool, you can also move or rotate objects. + When you use the Edit + Select All menu command, + the Selection Tool is automatically activated. +
+ Selection Tool + + + + Screenshot of the Selection Tool button. + + + + + +
+ This tool is used to select one or several molecules or objects. To select an object, + just click on it. Molecules and other groups of objects are considered single objects and + you cannot select only some part of a molecule. Otherwise, you can select + all objects at least partially lying inside a rectangle by pressing the + left button, dragging the mouse from one corner of the rectangle to the opposite one + and releasing the button. Selected objects have their color changed from black to cyan. + Selected objects can be moved with the mouse, + flipped, rotated, deleted by pressing the delete key, or + copied. + When the selection tool is selected, the tools box looks like: +
+ <application>&app;</application> toolbox when the selection tool is selected + + + + Screenshot of the &app; toolbox when the selection tool is selected. + + + + + +
+ The property page of this tools contains four buttons: + + Horizontal flip button + + Use this button to flip horizontally the current selection. + + + Vertical flip button + + Use this button to flip vertically the current selection. + + + Rotate button + + When this toggle button is active, dragging the mouse over the + selecton will rotate it + instead of moving it to a new position. + + + Molecules merging button + + Use this button to merge the two selected + molecules. When the selection does not consist in just two molecules, + the button is not sensitive. + + + +
+ + + + To Copy, Cut, and Paste Objects + To add, modify or delete objects, you can use the appropriate tool. You can also + use the Edit + menu. + To copy objects to a buffer, you can choose Edit Copy + . If you select objets with the mouse they will also be copied to another buffer. + If you choose Edit Cut + the selected objects will be copied and deleted. + To paste an object, choose Edit Paste + . The pasted objects will appear selected and centered in the window. + You can also paste objects by clicking with the middle button, objects + will appear centered at the point where you clicked. Text can also be pasted in a text zone if you paste while editing a text object. You cannot paste + anything inside a fragment. Unless if you paste text in an already existing text, the + Selection Tool will be activated on + pasting. + + + + + To Undo or Redo Operations + To undo a change, choose + Edit Undo + . To redo an change, choose + Edit Redo + . The number of previous changes that you can undo is unlimited in &app; + If you are editing a text or a fragment, you can undo/redo each change done since + the begin of your edition operation. If you end the edition of such an object, you can only undo + or redo the whole edition operation. + + + + + To Delete Objects + To delete objects, you can activate the Eraser Tool: +
+ Eraser Tool + + + + Screenshot of the Eraser Tool button. + + + + + +
+ To erase a bond or an atom, click on it when this tool is active. An atom is suppressed + with all its bonds. While the button is pressed, the bond or atom appear coloured in red if + the pointer remains near it and revert to black if the mouse pointer is moved away. + When the left button is released, the objects coloured in red are deleted. + You can also delete whole molecules and groups of objects at once with the help of the + Selection Tool. + Automatic objects cannot be deleted with this tool. + The eraser tool has an empty property page. +
+ + + + To Flip or Rotate Objects + To flip or rotate objects, you can use the following buttons: +
+ Flip and Rotate Buttons + + + + Screenshot of the Flip and Rotate Buttons. + + + + + +
+ To flip or rotate objects, select them and click on the appropriate button. + To rotate the selected objects, drag the mouse on the view until you obtain + the wanted orientation. Grouped objects cannot be rotated or flipped in this + version of &app; +
+ + + + To Group and/or Align Objects + To group and/or align object, choose + Group and/or align objects + in the popup menu. The dialog box below will pop up. +
+ Group and/or Align Dialog Box. + + + + Screenshot of the Group and/or Align Dialog Box. + + + + + +
+ The fields in this dialog box are: + + Group + + Whether to create or not a group. + + + Align + + Whether to align selected objects or not. + If you choose to align the objects, you must select + the alignment mode in the list. Available modes are: + + Normal + + This is the most usual mode. Texts will have the same + baseline and other objects will be aligned on a horizontal line passing in the middle of a C character + in the font used for chemical symbols. + You can choose which part of a molecule (bond, atom or fragment) will be used for + normal alignment: move the mouse cursor to the bond, atom, or fragment, right click and select + Select alignment item in the popup menu. + + + Top + + Align object according to their top borders. + + + Mid-height + + Align object according to their vertical centers. + + + Bottom + + Align object according to their bottom borders. + + + Left + + Align object according to their left borders. + + + Center + + Align object according to their horizontal centers. + + + Right + + Align object according to their right borders. + + + + + + Space evenly + + Whether to space evenly aligned objects or not. This option is available only + if you align the objects. You must choose the distance to use to space the objects + in the spin button on the right. + + + + If grouped, objects will stay aligned when a change occur. + Groups cannot be flipped or rotated in this version + of &app;. + To ungroup objects or change alignment, choose + Group properties in the + contextual menu to display the dialog, uncheck + Group and validate. +
+
+ + + + Editing molecules. + + + + To Change the Current Element + You can change the current element with the keyboard or with the Periodic Table Combo Button + in the tools box. + + Using the keyboard. + When no text is being edited, typing a lowercase character will change + the current element. Only 26 elements can be selected this way: + + One character shortcuts for elements. + + a: Alb: Bc: Cd: Na + e: Sef: Fg: Geh:H + i: Ij: Tik: Kl: Li + m: Mgn: No: Op: P + q: Sir: Brs: St: Pt + u: Cuv: Vw: Wx: Cl + y: Yz: Zr + +
+ All elements can be accessed by typing an uppercase character. A popup + menu appears which list all the known symbols starting with this character. + The second character is used as a shortcut in the menu. As a sample, this is what + you get when you type 'P': +
+ Element popup menu. + + + + Screenshot of the Element popup menu. + + + + + +
+ Changing the current element using the keyboard might modify + the atom under the mouse cursor if any, see Modifying Atoms. +
+ + Using the Periodic Table Combo Button. +
+ Chosing an element + + + + Screenshot of the Periodic Table combo button poped up. + + + + + +
+ Just click on the wanted element, and it becomes the current element. + If you choose to have a tearable periodic table in the + preferences dialog box, + you can make the table permanently displayed as a separate window by clicking + on the dotted line. Clicking again on the dotted line in the window + closes the window. +
+ Periodic Table Dialog + + + + Screenshot of the Periodic Table Dialog Box. + + + + + +
+ The symbol of the selected element also appears on the + Element tool button. + Every new atom created with all tools are atoms of the default element. + Carbon is the selected element when the application starts. +
+
+ + + + To Use or Manage Templates + To use or manage templates, you can activate the Template Tool: +
+ Templates Tool + + + + Screenshot of the Templates Toolbar. + + + + + +
+ When the template tool is activated, the tools box looks like: +
+ <application>&app;</application> toolbox when the templates tool is selected + + + + Screenshot of the &app; toolbox when the selection tool is selected. + + + + + +
+ When the template tool is active, yo can add the molecule corresponding to the active template in your + document by clicking where you want to add it unless the + new template dialog is opened. + The new molecule will be centered around where you release + the mouse button. The molecule will be scaled so that it's median bond length + is equal to the current document theme bond length. + + Managing Templates + To select a template, use the drop down list. + When a template is selected in the tree, a preview is available in the toolbox. + User's templates can be deleted with the Remove button. For system wide + installed templates, the button is deactivated. + To add a new template, choose Add. The + New Template dialog will be opened. + + + Adding a New Template +
+ New Template Dialog + + + + Screenshot of the New Template Dialog. + + + + + +
+ To add a new template, you must provide a name, a category (you can choose an existing + category or create a new one), and a molecule. + To create the molecule for the template, draw it in a document and while the dialog is opened and the + templates tool is active, click on the molecule. The molecule is copied to the new template dialog. +
+
+ + + To Manage Residues + In &app;, Residues are atoms groups with a symbol, such as Ph for phenyl. &app; + comes with a list of predefined group symbols, but you can define new residues in needed. When + importing a file with unknown symbols, either a &app; file, or a ChemDraw® file, + new symobls are added to the user define symbols list. + To define a new symbol, choose + Tools/Edit residues..., the following dialog + will pop up: +
+ Residues dialog + + + + Screenshot of the Residues dialog box. + + + + + +
+ You can choose either a new residue (the default) or an already known + symbol in the dropdown list at top left of the dialog box. Selecting "Ph" leads to: +
+ Phenyl residue + + + + Screenshot of the Residues dialog showing the phenyl residue. + + + + + +
+ The entries and the check box are greyed because this residue is standard and can't be edited. + The name must be unique, but several symbols can be defined. The various symbols + must be separated by semicolons. Generic residues correspond to symbols which may represent + various structures such as R for alkyle, Ar for aryle, X for a halogen atom, or M for a metal atom. + If you display the structure page for the phenyl aresidue, you get: +
+ Phenyl structure + + + + Screenshot of the Residues dialog showing the phenyl structure. + + + + + +
+ The bullet represents the attachment point of th residue. It is linked to the first atom + by a single bond. Multiple bonds are not allowed in this version of &app;. + When you want to create a new residue, you might first select an existing one + with a similar structure. When you select "New" in the list, the structure is conserved. + When the dialog box is created, the default structure is a methyl. For generic residues + the structure should represent a simple case. + When you have the new strucutre and filled the name and symbol for it, you have + to click on the Save button to save it to the database. + The Delete button is used for removing the selected + residue from the database and is enabled only when the residue can be securely deleted. + +
+ + + To Add or Modify an Atom + To add or modify an atom, you can activate the Element Tool or the Fragment Tool: + + To Add or Modify an Single Atom +
+ Element Tool + + + + Screenshot of the Element Tool button. + + + + + +
+ With this tool, you can add an atom everywhere on the canvas or + change the nature of an already existing atom. The element is chosen with the + periodic table available in the view menu or by double clicking on + the tool's button. The symbol of the currently + selected element appears in the button of this tool. By default, carbon is + the current element as shown on the screenshot above. While the left button + remains pressed, the new atom or label appears coloured in green. If you move the + mouse away from where the left button was pressed, the new atom disappears. The changes + are effective when the button is released while the pointer stays on the new or changed atom. + Attached hydrogens are automatically added for non metals. + To change the default element,use the + Periodic Table Button. + It is also possible to change the nature of an atom using + the keyboard: put the mouse cursor on the atom you want to + modify, and then select the new element as described + there. Note + that this will also change the current element. + A local charge and + explicit single + electrons or electrons pairs can be added + to the atom with the appropriate tool. + Carbon atom are normally not displayed when they have at + least one bond. You can change this behaviour for each carbon atom + using File Display symbol + in the contextual menu. + When a non metal has implicit hydrogen + atoms, &app; tries to infer if they should + appear on the left or the right of the atomic symbol. If the automatic + behavior is not what you wish, you can force a left or right position + using File Hydrogen atoms position + in the contextual menu. The following dialog will pop up: +
+ Hydrogen atoms position dialog box + + + + Hydrogen atoms position dialog box. + + + + + +
+ Choose one of the options (Left, Right or Auto). The choosen option + will be instantly applied. +
+ + To Add or Modify a Group of Atoms +
+ Fragment Tool + + + + Screenshot of the Fragment Tool button. + + + + + +
+ With this tool, you can add a formula just by typing some text. In + &app;, such text + representing atoms is called a fragment. What you type with this tool is only partially analyzed. You + must first type a valid atomic or group symbol. The fragment will be aligned on the center of this symbol + and this allows you to include the fragment in a molecule by adding a bond. Fragments cannot have + more than one single bond in the present version of &app;. The bond + can be added to any atom in the fragment. The bonded atom is the reference atom of the fragment. + When editing, you must always have a valid symbol at its position. + Figures are automatically displayed smaller than symbols and slightly lowered unless they + are part of a charge. To add a charge in the fragment, first type the sign and then, either the figures + or other signs: typing a + increments the current charge and typing a - decrements it. + To obtain Fe2+, you can type Fe+2 or Fe++. + Fragments also support local charges, + but only if no charge is indicated in the fragment itself. + The fragment tool also converts existing atoms to fragment. This might be useful + to change the position of attached hydrogens or to display terminal carbon atoms. + In the other way, the Element Tool can also be used on fragments. It tries to replace the symbol + at the position of the click by the current element symbol if there is no bond. If there is a bond, + the symbol of the bonded atom is changed whereever you click. To transform a whole fragment + into an ordinary atom, press the Control key while clicking on the fragment. + Saving a file containing fragments in a format different from the native one + is very unsafe. +
+
+ + + To Add or Modify a Local Charge + To add or modify a localized charge, you can activate one of the following tools: +
+ Charge Tools + + + + Screenshot of the Charge Tools button. + + + + + +
+ The tools can be used to increment or decrement the local charge of an atom + by clicking on the atom while the appropriate tool is active. Local charges can also be added + to atoms located in fragments with + the following restrictions: only one atom in a fragment can bear a local charge; if the fragment + has a bond, only the bonded atom can bear the charge; and if charges are already present in + the fragment, no other local charge can be supported by the fragment. + In fragments, local charges are limited to -1 and +1 in this version + of &app;. + To display the charge at a position different from the default one, + drag the charge to the wanted position while pressing the mouse button. + Pressing the Shift key and/or the Control key change the behavior while + dragging. +
+ + + To Add Unbound Electrons to Atoms + To add unbound electrons to an atom, you can activate one of the following tools: +
+ Electrons Tools + + + + Screenshot of the Electrons Tools button. + + + + + +
+ The tools can be used to add explicit electrons to an atom + by clicking on the atom while the appropriate tool is active. + To display the electron or the electron pair at a position + different from the default one, + drag the charge to the wanted position while pressing the mouse button. + Pressing the Shift key and/or the Control key change the behavior while + dragging. +
+ + + To Add or Modify a Bond + To add or modify an atom, you can activate one of the following tools: + + Bond tool +
+ Bond Tool + + + + Screenshot of the Bond Tool button. + + + + + +
+ This tool allows to draw new bonds and to change the multiplicity of an + existing bond. The changes become permanent only when the mouse button is released. + To add a new bond, click on an existing atom or fragment or on the background (an atom will be + defined at the position of the click) with the left button. + On clicking, the new bond appears in the default direction. This + direction depends on the number of preexisting bonds: + + No bond or more than two: horizontal, to the right. + + One bond: the new bond will form with the first bond + an angle equal to the current setting in the tool options, + to the right if the caps lock is on, to the left otherwise. + + Two bonds: the direction will be the external bisector + of the angle of the two bonds. + + + If the default direction is not what you want, drag the mouse in the direction + of the bond and release the mouse when the green line is where you want the bond lie. + Current orientation is indicated in the status bar. + If you drag to an existing atom, and if the Merge with existing atoms button + in the tool options is checked, the bond will end on that atom and if you return the mouse + to the original position, no bond will be added (the green line disappears). Release + the button to draw the bond. &app; creates new atoms of the + current element. + When the new bond does not end at a preexisting atom, the bond length is fixed and the bond + angle from horizontal is a multiple of 5. Pressing the Shift key removes the fixed length + restriction and pressing the Control removes the restriction about the angle. + + To change a bond multiplicity, click on the bond with the left button. If you change + your mind, drag the mouse away from the bond before releasing the button. A single bond + will become a double bond, a double will become a triple and a triple bond will revert to + a single bond. If the bond was a stereo bond, it becomes a normal single bond. +
+ + Stereo bond tools +
+ Stereo Bond Tools + + + + Screenshot of the Stereo Bonds Tools buttons. + + + + + +
+ These tools allow to draw single stereo bonds. If you click on an existing bond + when this tool is active, the bond becomes a stereo bond. If it is already that sort + of bond, extremities are exchanged, except for squiggle bonds for which it has no effect. + Otherwise these tools work as the + normal bond tool. +
+ + Bond tools options +
+ <application>&app;</application> toolbox when a bond tool is selected + + + + Screenshot of the &app; toolbox when a bond tool is selected. + + + + + +
+ The available options are: + + Bond length + + The default length of a new bond. + + + Bond angle + + The default angle between two consecutive bonds in a chain. + + + Merge with existing atoms + + If checked, exiting atoms will be used when present at + the end of the new bond. Otherwise, a new atom will be created + even if it results to two atoms at the same position. + + + +
+
+ + + To Add a Chain + To add a chain, activate the chain tool. +
+ Fixed Size Cycle Tools buttons + + + + Screenshot of the Fixed Size Cycle Tools buttons. + + + + + +
+ This tool allows to add a new chain at once. The changes become permanent only when the mouse button is released. + To add a new chain, click on an existing atom or fragment or on the background (an atom will be + defined at the position of the click) with the left button. + On clicking, the new chain appears in the default direction. The direction + of the chain is not that of its first bond, but the direction from + the start of the chain to the end of the second bond. This + direction depends on the number of preexisting bonds: + + No bond or more than two: horizontal, to the right. + The second bond will turn to the left if the caps lock is on, + to the right otherwise. + + One bond: the fisrt bond of the new chain will form with the first bond + an angle equal to the current setting in the tool options, + to the right if the caps lock is on, to the left otherwise. + + Two bonds: the direction of the first bond will be the external bisector + of the angle of the two bonds. The direction of the second bond depends on the + status of the caps lock as before. + + + If the default direction is not what you want, drag the mouse in the direction + of the bond and release the mouse when the green chain is where you want the chain lie. + Current orientation is indicated in the status bar. + If you drag to an existing atom, and if the Merge with existing atoms button + in the tool options is checked, the bond will end on that atom and if you return the mouse + to the original position, no bond will be added (the green chain disappears). Release + the button to draw the chain. &app; creates new atoms of the + current element. + When the new chain does not end at a preexisting atom, the bond length is fixed and the chain + angle from horizontal is a multiple of 5. Pressing the Control key removes the restriction about the angle. + + The chain length is either set in the options + or calculated according to the mouse position. A new chain has at least two bonds. + Pressing the Shift key removes the constraint about the bond lengths, but fixes + the bonds number. + When the chain tool + is active, the toolbox looks like: +
+ <application>&app;</application> toolbox when the chain tool is selected + + + + Screenshot of the &app; toolbox when the chain tool is selected. + + + + + +
+ The available options are: + + Bond length + + The default length of a new bond. + + + Bond angle + + The default angle between two consecutive bonds in a chain. + + + Bond number + + The number of bonds to add in the new chain. + If the Auto is checked, the bond + length is determined from the mouse position while dragging, + otherwise, the number in the entry is used, which is quite + useful when adding a chain with just one click. + + + Merge with existing atoms + + If checked, exiting atoms will be used when present at + the end of a new bond. Otherwise, a new atom will be created + even if it results to two atoms at the same position. + + + +
+ + + To Add a Cycle + To add a cycle, you can activate one of the following tools: + + Fixed size cycle tools +
+ Fixed Size Cycle Tool + + + + Screenshot of the Fixed Size Cycle Tools buttons. + + + + + +
+ These tools allow to draw a whole cycle at once. If the click occurs on an atom or on the + background, dragging the mouse will change the orientation of the cycle. When the click occurs + on a preexisting atom, the default orientation is chosen relatively to preexisting bonds. + Shift and Control keys have the same effect than with the bonds tools. + If the click occurs on a bond, the new cycle will contain this bond. The new cycle appears by + default on the less hindered size of the bond. Drag the mouse on the other size before releasing + the button if you want to draw the cycle on the other side. Pressing the Shift key and + moving the mouse to an adjacent bond will include this bond in the new cycle if the size of the + new cycle is large enough (at least two new bonds will be created). +
+ <application>&app;</application> toolbox when a cycle tool is selected + + + + Screenshot of the &app; toolbox when a cycle tool is selected. + + + + + +
+ The available options are: + + Bond length + + The default length of a new bond. + + + Merge with existing atoms + + If checked, exiting atoms will be used when present at + the end of the new bond. Otherwise, a new atom will be created + even if it results to two atoms at the same position. + + + +
+ + Variable size cycle tool +
+ Variable Size Cycle Tool + + + + Screenshot of the Variable Size Cycle Tool button. + + + + + +
+ This tool works the same as the other cycle tools. The size or the new cycles can be changed + in the property box associated with this tool. The default size is nine and the largest possible + size is one hundred. +
+ <application>&app;</application> toolbox when the variable size cycle tool is selected + + + + Screenshot of the &app; toolbox when the variable size cycle tool is selected. + + + + + +
+ The available options are: + + Bond length + + The default length of a new bond. + + + Cycle Size + + The size of the new cycles. + + + Merge with existing atoms + + If checked, exiting atoms will be used when present at + the end of the new bond. Otherwise, a new atom will be created + even if it results to two atoms at the same position. + + + +
+
+ + + + To Merge two Molecules + To merge two molecules, you can add a bond betwwen two atoms, one from + each molecule. The drawback is that this method will not align properly the two parts of your + new molecule. + Another and much better method is to use the Merge button: +
+ Merge Button + + + + Screenshot of the Merge Tool button. + + + + + +
+ Suppose you want to draw a naphtalene molecule starting from + two benzene molecules: + + + + + Two benzene molecules. + + + + + + + Move one of the molecules so that at least one atom from each + molecule lies at the same place. These atoms must be identical (same element). + In the examples, two atoms and a bond conincide: + + + + + The two molecules after alignment. + + + + + + + Then, select the two molecules. The Merge button becomes sensitive. If + you click on it, you obtain: + + + + + The resulting naphtalene molecule. + + + + + + + If one of the molecule has two or more atoms at the + same position than an atom of the second molecule, the result is not + easily preditable. +
+ + + Using the Molecules contextual menu. +
+ Molecules contextual menu + + + + Screenshot of the Molecule contextual menu. + + + + + +
+ The available commands are: + + Export molecule to Ghemical + + Ghemical + will be started with a copy of the molecule. + The stereochemistry should be retained as far as possible. + With the cyclohexane molecule, you get: +
+ Initial ghemical view. + + + + Screenshot of the initial ghemical view. + + + + + +
+ And after adding hydrogens: +
+ After adding hydrogens + + + + Screenshot of the cyclohexane molecule before geometry optimization. + + + + + +
+ And, finally, after geometry optimization and changing the orientation: +
+ After geometry optimization. + + + + Screenshot of the cyclohexane molecule after geometry optimization. + + + + + +
+
+
+ Generate InChI + + Generates the InChI for the molecule and displays it in a popup window. + + + NIST webbook page for this molecule + + Generates the InChI for the molecule and request the page from the NIST + Webbook if the page exists. + + + PubChem page for this molecule + + Generates the InChI for the molecule and request the page from PubChem + if the page exists. + + + Generate SMILES + + Generates the InChI for the molecule and displays it in a popup window. + + + Open in Calculator + + Opens the chemical calculator GChemCalc with a copy of the molecule + formula and performs the available calculations + + + Select alignment item + + If clicked, the object which was at the position of + the mouse cursor when the right button was clicked becomes + the element taken into account for horizontal alignment. If + it is an atom, its baseline will be aligned with the other objects + baselines, and if it is a bond, the center of the bond will be + used. + + +
+
+
+ + + + Other objects. + + + + To Add an Arrow + To add an arrow, activate the appropriate tool. +
+ Arrow Tools buttons + + + + Screenshot of the Arrow Tools buttons. + + + + + +
+ Select the appropriate tool according to the type of arrow + you want to add. + When you click, a new horizontal arrow appears. You can move the + mouse pointer to change it's orientation by steps of 5°. You can remove this + restriction by pressing the Shift key. The length of the new bond is given + by the value displayed in the toolbox, unless you press the Control key, in which + case, the position of the mouse will be the end of the arrow. + If you drag the mouse cursor to it's original position before + releasing the button, the green arrow disappears and if you release the button + without moving the mouse anymore, no arrow is added to the document. + When an arrow tool (except the reversible rraction arrow tool) is + selected, the tolbox looks like: +
+ <application>&app;</application> toolbox when an arrow tool is selected + + + + Screenshot of the &app; toolbox when an arrow tool is selected. + + + + + +
+ Only one option is available: + + Arrow length + + The default length of a new arrow. + + + + For reversible reaction arrows, the heads used are by default half-heads. It is possible to change + the heads to full heads in the property box of the tool and even make your choice the default. + The toolbox will look like: +
+ <application>&app;</application> toolbox when the reversible reaction arrow tool is selected + + + + Screenshot of the &app; toolbox when the reversible reaction arrow tool is selected. + + + + + +
+
+ + + + + To Attach an Object to a Reaction Arrow + Objects such as text and molecules can be attached to reaction arrows to give more + information about the reaction. In the current version of &app;, only one object can + be attached to a given reaction arrow. Attaching the object to the arrow ensures + that the object will be correctly aligned, and the arrow length is lrge enough. + To attach an object to a reaction arrow, fiorst select the object. +
+ Object selection. + + + + Screenshot of the object selection step. + + + + + +
+ Then right click on the reaction arrow to show the contextual menu, and + choose Attach selection to arrow... +
+ Contextual menu. + + + + Screenshot of the arrow contextual menu. + + + + + +
+ A dialog box pops up where you can select a role for the object. +
+ Dialog box. + + + + Screenshot of the attached object dialog box. + + + + + +
+ And things are done. +
+ Attached object. + + + + Screenshot of the attached object. + + + + + +
+
+ + + + To Add or Edit a Reaction + To create a reaction, you must first draw the molecules and an arrow. + Two tools are present to add an arrow (go to the section "To Add an Arrow" for more information): +
+ Reaction Arrows Tools + + + + Screenshot of the Reaction Arrows Tools buttons. + + + + + +
+ Use these tools to add the corresponding graphical objects where appropriate + to represent a reaction. + When you have the molecules and the arrow, you can create a reaction. + As an example, if you want to represent the benzene hydrogenation reaction, + you must first obtain something as: + + + + + The molecules and arrow before grouping. + + + + + + + You must now select the molecules and click with the mouse right button. + A popup menu appears which contains the appropriate item: + + + + + Creating the reaction. + + + + + + + Select the Create a new reaction item, you obtain: + + + + + The reaction. + + + + + + + After the reaction has been created, you can add a stoichiometry coefficient. + Click with the mouse right button on the appropriate reagent or product and + choose Add a stoichiometry coefficient + in the popup menu. + + + + + Adding a stoichiometry coefficient. + + + + + + + Now, edit the stoichiometry coefficient. In the current version, &app; does not + check what you type, but future versions might analyze and reject incorrect texts. + + + + + Editing a stoichiometry coefficient. + + + + + + + When inside a reaction, molecules and arrows cannot be selecte + indidually, except for operations availabe in the contextual menu. + You can destroy the reaction by selecting the + Destroy the reaction + in the popup menu. The "+" signs and the stoichiometry coefficients + will be deleted, and the molecules and arrows will be ungrouped. + Reactions cannot be flipped or rotated. +
+ + + To Add or Edit a Mesomery Relationship + Mesomery is indicated by a double headed arrow. The appropriate tool to add this type of arrow + is (go to the section "To Add an Arrow" for more information): +
+ Mesomery Arrow Tool + + + + Screenshot of the Mesomery Arrow Tool button. + + + + + +
+ Use this tool to draw a double headed arrow between two mesomeric stuctures. + This version of &app; has an incomplete support for mesomery. + The validity of what you draw is not checked. + To build a mesomery relationship, first create all useful molecules and arrows. +
+ Creation of the molecules and arrows. + + + + Create the molecules and arrows. + + + + + +
+ Then, select the appropriate objects, right click, and select + Create a new mesomery relationship +
+ Selection of the popup menu entry. + + + + Select the menu. + + + + + +
+ If &app; is unable to build a mesomery relationship from the selected objects, + an error message is displayed. + The mesomery is created with a default object alignment. You can change + how mesomers are aligned by selecting a bond or an atom with the + Select alignment item + menu entry as explained in the section + To Group and/or Align Objects. + With this version of &app;, you must repeat the + operation for each mesomer. +
+ Built mesomery relationship. + + + + The mesomery relationship is built. + + + + + +
+ You can destroy the mesomery relationship path by selecting the + Destroy the mesomery relationship + in the popup menu. The molecules and arrows will be ungrouped. + Mesomery relationships cannot be flipped or rotated. +
+ + + To Add or Edit a Retrosynthesis Pathway + The appropriate tool to add a retrosynthesis arrow is + (go to the section "To Add an Arrow" for more information): +
+ Retrosynthesis Arrow Tool + + + + Screenshot of the Retrosynthesis Arrow Tool button. + + + + + +
+ Use this tool to draw a retrosynthesis arrow between two steps of the pathway. + To build a path, first create all useful molecules and arrows. +
+ Creation of the molecules and arrows. + + + + Create the molecules and arrows. + + + + + +
+ Then, select the appropriate objects, right click, and select + Create a new retrosynthesis path +
+ Selection of the popup menu entry. + + + + Select the menu. + + + + + +
+ If &app; is unable to build a retrosynthesis path from the selected objects, + an error message is displayed. + There are some limitations to what is supported currently : + + You cannot have more than one target molecule. + + Cyclic paths are not allowed. + + If a step leads to several precursors, you must use + one arrow for each. + + + The path is created with a default object alignment. You can change + how molecules are aligned by selecting a bond or an atom with the + Select alignment item + menu entry as explained in the section + To Group and/or Align Objects +
+ Built retrosynthesis path. + + + + The retrosynthesis path is built. + + + + + +
+ In the sample, one of the vertical bond of the cycle has been selected. +
+ Custom aligned retrosynthesis path. + + + + The retrosynthesis path after alignment. + + + + + +
+ You can destroy the retrosynthesis path by selecting the + Destroy the retrosynthesis path + in the popup menu. The molecules and arrows will be ungrouped. + Retrosynthesis paths cannot be flipped or rotated. +
+ + + To Add or Edit some Text + To add or edit text, use the text tool: +
+ <application>&app;</application> toolbox when the text tool is selected + + + + Screenshot of the &app; toolbox when the text tool is selected. + + + + + +
+ When this tool is selected, you can select an existing text and edit it or add a new text + by clicking on the background. + The text tool property page looks like: +
+ Text Tools Bar + + + + Screenshot of the Text Tools Bar. + + + + + +
+ You can decorate the text by changing the selection in + the various widgets. + &app; also recognize some keyboard + shortcuts specific to text edition. Some of these shortcuts are: + + Ctrl+b + + Toggles between bold and normal text if current + font family exists for both weights. + + + Ctrl+i + + Toggles between italic and normal text if current + font family exists for both styles. + + + Ctrl+k + + Toggles between strikethrough and normal. + + + Ctrl+u + + Toggles between single underscore and normal. + + + Ctrl+^ or Ctrl++ + + Toggles between superscript and normal. The size of + the font will be reduced to two thirds of the original value and the position raised + to the new font size. + + + Ctrl+_ or Ctrl+= + + Toggles between subscript and normal. + Toggles between superscript and normal. The size of + the font will be reduced to two thirds of the original value and the position lowered + to the half of the new font size. + + + Ctrl+Space + + Restores default values according to the theme + associated to the active document. + + + +
+ +
+ + + + + Support. + + To Ask a Question + If you choose Help Ask a question, + your mail agent should pop up with a new message to the GChemPaint + mailing list. + Another way to get some help is to connect on the #gchemutils channel + at irc.gimp.net and ask your question there (if you are not alone on the channel). + + + To Find the Gnome Chemistry Utils on the Web. + If you choose Help Gnome Chemistry Utils on the web, + the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. + The main page is + http://gchempaint.nongnu.org and the project + page at savannah http://savannah.nongnu.org/projects/gchempaint. + + + To Report a Bug + To report a bug, you must use the bug page for the Gnome Chemistry + Utils at Savannah. You can access it by choosing + Help Report Bugs + (hopefully you'll have only one at once to report). + You can also type the bug report page address directly in + the browser. The bug repository is at + https://savannah.nongnu.org/bugs/?group=gchempaint + + + + + + + License + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU + General Public License as + published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. + + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + A copy of the GNU General Public License is + included as an appendix to the GNOME Users + Guide. You may also obtain a copy of the + GNU General Public License from the Free + Software Foundation by visiting their Web site or by writing to +
+ Free Software Foundation, Inc. + 51 Franklin St - Fifth Floor + Boston, MA 02111-1307 + USA +
+
+
+ +
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/paint/C/legal.xml gnome-chemistry-utils-0.10.9/docs/help/paint/C/legal.xml --- gnome-chemistry-utils-0.8.6/docs/help/paint/C/legal.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/paint/C/legal.xml 2009-11-14 11:46:32.000000000 +0100 @@ -0,0 +1,76 @@ + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License (GFDL), Version 1.1 or any later version published + by the Free Software Foundation with no Invariant Sections, + no Front-Cover Texts, and no Back-Cover Texts. You can find + a copy of the GFDL at this link or in the file COPYING-DOCS + distributed with this manual. + + This manual is part of a collection of GNOME manuals + distributed under the GFDL. If you want to distribute this + manual separately from the collection, you can do so by + adding a copy of the license to the manual, as described in + section 6 of the license. + + + + Many of the names used by companies to distinguish their + products and services are claimed as trademarks. Where those + names appear in any GNOME documentation, and the members of + the GNOME Documentation Project are made aware of those + trademarks, then the names are in capital letters or initial + capital letters. + + + + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED + UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE + WITH THE FURTHER UNDERSTANDING THAT: + + + + DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR + IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES + THAT THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR + A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE + RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE + OF THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR + MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY + CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY + SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS + LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED + VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER + EXCEPT UNDER THIS DISCLAIMER; AND + + + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL + THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), + CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, + INITIAL WRITER, ANY CONTRIBUTOR, OR ANY + DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION + OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH + PARTIES, BE LIABLE TO ANY PERSON FOR ANY + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER + INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS + OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR + MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR + LOSSES ARISING OUT OF OR RELATING TO USE OF THE + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, + EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF + THE POSSIBILITY OF SUCH DAMAGES. + + + + + + \ Kein Zeilenumbruch am Dateiende. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/paint/ChangeLog gnome-chemistry-utils-0.10.9/docs/help/paint/ChangeLog --- gnome-chemistry-utils-0.8.6/docs/help/paint/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/paint/ChangeLog 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,13 @@ +2008-08-23 Jean Brefort + + reviewed by: + + * Makefile.am: + +2008-08-22 Jean Brefort + + reviewed by: + + * Makefile.am: + * gchempaint-unstable.omf.in: + diff -Nru gnome-chemistry-utils-0.8.6/docs/help/paint/gchempaint-0.10.omf.in gnome-chemistry-utils-0.10.9/docs/help/paint/gchempaint-0.10.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/paint/gchempaint-0.10.omf.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/paint/gchempaint-0.10.omf.in 2009-11-14 11:46:33.000000000 +0100 @@ -0,0 +1,10 @@ + + + + + manual + + + + + diff -Nru gnome-chemistry-utils-0.8.6/docs/help/paint/Makefile.am gnome-chemistry-utils-0.10.9/docs/help/paint/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/help/paint/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/paint/Makefile.am 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,12 @@ +AUTOMAKE_OPTIONS = -Wno-portability + +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml + +include $(top_srcdir)/gnome-doc-utils.make +dist-hook: doc-dist-hook + +DOC_MODULE = gchempaint-@GCU_API_VER@ +DOC_ENTITIES = legal.xml +DOC_INCLUDES = + +DOC_LINGUAS = diff -Nru gnome-chemistry-utils-0.8.6/docs/help/paint/Makefile.in gnome-chemistry-utils-0.10.9/docs/help/paint/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/help/paint/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/paint/Makefile.in 2009-11-14 11:46:00.000000000 +0100 @@ -0,0 +1,999 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# gnome-doc-utils.make - make magic for building documentation +# Copyright (C) 2004-2005 Shaun McCance +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +################################################################################ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/gnome-doc-utils.make ChangeLog +subdir = docs/help/paint +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +AUTOMAKE_OPTIONS = -Wno-portability +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml +_clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) +_DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) +_DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ + $(filter $(LINGUAS),$(DOC_LINGUAS)), \ + $(DOC_LINGUAS)) + +_DOC_ABS_SRCDIR = @abs_srcdir@ +_xml2po_mode = $(if $(DOC_ID),mallard,docbook) +@ENABLE_SK_TRUE@_ENABLE_SK = true + +################################################################################ +db2omf_args = \ + --stringparam db2omf.basename $(DOC_MODULE) \ + --stringparam db2omf.format $(3) \ + --stringparam db2omf.dtd \ + $(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 \ + | sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \ + --stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \ + --stringparam db2omf.omf_dir "$(OMF_DIR)" \ + --stringparam db2omf.help_dir "$(HELP_DIR)" \ + --stringparam db2omf.omf_in "$(_DOC_OMF_IN)" \ + $(if $(_ENABLE_SK), \ + --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)") \ + $(_db2omf) $(2) + +_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in)) +_DOC_OMF_DB = $(if $(_DOC_OMF_IN), \ + $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf)) + +_DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \ + $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf)) + + +# FIXME +_DOC_OMF_ALL = \ + $(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \ + $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML)) + + +################################################################################ +_DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) +_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) +_DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) +_DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) +_DOC_C_DOCS = \ + $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) $(_DOC_C_MODULE) + +_DOC_C_DOCS_NOENT = \ + $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) + +_DOC_C_FIGURES = $(if $(DOC_FIGURES), \ + $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ + $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png))) + + +# FIXME: probably have to shell escape to determine the file names +_DOC_C_HTML = $(foreach f, \ + $(shell xsltproc --xinclude \ + --stringparam db.chunk.basename "$(DOC_MODULE)" \ + $(_chunks) "C/$(DOC_MODULE).xml"), \ + C/$(f).xhtml) + + +############################################################################### +_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) + +_DOC_LC_MODULES = $(if $(DOC_MODULE), \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) + +_DOC_LC_PAGES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ + $(lc)/$(notdir $(page)) )) + +_DOC_LC_INCLUDES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ + $(lc)/$(notdir $(inc)) )) + + +# FIXME: probably have to shell escape to determine the file names +_DOC_LC_HTML = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \ + $(lc)/$(notdir $(doc)) )) + +_DOC_LC_DOCS = \ + $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ + $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) + +_DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ + $(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) ) + +_DOC_SRC_FIGURES = \ + $(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS), \ + $(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) )) + +_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot) + +################################################################################ +_DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \ + $(_DOC_C_HTML) $(_DOC_LC_HTML)) + +_DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml) +_clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) +_clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) +_clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) +_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) +_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) +DOC_MODULE = gchempaint-@GCU_API_VER@ +DOC_ENTITIES = legal.xml +DOC_INCLUDES = +DOC_LINGUAS = +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gnome-doc-utils.make $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/paint/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/help/paint/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool \ + mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local dist-hook distclean distclean-generic \ + distclean-libtool distclean-local distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-local + + +DOC_H_FILE ?= + +DOC_H_DOCS ?= + +$(DOC_H_FILE): $(DOC_H_DOCS); + @rm -f $@.tmp; touch $@.tmp; + echo 'const gchar* documentation_credits[] = {' >> $@.tmp + list='$(DOC_H_DOCS)'; for doc in $$list; do \ + xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ + if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ + xsltproc --path "$$xmlpath" $(_credits) $$doc; \ + done | sort | uniq \ + | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \ + | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp + echo ' NULL' >> $@.tmp + echo '};' >> $@.tmp + echo >> $@.tmp + list='$(DOC_H_DOCS)'; for doc in $$list; do \ + xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ + if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ + docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \ + | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \ + echo $$xmlpath; \ + ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \ + for id in $$ids; do \ + echo '#define HELP_'`echo $$docid`'_'`echo $$id \ + | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \ + done; \ + echo >> $@.tmp; \ + done; + cp $@.tmp $@ && rm -f $@.tmp + +dist-check-gdu: +@HAVE_GNOME_DOC_UTILS_FALSE@ @echo "*** GNOME Doc Utils must be installed in order to make dist" +@HAVE_GNOME_DOC_UTILS_FALSE@ @false + +.PHONY: dist-doc-header +dist-doc-header: $(DOC_H_FILE) + @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \ + echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \ + $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)"; + +doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header) + +.PHONY: clean-doc-header +clean-local: $(_clean_doc_header) +distclean-local: $(_clean_doc_header) +mostlyclean-local: $(_clean_doc_header) +maintainer-clean-local: $(_clean_doc_header) +clean-doc-header: + rm -f $(DOC_H_FILE) + +all: $(DOC_H_FILE) + +################################################################################ + +DOC_MODULE ?= + +DOC_ID ?= + +DOC_PAGES ?= + +DOC_ENTITIES ?= + +DOC_INCLUDES ?= + +DOC_FIGURES ?= + +DOC_FORMATS ?= docbook + +DOC_LINGUAS ?= + +################################################################################ + +_xml2po ?= `which xml2po` + +_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` +_db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` +_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` +_chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl +_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl +_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl +@ENABLE_SK_TRUE@_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir` +@ENABLE_SK_TRUE@_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir` +@ENABLE_SK_TRUE@_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml + +$(_DOC_OMF_DB) : $(_DOC_OMF_IN) +$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml + @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ + echo "The file '$(_skcontentslist)' does not exist." >&2; \ + echo "Please check your ScrollKeeper installation." >&2; \ + exit 1; } + xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; } + +$(_DOC_OMF_HTML) : $(_DOC_OMF_IN) +$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml +@ENABLE_SK_TRUE@ @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ +@ENABLE_SK_TRUE@ echo "The file '$(_skcontentslist)' does not exist" >&2; \ +@ENABLE_SK_TRUE@ echo "Please check your ScrollKeeper installation." >&2; \ +@ENABLE_SK_TRUE@ exit 1; } + xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; } + +.PHONY: omf +omf: $(_DOC_OMF_ALL) + +.PHONY: po +po: $(_DOC_POFILES) + +$(_DOC_POFILES): + @if ! test -d $(dir $@); then \ + echo "mkdir $(dir $@)"; \ + mkdir "$(dir $@)"; \ + fi + @if test ! -f $@ -a -f $(srcdir)/$@; then \ + echo "cp $(srcdir)/$@ $@"; \ + cp "$(srcdir)/$@" "$@"; \ + fi; + @docs=; \ + list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \ + docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \ + done; \ + if ! test -f $@; then \ + echo "(cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ + cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ + (cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ + cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ + else \ + echo "(cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ + (cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ + fi + +# FIXME: fix the dependancy +# FIXME: hook xml2po up +$(_DOC_LC_DOCS) : $(_DOC_POFILES) +$(_DOC_LC_DOCS) : $(_DOC_C_DOCS) + if ! test -d $(dir $@); then mkdir $(dir $@); fi + if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ + po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \ + if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \ + (cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \ + "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ + cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) +.PHONY: pot +pot: $(_DOC_POT) +$(_DOC_POT): $(_DOC_C_DOCS_NOENT) + $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ + +$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) + xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) + +################################################################################ + +all: \ + $(_DOC_C_DOCS) $(_DOC_LC_DOCS) \ + $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ + $(_DOC_HTML_ALL) $(_DOC_POFILES) + +################################################################################ + +.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir + +clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) +clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML) +clean-doc-lc: + rm -f $(_DOC_LC_DOCS) + @list='$(_DOC_POFILES)'; for po in $$list; do \ + if ! test "$$po" -ef "$(srcdir)/$$po"; then \ + echo "rm -f $$po"; \ + rm -f "$$po"; \ + fi; \ + done + @for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc/.xml2po.mo"; then \ + echo "rm -f $$lc/.xml2po.mo"; \ + rm -f "$$lc/.xml2po.mo"; \ + fi; \ + done +clean-doc-dir: clean-doc-lc + @for lc in C $(_DOC_REAL_LINGUAS); do \ + for dir in `find $$lc -depth -type d`; do \ + if ! test $$dir -ef $(srcdir)/$$dir; then \ + echo "rmdir $$dir"; \ + rmdir "$$dir"; \ + fi; \ + done; \ + done + +clean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) +distclean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) +mostlyclean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) +maintainer-clean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) + +################################################################################ + +.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk +doc-dist-hook: \ + $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ + $(if $(_DOC_C_FIGURES),dist-doc-figs) \ + $(if $(_DOC_OMF_IN),dist-doc-omf) +# $(if $(_DOC_DSK_IN),dist-doc-dsk) + +dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES) + @for lc in C $(_DOC_REAL_LINGUAS); do \ + echo " $(mkinstalldirs) $(distdir)/$$lc"; \ + $(mkinstalldirs) "$(distdir)/$$lc"; \ + done + @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \ + for doc in $$list; do \ + if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ + docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + if ! test -d "$(distdir)/$$docdir"; then \ + echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ + $(mkinstalldirs) "$(distdir)/$$docdir"; \ + fi; \ + echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ + $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ + done + +dist-doc-figs: $(_DOC_SRC_FIGURES) + @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \ + for fig in $$list; do \ + if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$fig"; then \ + figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + if ! test -d "$(distdir)/$$figdir"; then \ + echo "$(mkinstalldirs) $(distdir)/$$figdir"; \ + $(mkinstalldirs) "$(distdir)/$$figdir"; \ + fi; \ + echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \ + $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \ + fi; \ + done; + +dist-doc-omf: + @if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \ + echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \ + $(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))" + +dist-doc-dsk: + @if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \ + echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ + $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" + +################################################################################ + +.PHONY: check-doc-docs check-doc-omf +check: \ + $(if $(DOC_MODULE),check-doc-docs) \ + $(if $(DOC_ID),check-doc-pages) \ + $(if $(_DOC_OMF_IN),check-doc-omf) + +check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) + @for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ + done + +check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) + for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + for page in $(DOC_PAGES); do \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ + done; \ + done + +check-doc-omf: $(_DOC_OMF_ALL) + @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ + echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ + xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ + done + +################################################################################ + +.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk + +install-data-local: \ + $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ + $(if $(_DOC_HTML_ALL),install-doc-html) \ + $(if $(_DOC_C_FIGURES),install-doc-figs) \ + $(if $(_DOC_OMF_IN),install-doc-omf) +# $(if $(_DOC_DSK_IN),install-doc-dsk) + +install-doc-docs: + @for lc in C $(_DOC_REAL_LINGUAS); do \ + echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ + $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ + done + @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ + if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ + docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ + if ! test -d "$$docdir"; then \ + echo "$(mkinstalldirs) $$docdir"; \ + $(mkinstalldirs) "$$docdir"; \ + fi; \ + echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ + done + +install-doc-figs: + @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ + for lc in C $(_DOC_REAL_LINGUAS); do \ + figsymlink=false; \ + if test -f "$$lc/$$fig"; then \ + figfile="$$lc/$$fig"; \ + elif test -f "$(srcdir)/$$lc/$$fig"; then \ + figfile="$(srcdir)/$$lc/$$fig"; \ + else \ + figsymlink=true; \ + fi; \ + figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ + if ! test -d "$$figdir"; then \ + echo "$(mkinstalldirs) $$figdir"; \ + $(mkinstalldirs) "$$figdir"; \ + fi; \ + figbase=`echo $$fig | sed -e 's/^.*\///'`; \ + if $$figsymlink; then \ + echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ + ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ + else \ + echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ + $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + fi; \ + done; \ + done + +install-doc-html: + echo install-html + +install-doc-omf: + $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) + @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ + echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ + done + @if test "x$(_ENABLE_SK)" = "xtrue"; then \ + echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + fi; + +install-doc-dsk: + echo install-dsk + +################################################################################ + +.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk +uninstall-local: \ + $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ + $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ + $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ + $(if $(_DOC_OMF_IN),uninstall-doc-omf) +# $(if $(_DOC_DSK_IN),uninstall-doc-dsk) + +uninstall-doc-docs: + @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ + echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + done + +uninstall-doc-figs: + @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ + echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + done; + +uninstall-doc-omf: + @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ + if test "x$(_ENABLE_SK)" = "xtrue"; then \ + echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + fi; \ + echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + done + +dist-hook: doc-dist-hook + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/spectra/C/figures/gspectrum.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/spectra/C/figures/gspectrum.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/spectra/C/figures/ir-tools.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/spectra/C/figures/ir-tools.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/spectra/C/figures/nmr-tools.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/spectra/C/figures/nmr-tools.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/spectra/C/figures/page-setup.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/spectra/C/figures/page-setup.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/spectra/C/figures/print-scale.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/spectra/C/figures/print-scale.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/spectra/C/figures/simple-toolbar.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/spectra/C/figures/simple-toolbar.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/spectra/C/figures/uv-vis-tools.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/spectra/C/figures/uv-vis-tools.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/spectra/C/gspectrum-0.10.xml gnome-chemistry-utils-0.10.9/docs/help/spectra/C/gspectrum-0.10.xml --- gnome-chemistry-utils-0.8.6/docs/help/spectra/C/gspectrum-0.10.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/spectra/C/gspectrum-0.10.xml 2009-11-14 11:46:33.000000000 +0100 @@ -0,0 +1,395 @@ + + + + + + +]> + + + + &app; manual + + + + &app; Manual V&manrevision; + + 2008 + Jean Bréfort + + + + + &legal; + + + GNOME Documentation Project + + + + + Jean + Bréfort + +
jean.brefort@normalesup.org
+
+
+ +
+ + + + + + + &app; Manual V&manrevision; + &date; + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + This manual describes version &appversion; of &app;. + + + Feedback + To report a bug or make a suggestion regarding the &app; application or + this manual, go to the + &app; home page. + + + + + &app; is a simple spectrum viewer. + +
+ + + + + + Introduction + The &app; application is a spectrum viewer. It can + load a variety of files in the JCAMP-DX format. + Supported spectra include UV-visible, IR, Raman, NMR (both spectra and FIDs), + and Mass. + + + + + Getting started + + To Start &app; + You can start &app; in the following ways: + + + Applications menu + + Choose + + Education + Spectrum viewer + . + + + + Command line + + Type gspectrum, then press Return. + + + + + + + When You Start &app; + When you start &app;, the following window is displayed: +
+ &app; document window + + + + Screenshot of the GSpectrum document window. + + + + + +
+ + The &app; window contains the following + elements: + + Menubar + + The menus on the menubar contain all of the commands you need + to work with files in &app;. + + + Display area + + The display area contains the contents of the file that you are + displaying and/or editing. + + + +
+ + To Open a File + To open a file, choose + File Open + + to display the Open File dialog. Select the file + that you want to open, then click OK. The file is + displayed in a new &app; document window. + To Open a recently opened file, choose the appropriate entry + in File Open recent + + &app; can open files on a remote server. + You can open multiple files in &app;. + Each file is opened in it's own top-level window. + + + To Open Multiple Files from a Command Line + You can run &app; from a command line + and open a single file or multiple files. To open multiple files from a command + line, type the following command, then press Return: + gspectrum file1 file2 file2 ... + where file1 and others, might be relative, absolute paths or URIs. + When the application starts, a &app; window is created + for each file that you specified. + +
+ + Usage + + + To Customize the spectrum view + The customization options depend on the spectrum type. + When a spectrum is opened in a new window, the displayed data are + those directly read from the file. The abscissa axis might be inverted in + some cases, according to current usage. + In the simplest case, the toolbar looks like: +
+ GSpectrum default toolbar + + + + Screenshot of the GSpectrum simplest toolbar. + + + + + +
+ You can set the values of the minimum + and maximum displayed abscissa. These limiting values are constrained to + be within the actual data interval. + When only a part of the spectrum is displayed, the slider can + be used to scroll through the spectrum. The spectrum moves in the same + direction as the slider. + When the spectrum is a UV-Visible spectrum, additional controls are + available: +
+ toolbar for UV-visible spectra + + + + Screenshot of the GSpectrum toolbar for uv-visible spectra. + + + + + +
+ The abscissa can be switched between wavelength in nanometers and + wave number in cm−1 and the axis inverted (high values at left) or not, + and the ordinate can be either absorbance or transmittance. + The toolbar is almost identical for IR spectra. The only difference + is that wavelengths are in micrometers instead of nanometers: +
+ toolbar for IR and Raman spectra + + + + Screenshot of the GSpectrum toolbar for ir spectra. + + + + + +
+ The abscissa units available for NMR spectra are ppm and Hz. + The intergation curve can also been displayed or hidden: +
+ toolbar for NMR spectra + + + + Screenshot of the GSpectrum toolbar for nmr spectra. + + + + + +
+
+ + + Export the Spectrum as an Image + To export the displayed spectrum to an image, use + File Save As Image + . + Available formats are SVG, EPS, PS, PDF, and formats that support writing in GdkPixbuf. + To choose a format, you can use an appropriate file name extension, + or explicitly select a format in the combo box. + With the first method, if &app; does + not recognize an extension, the exported file will be a SVG + file. &app; will add an extension + to the file name if needed. + You might change the default width and height of the exported image + using the appropriate entries. + Postscript and PDF files can also be produced using the + File Print... + command. + + + + To Print the Spectrum + To print a spectrum, choose + File Print... + . + File Preview + opens a window with a preview of the printed output. + To tune the printed output, choose + File Page setup... + as explained below. + + The page setup dialog. + The first tab of the dialog concerns the paper and margins setup. + Headers and footers are not supported in the version of &app; +
+ The Page Setup tab. + + + + Screenshot of page setup dialog. + + + + + +
+ The second tab allows you to choose the scale of the output. With no scaling or + scaling at 100%, the output will have the same size in points as the size in pixels on + the screen. If you choose automatic scaling, you can make the output fill the available + space either horizontally, vertically, or both (unchecking both options is equivalent to no scaling). + Printing to more than one page is not supported in this version of &app; +
+ The Print Scale tab. + + + + Screenshot of the printing scale page. + + + + + +
+
+
+
+ + Support. + + To Ask a Question + If you choose Help Ask a question, + your mail client should pop up with a new message to the Gnome Chemistry Utils + mailing list. + Another way to get some help is to connect on the #gchemutils IRC channel + on the irc.gimp.net network and ask your question there (if you are not alone on the channel). + + + To Find the Gnome Chemistry Utils on the Web. + If you choose Help Gnome Chemistry Utils on the web, + the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. + The main page is + http://gchemutils.nongnu.org and the project + page at Savannah http://savannah.nongnu.org/projects/gchemutils. + + + To Report a Bug + To report a bug, you must use the bug page for the Gnome Chemistry + Utils at Savannah. You can access it by choosing + Help Report Bugs + (hopefully you'll have only one at a time to report). + You can also use a web browser to go to the bug report page address directly. The bug repository is at + https://savannah.nongnu.org/bugs/?group=gchemutils + + + + + + + License + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU + General Public License as + published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. + + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + A copy of the GNU General Public License is + included as an appendix to the GNOME Users + Guide. You may also obtain a copy of the + GNU General Public License from the Free + Software Foundation by visiting their Web site or by writing to +
+ Free Software Foundation, Inc. + 51 Franklin St - Fifth Floor + Boston, MA 02111-1307 + USA +
+
+
+ +
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/spectra/C/legal.xml gnome-chemistry-utils-0.10.9/docs/help/spectra/C/legal.xml --- gnome-chemistry-utils-0.8.6/docs/help/spectra/C/legal.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/spectra/C/legal.xml 2009-11-14 11:46:33.000000000 +0100 @@ -0,0 +1,76 @@ + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License (GFDL), Version 1.1 or any later version published + by the Free Software Foundation with no Invariant Sections, + no Front-Cover Texts, and no Back-Cover Texts. You can find + a copy of the GFDL at this link or in the file COPYING-DOCS + distributed with this manual. + + This manual is part of a collection of GNOME manuals + distributed under the GFDL. If you want to distribute this + manual separately from the collection, you can do so by + adding a copy of the license to the manual, as described in + section 6 of the license. + + + + Many of the names used by companies to distinguish their + products and services are claimed as trademarks. Where those + names appear in any GNOME documentation, and the members of + the GNOME Documentation Project are made aware of those + trademarks, then the names are in capital letters or initial + capital letters. + + + + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED + UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE + WITH THE FURTHER UNDERSTANDING THAT: + + + + DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR + IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES + THAT THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR + A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE + RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE + OF THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR + MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY + CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY + SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS + LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED + VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER + EXCEPT UNDER THIS DISCLAIMER; AND + + + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL + THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), + CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, + INITIAL WRITER, ANY CONTRIBUTOR, OR ANY + DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION + OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH + PARTIES, BE LIABLE TO ANY PERSON FOR ANY + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER + INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS + OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR + MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR + LOSSES ARISING OUT OF OR RELATING TO USE OF THE + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, + EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF + THE POSSIBILITY OF SUCH DAMAGES. + + + + + + \ Kein Zeilenumbruch am Dateiende. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/spectra/gspectrum-0.10.omf.in gnome-chemistry-utils-0.10.9/docs/help/spectra/gspectrum-0.10.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/spectra/gspectrum-0.10.omf.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/spectra/gspectrum-0.10.omf.in 2009-11-14 11:46:33.000000000 +0100 @@ -0,0 +1,10 @@ + + + + + manual + + + + + diff -Nru gnome-chemistry-utils-0.8.6/docs/help/spectra/Makefile.am gnome-chemistry-utils-0.10.9/docs/help/spectra/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/help/spectra/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/spectra/Makefile.am 2009-11-14 11:30:36.000000000 +0100 @@ -0,0 +1,12 @@ +AUTOMAKE_OPTIONS = -Wno-portability + +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml + +include $(top_srcdir)/gnome-doc-utils.make +dist-hook: doc-dist-hook + +DOC_MODULE = gspectrum-@GCU_API_VER@ +DOC_ENTITIES = legal.xml +DOC_INCLUDES = + +DOC_LINGUAS = diff -Nru gnome-chemistry-utils-0.8.6/docs/help/spectra/Makefile.in gnome-chemistry-utils-0.10.9/docs/help/spectra/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/help/spectra/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/spectra/Makefile.in 2009-11-14 11:46:00.000000000 +0100 @@ -0,0 +1,999 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# gnome-doc-utils.make - make magic for building documentation +# Copyright (C) 2004-2005 Shaun McCance +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +################################################################################ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/gnome-doc-utils.make +subdir = docs/help/spectra +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +AUTOMAKE_OPTIONS = -Wno-portability +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml +_clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) +_DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) +_DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ + $(filter $(LINGUAS),$(DOC_LINGUAS)), \ + $(DOC_LINGUAS)) + +_DOC_ABS_SRCDIR = @abs_srcdir@ +_xml2po_mode = $(if $(DOC_ID),mallard,docbook) +@ENABLE_SK_TRUE@_ENABLE_SK = true + +################################################################################ +db2omf_args = \ + --stringparam db2omf.basename $(DOC_MODULE) \ + --stringparam db2omf.format $(3) \ + --stringparam db2omf.dtd \ + $(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 \ + | sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \ + --stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \ + --stringparam db2omf.omf_dir "$(OMF_DIR)" \ + --stringparam db2omf.help_dir "$(HELP_DIR)" \ + --stringparam db2omf.omf_in "$(_DOC_OMF_IN)" \ + $(if $(_ENABLE_SK), \ + --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)") \ + $(_db2omf) $(2) + +_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in)) +_DOC_OMF_DB = $(if $(_DOC_OMF_IN), \ + $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf)) + +_DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \ + $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf)) + + +# FIXME +_DOC_OMF_ALL = \ + $(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \ + $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML)) + + +################################################################################ +_DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) +_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) +_DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) +_DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) +_DOC_C_DOCS = \ + $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) $(_DOC_C_MODULE) + +_DOC_C_DOCS_NOENT = \ + $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) + +_DOC_C_FIGURES = $(if $(DOC_FIGURES), \ + $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ + $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png))) + + +# FIXME: probably have to shell escape to determine the file names +_DOC_C_HTML = $(foreach f, \ + $(shell xsltproc --xinclude \ + --stringparam db.chunk.basename "$(DOC_MODULE)" \ + $(_chunks) "C/$(DOC_MODULE).xml"), \ + C/$(f).xhtml) + + +############################################################################### +_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) + +_DOC_LC_MODULES = $(if $(DOC_MODULE), \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) + +_DOC_LC_PAGES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ + $(lc)/$(notdir $(page)) )) + +_DOC_LC_INCLUDES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ + $(lc)/$(notdir $(inc)) )) + + +# FIXME: probably have to shell escape to determine the file names +_DOC_LC_HTML = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \ + $(lc)/$(notdir $(doc)) )) + +_DOC_LC_DOCS = \ + $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ + $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) + +_DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ + $(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) ) + +_DOC_SRC_FIGURES = \ + $(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS), \ + $(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) )) + +_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot) + +################################################################################ +_DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \ + $(_DOC_C_HTML) $(_DOC_LC_HTML)) + +_DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml) +_clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) +_clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) +_clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) +_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) +_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) +DOC_MODULE = gspectrum-@GCU_API_VER@ +DOC_ENTITIES = legal.xml +DOC_INCLUDES = +DOC_LINGUAS = +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gnome-doc-utils.make $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/spectra/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/help/spectra/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool \ + mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local dist-hook distclean distclean-generic \ + distclean-libtool distclean-local distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-local + + +DOC_H_FILE ?= + +DOC_H_DOCS ?= + +$(DOC_H_FILE): $(DOC_H_DOCS); + @rm -f $@.tmp; touch $@.tmp; + echo 'const gchar* documentation_credits[] = {' >> $@.tmp + list='$(DOC_H_DOCS)'; for doc in $$list; do \ + xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ + if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ + xsltproc --path "$$xmlpath" $(_credits) $$doc; \ + done | sort | uniq \ + | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \ + | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp + echo ' NULL' >> $@.tmp + echo '};' >> $@.tmp + echo >> $@.tmp + list='$(DOC_H_DOCS)'; for doc in $$list; do \ + xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ + if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ + docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \ + | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \ + echo $$xmlpath; \ + ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \ + for id in $$ids; do \ + echo '#define HELP_'`echo $$docid`'_'`echo $$id \ + | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \ + done; \ + echo >> $@.tmp; \ + done; + cp $@.tmp $@ && rm -f $@.tmp + +dist-check-gdu: +@HAVE_GNOME_DOC_UTILS_FALSE@ @echo "*** GNOME Doc Utils must be installed in order to make dist" +@HAVE_GNOME_DOC_UTILS_FALSE@ @false + +.PHONY: dist-doc-header +dist-doc-header: $(DOC_H_FILE) + @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \ + echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \ + $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)"; + +doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header) + +.PHONY: clean-doc-header +clean-local: $(_clean_doc_header) +distclean-local: $(_clean_doc_header) +mostlyclean-local: $(_clean_doc_header) +maintainer-clean-local: $(_clean_doc_header) +clean-doc-header: + rm -f $(DOC_H_FILE) + +all: $(DOC_H_FILE) + +################################################################################ + +DOC_MODULE ?= + +DOC_ID ?= + +DOC_PAGES ?= + +DOC_ENTITIES ?= + +DOC_INCLUDES ?= + +DOC_FIGURES ?= + +DOC_FORMATS ?= docbook + +DOC_LINGUAS ?= + +################################################################################ + +_xml2po ?= `which xml2po` + +_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` +_db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` +_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` +_chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl +_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl +_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl +@ENABLE_SK_TRUE@_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir` +@ENABLE_SK_TRUE@_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir` +@ENABLE_SK_TRUE@_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml + +$(_DOC_OMF_DB) : $(_DOC_OMF_IN) +$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml + @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ + echo "The file '$(_skcontentslist)' does not exist." >&2; \ + echo "Please check your ScrollKeeper installation." >&2; \ + exit 1; } + xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; } + +$(_DOC_OMF_HTML) : $(_DOC_OMF_IN) +$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml +@ENABLE_SK_TRUE@ @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ +@ENABLE_SK_TRUE@ echo "The file '$(_skcontentslist)' does not exist" >&2; \ +@ENABLE_SK_TRUE@ echo "Please check your ScrollKeeper installation." >&2; \ +@ENABLE_SK_TRUE@ exit 1; } + xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; } + +.PHONY: omf +omf: $(_DOC_OMF_ALL) + +.PHONY: po +po: $(_DOC_POFILES) + +$(_DOC_POFILES): + @if ! test -d $(dir $@); then \ + echo "mkdir $(dir $@)"; \ + mkdir "$(dir $@)"; \ + fi + @if test ! -f $@ -a -f $(srcdir)/$@; then \ + echo "cp $(srcdir)/$@ $@"; \ + cp "$(srcdir)/$@" "$@"; \ + fi; + @docs=; \ + list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \ + docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \ + done; \ + if ! test -f $@; then \ + echo "(cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ + cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ + (cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ + cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ + else \ + echo "(cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ + (cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ + fi + +# FIXME: fix the dependancy +# FIXME: hook xml2po up +$(_DOC_LC_DOCS) : $(_DOC_POFILES) +$(_DOC_LC_DOCS) : $(_DOC_C_DOCS) + if ! test -d $(dir $@); then mkdir $(dir $@); fi + if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ + po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \ + if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \ + (cd $(dir $@) && \ + $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \ + "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ + cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) +.PHONY: pot +pot: $(_DOC_POT) +$(_DOC_POT): $(_DOC_C_DOCS_NOENT) + $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ + +$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) + xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) + +################################################################################ + +all: \ + $(_DOC_C_DOCS) $(_DOC_LC_DOCS) \ + $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ + $(_DOC_HTML_ALL) $(_DOC_POFILES) + +################################################################################ + +.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir + +clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) +clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML) +clean-doc-lc: + rm -f $(_DOC_LC_DOCS) + @list='$(_DOC_POFILES)'; for po in $$list; do \ + if ! test "$$po" -ef "$(srcdir)/$$po"; then \ + echo "rm -f $$po"; \ + rm -f "$$po"; \ + fi; \ + done + @for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc/.xml2po.mo"; then \ + echo "rm -f $$lc/.xml2po.mo"; \ + rm -f "$$lc/.xml2po.mo"; \ + fi; \ + done +clean-doc-dir: clean-doc-lc + @for lc in C $(_DOC_REAL_LINGUAS); do \ + for dir in `find $$lc -depth -type d`; do \ + if ! test $$dir -ef $(srcdir)/$$dir; then \ + echo "rmdir $$dir"; \ + rmdir "$$dir"; \ + fi; \ + done; \ + done + +clean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) +distclean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) +mostlyclean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) +maintainer-clean-local: \ + $(_clean_omf) $(_clean_dsk) \ + $(_clean_lc) $(_clean_dir) + +################################################################################ + +.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk +doc-dist-hook: \ + $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ + $(if $(_DOC_C_FIGURES),dist-doc-figs) \ + $(if $(_DOC_OMF_IN),dist-doc-omf) +# $(if $(_DOC_DSK_IN),dist-doc-dsk) + +dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES) + @for lc in C $(_DOC_REAL_LINGUAS); do \ + echo " $(mkinstalldirs) $(distdir)/$$lc"; \ + $(mkinstalldirs) "$(distdir)/$$lc"; \ + done + @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \ + for doc in $$list; do \ + if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ + docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + if ! test -d "$(distdir)/$$docdir"; then \ + echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ + $(mkinstalldirs) "$(distdir)/$$docdir"; \ + fi; \ + echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ + $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ + done + +dist-doc-figs: $(_DOC_SRC_FIGURES) + @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \ + for fig in $$list; do \ + if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$fig"; then \ + figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + if ! test -d "$(distdir)/$$figdir"; then \ + echo "$(mkinstalldirs) $(distdir)/$$figdir"; \ + $(mkinstalldirs) "$(distdir)/$$figdir"; \ + fi; \ + echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \ + $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \ + fi; \ + done; + +dist-doc-omf: + @if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \ + echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \ + $(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))" + +dist-doc-dsk: + @if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \ + echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ + $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" + +################################################################################ + +.PHONY: check-doc-docs check-doc-omf +check: \ + $(if $(DOC_MODULE),check-doc-docs) \ + $(if $(DOC_ID),check-doc-pages) \ + $(if $(_DOC_OMF_IN),check-doc-omf) + +check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) + @for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ + done + +check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) + for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + for page in $(DOC_PAGES); do \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ + done; \ + done + +check-doc-omf: $(_DOC_OMF_ALL) + @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ + echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ + xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ + done + +################################################################################ + +.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk + +install-data-local: \ + $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ + $(if $(_DOC_HTML_ALL),install-doc-html) \ + $(if $(_DOC_C_FIGURES),install-doc-figs) \ + $(if $(_DOC_OMF_IN),install-doc-omf) +# $(if $(_DOC_DSK_IN),install-doc-dsk) + +install-doc-docs: + @for lc in C $(_DOC_REAL_LINGUAS); do \ + echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ + $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ + done + @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ + if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ + docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ + if ! test -d "$$docdir"; then \ + echo "$(mkinstalldirs) $$docdir"; \ + $(mkinstalldirs) "$$docdir"; \ + fi; \ + echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ + done + +install-doc-figs: + @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ + for lc in C $(_DOC_REAL_LINGUAS); do \ + figsymlink=false; \ + if test -f "$$lc/$$fig"; then \ + figfile="$$lc/$$fig"; \ + elif test -f "$(srcdir)/$$lc/$$fig"; then \ + figfile="$(srcdir)/$$lc/$$fig"; \ + else \ + figsymlink=true; \ + fi; \ + figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ + figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ + if ! test -d "$$figdir"; then \ + echo "$(mkinstalldirs) $$figdir"; \ + $(mkinstalldirs) "$$figdir"; \ + fi; \ + figbase=`echo $$fig | sed -e 's/^.*\///'`; \ + if $$figsymlink; then \ + echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ + ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ + else \ + echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ + $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + fi; \ + done; \ + done + +install-doc-html: + echo install-html + +install-doc-omf: + $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) + @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ + echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ + done + @if test "x$(_ENABLE_SK)" = "xtrue"; then \ + echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + fi; + +install-doc-dsk: + echo install-dsk + +################################################################################ + +.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk +uninstall-local: \ + $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ + $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ + $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ + $(if $(_DOC_OMF_IN),uninstall-doc-omf) +# $(if $(_DOC_DSK_IN),uninstall-doc-dsk) + +uninstall-doc-docs: + @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ + echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + done + +uninstall-doc-figs: + @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ + echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + done; + +uninstall-doc-omf: + @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ + if test "x$(_ENABLE_SK)" = "xtrue"; then \ + echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + fi; \ + echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + done + +dist-hook: doc-dist-hook + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/add-plot.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/add-plot.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/atomic-radii.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/atomic-radii.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/blocs.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/blocs.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/choose-data.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/choose-data.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/curve.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/curve.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/elec.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/elec.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/electronegativity.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/electronegativity.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/family.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/family.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/graph-guru.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/graph-guru.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/main.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/main.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/new-chart-guru.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/new-chart-guru.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/new-chart.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/new-chart.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/page-setup.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/page-setup.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/print-scale.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/print-scale.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/radii.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/radii.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/start.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/start.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/state.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/state.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/help/table/C/figures/thermo.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/help/table/C/figures/thermo.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/docs/help/table/C/gchemtable-0.10.xml gnome-chemistry-utils-0.10.9/docs/help/table/C/gchemtable-0.10.xml --- gnome-chemistry-utils-0.8.6/docs/help/table/C/gchemtable-0.10.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/table/C/gchemtable-0.10.xml 2009-11-14 11:46:33.000000000 +0100 @@ -0,0 +1,674 @@ + + + + + + +]> + + + + &app; manual + + + + &app; Manual V&manrevision; + + 2006 + Jean Bréfort + + + + + &legal; + + + GNOME Documentation Project + + + + + Jean + Bréfort + +
jean.brefort@normalesup.org
+
+
+ +
+ + + + + + + &app; Manual V&manrevision; + &date; + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + &app; Manual V0.8.0 + February 2007 + + Jean Bréfort + jean.brefort@normalesup.org + GNOME Documentation Project + + + + This manual describes version &appversion; of &app;. + + + Feedback + To report a bug or make a suggestion regarding the &app; application or + this manual, go to the + &app; home page. + + + + + &app; is a chemistry elements periodic table application. + +
+ + + + + + Introduction + The &app; application is a chemical + elements periodic table application. It provides scientific information + on the elements and multiple table color schemes. + + + + + Getting started + + To Start <application>&app;</application> + You can start &app; in the following ways: + + + Applications menu + + Choose + + Education + Periodic table of the elements + . + + + + Command line + + Type gchemtable, then press Return. + + + + + + + When You Start <application>&app;</application> + When you start &app;, the following window is displayed: +
+ &app; window + + + + Screenshot of the &app;window. + + + + + +
+ + The &app; window contains the following + elements: + + Menubar + + The menus on the menubar contain all of the commands you need + to work with &app;. + + + Periodic table + + A periodic table of the elements. The colors used for + the buttons are conventional colors for the elements. Other + color schemes are also available, as explained + later. + + + +
+
+ + + + Usage + + Color Schemes + Several color schemes are available: + + No colors + + All buttons are grey. + + + Default + + Conventional colors are used. + + + Physical state + + The color of the button depends on the + physical state (solid, liquid, or gas) of the element at a given temperature. + This temperature can be changed using the horizontal scale. +
+ Physical state color scheme + + + + Screenshot of the Main Page with Physical state color scheme. + + + + + +
+ Elements with a black background indicate that the state is + unknown at the given temperature. +
+
+ Family + + The data used are the element family as given in the + Blue Obelisk Data Repository. +
+ Family color scheme + + + + Screenshot of the Main Page with Physical state color scheme. + + + + + +
+ If a family is selected, only elements of this family + will be displayed with their family color used as a background. Other elements + will have a black background. +
+
+ Electronegativity + + The data used are the Pauling electronegativity as given in the + Blue Obelisk Data Repository. + Colors go from red (lowest electronegativity) to blue (highest electronegativity). + If no data is available in the database, the element will have a black background. + +
+ Electronegativity color scheme + + + + Screenshot of the Main Page with Electronegativity color scheme. + + + + + +
+
+
+ Atomic radius + + The data used are the atomic radii as given in the + Blue Obelisk Data Repository. + Colors go from red (lowest radius) to blue (largest radius). + If no data is available in the database, the element will have a black background. +
+ Atomic radius color scheme + + + + Screenshot of the Main Page with Atomic radius color scheme. + + + + + +
+
+
+ Block + + Elements buttons are colored according to the block (s, p, d, or f) + to which the element belongs +
+ Block color scheme + + + + Screenshot of the Main Page with Block color scheme. + + + + + +
+
+
+
+ +
+ + Element Window + This window shows the data for an element. To display it, + press the corresponding element button in the periodic table. + It is possible to display several element windows at once. + The data are spread over several pages, the following + screenshots show the various pages for iron: + + Main Page + +
+ Main Page + + + + Screenshot of the Main Page. + + + + + +
+
+
+ Electronic Properties + +
+ Electronic Properties Page + + + + Screenshot of the Electronic Properties Page. + + + + + +
+
+
+ Radii + +
+ Radii Page + + + + Screenshot of the Radii Page. + + + + + +
+
+
+ Thermodynamic Properties + +
+ Thermodynamic Properties Page + + + + Screenshot of the Thermodynamic Properties Page. + + + + + +
+
+
+
+ When a Show curve button appears on the same line + as data, it is possible to display a chart of this data as a function + of the element atomic number by clicking on the button. +
+
+ + Charts + + Pre-defined Charts + When you click on the Show curve button in the + element window you obtain a chart such as: +
+ First ionization energy curve + + + + Screenshot of the first ionization energy curve. + + + + + +
+ Consecutive points are joined by a segment. The absence of a segment + means that at least one data point is missing. + Charts can be customized as explained in the next section. +
+ + Customize Charts + To customize a chart, choose File + Properies in the chart window menu. + The following dialog pops up: + +
+ Chart properties dialog. + + + + Screenshot of the chart properties dialog. + + + + + +
+ The main elements in this dialog are: + + The graph hierarchy tree. + + The graph hierarchy tree (top left) displays the current + graph components and their hierarchy. The hierarchy can be modified + using the buttons just below it. + + + The graph preview. + + The graph preview (top right) shows the result of the modifications + and displays a scaled version of the graph you will get when you + apply the changes. + + + The Add button. + + The Add button allows for insertion of new + components into the hierarchy. Note that the list of available components + to add depends on the object selected. + + + The arrow buttons. + + The arrow buttons can be used to modify the order of + child objects of the same parent. These buttons are only available when ordering + makes sense for the currently selected object. If you have, say, two + charts in the graph, you can change the order in the hierarchy, + and this will affect the order in which they are displayed. + + + The Delete button. + + Clicking the Delete button destroys + the selected graph component and all its children. The button is + not available when the component can't be removed. + These deletions + can't be undone, so be careful. + + + The component properties notebook. + + The component properties notebook (bottom) shows all the + properties you can set for the current component. + + + + + The window title can't be changed, so if you customize a pre-defined + chart, the title may no longer reflect what is displayed in the window. + &app; does not check the validity of the charts. + It is possible add titles and labels not corresponding to the data actually used, in which case the + resulting charts will not make sense. + Some features appearing in the dialog, such as error bars are not currently + supported by &app;. +
+ + User Defined Charts + A user can create a new empty plot, and then customize it as explained + in the previous section. + To create a new empty plot, choose File + New Chart. This will open two new windows: + one containing the new chart, and one containing the chart properties dialog. +
+ New empty chart window + + + + Screenshot of the new chart. + + + + + +
+
+ New empty chart properties dialog + + + + Screenshot of the new chart properties dialog. + + + + + +
+ The graph contains just one empty chart. In most cases, the first thing to + do is to add a new plot using the Add button as seen in next + screenshot: +
+ Adding a plot + + + + Adding a plot to the chart. + + + + + +
+ This adds not only a plot, but also a backplane, the two needed axes, + and a data series to the plot. + You can then select the data to use for the new series. Only predefined + data vectors can be used. If X values are not selected, an integer series + starting from 0 will be used; that is the atomic number minus one. +
+ Data selection + + + + Selecting data for the series. + + + + + +
+ Further customization is explained in the previous section. +
+ + To Copy a Chart + To copy the chart, choose + Edit Copy + and then paste into the target application. Charts will be copied as native graphs to + Abiword or as svg or png data to other applications which support such formats. + + + To Export a Chart as an Image + To export the displayed chart to an image, use + File Save As Image + . + Available formats are SVG, EPS, PS, PDF, and formats that support writing in GdkPixbuf. + To choose a format, you can use an appropriate file name extension, + or explicitly select a format in the combo box. + With the first method, if &app; does + not recognize an extension, the exported file will be a SVG + file. &app; will add an extension + to the file name if needed. + You might change the default width and height of the exported image + using the appropriate entries. + Postscript and PDF files can also be produced using the + File Print... + command. + + + To Print a Chart + To print the chart, choose + File Print... + . + File Preview + opens a window with a preview of the printed output. + To tune the printed output, choose + File Page setup... + as explained below. + + The page setup dialog. + The first tab of the dialog concerns the paper and margins setup. + Headers and footers are not supported in the version of &app; +
+ The Page Setup tab. + + + + Screenshot of page setup dialog. + + + + + +
+ The second tab allows you to choose the scale of the output. With no scaling or + scaling at 100%, the output will have the same size in points as the size in pixels on + the screen. If you choose automatic scaling, you can make the output fill the available + space either horizontally, vertically, or both (unchecking both options is equivalent to no scaling). + Printing to more than one page is not supported in this version of &app; +
+ The Print Scale tab. + + + + Screenshot of the printing scale page. + + + + + +
+
+
+
+ + + Support. + + To Ask a Question + If you choose Help Ask a question, + your mail client should pop up with a new message to the Gnome Chemistry Utils + mailing list. + Another way to get some help is to connect on the #gchemutils IRC channel + on the irc.gimp.net network and ask your question there (if you are not alone on the channel). + + + To Find the Gnome Chemistry Utils on the Web. + If you choose Help Gnome Chemistry Utils on the web, + the default web browser should pop up and display the main page for the Gnome Chemsitry Utils. + The main page is + http://gchemutils.nongnu.org and the project + page at Savannah http://savannah.nongnu.org/projects/gchemutils. + + + To Report a Bug + To report a bug, you must use the bug page for the Gnome Chemistry + Utils at Savannah. You can access it by choosing + Help Report Bugs + (hopefully you'll have only one at a time to report). + You can also use a web browser to go to the bug report page address directly. The bug repository is at + https://savannah.nongnu.org/bugs/?group=gchemutils + + + + + + + License + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU + General Public License as + published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. + + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + A copy of the GNU General Public License is + included as an appendix to the GNOME Users + Guide. You may also obtain a copy of the + GNU General Public License from the Free + Software Foundation by visiting their Web site or by writing to +
+ Free Software Foundation, Inc. + 51 Franklin St - Fifth Floor + Boston, MA 02111-1307 + USA +
+
+
+ +
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/table/C/gchemtable.xml gnome-chemistry-utils-0.10.9/docs/help/table/C/gchemtable.xml --- gnome-chemistry-utils-0.8.6/docs/help/table/C/gchemtable.xml 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/table/C/gchemtable.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,364 +0,0 @@ - - - - - - -]> - - - - &app; manual - - - - &app; Manual V&manrevision; - - 2006 - Jean Bréfort - - - - - &legal; - - - GNOME Documentation Project - - - - - Jean - Bréfort - -
jean.brefort@normalesup.org
-
-
- -
- - - - - - - &app; Manual V&manrevision; - &date; - - Jean Bréfort - jean.brefort@normalesup.org - GNOME Documentation Project - - - - This manual describes version &appversion; of &app;. - - - Feedback - To report a bug or make a suggestion regarding the &app; application or - this manual, go to the - &app; home page. - - - - - &app; is a chemistry elements periodic table application. - -
- - - - - - Introduction - The &app; application is a chemical - elements periodic table application. - - - - - Getting started - - To Start <application>&app;</application> - You can start &app; in the following ways: - - - Applications menu - - Choose - - Education - Periodic table of the elements - . - - - - Command line - - Type gchemtable, then press Return. - - - - - - - When You Start <application>&app;</application> - When you start &app;, the following window is displayed: -
- &app; window - - - - Screenshot of the &app;window. - - - - - -
- - The &app; window contains the following - elements: - - Menubar - - The menus on the menubar contain all of the commands you need - to work with &app;. - - - Periodic table - - A periodic table of the elements. The colors used for - the buttons are conventional colors for the elements. Other - color schemes are available as explained - there. - - - -
-
- - - - Usage - - Color Schemes - Several color schemes are available: - - No colors - - All buttons are grey. - - - Default - - Conventional colors are used. - - - Physical state - - The color of the button depends on the - physical state of the element at a given temperature. - This temperature can be changed using the horizontal scale. -
- Physical state color scheme - - - - Screenshot of the Main Page with Physical state color scheme. - - - - - -
- Buttons with a black background indicate that the state is - unknown at the given temperature. -
-
- Family - - The data used are the element family as given in the - Blue Obelisk Data Repository. - If no family is given in the database, the button will have a black background. -
- Family color scheme - - - - Screenshot of the Main Page with Physical state color scheme. - - - - - -
- If a family is selected in the combo box, only elements of this family - will be displayed with their family color used as background, other elements - are attributed a black background. -
-
-
- -
- - Element Window - This window shows the data for an element. To display it, - press the corresponding element button in the periodic table. - It is possible to display several such windows at once. - The data are spread over several pages, the following - screenshots show the various pages for the iron element: - - Main Page - -
- Main Page - - - - Screenshot of the Main Page. - - - - - -
-
-
- Electronic Properties - -
- Electronic Properties Page - - - - Screenshot of the Electronic Properties Page. - - - - - -
-
-
- Radii - -
- Radii Page - - - - Screenshot of the Radii Page. - - - - - -
-
-
- Thermodynamic Properties - -
- Thermodynamic Properties Page - - - - Screenshot of the Thermodynamic Properties Page. - - - - - -
-
-
-
- When a Show curve appears on the same line - than a data, it is possible to display a chart of this data as a function - of the element atomic number by clicking on the button. -
- - Curves - Curves as displayed in &app; look like: -
- First ionization energy curve - - - - Screenshot of the first ionization energy curve. - - - - - -
- Consecutive points are joined by a segment. The absence of a segment - means that at least one data is missing. - The chart can be copied to other applications with the use of the Copy - button. -
-
- - - - - License - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU - General Public License as - published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later - version. - - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - - A copy of the GNU General Public License is - included as an appendix to the GNOME Users - Guide. You may also obtain a copy of the - GNU General Public License from the Free - Software Foundation by visiting their Web site or by writing to -
- Free Software Foundation, Inc. - 51 Franklin St - Fifth Floor - Boston, MA 02111-1307 - USA -
-
-
- -
diff -Nru gnome-chemistry-utils-0.8.6/docs/help/table/gchemtable-0.10.omf.in gnome-chemistry-utils-0.10.9/docs/help/table/gchemtable-0.10.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/table/gchemtable-0.10.omf.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/table/gchemtable-0.10.omf.in 2009-11-14 11:46:33.000000000 +0100 @@ -0,0 +1,10 @@ + + + + + manual + + + + + diff -Nru gnome-chemistry-utils-0.8.6/docs/help/table/gchemtable.omf.in gnome-chemistry-utils-0.10.9/docs/help/table/gchemtable.omf.in --- gnome-chemistry-utils-0.8.6/docs/help/table/gchemtable.omf.in 2008-01-25 21:09:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/table/gchemtable.omf.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ - - - - - manual - - - - - diff -Nru gnome-chemistry-utils-0.8.6/docs/help/table/Makefile.am gnome-chemistry-utils-0.10.9/docs/help/table/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/help/table/Makefile.am 2007-05-07 14:58:20.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/help/table/Makefile.am 2009-11-14 11:30:36.000000000 +0100 @@ -1,11 +1,11 @@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml include $(top_srcdir)/gnome-doc-utils.make dist-hook: doc-dist-hook -DOC_MODULE = gchemtable +DOC_MODULE = gchemtable-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = diff -Nru gnome-chemistry-utils-0.8.6/docs/help/table/Makefile.in gnome-chemistry-utils-0.10.9/docs/help/table/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/help/table/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/help/table/Makefile.in 2009-11-14 11:46:00.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -39,8 +40,9 @@ ################################################################################ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -66,6 +68,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -73,7 +76,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -93,26 +95,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -122,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -163,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -182,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -193,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -231,24 +256,33 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ AUTOMAKE_OPTIONS = -Wno-portability -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in $(DOC_MODULE).omf.in C/$(DOC_MODULE).xml _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ @@ -256,6 +290,7 @@ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ +_xml2po_mode = $(if $(DOC_ID),mallard,docbook) @ENABLE_SK_TRUE@_ENABLE_SK = true ################################################################################ @@ -289,14 +324,16 @@ ################################################################################ _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) +_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ - $(_DOC_C_MODULE) + $(_DOC_C_PAGES) $(_DOC_C_MODULE) _DOC_C_DOCS_NOENT = \ - $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) + $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ + $(_DOC_C_PAGES) _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ @@ -312,12 +349,16 @@ ############################################################################### -_DOC_POFILES = $(if $(DOC_MODULE), \ +_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) +_DOC_LC_PAGES = \ + $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ + $(lc)/$(notdir $(page)) )) + _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) @@ -329,7 +370,7 @@ $(lc)/$(notdir $(doc)) )) _DOC_LC_DOCS = \ - $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) \ + $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ @@ -349,8 +390,9 @@ _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) -_clean_dir = $(if $(DOC_MODULE),clean-doc-dir) -DOC_MODULE = gchemtable +_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) +_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) +DOC_MODULE = gchemtable-@GCU_API_VER@ DOC_ENTITIES = legal.xml DOC_INCLUDES = DOC_LINGUAS = @@ -361,14 +403,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/table/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/help/table/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/help/table/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/help/table/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -386,6 +428,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -415,13 +458,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -452,6 +499,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -471,6 +519,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -479,18 +529,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -587,6 +647,10 @@ DOC_MODULE ?= +DOC_ID ?= + +DOC_PAGES ?= + DOC_ENTITIES ?= DOC_INCLUDES ?= @@ -603,6 +667,7 @@ _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` +_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl @@ -647,16 +712,16 @@ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ - $(_xml2po) -e $$docs > $(notdir $@).tmp && \ + $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs)"; \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ - $(_xml2po) -e -u $(notdir $@) $$docs); \ + $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi # FIXME: fix the dependancy @@ -665,15 +730,16 @@ $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) if ! test -d $(dir $@); then mkdir $(dir $@); fi if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ + po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \ + if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \ (cd $(dir $@) && \ - $(_xml2po) -e -p \ - "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \ + $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) - $(_xml2po) -e -o $@ $^ + $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) @@ -685,6 +751,8 @@ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) +################################################################################ + .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) @@ -703,7 +771,7 @@ rm -f "$$lc/.xml2po.mo"; \ fi; \ done -clean-doc-dir: +clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ @@ -726,10 +794,12 @@ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) -.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk -doc-dist-hook: \ - $(if $(DOC_MODULE),dist-doc-docs) \ - $(if $(_DOC_C_FIGURES),dist-doc-figs) \ +################################################################################ + +.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk +doc-dist-hook: \ + $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ + $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) @@ -775,9 +845,12 @@ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" +################################################################################ + .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ + $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @@ -793,15 +866,33 @@ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done +check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) + for lc in C $(_DOC_REAL_LINGUAS); do \ + if test -f "$$lc"; \ + then d=; \ + xmlpath="$$lc"; \ + else \ + d="$(srcdir)/"; \ + xmlpath="$$lc:$(srcdir)/$$lc"; \ + fi; \ + for page in $(DOC_PAGES); do \ + echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ + xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ + done; \ + done + check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ - xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ + echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ + xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done +################################################################################ + .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk + install-data-local: \ - $(if $(DOC_MODULE),install-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) @@ -809,42 +900,46 @@ install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ - echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \ - $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \ + echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ + $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - docdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$docdir"; \ + docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ - echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \ + echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ + figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ - elif test -f "C/$$fig"; then \ - figfile="C/$$fig"; \ else \ - figfile="$(srcdir)/C/$$fig"; \ + figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ - figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \ + figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ - echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ - $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + if $$figsymlink; then \ + echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ + ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ + else \ + echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ + $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + fi; \ done; \ done @@ -852,22 +947,24 @@ echo install-html install-doc-omf: - $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE) + $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ - echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \ + echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ - scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \ + echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ + scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk +################################################################################ + .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ - $(if $(DOC_MODULE),uninstall-doc-docs) \ + $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) @@ -875,27 +972,28 @@ uninstall-doc-docs: @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ - echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \ + echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ - echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ - rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \ + echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ + rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ - echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ - echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ - rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \ + echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ + rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done dist-hook: doc-dist-hook + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/docs/Makefile.in gnome-chemistry-utils-0.10.9/docs/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/Makefile.in 2008-01-25 21:06:18.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/Makefile.in 2009-11-14 11:45:59.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -52,15 +55,42 @@ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -80,26 +110,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -109,35 +142,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -150,14 +169,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -169,6 +195,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -180,31 +208,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -218,22 +271,31 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ SUBDIRS = help man reference MAINTAINERCLEANFILES = Makefile.in all: all-recursive @@ -243,14 +305,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -268,6 +330,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -299,7 +362,7 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -333,16 +396,16 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -350,14 +413,14 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -369,39 +432,43 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -422,29 +489,44 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -474,6 +556,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -493,6 +576,8 @@ html: html-recursive +html-am: + info: info-recursive info-am: @@ -501,18 +586,28 @@ install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -533,8 +628,8 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -550,6 +645,7 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchem3d.1 gnome-chemistry-utils-0.10.9/docs/man/gchem3d.1 --- gnome-chemistry-utils-0.8.6/docs/man/gchem3d.1 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/man/gchem3d.1 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,81 @@ +.\" Title: gchem3d +.\" Author: Jean Br\('efort +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: $Date: 2008-09-01 21:46:41 +0200 (lun 01 sep 2008) $ +.\" Manual: gnome-chemistry-utils +.\" Source: gcu 0.10 +.\" +.TH "GCHEM3D" "1" "$Date: 2008\-09\-01 21:46:41 +0200 (lun 01 sep 2008) $" "gcu 0.10" "gnome-chemistry-utils" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +gchem3d \- a small chemical viewer application +.SH "SYNOPSIS" +.HP 8 +\fBgchem3d\fR [\fBOPTION(S)\fR...] [\fIFILE\fR...] +.SH "DESCRIPTION" +.PP +\fBgchem3d\fR +is a small chemical viewer application, which can show several chemical file formats\&. +.SH "OPTIONS" +.PP +The following options are accepted: +.PP +\fB\-b \fR\fB\fICOLOR\fR\fR, \fB\-\-bgcolor=\fR\fB\fICOLOR\fR\fR +.RS 4 +Use the given color as background color\&. +\fICOLOR\fR +can be one of +"\fIblack\fR" (default), "\fIwhite\fR", "\fI#rrggbb\fR" (don\'t forget to escape the \(lq#\(rq character in the shell)\&. +.RE +.PP +\fB\-d \fR\fB\fIMODEL\fR\fR, \fB\-\-display3d=\fR\fB\fIMODEL\fR\fR +.RS 4 +Choose how molecules are displayed\&. +\fIMODEL\fR +can be one of +"\fIBallnStick\fR" (default), "\fISpaceFill\fR"\&. +.RE +.PP +\fB\-?\fR, \fB\-\-help\fR +.RS 4 +Show application help options\&. +.RE +.PP +\fB\-\-help\-all\fR, \fB\-\-help\-*\fR +.RS 4 +Print all or just a group of help options\&. These options are not documented here\&. Instead see +\fBgtk-options\fR(7) +and +\fBgnome-options\fR(7)\&. +.RE +.PP +\fB\-v\fR, \fB\-\-version\fR +.RS 4 +Print gchem3d version information\&. +.RE +.SH "SEE ALSO" +.PP +\fBgnome-options\fR(7), +\fBgtk-options\fR(7) +.SH "AUTHORS" +.PP +\fBJean Br\('efort\fR <\&jean\&.brefort@normalesup\&.org\&> +.sp -1n +.IP "" 4 +Program author\&. +.PP +\fBDaniel Leidert\fR <\&daniel\&.leidert@wgdd\&.de\&> +.sp -1n +.IP "" 4 +Manpage author\&. +.SH "COPYRIGHT" +Copyright \(co 2002-2007 Jean Br\('efort +.br +Copyright \(co 2004-2007 Daniel Leidert +.br +.PP +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation\&. +.sp diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchem3d.1.xml gnome-chemistry-utils-0.10.9/docs/man/gchem3d.1.xml --- gnome-chemistry-utils-0.8.6/docs/man/gchem3d.1.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/man/gchem3d.1.xml 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,150 @@ + + +. + + This manual page is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This manual page is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this manual page; if not, write to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +--> + + + + + + + + + %_gcu_entities; +]> + + + + &dhulpackage; + &dhulapackage; + &dhedition; + &dhdate; + + + Jean + Bréfort + Program author. + +
+ jean.brefort@normalesup.org +
+
+
+ + Daniel + Leidert + Manpage author. + +
+ daniel.leidert@wgdd.de +
+
+
+
+ &dhcopyright; +
+ + &dhpackage; + &dhsection; + + + &dhpackage; + a small chemical viewer application + + + + &dhpackage; + + FILE + + + + DESCRIPTION + &dhpackage; is a small chemical viewer application, which can show several chemical file formats. + + + OPTIONS + The following options are accepted: + + + + + + Use the given color as background color. COLOR can be one of + "black" (default) + "white" + "#rrggbb" (don't forget to escape the # character in the shell) + . + + + + + + + Choose how molecules are displayed. MODEL can be one of + "BallnStick" (default) + "SpaceFill" + . + + + + + + + Show application help options. + + + + + + + Print all or just a group of help options. These options are not documented here. Instead see + gtk-options + 7 + and + gnome-options + 7 + . + + + + + + + Print &dhpackage; version information. + + + + + + SEE ALSO + + gnome-options + 7 + , + gtk-options + 7 + + +
diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchem3d-viewer.1 gnome-chemistry-utils-0.10.9/docs/man/gchem3d-viewer.1 --- gnome-chemistry-utils-0.8.6/docs/man/gchem3d-viewer.1 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gchem3d-viewer.1 1970-01-01 01:00:00.000000000 +0100 @@ -1,81 +0,0 @@ -.\" Title: gchem3d-viewer -.\" Author: Jean Br\('efort -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: $Date: 2007/05/07 19:33:06 $ -.\" Manual: gnome-chemistry-utils -.\" Source: gcu 0.7.95 -.\" -.TH "GCHEM3D\-VIEWER" "1" "$Date: 2007/05/07 19:33:06 $" "gcu 0.7.95" "gnome\-chemistry\-utils" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -gchem3d\-viewer \- a small chemical viewer application -.SH "SYNOPSIS" -.HP 15 -\fBgchem3d\-viewer\fR [\fBOPTION(S)\fR...] [\fIFILE\fR] -.SH "DESCRIPTION" -.PP -\fBgchem3d\-viewer\fR -is a small chemical viewer application, which can show several chemical file formats. -.SH "OPTIONS" -.PP -The following options are accepted: -.PP -\fB\-b \fR\fB\fICOLOR\fR\fR, \fB\-\-bgcolor=\fR\fB\fICOLOR\fR\fR -.RS 4 -Use the given color as background color. -\fICOLOR\fR -can be one of -"\fIblack\fR" (default), "\fIwhite\fR", "\fI#rrggbb\fR" (don't forget to escape the \(lq#\(rq character in the shell). -.RE -.PP -\fB\-d \fR\fB\fIMODEL\fR\fR, \fB\-\-display3d=\fR\fB\fIMODEL\fR\fR -.RS 4 -Choose how molecules are displayed. -\fIMODEL\fR -can be one of -"\fIBallnStick\fR" (default), "\fISpaceFill\fR". -.RE -.PP -\fB\-?\fR, \fB\-\-help\fR -.RS 4 -Show application help options. -.RE -.PP -\fB\-\-help\-all\fR, \fB\-\-help\-*\fR -.RS 4 -Print all or just a group of help options. These options are not documented here. Instead see -\fBgtk\-options\fR(7) -and -\fBgnome\-options\fR(7). -.RE -.PP -\fB\-v\fR, \fB\-\-version\fR -.RS 4 -Print gchem3d\-viewer version information. -.RE -.SH "SEE ALSO" -.PP -\fBgnome\-options\fR(7), -\fBgtk\-options\fR(7) -.SH "AUTHORS" -.PP -\fBJean Br\('efort\fR <\&jean.brefort@normalesup.org\&> -.sp -1n -.IP "" 4 -Program author. -.PP -\fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&> -.sp -1n -.IP "" 4 -Manpage author. -.SH "COPYRIGHT" -Copyright \(co 2002\-2007 Jean Br\('efort -.br -Copyright \(co 2004\-2007 Daniel Leidert -.br -.PP -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. -.br diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchem3d-viewer.1.xml gnome-chemistry-utils-0.10.9/docs/man/gchem3d-viewer.1.xml --- gnome-chemistry-utils-0.8.6/docs/man/gchem3d-viewer.1.xml 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gchem3d-viewer.1.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,150 +0,0 @@ - - -. - - This manual page is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This manual page is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this manual page; if not, write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ---> - - - - - - - - - %_gcu_entities; -]> - - - - &dhulpackage; - &dhulapackage; - &dhedition; - &dhdate; - - - Jean - Bréfort - Program author. - -
- jean.brefort@normalesup.org -
-
-
- - Daniel - Leidert - Manpage author. - -
- daniel.leidert@wgdd.de -
-
-
-
- &dhcopyright; -
- - &dhpackage; - &dhsection; - - - &dhpackage; - a small chemical viewer application - - - - &dhpackage; - - FILE - - - - DESCRIPTION - &dhpackage; is a small chemical viewer application, which can show several chemical file formats. - - - OPTIONS - The following options are accepted: - - - - - - Use the given color as background color. COLOR can be one of - "black" (default) - "white" - "#rrggbb" (don't forget to escape the # character in the shell) - . - - - - - - - Choose how molecules are displayed. MODEL can be one of - "BallnStick" (default) - "SpaceFill" - . - - - - - - - Show application help options. - - - - - - - Print all or just a group of help options. These options are not documented here. Instead see - gtk-options - 7 - and - gnome-options - 7 - . - - - - - - - Print &dhpackage; version information. - - - - - - SEE ALSO - - gnome-options - 7 - , - gtk-options - 7 - - -
diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchemcalc.1 gnome-chemistry-utils-0.10.9/docs/man/gchemcalc.1 --- gnome-chemistry-utils-0.8.6/docs/man/gchemcalc.1 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gchemcalc.1 2009-11-14 11:30:38.000000000 +0100 @@ -1,11 +1,11 @@ .\" Title: gchemcalc .\" Author: Jean Br\('efort -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: $Date: 2007/05/07 19:33:06 $ +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: $Date: 2008-09-01 21:48:58 +0200 (Mo, 01. Sep 2008) $ .\" Manual: gnome-chemistry-utils -.\" Source: gcu 0.7.95 +.\" Source: gcu 0.10 .\" -.TH "GCHEMCALC" "1" "$Date: 2007/05/07 19:33:06 $" "gcu 0.7.95" "gnome\-chemistry\-utils" +.TH "GCHEMCALC" "1" "$Date: 2008\-09\-01 21:48:58 +0200 (Mo, 01\&. Sep 2008) $" "gcu 0.10" "gnome-chemistry-utils" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -18,48 +18,48 @@ .SH "DESCRIPTION" .PP \fBgchemcalc\fR -is a simple calculator for chemists. +is a simple calculator for chemists\&. .SH "OPTIONS" .PP The following options are accepted: .PP \fB\-?\fR, \fB\-\-help\fR .RS 4 -Show application help options. +Show application help options\&. .RE .PP \fB\-\-help\-all\fR, \fB\-\-help\-*\fR .RS 4 -Print all or just a group of help options. These options are not documented here. Instead see -\fBgtk\-options\fR(7) +Print all or just a group of help options\&. These options are not documented here\&. Instead see +\fBgtk-options\fR(7) and -\fBgnome\-options\fR(7). +\fBgnome-options\fR(7)\&. .RE .PP \fB\-v\fR, \fB\-\-version\fR .RS 4 -Print gchemcalc version information. +Print gchemcalc version information\&. .RE .SH "SEE ALSO" .PP -\fBgnome\-options\fR(7), -\fBgtk\-options\fR(7) +\fBgnome-options\fR(7), +\fBgtk-options\fR(7) .SH "AUTHORS" .PP -\fBJean Br\('efort\fR <\&jean.brefort@normalesup.org\&> +\fBJean Br\('efort\fR <\&jean\&.brefort@normalesup\&.org\&> .sp -1n .IP "" 4 -Program author. +Program author\&. .PP -\fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&> +\fBDaniel Leidert\fR <\&daniel\&.leidert@wgdd\&.de\&> .sp -1n .IP "" 4 -Manpage author. +Manpage author\&. .SH "COPYRIGHT" -Copyright \(co 2002\-2007 Jean Br\('efort +Copyright \(co 2002-2007 Jean Br\('efort .br -Copyright \(co 2004\-2007 Daniel Leidert +Copyright \(co 2004-2007 Daniel Leidert .br .PP -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. -.br +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation\&. +.sp diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchemcalc.1.xml gnome-chemistry-utils-0.10.9/docs/man/gchemcalc.1.xml --- gnome-chemistry-utils-0.8.6/docs/man/gchemcalc.1.xml 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gchemcalc.1.xml 2009-11-14 11:30:38.000000000 +0100 @@ -5,7 +5,7 @@ "/usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd" [ - + - + diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchempaint.1 gnome-chemistry-utils-0.10.9/docs/man/gchempaint.1 --- gnome-chemistry-utils-0.8.6/docs/man/gchempaint.1 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/man/gchempaint.1 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,71 @@ +.\" Title: gchempaint +.\" Author: Jean Br\('efort +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: $Date: 2008-09-01 21:48:58 +0200 (Mo, 01. Sep 2008) $ +.\" Manual: gnome-chemistry-utils +.\" Source: gcu 0.10 +.\" +.TH "GCHEMPAINT" "1" "$Date: 2008\-09\-01 21:48:58 +0200 (Mo, 01\&. Sep 2008) $" "gcu 0.10" "gnome-chemistry-utils" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +gchempaint \- 2D chemical structures editor for the GNOME2 desktop +.SH "SYNOPSIS" +.HP 11 +\fBgchempaint\fR [\fBOPTIONS\fR...] [\fIFILE\fR...] +.SH "DESCRIPTION" +.PP +\fBgchempaint\fR +is a 2D chemical structures editor for the GNOME2 desktop\&. It is a multi document application\&. You can read different file types with +\fBgchempaint\fR\&. E\&.g\&. chemical/x\-cml, chemical/x\-mdl\-molfile, chemical/x\-mdl\-sdfile or chemical/x\-pdb\&. But be aware, that you will maybe loose 3D\-data from these file\-formats\&. +.SH "OPTIONS" +.PP +Currently the following options are supported: +.PP +\fB\-e\fR, \fB\-\-edit\-residue\fR +.RS 4 +Open residues dialog\&. +.RE +.PP +\fB\-?\fR, \fB\-\-help\fR +.RS 4 +Show application help options\&. +.RE +.PP +\fB\-\-help\-all\fR, \fB\-\-help\-*\fR +.RS 4 +Print all or just a group of help options\&. These options are not documented here\&. Instead see +\fBgtk-options\fR(7) +and +\fBgnome-options\fR(7)\&. +.RE +.PP +\fB\-v\fR, \fB\-\-version\fR +.RS 4 +Print gchempaint version information\&. +.RE +.SH "SEE ALSO" +.PP +\fBgnome-options\fR(7), +\fBgtk-options\fR(7) +.SH "AUTHORS" +.PP +\fBJean Br\('efort\fR <\&jean\&.brefort@normalesup\&.org\&> +.sp -1n +.IP "" 4 +Program author\&. +.PP +\fBDaniel Leidert\fR <\&daniel\&.leidert@wgdd\&.de\&> +.sp -1n +.IP "" 4 +Manpage author\&. +.SH "COPYRIGHT" +Copyright \(co 2002-2007 Jean Br\('efort +.br +Copyright \(co 2004-2007 Daniel Leidert +.br +.PP +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation\&. +.sp diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchempaint.1.xml gnome-chemistry-utils-0.10.9/docs/man/gchempaint.1.xml --- gnome-chemistry-utils-0.8.6/docs/man/gchempaint.1.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/man/gchempaint.1.xml 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,137 @@ + + +. + + This manual page is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This manual page is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this manual page; if not, write to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +--> + + + + + + + + + %_gcu_entities; +]> + + + + &dhulpackage; + &dhulapackage; + &dhedition; + &dhdate; + + + Jean + Bréfort + Program author. + +
+ jean.brefort@normalesup.org +
+
+
+ + Daniel + Leidert + Manpage author. + +
+ daniel.leidert@wgdd.de +
+
+
+
+ &dhcopyright; +
+ + &dhpackage; + &dhsection; + + + &dhpackage; + 2D chemical structures editor for the GNOME2 desktop + + + + &dhpackage; + + FILE + + + + DESCRIPTION + &dhpackage; is a 2D chemical structures editor for the GNOME2 desktop. It is a multi document application. You can read different file types with &dhpackage;. E.g. chemical/x-cml, chemical/x-mdl-molfile, chemical/x-mdl-sdfile or chemical/x-pdb. But be aware, that you will maybe loose 3D-data from these file-formats. + + + OPTIONS + Currently the following options are supported: + + + + + + Open residues dialog. + + + + + + + Show application help options. + + + + + + + Print all or just a group of help options. These options are not documented here. Instead see + gtk-options + 7 + and + gnome-options + 7 + . + + + + + + + Print &dhpackage; version information. + + + + + + SEE ALSO + + gnome-options + 7 + , + gtk-options + 7 + + +
+ diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchemtable.1 gnome-chemistry-utils-0.10.9/docs/man/gchemtable.1 --- gnome-chemistry-utils-0.8.6/docs/man/gchemtable.1 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gchemtable.1 2009-11-14 11:30:38.000000000 +0100 @@ -1,11 +1,11 @@ .\" Title: gchemtable .\" Author: Jean Br\('efort -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: $Date: 2007/05/07 19:33:06 $ +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: $Date: 2008-09-01 21:48:58 +0200 (Mo, 01. Sep 2008) $ .\" Manual: gnome-chemistry-utils -.\" Source: gcu 0.7.95 +.\" Source: gcu 0.10 .\" -.TH "GCHEMTABLE" "1" "$Date: 2007/05/07 19:33:06 $" "gcu 0.7.95" "gnome\-chemistry\-utils" +.TH "GCHEMTABLE" "1" "$Date: 2008\-09\-01 21:48:58 +0200 (Mo, 01\&. Sep 2008) $" "gcu 0.10" "gnome-chemistry-utils" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -15,26 +15,26 @@ .SH "DESCRIPTION" .PP \fBgchemtable\fR -is a periodic table of the elements application. +is a periodic table of the elements application\&. .SH "OPTIONS" .PP -No options are available. +No options are available\&. .SH "AUTHORS" .PP -\fBJean Br\('efort\fR <\&jean.brefort@normalesup.org\&> +\fBJean Br\('efort\fR <\&jean\&.brefort@normalesup\&.org\&> .sp -1n .IP "" 4 -Program author. +Program author\&. .PP -\fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&> +\fBDaniel Leidert\fR <\&daniel\&.leidert@wgdd\&.de\&> .sp -1n .IP "" 4 -Manpage author. +Manpage author\&. .SH "COPYRIGHT" -Copyright \(co 2002\-2007 Jean Br\('efort +Copyright \(co 2002-2007 Jean Br\('efort .br -Copyright \(co 2004\-2007 Daniel Leidert +Copyright \(co 2004-2007 Daniel Leidert .br .PP -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. -.br +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation\&. +.sp diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gchemtable.1.xml gnome-chemistry-utils-0.10.9/docs/man/gchemtable.1.xml --- gnome-chemistry-utils-0.8.6/docs/man/gchemtable.1.xml 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gchemtable.1.xml 2009-11-14 11:30:38.000000000 +0100 @@ -5,7 +5,7 @@ "/usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd" [ - + - + diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gcrystal.1 gnome-chemistry-utils-0.10.9/docs/man/gcrystal.1 --- gnome-chemistry-utils-0.8.6/docs/man/gcrystal.1 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gcrystal.1 2009-11-14 11:30:38.000000000 +0100 @@ -1,11 +1,11 @@ .\" Title: gcrystal .\" Author: Jean Br\('efort -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: $Date: 2007/05/07 19:33:06 $ +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: $Date: 2008-09-01 21:48:58 +0200 (lun 01 sep 2008) $ .\" Manual: gnome-chemistry-utils -.\" Source: gcu 0.7.95 +.\" Source: gcu 0.10 .\" -.TH "GCRYSTAL" "1" "$Date: 2007/05/07 19:33:06 $" "gcu 0.7.95" "gnome\-chemistry\-utils" +.TH "GCRYSTAL" "1" "$Date: 2008\-09\-01 21:48:58 +0200 (lun 01 sep 2008) $" "gcu 0.10" "gnome-chemistry-utils" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -14,57 +14,52 @@ gcrystal \- light model visualizer for crystal structures .SH "SYNOPSIS" .HP 9 -\fBgcrystal\fR [\fBOPTION(S)\fR...] [\fIFILE\fR] +\fBgcrystal\fR [\fBOPTION(S)\fR...] [\fIFILE\fR...] .SH "DESCRIPTION" .PP \fBgcrystal\fR -is a light model visualizer for crystal structures, based on the GNOME Chemistry Utils, that displays models of all sorts of crystal microscopic structures using OpenGL. +is a light model visualizer for crystal structures, based on the GNOME Chemistry Utils, that displays models of all sorts of crystal microscopic structures using OpenGL\&. .SH "OPTIONS" .PP The following options are accepted: .PP -\fB\-\-usage\fR -.RS 4 -Show a summary of possible options and usage. -.RE -.PP \fB\-?\fR, \fB\-\-help\fR .RS 4 -Show application help options. +Show application help options\&. .RE .PP \fB\-\-help\-all\fR, \fB\-\-help\-*\fR .RS 4 -Print all or just a group of help options. These options are not documented here. Instead see -\fBgtk\-options\fR(7) +Print all or just a group of help options\&. These options are not documented here\&. Instead see +\fBgtk-options\fR(7) and -\fBgnome\-options\fR(7). +\fBgnome-options\fR(7)\&. .RE .PP \fB\-v\fR, \fB\-\-version\fR .RS 4 -Print gcrystal version information. +Print gcrystal version information\&. .RE .SH "SEE ALSO" .PP -\fBgnome\-options\fR(7), -\fBgtk\-options\fR(7) +\fBgnome-options\fR(7), +\fBgtk-options\fR(7) .SH "AUTHORS" .PP -\fBJean Br\('efort\fR <\&jean.brefort@normalesup.org\&> +\fBJean Br\('efort\fR <\&jean\&.brefort@normalesup\&.org\&> .sp -1n .IP "" 4 -Program author. +Program author\&. .PP -\fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&> +\fBDaniel Leidert\fR <\&daniel\&.leidert@wgdd\&.de\&> .sp -1n .IP "" 4 -Manpage author. +Manpage author\&. .SH "COPYRIGHT" -Copyright \(co 2002\-2007 Jean Br\('efort +Copyright \(co 2002-2007 Jean Br\('efort .br -Copyright \(co 2004\-2007 Daniel Leidert +Copyright \(co 2004-2007 Daniel Leidert .br .PP -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. -.br +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation\&. +.sp diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gcrystal.1.xml gnome-chemistry-utils-0.10.9/docs/man/gcrystal.1.xml --- gnome-chemistry-utils-0.8.6/docs/man/gcrystal.1.xml 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gcrystal.1.xml 2009-11-14 11:30:38.000000000 +0100 @@ -5,7 +5,7 @@ "/usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd" [ - + - + @@ -76,7 +76,7 @@ &dhpackage; - FILE + FILE @@ -88,12 +88,6 @@ The following options are accepted: - - - Show a summary of possible options and usage. - - - diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gcu_entities.dtd.in gnome-chemistry-utils-0.10.9/docs/man/gcu_entities.dtd.in --- gnome-chemistry-utils-0.8.6/docs/man/gcu_entities.dtd.in 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/gcu_entities.dtd.in 2009-11-14 11:30:38.000000000 +0100 @@ -1,5 +1,6 @@ - + + diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gspectrum.1 gnome-chemistry-utils-0.10.9/docs/man/gspectrum.1 --- gnome-chemistry-utils-0.8.6/docs/man/gspectrum.1 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/man/gspectrum.1 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,65 @@ +.\" Title: gspectrum +.\" Author: Jean Br\('efort +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: $Date: 2008-09-01 21:48:58 +0200 (lun 01 sep 2008) $ +.\" Manual: gnome-chemistry-utils +.\" Source: gcu 0.10 +.\" +.TH "GSPECTRUM" "1" "$Date: 2008\-09\-01 21:48:58 +0200 (lun 01 sep 2008) $" "gcu 0.10" "gnome-chemistry-utils" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +gspectrum \- a small spectrum viewer application +.SH "SYNOPSIS" +.HP 10 +\fBgspectrum\fR [\fBOPTION(S)\fR...] [\fIFILE\fR...] +.SH "DESCRIPTION" +.PP +\fBgspectrum\fR +is a simple spectrum visualizer\&. It is only able to display files in the JCAMP\-DX format\&. +.SH "OPTIONS" +.PP +The following options are accepted: +.PP +\fB\-?\fR, \fB\-\-help\fR +.RS 4 +Show application help options\&. +.RE +.PP +\fB\-\-help\-all\fR, \fB\-\-help\-*\fR +.RS 4 +Print all or just a group of help options\&. These options are not documented here\&. Instead see +\fBgtk-options\fR(7) +and +\fBgnome-options\fR(7)\&. +.RE +.PP +\fB\-v\fR, \fB\-\-version\fR +.RS 4 +Print gspectrum version information\&. +.RE +.SH "SEE ALSO" +.PP +\fBgnome-options\fR(7), +\fBgtk-options\fR(7) +.SH "AUTHORS" +.PP +\fBJean Br\('efort\fR <\&jean\&.brefort@normalesup\&.org\&> +.sp -1n +.IP "" 4 +Program author\&. +.PP +\fBDaniel Leidert\fR <\&daniel\&.leidert@wgdd\&.de\&> +.sp -1n +.IP "" 4 +Manpage author\&. +.SH "COPYRIGHT" +Copyright \(co 2002-2007 Jean Br\('efort +.br +Copyright \(co 2004-2007 Daniel Leidert +.br +.PP +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation\&. +.sp diff -Nru gnome-chemistry-utils-0.8.6/docs/man/gspectrum.1.xml gnome-chemistry-utils-0.10.9/docs/man/gspectrum.1.xml --- gnome-chemistry-utils-0.8.6/docs/man/gspectrum.1.xml 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/man/gspectrum.1.xml 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,130 @@ + + +. + + This manual page is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This manual page is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this manual page; if not, write to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +--> + + + + + + + + + %_gcu_entities; +]> + + + + &dhulpackage; + &dhulapackage; + &dhedition; + &dhdate; + + + Jean + Bréfort + Program author. + +
+ jean.brefort@normalesup.org +
+
+
+ + Daniel + Leidert + Manpage author. + +
+ daniel.leidert@wgdd.de +
+
+
+
+ &dhcopyright; +
+ + &dhpackage; + &dhsection; + + + &dhpackage; + a small spectrum viewer application + + + + &dhpackage; + + FILE + + + + DESCRIPTION + &dhpackage; is a simple spectrum visualizer. It is only able to display files + in the JCAMP-DX format. + + + OPTIONS + The following options are accepted: + + + + + + Show application help options. + + + + + + + Print all or just a group of help options. These options are not documented here. Instead see + gtk-options + 7 + and + gnome-options + 7 + . + + + + + + + Print &dhpackage; version information. + + + + + + SEE ALSO + + gnome-options + 7 + , + gtk-options + 7 + + +
diff -Nru gnome-chemistry-utils-0.8.6/docs/man/libgcu.3 gnome-chemistry-utils-0.10.9/docs/man/libgcu.3 --- gnome-chemistry-utils-0.8.6/docs/man/libgcu.3 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/libgcu.3 1970-01-01 01:00:00.000000000 +0100 @@ -1,63 +0,0 @@ -.\" Title: libgcu -.\" Author: Jean Br\('efort -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: $Date: 2007/05/07 19:33:06 $ -.\" Manual: gnome-chemistry-utils -.\" Source: gcu 0.7.95 -.\" -.TH "LIBGCU" "3" "$Date: 2007/05/07 19:33:06 $" "gcu 0.7.95" "gnome\-chemistry\-utils" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -libgcu \- Gtk widgets and C++ classes related to chemistry -.SH "SYNOPSIS" -.sp -.RS 4 -.nf -\fB#include gcu/chemistry.h\fR -.fi -.RE -.SH "DESCRIPTION" -.PP -The -libgcu -library provides various Gtk widgets and C++ classes related to chemistry. -.SH "FILES" -.PP -.PP -\fI${libdir}/libcgu.a\fR -.RS 4 -static library -.RE -.PP -\fI${libdir}/libcgu.so\fR -.RS 4 -shared library -.RE -.SH "SEE ALSO" -.PP -The complete reference with examples is available online at -\fI\%http://www.nongnu.org/gchemutils/reference/\fR -or (depending on your installation) also locally at -\fI${datadir}/doc/gchemutils/reference\fR. -.SH "AUTHORS" -.PP -\fBJean Br\('efort\fR <\&jean.brefort@normalesup.org\&> -.sp -1n -.IP "" 4 -Program/Library author. -.PP -\fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&> -.sp -1n -.IP "" 4 -Manpage author. -.SH "COPYRIGHT" -Copyright \(co 2002\-2007 Jean Br\('efort -.br -Copyright \(co 2004\-2007 Daniel Leidert -.br -.PP -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. -.br diff -Nru gnome-chemistry-utils-0.8.6/docs/man/libgcu.3.xml gnome-chemistry-utils-0.10.9/docs/man/libgcu.3.xml --- gnome-chemistry-utils-0.8.6/docs/man/libgcu.3.xml 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/libgcu.3.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,105 +0,0 @@ - - -. - - This manual page is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This manual page is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this manual page; if not, write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ---> - - - - - - - - - %_gcu_entities; -]> - - - - &dhulpackage; - &dhulapackage; - &dhedition; - &dhdate; - - - Jean - Bréfort - Program/Library author. - -
- jean.brefort@normalesup.org -
-
-
- - Daniel - Leidert - Manpage author. - -
- daniel.leidert@wgdd.de -
-
-
-
- &dhcopyright; -
- - &dhpackage; - &dhsection; - - - &dhpackage; - Gtk widgets and C++ classes related to chemistry - - - - - - DESCRIPTION - The &dhpackage; library provides various Gtk widgets and C++ classes related to chemistry. - - - FILES - - - - ${libdir}/libcgu.a - - static library - - - - ${libdir}/libcgu.so - - shared library - - - - - - SEE ALSO - The complete reference with examples is available online at or (depending on your installation) also locally at ${datadir}/doc/gchemutils/reference. - -
- diff -Nru gnome-chemistry-utils-0.8.6/docs/man/Makefile.am gnome-chemistry-utils-0.10.9/docs/man/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/man/Makefile.am 2007-05-08 11:16:58.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/man/Makefile.am 2009-11-14 11:30:38.000000000 +0100 @@ -17,17 +17,24 @@ VPATH += @builddir@ gcu_man_src = \ - gchem3d-viewer.1.xml \ + gchem3d.1.xml \ gchemcalc.1.xml \ + gchempaint.1.xml \ gchemtable.1.xml \ gcrystal.1.xml \ - libgcu.3.xml + gspectrum.1.xml -man_MANS = gchem3d-viewer.1 gchemcalc.1 gchemtable.1 gcrystal.1 libgcu.3 +man_MANS = \ + gchem3d@STABILITY@.1 \ + gchemcalc@STABILITY@.1 \ + gchempaint@STABILITY@.1 \ + gchemtable@STABILITY@.1 \ + gcrystal@STABILITY@.1 \ + gspectrum@STABILITY@.1 SUFFIXES = .xml -.xml: +%@STABILITY@.1 : %.1.xml if HAVE_XSLTPROC $(XSLTPROC) $(XSLTPROC_FLAGS) $< else diff -Nru gnome-chemistry-utils-0.8.6/docs/man/Makefile.in gnome-chemistry-utils-0.10.9/docs/man/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/man/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/man/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,8 +15,9 @@ @SET_MAKE@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,11 +43,32 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gcu_entities.dtd +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" -man3dir = $(mandir)/man3 +am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -54,7 +77,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -74,26 +96,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -103,35 +128,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -144,14 +155,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -163,6 +181,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -176,31 +196,56 @@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ --path "$(VPATH)" --param \ man.charmap.use.subset "0" --param make.year.ranges "1" \ --param make.single.year.ranges "1" -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -214,22 +259,31 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ EXTRA_DIST = \ gcu_entities.dtd.in \ gcu_man_legal.xml \ @@ -239,13 +293,21 @@ DISTCLEAN = gcu_entities.dtd MAINTAINERCLEANFILES = Makefile.in gcu_man_src = \ - gchem3d-viewer.1.xml \ + gchem3d.1.xml \ gchemcalc.1.xml \ + gchempaint.1.xml \ gchemtable.1.xml \ gcrystal.1.xml \ - libgcu.3.xml + gspectrum.1.xml + +man_MANS = \ + gchem3d@STABILITY@.1 \ + gchemcalc@STABILITY@.1 \ + gchempaint@STABILITY@.1 \ + gchemtable@STABILITY@.1 \ + gcrystal@STABILITY@.1 \ + gspectrum@STABILITY@.1 -man_MANS = gchem3d-viewer.1 gchemcalc.1 gchemtable.1 gcrystal.1 libgcu.3 SUFFIXES = .xml all: all-am @@ -255,14 +317,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/man/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/man/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/man/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -280,6 +342,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): gcu_entities.dtd: $(top_builddir)/config.status $(srcdir)/gcu_entities.dtd.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ @@ -288,96 +351,44 @@ clean-libtool: -rm -rf .libs _libs -install-man1: $(man1_MANS) $(man_MANS) +install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done -install-man3: $(man3_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ - done -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ - done + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: @@ -386,6 +397,19 @@ distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -401,13 +425,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -416,7 +444,7 @@ check: check-am all-am: Makefile $(MANS) installdirs: - for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; do \ + for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -439,6 +467,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -458,6 +487,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -466,18 +497,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am -install-man: install-man1 install-man3 +install-info-am: + +install-man: install-man1 install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -498,9 +539,9 @@ uninstall-am: uninstall-man -uninstall-man: uninstall-man1 uninstall-man3 +uninstall-man: uninstall-man1 -.MAKE: install-am install-strip +.MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ @@ -508,15 +549,14 @@ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ - install-man1 install-man3 install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-man uninstall-man1 uninstall-man3 + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 -.xml: +%@STABILITY@.1 : %.1.xml @HAVE_XSLTPROC_TRUE@ $(XSLTPROC) $(XSLTPROC_FLAGS) $< @HAVE_XSLTPROC_FALSE@ echo "***** Cannot update the XML sources without `xsltproc'." @@ -528,6 +568,7 @@ @HAVE_MAN_TRUE@ LANG=C MANWIDTH=80 $(MAN) $(srcdir)/$${man} > /dev/null ; \ @HAVE_MAN_TRUE@ done @HAVE_MAN_FALSE@ @echo "***** Cannot check the manpages without `man'." + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/docs/reference/Doxyfile.in gnome-chemistry-utils-0.10.9/docs/reference/Doxyfile.in --- gnome-chemistry-utils-0.8.6/docs/reference/Doxyfile.in 2007-12-13 13:18:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/reference/Doxyfile.in 2009-11-14 11:30:38.000000000 +0100 @@ -434,8 +434,9 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @top_srcdir@/gcu \ - @top_srcdir@/tests +INPUT = @top_srcdir@/libs/gcu \ + @top_srcdir@/libs/gcp \ + @top_srcdir@/tests # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -457,8 +458,10 @@ # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = @top_srcdir@/gcu/gtkperiodic.c \ - @top_srcdir@/gcu/gtkcomboperiodic.c +EXCLUDE = @top_srcdir@/libs/gcu/gtkperiodic.c \ + @top_srcdir@/libs/gcu/gtkcomboperiodic.c \ + @top_srcdir@/libs/gcu/gtkchem3dviewer.c \ + @top_srcdir@/libs/gcu/gtkspectrumviewer.c \ # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded @@ -496,7 +499,7 @@ # directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = images # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -956,7 +959,9 @@ # contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = @top_srcdir@ +INCLUDE_PATH = @top_srcdir@ @top_srcdir@/libs \ + @top_srcdir@/libs/gcu \ + @top_srcdir@/libs/gcp # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/docs/reference/html-upstream.tar.gz and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/docs/reference/html-upstream.tar.gz sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/docs/reference/Makefile.am gnome-chemistry-utils-0.10.9/docs/reference/Makefile.am --- gnome-chemistry-utils-0.8.6/docs/reference/Makefile.am 2007-05-07 14:58:20.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/docs/reference/Makefile.am 2009-11-14 11:30:38.000000000 +0100 @@ -6,8 +6,11 @@ MAINTAINERCLEANFILES = Makefile.in -docsdir = $(datadir)/doc/gchemutils/reference -docs_DATA = html/*.* +# better use the docdir/htmldir variable, configurable via --docdir|--htmldir? +# docsdir = $(datadir)/doc/gchemutils/@GCU_API_VER@/reference +# docs_DATA = html/*.* + +all: html/*.* html/*.*: html_stamp @@ -16,7 +19,7 @@ html_stamp: $(DOXYGEN) -u Doxyfile $(DOXYGEN) Doxyfile - touch html_stamp + touch $@ html-upstream.tar.gz: html/*.* tar -czf $@ html/*.* @@ -35,7 +38,7 @@ endif #DOXYGEN_AVAILABLE clean-local: - rm -rf html + rm -rf html/*.* ## Make distcheck happy for maintainers as well dist-hook: diff -Nru gnome-chemistry-utils-0.8.6/docs/reference/Makefile.in gnome-chemistry-utils-0.10.9/docs/reference/Makefile.in --- gnome-chemistry-utils-0.8.6/docs/reference/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/docs/reference/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,11 +14,11 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -43,23 +44,14 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = Doxyfile +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(docsdir)" -docsDATA_INSTALL = $(INSTALL_DATA) -DATA = $(docs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -79,26 +71,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -108,35 +103,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -149,14 +130,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -168,6 +156,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -179,31 +169,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -217,28 +232,35 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ EXTRA_DIST = html-upstream.tar.gz CLEANFILES = html_stamp Doxyfile.bak DISTCLEANFILES = Doxyfile MAINTAINERCLEANFILES = Makefile.in -docsdir = $(datadir)/doc/gchemutils/reference -docs_DATA = html/*.* all: all-am .SUFFIXES: @@ -246,14 +268,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/reference/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/reference/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -271,6 +293,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ @@ -279,23 +302,6 @@ clean-libtool: -rm -rf .libs _libs -install-docsDATA: $(docs_DATA) - @$(NORMAL_INSTALL) - test -z "$(docsdir)" || $(MKDIR_P) "$(DESTDIR)$(docsdir)" - @list='$(docs_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(docsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docsdir)/$$f'"; \ - $(docsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docsdir)/$$f"; \ - done - -uninstall-docsDATA: - @$(NORMAL_UNINSTALL) - @list='$(docs_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(docsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(docsdir)/$$f"; \ - done tags: TAGS TAGS: @@ -319,13 +325,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -334,11 +344,8 @@ dist-hook check-am: all-am check: check-am -all-am: Makefile $(DATA) +all-am: Makefile installdirs: - for dir in "$(DESTDIR)$(docsdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -360,6 +367,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -380,26 +388,38 @@ html: html-am +html-am: + info: info-am info-am: -install-data-am: install-docsDATA +install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -418,30 +438,35 @@ ps-am: -uninstall-am: uninstall-docsDATA +uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local dist-hook distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-docsDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-docsDATA + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + +# better use the docdir/htmldir variable, configurable via --docdir|--htmldir? +# docsdir = $(datadir)/doc/gchemutils/@GCU_API_VER@/reference +# docs_DATA = html/*.* + +all: html/*.* html/*.*: html_stamp @DOXYGEN_AVAILABLE_TRUE@html_stamp: @DOXYGEN_AVAILABLE_TRUE@ $(DOXYGEN) -u Doxyfile @DOXYGEN_AVAILABLE_TRUE@ $(DOXYGEN) Doxyfile -@DOXYGEN_AVAILABLE_TRUE@ touch html_stamp +@DOXYGEN_AVAILABLE_TRUE@ touch $@ @DOXYGEN_AVAILABLE_TRUE@html-upstream.tar.gz: html/*.* @DOXYGEN_AVAILABLE_TRUE@ tar -czf $@ html/*.* @@ -453,10 +478,11 @@ @DOXYGEN_AVAILABLE_FALSE@html-upstream.tar.gz: ; echo "Error: You need doxygen to create the documentation." && exit 1 clean-local: - rm -rf html + rm -rf html/*.* dist-hook: rm -f html-upstream.tar.gz + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/dtds/Makefile.in gnome-chemistry-utils-0.10.9/dtds/Makefile.in --- gnome-chemistry-utils-0.8.6/dtds/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/dtds/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -48,7 +51,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -68,26 +70,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -97,35 +102,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -138,14 +129,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -157,6 +155,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -168,31 +168,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -206,22 +231,31 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ EXTRA_DIST = gcrystal.dtd MAINTAINERCLEANFILES = Makefile.in all: all-am @@ -231,14 +265,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dtds/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu dtds/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dtds/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu dtds/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -256,6 +290,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -285,13 +320,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -319,6 +358,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -338,6 +378,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -346,18 +388,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -391,6 +443,7 @@ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/gchemutils.schemas.in gnome-chemistry-utils-0.10.9/gchemutils.schemas.in --- gnome-chemistry-utils-0.8.6/gchemutils.schemas.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gchemutils.schemas.in 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,114 @@ + + + + /schemas/apps/gchemutils/gl/off-screen-rendering + /apps/gchemutils/gl/off-screen-rendering + gchemutils + bool + 1 + + Off screen rendering + Whether to use off-screen rendering when printing or exporting as an image. Setting it to true might lead to a crash with some video cards drivers. + + + + /schemas/apps/gchemutils/printsetup/preferred-unit + /apps/gchemutils/printsetup/preferred-unit + gchemutils + string + mm + + Preferred Display Unit + This string gives the default unit to be used in the page setup dialog. + + + + /schemas/apps/gchemutils/printsetup/margin-top + /apps/gchemutils/printsetup/margin-top + gchemutils + float + 120 + + Default Top Margin + This value gives the default number of points from the top of a page to the start of the body. + + + + /schemas/apps/gchemutils/printsetup/margin-bottom + /apps/gchemutils/printsetup/margin-bottom + gchemutils + float + 120 + + Default Bottom Margin + This value gives the default number of points from the bottom of a page to the end of the body. + + + + /schemas/apps/gchemutils/printsetup/footer-height + /apps/gchemutils/printsetup/footer-height + gchemutils + float + 72 + + Footer height + This value gives the default footer height number of points. + + + + /schemas/apps/gchemutils/printsetup/header-height + /apps/gchemutils/printsetup/header-height + gchemutils + float + 72 + + Default Top Outside Margin + This value gives the default header height number of points. + + + + /schemas/apps/gchemutils/printsetup/margin-left + /apps/gchemutils/printsetup/margin-left + gchemutils + float + 72 + + Default Left Margin + This value gives the default number of points from the left of a page to the left of the body. + + + + /schemas/apps/gchemutils/printsetup/margin-right + /apps/gchemutils/printsetup/margin-right + gchemutils + float + 72 + + Default Bottom Margin + This value gives the default number of points from the right of a page to the right of the body. + + + + /schemas/apps/gchemutils/printsetup/paper + /apps/gchemutils/printsetup/paper + gchemutils + string + + + Paper + This is the default paper specification like iso_a4 or na_letter, i.e. a PWG 5101.1-2002 paper name. + + + + /schemas/apps/gchemutils/printsetup/paper-orientation + /apps/gchemutils/printsetup/paper-orientation + gchemutils + int + 0 + + Paper + This is the default paper orientation. + + + + diff -Nru gnome-chemistry-utils-0.8.6/gchemutils.xml.in gnome-chemistry-utils-0.10.9/gchemutils.xml.in --- gnome-chemistry-utils-0.8.6/gchemutils.xml.in 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gchemutils.xml.in 2009-11-14 11:30:40.000000000 +0100 @@ -11,4 +11,15 @@ + + <_comment>2D Chemical structure + + + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/gcu/application.cc gnome-chemistry-utils-0.10.9/gcu/application.cc --- gnome-chemistry-utils-0.8.6/gcu/application.cc 2007-12-13 13:18:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/application.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,241 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/application.cc - * - * Copyright (C) 2005-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "application.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace gcu; - -Application::Application (string name, string datadir, char const *help_name, char const *icon_name) -{ - Name = name; - char const *szlang = getenv ("LANG"); - string lang = (szlang)? szlang: "C"; - HelpName = help_name? help_name: Name; - HelpFilename = string ("file://") + datadir + string ("/gnome/help/") + HelpName + string ("/") + lang + string ("/") + HelpName + ".xml"; - GnomeVFSURI *uri = gnome_vfs_uri_new (HelpFilename.c_str ()); - bool exists = gnome_vfs_uri_exists (uri); - gnome_vfs_uri_unref (uri); - if (!exists) { - HelpFilename = string ("file://") + datadir + string ("/gnome/help/") + HelpName + string ("/C/") + HelpName + ".xml"; - } - GConfClient* cli = gconf_client_get_default (); - if (cli) { - const char *value; - GConfEntry* entry = gconf_client_get_entry (cli, "/desktop/gnome/applications/help_viewer/exec", NULL, true, NULL); - if (entry) { - value = gconf_value_get_string (gconf_entry_get_value (entry)); - if (value) { - HelpBrowser = value; - if (HelpBrowser.find ("nautilus") != string::npos) - HelpBrowser = "yelp"; - } - } else - HelpBrowser = "yelp"; - entry = gconf_client_get_entry (cli, "/desktop/gnome/applications/browser/exec", NULL, true, NULL); - if (entry) { - value = gconf_value_get_string (gconf_entry_get_value (entry)); - if (value) WebBrowser = value; - } - entry = gconf_client_get_entry (cli, "/desktop/gnome/url-handlers/mailto/command", NULL, true, NULL); - if (entry) { - value = gconf_value_get_string (gconf_entry_get_value (entry)); - if (value) { - MailAgent = value; - int i = MailAgent.find (" %s"); - if (i > 0) - MailAgent.erase (i, MailAgent.size ()); - } - } - } - CurDir = g_get_current_dir (); - g_set_application_name (name.c_str ()); - gtk_window_set_default_icon_name (icon_name? icon_name: (help_name? help_name: Name.c_str ())); - GdkScreen *screen = gdk_screen_get_default (); - m_ScreenResolution = (unsigned) rint (gdk_screen_get_width (screen) * 25.4 / gdk_screen_get_width_mm (screen)); - m_ImageResolution = m_ScreenResolution; - m_ImageHeight = m_ImageWidth = 300; - m_RecentManager = gtk_recent_manager_new (); - - // check supported pixbuf formats - GSList *formats = gdk_pixbuf_get_formats (); - GSList *l = formats; - GdkPixbufFormat *format; - char **mimes; - while (l) { - format = (GdkPixbufFormat*) l->data; - if (gdk_pixbuf_format_is_writable (format)) { - mimes = gdk_pixbuf_format_get_mime_types (format); - m_SupportedPixbufFormats[*mimes] = format; - g_strfreev (mimes); - } - l = l->next; - } - g_slist_free (formats); -} - -Application::~Application () -{ - if (CurDir) - g_free (CurDir); - g_object_unref (m_RecentManager); -} - -void Application::OnHelp (string tag) -{ - if (!HasHelp ()) - return; - char *argv[3] = {NULL, NULL, NULL}; - argv[0] = (char*) HelpBrowser.c_str(); - string path = HelpFilename; - if (tag.length ()) - path += string("#") + HelpName + string ("-") + tag; - argv[1] = (char*) path.c_str (); - g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, NULL, NULL); -} - -bool Application::HasHelp () -{ - if (!HelpBrowser.length () || !HelpFilename.length ()) - return false; - GnomeVFSURI *uri = gnome_vfs_uri_new (HelpFilename.c_str ()); - bool err = gnome_vfs_uri_exists (uri); - gnome_vfs_uri_unref (uri); - return err; -} - -void Application::SetCurDir (char const* dir) -{ - if (CurDir) - g_free (CurDir); - CurDir = g_strdup (dir); -} - -void Application::OnMail (char *MailAddress) -{ - if (!MailAgent.size ()) - return; - char *argv[3] = {NULL, MailAddress, NULL}; - argv[0] = (char*) MailAgent.c_str(); - g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, NULL, NULL); -} - -void Application::ShowURI (string& uri) -{ - if (!WebBrowser.size ()) - return; - char *argv[3] = {NULL, NULL, NULL}; - argv[0] = (char*) WebBrowser.c_str(); - argv[1] = (char*) uri.c_str (); - g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, NULL, NULL); -} - -static void on_res_changed (GtkSpinButton *btn, Application *app) -{ - app->SetImageResolution (gtk_spin_button_get_value_as_int (btn)); -} - -static void on_width_changed (GtkSpinButton *btn, Application *app) -{ - app->SetImageWidth (gtk_spin_button_get_value_as_int (btn)); -} - -static void on_height_changed (GtkSpinButton *btn, Application *app) -{ - app->SetImageHeight (gtk_spin_button_get_value_as_int (btn)); -} - -GtkWidget *Application::GetImageResolutionWidget () -{ - GladeXML *xml = glade_xml_new (GLADEDIR"/image-resolution.glade", "res-table", NULL); - GtkWidget *w = glade_xml_get_widget (xml, "screen-lbl"); - char *buf = g_strdup_printf (_("(screen resolution is %u)"), m_ScreenResolution); - gtk_label_set_text (GTK_LABEL (w), buf); - g_free (buf); - w = glade_xml_get_widget (xml, "res-btn"); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), m_ImageResolution); - g_signal_connect (G_OBJECT (w), "value-changed", G_CALLBACK (on_res_changed), this); - w = glade_xml_get_widget (xml, "res-table"); - g_object_unref (G_OBJECT (xml)); - return w; -} - -GtkWidget *Application::GetImageSizeWidget () -{ - GladeXML *xml = glade_xml_new (GLADEDIR"/image-size.glade", "size-table", NULL); - GtkWidget *w = glade_xml_get_widget (xml, "width"); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), m_ImageWidth); - g_signal_connect (G_OBJECT (w), "value-changed", G_CALLBACK (on_width_changed), this); - w = glade_xml_get_widget (xml, "height"); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), m_ImageHeight); - g_signal_connect (G_OBJECT (w), "value-changed", G_CALLBACK (on_height_changed), this); - w = glade_xml_get_widget (xml, "size-table"); - return w; -} - -char const *Application::GetPixbufTypeName (string& filename, char const *mime_type) -{ - GdkPixbufFormat *format = m_SupportedPixbufFormats[mime_type]; - char **exts, **ext; - bool found = false; - int i; - if (!format) - return NULL; - // ensure the file name has a valid extension and add the default one if not - exts = gdk_pixbuf_format_get_extensions (format); - ext = exts; - while (*ext) { - i = filename.length() - strlen (*ext); - if ((i > 1) && (filename[i - 1] == '.') && !filename.compare (i, strlen (*ext), *ext)) { - found = true; - break; - } - ext++; - } - if (!found) - filename += string (".") + *exts; - g_strfreev (exts); - return gdk_pixbuf_format_get_name (format); -} - -void Application::RemoveDocument (Document *Doc) -{ - m_Docs.erase (Doc); - if (m_Docs.size () == 0 && gtk_main_level ()) - NoMoreDocsEvent (); -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/application.h gnome-chemistry-utils-0.10.9/gcu/application.h --- gnome-chemistry-utils-0.8.6/gcu/application.h 2007-07-13 21:51:10.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/application.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,269 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/application.h - * - * Copyright (C) 2005-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_APPLICATION_H -#define GCU_APPLICATION_H - -#include "dialog-owner.h" -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -namespace gcu { - -class Document; -class Dialog; - -/*!\class Application gcu/application.h -This class is a base class for applications. It provides some basic services. -*/ -class Application: public DialogOwner -{ -friend class Document; -friend class Dialog; -public: -/*! -@param name the name of the application. -@param datadir where data for the application are stored. -@param help_name the name to use for the help file (with .xml extension). -If NULL, the name parameter is used. -@param icon_name the name to use for the default icon of all windows. If NULL, -the help_name or name parameters will be used. - -The datadir variable is used to build the full path to the help file: -"file://"+datadir+"/gnome/help/"+name+"/"+LANG+"/"+name".xml". -*/ - Application (string name, string datadir = DATADIR, char const *help_name = NULL, char const *icon_name = NULL); - virtual ~Application (); - -/*! -@param s an optional tag in the help file. -Displays the help file using the file browser retrieved from GConf using the -"/desktop/gnome/applications/help_viewer/exec" key. If a tag is given, it will -be added to the help uri. -For an application named "myapp" and a tag "mytag", the uri will be: -helpfilename\#myapp-mytag. -*/ - void OnHelp (string s = ""); -/*! -@return true if both a help browser and a help file are available, false otherwise. -*/ - bool HasHelp (); -/*! -@return the name of the application. Mostly useful to set the icon name of a new window. -*/ - string &GetName () {return Name;} - -/*! -@return a GtkWindow if any. Should be overloaded by children classes. -*/ - virtual GtkWindow * GetWindow () {return NULL;} - -/*! -@param filename the uri of the file. -@param mime_type the mime type of the file if known. -@param bSave true if saving, and false if loading. -@param window the current top level window. -@param pDoc an optional document. - -Called by the FileChooser when a file name has been selected. This method does -nothing in the parent class and must be implemented in children classes -if they use the FileChooser. - -@return true if no error occured. -*/ - virtual bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *pDoc = NULL) - {return false;} - -/*! -@return the path to the current directory. -*/ - char const* GetCurDir () {return CurDir;} - -/*! -@param dir the path to the new current directory. -*/ - void SetCurDir (char const* dir); - -/*! -@param uri the uri to display. - -Displays uri in the default web browser if any. -*/ - void ShowURI (string& uri); - -/*! -@param uri the uri to the package bugs database. Default value is PACKAGE_BUGREPORT. - -Opens the bugs web page in the default browser if any. -*/ - void OnBug (char *uri = (char*) PACKAGE_BUGREPORT) - {string s (uri); ShowURI (s);} - -/*! -@param uri the uri to the main web page of the program. Default value is -"http://gchemutils.nongnu.org/". -*/ - void OnWeb (char *uri = (char*) "http://gchemutils.nongnu.org/") - {string s (uri); ShowURI (s);} - -/*! -@param MailAddress the mail adress to which a message will be sent. Defaults to the - Gnome Chemistry Utils main list. - -Creates a new empty message using the default mail if any. -*/ - void OnMail (char *MailAddress = (char*) "mailto:gchemutils-main@nongnu.org"); - -/*! -@return true if the default mail agent is known, false otherwise. -*/ - bool HasMailAgent () {return MailAgent.length () > 0;} - -/*! -@return true if the default web browser is known, false otherwise. -*/ - bool HasWebBrowser () {return WebBrowser.length () > 0;} - -/*! -@return a GtkWidget for managing pixmap resolution when saving as image. This widget is -intended to be added to a GtkFileChooserDialog. -*/ - GtkWidget *GetImageResolutionWidget (); - -/*! -@return a GtkWidget for managing pixmap width and height when saving as image. This -widget is intended to be added to a GtkFileChooserDialog. -*/ - GtkWidget *GetImageSizeWidget (); - -/*! -@return a std::map of the supported pixbuf formats. Keys are the mime type names. -*/ - map &GetSupportedPixbufFormats () {return m_SupportedPixbufFormats;} - -/*! -@param filename the file name. -@param mime_type the file mime type. - -A default extension is appended to filename if none is detected. - -@return the GdkPixbuf name associated to mime_type or NULL if the file type -is not supported by GdkPixbuf. -*/ - char const *GetPixbufTypeName (string& filename, char const *mime_type); - -protected: - -/*! -This method is called by the framework when all the documents have been removed from -the set of opened documents. The default behavior is to call gtk_main_quit and exit -the program. Derived class might overide this method to change this. -*/ - virtual void NoMoreDocsEvent () {gtk_main_quit ();} - -private: - void AddDocument (Document *Doc) {m_Docs.insert (Doc);} - void RemoveDocument (Document *Doc); - -private: - string Name; - string HelpName; - string HelpBrowser; - string HelpFilename; - char *CurDir; - string WebBrowser; - string MailAgent; - -protected: -/*! -std::map of the supported pixbuf formats. Keys are the mime type names. -*/ - map m_SupportedPixbufFormats; - -/*!\var m_Docs -The currently opened documents. -*/ -/*!\fn GetDocs() -@return the set of currently opened documents. -*/ -GCU_PROT_PROP (set , Docs) -/*!\fn GetScreenResolution() -@return the current screen resolution. -*/ -GCU_RO_PROP (unsigned, ScreenResolution) -/*!\fn SetImageResolution(unsigned ImageResolution) -@param ImageResolution the new image resolution. -Sets the image resolution used when exporting a pixmap. -Applications can use either the image resolution or the width and height to select -an exported image size, but not both. -*/ -/*!\fn GetImageResolution() -@return the current image resolution used on export. -*/ -/*!\fn GetRefImageResolution() -@return the current image resolution used on export as a reference. -*/ -GCU_PROP (unsigned, ImageResolution) -/*!\fn SetImageWidth(unsigned Width) -@param Width the new image width. -Sets the image width used when exporting a pixmap. -Applications can use either the image resolution or the width and height to select -an exported image size, but not both. -*/ -/*!\fn GetImageWidth() -@return the current image width used on export. -*/ -/*!\fn GetRefImageWidth() -@return the current image width used on export as a reference. -*/ -GCU_PROP (unsigned, ImageWidth) -/*!\fn SetImageHeight(unsigned Height) -@param Height the new image height. -Sets the image height used when exporting a pixmap. -Applications can use either the image resolution or the width and height to select -an exported image size, but not both. -*/ -/*!\fn GetImageHeight() -@return the current image height used on export. -*/ -/*!\fn GetRefImageHeight() -@return the current image height used on export as a reference. -*/ -GCU_PROP (unsigned, ImageHeight) -/*!\fn GetRecentManager() -@return the GtkRecentFileManager attached to the application. -*/ -GCU_RO_PROP (GtkRecentManager*, RecentManager) -}; - -} // namespace gcu - -#endif // GCU_APPLICATION_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/atom.cc gnome-chemistry-utils-0.10.9/gcu/atom.cc --- gnome-chemistry-utils-0.8.6/gcu/atom.cc 2007-12-13 13:18:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/atom.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,208 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * atom.cc - * - * Copyright (C) 2001-2005 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "element.h" -#include "atom.h" -#include "bond.h" -#include "xml-utils.h" -#include -#include - -using namespace gcu; - -Atom::Atom(): Object(AtomType) -{ - m_Z = 0; - m_x = m_y = m_z = 0.0; - m_Charge = 0; -} - -Atom::~Atom() -{ - m_Bonds.clear(); -} - -Atom::Atom(int Z, double x, double y, double z): Object(AtomType) -{ - SetZ(Z); - m_x = x; - m_y = y; - m_z = z; - m_Charge = 0; -} - -Atom::Atom(Atom& a): Object(AtomType) -{ - SetZ(a.m_Z); - m_x = a.m_x; - m_y = a.m_y; - m_z = a.m_z; - m_Charge = a.m_Charge; -} - -Atom& Atom::operator=(Atom& a) -{ - SetZ(a.m_Z); - m_x = a.m_x; - m_y = a.m_y; - m_z = a.m_z; - m_Charge = a.m_Charge; - return *this ; -} - -void Atom::SetZ(int Z) -{ - m_Z = Z; -} - -double Atom::Distance(Atom* pAtom) -{ - return sqrt(square(m_x - pAtom->m_x) + square(m_y - pAtom->m_y) + square(m_z - pAtom->m_z)); -} - -void Atom::zoom(double ZoomFactor) -{ - m_x *= ZoomFactor; - m_y *= ZoomFactor; - m_z *= ZoomFactor; -} - -bool Atom::GetCoords(double *x, double *y, double *z) -{ - if (!x || !y) return false; - *x = m_x; - *y = m_y; - if (z) *z = m_z; - return true; -} - -const gchar* Atom::GetSymbol() -{ - Element* Elt = Element::GetElement(m_Z); - return (Elt)? Element::Symbol(m_Z): NULL; -} - -void Atom::AddBond(Bond* pBond) -{ - m_Bonds[pBond->GetAtom(this)] = pBond; -} - -void Atom::RemoveBond(Bond* pBond) -{ - m_Bonds.erase(pBond->GetAtom(this)); -} - -Bond* Atom::GetFirstBond(map::iterator& i) -{ - i = m_Bonds.begin(); - if (i == m_Bonds.end()) return NULL; - return (*i).second; -} - -Bond* Atom::GetNextBond(map::iterator& i) -{ - i++; - if (i == m_Bonds.end()) return NULL; - return (*i).second; -} - -void Atom::Move(double x, double y, double z) -{ - m_x += x; - m_y += y; - m_z += z; -} - -void Atom::Transform2D(Matrix2D& m, double x, double y) -{ - m_x -= x; - m_y -= y; - m.Transform (m_x, m_y); - m_x += x; - m_y += y; -} - -xmlNodePtr Atom::Save(xmlDocPtr xml) -{ - xmlNodePtr parent; - gchar buf[16]; - parent = xmlNewDocNode(xml, NULL, (xmlChar*)"atom", NULL); - if (!parent) return NULL; - SaveId(parent); - - if (m_Z) { - strncpy(buf, GetSymbol(), sizeof(buf)); - xmlNewProp(parent, (xmlChar*)"element", (xmlChar*)buf); - } - - if (m_Charge) - { - snprintf(buf, sizeof(buf), "%d", m_Charge); - xmlNewProp(parent, (xmlChar*)"charge", (xmlChar*)buf); - } - if (!WritePosition(xml, parent, NULL, m_x, m_y, m_z)) {xmlFreeNode(parent); return NULL;} - if (!SaveNode(xml, parent)) {xmlFreeNode(parent); return NULL;} - return parent; -} - -bool Atom::Load (xmlNodePtr node) -{ - char* tmp; - tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); - if (tmp) { - SetId (tmp); - xmlFree (tmp); - } - tmp = (char*) xmlGetProp (node, (xmlChar*) "element"); - if (tmp) { - m_Z = Element::Z(tmp); //Don't check if element exists. Applications that do not accept unknown elements should check - xmlFree (tmp); - } - tmp = (char*) xmlGetProp (node, (xmlChar*) "charge"); - if (tmp) { - m_Charge = (char) atoi (tmp); - xmlFree (tmp); - } else - m_Charge = 0; - if (!ReadPosition (node, NULL, &m_x, &m_y, &m_z) || (!LoadNode (node))) - return false; - return true; -} - -bool Atom::LoadNode(xmlNodePtr node) -{ - return true; -} - -bool Atom::SaveNode(xmlDocPtr xml, xmlNodePtr node) -{ - return true; -} - -Bond* Atom::GetBond(Atom* pAtom) -{ - Bond* pBond = m_Bonds[pAtom]; - if (!pBond) m_Bonds.erase(pAtom); - return pBond; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/atom.h gnome-chemistry-utils-0.10.9/gcu/atom.h --- gnome-chemistry-utils-0.8.6/gcu/atom.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/atom.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,247 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * atom.h - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_ATOM_H -#define GCU_ATOM_H - -#include -#include -#include "object.h" - -using namespace std; - -namespace gcu -{ - -class Bond; -/*!\class Atom gcu/atom.h -This class is used to represent atoms. - -*/ -class Atom: public Object -{ -public: -/*! -The default constructor. Creates an atom with atomic number set to 0. -*/ - Atom (); -/*! -@param Z: the atomic number of the new atom. -@param x: the x coordinate of the new atom. -@param y: the y coordinate of the new atom. -@param z: the z coordinate of the new atom. - -Creates an atom. -*/ - Atom (int Z, double x, double y, double z = 0.); -/*! -@param a: the Atom to duplicate. - -Creates a new atom identical to a without any bond. -*/ - Atom (Atom& a); -/*! -@param a: the Atom to copy. - -@return an Atom identical to a without any bond. -*/ - Atom& operator= (Atom& a); -/*! -The destructor of Atom. It removes bonds but do not delete the associated Bond instances. -*/ - virtual ~Atom (); - -public : -/*! -@param pAtom: a pointer to an Atom. -@return the distance between the Atom at pAtom and this Atom. -*/ - double Distance (Atom* pAtom); -/*! -@param ZoomFactor: the zoom factor. - -Multiplies all three coordinates of this Atom by ZoomFactor. -*/ - void zoom (double ZoomFactor); -/*! -@param x: a pointer to the double value which will receive the x coordiante of the Atom. -@param y: a pointer to the double value which will receive the y coordiante of the Atom. -@param z: a pointer to the double value which will receive the z coordiante of the Atom or NULL for 2D representations. - -Retrieves the coordinates of this Atom. -@return true if successful and false if an error occurs (if x or y is NULL). -*/ - virtual bool GetCoords (double *x, double *y, double *z = NULL); -/*! -@param x: the new x coordinate of the Atom. -@param y: the new y coordinate of the Atom. -@param z: the new z coordinate of the Atom. - -Changes the position of this Atom. -*/ - void SetCoords (double x, double y, double z = 0) {m_x = x; m_y = y; m_z = z;} -/*! -@return the atomic number of the atom. -*/ - int GetZ () {return m_Z;} -/*! -@param Z: the new atomic number of the Atom. - -This method might be overrided by derived class since changing the atomic number generally changes most properties. -The default behavior is just to change the atomic number and nothing else. -*/ - virtual void SetZ (int Z); -/*! -@param Charge: the new formal charge of the Atom. - -Changes the formal charge of this Atom. -*/ - void SetCharge (char Charge) {m_Charge = Charge;} -/*! -@return the formal charge of this Atom. -*/ - char GetCharge () {return m_Charge;} -/*! -@return the atomic symbol of this Atom or NULL if the element is unknown. -*/ - const gchar* GetSymbol (); -/*! -@param pBond: a pointer to the new Bond to this Atom. - -Adds a Bond. -*/ - virtual void AddBond (Bond* pBond); -/*! -@param pBond: a pointer to the Bond to remove from this Atom. - -Removes a Bond. -*/ - virtual void RemoveBond (Bond* pBond); -/*! -@return the x coordinate of this Atom. -*/ - double x () {return m_x;} -/*! -@return the y coordinate of this Atom. -*/ - double y () {return m_y;} -/*! -@return the z coordinate of this Atom. -*/ - double z () {return m_z;} -/*! -@param i: a C++ std::map iterator. - -Use this function to retrieve the first Bond of this Atom and initialize the iterator. -@return the first Bond of this Atom or NULL if the Atom has is not bonded. -*/ - Bond* GetFirstBond (map::iterator& i); -/*! -@param i: a C++ std::map iterator initialized by Atom::GetFirstBond. - -Use this method to iterate through the list of Bond instances of this Atom. -@return the next Bond of this Atom or NULL. -*/ - Bond* GetNextBond (map::iterator& i); -/*! -@param pAtom: a pointer to an Atom instance. -@return a pointer to the Bond shared by pAtom and this Atom if it exists or NULL. -*/ - Bond* GetBond (Atom* pAtom); -/*! -@return the number of Bond instances shared by this Atom. It does not take multiplicity of bonds into account. -*/ - int GetBondsNumber () {return m_Bonds.size();} -/*! -@param xml: the xmlDoc used to save the document. -@return a pointer to the xmlNode representing this Atom or NULL if an error occured. -*/ - virtual xmlNodePtr Save (xmlDocPtr xml); -/*! -@param node: a pointer to the xmlNode containing the serialized Atom. - -Loads an atom from an xmlNode. -*/ - virtual bool Load (xmlNodePtr node); -/*! -@param node: a pointer to the xmlNode containing the serialized Atom. - -This virtual method is called at the end of the Atom::Load method. The default behavior is to do nothing. -It might be overrided for derived class when it is not convenient to override the Atom::Load method. -*/ - virtual bool LoadNode (xmlNodePtr node); -/*! -@param xml: the xmlDoc used to save the document. -@param node: a pointer to the xmlNode to which this Atom is serialized. - -This virtual method is called at the end of the Atom::Save method. The default behavior is to do nothing. -It might be overrided for derived class when it is not convenient to override the Atom::Save method. -*/ - virtual bool SaveNode (xmlDocPtr xml, xmlNodePtr node); -/*! -@param x: the x component of the transation vector. -@param y: the y component of the transation vector. -@param z: the z component of the transation vector. - -Used to move an Atom. -*/ - virtual void Move (double x, double y, double z = 0.); -/*! -@param m: the 2D Matrix of the transformation. -@param x: the x component of the center of the transformation. -@param y: the y component of the center of the transformation. - -Used to move and/or transform an atom. -*/ - virtual void Transform2D (Matrix2D& m, double x, double y); - -protected: -/*! -The atomic number of the Atom. -*/ - int m_Z; -/*! -The x coordinate of the Atom. -*/ - double m_x; -/*! -The x coordinate of the Atom. -*/ - double m_y; -/*! -The x coordinate of the Atom. -*/ - double m_z; -/*! -The charge of the Atom. -*/ - char m_Charge; -/*! -The Bond instances of the Atom. The index of the map is a pointer to the other end of the Bond. -*/ - map m_Bonds; -}; - -} //namespace gcu -#endif // GCU_ATOM_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/bond.cc gnome-chemistry-utils-0.10.9/gcu/bond.cc --- gnome-chemistry-utils-0.8.6/gcu/bond.cc 2007-04-06 18:28:29.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/bond.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,167 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * bond.cc - * - * Copyright (C) 2001-2005 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "bond.h" -#include "atom.h" -#include - -using namespace gcu; - -Bond::Bond(): Object(BondType) -{ - m_Begin = NULL; - m_End = NULL; - m_order = 0; -} - -Bond::Bond(Atom* first, Atom* last, unsigned char order): Object(BondType) -{ - m_Begin = first; - m_End = last; - m_order = order; - first->AddBond(this); - last->AddBond(this); -} - -Bond::~Bond() -{ -} - -Atom* Bond::GetAtom(int which) -{ - switch (which) - { - case 0: return m_Begin; - case 1: return m_End; - default: return NULL; - } -} - -Atom* Bond::GetAtom(Atom* pAtom, int which) -{ - return (pAtom == m_Begin)? m_End: (pAtom == m_End)? m_Begin: NULL; -} - -unsigned char Bond::GetOrder() -{ - return m_order; -} - -void Bond::SetOrder(unsigned char Order) -{ - m_order = Order; -} - -xmlNodePtr Bond::Save(xmlDocPtr xml) -{ - xmlNodePtr parent; - gchar buf[16]; - parent = xmlNewDocNode(xml, NULL, (xmlChar*)"bond", NULL); - if (!parent) return NULL; - - SaveId(parent); - - buf[0] = m_order + '0'; - buf[1] = 0; - xmlNewProp(parent, (xmlChar*)"order", (xmlChar*)buf); - - xmlNewProp(parent, (xmlChar*)"begin", (xmlChar*)m_Begin->GetId()); - - xmlNewProp(parent, (xmlChar*)"end", (xmlChar*)m_End->GetId()); - - if (!SaveNode(xml, parent)) {xmlFreeNode(parent); return NULL;} - return parent; -} - -bool Bond::Load (xmlNodePtr node) -{ - char* tmp; - xmlNodePtr child; - Object* pObject; - tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); - if (tmp) { - SetId (tmp); - xmlFree (tmp); - } - tmp = (char*) xmlGetProp (node, (xmlChar*) "order"); - if (!tmp) m_order = 1; - else { - m_order = *tmp - '0'; - xmlFree (tmp); - } - if (m_order > 4) - return false; - tmp = (char*) xmlGetProp (node, (xmlChar*) "begin"); - if (!tmp) { - child = GetNodeByName(node, (char*) "begin"); - tmp = (char*) xmlNodeGetContent(child); //necessary to read version 0.1.0 files - if (!tmp) - return false; - } - pObject = GetParent ()->GetDescendant (tmp); - xmlFree (tmp); - if (!pObject || (pObject->GetType () != AtomType)) - return false; - m_Begin = (Atom*)(pObject); - tmp = (char*) xmlGetProp (node, (xmlChar*) "end"); - if (!tmp) { - child = GetNodeByName (node, (char*) "end"); - tmp = (char*) xmlNodeGetContent (child); //necessary to read version 0.1.0 files - if (!tmp) - return false; - } - pObject = GetParent ()->GetDescendant (tmp); - xmlFree (tmp); - if (!pObject || (pObject->GetType() != AtomType)) - return false; - m_End = (Atom*)pObject; - bool result = LoadNode (node); - m_Begin->AddBond (this); - m_End->AddBond (this); - return result; -} - -bool Bond::LoadNode(xmlNodePtr) -{ - return true; -} - -bool Bond::SaveNode(xmlDocPtr, xmlNodePtr) -{ - return true; -} - -void Bond::IncOrder(int n) -{ - m_order += n; - if (m_order > 4) m_order %= 4; -} - -void Bond::Move(double x, double y, double z) -{ -} - -void Bond::Transform2D(Matrix2D& m, double x, double y) -{ -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/bond.h gnome-chemistry-utils-0.10.9/gcu/bond.h --- gnome-chemistry-utils-0.8.6/gcu/bond.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/bond.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,153 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * bond.h - * - * Copyright (C) 2002-2004 Jean Brfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_BOND_H -#define GCU_BOND_H - -#include -#include "object.h" - -using namespace std; - -namespace gcu -{ - -class Atom; - -/*!\class Bond gcu/bond.h -This class is used to represent bonds. - -*/ -class Bond: public Object -{ -public: -/*! -The default constructor. Creates a bond with order set to 0. -*/ - Bond (); -/*! -@param first: a pointer to the first Atom instance of the bond. -@param last: a pointer to the last Atom instance of the bond. -@param order: the order of the new bond. - -The distinction between first and last is important mostly for stereobonds. The Bond instance is created -and adds itself to the two atoms calling Atom::AddBond. -*/ - Bond (Atom* first, Atom* last, unsigned char order); -/*! -The destructor of Bond. -*/ - virtual ~Bond (); - -/*! -@param which: the index of the Atom instance to be returned. - -@return a pointer to the Atom instance: first Atom if which is 0, last if which is 1 or NULL. -*/ - virtual Atom* GetAtom (int which); //0 = first, 1 = last, others reserved (for multicentered bonds?) -/*! -@param pAtom: a pointer to an Atom instance. -@param which: an index which might be used for multicentered bonds (not supported); the default value should -always be used even if the implementation does not use it in this version. -@return the last atom if pAtom is the first, the first if pAtom is the last or NULL if pAtom is not concerned by this Bond. -*/ - virtual Atom* GetAtom (Atom* pAtom, int which = 0); //"which" is just a place holder for multicenter bonds; returns an atom different from pAtom - //i.e. the other end of the bond -/*! -@return the Bond order. -*/ - unsigned char GetOrder (); -/*! -@param Order: the new bond order. - -The value used is not checked. Should be a significant value (1 to 3, exceptionally 4). -*/ - void SetOrder (unsigned char Order); -/*! -@param xml: the xmlDoc used to save the document. -@return a pointer to the xmlNode representing this Bond or NULL if an error occured. -*/ - virtual xmlNodePtr Save (xmlDocPtr xml); -/*! -@param node: a pointer to the xmlNode containing the serialized Bond. - -Loads a bond from an xmlNode. -*/ - virtual bool Load (xmlNodePtr node); -/*! -@param n: the increment to add to the bond order - -If the resulting bond order is greater than 4, the remainder of the division by 4 is retained. -*/ - virtual void IncOrder (int n = 1); -/*! -@param node: a pointer to the xmlNode containing the serialized Bond. - -This virtual method is called at the end of the Bond::Load method. The default behavior is to do nothing. -It might be overrided for derived class when it is not convenient to override the Bond::Load method. -*/ - virtual bool LoadNode (xmlNodePtr node); -/*! -@param xml: the xmlDoc used to save the document. -@param node: a pointer to the xmlNode to which this Bond is serialized. - -This virtual method is called at the end of the Bond::Save method. The default behavior is to do nothing. -It might be overrided for derived class when it is not convenient to override the Bond::Save method. -*/ - virtual bool SaveNode (xmlDocPtr xml, xmlNodePtr node); -/*! -@param x: the x component of the transation vector. -@param y: the y component of the transation vector. -@param z: the z component of the transation vector. - -Does nothing. Just a slight optimization to avoid execution of Object::Move -*/ - virtual void Move (double x, double y, double z = 0.); -/*! -@param m: the 2D Matrix of the transformation. -@param x: the x component of the center of the transformation. -@param y: the y component of the center of the transformation. - -Does nothing. Just a slight optimization to avoid execution of Object::Transform2D -*/ - virtual void Transform2D (Matrix2D& m, double x, double y); - -protected: -/*! -The order of the bond. -*/ - unsigned char m_order; -/*! -A pointer to the first Atom instance of the Bond. -*/ - Atom *m_Begin; -/*! -A pointer to the last Atom instance of the Bond. -*/ - Atom *m_End;// only 2 centered bonds, other bonds should be covered by derived classes -}; - -} // namespace gcu - -#endif // GCU_BOND_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/chem3ddoc.cc gnome-chemistry-utils-0.10.9/gcu/chem3ddoc.cc --- gnome-chemistry-utils-0.8.6/gcu/chem3ddoc.cc 2007-12-13 13:18:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/chem3ddoc.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,387 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/chem3ddoc.cc - * - * Copyright (C) 2006-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "chem3ddoc.h" -#include "application.h" -#include "glview.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_FSTREAM -# include -#else -# include -#endif -#ifdef HAVE_OSTREAM -# include -#else -# include -#endif -#ifdef HAVE_SSTREAM -# include -#else -# include -#endif -#include - -using namespace gcu; - -Chem3dDoc::Chem3dDoc (): GLDocument (NULL) -{ - m_View = new GLView (this); - m_Display3D = BALL_AND_STICK; -} - -Chem3dDoc::Chem3dDoc (Application *App, GLView *View): GLDocument (App) -{ - m_View = (View)? View: new GLView (this); - m_Display3D = BALL_AND_STICK; -} - -Chem3dDoc::~Chem3dDoc () -{ -} - -void Chem3dDoc::Draw () -{ - std::vector < OBNodeBase * >::iterator i; - OBAtom* atom = m_Mol.BeginAtom (i); - guint Z; - gdouble R, w, x, y, z, x0, y0, z0, dist; - x0 = y0 = z0 = 0.0; - const gdouble* color; - while (atom) { - Z = atom->GetAtomicNum (); - x0 += atom->GetX (); - y0 += atom->GetY (); - z0 += atom->GetZ (); - atom = m_Mol.NextAtom (i); - } - x0 /= m_Mol.NumAtoms (); - y0 /= m_Mol.NumAtoms (); - z0 /= m_Mol.NumAtoms (); - atom = m_Mol.BeginAtom (i); - GLUquadricObj *quadObj ; - dist = 0; - while (atom) { - Z = atom->GetAtomicNum (); - if (Z > 0) { - R = etab.GetVdwRad (Z); - if (m_Display3D == BALL_AND_STICK) - R *= 0.2; - x = atom->GetX () - x0; - y = atom->GetY () - y0; - z = atom->GetZ () - z0; - color = gcu_element_get_default_color (Z); - if ((w = sqrt (x * x + y * y + z * z)) > dist - R) - dist = w + R; - glPushMatrix () ; - glTranslated (x, y, z) ; - glColor3d (color[0], color[1], color[2]) ; - quadObj = gluNewQuadric () ; - gluQuadricDrawStyle (quadObj, GL_FILL); - gluQuadricNormals (quadObj, GL_SMOOTH) ; - gluSphere (quadObj, R, 20, 10) ; - gluDeleteQuadric (quadObj) ; - glPopMatrix () ; - } - atom = m_Mol.NextAtom (i); - } - m_MaxDist = dist * 1.05; - std::vector < OBEdgeBase * >::iterator j; - OBBond* bond = m_Mol.BeginBond (j); - double x1, y1, z1, arot, xrot, yrot; - if (m_Display3D == BALL_AND_STICK) - while (bond) { - atom = bond->GetBeginAtom (); - if (atom->GetAtomicNum () == 0) { - bond = m_Mol.NextBond (j); - continue; - } - x = atom->GetX () - x0; - y = atom->GetY () - y0; - z = atom->GetZ () - z0; - atom = bond->GetEndAtom (); - if (atom->GetAtomicNum () == 0) { - bond = m_Mol.NextBond (j); - continue; - } - x1 = atom->GetX () - x0 - x; - y1 = atom->GetY () - y0 - y; - z1 = atom->GetZ () - z0 - z; - dist = sqrt (x1 * x1 + y1 * y1 + z1 * z1); - w = sqrt (x1 * x1 + y1 * y1); - if (w > 0) { - xrot = - y1 / w ; - yrot = x1 / w ; - arot = atan2 (w, z1) * 180. / M_PI ; - } else { - xrot = 0; - if (z1 > 0) - yrot = arot = 0.0; - else - { - yrot = 1.0; - arot = 180.0; - } - } - glPushMatrix (); - glTranslated (x, y, z); - glRotated (arot, xrot, yrot, 0.0f); - glColor3f (0.75, 0.75, 0.75); - quadObj = gluNewQuadric (); - gluQuadricDrawStyle (quadObj, GL_FILL); - gluQuadricNormals (quadObj, GL_SMOOTH); - gluCylinder (quadObj, 0.12, 0.12, dist, 20, 10); - gluDeleteQuadric (quadObj); - glPopMatrix (); - bond = m_Mol.NextBond (j); - } -} - -void Chem3dDoc::Load (char const *uri, char const *mime_type) -{ - GnomeVFSHandle *handle; - GnomeVFSFileInfo *info = gnome_vfs_file_info_new (); - GnomeVFSResult result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ); - if (result != GNOME_VFS_OK) { - gnome_vfs_file_info_unref (info); - return; - } - if (mime_type) - gnome_vfs_get_file_info_from_handle (handle, info, (GnomeVFSFileInfoOptions) 0); - else { - gnome_vfs_get_file_info_from_handle (handle, info, - (GnomeVFSFileInfoOptions)(GNOME_VFS_FILE_INFO_GET_MIME_TYPE | - GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE)); - if (!strncmp (info->mime_type, "text", 4)) - gnome_vfs_get_file_info_from_handle (handle, info, - (GnomeVFSFileInfoOptions)GNOME_VFS_FILE_INFO_GET_MIME_TYPE); - } - gchar *buf = new gchar[info->size + 1]; - GnomeVFSFileSize n; - gnome_vfs_read (handle, buf, info->size, &n); - buf[info->size] = 0; - if (n == info->size) { - if (!mime_type) - mime_type = info->mime_type; - LoadData (buf, mime_type); - if (m_App) { - char *dirname = g_path_get_dirname (uri); - m_App->SetCurDir (dirname); - g_free (dirname); - } - } - if (!strlen (m_Mol.GetTitle())) - m_Mol.SetTitle (g_path_get_basename (uri)); - gnome_vfs_file_info_unref (info); - delete [] buf; - g_free (handle); - -} - -void Chem3dDoc::LoadData (char const *data, char const *mime_type) -{ - istringstream is (data); - m_Mol.Clear (); - char *old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - OBConversion Conv; - OBFormat* pInFormat = Conv.FormatFromMIME (mime_type); - if (pInFormat) { - Conv.SetInAndOutFormats (pInFormat, pInFormat); - Conv.Read (&m_Mol,&is); - m_Empty = m_Mol.NumAtoms () == 0; - } - setlocale (LC_NUMERIC, old_num_locale); - m_View->Update (); - g_free (old_num_locale); -} - -struct VrmlBond { - double x, y, z; - double xrot, zrot, arot; -}; -typedef struct {int n; list l;} sAtom; -typedef struct {int n; list l;} sBond; - -void Chem3dDoc::OnExportVRML (string const &filename) -{ - char *old_num_locale; - double R, w, x, y, z, x0, y0, z0, dist; - int n = 0, Z; - const gdouble* color; - char const *symbol; - try { - ostringstream file; - GnomeVFSHandle *handle = NULL; - GnomeVFSFileSize fs; - GnomeVFSResult res; - map AtomsMap; - map BondsMap; - if ((res = gnome_vfs_create (&handle, filename.c_str (), GNOME_VFS_OPEN_WRITE, true, 0644)) != GNOME_VFS_OK) - throw (int) res; - old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - - file << "#VRML V2.0 utf8" << endl; - - x0 = y0 = z0 = 0.0; - std::vector < OBNodeBase * >::iterator i; - OBAtom* atom = m_Mol.BeginAtom (i); - while (atom) { - Z = atom->GetAtomicNum (); - x0 += atom->GetX (); - y0 += atom->GetY (); - z0 += atom->GetZ (); - atom = m_Mol.NextAtom (i); - } - x0 /= m_Mol.NumAtoms (); - y0 /= m_Mol.NumAtoms (); - z0 /= m_Mol.NumAtoms (); - - //Create prototypes for atoms - for (atom = m_Mol.BeginAtom (i); atom; atom = m_Mol.NextAtom (i)) { - Z = atom->GetAtomicNum (); - if (!Z) - continue; - symbol = Element::Symbol (Z); - if (AtomsMap[symbol].l.empty()) { - AtomsMap[symbol].n = n; - R = etab.GetVdwRad (Z); - if (m_Display3D == BALL_AND_STICK) - R *= 0.2; - color = gcu_element_get_default_color (Z); - file << "PROTO Atom" << n++ << " [] {Shape {" << endl << "\tgeometry Sphere {radius " << R << "}" << endl; - file << "\tappearance Appearance {" << endl << "\t\tmaterial Material {" << endl << "\t\t\tdiffuseColor " << color[0] << " " << color[1] << " " << color[2] << endl; - file << "\t\t\tspecularColor 1 1 1" << endl << "\t\t\tshininess 0.9" << endl << "\t\t}" << endl << "\t}\r\n}}" << endl; - } - AtomsMap[symbol].l.push_back(atom); - } - - //Create prototypes for bonds - double conv = M_PI / 180; - Matrix m (m_View->GetPsi () * conv, m_View->GetTheta () * conv, m_View->GetPhi () * conv, euler); - if (m_Display3D == BALL_AND_STICK) { - std::vector < OBEdgeBase * >::iterator b; - OBBond* bond = m_Mol.BeginBond (b); - double x1, y1, z1; - struct VrmlBond vb; - n = 0; - while (bond) { - atom = bond->GetBeginAtom (); - if (atom->GetAtomicNum () == 0) { - bond = m_Mol.NextBond (b); - continue; - } - vb.x = atom->GetX () - x0; - vb.y = atom->GetY () - y0; - vb.z = atom->GetZ () - z0; - atom = bond->GetEndAtom (); - if (atom->GetAtomicNum () == 0) { - bond = m_Mol.NextBond (b); - continue; - } - x1 = atom->GetX () - x0 - vb.x; - y1 = atom->GetY () - y0 - vb.y; - z1 = atom->GetZ () - z0 - vb.z; - vb.x += x1 / 2; - vb.y += y1 / 2; - vb.z += z1 / 2; - m.Transform(vb.x, vb.y, vb.z); - m.Transform(x1, y1, z1); - dist = sqrt (x1 * x1 + y1 * y1 + z1 * z1); - w = sqrt (x1 * x1 + z1 * z1); - if (w > 0) { - vb.xrot = z1 / w; - vb.zrot = -x1 / w; - vb.arot = atan2 (w, y1); - } else { - vb.zrot = 0.; - vb.xrot = 0.; - vb.arot = 0.0; - } - char *buf = g_strdup_printf ("%g", dist); - if (BondsMap[buf].l.empty()) { - BondsMap[buf].n = n; - file << "PROTO Bond" << n++ << " [] {Shape {" << endl << "\tgeometry Cylinder {radius " << 0.12 << "\theight " << dist << "}" << endl; - file << "\tappearance Appearance {" << endl << "\t\tmaterial Material {" << endl << "\t\t\tdiffuseColor " << .75 << " " << .75 << " " << .75 << endl; - file << "\t\t\tspecularColor 1 1 1" << endl << "\t\t\tshininess 0.9" << endl << "\t\t}" << endl << "\t}\r\n}}" << endl; - } - BondsMap[buf].l.push_back (vb); - bond = m_Mol.NextBond (b); - } - } - - //world begin - file << "Background{skyColor " << m_View->GetRed () << " " << m_View->GetBlue () << " " << m_View->GetGreen () << "}" << endl; - file << "Viewpoint {fieldOfView " << m_View->GetAngle () / 90*1.570796326794897 << "\tposition 0 0 " << m_View->GetRadius () << "}" << endl; - file << "Transform {" << endl << "\tchildren [" << endl; - - map::iterator k, kend = AtomsMap.end (); - list::iterator j, jend; - for (k = AtomsMap.begin (); k != kend; k++) { - jend = (*k).second.l.end (); - for (j = (*k).second.l.begin (); j != jend; j++) { - x = (*j)->GetX (); - y = (*j)->GetY (); - z = (*j)->GetZ (); - m.Transform(x, y, z); - file << "\t\tTransform {translation " << x << " " << y << " " << z << " children [Atom" << (*k).second.n << " {}]}" << endl; - } - (*k).second.l.clear(); - } - AtomsMap.clear(); - - map::iterator l, lend = BondsMap.end (); - list::iterator mc, mend; - for (l = BondsMap.begin (); l != lend; l++) { - mend = (*l).second.l.end (); - for (mc = (*l).second.l.begin (); mc != mend; mc++) { - file << "\t\tTransform {" << endl << "\t\t\trotation " << (*mc).xrot << " " << 0. << " " << (*mc).zrot << " " << (*mc).arot << endl; - file << "\t\t\ttranslation " << (*mc).x << " " << (*mc).y << " " << (*mc).z << endl\ - << "\t\t\tchildren [Bond" << (*l).second.n << " {}]}" << endl; - } - } - - //end of the world - file << "\t]" << endl << "}" << endl; - - setlocale(LC_NUMERIC, old_num_locale); - g_free(old_num_locale); - if ((res = gnome_vfs_write (handle, file.str ().c_str (), (GnomeVFSFileSize) file.str ().size (), &fs)) != GNOME_VFS_OK) - throw (int) res; - gnome_vfs_close (handle); - } - catch (int n) { - cerr <<"gnome-vfs error" << n << endl; - } -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/chem3ddoc.h gnome-chemistry-utils-0.10.9/gcu/chem3ddoc.h --- gnome-chemistry-utils-0.8.6/gcu/chem3ddoc.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/chem3ddoc.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,132 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/chem3ddoc.h - * - * Copyright (C) 2006-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_CHEM3D_DOCUMENT_H -#define GCU_CHEM3D_DOCUMENT_H - -#include -#include -#include - -using namespace OpenBabel; - -namespace gcu { - -/*! \enum Display3DMode - 3D display mode. - Possible values are: - - BALL_AND_STICK: use ball and stick representation; atoms are represented by spheres with a radius equal to 20% of - their van der Waals radius and bonds are displayed as cylinders. - - SPACEFILL: use space filling representation; atoms are represented by spheres with a radius equal - their van der Waals radius; bonds are not displayed. - . -*/ -typedef enum -{ - BALL_AND_STICK, - SPACEFILL -} Display3DMode; - -class Application; - -/*! -\class Chem3dDoc gcu/chem3ddoc.h - -Document class for a molecule. Embeds an OpenBabel::OBMol object. -*/ -class Chem3dDoc: public GLDocument -{ -public: -/*! -Default constructor -*/ - Chem3dDoc (); -/*! -@param App the application. -@param View: an optional already existing GLView instance. -*/ - Chem3dDoc (Application *App, GLView *View); -/*! -Default destructor -*/ - virtual ~Chem3dDoc (); - -/*! -Displays the molecule using OpenGL. -*/ - void Draw (); - -/*! -@return true if the molecule have no atom, false otherwise. -*/ - bool IsEmpty () {return m_Mol.NumAtoms () == 0;} - -/*! -@param uri the uri of the molecule file. -@param mime_type the mime type of the molecule file. - -Loads a molecule from the provided uri using OpenBabel. -*/ - void Load (char const *uri, char const *mime_type); - -/*! -@param data the inline data. -@param mime_type the mime type of the data. - -Loads a molecule from the provided data using OpenBabel. -*/ - void LoadData (char const *data, char const *mime_type); - -/*! -@return the title of the molecule if any. -*/ - const char *GetTitle () {return m_Mol.GetTitle ();} - -/*! -@param filename the name of the vrml file to which the data should be written. - -Exports the embedded molecule as a vrml scene. -*/ - void OnExportVRML (string const &filename); - -private: - OBMol m_Mol; - -/*!\fn SetDisplay3D(Display3DMode mode) -@param mode: the new mode. - -Sets the display mode to one of the available Display3DMode values. -*/ -/*!\fn GetDisplay3D() -@return the current mode. -*/ -/*!\fn GetRefDisplay3D() -@return the current mode as a reference. -*/ -GCU_PROP (Display3DMode, Display3D); -}; - -} // namespace gcu - -#endif // GCU_CHEM3D_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/chemistry.cc gnome-chemistry-utils-0.10.9/gcu/chemistry.cc --- gnome-chemistry-utils-0.8.6/gcu/chemistry.cc 2007-12-13 13:18:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/chemistry.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,129 +0,0 @@ -// -*- C -*- - -/* - * Gnome Chemisty Utils - * chemistry.cc - * - * Copyright (C) 2003-2005 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "chemistry.h" -#include "element.h" -#include - -extern "C" -{ - -using namespace gcu; -const gdouble* gcu_element_get_default_color(gint Z) -{ - return Element::GetElement(Z)->GetDefaultColor(); -} - -const gchar* gcu_element_get_symbol(gint Z) -{ - return Element::Symbol(Z); -} - -const gchar* gcu_element_get_name(gint Z) -{ - return Element::GetElement(Z)->GetName(); -} - -gint gcu_element_get_Z(gchar* symbol) -{ - return Element::Z(symbol); -} - -gboolean gcu_element_get_radius(GcuAtomicRadius* radius) -{ - return Element::GetRadius(radius); -} - -gboolean gcu_element_get_electronegativity(GcuElectronegativity* en) -{ - return Element::GetElectronegativity(en); -} - -const GcuAtomicRadius** gcu_element_get_radii(gint Z) -{ - return Element::GetElement(Z)->GetRadii(); -} - -const GcuElectronegativity** gcu_element_get_electronegativities(gint Z) -{ - return Element::GetElement(Z)->GetElectronegativities(); -} - -void gcu_element_load_databases (char* name, ...) -{ - va_list l; - char const *base = name; - va_start (l, name); - while (base != NULL) { - if (!strcmp (base, "radii")) - Element::LoadRadii (); - else if (!strcmp (base, "elecprops")) - Element::LoadElectronicProps (); - else if (!strcmp (base, "isotopes")) - Element::LoadIsotopes (); - base = va_arg (l, char const*); - } - va_end (l); -} - -gchar* gcu_value_get_string (GcuValue const *value) -{ - gchar *format, *str; - if (value->delta > 0) { - format = g_strdup_printf ("%%.%df(%%d)", value->prec); - str = g_strdup_printf (format, value->value, value->delta); - } else { - format = g_strdup_printf ("%%.%df", value->prec); - str = g_strdup_printf (format, value->value); - } - g_free (format); - return str; -} - -gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value) -{ - gchar *format, *str; - if (value->delta > 0) { - format = g_strdup_printf ("%%.%df(%%d) %%s", value->prec); - str = g_strdup_printf (format, value->value, value->delta, value->unit); - } else { - format = g_strdup_printf ("%%.%df %%s", value->prec); - str = g_strdup_printf (format, value->value, value->unit); - } - g_free (format); - return str; -} - -GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int rank) -{ - return Element::GetElement(Z)->GetIonizationEnergy (rank); -} - -GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int rank) -{ - return Element::GetElement(Z)->GetElectronAffinity (rank); -} - -} //extern "C" diff -Nru gnome-chemistry-utils-0.8.6/gcu/chemistry.h gnome-chemistry-utils-0.10.9/gcu/chemistry.h --- gnome-chemistry-utils-0.8.6/gcu/chemistry.h 2006-12-23 16:02:47.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/chemistry.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,301 +0,0 @@ -// -*- C -*- - -/* - * Gnome Chemisty Utils - * chemistry.h - * - * Copyright (C) 2003-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - - -/*! \mainpage - \section intro Introduction -The Gnome Chemistry Utils Library provides some widgets and C++ classes related to chemistry. - -Available widgets are: -- GtkPeriodic: a periodic table of the elements. -- GtkComboPeriodic: a combo box witha dropdown periodic table widget. -- GtkCrystalViewer: a crystal structure viewer. -- GtkChem3DViewer: a 3D molecular structure viewer. This widget is also available as a Bonobo control. - -The C++ classes are grouped in the gcu namespace. A C interface exists to use some of the -functionalities offered in these classes; the corresponding documentation is available in the -chemistry.h file. -*/ - -#ifndef GCU_CHEMISTRY_H -#define GCU_CHEMISTRY_H - -#include - -/** \file -* C interface to the chemistry library. - -To use this file, add the following line to your source file: -\code -#include -\endcode -*/ - -G_BEGIN_DECLS - -/** -The greatest atomic number known in this version of the Gnome Chemictry Utils -*/ -#define MAX_ELT 116 - -/** gcu_spin_state -* gcu_spin_state describes the spin state of a central atom in a complex. -* Possible values are: -* - GCU_N_A_SPIN: unknown, -* - GCU_LOW_SPIN: low spin, -* - GCU_HIGH_SPIN: high spin. -* -* This enumeration is used in the GcuAtomicRadius structure. -*/ -enum gcu_spin_state -{ - GCU_N_A_SPIN, - GCU_LOW_SPIN, - GCU_HIGH_SPIN -}; - -/** gcu_radius_type -* gcu_radius_type describes the type of the atomic radius -* Possible values are: -* - GCU_RADIUS_UNKNOWN: unknown,. -* - GCU_ATOMIC: atomic radius, -* - GCU_IONIC: ionic radius, -* - GCU_METALLIC: metallic radius, -* - GCU_COVALENT: covalent radius, -* - GCU_VAN_DER_WAALS: van der Waals radius, -* -* This enumeration is used in the GcuAtomicRadius structure. -*/ -enum gcu_radius_type -{ - GCU_RADIUS_UNKNOWN, - GCU_ATOMIC, - GCU_IONIC, - GCU_METALLIC, - GCU_COVALENT, - GCU_VAN_DER_WAALS -}; - -/** GcuValue -Structure used to store a numerical value. -*/ -typedef struct -{ - /** The value. */ - double value; - /** The precision (number of significative decimal figures). */ - int prec; - /** The standard error (* 10^prec). */ - int delta; -} GcuValue; - -/** GcuDimensionalValue -Structure used to store a dimensional value. -*/ -typedef struct -{ - /** The value.*/ - double value; - /** The precision (number of significative decimal figures).*/ - int prec; - /** The standard error (* 10^prec). */ - int delta; - /** The unit symbol.*/ - const char *unit; -} GcuDimensionalValue; - -/** GcuAtomicRadius -* Structure used to describe an atomic radius. -*/ -typedef struct -{ - /** The atomic number. */ - unsigned char Z; - /** The radius type (unknown, ionic, metallic, covalent, or van der Waals).*/ - enum gcu_radius_type type; - /** The radius value (the unit should always be pm). */ - GcuDimensionalValue value; - /** The charge of the atom (or ion). */ - char charge; - /** The scale name, e.g. "Pauling" or "Shannon". */ - char const* scale; - /** the coordination number of the atom or -1 if unknown. */ - char cn; //coordination number: -1: unspecified - /** The spin state (unknown, low or high).*/ - enum gcu_spin_state spin; -} GcuAtomicRadius; - -/*! GcuElectronegativity -Structure used to describe an electronegativity value. -*/ -typedef struct -{ - /** The atomic number. */ - unsigned char Z; - /*! The electronegativity value.*/ - GcuValue value; - /** The scale name, e.g. "Pauling" or "Mulliken". */ - char const *scale; -} GcuElectronegativity; - -/*! GcuIsotope -Structure used to describe an isotope -*/ -typedef struct -{ - /** The nucleon number. */ - unsigned char A; - /** The name of the isotope if any.*/ - char *name; - /*! The terrestrial percent abundance.*/ - GcuValue abundance; - /*! The mass of an atom in atomic units.*/ - GcuValue mass; - /*! The spin of an atom multipiled by 2.*/ - char spin; - /*! The decay modes as a comma separated list.*/ - char *decay_modes; - /*! The decay period.*/ - GcuDimensionalValue decay_period; -} GcuIsotope; - -/*! -\param Z: the atomic number of the element. - -Retreives the default color used for the element. -\return an array of three double values for the red, green and blue components of the color. -*/ -const gdouble* gcu_element_get_default_color (gint Z); -/*! -gcu_element_get_symbol: -\param Z: the atomic number of the element. -\return the symbol of the element. -*/ -const gchar* gcu_element_get_symbol (gint Z); -/*! -\param Z: the atomic number of the element. -\return the name of the element in the current locale or in english if the current locale is not supported in the database. -*/ -const gchar* gcu_element_get_name (gint Z); -/*! -gcu_element_get_Z: -\param symbol: the symbol of the element (e.g. "C" ot "Pt"). -\return the atomic number of the element. -*/ -gint gcu_element_get_Z (gchar* symbol); -/*! -\param radius: a pointer to a GcuAtomicRadius structure. - -Before calling this function, most fields in the GcuAtomicRadius structure must be filled: -- Z: the atomic number, mandatory -- type: the type of the radius searched -- charge: the charge of the atom. 0 for all radii except ionic radii. -- cn: the coordination number or -1 if not significant -- spin: the spin state or GCU_N_A_SPIN if not significant -- scale: the name of the scale (e.g. "Pauling") or NULL - -The programs searches a value corresponding to the fields having a non default value. If one is found -the other fields are given the corresponding values f the first match before returning. - -\return TRUE if a radius has been found and FALSE if not. - -*/ -gboolean gcu_element_get_radius (GcuAtomicRadius* radius); -/*! -\param en: a pointer to a GcuElectronegativity structure. - -Before calling this function, the following fields in the GcuElectronegativity structure must be filled: -- Z: the atomic number, mandatory -- scale: the name of the scale (e.g. "Pauling") or NULL - -The programs searches an electronegativity value for the element in the scale if given. If one is found -the value and the scale (if NULL on calling) are given the corresponding values of the first match before returning. - -\return TRUE if a match has been found and FALSE if not. -*/ -gboolean gcu_element_get_electronegativity (GcuElectronegativity* en); -/*! -\param Z: the atomic number. -\param N: the rank of the ionization. - -The program searches for the Nth ionization energy value for the element and returns -it if found. - -\return the ionization energy as a GcuDimensionalValue if known or NULL. -*/ -GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int N); -/*! -\param Z: the atomic number. -\param N: the rank of the extra electron. - -For some elements, second and even third electron affinities have been estimated. -The program searches the Nth electron affinity value for the element and returns -it if found. -A value of 0 means that the anion is unstable in the gaseous phase and that no better -etimation is available. - -\return the electronic affinity as a GcuDimensionalValue if known or NULL. -*/ -GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int N); -/*! -\param Z: the atomic number of the element. - -\return a pointer to the array of pointers to GcuAtomicRadius structures for all known radii for the element. -Last value in the array is NULL. -*/ -const GcuAtomicRadius** gcu_element_get_radii (gint Z); -/*! -\param Z: the atomic number of the element. - -\return a pointer to the array of pointers to GcuElectronegativity structures for all known electronegativities for the element. -Last value in the array is NULL. -*/ -const GcuElectronegativity** gcu_element_get_electronegativities (gint Z); -/*! -\param name: name of a database to load such as "radii", "elecprops", "isotopes", -the first name is followed by a list of other database terminated by NULL. - -Loads the listed databases. -*/ -void gcu_element_load_databases (char* name, ...); - -/*! -\param value: the GcuValue to represent as a string. - -\return the GcuValue as a string taking into account the precision and -incertitude -*/ -gchar* gcu_value_get_string (GcuValue const *value); - -/*! -\param value: the GcuDimensionalValue to represent as a string. - -\return the GcuDimensionalValue as a string taking into account the precision and -incertitude -*/ -gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value); - -G_END_DECLS - -#endif //GCU_CHEMISTRY_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalatom.cc gnome-chemistry-utils-0.10.9/gcu/crystalatom.cc --- gnome-chemistry-utils-0.8.6/gcu/crystalatom.cc 2007-04-06 18:28:29.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/crystalatom.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,226 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * crystalatom.cc - * - * Copyright (C) 2002-2005 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "element.h" -#include "crystalatom.h" -#include "element.h" -#include "xml-utils.h" -#include -#include -#include - -using namespace gcu; - -CrystalAtom::CrystalAtom(): Atom() -{ - m_Radius.Z = (unsigned char) GetZ(); - m_Radius.type = GCU_RADIUS_UNKNOWN; - m_Radius.scale = NULL; - m_Radius.spin = GCU_N_A_SPIN, - m_Radius.charge = 0; - m_Radius.value.value = 0.0; - m_Radius.value.prec = 0; - m_Radius.cn = -1; - m_bCustomColor = false; - m_fRed = m_fBlue = m_fGreen = 0; - m_fAlpha = 1; - m_nCleave = 0; -} - -CrystalAtom::~CrystalAtom() -{ -} - -CrystalAtom::CrystalAtom(int Z, double x, double y, double z): Atom(Z, x, y, z) -{ - m_Radius.Z = (unsigned char) GetZ(); - m_Radius.type = GCU_RADIUS_UNKNOWN; - m_Radius.scale = NULL; - m_Radius.spin = GCU_N_A_SPIN, - m_Radius.charge = 0; - m_Radius.value.value = 0.0; - m_Radius.value.prec = 0; - m_Radius.cn = -1; - m_fAlpha = 1.; - if (Z) SetDefaultColor(); - m_nCleave = 0; -} - -CrystalAtom::CrystalAtom(CrystalAtom& caAtom): Atom(caAtom) -{ - m_Radius.scale = NULL; - SetRadius(caAtom.m_Radius); - m_bCustomColor = caAtom.m_bCustomColor; - m_fRed = caAtom.m_fRed; - m_fGreen = caAtom.m_fGreen; - m_fBlue = caAtom.m_fBlue; - m_fAlpha = caAtom.m_fAlpha; - m_nCleave = 0; -} - -CrystalAtom& CrystalAtom::operator=(CrystalAtom& caAtom) -{ - SetZ(caAtom.GetZ()); - double x, y, z; - caAtom.GetCoords(&x, &y, &z); - SetCoords(x, y, z); - SetRadius(caAtom.m_Radius); - m_bCustomColor = caAtom.m_bCustomColor; - m_fRed = caAtom.m_fRed ; - m_fGreen = caAtom.m_fGreen ; - m_fBlue = caAtom.m_fBlue ; - m_fAlpha = caAtom.m_fAlpha ; - m_nCleave = 0 ; - return *this ; -} - -void CrystalAtom::Draw() -{ - if (m_nCleave) return ; - GLUquadricObj *quadObj ; - glPushMatrix() ; - glTranslated(y(), z(), x()) ; - glColor4f(m_fRed, m_fGreen, m_fBlue, m_fAlpha) ; - quadObj = gluNewQuadric() ; - gluQuadricDrawStyle(quadObj, GL_FILL); - gluQuadricNormals(quadObj, GL_SMOOTH) ; - gluSphere(quadObj, m_Radius.value.value, 20, 10) ; - gluDeleteQuadric(quadObj) ; - glPopMatrix() ; -} - -void CrystalAtom::SetColor(float red, float green, float blue, float alpha) -{ - m_bCustomColor = true; - m_fRed = red ; - m_fGreen = green ; - m_fBlue = blue ; - m_fAlpha = alpha ; -} - -void CrystalAtom::SetDefaultColor() -{ - m_bCustomColor = false; - double *Colors = Element::GetElement(GetZ())->GetDefaultColor(); - m_fRed = (float) Colors[0]; - m_fGreen = (float) Colors[1]; - m_fBlue = (float) Colors[2]; -} - -void CrystalAtom::GetColor(double *red, double *green, double *blue, double *alpha) -{ - *red = m_fRed ; - *green = m_fGreen ; - *blue = m_fBlue ; - *alpha = m_fAlpha ; -} - -void CrystalAtom::SetSize(double r) -{ - m_Radius.Z = (unsigned char) GetZ(); - m_Radius.type = GCU_RADIUS_UNKNOWN; - m_Radius.scale = NULL; - m_Radius.spin = GCU_N_A_SPIN, - m_Radius.charge = 0; - m_Radius.value.value = 0.0; - m_Radius.value.prec = 0; - m_Radius.cn = -1; - m_Radius.value.value = 0.0; - m_Radius.value.prec = 0; -} - - -double CrystalAtom::GetSize() -{ - return m_Radius.value.value; -} - -bool CrystalAtom::operator==(CrystalAtom& caAtom) -{ - return (x() == caAtom.x()) && - (y() == caAtom.y()) && - (z() == caAtom.z()) ; -} - -double CrystalAtom::ScalProd(int h, int k, int l) -{ - return x() * h + y() * k + z() * l ; -} - -double CrystalAtom::Distance(double dx, double dy, double dz, bool bFixed) -{ - if ((m_nCleave > 0) && ! bFixed) return 0. ; - dx -= x() ; - dy -= y() ; - dz -= z() ; - return sqrt(dx * dx + dy * dy + dz * dz) + m_Radius.value.value ; -} - -void CrystalAtom::NetToCartesian(double a, double b, double c, double alpha, double beta, double gamma) -{ - double dx = x() * a ; - double dy = y() * b ; - double dz = z() * c ; - SetCoords(dx * sqrt(1-square(cos(beta)) - square((cos(gamma) - cos(beta)*cos(alpha))/sin(alpha))), - dx * (cos(gamma) - cos(beta)*cos(alpha))/sin(alpha) + dy * sin(alpha), - (dx * cos(beta) + dy * cos(alpha) + dz)); -} - -bool CrystalAtom::SaveNode (xmlDocPtr xml, xmlNodePtr node) -{ - if (!WriteRadius (xml, node, m_Radius)) - return false; - - if (m_bCustomColor && !WriteColor (xml, node, NULL, m_fRed, m_fGreen, m_fBlue, m_fAlpha)) - return false; - - return true; -} - -bool CrystalAtom::LoadNode(xmlNodePtr node) -{ - xmlNodePtr child = FindNodeByNameAndId(node, "color"); - if (!child) SetDefaultColor(); - else - { - if (!ReadColor(node, NULL, &m_fRed, &m_fGreen, &m_fBlue, &m_fAlpha)) return false; - m_bCustomColor = true; - } - child = FindNodeByNameAndId(node, "radius"); - if (!child) return false; - m_Radius.Z = GetZ(); - bool result = ReadRadius(child, m_Radius); - return result; -} - -void CrystalAtom::SetRadius(const GcuAtomicRadius& r) -{ - m_Radius.type = r.type; - m_Radius.value = r.value; - m_Radius.charge = r.charge; - m_Radius.scale = r.scale; - m_Radius.cn = r.cn; //coordination number: -1: unspecified - m_Radius.spin = r.spin; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalatom.h gnome-chemistry-utils-0.10.9/gcu/crystalatom.h --- gnome-chemistry-utils-0.8.6/gcu/crystalatom.h 2006-12-26 11:11:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystalatom.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,234 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * crystalatom.h - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef CRYSTAL_ATOM_H -#define CRYSTAL_ATOM_H - -#include -#include -#include -#include -#include "atom.h" -#include "chemistry.h" - -using namespace std; - -namespace gcu -{ - -/*! \class CrystalAtom gcu/crystalatom.h -Used to represent atoms in a crystal. -*/ -class CrystalAtom : public Atom -{ -public: -/* -The default constructor. -*/ - CrystalAtom (); -/* -The destructor of CrystalAtom. -*/ - virtual ~CrystalAtom (); - -public : -/* -@param Z: the atomic number of the new atom. -@param x: the x coordinate of the new atom. -@param y: the y coordinate of the new atom. -@param z: the z coordinate of the new atom. - -Creates an atom. -*/ - CrystalAtom (int Z, double x, double y, double z); -/*! -@param caAtom: the CrystalAtom to duplicate. - -Creates a new CrystalAtom identical to caAtom. -*/ - CrystalAtom (CrystalAtom& caAtom); -/* -@param caAtom: the Atom to copy. - -@return a CrystalAtom identical to caAtom. -*/ - CrystalAtom& operator= (CrystalAtom& caAtom); - -/*! -Draws the atom inside the active OpenGL window. -*/ - void Draw (); -/*! -@param red: the red component of the color. -@param green: the green component of the color. -@param blue: the blue component of the color. -@param alpha: the alpha component of the color. - -Sets a custom color to the atom. -*/ - void SetColor (float red, float green, float blue, float alpha); -/*! -Gives the atom the default color. -*/ - void SetDefaultColor (); -/*! -@return: true if the color is user defined and false if it is the default color. -*/ - bool HasCustomColor () {return m_bCustomColor;} -/*! -@param red: a pointer to the red component. -@param green: a pointer to the green component. -@param blue: a pointer to the blue component. -@param alpha: a pointer to the alpha component. - -Used to retreive the color used in the representation of the atom. Mainly useful for user defined -colors. -*/ - void GetColor (double *red, double *green, double *blue, double *alpha); -/*! -@param r: the new value of the atomic radius. - -Sets the value of the radius (in pm). -*/ - void SetSize (double r); -/*! -@return the value of the radius (in pm). -*/ - double GetSize (); -/*! -@param caAtom: a CrystalAtom instance. -@return true if the atoms are at the same position and false if their positions are different. -*/ - bool operator== (CrystalAtom& caAtom); -/*! -Method used to cleave an atom. The inverse operation does not exist since the whole crystal must be recalculated -after a change in the definition. -*/ - void Cleave () {m_nCleave++;} -/*! -@param h: the h Miller index of a plane. -@param k: the k Miller index of a plane. -@param l: the l Miller index of a plane. - -@return the product hx+ky+lz where x, y and z are the coordinates of the atom. This makes sense only if coordinates -are related to the net and are not the cartesian coordinates. This method should not be called after NetToCartesian(). -*/ - double ScalProd (int h, int k, int l); -/*! -@param a: the a parameter of the unit cell. -@param b: the b parameter of the unit cell. -@param c: the c parameter of the unit cell. -@param alpha: the alpha angle of the unit cell. -@param beta: the beta angle of the unit cell. -@param gamma: the gamma angle of the unit cell. - -Converts the coordinates of the atom from net related ones to cartesian. Initially, atoms are defined by their -position relative to the unit cell and the coordinates must be transformed to the cartesian ones before -displaying the atom. -*/ - void NetToCartesian (double a, double b, double c, double alpha, double beta, double gamma); -/*! -@param x: the x coordinate of the center. -@param y: the y coordinate of the center. -@param z: the z coordinate of the center. -@param bFixed: tells if cleaved atoms are taken into account. - -This helper method is called when searching for the size of the crystal. When some cleavages are defined, -the procedure cn take into account atoms cleaved to get the same position in the view for the cleaved crystal -than for the whole crystal. If bFixed is true, all atoms are taken into account. - -@return the distance of the atom to the center of the view or 0 if bFixed is false and the atom cleaved. -*/ - double Distance (double x, double y, double z, bool bFixed); -/*! -@return the value of the radius (in pm). -*/ - double r () {return m_Radius.value.value;} -/*! -@return the GcuAtomicRadius containing the caracteristics of the atom radius. -*/ - const GcuAtomicRadius& GetRadius () {return m_Radius;} -/*! -@param r: a GcuAtomicRadius with the caracteristics of the atom radius. -*/ - void SetRadius (const GcuAtomicRadius& r); -/*! -@return true if the atom is cleaved by at least one cleavage or false if the atom is not cleaved at all. -*/ - bool IsCleaved () {return m_nCleave != 0;} -/*! -@param xml: the xmlDoc used to save the document. -@param node: a pointer to the xmlNode to which this Atom is serialized. - -Saves the color and the radius of the atom. -*/ - virtual bool SaveNode (xmlDocPtr xml, xmlNodePtr node); -/*! -@param node: a pointer to the xmlNode containing the serialized Atom. - -Loads the color and the radius of the atom. -*/ - virtual bool LoadNode (xmlNodePtr node); - -protected: -/*! -The blue component of the color of the sphere representing the atom. -*/ - float m_fBlue; -/*! -The red component of the color of the sphere representing the atom. -*/ - float m_fRed; -/*! -The green component of the color of the sphere representing the atom. -*/ - float m_fGreen; -/*! -The alpha component of the color of the sphere representing the atom. -*/ - float m_fAlpha; -/*! -False if the color used is the default color and true if it is a user defined color. -*/ - bool m_bCustomColor; -/*! -The GcuAtomicRadius containing the radius caracteristics of the atom. -*/ - GcuAtomicRadius m_Radius; -/*! -When cleavages (see CrystalCleavage class documentation) are defined, the atom might be cleaved. m_nCleave is -the number of CrystalCleavage instances which remove the atom. If this member is not 0, the atom will -not be displayed. -*/ - int m_nCleave; //0 if not cleaved -}; - -/*! -a list of pointers to CrystalAtom instances derived from std::list. -*/ -typedef list CrystalAtomList; - -}// namespace gcu - -#endif // CRYSTAL_ATOM_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalcleavage.cc gnome-chemistry-utils-0.10.9/gcu/crystalcleavage.cc --- gnome-chemistry-utils-0.8.6/gcu/crystalcleavage.cc 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystalcleavage.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,122 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemisty Utils - * crystalcleavage.cc - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "crystalcleavage.h" -#include - -using namespace gcu; - -CrystalCleavage::CrystalCleavage() -{ -} - -CrystalCleavage::~CrystalCleavage() -{ -} - -CrystalCleavage::CrystalCleavage(CrystalCleavage& ccClivage) -{ - m_nh = ccClivage.m_nh ; - m_nk = ccClivage.m_nk ; - m_nl = ccClivage.m_nl ; - m_nPlanes = ccClivage.m_nPlanes ; -} - -CrystalCleavage& CrystalCleavage::operator=(CrystalCleavage& ccClivage) -{ - m_nh = ccClivage.m_nh ; - m_nk = ccClivage.m_nk ; - m_nl = ccClivage.m_nl ; - m_nPlanes = ccClivage.m_nPlanes ; - return *this ; -} - -bool CrystalCleavage::operator==(CrystalCleavage& ccClivage) -{ - return ((m_nh == ccClivage.m_nh) && (m_nk == ccClivage.m_nk) && (m_nl == ccClivage.m_nl)); -} - -xmlNodePtr CrystalCleavage::Save(xmlDocPtr xml) -{ - xmlNodePtr node; - gchar buf[256]; - node = xmlNewDocNode(xml, NULL, (xmlChar*)"cleavage", NULL); - if (!node) return NULL; - - snprintf(buf, sizeof(buf), "%d", m_nh); - xmlSetProp(node, (xmlChar*)"h", (xmlChar*)buf); - - snprintf(buf, sizeof(buf), "%d", m_nk); - xmlSetProp(node, (xmlChar*)"k", (xmlChar*)buf); - - snprintf(buf, sizeof(buf), "%d", m_nl); - xmlSetProp(node, (xmlChar*)"l", (xmlChar*)buf); - - snprintf(buf, sizeof(buf), "%d", m_nPlanes); - xmlSetProp(node, (xmlChar*)"planes", (xmlChar*)buf); - - return node; -} - -bool CrystalCleavage::Load (xmlNodePtr node) -{ - char *txt; - txt = (char*) xmlGetProp (node, (xmlChar*) "h"); - if (txt) { - if (sscanf (txt, "%d", &m_nh) != 1) { - xmlFree (txt); - return false; - } - xmlFree (txt); - } else - return false; - txt = (char*) xmlGetProp (node, (xmlChar*) "k"); - if (txt) { - if (sscanf(txt, "%d", &m_nk) != 1) { - xmlFree (txt); - return false; - } - xmlFree (txt); - } else - return false; - txt = (char*) xmlGetProp (node, (xmlChar*) "l"); - if (txt) { - if (sscanf(txt, "%d", &m_nl) != 1) { - xmlFree (txt); - return false; - } - xmlFree (txt); - } else - return false; - txt = (char*) xmlGetProp (node, (xmlChar*) "planes"); - if (txt) { - if (sscanf(txt, "%d", &m_nPlanes)!= 1) { - xmlFree (txt); - return false; - } - xmlFree (txt); - } else - return false; - return true; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalcleavage.h gnome-chemistry-utils-0.10.9/gcu/crystalcleavage.h --- gnome-chemistry-utils-0.8.6/gcu/crystalcleavage.h 2006-12-26 11:11:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystalcleavage.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,125 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemisty Utils - * crystalcleavage.h - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef CRYSTAL_CLEAVAGE_H -#define CRYSTAL_CLEAVAGE_H - -#include -#include - -namespace gcu -{ - -/*! \class CrystalCleavage gcu/crystalcleavage.h -Represents cleavages of a cystal along a plane defined by its Miller indices. A defined number -of planes are removed by each cleavage. These are those for which the value hx + ky + lz are the greatest. To -remove planes frome the other side of the crystal, change the sign of the three Miller indices. -*/ -class CrystalCleavage -{ -public: -/* -The default constructor. -*/ - CrystalCleavage (); -/*! -@param ccCleavage: the cleavage instance to copy. - -The copy constructor. -*/ - CrystalCleavage (CrystalCleavage& ccCleavage) ; -/* -The destructor of CrystalAtom. -*/ - virtual ~CrystalCleavage (); - -/*! -@return the number of planes cleaved. -*/ - int& Planes () {return m_nPlanes ;} -/*! -@return the Miller's h index of the cleavage plane. -*/ - int& h () {return m_nh ;} -/*! -@return the Miller's k index of the cleavage plane. -*/ - int& k () {return m_nk ;} -/*! -@return the Miller's l index of the cleavage plane. -*/ - int & l () {return m_nl ;} -/*! -@param ccCleavage: the cleavage to copy. - -@return a CrystalCleavage identical to ccCleavage. -*/ - CrystalCleavage& operator= (CrystalCleavage& ccCleavage) ; -/*! -@param ccCleavage: a CrystalCleavage instance. -@return true if the two cleavages have the same Miller indices and false otherwise. -*/ - bool operator== (CrystalCleavage& ccCleavage) ; -/*! - @param xml: the xmlDoc used to save the document. - - Used to save the cleavage to the xmlDoc. Each serializable Object should implement this virtual method. - @return the xmlNode containing the serialized cleavage. -*/ - xmlNodePtr Save (xmlDocPtr xml); -/*! -@param node: a pointer to the xmlNode containing the serialized cleavage. - -Used to load an CrystalCleavage instance in memory. The CrystalCleavage must already exist. -@return true on succes, false otherwise. -*/ - bool Load (xmlNodePtr node); - -protected: -/*! -Miller's h index. -*/ - int m_nh; -/*! -Miller's k index. -*/ - int m_nk; -/*! -Miller's l index. -*/ - int m_nl; -/*! -Number of planes cleaved. -*/ - int m_nPlanes ; -}; - -/*! -a list of pointers to CrystalCleavage instances derived from std::list. -*/ -typedef std::list CrystalCleavageList; - -} //namespace gcu - -#endif //CRYSTAL_CLEAVAGE_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystaldoc.cc gnome-chemistry-utils-0.10.9/gcu/crystaldoc.cc --- gnome-chemistry-utils-0.8.6/gcu/crystaldoc.cc 2007-11-05 09:28:48.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystaldoc.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,655 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemisty Utils - * crystaldoc.cc - * - * Copyright (C) 2002-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "crystaldoc.h" -#include "crystalview.h" -#include "xml-utils.h" -#include -#include -#include -#include -#include -#include -#include - -#define __max(x,y) ((x) > (y)) ? (x) : (y) -#define __min(x,y) ((x) < (y)) ? (x) : (y) -#define PREC 1e-3 - -using namespace gcu; - -gchar *gcu::LatticeName[] = { - (gchar*) "simple cubic", - (gchar*) "body-centered cubic", - (gchar*) "face-centered cubic", - (gchar*) "hexagonal", - (gchar*) "tetragonal", - (gchar*) "body-centered tetragonal", - (gchar*) "orthorhombic", - (gchar*) "base-centered orthorhombic", - (gchar*) "body-centered orthorhombic", - (gchar*) "face-centered orthorhombic", - (gchar*) "rhombohedral", - (gchar*) "monoclinic", - (gchar*) "base-centered monoclinic", - (gchar*) "triclinic" -}; - -CrystalDoc::CrystalDoc (Application *App): GLDocument (App) -{ -} - - -CrystalDoc::~CrystalDoc() -{ - while (!AtomDef.empty ()) { - delete AtomDef.front (); - AtomDef.pop_front (); - } - while (!Atoms.empty ()) { - delete Atoms.front (); - Atoms.pop_front (); - } - while (!LineDef.empty ()) { - delete LineDef.front (); - LineDef.pop_front (); - } - while (!Lines.empty ()) { - delete Lines.front (); - Lines.pop_front (); - } - while (!Cleavages.empty ()) { - delete Cleavages.front (); - Cleavages.pop_front (); - } - while (!m_Views.empty ()) { - m_Views.pop_back (); - } -} - -void CrystalDoc::Reinit() -{ - //destruction of lists - while (!AtomDef.empty ()) { - delete AtomDef.front (); - AtomDef.pop_front (); - } - while (!Atoms.empty ()) { - delete Atoms.front (); - Atoms.pop_front (); - } - while (!LineDef.empty ()) { - delete LineDef.front (); - LineDef.pop_front (); - } - while (!Lines.empty ()) { - delete Lines.front (); - Lines.pop_front (); - } - while (!Cleavages.empty ()) { - delete Cleavages.front (); - Cleavages.pop_front (); - } - Init (); -} - -void CrystalDoc::Init() -{ - m_a = m_b = m_c = 100; - m_alpha = m_beta = m_gamma = 90; - m_lattice = cubic; - m_xmin = m_ymin = m_zmin = 0; - m_xmax = m_ymax = m_zmax = 1; - m_bFixedSize = false; - m_MaxDist = 0; - if (m_Views.size() == 0) - { - CrystalView* pView = CreateNewView(); - m_Views.push_back(pView); - } -} - -void CrystalDoc::ParseXMLTree (xmlNode* xml) -{ - char *old_num_locale, *txt; - xmlNodePtr node; - bool bViewLoaded = false; - - Reinit (); - old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - //look for generator node - unsigned version = 0xffffff , major, minor, micro; - node = xml->children; - while (node) { - if (!strcmp ((const char*)(node->name), "generator")) - break; - node = node->next; - } - if (node) { - txt = (char*) xmlNodeGetContent (node); - if (sscanf(txt, "Gnome Crystal %d.%d.%d", &major, &minor, µ) == 3) - version = micro + minor * 0x100 + major * 0x10000; - xmlFree (txt); - } - node = xml->children; - while(node) { - if (!strcmp ((gchar*) node->name, "text")); - else if (!strcmp ((gchar*) node->name, "lattice")) { - txt = (char*) xmlNodeGetContent (node); - int i = 0; - while (strcmp (txt, LatticeName[i]) && (i < 14)) - i++; - if (i < 14) - m_lattice = (gcLattices)i; - xmlFree (txt); - } else if (!strcmp ((gchar*) node->name, "cell")) { - txt = (char*) xmlGetProp (node, (xmlChar*)"a"); - if (txt) { - sscanf (txt, "%lg", &m_a); - xmlFree (txt); - } - txt = (char*) xmlGetProp (node, (xmlChar*) "b"); - if (txt) { - sscanf (txt, "%lg", &m_b); - xmlFree (txt); - } - txt = (char*) xmlGetProp (node, (xmlChar*) "c"); - if (txt) { - sscanf (txt, "%lg", &m_c); - xmlFree (txt); - } - txt = (char*) xmlGetProp (node, (xmlChar*) "alpha"); - if (txt) { - sscanf (txt, "%lg", &m_alpha); - xmlFree (txt); - } - txt = (char*) xmlGetProp (node, (xmlChar*) "beta"); - if (txt) { - sscanf(txt, "%lg", &m_beta); - xmlFree (txt); - } - txt = (char*) xmlGetProp (node, (xmlChar*) "gamma"); - if (txt) { - sscanf(txt, "%lg", &m_gamma); - xmlFree (txt); - } - } else if (!strcmp ((gchar*) node->name, "size")) { - ReadPosition (node, "start", &m_xmin, &m_ymin, &m_zmin); - ReadPosition (node, "end", &m_xmax, &m_ymax, &m_zmax); - txt = (char*) xmlGetProp (node, (xmlChar*) "fixed"); - if (txt) { - if (!strcmp (txt, "true")) - m_bFixedSize = true; - xmlFree (txt); - } - } else if (!strcmp ((gchar*) node->name, "atom")) { - CrystalAtom *pAtom = CreateNewAtom (); - if (pAtom->Load (node)) - AtomDef.push_back (pAtom); - else - delete pAtom; - } else if (!strcmp ((gchar*) node->name, "line")) { - CrystalLine *pLine = CreateNewLine (); - if (pLine->Load (node)) - LineDef.push_back (pLine); - else - delete pLine; - } else if (!strcmp ((gchar*) node->name, "cleavage")) { - CrystalCleavage *pCleavage = CreateNewCleavage (); - if (pCleavage->Load (node)) - Cleavages.push_back (pCleavage); - else - delete pCleavage; - } else if (!strcmp ((gchar*) node->name, "view")) { - if (!bViewLoaded) { - m_Views.front ()->Load (node); //the first view is created with the document - bViewLoaded = true; - } else - LoadNewView (node); - } - node = node->next; - } - setlocale (LC_NUMERIC, old_num_locale); - g_free (old_num_locale); - SetDirty (false); - Update (); -} - -bool CrystalDoc::LoadNewView(xmlNodePtr node) -{ - return true; -} - -CrystalView *CrystalDoc::GetView() -{ - if (m_Views.size() == 0) - { - CrystalView* pView = CreateNewView(); - m_Views.push_back(pView); - } - return m_Views.front(); -} - -void CrystalDoc::Update() -{ - m_Empty = (AtomDef.empty() && LineDef.empty()) ? true : false; - CrystalAtom Atom; - CrystalLine Line; - gdouble alpha = m_alpha * M_PI / 180; - gdouble beta = m_beta * M_PI / 180; - gdouble gamma = m_gamma * M_PI / 180; - // Remove all atoms - while (!Atoms.empty()) - { - delete Atoms.front(); - Atoms.pop_front(); - } - // Remove all bonds - while (!Lines.empty()) - { - delete Lines.front(); - Lines.pop_front(); - } - - //////////////////////////////////////////////////////////// - //Establish list of atoms - CrystalAtomList::iterator i, iend = AtomDef.end (); - - for (i = AtomDef.begin(); i != iend; i++) { - Duplicate(**i); - switch (m_lattice) { - case body_centered_cubic: - case body_centered_tetragonal: - case body_centered_orthorhombic: - Atom = **i; - Atom.Move(0.5, 0.5, 0.5); - Duplicate(Atom); - break; - case face_centered_cubic: - case face_centered_orthorhombic: - Atom = **i; - Atom.Move(0.5, 0, 0.5); - Duplicate(Atom); - Atom = **i; - Atom.Move(0, 0.5, 0.5); - Duplicate(Atom); - case base_centered_orthorhombic: - case base_centered_monoclinic: - Atom = **i; - Atom.Move(0.5, 0.5, 0); - Duplicate(Atom); - break; - default: - break; - } - } - - //////////////////////////////////////////////////////////// - //Establish list of atoms - CrystalLineList::iterator j, jend = LineDef.end(); - for (j = LineDef.begin() ; j != jend ; j++) - { - switch ((*j)->Type()) - { - case edges: - Line = **j; - Line.SetPosition(0 ,0, 0, 1, 0, 0); - Duplicate(Line); - Line.SetPosition(0 ,0, 0, 0, 1, 0); - Duplicate(Line); - Line.SetPosition(0 ,0, 0, 0, 0, 1); - Duplicate(Line); - break ; - case diagonals: - Line = **j; - Line.SetPosition(0 ,0, 0, 1, 1, 1); - Duplicate(Line); - Line.SetPosition(1 ,0, 0, 0, 1, 1); - Duplicate(Line); - Line.SetPosition(0 ,1, 0, 1, 0, 1); - Duplicate(Line); - Line.SetPosition(1 ,1, 0, 0, 0, 1); - Duplicate(Line); - break ; - case medians: - Line = **j; - Line.SetPosition(.5, .5, 0, .5, .5, 1); - Duplicate(Line); - Line.SetPosition(0, .5, .5, 1, .5, .5); - Duplicate(Line); - Line.SetPosition(.5, 0, .5, .5, 1, .5); - Duplicate(Line); - break ; - case normal: - Duplicate(**j) ; - switch (m_lattice) - { - case body_centered_cubic: - case body_centered_tetragonal: - case body_centered_orthorhombic: - Line = **j; - Line.Move(0.5, 0.5, 0.5); - Duplicate(Line); - break; - case face_centered_cubic: - case face_centered_orthorhombic: - Line = **j; - Line.Move(0.5, 0, 0.5); - Duplicate(Line); - Line = **j; - Line.Move(0, 0.5, 0.5); - Duplicate(Line); - case base_centered_orthorhombic: - case base_centered_monoclinic: - Line = **j; - Line.Move(0.5, 0.5, 0); - Duplicate(Line); - break; - default: - break; - } - break ; - case unique: - if (((*j)->Xmin() >= m_xmin) && ((*j)->Xmax() <= m_xmax) - && ((*j)->Ymin() >= m_ymin) && ((*j)->Ymax() <= m_ymax) - && ((*j)->Zmin() >= m_zmin) && ((*j)->Zmax() <= m_zmax)) - Lines.push_back(new CrystalLine(**j)) ; - } - } - - //Manage cleavages - CrystalCleavageList::iterator k; - for (k = Cleavages.begin(); k != Cleavages.end(); k++) - { - double x; - std::vector ScalarProducts; - std::vector::iterator m; - unsigned n; - - //scalar products calculus and storing - for (i = Atoms.begin(); i != Atoms.end(); i++) - { - x = (*i)->ScalProd((*k)->h(), (*k)->k(), (*k)->l()); - for (m = ScalarProducts.begin(); m != (ScalarProducts.end()) && ((*m) > (x + PREC)); m++) ; - if ((m == ScalarProducts.end()) || (fabs(*m - x) > PREC)) ScalarProducts.insert(m, x); - } - - //cleave atoms and bonds - if ((n = (*k)->Planes()) >= ScalarProducts.size()) - { - GtkWidget* message = gtk_message_dialog_new(NULL, (GtkDialogFlags) 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, _("Everything has been cleaved")); - g_signal_connect (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), NULL); - gtk_widget_show(message); - for (i = Atoms.begin(); i != Atoms.end(); i++) (*i)->Cleave(); - for (j = Lines.begin(); j != Lines.end(); j++) (*j)->Cleave(); - } - else - { - x = ScalarProducts[n - 1]; - for (i = Atoms.begin(); i != Atoms.end(); i++) - if (x < (*i)->ScalProd((*k)->h(), (*k)->k(), (*k)->l())+ PREC) - (*i)->Cleave() ; - - //bonds cleavage - for (j = Lines.begin(); j != Lines.end(); j++) - if (x < (*j)->ScalProd((*k)->h(), (*k)->k(), (*k)->l())+ PREC) - (*j)->Cleave(); - } - - ScalarProducts.clear() ; - } - - //Transform coordinates to Cartesians and find center of visible view - gdouble x, y, z, d, - xmin = G_MAXDOUBLE, ymin = G_MAXDOUBLE, zmin = G_MAXDOUBLE, - xmax = -G_MAXDOUBLE, ymax = -G_MAXDOUBLE, zmax = -G_MAXDOUBLE; - iend = Atoms.end (); - for (i = Atoms.begin(); i != iend; i++) { - (*i)->NetToCartesian(m_a, m_b, m_c, alpha, beta, gamma); - if ((*i)->IsCleaved ()) - continue; - (*i)->GetCoords (&x, &y, &z); - if (x < xmin) - xmin = x; - if (y < ymin) - ymin = y; - if (z < zmin) - zmin = z; - if (x > xmax) - xmax = x; - if (y > ymax) - ymax = y; - if (z > zmax) - zmax = z; - } - jend = Lines.end (); - for (j = Lines.begin (); j != jend; j++) { - (*j)->NetToCartesian (m_a, m_b, m_c, alpha, beta, gamma); - if ((*j)->IsCleaved ()) - continue; - x = (*j)->Xmin (); - y = (*j)->Ymin (); - z = (*j)->Zmin (); - if (x < xmin) - xmin = x; - if (y < ymin) - ymin = y; - if (z < zmin) - zmin = z; - x = (*j)->Xmax (); - y = (*j)->Ymax (); - z = (*j)->Zmax (); - if (x > xmax) - xmax = x; - if (y > ymax) - ymax = y; - if (z > zmax) - zmax = z; - } - - //Searching the center of the crystal and find maximum distance from center - x = (xmin + xmax) / 2.; - y = (ymin + ymax) / 2.; - z = (zmin + zmax) / 2.; - m_MaxDist = 0; - for (i = Atoms.begin(); i != iend; i++) { - d = (*i)->Distance (x, y, z, m_bFixedSize); - m_MaxDist = __max (m_MaxDist, d); - (*i)->Move (- x, - y, - z); - } - - for (j = Lines.begin(); j != Lines.end(); j++) { - d = (*j)->Distance (x, y, z, m_bFixedSize); - m_MaxDist = __max (m_MaxDist, d); - (*j)->Move (- x, - y, - z); - } -} - -void CrystalDoc::Duplicate(CrystalAtom& Atom) -{ - CrystalAtom AtomX, AtomY, AtomZ ; - AtomX = Atom ; - AtomX.Move(- floor(AtomX.x()-m_xmin), - floor(AtomX.y()-m_ymin), - floor(AtomX.z()-m_zmin)) ; - while (AtomX.x() <= m_xmax) - { - AtomY = AtomX ; - while (AtomY.y() <= m_ymax) - { - AtomZ = AtomY ; - while (AtomZ.z() <= m_zmax) - { - Atoms.push_back(new CrystalAtom(AtomZ)) ; - AtomZ.Move(0,0,1) ; - } - AtomY.Move(0,1,0) ; - } - AtomX.Move(1,0,0) ; - } -} - -void CrystalDoc::Duplicate(CrystalLine& Line) -{ - CrystalLine LineX, LineY, LineZ ; - LineX = Line ; - LineX.Move(- floor(LineX.Xmin()-m_xmin), - floor(LineX.Ymin()-m_ymin), - floor(LineX.Zmin()-m_zmin)) ; - while (LineX.Xmax() <= m_xmax) - { - LineY = LineX ; - while (LineY.Ymax() <= m_ymax) - { - LineZ = LineY ; - while (LineZ.Zmax() <= m_zmax) - { - Lines.push_back(new CrystalLine(LineZ)) ; - LineZ.Move(0,0,1) ; - } - LineY.Move(0,1,0) ; - } - LineX.Move(1,0,0) ; - } -} - -void CrystalDoc::Draw() -{ - CrystalAtomList::iterator i; - for (i = Atoms.begin(); i != Atoms.end(); i++) (*i)->Draw(); - CrystalLineList::iterator j; - for (j = Lines.begin(); j != Lines.end(); j++) (*j)->Draw(); -} - -CrystalView* CrystalDoc::CreateNewView() -{ - return new CrystalView(this); -} - -CrystalAtom* CrystalDoc::CreateNewAtom() -{ - return new CrystalAtom(); -} - -CrystalLine* CrystalDoc::CreateNewLine() -{ - return new CrystalLine(); -} - -CrystalCleavage* CrystalDoc::CreateNewCleavage() -{ - return new CrystalCleavage(); -} - -const char* CrystalDoc::GetProgramId() -{ - return NULL; -} - -xmlDocPtr CrystalDoc::BuildXMLTree() -{ - gchar buf[256]; - xmlDocPtr xml; - xmlNodePtr node; - xmlNsPtr ns; - char *old_num_locale; - - xml = xmlNewDoc((xmlChar*)"1.0"); - if (xml == NULL) {throw(1);} - - old_num_locale = g_strdup(setlocale(LC_NUMERIC, NULL)); - setlocale(LC_NUMERIC, "C"); - xmlDocSetRootElement (xml, xmlNewDocNode(xml, NULL, (xmlChar*)"crystal", NULL)); - ns = xmlNewNs (xml->children, (xmlChar*) "http://www.nongnu.org/gcrystal", (xmlChar*) "gcry"); - xmlSetNs (xml->children, ns); - - try - { - node = xmlNewDocNode(xml, NULL, (xmlChar*)"generator", (xmlChar*)GetProgramId()); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - - node = xmlNewDocNode(xml, NULL, (xmlChar*)"lattice", (xmlChar*)LatticeName[m_lattice]); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - - node = xmlNewDocNode(xml, NULL, (xmlChar*)"cell", NULL); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - snprintf(buf, sizeof(buf), "%g", m_a); - xmlNewProp(node, (xmlChar*)"a", (xmlChar*)buf); - snprintf(buf, sizeof(buf), "%g", m_b); - xmlNewProp(node, (xmlChar*)"b", (xmlChar*)buf); - snprintf(buf, sizeof(buf), "%g", m_c); - xmlNewProp(node, (xmlChar*)"c", (xmlChar*)buf); - snprintf(buf, sizeof(buf), "%g", m_alpha); - xmlNewProp(node, (xmlChar*)"alpha", (xmlChar*)buf); - snprintf(buf, sizeof(buf), "%g", m_beta); - xmlNewProp(node, (xmlChar*)"beta", (xmlChar*)buf); - snprintf(buf, sizeof(buf), "%g", m_gamma); - xmlNewProp(node, (xmlChar*)"gamma", (xmlChar*)buf); - - node = xmlNewDocNode(xml, NULL, (xmlChar*)"size", NULL); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - WritePosition(xml, node, "start", m_xmin, m_ymin, m_zmin); - WritePosition(xml, node, "end", m_xmax, m_ymax, m_zmax); - if (m_bFixedSize) - xmlNewProp (node, (xmlChar *) "fixed", (xmlChar *) "true"); - - CrystalAtomList::iterator i; - for (i = AtomDef.begin(); i != AtomDef.end(); i++) - { - node = (*i)->Save(xml); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - } - - CrystalLineList::iterator j; - for (j = LineDef.begin(); j != LineDef.end(); j++) - { - node = (*j)->Save(xml); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - } - - CrystalCleavageList::iterator k; - for (k = Cleavages.begin(); k != Cleavages.end(); k++) - { - node = (*k)->Save(xml); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - } - - list::iterator view; - for (view = m_Views.begin(); view != m_Views.end(); view++) - { - node = (*view)->Save(xml); - if (node) xmlAddChild(xml->children, node); else throw (int) 0; - } - - setlocale(LC_NUMERIC, old_num_locale); - g_free(old_num_locale); - - return xml; - } - catch (int num) - { - xmlFreeDoc(xml); - setlocale(LC_NUMERIC, old_num_locale); - g_free(old_num_locale); - return NULL; - } -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystaldoc.h gnome-chemistry-utils-0.10.9/gcu/crystaldoc.h --- gnome-chemistry-utils-0.8.6/gcu/crystaldoc.h 2007-04-06 18:37:53.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/crystaldoc.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,262 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemisty Utils - * crystaldoc.h - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef CRYSTAL_DOC_H -#define CRYSTAL_DOC_H - -#include -#include -#include "chemistry.h" -#include "crystalatom.h" -#include "crystalline.h" -#include "crystalcleavage.h" -#include "document.h" -#include - -namespace gcu -{ - -class CrystalView; - -/*!\enum gcLattices crystalviewer/crystaldoc.h -This enumeration gives sympolic names to the fourteen Bravais lattices. - -Possible values are: -- cubic -- body_centered_cubic -- face_centered_cubic -- hexagonal -- tetragonal -- body_centered_tetragonal -- orthorhombic -- base_centered_orthorhombic -- body_centered_orthorhombic -- face_centered_orthorhombic -- rhombohedral -- monoclinic -- base_centered_monoclinic -- triclinic -*/ -enum gcLattices {cubic=0, - body_centered_cubic, - face_centered_cubic, - hexagonal, - tetragonal, - body_centered_tetragonal, - orthorhombic, - base_centered_orthorhombic, - body_centered_orthorhombic, - face_centered_orthorhombic, - rhombohedral, - monoclinic, - base_centered_monoclinic, - triclinic -}; - -/*!\class CrystalDoc gcu/crystaldoc.h -The document containing the crystal structure. -*/ -class CrystalDoc: public GLDocument -{ -public: -/*! -The constructor of CrystalDoc -*/ - CrystalDoc (Application *App); -/*! -The destructor of CrystalDoc -*/ - virtual ~CrystalDoc (); - -/*! -@param xml: a pointer to the root xmlNode of the xmlDoc containing the definition of the crystal. - -Analyses the contents of the XML document and builds the cryatl structure from the data. Typical usage is: -\code -CrystalDoc* crystal = new CrystalDoc(); -xmlDocPtr doc = xmlParseFile(filename); -crystal->ParseXMLTree(doc->children); -\endcode -*/ - void ParseXMLTree (xmlNode* xml); -/*! -This method must be called when a new document is loaded or when the definition of the crystal is changed. It recalculates -everything and updates all the views. -*/ - void Update (); -/*! -@return a pointer to the first CrystalView of the document. The view will be created if it does not already exist. -*/ - CrystalView* GetView (); -/*! -Draws the document using OpenGL primitives. -*/ - void Draw (); -/*! -Creates a view of the document. This method should be overrided by programs deriving a new view class from -CrystalView. - -@return a pointer to the new CrystalView instance. -*/ - virtual CrystalView* CreateNewView (); -/*! -Creates a new atom. This method should be overrided by programs deriving a new view class from -CrystalAtom. - -@return a pointer to the new CrystalAtom instance. -*/ - virtual CrystalAtom* CreateNewAtom (); -/*! -Creates a new line. This method should be overrided by programs deriving a new view class from -CrystalLine. - -@return a pointer to the new CrystalLine instance. -*/ - virtual CrystalLine* CreateNewLine (); -/*! -Creates a new cleavage. This method should be overrided by programs deriving a new line class from -CrystalCleavage -@return a pointer to the new CrystalCleavage instance. -*/ - virtual CrystalCleavage* CreateNewCleavage (); -/*! -Builds the xmlDoc corresponding to the crystal structure. -@return a pointer to the XML document. -*/ - xmlDocPtr BuildXMLTree (); -/*! -@return the identity of the program as saved in files in the generator tag. This method should be overrided -by programs able to save crystal structures in XML files conforming to gcrystal.dtd. It is used mainly to ensure -compatiblity with files created by older versions of the program. -*/ - virtual const char* GetProgramId (); - -protected: -/*! -Initialize a new CrystalDoc instance. -*/ - void Init (); -/*! -Reinitialize a CrystalDoc instance. Used when loading a file in an already existing document. -*/ - void Reinit (); -/*! -@param node: the xmlNode containing the serialized view. - -Loads a view from a XML document. This methd must be overrided by applications supporting multiple views. -*/ - virtual bool LoadNewView (xmlNodePtr node); - -private: - void Duplicate (CrystalAtom& Atom); - void Duplicate (CrystalLine& Line); - -protected: -/*! -The Bravais lattice of the crystal. -*/ - gcLattices m_lattice; -/*! -The a parameter of the unit cell. -*/ - gdouble m_a; -/*! -The b parameter of the unit cell. -*/ - gdouble m_b; -/*! -The c parameter of the unit cell. -*/ - gdouble m_c; -/*! -The alpha angle of the unit cell. -*/ - gdouble m_alpha; -/*! -The beta angle of the unit cell. -*/ - gdouble m_beta; -/*! -The gamma angle of the unit cell. -*/ - gdouble m_gamma; -/*! -The minimum x coordinate in the representation of the crystal structure. -*/ - gdouble m_xmin; -/*! -The minimum y coordinate in the representation of the crystal structure. -*/ - gdouble m_ymin; -/*! -The minimum z coordinate in the representation of the crystal structure. -*/ - gdouble m_zmin; -/*! -The maximum x coordinate in the representation of the crystal structure. -*/ - gdouble m_xmax; -/*! -The maximum y coordinate in the representation of the crystal structure. -*/ - gdouble m_ymax; -/*! -The maximum z coordinate in the representation of the crystal structure. -*/ - gdouble m_zmax; -/*! -true if cleavages must not change positions in the view. -*/ - gboolean m_bFixedSize; //true if cleavages must not change positions in the view -/*! -List of the atoms in the definition of the crystal -*/ - CrystalAtomList AtomDef; -/*! -List of the atoms displayed. -*/ - CrystalAtomList Atoms; -/*! -List of the lines in the definition of the crystal -*/ - CrystalLineList LineDef; -/*! -List of the lines displayed. -*/ - CrystalLineList Lines; -/*! -List of the cleavages defined. -*/ - CrystalCleavageList Cleavages; -/*! -List of the views of the document. -*/ - list m_Views; -}; - -extern gchar *LatticeName[]; - -} //namespace gcu - -#endif //CRYSTAL_DOC_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalline.cc gnome-chemistry-utils-0.10.9/gcu/crystalline.cc --- gnome-chemistry-utils-0.8.6/gcu/crystalline.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystalline.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,337 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * crystalline.cc - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "crystalline.h" -#include "xml-utils.h" -#include -#include -#include -#include -#include - -#define __max(x,y) ((x) > (y)) ? (x) : (y) -#define __min(x,y) ((x) < (y)) ? (x) : (y) -#define square(x) ((x)*(x)) - -using namespace gcu; - -static char *TypeName[] = { - (char*) "edges", - (char*) "diagonals", - (char*) "medians", - (char*) "normal", - (char*) "unique" -}; - -CrystalLine::CrystalLine() -{ - m_dx = m_dy = m_dz = m_dx2 = m_dy2 = m_dz2 = m_dl = m_dr = 0.0; - m_fRed = m_fBlue = m_fGreen = 0.0; - m_fAlpha = 1.0; - m_dxrot = m_dyrot = m_darot = 0; - m_nType = edges; - m_nCleave = 0; -} - -CrystalLine::~CrystalLine() -{ -} - - -CrystalLine::CrystalLine(CrystalLineType Type, double X1, double Y1, double Z1, double X2, double Y2, double Z2, double r, float red, float green, float blue, float alpha) -{ - m_nCleave = 0 ; - m_nType = Type; - SetPosition(X1, Y1, Z1, X2, Y2, Z2) ; - m_dr = r ; - SetColor(red, green, blue, alpha) ; -} - -CrystalLine::CrystalLine(CrystalLine& clLine) -{ - m_nCleave = 0 ; - m_dx = clLine.m_dx ; - m_dy = clLine.m_dy ; - m_dz = clLine.m_dz ; - m_dx2 = clLine.m_dx2 ; - m_dy2 = clLine.m_dy2 ; - m_dz2 = clLine.m_dz2 ; - m_dxrot = clLine.m_dxrot ; - m_dyrot = clLine.m_dyrot ; - m_darot = clLine.m_darot ; - m_dr = clLine.m_dr ; - m_dl = clLine.m_dl ; - m_fRed = clLine.m_fRed ; - m_fGreen = clLine.m_fGreen ; - m_fBlue = clLine.m_fBlue ; - m_fAlpha = clLine.m_fAlpha ; - m_nType = clLine.m_nType ; -} - -CrystalLine& CrystalLine::operator=(CrystalLine& clLine) -{ - m_dx = clLine.m_dx ; - m_dy = clLine.m_dy ; - m_dz = clLine.m_dz ; - m_dx2 = clLine.m_dx2 ; - m_dy2 = clLine.m_dy2 ; - m_dz2 = clLine.m_dz2 ; - m_dxrot = clLine.m_dxrot ; - m_dyrot = clLine.m_dyrot ; - m_darot = clLine.m_darot ; - m_dr = clLine.m_dr ; - m_dl = clLine.m_dl ; - m_fRed = clLine.m_fRed ; - m_fGreen = clLine.m_fGreen ; - m_fBlue = clLine.m_fBlue ; - m_fAlpha = clLine.m_fAlpha ; - m_nType = clLine.m_nType ; - return *this ; -} - -void CrystalLine::Draw() -{ - if (m_nCleave) return ; - GLUquadricObj *quadObj ; - glPushMatrix() ; - glTranslated(m_dy, m_dz, m_dx) ; - glRotated(m_darot, m_dxrot, m_dyrot, 0.0f); - glColor4f(m_fRed, m_fGreen, m_fBlue, m_fAlpha) ; - quadObj = gluNewQuadric() ; - gluQuadricDrawStyle(quadObj, GL_FILL); - gluQuadricNormals(quadObj, GL_SMOOTH) ; - gluCylinder(quadObj,m_dr, m_dr, m_dl, 20, 10); - gluDeleteQuadric(quadObj) ; - glPopMatrix() ; -} - -void CrystalLine::SetPosition(double x, double y, double z, double x1, double y1, double z1) -{ - m_dx = x ; - m_dy = y ; - m_dz = z ; - m_dx2 = x1 ; - m_dy2 = y1 ; - m_dz2 = z1 ; - //vector coordinates - x1 -= x ; - y1 -= y ; - z1 -= z ; - m_dl = sqrt(square(x1) + square(y1) + square(z1)) ; - //normalization - x = sqrt(square(y1) + square(z1)) ; - //vectorial product - if (x > 0) - { - m_dxrot = - z1 / x ; - m_dyrot = y1 / x ; - m_darot = atan2(x, x1) * 90 / 1.570796326794897 ; - } - else - { - m_dxrot = 0; - if (x1 > 0) m_dyrot = m_darot = 0.0; - else - { - m_dyrot = 1.0; - m_darot = 180.0; - } - } -} - -void CrystalLine::SetColor(float red, float green, float blue, float alpha) -{ - m_fRed = red ; - m_fGreen = green ; - m_fBlue = blue ; - m_fAlpha = alpha ; -} - -void CrystalLine::GetColor(double *red, double *green, double *blue, double *alpha) -{ - *red = m_fRed ; - *green = m_fGreen ; - *blue = m_fBlue ; - *alpha = m_fAlpha ; -} - -void CrystalLine::SetRadius(double r) -{ - m_dr = r ; -} - -bool CrystalLine::operator==(CrystalLine& clLine) -{ - if (m_nType <= 2) return m_nType == clLine.m_nType ; - return (m_dx == clLine.m_dx) && - (m_dy == clLine.m_dy) && - (m_dz == clLine.m_dz) && - (m_dx2 == clLine.m_dx2) && - (m_dy2 == clLine.m_dy2) && - (m_dz2 == clLine.m_dz2) && - (m_nType == clLine.m_nType) ; -} - -void CrystalLine::Move(double x, double y, double z) -{ - m_dx += x ; - m_dy += y ; - m_dz += z ; - m_dx2 += x ; - m_dy2 += y ; - m_dz2 += z ; -} - -double CrystalLine::ScalProd(int h, int k, int l) -{ - return __max(m_dx * h + m_dy * k + m_dz * l, X2() * h + Y2() * k + Z2() * l) ; -} - - -double CrystalLine::Distance(double x, double y, double z, bool bFixe) -{ - if ((m_nCleave > 0) && !bFixe) return 0 ; - return __max( sqrt(square(m_dx - x) + square(m_dy - y) + square(m_dz - z)), - sqrt(square(X2() - x) + square(Y2() - y) + square(Z2() - z))) ; -} - -void CrystalLine::NetToCartesian(double a, double b, double c, double alpha, double beta, double gamma) -{ - double x = m_dx * a ; - double y = m_dy * b ; - double z = m_dz * c ; - double x2 = X2() * a ; - double y2 = Y2() * b ; - double z2 = Z2() * c ; - SetPosition(x * sqrt(1-square(cos(beta)) - square((cos(gamma) - cos(beta)*cos(alpha))/sin(alpha))), - x * (cos(gamma) - cos(beta)*cos(alpha))/sin(alpha) + y * sin(alpha), - (x * cos(beta) + y * cos(alpha) + z), - x2 * sqrt(1-square(cos(beta)) - square((cos(gamma) - cos(beta)*cos(alpha))/sin(alpha))), - x2 * (cos(gamma) - cos(beta)*cos(alpha))/sin(alpha) + y2 * sin(alpha), - (x2 * cos(beta) + y2 * cos(alpha) + z2)) ; -} - -double CrystalLine::Xmax() -{ - return __max(m_dx, m_dx2) ; -} - -double CrystalLine::Ymax() -{ - return __max(m_dy, m_dy2) ; -} - -double CrystalLine::Zmax() -{ - return __max(m_dz, m_dz2) ; -} - -double CrystalLine::Xmin() -{ - return __min(m_dx, m_dx2) ; -} - -double CrystalLine::Ymin() -{ - return __min(m_dy, m_dy2) ; -} - -double CrystalLine::Zmin() -{ - return __min(m_dz, m_dz2) ; -} - -void CrystalLine::GetRotation(double & x, double & y, double & z, double & theta) -{ - x = m_dy - m_dy2; - y = m_dx2 - m_dx; - double d = sqrt(square(x) + square(y)); - if (d > 1e-3) - { - theta = atan2(d, m_dz2 - m_dz); - x /= d; - y /= d; - z = 0; - } - else - { - z = 1.0; - theta = 0; - } -} - -xmlNodePtr CrystalLine::Save(xmlDocPtr xml) -{ - xmlNodePtr parent, child; - gchar buf[256]; - parent = xmlNewDocNode(xml, NULL, (xmlChar*)"line", NULL); - if (!parent) return NULL; - - xmlSetProp(parent, (xmlChar*)"type", (xmlChar*)TypeName[m_nType]); - - g_snprintf(buf, sizeof(buf) - 1, "%g", m_dr); - child = xmlNewDocNode(xml, NULL, (xmlChar*)"radius", (xmlChar*)buf); - if (child) xmlAddChild(parent, child); - else {xmlFreeNode(parent); return NULL;} - - if (((m_nType > 2) && ((!WritePosition(xml, parent, "start", m_dx, m_dy, m_dz))) || - (!WritePosition(xml, parent, "end", m_dx2, m_dy2, m_dz2))) || - (!WriteColor(xml, parent, NULL, m_fRed, m_fGreen, m_fBlue, m_fAlpha))) - {xmlFreeNode(parent); return NULL;} - - return parent; -} - -bool CrystalLine::Load (xmlNodePtr node) -{ - char *txt; - txt = (char*) xmlGetProp (node, (xmlChar*) "type"); - if (!txt) - return false; - int i = 0; - while (strcmp (txt, TypeName[i]) && (i < 5)) - i++; - xmlFree (txt); - if (i < 5) - m_nType = (CrystalLineType) i; - else - return false; - if (((m_nType > 2) && ((!ReadPosition (node, "start", &m_dx, &m_dy, &m_dz)) || - (!ReadPosition (node, "end", &m_dx2, &m_dy2, &m_dz2)))) || - (!ReadColor (node, NULL, &m_fRed, &m_fGreen, &m_fBlue, &m_fAlpha))) - return false; - xmlNodePtr child = node->children; - while (child) { - if (!strcmp ((gchar*) child->name, "radius")) { - txt = (char*) xmlNodeGetContent (child); - sscanf (txt, "%lg", &m_dr); - xmlFree (txt); - break; - } - child = child->next; - } - if (m_dr == 0) - return false; - return true; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalline.h gnome-chemistry-utils-0.10.9/gcu/crystalline.h --- gnome-chemistry-utils-0.8.6/gcu/crystalline.h 2006-12-26 11:11:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystalline.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,357 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * crystalline.h - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef CRYSTAL_LINE_H -#define CRYSTAL_LINE_H - -#include -#include - -using namespace std; - -namespace gcu -{ - -/*!\enum CrystalLineType crystalviewer/crystalline.h -The type of a CrystalLine instance. Possible values are: -- edges: all the cell edges. -- diagonals: the lines joining opposite vertices of a cell. -- medians: the lines joining the centers of opposite faces of a cell. -- normal: a line with defined ends, repeated in each displayes cell. -- unique: a line with defined ends, not repeated. -*/ -enum CrystalLineType -{ - edges = 0, - diagonals, - medians, - normal, - unique -}; - -/*!\class CrystalLine gcu/crystalline.h -Describes lines represented as cylinders in the view. Thes cylinders are not capped. -*/ -class CrystalLine -{ -public: -/*! -The default constructor of CrystalLine. -*/ - CrystalLine (); -/*! -The destructior of CrystaLine -*/ - virtual ~CrystalLine (); - -public : -/*! -@param Type: the type (CrystalLineType) of the new line. -@param X1: the x coordinate of the first end of the new line. -@param Y1: the y coordinate of the first end of the new line. -@param Z1: the z coordinate of the first end of the new line. -@param X2: the x coordinate of the second end of the new line. -@param Y2: the y coordinate of the second end of the new line. -@param Z2: the z coordinate of the second end of the new line. -@param r: the radius of the cylinder which will represent the new line. -@param red: the red component of the cylinder which will represent the new line. -@param green: the green component of the cylinder which will represent the new line. -@param blue: the blue component of the cylinder which will represent the new line. -@param alpha: the alpha component of the cylinder which will represent the new line. - -Constructs a new line from its characterisitics. -*/ - CrystalLine (CrystalLineType Type, double X1, double Y1, double Z1, double X2, double Y2, double Z2, double r, float red, float green, float blue, float alpha); -/*! -@param clLine: the line to duplicate. - -Creates a new line with the same characteristics as clLine. -*/ - CrystalLine (CrystalLine& clLine); -/*! -@param clLine: the line to copy. - -Copies a line. -@return the copied line. -*/ - CrystalLine& operator= (CrystalLine& clLine); - -/*! -Draws the line inside the active OpenGL window. -*/ - void Draw (); -/*! -@return the x coordinate of the first end of the line. -*/ - double X1 (void) {return m_dx;} -/*! -@return the y coordinate of the first end of the line. -*/ - double Y1 (void) {return m_dy;} -/*! -@return the z coordinate of the first end of the line. -*/ - double Z1 (void) {return m_dz;} -/*! -@return the x coordinate of the second end of the line. -*/ - double X2 (void) {return m_dx2;} -/*! -@return the y coordinate of the second end of the line. -*/ - double Y2 (void) {return m_dy2;} -/*! -@return the z coordinate of the second end of the line. -*/ - double Z2 (void) {return m_dz2;} -/*! -@return the greatest x coordinate of the line. -*/ - double Xmax (); -/*! -@return the greatest y coordinate of the line. -*/ - double Ymax (); -/*! -@return the greatest z coordinate of the line. -*/ - double Zmax (); -/*! -@return the lowest x coordinate of the line. -*/ - double Xmin (); -/*! -@return the lowest y coordinate of the line. -*/ - double Ymin (); -/*! -@return the lowest z coordinate of the line. -*/ - double Zmin (); -/*! -@return the length of the line. -*/ - double Long () {return m_dl;} -/*! -@return the type of the line (see CrystalLineType). -*/ - CrystalLineType Type () {return m_nType;} -/*! -@param x: the new x coordinate of the first end of the new line. -@param y: the new y coordinate of the first end of the new line. -@param z: the new z coordinate of the first end of the new line. -@param x1: the new x coordinate of the second end of the new line. -@param y1: the new y coordinate of the second end of the new line. -@param z1: the new z coordinate of the second end of the new line. - -Moves a line to a new position. -*/ - void SetPosition (double x, double y, double z, double x1, double y1, double z1); -/*! -@param red: the red component of the new color of the line. -@param green: the green component of the new color of the line. -@param blue: the blue component of the new color of the line. -@param alpha: the alpha component of the new color of the line. - -Changes the color used to display the line. -*/ - void SetColor (float red, float green, float blue, float alpha); -/*! -@param red: a pointer to the location to which the red component of the color of the line will be copied. -@param green: a pointer to the location to which the green component of the new color of the line will be copied. -@param blue: a pointer to the location to which the blue component of the new color of the line will be copied. -@param alpha: a pointer to the location to which the alpha component of the new color of the line will be copied. - -Gets the components of the color used to display the line. -*/ - void GetColor (double *red, double *green, double *blue, double *alpha); -/*! -@param r: the new radius of the cylinder representing the line. - -Changes the radius of the cylinder used to represent the line. -*/ - void SetRadius (double r); -/*! -@return the radius of the cylinder used to represent the line. -*/ - double GetRadius () {return m_dr;}; -/*! -@param clLine: a CrystalLine instance. -@return true if the two lines have the same type and the same position. -*/ - bool operator== (CrystalLine& clLine); -/*! -@param x: the x component of the transation vector. -@param y: the y component of the transation vector. -@param z: the z component of the transation vector. - -Used to move a line. -*/ - virtual void Move (double x, double y, double z); -/*! -@param h: the h Miller index of a plane. -@param k: the k Miller index of a plane. -@param l: the l Miller index of a plane. - -@return the product hx+ky+lz where x, y and z are the coordinates of one of the ends the line. -The end giving the largest value is retained for the calculus. -This makes sense only if coordinates are related to the net and are not the cartesian coordinates. -This method should not be called after NetToCartesian(). -*/ - double ScalProd (int h, int k, int l); -/*! -Method used to cleave a line. The inverse operation does not exist since the whole crystal must be recalculated -after a change in the definition. -*/ - void Cleave () {m_nCleave++;} -/*! -@param a: the a parameter of the unit cell. -@param b: the b parameter of the unit cell. -@param c: the c parameter of the unit cell. -@param alpha: the alpha angle of the unit cell. -@param beta: the beta angle of the unit cell. -@param gamma: the gamma angle of the unit cell. - -Converts the coordinates of the line from net related ones to cartesian. Initially, lines are defined by their -position relative to the unit cell and the coordinates must be transformed to the cartesian ones before -displaying the line. -*/ - void NetToCartesian (double a, double b, double c, double alpha, double beta, double gamma); -/*! -@param x: the x coordinate of the center. -@param y: the y coordinate of the center. -@param z: the z coordinate of the center. -@param bFixed: tells if cleaved lines are taken into account. - -This helper method is called when searching for the size of the crystal. When some cleavages are defined, -the procedure cn take into account lines cleaved to get the same position in the view for the cleaved crystal -than for the whole crystal. If bFixed is true, all lines are taken into account. - -@return the largest distance of the line to the center of the view or 0 if bFixed is false and the line cleaved. -*/ - double Distance (double x, double y, double z, bool bFixed); -/*! -@return true if the line is cleaved by at least one cleavage or false if the line is not cleaved at all. -*/ - bool IsCleaved () {return m_nCleave != 0;} -/*! -@param x: the x component of the vector of the rotation axis. -@param y: the y component of the vector of the rotation axis. -@param z: the z component of the vector of the rotation axis. -@param th: the angle of the rotation. - -This helper method is used to get the orientation of the line relative to the z axis. It is used when exporting to the -VRML format. -*/ - void GetRotation (double& x, double& y, double& z, double& th); -/*! -@param xml: the xmlDoc used to save the document. - -Saves the line. -@return the xmlnode containing the description of the line. -*/ - virtual xmlNodePtr Save (xmlDocPtr xml); -/*! -@param node: a pointer to the xmlNode containing the serialized line. - -Loads a line from the XML document. -*/ - virtual bool Load (xmlNodePtr node); - -protected : -/*! -The blue component of the color of the cylinder representing the line. -*/ - float m_fBlue; -/*! -The red component of the color of the cylinder representing the line. -*/ - float m_fRed; -/*! -The green component of the color of the cylinder representing the line. -*/ - float m_fGreen; -/*! -The alpha component of the color of the cylinder representing the line. -*/ - float m_fAlpha; -/*! -The x coordinate of the first end of the line. -*/ - double m_dx; -/*! -The y coordinate of the first end of the line. -*/ - double m_dy; -/*! -The z coordinate of the first end of the line. -*/ - double m_dz; -/*! -The x coordinate of the second end of the line. -*/ - double m_dx2; -/*! -The x coordinate of the second end of the line. -*/ - double m_dy2; -/*! -The x coordinate of the second end of the line. -*/ - double m_dz2; -/*! -The radius of the cylinder representing the line. -*/ - double m_dr; -/*! -When cleavages (see CrystalCleavage class documentation) are defined, the line might be cleaved. m_nCleave is -the number of CrystalCleavage instances which remove the line. If this member is not 0, the line will -not be displayed. -*/ - int m_nCleave; //0 if not cleaved -/*! -The type of the CrystalLine instance. Possible values are: -- edges: all the cell edges. -- diagonals: the lines joining opposite vertices of a cell. -- medians: the lines joining the centers of opposite faces of a cell. -- normal: a line with defined ends, repeated in each displayes cell. -- unique: a line with defined ends, not repeated. -*/ - CrystalLineType m_nType; - -private: - double m_dl; - double m_dxrot; - double m_dyrot; - double m_darot;//rotation axis coordinates (z = 0) and angle -}; - -/*! -a list of pointers to CrystalLine instances derived from std::list. -*/ -typedef list CrystalLineList; - -}// namespace gcu - -#endif // CRYSTAL_BOND_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalview.cc gnome-chemistry-utils-0.10.9/gcu/crystalview.cc --- gnome-chemistry-utils-0.8.6/gcu/crystalview.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystalview.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,118 +0,0 @@ -/* - * Gnome Chemisty Utils - * crystalview.cc - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "crystalview.h" -#include "crystaldoc.h" -#include "matrix.h" -#include "xml-utils.h" -#include -#include -#include -#include -#include -#include -#include - -using namespace gcu; - -CrystalView::CrystalView(CrystalDoc* pDoc): GLView (pDoc) -{ - SetRed (1.); - SetGreen (1.); - SetBlue (1.); -} - -CrystalView::~CrystalView() -{ -} - -bool CrystalView::Load (xmlNodePtr node) -{ - char *txt; - xmlNodePtr child = node->children; - double x, y, z; - while (child) { - if (!strcmp ((gchar*) child->name, "orientation")) { - txt = (char*) xmlGetProp (child, (xmlChar*) "psi"); - if (txt) { - sscanf(txt, "%lg", &x); - xmlFree (txt); - } else - return false; - txt = (char*) xmlGetProp (child, (xmlChar*) "theta"); - if (txt) { - sscanf(txt, "%lg", &y); - xmlFree (txt); - } else - return false; - txt = (char*) xmlGetProp (child, (xmlChar*) "phi"); - if (txt) { - sscanf(txt, "%lg", &z); - xmlFree (txt); - } else - return false; - SetRotation (x, y, z); - } else if (!strcmp ((gchar*) child->name, "fov")) { - txt = (char*) xmlNodeGetContent (child); - int result = sscanf (txt, "%lg", &x); - SetAngle ((result == 0)? 10.: x); - xmlFree (txt); - } - child = child->next; - } - float r, g, b, a; - if (!ReadColor (node, "background", &r, &g, &b, &a)) - return false; - SetRed (r); - SetGreen (g); - SetBlue (b); - SetAlpha (a); - return true; -} - -xmlNodePtr CrystalView::Save(xmlDocPtr xml) -{ - xmlNodePtr parent, child; - gchar buf[256]; - parent = xmlNewDocNode(xml, NULL, (xmlChar*)"view", NULL); - if (!parent) return NULL; - - child = xmlNewDocNode(xml, NULL, (xmlChar*)"orientation", NULL); - if (child) xmlAddChild(parent, child); - else {xmlFreeNode(parent); return NULL;} - snprintf(buf, sizeof(buf), "%g", GetPsi ()); - xmlNewProp(child, (xmlChar*)"psi", (xmlChar*)buf); - snprintf(buf, sizeof(buf), "%g", GetTheta ()); - xmlNewProp(child, (xmlChar*)"theta", (xmlChar*)buf); - snprintf(buf, sizeof(buf), "%g", GetPhi ()); - xmlNewProp(child, (xmlChar*)"phi", (xmlChar*)buf); - - g_snprintf(buf, sizeof(buf) - 1, "%g", GetAngle ()); - child = xmlNewDocNode(xml, NULL, (xmlChar*)"fov", (xmlChar*)buf); - if (child) xmlAddChild(parent, child); - else {xmlFreeNode(parent); return NULL;} - - if (!WriteColor(xml, parent, "background", GetRed (), GetGreen (), GetBlue (), GetAlpha ())) {xmlFreeNode(parent); return NULL;} - - return parent; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/crystalview.h gnome-chemistry-utils-0.10.9/gcu/crystalview.h --- gnome-chemistry-utils-0.8.6/gcu/crystalview.h 2007-11-01 16:18:04.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/crystalview.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,87 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * crystalview.h - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef CRYSTAL_VIEW_H -#define CRYSTAL_VIEW_H - -#include -#include -#include -#include -#include -#include - -using namespace std; - -namespace gcu -{ -class CrystalDoc; - -/*!\class CrystalView gcu/crystalview.h -The class representing a view of the model. Each document -might have several views. -Most methods are automatically called by the framework and should not be explicitely used in programs. -*/ -class CrystalView: public GLView -{ -public: -//!Constructor. -/*! -@param pDoc: a pointer to the CrystalDoc instance. - -Creates a new view for the document. -*/ - CrystalView (CrystalDoc* pDoc); -//!Destructor. -/*! -The destructor of CrystalView. -*/ - virtual ~CrystalView (); - -/*! -@param node: a pointer to the xmlNode containing the serialized view. - -Loads the parameters of the view from an xmlNode. -*/ - virtual bool Load (xmlNodePtr node); -/*! -@param xml: the xmlDoc used to save the document. -@return a pointer to the xmlNode containig the view parameters or NULL if an error occured. -*/ - virtual xmlNodePtr Save (xmlDocPtr xml); - -protected: -/*! -The height of the widget. -*/ - gdouble m_height; -/*! -The width of the widget. -*/ - gdouble m_width; -}; - -} //namespace gcu - -#endif //CRYSTAL_VIEW_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/dialog.cc gnome-chemistry-utils-0.10.9/gcu/dialog.cc --- gnome-chemistry-utils-0.8.6/gcu/dialog.cc 2007-04-06 18:28:29.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/dialog.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,216 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/dialog.cc - * - * Copyright (C) 2001-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "dialog.h" -#include "application.h" -#include -#include -#include - -using namespace gcu; - -static void on_OK (GtkWidget *widget, Dialog* pBox) -{ - if (pBox->Apply ()) - pBox->Destroy (); -} - -static void on_apply (GtkWidget *widget, Dialog* pBox) -{ - pBox->Apply (); -} - -static void on_cancel (GtkWidget *widget, Dialog* pBox) -{ - pBox->Destroy (); -} - -static void on_help(GtkWidget *widget, Dialog* pBox) -{ - pBox->Help(); -} - -static bool on_destroy (GtkWidget *widget, Dialog* pBox) -{ - delete pBox; - return true; -} - -Dialog::Dialog (Application* App, const char* filename, const char* windowname, DialogOwner *owner, void (*extra_destroy)(gpointer), gpointer data) -{ - m_App = App; - m_Owner = NULL; - if (owner && !owner->AddDialog (windowname, this)) { - xml = NULL; - return; - } - m_Owner = owner; - xml = glade_xml_new (filename, windowname, NULL); - m_extra_destroy = extra_destroy; - m_windowname = windowname; - m_data = data; - if (xml) glade_xml_signal_autoconnect (xml); - dialog = GTK_WINDOW (glade_xml_get_widget(xml, windowname)); - gtk_window_set_icon_name (dialog, App->GetName ().c_str ()); - g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK (on_destroy), this); - GtkWidget* button = glade_xml_get_widget (xml, "OK"); - if (button) g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_OK), this); - button = glade_xml_get_widget (xml, "apply"); - if (button) g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_apply), this); - button = glade_xml_get_widget (xml, "cancel"); - if (button) g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_cancel), this); - button = glade_xml_get_widget(xml, "help"); - if (button) { - if (App->HasHelp ()) - g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_help), this); - else - gtk_widget_hide (button); - } -} - -Dialog::~Dialog() -{ - if (xml) - g_object_unref (G_OBJECT (xml)); - if (m_Owner) - m_Owner->RemoveDialog (m_windowname); -} - -void Dialog::Destroy() -{ - if (m_extra_destroy) m_extra_destroy (m_data); - gtk_widget_destroy (GTK_WIDGET (dialog)); -} - -bool Dialog::Apply () -{ - return true; -} - -void Dialog::Help () -{ - m_App->OnHelp (m_windowname); -} - -bool Dialog::GetNumber (GtkEntry *Entry, double *x, CheckType c, double min, double max) -{ - const gchar* text = gtk_entry_get_text (Entry); - char *end; - *x = strtod (text, &end); - if (end != text + strlen (text)) { - gtk_window_set_focus (GTK_WINDOW (dialog), GTK_WIDGET (Entry)); - GtkDialog* box = GTK_DIALOG(gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Type a number"))); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - switch (c) { - case MinEqMax: - if ((*x < min) || (*x >= max)) { - snprintf (m_buf, sizeof (m_buf), _("Type a number greater than or equal %g and lower than to %g"), min, max); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - case MinMaxEq: - if ((*x <= min) || (*x > max)) { - snprintf (m_buf, sizeof (m_buf), _("Type a number greater than %g and lower than or equal to %g"), min, max); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - case MinEqMaxEq: - if ((*x < min) || (*x > max)) { - snprintf (m_buf, sizeof (m_buf), _("Type a number between %g and %g, the limits are valid."), min, max); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - case MinMax: - if ((*x <= min) || (*x >= max)) { - snprintf (m_buf, sizeof (m_buf), _("Type a number greater than %g and lower than %g"), min, max); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - case Max: - if (*x >= max) { - snprintf (m_buf, sizeof (m_buf), _("Type a number lower than %g"), max); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - case Min: - if (*x <= min) { - snprintf (m_buf, sizeof (m_buf), _("Type a number greater than %g"), min); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - case MaxEq: - if (*x > max) { - snprintf (m_buf, sizeof (m_buf), _("Type a number lower than or equal to %g"), max); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - case MinEq: - if (*x < min) { - snprintf (m_buf, sizeof (m_buf), _("Type a number greater than or equal to %g"), min); - GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); - gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); - if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) - gtk_widget_destroy (GTK_WIDGET (box)); - return false; - } - break; - default: - break; - } - return true; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/dialog.h gnome-chemistry-utils-0.10.9/gcu/dialog.h --- gnome-chemistry-utils-0.8.6/gcu/dialog.h 2007-02-07 17:34:22.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/dialog.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,168 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/dialog.h - * - * Copyright (C) 2001-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_DIALOG_H -#define GCU_DIALOG_H -#include -#include -#include - -using namespace std; - -namespace gcu { - -/** CheckType -* CheckType describes how numbers entered in entries might be checked. -* Possible values are: -* - NoCheck: no check is performed. -* - Min: value > min. -* - Max: value < max. -* - MinMax: min < value < max. -* - MinEq: value >= min. -* - MaxEq: value <= max. -* - MinEqMax: min <= value < max. -* - MinMaxEq: min < value <= max. -* - MinEqMaxEq: min <= value <= max. -* -* This enumeration is used in Dialog::GetNumber. -*/ -enum CheckType -{ - NoCheck, - Min, - Max, - MinMax, - MinEq, - MaxEq, - MinEqMax, - MinMaxEq, - MinEqMaxEq -}; - -class Application; -class DialogOwner; - -/*!\class Dialog gcu/dialog.h -This class is base class for dialog boxes. It provides some basic services. -*/ -class Dialog -{ -public: -/*! -@param App: the Application which owns the dialog. -@param filename: the glade file name which contains the description of -the dialog. -@param windowname: the name of the top level GtkWidget of the dialog box in -the glade file. This name should be unique for the application. It is used to access -the contextual help and to ensure the uniqueness of the dialog (in some cases). -@param owner: the address of an owner object, might be App or a document -or NULL (the default). when owner is not NULL, the dialog will be unique for it. -@param extra_destroy: a callback to be called when the dialog is detroyed -by calling Dialog::Destroy. Useful to perform non standard cleaning operations -before calling gtk_widget_destroy. The destructor being called afterwards, it -cannot access the widget. -@param data: the data to be passed to extra_destroy. - -If the glade file declares buttons with names "OK", "apply", "cancel" and "help", -default actions will be associated with these buttons. -If the Application does not provide help support, the Help button will be hidden. -*/ - Dialog (Application* App, const char* filename, const char* windowname, DialogOwner *owner = NULL, void (*extra_destroy)(gpointer) = NULL, gpointer data = NULL); - virtual ~Dialog (); - -/*! - Called when closing the dialog box after a click on the OK or Cancel buttons. - If a child class implements this method, it should call Dialog::Destroy after - performing its task or it must destroy the window. - The defaut implementation calls extra_destroy and gtk_widget_destroy. -*/ - virtual void Destroy (); - -/*! - Called after a click on the OK or Apply buttons. After clicking the OK button - and if the method returns true, Destroy will be called to close the dialog box. - A derived class should implement this method, as the default just returns true. - -@return true if everything worked, false if something when wrong and the dialog -should not be closed. -*/ - virtual bool Apply (); - -/*! - Displays the help corresponding to the dialog. This function is called when - a click occurs on the Help button. It calls Application::OnHelp (windowname); -*/ - void Help (); - -/*! -/return the top level window of the dialog box. -*/ - GtkWindow* GetWindow () {return dialog;} - -/*! - Brings the dialog to top of the windows stack. -*/ - void Present () {gtk_window_present (dialog);} - -protected: -/*! -@param Entry: the GtkEntry from which the number should be retrieved. -@param x: a pointer to the value which will be replaced by the result. -@param c: the type of check to perform on the value. -@param min: the minimum accepted value, if needed. -@param max: the maximum accepted value, if needed. - -This method retrieves the text displayed in Entry, converts it to a number -and perform bounds tests if needed. If an error occurs, a message box is -displayed which let the user know why the value is not correct. -@return true if the value is valid, false if something went wrong. -*/ - bool GetNumber (GtkEntry *Entry, double *x, CheckType c = NoCheck, double min = 0, double max = 0); - -protected: -/*! -The GladeXML structure used to build the dialog. If NULL, an error -occured and the dialog should be deleted. -*/ - GladeXML* xml; -/*! -The associated GtkWindow instance. -*/ - GtkWindow *dialog; -/*! -The Application instance owning the dialog. -*/ - Application *m_App; - -private: - void (*m_extra_destroy) (gpointer); - gpointer m_data; - char m_buf[64]; - string m_windowname; - DialogOwner *m_Owner; -}; - -} // namespace gcu - -#endif // GCU_DIALOG_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/dialog-owner.cc gnome-chemistry-utils-0.10.9/gcu/dialog-owner.cc --- gnome-chemistry-utils-0.8.6/gcu/dialog-owner.cc 2007-02-07 17:34:22.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/dialog-owner.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,61 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/dialog-owner.h - * - * Copyright (C) 2005-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "dialog-owner.h" -#include "dialog.h" - -using namespace gcu; - -DialogOwner::DialogOwner () -{ -} - -DialogOwner::~DialogOwner () -{ - map ::iterator i; - while (!Dialogs.empty ()) { - i = Dialogs.begin (); - if ((*i).second) - (*i).second->Destroy (); - else - Dialogs.erase (i); - } -} - -Dialog *DialogOwner::GetDialog (string name) -{ - map ::iterator i = Dialogs.find (name); - return (i != Dialogs.end ())? (*i).second: NULL; -} - -bool DialogOwner::AddDialog (string name, Dialog *dialog) -{ - if (Dialogs[name]) { - Dialogs[name]->Present (); - return false; - } - Dialogs[name] = dialog; - return true; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/dialog-owner.h gnome-chemistry-utils-0.10.9/gcu/dialog-owner.h --- gnome-chemistry-utils-0.8.6/gcu/dialog-owner.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/dialog-owner.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,67 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/dialog-owner.h - * - * Copyright (C) 2005-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_DIALOG_OWNER_H -#define GCU_DIALOG_OWNER_H - -#include -#include - -using namespace std; - -namespace gcu { - -class Dialog; - -/*!\class DialogOwner gcu/dialog-owner.h -This class is the base class for objects owning dialogs. It is aimed at ensuring -that each dialog is unique and that when the owner is destroyed, its dialogs -are closed. -*/ - -class DialogOwner -{ -friend class Dialog; -public: - DialogOwner (); - virtual ~DialogOwner (); - -/*! -@param name the name associated to the Dialog. - -@return the Dialog instance associated with name or NULL if there is none. -*/ - Dialog *GetDialog (string name); - -private: - bool AddDialog (string name, Dialog *dialog) ; - void RemoveDialog (string name) {Dialogs.erase (name);} - -private: - map Dialogs; -}; - -} // namespace gcu - -#endif // GCU_DIALOG_OWNER_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/document.cc gnome-chemistry-utils-0.10.9/gcu/document.cc --- gnome-chemistry-utils-0.8.6/gcu/document.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/document.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,72 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * chemistry/document.cc - * - * Copyright (C) 2004-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "document.h" -#include "application.h" -#include "dialog.h" -#include - -using namespace gcu; - -Document::Document (Application *App): Object (DocumentType), -m_Dirty (false), -m_Empty (true) -{ - m_App = App; - if (m_App) - m_App->AddDocument (this); -} - -Document::~Document () -{ - if (m_App) - m_App->RemoveDocument (this); -} - -gchar* Document::GetNewId (gchar* id, bool Cache) -{ - gchar *Id = g_strdup (id); - int i = 0; - while ((Id[i] < '0') || (Id[i] > '9')) - i++; - gchar *buf = new gchar[i + 16]; - strncpy (buf, Id, i); - buf[i] = 0; - g_free (Id); - int j = 1; - string s = m_TranslationTable[buf]; - if (s.size ()) - j = atoi (s.c_str ()); - char* key = g_strdup (buf); - while (snprintf (buf + i, 16, "%d", j++), GetDescendant (buf) != NULL); - Id = g_strdup_printf ("%d", j); - if (Cache) { - m_TranslationTable[key] = Id; - m_TranslationTable[id] = buf; - } - g_free (Id); - g_free (key); - return buf; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/document.h gnome-chemistry-utils-0.10.9/gcu/document.h --- gnome-chemistry-utils-0.8.6/gcu/document.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/document.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,153 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * chemistry/document.h - * - * Copyright (C) 2004-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - - -#ifndef GCU_DOCUMENT_H -#define GCU_DOCUMENT_H - -#include -#include -#include -#include - -using namespace std; - -namespace gcu -{ - -class Application; -class Dialog; - -/*!\class Document gcu/document.h -This class is the base document class. -*/ -class Document: public Object, public DialogOwner -{ -friend class gcu::Object; -friend class gcu::Dialog; -public: -/*! -@param App: the Appllcation which owns the new document. - -The default constructor. Creates an empty document. -*/ - Document (Application *App = NULL); -/*! -The destructor of Document. -*/ - virtual ~Document (); - -public: - -/*! -@param id: the original id to tranlate - -When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document -maintains a table to update links using Ids as identifiers. GetTranslatedId returns -the translated id corresponding to the parameter id. -*/ - string& GetTranslatedId (const char* id) {return m_TranslationTable[id];} - -/*! -@param Id: the entry to remove - -When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document -maintains a table to update links using Ids as identifiers. The EraseTranslationTable method removes thenentry correspondig to id. -*/ - void EraseTranslationId (const char* Id) {m_TranslationTable.erase (Id);} - -/*! -When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document -maintains a table to update links using Ids as identifiers. The EmptyTranslationTable method should be called after pasting to reinitialize the table -to avoid errors on the next paste event. -*/ - void EmptyTranslationTable() {m_TranslationTable.clear();} - -/*! -@param title the new document title. -*/ - void SetTitle (string& title) {m_Title = title;} -/*! -@param title the new document title. -*/ - void SetTitle (char const *title) {m_Title = title;} -/*! -@return the current document title. -*/ - string &GetTitle () {return m_Title;} - -private: - -/*! -@param id: the original id -@param Cache: - -When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document -maintains a table to update links using Ids as identifiers. If Chache is set to true GetId adds a new entry in -the table. -GetNewId returns the translated id -*/ - gchar* GetNewId (gchar* id, bool Cache = true); - -private: - map m_TranslationTable;//used when Ids translations are necessary (on pasting...) - -protected: -/*! -The document title. -*/ - string m_Title; - -/*!\var m_App -The Application instance owning the document. -*/ -/*!\fn GetApp() -@return a pointer to the Appication instance owning the ocument or NULL for -an orphan document. -*/ -GCU_PROT_PROP (Application *, App) -/*!\fn SetDirty(bool dirty) -@param dirty should be true if the document has changed, false otherwise. -*/ -/*!\fn GetDirty() -@return true if the document has changed since it was opened or last saved, -false otherwise. -*/ -/*!\fn GetRefDirty() -*@return the current state of the document as a reference: -true if the document has changed since it was opened or last saved, false otherwise. -*/ -GCU_PROP (bool, Dirty); -/*!\var m_Empty -Tells if the document is empty or not. -*/ -/*!\fn GetEmpty() -@return true if the document does not contain anything, false otherwise. -*/ -GCU_PROT_PROP (bool, Empty); -}; - - -} -#endif //GCU_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/element.cc gnome-chemistry-utils-0.10.9/gcu/element.cc --- gnome-chemistry-utils-0.8.6/gcu/element.cc 2007-04-06 18:28:29.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/element.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,944 +0,0 @@ -/* - * Gnome Chemistry Utils - * element.cc - * - * Copyright (C) 2002-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "element.h" -#include "xml-utils.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static setunits; - -static void ReadValue (char const *source, GcuValue &value) -{ - char *buf, *dot; - value.value = strtod (source, &buf); - dot = strchr (source, '.'); - value.prec = (dot)? buf - dot - 1: 0; - value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0; -} - -static void ReadDimensionalValue (char const *source, GcuDimensionalValue &value) -{ - char *buf, *dot; - value.value = strtod (source, &buf); - dot = strchr (source, '.'); - value.prec = (dot)? buf - dot - 1: 0; - value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0; -} - -namespace gcu -{ - -class EltTable -{ -public: - EltTable(); - virtual ~EltTable(); - - Element* operator [] (int Z); - Element* operator [] (string Symbol); - - void AddElement(Element* Elt); - -private: - vector Elements; - map EltsMap; -}; - -} // namespace gcu - -using namespace gcu; - -EltTable Table; - -EltTable::EltTable() -{ - bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); -#ifdef ENABLE_NLS - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); -#endif - xmlDocPtr xml; - char* DefaultName; - char *lang = getenv ("LANG"); - setlocale (LC_ALL, lang); - char *old_num_locale, *buf, *num, *dot; - unsigned char Z; - map Langs; - Langs["de"] = _("German"); - Langs["fr"] = _("French"); - Langs["it"] = _("Italian"); - Langs["pl"] = _("Polish"); - Langs["ru"] = _("Russian"); - if (!(xml = xmlParseFile (PKGDATADIR"/elements.xml"))) - { - g_error (_("Can't find and read elements.xml")); - } - old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - xmlNode* node = xml->children, *child; - if (strcmp ((const char*) node->name, "gpdata")) g_error (_("Incorrect file format: elements.xml")); - node = node->children; - Element* Elt; - while (node) - { - if (strcmp ((const char*) node->name, "text")) - { - if (strcmp ((const char*) node->name, "element")) g_error (_("Incorrect file format: elements.xml")); - buf = (char*) xmlGetProp (node, (xmlChar*) "symbol"); - num = (char*) xmlGetProp (node, (xmlChar*) "Z"); - Elt = new Element (Z = atoi (num), buf); - xmlFree (num); - xmlFree (buf); - num = (char*) xmlGetProp (node, (xmlChar*) "max_bonds"); - Elt->m_MaxBonds = atoi (num); - xmlFree (num); - num = (char*) xmlGetProp (node, (xmlChar*) "weight"); - Elt->m_Weight = strtod (num, &buf); - dot = strchr (num, '.'); - Elt->m_WeightPrec = (dot)? buf - dot - 1: 0; - child = node->children; - DefaultName = NULL; - while (child) - { - if (!strcmp ((const char*) child->name, "text")) { - child = child->next; - continue; - } - if (!strcmp((const char*)child->name, "name")) { - buf = (char*) xmlNodeGetLang (child); - if ((buf) && (lang)){ - string Lang = Langs[buf]; - char *Name = (char*) xmlNodeGetContent (child); - if (Lang.length ()) - Elt->names[Lang] = Name; - if (!strncmp (lang, buf, 2)) - Elt->name = Name; - xmlFree (Name); - } else if (!buf) { - DefaultName = (char*) xmlNodeGetContent (child); - Elt->names[_("English")] = DefaultName; - } - xmlFree (buf); - } else if (!strcmp ((const char*) child->name, "color")) { - buf = (char*) xmlGetProp (child, (xmlChar*) "red"); - if (buf) { - Elt->m_DefaultColor[0] = strtod (buf, NULL); - xmlFree (buf); - } - buf = (char*) xmlGetProp (child, (xmlChar*) "green"); - if (buf) { - Elt->m_DefaultColor[1] = strtod (buf, NULL); - xmlFree (buf); - } - buf = (char*) xmlGetProp (child, (xmlChar*) "blue"); - if (buf) { - Elt->m_DefaultColor[2] = strtod (buf, NULL); - xmlFree (buf); - } - } child = child->next; - } - if ((Elt->name.length () == 0) && DefaultName) Elt->name = DefaultName; - if (DefaultName) - xmlFree (DefaultName); - AddElement (Elt); - } - node = node->next; - } - setlocale (LC_NUMERIC, old_num_locale); - g_free (old_num_locale); - xmlFreeDoc (xml); -} - -EltTable::~EltTable() -{ - map::iterator i; - for (i = EltsMap.begin(); i != EltsMap.end(); i++) - if ((*i).second) delete (*i).second; - EltsMap.clear(); - Elements.clear(); -} - -Element* EltTable::operator[](int Z) -{ - return Elements[Z]; -} - -Element* EltTable::operator[](string Symbol) -{ - return EltsMap[Symbol]; -} - -void EltTable::AddElement(Element* Elt) -{ - if ((unsigned) Elt->GetZ() >= Elements.size()) Elements.resize(Elements.size() + 10); - Elements[Elt->GetZ()] = Elt; - EltsMap[Elt->GetSymbol()] = Elt; -} - -Element::Element(int Z, const char* Symbol) -{ - m_Z = Z; - strncpy(m_Symbol, Symbol, 3); - m_Symbol[3] = 0; - m_MaxBonds = 0; - m_BestSide = true; - switch (m_Z) - { - case 6: - case 14: - case 32: - m_DefaultValence = 4; - break; - case 5: - case 7: - case 13: - case 15: - case 33: - case 51: - m_DefaultValence = 3; - break; - case 8: - case 16: - case 34: - case 52: - m_BestSide = false; - case 4: - m_DefaultValence = 2; - break; - case 9: - case 17: - case 35: - case 53: - m_BestSide = false; - m_DefaultValence = 1; - break; - case 2: - case 10: - case 28: - case 36: - case 54: - m_DefaultValence = 0; - break; - default: - m_DefaultValence = -1; - } - m_DefaultColor[0] = m_DefaultColor[1] = m_DefaultColor[2] = 0.0; - if (m_Z <= 2) { - m_nve = m_tve = m_Z; - m_maxve = 2; - } else if (m_Z <= 10) { - m_nve = m_tve = m_Z - 2; - m_maxve = 8; - } else if (m_Z <= 18) { - m_nve = m_tve = m_Z - 10; - m_maxve = 8; - } else if (m_Z <= 29) { - m_nve = m_tve = m_Z - 18; - m_maxve = 18; - } else if (m_Z <= 36) { - m_tve = m_Z - 18; - m_nve = m_tve - 10; - m_maxve = 18; - } else if (m_Z <= 47) { - m_nve = m_tve = m_Z - 36; - m_maxve = 18; - } else if (m_Z <= 54) { - m_tve = m_Z - 36; - m_nve = m_tve - 10; - m_maxve = 18; - } else if (m_Z <= 70) { - m_nve = m_tve = m_Z - 54; - m_maxve = 32; - } else if (m_Z <= 79) { - m_tve = m_Z - 54; - m_nve = m_tve - 14; - m_maxve = 32; - } else if (m_Z <= 86) { - m_tve = m_Z - 54; - m_nve = m_tve - 24; - m_maxve = 32; - } else if (m_Z <= 102) { - m_nve = m_tve = m_Z - 86; - m_maxve = 32; - } else if (m_Z <= 111) { - m_tve = m_Z - 86; - m_nve = m_tve - 14; - m_maxve = 32; - } else { // Assume m_Z <= 118 - m_tve = m_Z - 86; - m_nve = m_tve - 24; - m_maxve = 32; - } -} - -Element::~Element() -{ - while (!m_radii.empty()) { - delete m_radii.back(); - m_radii.pop_back(); - } - while (!m_en.empty()) { - delete m_en.back(); - m_en.pop_back(); - } - while (!m_isotopes.empty ()) { - delete (m_isotopes.back ()); - m_isotopes.pop_back (); - } - map::iterator i, iend = props.end (); - for (i = props.begin (); i != iend; i++) - delete (*i).second; - props.clear (); -} - -const gchar* Element::Symbol(gint Z) -{ - Element* Elt = Table[Z]; - return (Elt)? Elt->GetSymbol(): NULL; -} - -bool Element::BestSide(gint Z) -{ - Element* Elt = Table[Z]; - return (Elt)? Elt->GetBestSide(): true; -} - -gint Element::Z(const gchar* symbol) -{ - Element* Elt = Table[symbol]; - return (Elt)? Elt->GetZ(): 0; -} - -Element* Element::GetElement(gint Z) -{ - return Table[Z]; -} - -Element* Element::GetElement(const gchar* symbol) -{ - return Table[symbol]; -} - -unsigned Element::GetMaxBonds(gint Z) -{ - Element* Elt = Table[Z]; - return (Elt)? Elt->GetMaxBonds(): 0; -} - -bool Element::GetRadius(GcuAtomicRadius* radius) -{ - Element* Elt = Table[radius->Z]; - if (!Elt || !Elt->m_radii.size ()) - return false; - for (int i = 0; Elt->m_radii[i]; i++) - { - if (radius->type != Elt->m_radii[i]->type) continue; - if (radius->charge != Elt->m_radii[i]->charge) continue; - if ((radius->cn >= 0) &&(radius->cn != Elt->m_radii[i]->cn)) continue; - if ((radius->spin != GCU_N_A_SPIN) &&(radius->spin != Elt->m_radii[i]->spin)) continue; - if (!radius->scale) - { - *radius = *Elt->m_radii[i]; - return true; - } - else if (!strcmp(radius->scale, Elt->m_radii[i]->scale)) - { - radius->value = Elt->m_radii[i]->value; - return true; - } - } - return false; -} - -bool Element::GetElectronegativity(GcuElectronegativity* en) -{ - Element* Elt = Table[en->Z]; - if (!Elt) return false; - if (!en->scale) - { - *en = *Elt->m_en[0]; - return true; - } - for (int i = 0; Elt->m_en[i]; i++) - if (!strcmp(en->scale, Elt->m_en[i]->scale)) - { - en->value = Elt->m_en[i]->value; - return true; - } - - return false; -} - -const GcuAtomicRadius** Element::GetRadii() -{ - return (const GcuAtomicRadius**) &m_radii.front(); -} - -const GcuElectronegativity** Element::GetElectronegativities() -{ - return (const GcuElectronegativity**) &m_en.front(); -} - -double Element::GetWeight (int Z, int &prec) -{ - Element* Elt = Table[Z]; - return (Elt)? Elt->GetWeight(prec): 0.; -} - -void Element::LoadRadii () -{ - xmlDocPtr xml; - char *old_num_locale, *buf, *num; - unsigned char Z; - static bool loaded = false; - if (loaded) - return; - if (!(xml = xmlParseFile (PKGDATADIR"/radii.xml"))) - { - g_error (_("Can't find and read radii.xml")); - } - old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - xmlNode* node = xml->children, *child; - if (strcmp ((const char*) node->name, "gpdata")) g_error (_("Incorrect file format: radii.xml")); - node = node->children; - Element* Elt; - set::iterator it = units.find ("pm"); - if (it == units.end ()) { - units.insert ("pm"); - it = units.find ("pm"); - } - while (node) { - if (strcmp ((const char*) node->name, "text")) - { - if (strcmp ((const char*) node->name, "element")) g_error (_("Incorrect file format: radii.xml")); - num = (char*) xmlGetProp (node, (xmlChar*) "Z"); - Elt = Table[Z = atoi (num)]; - child = node->children; - while (child) - { - if (!strcmp ((const char*) child->name, "text")) { - child = child->next; - continue; - } - if (!strcmp ((const char*) child->name, "radius")) { - GcuAtomicRadius* radius = new GcuAtomicRadius; - radius->Z = Z; //FIXME: is it really useful there? - buf = (char*) xmlGetProp (child, (xmlChar*) "type"); - if (!buf || - ((!((!strcmp (buf, "covalent")) && (radius->type = GCU_COVALENT))) && - (!((!strcmp (buf, "vdW")) && (radius->type = GCU_VAN_DER_WAALS))) && - (!((!strcmp (buf, "ionic")) && (radius->type = GCU_IONIC))) && - (!((!strcmp (buf, "metallic")) && (radius->type = GCU_METALLIC))) && - (!((!strcmp (buf, "atomic")) && ((radius->type = GCU_ATOMIC) || true))))) { - //invalid radius - delete radius; - if (buf) - xmlFree (buf); - continue; - } - buf = (char*) xmlGetProp (child, (xmlChar*) "scale"); - if (buf) { - radius->scale = g_strdup (buf); - xmlFree (buf); - } else - radius->scale = NULL; - buf = (char*) xmlGetProp (child, (xmlChar*) "charge"); - if (buf) { - radius->charge = strtol (buf, NULL, 10); - xmlFree (buf); - } else - radius->charge = 0; - buf = (char*) xmlGetProp (child, (xmlChar*) "cn"); - if (buf) { - radius->cn = strtol (buf, NULL, 10); - xmlFree (buf); - } else - radius->cn = -1; - buf = (char*) xmlGetProp (child, (xmlChar*)"spin"); - if ((!buf) || - (!((!strcmp (buf, "low")) && (radius->spin = GCU_LOW_SPIN))) && - (!((!strcmp (buf, "high")) && (radius->spin = GCU_HIGH_SPIN)))) - radius->spin = GCU_N_A_SPIN; - if (buf) - xmlFree (buf); - buf = (char*) xmlGetProp (child, (xmlChar*) "value"); - if (buf) { - ReadDimensionalValue (buf, radius->value) ; - radius->value.unit = (*it).c_str (); - Elt->m_radii.push_back (radius); - xmlFree (buf); - } else - delete radius; - } else - g_error ("Invalid radius node"); - child = child->next; - } - Elt->m_radii.push_back (NULL); - } - node = node->next; - } - setlocale (LC_NUMERIC, old_num_locale); - g_free (old_num_locale); - xmlFreeDoc (xml); - loaded = true; -} - -void Element::LoadElectronicProps () -{ - xmlDocPtr xml; - char *old_num_locale, *buf, *num, *dot, *end; - unsigned char Z; - unsigned i; - static bool loaded = false; - if (loaded) - return; - if (!(xml = xmlParseFile (PKGDATADIR"/elecprops.xml"))) - { - g_error (_("Can't find and read elecprops.xml")); - } - old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - xmlNode* node = xml->children, *child; - if (strcmp ((const char*) node->name, "gpdata")) g_error (_("Incorrect file format: elecprops.xml")); - node = node->children; - Element* Elt; - while (node) { - if (strcmp ((const char*) node->name, "text")) { - if (strcmp ((const char*) node->name, "element")) g_error (_("Incorrect file format: elecprops.xml")); - num = (char*) xmlGetProp (node, (xmlChar*) "Z"); - Elt = Table[Z = atoi (num)]; - child = node->children; - while (child) { - if (!strcmp ((const char*) child->name, "text")) { - child = child->next; - continue; - } - if (!strcmp ((const char*) child->name, "en")) { - GcuElectronegativity* en = new GcuElectronegativity; - en->Z = Z; //FIXME: is it really useful there? - buf = (char*) xmlGetProp (child, (xmlChar*) "scale"); - if (buf) { - en->scale = GetStaticScale (buf); - xmlFree (buf); - } else - en->scale = NULL; - buf = (char*) xmlGetProp (child, (xmlChar*) "value"); - if (buf) { - en->value.value = strtod (buf, &end); - dot = strchr (buf, '.'); - en->value.prec = (dot)? end - dot - 1: 0; - en->value.delta = 0; // we should use a generic parser - Elt->m_en.push_back (en); - xmlFree (buf); - } else - delete en; //without a value, the structure is useless and is discarded - } else if (!strcmp ((const char*) child->name, "config")) { - buf = (char*) xmlNodeGetContent (child); - char *cur = buf; - bool nonvoid = false; - if (buf[0] == '[') { - Elt->ElecConfig.append (buf, 4); - cur += 4; - nonvoid = true; - } - while (cur && *cur) { - if (nonvoid) { - cur++; - Elt->ElecConfig.append (" "); - } - Elt->ElecConfig.append (cur, 2); - cur += 2; - i = 1; - while (cur[i] > ' ') - i++; - Elt->ElecConfig.append (""); - Elt->ElecConfig.append (cur, i); - Elt->ElecConfig.append (""); - cur += i; - } - Elt->ElecConfig.append (" "); - xmlFree (buf); - } else if (!strcmp ((const char*) child->name, "ei")) { - unsigned rank; - buf = (char*) xmlGetProp (child, (xmlChar*) "rank"); - if (buf) { - rank = strtol (buf, NULL, 10); - xmlFree (buf); - } else - rank = 1; - if ((i = Elt->m_ei.size ()) < rank) { - Elt->m_ei.resize (rank); - for (; i < rank; i++) - Elt->m_ei[i].value = go_nan; - } - rank--; - buf = (char*) xmlGetProp (child, (xmlChar*) "value"); - if (buf) { - ReadValue (buf, (GcuValue&)Elt->m_ei[rank]) ; - xmlFree (buf); - } else { - //no need to read the unit - Elt->m_ei[rank].value = go_nan; - break; - } - buf = (char*) xmlGetProp (child, (xmlChar*) "unit"); - if (buf) { - string str(buf); - set::iterator it = units.find (str); - if (it == units.end ()) { - units.insert (str); - it = units.find (str); - } - Elt->m_ei[rank].unit = (*it).c_str (); - xmlFree (buf); - } else - Elt->m_ei[rank].unit = "MJ.mol-1"; - } else if (!strcmp ((const char*) child->name, "ae")) { - unsigned rank; - buf = (char*) xmlGetProp (child, (xmlChar*) "rank"); - if (buf) { - rank = strtol (buf, NULL, 10); - xmlFree (buf); - } else - rank = 1; - if ((i = Elt->m_ae.size ()) < rank) { - Elt->m_ae.resize (rank); - for (; i < rank; i++) - Elt->m_ae[i].value = go_nan; - } - rank--; - buf = (char*) xmlGetProp (child, (xmlChar*) "value"); - if (buf) { - ReadValue (buf, (GcuValue&)Elt->m_ae[rank]) ; - xmlFree (buf); - } else { - //no need to read the unit - Elt->m_ae[rank].value = go_nan; - break; - } - buf = (char*) xmlGetProp (child, (xmlChar*) "unit"); - if (buf) { - string str(buf); - set::iterator it = units.find (str); - if (it == units.end ()) { - units.insert (str); - it = units.find (str); - } - Elt->m_ae[rank].unit = (*it).c_str (); - xmlFree (buf); - } else - Elt->m_ae[rank].unit = "kJ.mol-1"; - } else - g_error ("Invalid property node"); - child = child->next; - } - Elt->m_en.push_back (NULL); - } - node = node->next; - } - setlocale (LC_NUMERIC, old_num_locale); - g_free (old_num_locale); - xmlFreeDoc (xml); - loaded = true; -} - -void Element::LoadIsotopes () -{ - xmlDocPtr xml; - char *old_num_locale, *num; - unsigned char Z; - static bool loaded = false; - if (loaded) - return; - if (!(xml = xmlParseFile (PKGDATADIR"/isotopes.xml"))) - { - g_error (_("Can't find and read isotopes.xml")); - } - old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - xmlNode* node = xml->children, *child; - if (strcmp ((const char*) node->name, "gpdata")) g_error (_("Incorrect file format: isotopes.xml")); - node = node->children; - Element *Elt; - Isotope *Is; - int minA, maxA, niso; - while (node) { - if (strcmp ((const char*) node->name, "text")) { - if (strcmp ((const char*) node->name, "element")) g_error (_("Incorrect file format: isotopes.xml")); - minA = maxA = niso = 0; - num = (char*) xmlGetProp (node, (xmlChar*) "Z"); - Elt = Table[Z = atoi (num)]; - xmlFree (num); - if (Elt == NULL) // This should not occur - continue; - child = node->children; - while (child) { - if (!strcmp ((const char*) child->name, "text")) { - child = child->next; - continue; - } - if (!strcmp ((const char*) child->name, "isotope")) { - Is = new Isotope (); - num = (char*) xmlGetProp (child, (xmlChar*) "A"); - if (num) { - Is->A = strtol (num, NULL, 10); - xmlFree (num); - } - num = (char*) xmlGetProp (child, (xmlChar*) "weight"); - if (num) { - ReadValue (num, Is->mass); - xmlFree (num); - } - num = (char*) xmlGetProp (child, (xmlChar*) "abundance"); - if (num) { - ReadValue (num, Is->abundance); - xmlFree (num); - niso++; - if (minA == 0) - minA = maxA = Is->A; - else { - if (minA > Is->A) - minA = Is->A; - else if (maxA < Is->A) - maxA = Is->A; - } - } - Elt->m_isotopes.push_back (Is); - } - child = child->next; - } - if (minA > 0) { - IsotopicPattern *pattern = new IsotopicPattern (minA, maxA); - vector::iterator i, iend = Elt->m_isotopes.end (); - for (i = Elt->m_isotopes.begin (); i != iend; i++) { - if ((*i)->abundance.value != 0.) - pattern->SetValue ((*i)->A, (*i)->abundance.value); - } - pattern->Normalize (); - niso = pattern->GetMonoNuclNb (); - i = Elt->m_isotopes.begin (); - while ((*i)->A != niso) - i++; - pattern->SetMonoMass ((*i)->mass.value); - Elt->m_patterns.push_back (pattern); - } - } - node = node->next; - } - setlocale (LC_NUMERIC, old_num_locale); - g_free (old_num_locale); - xmlFreeDoc (xml); - loaded = true; -} - -void Element::LoadAllData () -{ - LoadRadii (); - LoadElectronicProps (); - LoadIsotopes (); - LoadBODR (); -} - -IsotopicPattern *Element::GetIsotopicPattern (unsigned natoms) -{ - if (m_patterns.size () == 0) - return NULL; - IsotopicPattern *pat, *pattern, *result = NULL; - if (natoms == 0) - return NULL; - unsigned i = 1; - while ((natoms & 1) == 0) { - natoms >>= 1; - i++; - } - while (natoms) { - if (i == 1) { - result = m_patterns[0]; - result->Ref (); - } else if (natoms & 1) { - while (m_patterns.size () < i) { - pat = m_patterns[m_patterns.size () - 1]->Square (); - pattern = pat->Simplify (); - pat->Unref (); - m_patterns.push_back (pattern); - } - pattern = m_patterns[i - 1]; - if (result) { - pat = result->Multiply (*pattern); - result->Unref (); - result = pat->Simplify (); - pat->Unref (); - } else { - result = pattern; - result->Ref (); - } - } - natoms >>= 1; - i++; - } - return result; -} - -GcuDimensionalValue const *Element::GetIonizationEnergy (unsigned rank) -{ - return (rank <= m_ei.size ())? &m_ei[rank - 1]: NULL; -} - -GcuDimensionalValue const *Element::GetElectronAffinity (unsigned rank) -{ - return (rank <= m_ae.size ())? &m_ae[rank - 1]: NULL; -} - -void Element::LoadBODR () -{ - char *old_num_locale; - old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - xmlDocPtr xml = xmlParseFile (BODR_PKGDATADIR"/elements.xml"); - if (!xml) - return; - xmlNodePtr node = xml->children, child; - char *buf = NULL, *unit; - Element *elt; - map props; - if (!strcmp ((char const*) node->name, "list")) { - node = node->children; - while (node) { - if (!strcmp ((char const*) node->name, "atom")) { - elt = NULL; - child = node->children; - while (child) { - if (!strcmp ((char const*) child->name, "scalar")) { - Value *val; - buf = (char*) xmlGetProp (child, (xmlChar const*) "dataType"); - if (!strcmp (buf, "xsd:float")) { - char *end, *dot; - xmlFree (buf); - buf = (char*) xmlNodeGetContent (child); - double x = strtod (buf, &end); - dot = strchr (buf, '.'); - int prec = (dot)? end - dot - 1: 0; - unit = (char*) xmlGetProp (child, (xmlChar const*) "units"); - xmlFree (buf); - buf = (char*) xmlGetProp (child, (xmlChar const*) "errorValue"); - int delta; - if (buf) - delta = strtol (buf, NULL, 10); - else - delta = 0; - xmlFree (buf); - if (unit) { - DimensionalValue *v = new DimensionalValue (); - if (!strcmp (unit, "units:atmass")) - v->val.unit = "u"; - else if (!strcmp (unit, "units:ev")) - v->val.unit = "eV"; - else if (!strcmp (unit, "units:ang")) - v->val.unit = "Å"; - else if (!strcmp (unit, "siUnits:kelvin")) - v->val.unit = "K"; -// else if (!strcmp (unit, "")) -// v->val.unit = ""; - else - v->val.unit = ""; - xmlFree (unit); - v->val.value = x; - v->val.prec = prec; - v->val.delta = delta; - val = v; - } else { - SimpleValue *v = new SimpleValue (); - v->val.value = x; - v->val.prec = prec; - v->val.delta = delta; - val = v; - } - buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); - if (elt) - elt->props[(strncmp (buf, "bo:", 3))? buf: buf + 3] = val; - xmlFree (buf); - } else if (!strcmp (buf, "xsd:String") || !strcmp (buf, "xsd:string")) { - buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); - char *val = (char*) xmlNodeGetContent (child); - if (elt) - elt->sprops[(strncmp (buf, "bo:", 3))? buf: buf + 3] = val; - xmlFree (buf); - xmlFree (val); - } else if (!strcmp (buf, "xsd:int") || !strcmp (buf, "xsd:Integer")) { - xmlFree (buf); - buf = (char*) xmlNodeGetContent (child); - int val = strtol (buf, NULL, 10); - xmlFree (buf); - buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); - if (!strcmp (buf, "bo:atomicNumber")) - elt = Table[val]; - else if (elt) - elt->iprops[(strncmp (buf, "bo:", 3))? buf: buf + 3] = val; - xmlFree (buf); - } else if (!strcmp (buf, "xsd:date")) { - // assumeing only the discovery year is useful for us - xmlFree (buf); - buf = (char*) xmlNodeGetContent (child); - int val = strtol (buf, NULL, 10); - xmlFree (buf); - buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); - if (!strcmp (buf, "bo:discoveryDate")) - elt->iprops["discoveryDate"] = val; - xmlFree (buf); - } - } - if (props.size () > 0) { - map :: iterator i, iend = props.end (); - for (i = props.begin (); i != iend; i++) - elt->props[(*i).first] = (*i).second; - props.clear (); - } - child = child->next; - } - } - node = node->next; - } - } - xmlFreeDoc (xml); - setlocale (LC_NUMERIC, old_num_locale); - g_free (old_num_locale); -} - -int Element::GetIntegerProperty (char const *property_name) -{ - map::iterator i = iprops.find (property_name); - return (i == iprops.end ())? GCU_ERROR: (*i).second; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/element.h gnome-chemistry-utils-0.10.9/gcu/element.h --- gnome-chemistry-utils-0.8.6/gcu/element.h 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/element.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,306 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * element.h - * - * Copyright (C) 2002-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_ELEMENT_H -#define GCU_ELEMENT_H - -#include -#include -#include -#include -#include "chemistry.h" -#include "isotope.h" -#include "value.h" - -#define GCU_ERROR (1 << (sizeof(int) - 1)) - -using namespace std; - -/*!\namespace gcu -The namespace used for all C++ classes provided by the Gnome Chemistry Utils. -*/ -namespace gcu -{ - -class EltTable; - -/*!\class Element gcu/element.h - Represents a chemical element. - This class has no public constructor or destructor. The instances are created by the framework - from data in the elements.xml file and - a user cannot create a new element. -*/ -class Element -{ -friend class EltTable; -private: - /*! - \param Z: the atomic number corresponding to the element - \param Symbol: the atomic symbol of the element - - This constructor is private and cannot be used ouside of this class. - */ - Element (int Z, const char* Symbol); - virtual ~Element (); - -public: - /*! - @param Z: the atomic number of a chemical element. - @return The chemical symbol of the element whose atomic number is Z or NULL if the element is unknown. - */ - static const gchar* Symbol (gint Z); - /*! - @param Z: the atomic number of a chemical element. - - This static method is used to know on what side of the symbol of the element whose atomic number is Z - attached hydrogens should be written. - @return true if hydrogens should be written on the right and false when it should be written on the left side. - */ - static bool BestSide (gint Z); - /*! - @param symbol: the symbol of a chemical element. - @return The atomic number of the element whose chemical symbol is used as parameter or 0 if the element is unknown. - */ - static gint Z (const gchar* symbol); - /*! - @param Z: the atomic number of a chemical element. - @return a pointer to the Element whose atomic number is Z or NULL if the element is unknown. - */ - static Element* GetElement (gint Z); - /*! - @param symbol: the symbol of a chemical element. - @return a pointer to the Element whose symbol is used as parameter or NULL if the element is unknown. - */ - static Element* GetElement (const gchar* symbol); - /*! - @param Z: the atomic number of a chemical element. - @param prec: receive the number of significant digits. - - @return the atomic mass of the element. - */ - double GetWeight (int Z, int &prec); - /*! - @param radius: a pointer to a GcuAtomicRadius structure. - - Before calling this function, most fields in the GcuAtomicRadius structure must be filled: - - Z: the atomic number, mandatory - - type: the type of the radius searched - - charge: the charge of the atom. 0 for all radii except ionic radii. - - cn: the coordination number or -1 if not significant - - spin: the spin state or GCU_N_A_SPIN if not significant - - scale: the name of the scale (e.g. "Pauling") or NULL - - The programs searches a value corresponding to the fields having a non default value. If one is found - the other fields are given the corresponding values f the first match before returning. - - @return true if a radius has been found and false if not. - */ - static bool GetRadius (GcuAtomicRadius* radius); - /*! - @param en: a pointer to a GcuElectronegativity structure. - - Before calling this function, the following fields in the GcuElectronegativity structure must be filled: - - Z: the atomic number, mandatory - - type: the gcu_radius_type, mandatory - - charge: the charge of the atom, mandatory; must be 0 for non ionic radii - and non null for ionic radii. - - scale: the name of the scale (e.g. "Pauling") or NULL - - The programs searches an electronegativity value for the element in the scale if given. If one is found - the value and the scale (if NULL on calling) are given the corresponding values of the first match before returning. - - @return true if a match has been found and false if not. - */ - static bool GetElectronegativity (GcuElectronegativity* en); - /*! - @param Z: the atomic number of a chemical element. - - The value returned by this method might be too low in some cases and is only indicative. Instances of the Atom class - accept any number of bonds. This behavior might change in future versions. - @return the maximum number of bonds an atom of the element can be involved in. - */ - static unsigned GetMaxBonds (gint Z); - /*! - Loads the atomic radii database. - */ - static void LoadRadii (); - /*! - Loads the atomic electronic properties database. - */ - static void LoadElectronicProps (); - /*! - Loads the isotopes database. - */ - static void LoadIsotopes (); - /*! - Loads the Blue Obelisk Database. - */ - static void LoadBODR (); - /*! - Loads all databases. - */ - static void LoadAllData (); - - /*! - \return The atomic number of the chemical element. - */ - int GetZ () {return m_Z;} - /*! - \return The chemical symbol of the element. - */ - const char* GetSymbol () {return m_Symbol;} - /*! - \return The default valence of the element for some elements, mainly non metals. For others, the returned value is -1 - and should not be taken into account. - */ - char GetDefaultValence () {return m_DefaultValence;} - /*! - The value returned by this method might be too low in some cases and is only indicative. Instances of the Atom class - accept any number of bonds. This behavior might change in future versions. - @return the maximum number of bonds an atom of the element can be involved in. - */ - unsigned GetMaxBonds () {return m_MaxBonds;} - /*! - This static method is used to know on what side of the symbol of the element - attached hydrogens should be written. - @return true if hydrogens should be written on the right and false when it should be written on the left side. - */ - bool GetBestSide () {return m_BestSide;} - /*! - Retreives the default color used for the element. - @return an array of three double values for the red, green and blue components of the color. - */ - double* GetDefaultColor () {return m_DefaultColor;} - /*! - @return the name of the element in the current locale or in english if the current locale is not supported in the database. - */ - const char* GetName () {return name.c_str();} - /*! - @return a pointer to the array of pointers to GcuAtomicRadius structures for all known radii for the element. - Last value in the array is NULL. - */ - const GcuAtomicRadius** GetRadii (); - /*! - @return a pointer to the array of pointers to GcuElectronegativity structures for all known electronegativities for the element. - Last value in the array is NULL. - */ - const GcuElectronegativity** GetElectronegativities (); - /*! - @return the number of valence electrons of the neutral atom. - */ - unsigned GetValenceElectrons () {return m_nve;} - /*! - @return the number of valence electrons of the neutral atom, - including d and f electrons. - */ - unsigned GetTotalValenceElectrons () {return m_tve;} - /*! - @return the maximume number of valence electrons of the neutral atom, - including d and f electrons. - */ - unsigned GetMaxValenceElectrons () {return m_maxve;} - /*! - @param prec: receive the number of significant digits. - - @return the atomic mass of the element. - */ - double GetWeight (int& prec) {prec = m_WeightPrec; return m_Weight;} - /*! - @param natoms: atoms count. - - @return the isotopic pattern correponding to a fragment containing n atoms of the - element. - */ - IsotopicPattern *GetIsotopicPattern (unsigned natoms); - /*! - @return the fundamental electronic configuration for the element. The - returned string is formated as a pango markup, with electron numbers - for each sublevel as superscript. - */ - string const& GetElectronicConfiguration () {return ElecConfig;} - /*! - @return the map of known names for the element indexed by language. - */ - map const& GetNames () {return names;} - /*! - @param rank: the rank of the ionization. - - @return the requested ionization energy as a &GcuDimensionalValue. - */ - GcuDimensionalValue const *GetIonizationEnergy (unsigned rank = 1); - /*! - @param rank: the rank of the electron affinity. - - @return the requested electron affinity as a &GcuDimensionalValue. - For most elements, only the first is known. - */ - GcuDimensionalValue const *GetElectronAffinity (unsigned rank = 1); - /*! - @param property_name: the name of the property as used in the Blue - Obelisk Data Repository (without the "bo:" prefix). - - @return the requested property if known, or NULL. - */ - Value const *GetProperty (char const *property_name) {return props[property_name];} - /*! - @param property_name: the name of the property as used in the Blue - Obelisk Data Repository (without the "bo:" prefix). - - @return the requested string property if known as a reference or an empty string. - */ - string &GetStringProperty (char const *property_name) {return sprops[property_name];} - /*! - @param property_name: the name of the property as used in the Blue - Obelisk Data Repository (without the "bo:" prefix). - - @return the requested integer property if known, or G_MININT32. - */ - int GetIntegerProperty (char const *property_name); - -private: - unsigned char m_Z, m_nve, m_tve, m_maxve; - char m_Symbol[4]; - double m_Weight; - int m_WeightPrec; - char m_DefaultValence; - unsigned char m_MaxBonds; - bool m_BestSide; - double m_DefaultColor[3]; - string name; - vector m_radii; - vector m_en; - vector m_isotopes; - vector m_patterns; - vector m_ei; - vector m_ae; - map names; - map props; - map sprops; - map iprops; - string ElecConfig; -}; - -} // namespace gcu - -#endif // GCU_ELEMENT_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/filechooser.cc gnome-chemistry-utils-0.10.9/gcu/filechooser.cc --- gnome-chemistry-utils-0.8.6/gcu/filechooser.cc 2008-01-20 12:02:27.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/filechooser.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,149 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * filechooser.cc - * - * Copyright (C) 2006-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include -#include "filechooser.h" -#include -#include -#include -#include -#include - -using namespace gcu; - -FileChooser::FileChooser (Application *App, bool Save, list mime_types, Document *pDoc, char const *title, GtkWidget *extra_widget) -{ - char* filename = NULL; - m_pDoc = pDoc; - dialog = (GtkFileChooser*) gtk_file_chooser_dialog_new ( - (title != NULL)? title: ((Save)? _("Save as"): _("Open")), - App->GetWindow(), - (Save)? GTK_FILE_CHOOSER_ACTION_SAVE: GTK_FILE_CHOOSER_ACTION_OPEN, - (Save)? GTK_STOCK_SAVE: GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - NULL); - if (extra_widget) - gtk_file_chooser_set_extra_widget (dialog, extra_widget); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); - GtkFileChooser* chooser = GTK_FILE_CHOOSER (dialog); - GtkFileFilter* filter = gtk_file_filter_new (); - list::iterator i, iend = mime_types.end (); - for (i = mime_types.begin (); i != iend; i++) - gtk_file_filter_add_mime_type (filter, (*i).c_str ()); - GtkComboBox *format_combo = NULL; - if (!Save) - gtk_file_chooser_set_select_multiple (chooser, true); - if (mime_types.size () > 1) { - GtkWidget *box = gtk_hbox_new (FALSE, 2); - GtkWidget *label = gtk_label_new_with_mnemonic (_("File _type:")); - format_combo = GTK_COMBO_BOX (gtk_combo_box_new_text ()); - gtk_combo_box_append_text (format_combo, _("Automatic")); - for (i = mime_types.begin (); i != iend; i++) { - char const *type = go_mime_type_get_description ((*i).c_str ()); - if (type) - gtk_combo_box_append_text (format_combo, type); - else - gtk_combo_box_append_text (format_combo, (*i).c_str ()); - } - gtk_combo_box_set_active (format_combo, 0); - - gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (format_combo), FALSE, TRUE, 12); - gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (format_combo)); - - if (extra_widget) { - if (GTK_IS_TABLE (extra_widget)) { - GtkTable *t = GTK_TABLE (extra_widget); - guint rows, cols; - g_object_get (G_OBJECT (t), "n-rows", &rows, "n-columns", &cols, NULL); - gtk_table_resize (t, rows + 1, cols); - gtk_box_pack_start (GTK_BOX (box), gtk_label_new (""), TRUE, TRUE, 0); - gtk_table_attach (t, box, 0, cols, rows, rows + 1, GTK_FILL, static_cast (0), 0, 0); - } else - g_warning ("not implemented, please file a bug report"); - } else - gtk_file_chooser_set_extra_widget (dialog, box); - gtk_widget_show_all (box); - } - gtk_file_chooser_set_filter (chooser, filter); - // Now add network directories - gtk_file_chooser_set_local_only (chooser, false); - char const* dir = App->GetCurDir (); - if (dir) - gtk_file_chooser_set_current_folder_uri (chooser, dir); - while (gtk_widget_show_all (GTK_WIDGET (dialog)), gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { - // find the mime_type - char const *mime_type = NULL; - if (mime_types.size () == 1) - mime_type = mime_types.front ().c_str (); - else if (mime_types.size () > 0) { - int j = gtk_combo_box_get_active (format_combo); - if (j > 0) { - i = mime_types.begin (); - while (--j > 0) - i++; - mime_type = (*i).c_str (); - } - } - if (Save) { - filename = gtk_file_chooser_get_uri (chooser); - if (!mime_type) { - mime_type = go_get_mime_type (filename); - if (!mime_type) - mime_type = gnome_vfs_get_file_mime_type_fast (filename, NULL); - // ensure the found mime type is in the list - bool found = false; - if (mime_type) { - list::iterator it, itend = mime_types.end (); - for (it = mime_types.begin (); it != itend; it++) - if (*it == mime_type) { - found = true; - break; - } - } - if (!found) - mime_type = mime_types.front ().c_str (); - } - gtk_widget_hide (GTK_WIDGET (dialog)); - if (!App->FileProcess (filename, mime_type, Save, GTK_WINDOW (dialog), m_pDoc)) { - g_free (filename); - break; - } - g_free (filename); - } else { - GSList* files = gtk_file_chooser_get_uris (chooser); - GSList* iter = files; - gtk_widget_hide (GTK_WIDGET (dialog)); - while (iter) { - filename = (char*) iter->data; - App->FileProcess(filename, (mime_type)? mime_type: go_get_mime_type (filename), Save, GTK_WINDOW (dialog), m_pDoc); - g_free (filename); - iter = iter->next; - } - g_slist_free (files); - break; - } - } - gtk_widget_destroy (GTK_WIDGET (dialog)); -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/filechooser.h gnome-chemistry-utils-0.10.9/gcu/filechooser.h --- gnome-chemistry-utils-0.8.6/gcu/filechooser.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/filechooser.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,73 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * filechooser.h - * - * Copyright (C) 2006-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_FILECHOOSER_H -#define GCU_FILECHOOSER_H - -#include -#include -#include -#include - -using namespace std; - -namespace gcu -{ - -class Application; -class Document; - -/*!\class FileChooser gcu/filechooser.h -This class is used each time a file name must be choosen. It embeds a GtkFileChooserDialog -window. -*/ -class FileChooser -{ -public: -/*! -@param App the Application instance owning the dialog. -@param Save tells if the requested file is to be saved or loaded. -@param mime_types a std::list of supported mime types. -@param pDoc the document to save, the parameter is optional when loading. -Default value is NULL. -@param title an optional title for the dialog box. Default value is NULL. -@param extra_widget an optional widget to add to the GtkFileChooserDialog -window. Default value is NULL. - -The constructor shows the GtkFileChooserDialog window, retrieve it's response and calls -Application::FileProcess if needed. The dialog is modal (nothing else can be done while -it is opened). -*/ - FileChooser (Application *App, bool Save, list mime_types, Document *pDoc = NULL, char const *title = NULL, GtkWidget *extra_widget = NULL); - -private: - GtkFileChooser* dialog; - bool m_bSave; - Application* m_pApp; - Document* m_pDoc; -}; - -} - -#endif // GCU_FILECHOOSER_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/formula.cc gnome-chemistry-utils-0.10.9/gcu/formula.cc --- gnome-chemistry-utils-0.8.6/gcu/formula.cc 2008-01-09 00:31:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/formula.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,487 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * formula.cc - * - * Copyright (C) 2005-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "formula.h" -#include "element.h" -#include -#include -#include -#include -#include -#include - -using namespace gcu; - -parse_error::parse_error(const string& __arg, int start, int length) - : exception(), m_msg(__arg) -{ - m_start = start; - m_length = length; -} - -parse_error::~parse_error() throw() { } - -const char* -parse_error::what() const throw() -{ return m_msg.c_str(); } - -const char* -parse_error::what(int &start, int &length) const throw() -{ - start = m_start; - length = m_length; - return m_msg.c_str(); -} - -namespace gcu { - -class FormulaElt -{ -public: - FormulaElt (); - virtual ~FormulaElt (); - virtual string Markup (); - virtual void BuildRawFormula (map &raw) = 0; - int stoich; -}; - -class FormulaAtom: public FormulaElt -{ -public: - FormulaAtom (int Z); - virtual ~FormulaAtom (); - virtual string Markup (); - virtual void BuildRawFormula (map &raw); - int elt; -}; - -class FormulaBlock: public FormulaElt -{ -public: - FormulaBlock (); - virtual ~FormulaBlock (); - virtual string Markup (); - virtual void BuildRawFormula (map &raw); - list children; - int parenthesis; -}; - -} - -FormulaElt::FormulaElt () -{ - stoich = 1; -} - -FormulaElt::~FormulaElt () -{ -} - -string FormulaElt::Markup () -{ - ostringstream oss; - if (stoich > 1) - oss << "" << stoich << ""; - return oss.str (); -} - -FormulaAtom::FormulaAtom (int Z): FormulaElt() -{ - elt = Z; -} - -FormulaAtom::~FormulaAtom () -{ -} - -string FormulaAtom::Markup () -{ - string s = Element::Symbol (elt); - s += FormulaElt::Markup (); - return s; -} - -void FormulaAtom::BuildRawFormula (map &raw) -{ - raw[elt] += stoich; -} - -FormulaBlock::FormulaBlock (): FormulaElt() -{ -} - -FormulaBlock::~FormulaBlock () -{ - list::iterator i, end = children.end(); - for (i = children.begin (); i != end; i++) - delete *i; -} - -string FormulaBlock::Markup () -{ - ostringstream oss; - switch (parenthesis) { - case 0: - oss << "("; - break; - case 1: - oss << "["; - break; - case 2: - oss << "{"; - break; - } - list::iterator i, end = children.end(); - for (i = children.begin (); i != end; i++) { - oss << (*i)->Markup (); - } - switch (parenthesis) { - case 0: - oss << ")"; - break; - case 1: - oss << "]"; - break; - case 2: - oss << "}"; - break; - } - oss << FormulaElt::Markup (); - return oss.str (); -} - -void FormulaBlock::BuildRawFormula (map &raw) -{ - map local; - list::iterator i, iend = children.end(); - for (i = children.begin (); i != iend; i++) - (*i)->BuildRawFormula (local); - map::iterator j, jend = local.end(); - for (j = local.begin (); j != jend; j++){ - raw[(*j).first] += stoich * (*j).second;} -} - -static bool AnalString (char *sz, list &result) -{ - if (*sz == 0) - return true; - int i = 0; - char sy[4]; - if (*sz) { - if (islower (*sz)) { - /* we might have some abbreviation around there */ - } - *sz = toupper (*sz); - if (strlen (sz) == 1) { - i = Element::Z (sz); - if (i > 0) { - result.push_back (new FormulaAtom (i)); - return true; - } else - return false; - } - if (isupper (sz[1])) { - sy [0] = *sz; - sy [1] = 0; - i = Element::Z (sy); - if (i > 0) { - result.push_back (new FormulaAtom (i)); - if (AnalString (sz + 1, result)) - return true; - delete result.back (); - result.pop_back (); - } - sy[1] = tolower (sz[1]); - sy[2] = 0; - i = Element::Z (sy); - if (i > 0) { - result.push_back (new FormulaAtom (i)); - if (AnalString (sz + 2, result)) - return true; - delete result.back (); - result.pop_back (); - } - if (*sz != 'U') - return false; - sy[2] = tolower (sz[2]); - sy[3] = 0; - i = Element::Z (sy); - if (i > 0) { - result.push_back (new FormulaAtom (i)); - if (AnalString (sz + 3, result)) - return true; - } - return false; - } else { - sy[0] = sz[0]; - sy[1] = sz[1]; - if (*sz == 'U') { - // No 2 chars symbols begining with U exist, so try 3 chars symbols - sy[2] = tolower (sz[2]); - sy[3] = 0; - i = Element::Z (sy); - if (i > 0) { - result.push_back (new FormulaAtom (i)); - if (AnalString (sz + 3, result)) - return true; - delete result.back (); - result.pop_back (); - } - } - sy[2] = 0; - i = Element::Z (sy); - if (i > 0) { - result.push_back (new FormulaAtom (i)); - if (AnalString (sz + 2, result)) - return true; - delete result.back (); - result.pop_back (); - } - sy[1] = 0; - i = Element::Z (sy); - if (i > 0) { - result.push_back (new FormulaAtom (i)); - if (AnalString (sz + 1, result)) - return true; - } - } - } - return false; -} - -Formula::Formula (string entry) throw (parse_error) -{ - Entry = entry; - Parse (Entry, Details); - m_WeightCached = false; -} - -Formula::~Formula () -{ - Clear (); -} - -char const *Formula::GetMarkup () -{ - return Markup.c_str (); -} - -map &Formula::GetRawFormula () -{ - return Raw; -} - -char const *Formula::GetRawMarkup () -{ - return RawMarkup.c_str (); -} - -void Formula::SetFormula (string entry) throw (parse_error) -{ - Entry = entry; - Clear (); - Parse (Entry, Details); - list::iterator i, iend = Details.end(); - // now update markups and raw formula - for (i = Details.begin (); i != iend; i++) { - Markup += (*i)->Markup (); - (*i)->BuildRawFormula (Raw); - } - ostringstream oss; - map elts; - int nC = 0, nH = 0; - map::iterator j, jend = Raw.end(); - for (j = Raw.begin (); j != jend; j++) { - switch ((*j).first) { - case 1: - nH = (*j).second; - break; - case 6: - nC = (*j).second; - break; - default: - elts[Element::Symbol((*j).first)] = (*j).second; - break; - } - } - if (nC > 0) { - oss << "C"; - if (nC > 1) - oss << "" << nC << ""; - } - if (nH > 0) { - oss << "H"; - if (nH > 1) - oss << "" << nH << ""; - } - map::iterator k, kend = elts.end (); - for (k = elts.begin (); k != kend; k++) { - nC = (*k).second; - oss << (*k).first; - if (nC > 1) - oss << "" << nC << ""; - } - RawMarkup = oss.str (); -} - -void Formula::Clear () -{ - list::iterator i, end = Details.end(); - for (i = Details.begin (); i != end; i++) - delete *i; - Details.clear (); - Markup = ""; - Raw.clear (); - RawMarkup = ""; - m_WeightCached = false; -} - -void Formula::Parse (string &formula, list &result) throw (parse_error) -{ - int i = 0, npo, size = formula.size (), j, k = 0; // parsing index, number of open parenthesis, string size - char c = 0, *sz, *end; - while (i < size) { - if (formula[i] == '(' || formula[i] == '[' || formula[i] == '{') { - switch (formula[i]) { - case '(': - c = ')'; - k = 0; - break; - case '[': - c = ']'; - k = 1; - break; - case '{': - c = '}'; - k = 2; - break; - } - npo = 1; - j = i + 1; - while (j < size && npo > 0) { - if (formula[j] == '(' || formula[j] == '[' || formula[j] == '{') - npo++; - else if (formula[j] == ')' || formula[j] == ']' || formula[j] == '}') - npo--; - j++; - } - if (npo || formula[j - 1] != c) - throw parse_error (_("Unmatched parenthesis"), i, 1); - string str (formula, i + 1, j - i - 2); - FormulaBlock *block = new FormulaBlock (); - block->parenthesis = k; - result.push_back (block); - try { - Parse (str, block->children); - } - catch (parse_error &error) { - error.add_offset (i + 1); - throw error; - } - block->stoich = strtol (formula.c_str () + j, &end, 10); - i = end - formula.c_str (); - if (i == j) - block->stoich = 1; - } else if (isalpha (formula[i])) { - j = i + 1; - while (isalpha (formula[j])) - j++; - k = j - i; - sz = new char[k + 1]; - sz = strndup (formula.c_str () + i, k); - sz[k] = 0; - if (!AnalString (sz, result)) { - delete [] sz; - throw parse_error (_("Could not interpret the symbol list"), i, k); - } - delete [] sz; - i = j; - FormulaElt *elt = result.back (); - if (!elt) - throw runtime_error (_("Parser failed, please fill a bug report.")); - elt->stoich = strtol (formula.c_str () + j, &end, 10); - i = end - formula.c_str (); - if (i == j) - elt->stoich = 1; - } else if (formula[i] == ')' || formula[i] == ']' || formula[i] == '}') { - throw parse_error (_("Unmatched parenthesis"), i, 1); - } else - throw parse_error (_("Invalid character"), i, 1); - } -} - -double Formula::GetMolecularWeight (int &prec, bool &artificial) -{ - if (Raw.size () == 0) { - prec = 0; - return 0.; - } - if (!m_WeightCached) { - double atom_weight, delta = 0.; - int atom_prec; - m_Weight = 0; - m_WeightPrec = 16; // something much greater that possible for any element. - m_Artificial = false; // most formula don't have artificial elements - map::iterator i, end = Raw.end (); - for (i = Raw.begin (); i != end; i++) { - atom_weight = Element::GetElement ((*i).first)->GetWeight (atom_prec); - if (atom_prec == 0) - m_Artificial = true; - delta += pow (10.0, (double) -atom_prec) * (*i).second; - m_Weight += atom_weight * (*i).second; - } - m_WeightPrec = (int) ceil (-log10 (delta) - 1e-5); - } - m_WeightCached = true; - prec = m_WeightPrec; - artificial = m_Artificial; - return m_Weight; -} - -void Formula::CalculateIsotopicPattern (IsotopicPattern &pattern) -{ - map::iterator i, end = Raw.end (); - i = Raw.begin (); - if (i == end) // empty formula - return; - IsotopicPattern *pat, *pat0; - pat = Element::GetElement ((*i).first)->GetIsotopicPattern ((*i).second); - pattern.Copy (*pat); - pat->Unref (); - for (i++; i != end; i++) { - pat = Element::GetElement ((*i).first)->GetIsotopicPattern ((*i).second); - if (!pat) { - // no stable isotope known for the element - pattern.Clear (); - return; - } - pat0 = pattern.Multiply (*pat); - pat->Unref (); - pat = pat0->Simplify (); - pattern.Copy (*pat); - pat0->Unref (); - pat->Unref (); - } -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/formula.h gnome-chemistry-utils-0.10.9/gcu/formula.h --- gnome-chemistry-utils-0.8.6/gcu/formula.h 2006-12-24 10:11:02.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/formula.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,147 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * formula.h - * - * Copyright (C) 2005-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_FORMULA_H -#define GCU_FORMULA_H - -#include -#include -#include -#include -#include "isotope.h" - -using namespace std; - -namespace gcu -{ -/*!\class parse_error gcu/formula.h -Exception class derived from std::exception used for errors encountered -when parsing a formula. -*/ - -class parse_error: public exception -{ -public: -/*! Takes a character string describing the error and two integers -* indicating where the error occured. -*/ - explicit - parse_error (const string& __arg, int start, int length); - - virtual - ~parse_error () throw (); - -/*! Returns a C-style character string describing the general cause of - * the current error (the same string passed to the constructor). -*/ - virtual const char* - what () const throw (); -/*! Returns a C-style character string describing the general cause of - * the current error (the same string passed to the constructor). -*/ - const char* - what (int& start, int& length) const throw (); - -/*! Adds an offset to the start of the error. This is used by the Formula -class when an exception occurs while parsing a substring. -*/ - void add_offset (int offset) {m_start += offset;} - -private: - string m_msg; - int m_start, m_length; - -}; - -class FormulaElt; - -/*!\class Formula gcu/formula.h -This class interprets a chemical formula provided as a string and make -some calculations using it. Currently, it is able to calculate the raw formula, -the molecular weight and the isotopic pattern. -*/ -class Formula -{ -public: -/*! -@param entry: the formula to parse as a string. -The constructor will emit a parse_error exception. -if it cannot parse the given formula. -*/ - Formula (string entry) throw (parse_error); - virtual ~Formula (); - -/*! -@return the original formula as a pango markup. -*/ - char const *GetMarkup (); -/*! -@return the raw formula as a map of atoms numbers indexed by atomic number Z. -*/ - map &GetRawFormula (); -/*! -@return the raw formula as a pango markup. -*/ - char const *GetRawMarkup (); -/*! -@param entry: the formula to parse as a string. -Calls Formula::Clear before parsing the new formula. -The method will emit a parse_error exception -if it cannot parse the given formula. -*/ - void SetFormula (string entry) throw (parse_error); -/*! -Clears all data. -*/ - void Clear (); -/*! -@param prec: will be filled with the precision (number of significative decimal figures). -@param artificial: will be true if the formula contains an artificial element (with -no natural isotope). -@returns the molecular weight corresponding to the formula. -*/ - double GetMolecularWeight (int &prec, bool &artificial); -/*! -@param pattern: the IsotopicPattern to be filled -This method evaluates the isotopic pattern and fills the pattern parameter -with the calculated data. -*/ - void CalculateIsotopicPattern (IsotopicPattern &pattern); - -private: - void Parse (string &formula, list&result) throw (parse_error); - -private: - string Entry, Markup, RawMarkup; - map Raw; - list Details; - double m_Weight; - int m_WeightPrec; - bool m_WeightCached; - bool m_Artificial; -}; - -} - -#endif // GCU_FORMULA_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/gldocument.cc gnome-chemistry-utils-0.10.9/gcu/gldocument.cc --- gnome-chemistry-utils-0.8.6/gcu/gldocument.cc 2006-06-18 15:35:07.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/gldocument.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/gldocument.cc - * - * Copyright (C) 2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include - -using namespace gcu; - -GLDocument::GLDocument (Application *App): Document (App) -{ -} - -GLDocument::~GLDocument () -{ -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/gldocument.h gnome-chemistry-utils-0.10.9/gcu/gldocument.h --- gnome-chemistry-utils-0.8.6/gcu/gldocument.h 2006-12-24 10:11:02.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gldocument.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,78 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/gldocument.h - * - * Copyright (C) 2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_GL_DOCUMENT_H -#define GCU_GL_DOCUMENT_H - -#include "document.h" -#include "macros.h" - -namespace gcu -{ - -class GLView; - -/*!\class GLDocument gcu/gldocument.h -This class is a base class for documents representing 3d objects. -*/ - -class GLDocument: public Document -{ -public: -/*! -@param App the application owning the new document. - -Default constructor. -*/ - GLDocument (Application *App); -/*! -Default destructor. -*/ - virtual ~GLDocument (); - -/*! -Called by GLView::Update to populate its GLList. -*/ - virtual void Draw () = 0; - -// Properties -/*!\var m_MaxDist -The longest distance between any object and the center of the model. -*/ -/*!\fn GetMaxDist() -@return the longest distance between any object and the center of the model. -*/ -GCU_PROT_PROP (double, MaxDist); -/*!\var m_View -The associated GLView instance. -*/ -/*!\fn GetView() -@return the associated GLView instance. -*/ -GCU_PROT_PROP (GLView*, View); -}; - -}; // namespace gcu - -#endif // GCU_GL_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/glview.cc gnome-chemistry-utils-0.10.9/gcu/glview.cc --- gnome-chemistry-utils-0.8.6/gcu/glview.cc 2008-01-20 12:02:27.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/glview.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,553 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/glview.cc - * - * Copyright (C) 2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static GdkGLConfig *glconfig = NULL; -double DefaultPsi = 70.; -double DefaultTheta = 10.; -double DefaultPhi = -90.; -using namespace gcu; - -// Callbacks -static bool on_init(GtkWidget *widget, GLView* View) -{ - View->Init (); - return true; -} - -bool on_reshape(GtkWidget *widget, GdkEventConfigure *event, GLView* View) -{ - View->Reshape (); - return true; -} - -static bool on_draw(GtkWidget *widget, GdkEventExpose *event, GLView* View) -{ - /* Draw only last expose. */ - if (event->count > 0) return TRUE; - - View->Draw (); - return true; -} - -static bool on_motion(GtkWidget *widget, GdkEventMotion *event, GLView* View) -{ - View->OnMotion (event); - return true; -} - -static bool on_pressed(GtkWidget *widget, GdkEventButton *event, GLView* View) -{ - return View->OnPressed (event); -} - -// GLView implementation - -GLView::GLView (GLDocument* pDoc) -{ - m_bInit = false; - m_Doc = pDoc; - m_nGLList = 0; - m_Red = m_Green = m_Blue = 0.; - m_Alpha = 1.; - m_Angle = 10.; - SetRotation (DefaultPsi, DefaultTheta, DefaultPhi); -/* Create new OpenGL widget. */ - if (glconfig == NULL) - { - /* Check if OpenGL is supported. */ - if (!gdk_gl_query_extension()) - { - g_print("\n*** OpenGL is not supported.\n"); - exit(1); - } - - /* Configure OpenGL-capable visual. */ - - /* Try double-buffered visual */ - glconfig = gdk_gl_config_new_by_mode (GdkGLConfigMode (GDK_GL_MODE_RGB | - GDK_GL_MODE_DEPTH | - GDK_GL_MODE_DOUBLE)); - if (glconfig == NULL) - { - g_print("*** Cannot find the double-buffered visual.\n"); - exit(1); - } - } - /* create new OpenGL widget */ - m_pWidget = GTK_WIDGET(gtk_drawing_area_new()); - - /* Set OpenGL-capability to the widget. */ - gtk_widget_set_gl_capability(m_pWidget, - glconfig, - NULL, - TRUE, - GDK_GL_RGBA_TYPE); - - gtk_widget_set_events(GTK_WIDGET(m_pWidget), - GDK_EXPOSURE_MASK| - GDK_BUTTON_MOTION_MASK| - GDK_POINTER_MOTION_HINT_MASK| - GDK_BUTTON_PRESS_MASK); - - // Connect signal handlers - // Do initialization when widget has been realized. - g_signal_connect (G_OBJECT (m_pWidget), "realize", - G_CALLBACK (on_init), this); - // When window is resized viewport needs to be resized also. - g_signal_connect (G_OBJECT (m_pWidget), "configure_event", - G_CALLBACK (on_reshape), this); - // Redraw image when exposed. - g_signal_connect (G_OBJECT (m_pWidget), "expose_event", - G_CALLBACK (on_draw), this); - // When moving mouse - g_signal_connect (G_OBJECT (m_pWidget), "motion_notify_event", - G_CALLBACK (on_motion), this); - // When a mouse button is pressed - g_signal_connect (G_OBJECT (m_pWidget), "button_press_event", - G_CALLBACK (on_pressed), this); - - gtk_widget_show (GTK_WIDGET (m_pWidget)); -} - -GLView::~GLView () -{ -} - -void GLView::Init () -{ - GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); - GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); - if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { - glEnable (GL_LIGHTING); - glEnable (GL_LIGHT0); - glEnable (GL_DEPTH_TEST); - glEnable (GL_CULL_FACE); - glEnable (GL_COLOR_MATERIAL); - float shiny = 25.0, spec[4] = {1.0, 1.0, 1.0, 1.0}; - glMaterialfv (GL_FRONT_AND_BACK, GL_SHININESS, &shiny); - glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, spec); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - m_bInit = true; - gdk_gl_drawable_gl_end (gldrawable); - Update (); - } -} - -void GLView::Reshape () -{ - if (!m_bInit) - return; - float fAspect; - GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); - GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); - if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { - if (m_pWidget->allocation.height) { - fAspect = (GLfloat) m_pWidget->allocation.width / (GLfloat) m_pWidget->allocation.height; - if (fAspect == 0.0) - fAspect = 1.0; - } else // don't divide by zero, not that we should ever run into that... - fAspect = 1.0f; - double x = m_Doc->GetMaxDist (); - if (x == 0) - x = 1; - glViewport (0,0, m_pWidget->allocation.width, m_pWidget->allocation.height); - if (fAspect > 1.0) { - m_Height = x * (1 - tan (m_Angle / 360 * M_PI)); - m_Width = m_Height * fAspect; - } else { - m_Width = x * (1 - tan (m_Angle / 360 * M_PI)); - m_Height = m_Width / fAspect; - } - glMatrixMode (GL_PROJECTION); - glLoadIdentity(); - if (m_Angle > 0.) { - m_Radius = (float) (x / sin (m_Angle / 360 * M_PI)) ; - m_Near = m_Radius - x; - m_Far = m_Radius + x; - glFrustum (- m_Width, m_Width, - m_Height, m_Height, m_Near, m_Far); - } else { - m_Radius = 2 * x; - m_Near = m_Radius - x; - m_Far = m_Radius + x; - glOrtho (- m_Width, m_Width, - m_Height, m_Height, m_Near, m_Far); - } - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - glTranslatef (0, 0, -m_Radius); - gdk_gl_drawable_gl_end (gldrawable); - } -} - -void GLView::Draw () -{ - if (!m_bInit) - return; - GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); - GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); - if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { - glClearColor (m_Red, m_Green, m_Blue, m_Alpha); - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - if (m_nGLList) { - glPushMatrix (); - glRotated (m_Psi, 0.0, 1.0, 0.0); - glRotated (m_Theta, 0.0, 0.0, 1.0); - glRotated (m_Phi, 0.0, 1.0, 0.0); - glEnable (GL_BLEND); - glCallList (m_nGLList); - glDisable (GL_BLEND); - glPopMatrix (); - } - gdk_gl_drawable_gl_end (gldrawable); - /* Swap backbuffer to front */ - gdk_gl_drawable_swap_buffers (gldrawable); - } -} - -void GLView::Update() -{ - if (!m_bInit) - return; - GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); - GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); - if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { - if (m_nGLList) - glDeleteLists(m_nGLList,1); - m_nGLList = glGenLists(1); - glNewList (m_nGLList, GL_COMPILE); - m_Doc->Draw (); - glEndList (); - gdk_gl_drawable_gl_end (gldrawable); - } - Reshape (); - Draw (); -} - -void GLView::SetRotation(double psi, double theta, double phi) -{ - m_Psi = psi; - m_Theta = theta; - m_Phi = phi; - Matrix m (m_Psi / 180 * M_PI, m_Theta / 180 * M_PI, m_Phi / 180 * M_PI, euler); - m_Euler = m; -} - -bool GLView::OnPressed (GdkEventButton *event) -{ - if (event->button == 1) { - // beginning of drag, reset mouse position - m_Lastx = event->x; - m_Lasty = event->y; - return true; - } - return false; -} - -bool GLView::OnMotion(GdkEventMotion *event) -{ - gint x, y; - GdkModifierType state; - - if (event->is_hint) - gdk_window_get_pointer (event->window, &x, &y, &state); - else { - x = (gint) event->x; - y = (gint) event->y; - state = (GdkModifierType) event->state; - } - if (state & GDK_BUTTON1_MASK) { - if ((x == m_Lastx) && (y == m_Lasty)) - return false; - m_Doc->SetDirty (true); - Rotate (x - m_Lastx, y - m_Lasty); - m_Lastx = x; - m_Lasty = y; - gtk_widget_queue_draw_area(m_pWidget, 0, 0, m_pWidget->allocation.width, m_pWidget->allocation.height); - } - return true; -} - -void GLView::Rotate (gdouble x, gdouble y) -{ - gdouble z = sqrt (x*x + y*y); - Matrix Mat (0, (y > 0) ? - acos (x/z) : acos (x/z), z * M_PI / 900., rotation); - m_Euler = Mat * m_Euler; - m_Euler.Euler (m_Psi, m_Theta, m_Phi); - m_Psi /= M_PI / 180.; - m_Theta /= M_PI / 180.; - m_Phi /= M_PI / 180.; -} - -void GLView::Print (GnomePrintContext *pc, gdouble width, gdouble height) -{ - int Width = m_pWidget->allocation.width; - int Height = m_pWidget->allocation.height; - if (Width > width) { - Height = (int) (Height * width / Width); - Width = (int) width; - } - if (Height > height) { - Width = (int) (Width * height / Height); - Height = (int) height; - } - double matrix [6] = {Width, 0, 0, Height, - (width - Width) / 2, (height - Height )/ 2}; - int w= (int) (Width * 300. / 72.), h = (int) (Height * 300. / 72.); - GdkPixbuf *pixbuf = BuildPixbuf (w, h); - - if (pixbuf) { - gnome_print_gsave (pc); - gnome_print_concat (pc, matrix); - gnome_print_rgbimage (pc, (const guchar*) gdk_pixbuf_get_pixels (pixbuf), w, h, gdk_pixbuf_get_rowstride (pixbuf)); - gnome_print_grestore (pc); - g_object_unref (pixbuf); - } -} - -static gboolean do_save_image (const gchar *buf, gsize count, GError **error, gpointer data) -{ - GnomeVFSHandle *handle = (GnomeVFSHandle*) data; - GnomeVFSFileSize written = 0; - GnomeVFSResult res; - while (count) { - res = gnome_vfs_write (handle, buf, count, &written); - if (res != GNOME_VFS_OK) { - g_set_error (error, g_quark_from_static_string ("gchemutils"), res, gnome_vfs_result_to_string (res)); - return false; - } - count -= written; - } - return true; -} - -void GLView::SaveAsImage (string const &filename, char const *type, map& options, unsigned width, unsigned height) -{ - if (width == 0 || height == 0) - return; - - GdkPixbuf *pixbuf = BuildPixbuf (width, height); - - if (pixbuf) { - char const **keys = g_new0 (char const*, options.size () + 1); - char const **values = g_new0 (char const*, options.size ()); - GError *error = NULL; - map::iterator i, iend = options.end (); - int j = 0; - for (i = options.begin (); i != iend; i++) { - keys[j] = (*i).first.c_str (); - values[j++] = (*i).second.c_str (); - } - GnomeVFSHandle *handle = NULL; - if (gnome_vfs_create (&handle, filename.c_str (), GNOME_VFS_OPEN_WRITE, true, 0644) == GNOME_VFS_OK) { - gdk_pixbuf_save_to_callbackv (pixbuf, do_save_image, handle, type, (char**) keys, (char**) values, &error); - if (error) { - fprintf (stderr, _("Unable to save image file: %s\n"), error->message); - g_error_free (error); - } - gnome_vfs_close (handle); // hope there will be no error there - } - g_free (keys); - g_free (values); - g_object_unref (pixbuf); - } -} - -GdkPixbuf *GLView::BuildPixbuf (unsigned width, unsigned height) -{ - GdkGLConfig *glconfig = gdk_gl_config_new_by_mode ( - GdkGLConfigMode (GDK_GL_MODE_RGBA | GDK_GL_MODE_DEPTH)); - GdkPixmap *pixmap = gdk_pixmap_new (NULL, width, height, 24); - GdkGLPixmap *gl_pixmap = gdk_pixmap_set_gl_capability (pixmap, - glconfig, - NULL ); - GdkGLDrawable * drawable = gdk_pixmap_get_gl_drawable (pixmap); - GdkGLContext * context = gdk_gl_context_new (drawable, - NULL, - TRUE, - GDK_GL_RGBA_TYPE); - double aspect = (GLfloat) width / height; - double x = m_Doc->GetMaxDist (), w, h; - if (x == 0) - x = 1; - if (aspect > 1.0) { - h = x * (1 - tan (m_Angle / 360 * M_PI)); - w = h * aspect; - } else { - w = x * (1 - tan (m_Angle / 360 * M_PI)); - h = w / aspect; - } - GdkPixbuf *pixbuf = NULL; - gdk_error_trap_push (); - bool result = gdk_gl_drawable_gl_begin (drawable, context); - gdk_flush (); - if (gdk_error_trap_pop ()) - result = false; - - if (result) { - glEnable (GL_LIGHTING); - glEnable (GL_LIGHT0); - glEnable (GL_DEPTH_TEST); - glEnable (GL_CULL_FACE); - glEnable (GL_COLOR_MATERIAL); - float shiny = 25.0, spec[4] = {1.0, 1.0, 1.0, 1.0}; - glMaterialfv (GL_FRONT_AND_BACK, GL_SHININESS, &shiny); - glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, spec); - glViewport (0, 0, width, height); - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - GLfloat radius, near, far; - if (m_Angle > 0.) { - radius = (float) (x / sin (m_Angle / 360 * M_PI)) ; - near = radius - x; - far = radius + x; - glFrustum (- w, w, - h, h, near, far); - } else { - radius = 2 * x; - near = radius - x; - far = radius + x; - glOrtho (- w, w, - h, h, near, far); - } - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - glTranslatef (0, 0, -m_Radius); - glClearColor (m_Red, m_Green, m_Blue, m_Alpha); - glClearDepth (1.0); - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - if (m_nGLList) { - glPushMatrix (); - glRotated (m_Psi, 0.0, 1.0, 0.0); - glRotated (m_Theta, 0.0, 0.0, 1.0); - glRotated (m_Phi, 0.0, 1.0, 0.0); - glEnable (GL_BLEND); - GetDoc ()->Draw(); - glDisable (GL_BLEND); - glPopMatrix (); - } - glFlush (); - gdk_gl_drawable_gl_end (drawable); - pixbuf = gdk_pixbuf_get_from_drawable (NULL, - (GdkDrawable*) pixmap, NULL, 0, 0, 0, 0, -1, -1); - } else if (m_bInit) { - unsigned hstep, vstep; - double dxStep, dyStep; - unsigned char *tmp, *dest, *src, *dst; - unsigned LineWidth, s = sizeof(int); - gtk_window_present (GTK_WINDOW (gtk_widget_get_toplevel (m_pWidget))); - while (gtk_events_pending ()) - gtk_main_iteration (); - if (m_pWidget->allocation.width & (s - 1)) - LineWidth = ((~(s - 1)) & (m_pWidget->allocation.width * 3)) + s; - else - LineWidth = m_pWidget->allocation.width * 3; - unsigned size = LineWidth * m_pWidget->allocation.height; - int i, j; - hstep = m_pWidget->allocation.width; - vstep = m_pWidget->allocation.height; - tmp = new unsigned char[size]; - if (!tmp) - goto osmesa; - pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, false, 8, (int) width, (int) height); - dest = gdk_pixbuf_get_pixels (pixbuf); - int n, m, imax, jmax, rowstride = gdk_pixbuf_get_rowstride (pixbuf); - imax = width / hstep; - jmax = height / vstep; - dxStep = ((double) hstep) / width * 2; - dyStep = ((double) vstep) / height * 2; - for (j = 0; j <= jmax; j++) - { - for (i = 0; i <= imax; i++) - { - GdkGLContext *glcontext = gtk_widget_get_gl_context(m_pWidget); - GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable(m_pWidget); - if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - if (m_Angle > 0.) - glFrustum (w * ( -1 + i * dxStep), w * ( -1 + (i + 1)* dxStep), - h * ( 1 - (j + 1)* dyStep), h * ( 1 - j* dyStep), m_Near , m_Far); - else - glOrtho (w * ( -1 + i * dxStep), w * ( -1 + (i + 1)* dxStep), - h * ( 1 - (j + 1)* dyStep), h * ( 1 - j* dyStep), m_Near , m_Far); - glMatrixMode (GL_MODELVIEW); - glLoadIdentity (); - glTranslatef (0, 0, - m_Radius); - glClearColor (m_Red, m_Green, m_Blue, m_Alpha); - glClearDepth (1.0); - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - if (m_nGLList) { - glPushMatrix (); - glRotated (m_Psi, 0.0, 1.0, 0.0); - glRotated (m_Theta, 0.0, 0.0, 1.0); - glRotated (m_Phi, 0.0, 1.0, 0.0); - glEnable (GL_BLEND); - GetDoc ()->Draw(); - glDisable (GL_BLEND); - glPopMatrix (); - } - glFlush (); - gdk_gl_drawable_gl_end (gldrawable); - glPixelStorei (GL_PACK_ALIGNMENT, s); - glReadBuffer (GL_BACK_LEFT); - glReadPixels (0, 0, m_pWidget->allocation.width, m_pWidget->allocation.height, GL_RGB, - GL_UNSIGNED_BYTE, tmp); - // copy the data to the pixbuf. - // linesize - m = (i < imax)? hstep * 3: (width - imax * hstep) * 3; - src = tmp + (vstep - 1) * LineWidth; - dst = dest + j * vstep * rowstride + i * hstep * 3; - for (n = 0; n < (int) ((j < jmax)? vstep: height - jmax * vstep); n++) { - memcpy (dst, src, m); - src -= LineWidth; - dst += rowstride; - } - } else { - g_object_unref (pixbuf); - pixbuf = NULL; - goto osmesa; - } - } - } - delete [] tmp; - } else { -osmesa: - g_warning ("Off-screen rendering not supported in this context"); - // TODO: implement rendering using an exterbal program and osmesa - } - gdk_gl_context_destroy (context); - gdk_gl_pixmap_destroy (gl_pixmap); - // destroying pixmap gives a CRITICAL and destroying glconfig leeds to a crash. - Update (); - return pixbuf; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/glview.h gnome-chemistry-utils-0.10.9/gcu/glview.h --- gnome-chemistry-utils-0.8.6/gcu/glview.h 2007-12-10 22:28:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/glview.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,267 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/glview.h - * - * Copyright (C) 2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_GL_VIEW_H -#define GCU_GL_VIEW_H - -#include "macros.h" -#include "matrix.h" -#include -#include -#include -#include - -extern double DefaultPsi, DefaultTheta, DefaultPhi; - -using namespace std; - -namespace gcu { - -class GLDocument; - -/*! -\class GLView gcu/glview.h -View class based on OpenGL for rendering. Used to display 3d chemical structures -such as molecules or crystals cells. -*/ -class GLView -{ -public: -//!Constructor. -/*! -@param pDoc: a pointer to the GLDocument instance. - -Creates a view for the document. -*/ - GLView (GLDocument* pDoc); -//!Destructor. -/*! -The destructor of GLView. -*/ - virtual ~GLView (); - -/*! -@return the associated GtkWidget. -*/ - GtkWidget *GetWidget () {return m_pWidget;} -/*! -Initialize the associated widget. Automatically called by the framework. -*/ - void Init (); -/*! -Automatically called by the framework when the associated widget size changes. -*/ - void Reshape (); -/*! -Draws the contents of the associated widget. Automatically called by the framework. -*/ - void Draw (); -/*! -@param event: a pointer to a GdkEvent. - -Automatically called by the framework when a left button click occurs in the -associated widget drawing area. -*/ - bool OnPressed (GdkEventButton *event); -/*! -@param event: a pointer to a GdkEvent. - -Automatically called by the framework when the mouse cursor moves over the -associated widget drawing area. - -@return true if a motion really occured, false otherwise. -*/ - bool OnMotion (GdkEventMotion *event); -/*! -Update the contents of the associated widget. This method must be called -each time the document or the view are modified. -*/ - void Update (); -/*! -@param psi the first Euler's angle. -@param theta the second Euler's angle. -@param phi the third Euler's angle. - -Sets the orientation of the model, using the Euler's angles. -*/ - void SetRotation (double psi, double theta, double phi); -/*! -@param pc the GnomePrintContext used for printing. -@param width the width of the printed view. -@param height th height of the printed view. - -Prints the current view to a printing context inside a rectangle with predefined size. -*/ - void Print (GnomePrintContext *pc, gdouble width, gdouble height); -/*! -@param filename the name of the file. -@param type the type as supported by GdkPixbuf (e.g. "png" or "jpeg"). -@param options the pairs of keys/values to pass GdkPixbuf. -@param width the width of the generated image. -@param height the height of the enerated image. - -Export the view contents as an image. The size of the new image is defined by the width -and height parameters. -*/ - void SaveAsImage (string const &filename, char const *type, map& options, unsigned width, unsigned height); - -private: -/*! -@param x the x component of the rotation. -@param y the y component of the rotation. - -Called by OnMotion(). x and y are the displacement coordinates of the mouse. -*/ - void Rotate (gdouble x, gdouble y); -/*! -@param width the width of the generated image. -@param height the height of the generated image. - -This method is called by the framework when off-screen renderig fails. This -will be mich slower than the stahdard method, but mandatory if the video -card driver does not support off-screen rendering of OpenGL. -@return the pixbuf containing the generated image -*/ - GdkPixbuf *BuildPixbuf (unsigned width, unsigned height); - -protected: -/*! -The associated widget. -*/ - GtkWidget *m_pWidget; -/*! -The current GLList. -*/ - unsigned m_nGLList; - -private: - bool m_bInit; - Matrix m_Euler; - double m_Height, m_Width, m_Near, m_Far; - double m_Lastx, m_Lasty; - -// Properties -/*!\fn SetAngle(double angle) -@param angle the new half field of view. -*/ -/*!\fn GetAngle() -@return the current half field of view. -*/ -/*!\fn GetRefAngle() -@return the current half field of view as a reference. -*/ -GCU_PROP (double, Angle) -/*!\fn SetPsi(double psi) -@param psi the new psi Euler's angle. -*/ -/*!\fn GetPsi() -@return the current psi Euler's angle. -*/ -/*!\fn GetRefPsi() -@return the current psi Euler's angle as a reference. -*/ -GCU_PROP (double, Psi) -/*!\fn SetPhi(double phi) -@param phi the new phi Euler's angle. -*/ -/*!\fn GetPhi() -@return the current phi Euler's angle. -*/ -/*!\fn GetRefPhi() -@return the current psh Euler's angle as a reference. -*/ -GCU_PROP (double, Phi) -/*!\fn SetTheta(double theta) -@param theta the new theta Euler's angle. -*/ -/*!\fn GetTheta() -@return the current theta Euler's angle. -*/ -/*!\fn GetRefTheta() -@return the current theta Euler's angle as a reference. -*/ -GCU_PROP (double, Theta) -/*!\fn SetRed(float red) -@param red the new red component for the background color. -*/ -/*!\fn GetRed() -@return the current red component of the background color. -*/ -/*!\fn GetRefRed() -@return the current red component of the background color as a reference. -*/ -GCU_PROP (float, Red) -/*!\fn SetGreen(float green) -@param green the new green component for the background color. -*/ -/*!\fn GetGreen() -@return the current green component of the background color. -*/ -/*!\fn GetRefGreen() -@return the current green component of the background color as a reference. -*/ -GCU_PROP (float, Green) -/*!\fn SetBlue(float blue) -@param blue the new blue component for the background color. -*/ -/*!\fn GetBlue() -@return the current blue component of the background color. -*/ -/*!\fn GetRefBlue() -@return the current blue component of the background color as a reference. -*/ -GCU_PROP (float, Blue) -/*!\fn SetAlpha(float alpha) -@param alpha the new alpha value for the background. - -The alpha value for the background is not supported in this version and this is only -a place holder. -*/ -/*!\fn GetAlpha() -The alpha value for the background is not supported in this version and this is only -a place holder. -@return the current alpha value of the background color. -*/ -/*!\fn GetRefAlpha() -The alpha value for the background is not supported in this version and this is only -a place holder. -@return the current alpha value of the background color as a reference. -*/ -GCU_PROP (float, Alpha) -/*!\fn GetDoc() -@return the associated document. -*/ -GCU_RO_PROP (GLDocument *, Doc) -/*!\var m_Radius -The distance between the center of the model and the point of view. -*/ -/*!\fn GetRadius() -@return the distance between the center of the model and the point of view. -*/ -GCU_PROT_PROP (double, Radius); -}; - -} // namespace gcu - -#endif // GCU_GL_VIEW_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkchem3dviewer.cc gnome-chemistry-utils-0.10.9/gcu/gtkchem3dviewer.cc --- gnome-chemistry-utils-0.8.6/gcu/gtkchem3dviewer.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkchem3dviewer.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,273 +0,0 @@ -/* - * Gnome Chemisty Utils - * gtkchem3dviewer.c - * - * Copyright (C) 2003-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "gtkchem3dviewer.h" -#include "chem3ddoc.h" -#include "glview.h" -#include -#include -#include - -using namespace std; -using namespace OpenBabel; -using namespace gcu; - -struct _GtkChem3DViewer -{ - GtkBin bin; - - Chem3dDoc *Doc; - GtkWidget *widget; -}; - -struct _GtkChem3DViewerClass -{ - GtkBinClass parent_class; -}; - -enum { - PROP_0, - PROP_DISPLAY3D, - PROP_BGCOLOR -}; -GType -gtk_display3d_get_type (void) -{ - static GType etype = 0; - if (etype == 0) { - static const GEnumValue values[] = { - { BALL_AND_STICK, "BALL_AND_STICK", "ball&stick" }, - { SPACEFILL, "SPACEFILL", "spacefill" }, - { 0, NULL, NULL } - }; - etype = g_enum_register_static ("Dispay3D", values); - } - return etype; -} - -static GtkBinClass *parent_class = NULL; - -static void gtk_chem3d_viewer_class_init (GtkChem3DViewerClass *klass); -static void gtk_chem3d_viewer_init(GtkChem3DViewer *viewer); -static void gtk_chem3d_viewer_update(GtkChem3DViewer *viewer); -static void gtk_chem3d_viewer_set_property(GObject *object, guint property_id, - const GValue *value, GParamSpec *pspec); -static void gtk_chem3d_viewer_get_property(GObject *object, guint property_id, - GValue *value, GParamSpec *pspec); - -extern "C" -{ - -GType -gtk_chem3d_viewer_get_type (void) -{ - static GType chem3d_viewer_type = 0; - - if (!chem3d_viewer_type) - { - static const GTypeInfo chem3d_viewer_info = - { - sizeof (GtkChem3DViewerClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_chem3d_viewer_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkChem3DViewer), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_chem3d_viewer_init, - }; - - chem3d_viewer_type = g_type_register_static (GTK_TYPE_BIN, "GtkChem3DViewer", &chem3d_viewer_info, (GTypeFlags)0); - } - - return chem3d_viewer_type; -} - -GtkWidget* gtk_chem3d_viewer_new (const gchar *uri) -{ - GtkChem3DViewer* viewer = (GtkChem3DViewer*) g_object_new (GTK_TYPE_CHEM3D_VIEWER, NULL); - if (uri) - gtk_chem3d_viewer_set_uri (viewer, uri); - return GTK_WIDGET (viewer); -} - -} //extern "C" - -static void on_size(GtkWidget *w, GtkAllocation *allocation, gpointer data) -{ - if (GTK_BIN (w)->child && GTK_WIDGET_VISIBLE (GTK_BIN (w)->child)) - gtk_widget_size_allocate (GTK_BIN (w)->child, allocation); -} - -static void gtk_chem3d_viewer_finalize (GObject *obj) -{ - GtkChem3DViewer *viewer = GTK_CHEM3D_VIEWER (obj); - if (viewer->Doc) { - delete viewer->Doc->GetView (); - delete viewer->Doc; - } - G_OBJECT_CLASS (parent_class)->finalize (obj); -} - -void gtk_chem3d_viewer_class_init (GtkChem3DViewerClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - parent_class = (GtkBinClass*)gtk_type_class(gtk_bin_get_type()); - - gobject_class->set_property = gtk_chem3d_viewer_set_property; - gobject_class->get_property = gtk_chem3d_viewer_get_property; - gobject_class->finalize = gtk_chem3d_viewer_finalize; - - g_object_class_install_property ( - gobject_class, - PROP_DISPLAY3D, - g_param_spec_enum("display3d", - "3D display mode", - "Mode used to display the model", - GTK_DISPLAY_3D, - BALL_AND_STICK, - (GParamFlags)G_PARAM_READWRITE)); - g_object_class_install_property - (gobject_class, - PROP_BGCOLOR, - g_param_spec_string ("bgcolor", - _("Background Color"), - _("Color used to paint the background"), - "black", - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE))); -} - -void gtk_chem3d_viewer_init (GtkChem3DViewer *viewer) -{ - g_return_if_fail (GTK_IS_CHEM3D_VIEWER (viewer)); - viewer->Doc = new Chem3dDoc (); - viewer->widget = viewer->Doc->GetView ()->GetWidget (); - gtk_widget_show (GTK_WIDGET (viewer->widget)); - gtk_container_add (GTK_CONTAINER (viewer), viewer->widget); - gtk_widget_show_all (GTK_WIDGET (viewer)); - g_signal_connect (G_OBJECT (viewer), "size_allocate", GTK_SIGNAL_FUNC (on_size), NULL); -} - -void gtk_chem3d_viewer_set_uri (GtkChem3DViewer * viewer, const gchar *uri) -{ - gtk_chem3d_viewer_set_uri_with_mime_type (viewer, uri, NULL); -} - -void gtk_chem3d_viewer_set_uri_with_mime_type (GtkChem3DViewer * viewer, const gchar * uri, const gchar* mime_type) -{ - g_return_if_fail (GTK_IS_CHEM3D_VIEWER (viewer)); - g_return_if_fail (uri); - viewer->Doc->Load (uri, mime_type); -} - -void gtk_chem3d_viewer_set_data (GtkChem3DViewer * viewer, const gchar *data, const gchar* mime_type) -{ - viewer->Doc->LoadData (data, mime_type); -} - -void gtk_chem3d_viewer_update (GtkChem3DViewer *viewer) -{ - viewer->Doc->GetView ()->Update (); -} - -static void gtk_chem3d_viewer_get_property (GObject *object, guint property_id, - GValue *value, GParamSpec *pspec) -{ - GtkChem3DViewer *viewer = GTK_CHEM3D_VIEWER(object); - - switch (property_id) { - case PROP_DISPLAY3D: - g_value_set_enum (value, viewer->Doc->GetDisplay3D ()); - break; - case PROP_BGCOLOR: - { - int r = (int) (viewer->Doc->GetView ()->GetRed () * 255.), - g = (int) (viewer->Doc->GetView ()->GetGreen () * 255.), - b = (int) (viewer->Doc->GetView ()->GetBlue () * 255.); - if ((r ==0) && (g == 0) && (b == 0)) - g_value_set_string (value, "black"); - else if ((r ==255) && (g == 255) && (b == 255)) - g_value_set_string (value, "white"); - else - { - char buf[10]; - g_snprintf(buf, sizeof(buf), "#%2x%2x%2x", r, g, b); - g_value_set_string(value, buf); - } - } - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -static void gtk_chem3d_viewer_set_property (GObject *object, guint property_id, - const GValue *value, GParamSpec *pspec) -{ - GtkChem3DViewer *viewer = GTK_CHEM3D_VIEWER(object); - - switch (property_id) { - case PROP_DISPLAY3D: - viewer->Doc->SetDisplay3D ((Display3DMode) g_value_get_enum (value)); - break; - case PROP_BGCOLOR: - { - const gchar* str = g_value_get_string (value); - if (!strcmp (str, "black")) { - viewer->Doc->GetView ()->SetRed (0.); - viewer->Doc->GetView ()->SetGreen (0.); - viewer->Doc->GetView ()->SetBlue (0.); - } else if (!strcmp (str, "white")) { - viewer->Doc->GetView ()->SetRed (1.); - viewer->Doc->GetView ()->SetGreen (1.); - viewer->Doc->GetView ()->SetBlue (1.); - } else { - if ((strlen (str) != 7) || (*str != '#')) { - g_warning ("Unrecognized color: %s\n", str); - break; - } - int r, g, b; - r = strtoul (str + 1, NULL, 16); - b = r & 0xff; - viewer->Doc->GetView ()->SetBlue ((float) b / 255.); - r >>= 8; - g = r & 0xff; - viewer->Doc->GetView ()->SetGreen ((float) g / 255.); - r >>=8; - viewer->Doc->GetView ()->SetRed ((float) r / 255.); - } - } - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } - gtk_chem3d_viewer_update(viewer); -} - -void gtk_chem3d_viewer_print (GtkChem3DViewer * viewer, GnomePrintContext *pc, gdouble width, gdouble height) -{ - viewer->Doc->GetView ()->Print (pc, width, height); -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkchem3dviewer.h gnome-chemistry-utils-0.10.9/gcu/gtkchem3dviewer.h --- gnome-chemistry-utils-0.8.6/gcu/gtkchem3dviewer.h 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkchem3dviewer.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,146 +0,0 @@ -/* - * Gnome Chemisty Utils - * gtkchem3dviewer.h - * - * Copyright (C) 2003-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - - -#ifndef GTK_CHEM3D_VIEWER_H -#define GTK_CHEM3D_VIEWER_H - -//#include -#include -#include -#include - -G_BEGIN_DECLS - -/*!\file -Declaration of the GtkChem3DViewer widget. -*/ - -GType gtk_display3d_get_type (void); -/*! -\return the GType associated to the Display3D enum. -*/ -#define GTK_DISPLAY_3D (gtk_display3d_get_type ()) - -/*!\return the GType associated to GtkChem3DViewer */ -#define GTK_TYPE_CHEM3D_VIEWER (gtk_chem3d_viewer_get_type ()) -/*! -Casts \a obj to a GtkChem3DViewer * pointer. -\return a pointer to the GtkChem3DViewer * or NULL if \a obj does not point to -a GtkChem3DViewer widget. -*/ -#define GTK_CHEM3D_VIEWER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHEM3D_VIEWER, GtkChem3DViewer)) -/*! -Casts \a klass to a GtkChem3DViewerClass * pointer. -\return a pointer to the GtkChem3DViewerClass * or NULL if \a obj not point to a GtkChem3DViewerClass. -*/ -#define GTK_CHEM3D_VIEWER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHEM3D_VIEWER, GtkChem3DViewerClass)) -/*! -\return TRUE if \a obj points to a GtkChem3DViewer widget, FALSE otherwise. -*/ -#define GTK_IS_CHEM3D_VIEWER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHEM3D_VIEWER)) -/*! -\return TRUE if \a klass points to a GtkChem3DViewerClass, FALSE otherwise. -*/ -#define GTK_IS_CHEM3D_VIEWER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHEM3D_VIEWER)) -/*! -\return the GtkChem3DViewerClass * associated to \a obj if obj points to a GtkChem3DViewer widget, -NULL otherwise. -*/ -#define GTK_CHEM3D_VIEWER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CHEM3D_VIEWER, GtkChem3DViewerClass)) - -/*! \struct GtkChem3DViewer gcu/gtkchem3dviewer.h - The GtkChem3DViewer displays 3D models of molecules using an OpenGL window. This widget is also available as a Bonobo Control. - Test programs are available in the tests directory of the Gnome Chemistry Utils source archive (sources in testgtkchem3dviewer.c -for the use of the widget and in testbonobocontrol.c for the use of the Bonobo control). -
-

Properties

-There are two properties: -- "display3d": Display3DMode (Read / Write). -
This property is used to set the display mode. When using the Bonobo control, a string is used instead the enumeration. - Possible values are: - - BALL_AND_STICK: use ball and stick representation; atoms are represented by spheres with a radius equal to 20% of - their van der Waals radius and bonds are displayed as cylinders. String version is "ball&stick". - - SPACEFILL: use space filling representation; atoms are represented by spheres with a radius equal - their van der Waals radius; bonds are not displayed. String version is "spacefill". - . - -- "bgcolor": gchar* (Read / Write). -
The background color for the display, for example "black" or "#ffffe6". Only "black", - "white" and "#rrggbb" are accepted in this version of the Gnome Chemistry Utils. -

Functions

- -Functions related to the GtkChem3DViewer Widget are described in the gtkchem3dviewer.h page. -*/ -/*! The GtkChem3DViewer widget.*/ -typedef struct _GtkChem3DViewer GtkChem3DViewer; -/*! The GtkChem3DViewer widget object class.*/ -typedef struct _GtkChem3DViewerClass GtkChem3DViewerClass; - -GType gtk_chem3d_viewer_get_type (void) G_GNUC_CONST; -/*! -@param uri: the URI of the file containing the molecular structure to display. Any file supported by -OpenBabel may be used. - -Creates a GtkChem3DViewer widget and fills it with the data from uri. If uri is NULL, the widget will be empty. -*/ -GtkWidget* gtk_chem3d_viewer_new (const gchar* uri); -/*! -@param viewer: a pointer to GtkChem3DViewer widget. -@param uri: the URI of the file containing the molecular structure to display. Any file supported by -@param mime_type: the mime_type of the data. Any type supported by -OpenBabel may be used. - -Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL. -*/ -void gtk_chem3d_viewer_set_uri_with_mime_type (GtkChem3DViewer * viewer, const gchar * uri, const gchar* mime_type); -/*! -@param viewer: a pointer to GtkChem3DViewer widget. -@param uri: the URI of the file containing the molecular structure to display. -OpenBabel may be used. - -Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL. -*/ -void gtk_chem3d_viewer_set_uri (GtkChem3DViewer * viewer, const gchar * uri); -/*! -@param viewer: a pointer to GtkChem3DViewer widget. -@param data: a pointer to the raw data representing a serialized version of molecule to display -@param mime_type: the mime_type of the data. Any type supported by -OpenBabel may be used. - -Changes the molecule displayed by the one described in the data. Nothing happens if data or mime-type is NULL. -*/ -void gtk_chem3d_viewer_set_data (GtkChem3DViewer * viewer, const gchar * data, const gchar* mime_type); - -/*! -@param viewer: a pointer to GtkChem3DViewer widget. -@param pc: a pointer to the GnomePrintContext. -@param width: the width of the rectangle. -@param height: the height of the rectangle. - -Prints the scene to a GnomePrintContext using a 300 dpi resolution. -*/ -void gtk_chem3d_viewer_print(GtkChem3DViewer * viewer, GnomePrintContext *pc, gdouble width, gdouble height); - -G_END_DECLS - -#endif //GTK_CHEM3D_VIEWER_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkcomboperiodic.c gnome-chemistry-utils-0.10.9/gcu/gtkcomboperiodic.c --- gnome-chemistry-utils-0.8.6/gcu/gtkcomboperiodic.c 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkcomboperiodic.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,133 +0,0 @@ -/* - * Gnome Chemisty Utils - * gtkcomboperiodic.c - * - * Copyright (C) 2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "gtkperiodic.h" -#include "gtkcomboperiodic.h" -#include "chemistry.h" -#include -#include -#include -#include - -struct _GtkComboPeriodic { - GOComboBox base; - - GtkWidget *periodic, *preview_button, *label; - gulong handler_id; -}; - -typedef struct { - GOComboBoxClass base; - void (* changed) (GtkComboPeriodic *combo, int id); -} GtkComboPeriodicClass; - -enum { - CHANGED, - LAST_SIGNAL -}; - -static guint go_combo_pixmaps_signals [LAST_SIGNAL] = { 0, }; - -static void -cb_screen_changed (GtkComboPeriodic *combo, GdkScreen *previous_screen) -{ - GtkWidget *w = GTK_WIDGET (combo); - GdkScreen *screen = gtk_widget_has_screen (w) - ? gtk_widget_get_screen (w) - : NULL; - - if (screen) { - GtkWidget *toplevel = gtk_widget_get_toplevel (combo->periodic); - gtk_window_set_screen (GTK_WINDOW (toplevel), screen); - } -} - -static void -element_changed_cb (GtkComboPeriodic *combo) -{ - int newZ = gtk_periodic_get_element (GTK_PERIODIC (combo->periodic)); - gtk_label_set_text (GTK_LABEL (combo->label), gcu_element_get_symbol (newZ)); - if (_go_combo_is_updating (GO_COMBO_BOX (combo))) - return; - g_signal_emit (combo, go_combo_pixmaps_signals [CHANGED], 0, newZ); - go_combo_box_popup_hide (GO_COMBO_BOX (combo)); -} - -static void -gtk_combo_periodic_init (GtkComboPeriodic *combo) -{ - combo->preview_button = gtk_toggle_button_new (); - combo->label = gtk_label_new (""); - gtk_widget_show (combo->label); - gtk_container_add (GTK_CONTAINER (combo->preview_button), - GTK_WIDGET (combo->label)); - - g_signal_connect (G_OBJECT (combo), - "screen-changed", - G_CALLBACK (cb_screen_changed), NULL); - - gtk_widget_show_all (combo->preview_button); - combo->periodic = gtk_periodic_new (); - combo->handler_id = g_signal_connect_swapped (combo->periodic, - "element_changed", G_CALLBACK (element_changed_cb), combo); - gtk_widget_show_all (combo->periodic); - go_combo_box_construct (GO_COMBO_BOX (combo), - combo->preview_button, combo->periodic, combo->periodic); - go_combo_box_set_title(GO_COMBO_BOX (combo), _("Periodic table of the elements")); - gtk_widget_show_all (GTK_WIDGET (combo)); -} - -static void -gtk_combo_periodic_class_init (GObjectClass *gobject_class) -{ - go_combo_pixmaps_signals [CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE (gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GtkComboPeriodicClass, changed), - NULL, NULL, - g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); -} - -GSF_CLASS (GtkComboPeriodic, gtk_combo_periodic, - gtk_combo_periodic_class_init, gtk_combo_periodic_init, - GO_COMBO_BOX_TYPE) - -GtkWidget *gtk_combo_periodic_new (void) -{ - return GTK_WIDGET (g_object_new (GTK_COMBO_PERIODIC_TYPE, NULL)); -} - -guint gtk_combo_periodic_get_element (GtkComboPeriodic* combo) -{ - return gtk_periodic_get_element (GTK_PERIODIC (combo->periodic)); -} - -void gtk_combo_periodic_set_element (GtkComboPeriodic* combo, guint element) -{ - g_signal_handler_block (combo->periodic, combo->handler_id); - gtk_periodic_set_element (GTK_PERIODIC (combo->periodic), element); - g_signal_handler_unblock (combo->periodic, combo->handler_id); - gtk_label_set_text (GTK_LABEL (combo->label), gcu_element_get_symbol (element)); -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkcomboperiodic.h gnome-chemistry-utils-0.10.9/gcu/gtkcomboperiodic.h --- gnome-chemistry-utils-0.8.6/gcu/gtkcomboperiodic.h 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkcomboperiodic.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,90 +0,0 @@ -/* - * Gnome Chemisty Utils - * gtkcomboperiodic.h - * - * Copyright (C) 2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GTK_COMBO_PERIODIC_H -#define GTK_COMBO_PERIODIC_H - -#include - -G_BEGIN_DECLS - -/*!\return the GType associated to GtkComboPeriodic */ -#define GTK_COMBO_PERIODIC_TYPE (gtk_combo_periodic_get_type ()) -/*! -Casts \a obj to a GtkComboPeriodic * pointer. -\return a pointer to the GtkComboPeriodic * or NULL if \a obj does not point to -a GtkComboPeriodic widget. -*/ -#define GTK_COMBO_PERIODIC(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GTK_COMBO_PERIODIC_TYPE, GtkComboPeriodic)) -/*! -\return TRUE if \a obj points to a GtkComboPeriodic widget, FALSE otherwise. -*/ -#define GTK_IS_COMBO_PERIODIC(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GTK_COMBO_PERIODIC_TYPE)) - -/*!\file -Declaration of the GtkComboPeriodic widget. -*/ - -/*! \struct GtkComboPeriodic gcu/gtkcomboperiodic.h - The GtkComboPeriodic is a combo box with a dropdown periodic table widget. -
-

Signals

- - This widget has one signal: -- "changed": void user_function (GtkWidget* periodic, guint Z, gpointer data). -\param periodic: the object which received the signal. -\param Z: the atomic number of the newly selected element or %0 if none is selected. -\param data: user data set when the signal handler was connected. - - This signal is raised when the selected element changes in the widget. - -
-

Functions

- -Functions related to the GtkComboPeriodic Widget are described in the gtkcomboperiodic.h page. -*/ -/*! The GtkComboPeriodic widget.*/ -typedef struct _GtkComboPeriodic GtkComboPeriodic; - -GType gtk_combo_periodic_get_type (void); -/*! -@return a pointer to a newly created GtkComboPeriodic widget. -*/ -GtkWidget *gtk_combo_periodic_new (void); - -/*! -@param combo a GtkComboPeriodic widget -Used to get the currently selected element in the periodic table. -@return the atomic number of the currently selected element or %0 if none is selected. - */ -guint gtk_combo_periodic_get_element (GtkComboPeriodic *combo); - -/*! -@param combo a GtkComboPeriodic widget -@param element the atomic number of the element to select or 0 -Sets the selected element in the periodic table. -*/ -void gtk_combo_periodic_set_element (GtkComboPeriodic *combo, guint element); - -G_END_DECLS - -#endif /* GTK_COMBO_PERIODIC_H */ diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkcrystalviewer.cc gnome-chemistry-utils-0.10.9/gcu/gtkcrystalviewer.cc --- gnome-chemistry-utils-0.8.6/gcu/gtkcrystalviewer.cc 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkcrystalviewer.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,125 +0,0 @@ -/* - * Gnome Chemisty Utils - * gtkcrystalviewer.cc - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "gtkcrystalviewer.h" -#include "crystalview.h" -#include "crystaldoc.h" - -extern "C" -{ - -struct _GtkCrystalViewer -{ - GtkBin bin; - - gcu::CrystalView *pView; - gcu::CrystalDoc *pDoc; - guint glList; -}; - -struct _GtkCrystalViewerClass -{ - GtkBinClass parent_class; -}; - - -static void on_size (GtkCrystalViewer* w, GtkAllocation *allocation, gpointer user_data) -{ - if (GTK_BIN (w)->child && GTK_WIDGET_VISIBLE (GTK_BIN (w)->child)) - gtk_widget_size_allocate (GTK_BIN (w)->child, allocation); -} - -static GtkBinClass *parent_class = NULL; - -static void gtk_crystal_viewer_class_init (GtkCrystalViewerClass *klass); -static void gtk_crystal_viewer_init (GtkCrystalViewer *viewer); -static void gtk_crystal_viewer_finalize (GObject* object); - -GType -gtk_crystal_viewer_get_type (void) -{ - static GType crystal_viewer_type = 0; - - if (!crystal_viewer_type) - { - static const GTypeInfo crystal_viewer_info = - { - sizeof (GtkCrystalViewerClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_crystal_viewer_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkCrystalViewer), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_crystal_viewer_init, - }; - - crystal_viewer_type = g_type_register_static (GTK_TYPE_BIN, "GtkCrystalViewer", &crystal_viewer_info, (GTypeFlags)0); - } - - return crystal_viewer_type; -} - -void gtk_crystal_viewer_class_init (GtkCrystalViewerClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - parent_class = (GtkBinClass*) gtk_type_class (gtk_bin_get_type ()); - - gobject_class->finalize = gtk_crystal_viewer_finalize; -} - -void gtk_crystal_viewer_init (GtkCrystalViewer *viewer) -{ -} - -GtkWidget* gtk_crystal_viewer_new (xmlNodePtr node) -{ - GtkCrystalViewer* viewer = (GtkCrystalViewer*) g_object_new (GTK_TYPE_CRYSTAL_VIEWER, NULL); - viewer->pDoc = new gcu::CrystalDoc (NULL); - viewer->pView = viewer->pDoc->GetView(); - GtkWidget* w = viewer->pView->GetWidget (); - gtk_container_add (GTK_CONTAINER (viewer), w); - if (node) - viewer->pDoc->ParseXMLTree (node); - g_signal_connect (G_OBJECT (viewer), "size_allocate", G_CALLBACK (on_size), NULL); - gtk_widget_show (w); - return GTK_WIDGET (viewer); -} - -void gtk_crystal_viewer_finalize (GObject* object) -{ - ((GObjectClass*) parent_class)->finalize (object); - GtkCrystalViewer* viewer = GTK_CRYSTAL_VIEWER (object); - delete viewer->pView; - delete viewer->pDoc; -} - -void gtk_crystal_viewer_set_data (GtkCrystalViewer * viewer, xmlNodePtr node) -{ - g_return_if_fail (GTK_IS_CRYSTAL_VIEWER (viewer)); - g_return_if_fail (node); - viewer->pDoc->ParseXMLTree (node); - viewer->pView->Update (); -} - -} //extern "C" diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkcrystalviewer.h gnome-chemistry-utils-0.10.9/gcu/gtkcrystalviewer.h --- gnome-chemistry-utils-0.8.6/gcu/gtkcrystalviewer.h 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkcrystalviewer.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,96 +0,0 @@ -/* - * Gnome Chemisty Utils - * gtkcrystalviewer.h - * - * Copyright (C) 2002-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -/*!\file -Declaration of the GtkCrystalViewer widget. -*/ - -#ifndef GTK_CRYSTAL_VIEWER_H -#define GTK_CRYSTAL_VIEWER_H - -#include -#include - -G_BEGIN_DECLS - -/*!\return the GType associated to GtkCrystalViewer */ -#define GTK_TYPE_CRYSTAL_VIEWER (gtk_crystal_viewer_get_type ()) -/*! -Casts \a obj to a GtkCrystalViewer * pointer. -\return a pointer to the GtkCrystalViewer * or NULL if \a obj does not point to -a GtkCrystalViewer widget. -*/ -#define GTK_CRYSTAL_VIEWER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CRYSTAL_VIEWER, GtkCrystalViewer)) -/*! -Casts \a klass to a GtkCrystalViewerClass * pointer. -\return a pointer to the GtkCrystalViewerClass * or NULL if \a obj not point to a GtkCrystalViewerClass. -*/ -#define GTK_CRYSTAL_VIEWER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CRYSTAL_VIEWER, GtkCrystalViewerClass)) -/*! -\return TRUE if \a obj points to a GtkCrystalViewer widget, FALSE otherwise. -*/ -#define GTK_IS_CRYSTAL_VIEWER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CRYSTAL_VIEWER)) -/*! -\return TRUE if \a klass points to a GtkCrystalViewerClass, FALSE otherwise. -*/ -#define GTK_IS_CRYSTAL_VIEWER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CRYSTAL_VIEWER)) -/*! -\return the GtkCrystalViewerClass * associated to \a obj if obj points to a GtkCrystalViewer widget, -NULL otherwise. -*/ -#define GTK_CRYSTAL_VIEWER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CRYSTAL_VIEWER, GtkCrystalViewerClass)) - -/*! The GtkCrystalViewer widget.*/ -typedef struct _GtkCrystalViewer GtkCrystalViewer; -/*! The GtkCrystalViewer widget object class.*/ -typedef struct _GtkCrystalViewerClass GtkCrystalViewerClass; - -/*!\struct GtkCrystalViewer -The GtkCrystalViewer widget displays a crystal structure using an OpenGL window. A test program is available in the tests -directory of the Gnome Chemistry Utils source archive (source in testgtkcrystalviewer.c). -
-

Functions

- -Functions related to the GtkCrystalViewer Widget are described in the gtkcrystalviewer.h page. -*/ - -GType gtk_crystal_viewer_get_type (void) G_GNUC_CONST; -/*! -@param node: a pointer to an xlNode (from libxml) containing the serialized version of the crystal to display as saved by -Gnome Crystal or NULL. - -Builds a new GtkCrystalViewer widget and, if node is not NULL, fills it with the Crystal structure described in node. -@return a pointer to the new viewer. -*/ -GtkWidget* gtk_crystal_viewer_new (xmlNodePtr node); -/*! -@param viewer: a pointer to a GtkCrystalViewer widget. -@param node: a pointer to an xlNode (from libxml) containing the serialized version of the crystal to display as saved by -Gnome Crystal. - -Replaces the content of viewer by the Crystal structure described in node. -*/ -void gtk_crystal_viewer_set_data (GtkCrystalViewer * viewer, xmlNodePtr node); - -G_END_DECLS - -#endif //GTK_CRYSTAL_VIEWER_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkperiodic.c gnome-chemistry-utils-0.10.9/gcu/gtkperiodic.c --- gnome-chemistry-utils-0.8.6/gcu/gtkperiodic.c 2006-12-27 09:28:14.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkperiodic.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,459 +0,0 @@ -/* - * Gnome Chemisty Utils - * gtkperiodic.c - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "gtkperiodic.h" -#include "chemistry.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct _GtkPeriodic -{ - GtkBin bin; - - GtkVBox* vbox; - GtkToggleButton* buttons[119]; - GtkLabel* labels[119]; - GtkNotebook *book; - guint Z; - gboolean can_unselect; - GtkTooltips* tips; - unsigned colorstyle; - GArray *colorschemes; - unsigned nbschemes; -}; - -struct _GtkPeriodicClass -{ - GtkBinClass parent_class; - - void (* element_changed_event)(GtkPeriodic *periodic); -}; - -static unsigned DefaultRed[4], DefaultGreen[4], DefaultBlue[4]; - -GType -gtk_periodic_color_style_get_type (void) -{ - static GType etype = 0; - if (etype == 0) { - static const GEnumValue values[] = { - { GTK_PERIODIC_COLOR_NONE, "GTK_PERIODIC_COLOR_NONE", "none" }, - { GTK_PERIODIC_COLOR_DEFAULT, "GTK_PERIODIC_COLOR_DEFAULT", "default" }, - { 0, NULL, NULL } - }; - etype = g_enum_register_static ("GtkPeriodicColorStyle", values); - } - return etype; -} -#define GTK_TYPE_PERIODIC_COLOR_STYLE_TYPE (gtk_periodic_color_style_get_type()) - -static GtkBinClass *parent_class = NULL; - -struct ColorScheme { - GtkPeriodicColorFunc f; - int page; - gpointer data; -}; - -enum { - ELEMENT_CHANGED, - LAST_SIGNAL -}; - -enum { - PROP_0, - PROP_CAN_UNSELECT, - PROP_COLOR_STYLE -}; - -static guint gtk_periodic_signals[LAST_SIGNAL] = { 0 }; - -static void gtk_periodic_class_init (GtkPeriodicClass *klass); -static void gtk_periodic_init(GtkPeriodic *periodic); -static void gtk_periodic_finalize(GObject *object); -static void gtk_periodic_size_allocate(GtkPeriodic* w, GtkAllocation *allocation); -static void gtk_periodic_size_request(GtkPeriodic* w, GtkRequisition *requisition); -static void gtk_periodic_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec); -static void gtk_periodic_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec); -static void on_clicked(GtkToggleButton *button, GtkPeriodic* periodic); - -GType -gtk_periodic_get_type (void) -{ - static GType periodic_type = 0; - - if (!periodic_type) - { - static const GTypeInfo periodic_info = - { - sizeof (GtkPeriodicClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_periodic_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkPeriodic), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_periodic_init, - }; - - periodic_type = g_type_register_static (GTK_TYPE_BIN, "GtkPeriodic", &periodic_info, 0); - } - - return periodic_type; -} - -void gtk_periodic_class_init (GtkPeriodicClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - GtkWidgetClass * widget_class = GTK_WIDGET_CLASS (class); - parent_class = gtk_type_class(gtk_bin_get_type()); - - gobject_class->set_property = gtk_periodic_set_property; - gobject_class->get_property = gtk_periodic_get_property; - class->element_changed_event = NULL; - gtk_periodic_signals[ELEMENT_CHANGED] = - g_signal_new ("element_changed", - G_TYPE_FROM_CLASS(gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET(GtkPeriodicClass, element_changed_event), - NULL, NULL, - g_cclosure_marshal_VOID__UINT, - G_TYPE_NONE, 1, - G_TYPE_UINT - ); - g_object_class_install_property - (gobject_class, - PROP_CAN_UNSELECT, - g_param_spec_boolean ("can_unselect", NULL, NULL, - FALSE, - (G_PARAM_READABLE | G_PARAM_WRITABLE))); - g_object_class_install_property - (gobject_class, - PROP_COLOR_STYLE, - g_param_spec_uint ("color-style", NULL, NULL, - GTK_PERIODIC_COLOR_NONE, G_MAXUINT, - GTK_PERIODIC_COLOR_NONE, - (G_PARAM_READABLE | G_PARAM_WRITABLE))); - gobject_class->finalize = gtk_periodic_finalize; - widget_class->size_request = (void(*)(GtkWidget*, GtkRequisition*)) gtk_periodic_size_request; - widget_class->size_allocate = (void(*)(GtkWidget*, GtkAllocation*)) gtk_periodic_size_allocate; -} - -void gtk_periodic_init (GtkPeriodic *periodic) -{ - GladeXML* xml; - GtkStyle* style; - char name[8] = "elt"; - GtkToggleButton* button; - int i; - char* domain = g_strdup(textdomain(NULL)); - textdomain(GETTEXT_PACKAGE); - xml = glade_xml_new(GLADEDIR"/gtkperiodic.glade", "vbox1", NULL); - g_return_if_fail (xml); - g_object_set_data(G_OBJECT(periodic), "xml", xml); - glade_xml_signal_autoconnect (xml); - periodic->tips = gtk_tooltips_new(); - periodic->vbox = GTK_VBOX(glade_xml_get_widget(xml, "vbox1")); - periodic->book = GTK_NOTEBOOK (glade_xml_get_widget (xml, "book")); - periodic->colorstyle = GTK_PERIODIC_COLOR_NONE; - memset(periodic->buttons, 0, sizeof(GtkToggleButton*) * 119); - for (i = 1; i <= 118; i++) - { - sprintf(name + 3, "%d", i); - button = (GtkToggleButton*)glade_xml_get_widget(xml, name); - if (GTK_IS_TOGGLE_BUTTON(button)) - { - gtk_tooltips_set_tip(periodic->tips, GTK_WIDGET(button), gcu_element_get_name(i), NULL); - periodic->buttons[i] = button; - periodic->labels[i] = GTK_LABEL (gtk_bin_get_child (GTK_BIN (button))); - g_signal_connect(G_OBJECT(button), "toggled", (GCallback)on_clicked, periodic); - } - } - style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(periodic->buttons[1]))); - DefaultRed[0] = style->bg[0].red; - DefaultGreen[0] = style->bg[0].green; - DefaultBlue[0] = style->bg[0].blue; - DefaultRed[1] = style->bg[1].red; - DefaultGreen[1] = style->bg[1].green; - DefaultBlue[1] = style->bg[1].blue; - DefaultRed[2] = style->bg[2].red; - DefaultGreen[2] = style->bg[2].green; - DefaultBlue[2] = style->bg[2].blue; - DefaultRed[3] = style->bg[3].red; - DefaultGreen[3] = style->bg[3].green; - DefaultBlue[3] = style->bg[3].blue; - g_object_unref(style); - periodic->Z = 0; - gtk_container_add(GTK_CONTAINER(periodic), GTK_WIDGET(periodic->vbox)); - gtk_widget_show_all(GTK_WIDGET(periodic)); - textdomain(domain); - g_free(domain); - periodic->colorschemes = g_array_new (FALSE, FALSE, sizeof (struct ColorScheme)); -} - -static void gtk_periodic_finalize (GObject *object) -{ - GtkPeriodic *periodic = (GtkPeriodic*) object; - GObject *obj = (GObject*) g_object_get_data (object, "xml"); - - g_object_ref_sink (G_OBJECT (periodic->tips)); - g_array_free (periodic->colorschemes, FALSE); - if (obj) g_object_unref (obj); - - if (G_OBJECT_CLASS (parent_class)->finalize) - (* G_OBJECT_CLASS (parent_class)->finalize) (object); -} - -GtkWidget* gtk_periodic_new() -{ - GtkBin* bin = GTK_BIN(g_object_new(GTK_TYPE_PERIODIC, NULL)); - return GTK_WIDGET(bin); -} - -void on_clicked(GtkToggleButton *button, GtkPeriodic* periodic) -{ - static gboolean change = FALSE; - if (button != periodic->buttons[0]) - { - const gchar* name; - change = TRUE; - if (periodic->buttons[0]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(periodic->buttons[0]), FALSE); - periodic->buttons[0] = button; - name = gtk_widget_get_name(GTK_WIDGET(periodic->buttons[0])); - periodic->Z = atoi(name + 3); - g_signal_emit(periodic, gtk_periodic_signals[ELEMENT_CHANGED], 0, periodic->Z); - change = FALSE; - } - else if (!change) - { - if (periodic->can_unselect) - { - periodic->buttons[0] = NULL; - periodic->Z = 0; - g_signal_emit(periodic, gtk_periodic_signals[ELEMENT_CHANGED], 0, 0); - } - else if (periodic->buttons[0]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(periodic->buttons[0]), TRUE); - } -} - -void gtk_periodic_size_allocate(GtkPeriodic* w, GtkAllocation *allocation) -{ - if (GTK_BIN(w)->child && GTK_WIDGET_VISIBLE (GTK_BIN(w)->child)) - gtk_widget_size_allocate (GTK_BIN(w)->child, allocation); - (GTK_WIDGET_CLASS(parent_class))->size_allocate(GTK_WIDGET(w), allocation); -} - -void gtk_periodic_size_request(GtkPeriodic* w, GtkRequisition *requisition) -{ - gtk_widget_size_request ((GTK_BIN(w))->child, requisition); -} - -guint gtk_periodic_get_element(GtkPeriodic* periodic) -{ - g_return_val_if_fail(GTK_IS_PERIODIC(periodic), 0); - return periodic->Z; -} - -void gtk_periodic_set_element (GtkPeriodic* periodic, guint element) -{ - g_return_if_fail(GTK_IS_PERIODIC(periodic)); - if (periodic->can_unselect && periodic->buttons[0]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(periodic->buttons[0]), FALSE); - if (element) - { - gtk_toggle_button_set_active(periodic->buttons[element], TRUE); - periodic->buttons[0] = periodic->buttons[element]; - periodic->Z = element; - } - else if (periodic->can_unselect) - { - periodic->buttons[0] = NULL; - periodic->Z = 0; - } -} - -static void -gtk_periodic_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) -{ - GtkPeriodic *periodic; - g_return_if_fail (object != NULL); - g_return_if_fail (GTK_IS_PERIODIC (object)); - - periodic = GTK_PERIODIC (object); - - switch (param_id) { - case PROP_CAN_UNSELECT: - periodic->can_unselect = g_value_get_boolean (value); - break; - - case PROP_COLOR_STYLE: { - int style = g_value_get_uint (value); - if (style < GTK_PERIODIC_COLOR_MAX + periodic->nbschemes) { - periodic->colorstyle = style; - int page = (style >= GTK_PERIODIC_COLOR_MAX)? - g_array_index (periodic->colorschemes, struct ColorScheme, style - GTK_PERIODIC_COLOR_MAX).page: 0; - gtk_notebook_set_current_page (periodic->book, page); - gtk_periodic_set_colors (periodic); - } else - g_warning (_("Out of range value %d for property \"color-style\" for GtkPeriodic instance %p\n"), style, periodic); - break; - } - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -gtk_periodic_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) -{ - GtkPeriodic *periodic; - - g_return_if_fail (object != NULL); - g_return_if_fail (GTK_IS_PERIODIC (object)); - - periodic = GTK_PERIODIC (object); - - switch (param_id) { - case PROP_CAN_UNSELECT: - g_value_set_boolean (value, periodic->can_unselect); - break; - - case PROP_COLOR_STYLE: - g_value_set_uint (value, periodic->colorstyle); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -void gtk_periodic_set_colors(GtkPeriodic *periodic) -{ - GtkStyle* style; - const double *colors; - PangoAttribute *attr; - PangoAttrList *l; - int i; - GdkColor color; - GtkPeriodicColorFunc func = NULL; - gpointer data = NULL; - if (periodic->colorstyle >= GTK_PERIODIC_COLOR_MAX) { - func = g_array_index (periodic->colorschemes, struct ColorScheme, periodic->colorstyle - GTK_PERIODIC_COLOR_MAX).f; - data = g_array_index (periodic->colorschemes, struct ColorScheme, periodic->colorstyle - GTK_PERIODIC_COLOR_MAX).data; - } - for (i = 1; i <= 118; i++) - { - if (!periodic->buttons[i]) continue; - style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(periodic->buttons[i]))); - switch (periodic->colorstyle) - { - case GTK_PERIODIC_COLOR_NONE: - style->bg[0].red = DefaultRed[0]; - style->bg[0].green = DefaultGreen[0]; - style->bg[0].blue = DefaultBlue[0]; - style->bg[1].red = DefaultRed[0]; - style->bg[1].green = DefaultGreen[1]; - style->bg[1].blue = DefaultBlue[1]; - style->bg[2].red = DefaultRed[1]; - style->bg[2].green = DefaultGreen[2]; - style->bg[2].blue = DefaultBlue[2]; - style->bg[3].red = DefaultRed[3]; - style->bg[3].green = DefaultGreen[3]; - style->bg[3].blue = DefaultBlue[3]; - attr = pango_attr_foreground_new (0, 0, 0); - attr->start_index = 0; - attr->end_index = 100; - l = pango_attr_list_new (); - pango_attr_list_insert (l, attr); - gtk_label_set_attributes (periodic->labels[i], l); - break; - case GTK_PERIODIC_COLOR_DEFAULT: - colors = gcu_element_get_default_color(i); - style->bg[0].red = style->bg[1].red = style->bg[2].red = style->bg[3].red = (guint16) (colors[0] * 65535.0); - style->bg[0].green = style->bg[1].green = style->bg[2].green = style->bg[3].green = (guint16) (colors[1] * 65535.0); - style->bg[0].blue = style->bg[1].blue = style->bg[2].blue = style->bg[3].blue = (guint16) (colors[2] * 65535.0); - if (colors[0] > 0.6 || colors[1] > 0.6 || colors[2] > 0.6) - attr = pango_attr_foreground_new (0, 0, 0); - else - attr = pango_attr_foreground_new (65535, 65535, 65535); - attr->start_index = 0; - attr->end_index = 100; - l = pango_attr_list_new (); - pango_attr_list_insert (l, attr); - gtk_label_set_attributes (periodic->labels[i], l); - break; - default: { - func (i, &color, data); - style->bg[0] = style->bg[1] = style->bg[2] = style->bg[3] = color; - if (color.red > 39321 || color.green > 39321 || color.blue > 39321) - attr = pango_attr_foreground_new (0, 0, 0); - else - attr = pango_attr_foreground_new (65535, 65535, 65535); - attr->start_index = 0; - attr->end_index = 100; - l = pango_attr_list_new (); - pango_attr_list_insert (l, attr); - gtk_label_set_attributes (periodic->labels[i], l); - break; - } - } - gtk_widget_set_style(GTK_WIDGET(periodic->buttons[i]), style); - g_object_unref(style); - } -} - -int gtk_periodic_add_color_scheme (GtkPeriodic *periodic, - GtkPeriodicColorFunc func, GtkWidget *extra_widget, gpointer user_data) -{ - struct ColorScheme s; - s.f = func; - if (extra_widget) - s.page = gtk_notebook_append_page (periodic->book, extra_widget, NULL); - else - s.page = 0; - s.data = user_data; - g_array_append_val (periodic->colorschemes, s); - return GTK_PERIODIC_COLOR_MAX + periodic->nbschemes++; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/gtkperiodic.h gnome-chemistry-utils-0.10.9/gcu/gtkperiodic.h --- gnome-chemistry-utils-0.8.6/gcu/gtkperiodic.h 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/gtkperiodic.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,174 +0,0 @@ -// -*- C -*- - -/* - * Gnome Chemisty Utils - * gtkperiodic.h - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GTK_PERIODIC_H -#define GTK_PERIODIC_H - -#include -#include -#include -#include - -G_BEGIN_DECLS - -/*!\file -Declaration of the GtkPeriodic widget. -*/ -/*! \enum GtkPeriodicColorSchemes - Predefined coloring scheme used for the buttons when displaying the periodic table of the GtkPeriodic widget. - Possible values are: - - GTK_PERIODIC_COLOR_NONE: the default Gtk theme is used. - - GTK_PERIODIC_COLOR_DEFAULT: the default color for each element is used as returned by gcu_element_get_default_color. - Other values can be added using gtk_periodic_add_color_scheme. -*/ -enum GtkPeriodicColorSchemes -{ - GTK_PERIODIC_COLOR_NONE, - GTK_PERIODIC_COLOR_DEFAULT, - GTK_PERIODIC_COLOR_MAX, -}; - -/*!\return the GType associated to GtkPeriodic */ -#define GTK_TYPE_PERIODIC (gtk_periodic_get_type ()) -/*! -Casts \a obj to a GtkPeriodic * pointer. -\return a pointer to the GtkPeriodic * or NULL if \a obj does not point to -a GtkPeriodic widget. -*/ -#define GTK_PERIODIC(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PERIODIC, GtkPeriodic)) -/*! -Casts \a klass to a GtkPeriodicClass * pointer. -\return a pointer to the GtkPeriodicClass * or NULL if \a obj not point to a GtkPeriodicClass. -*/ -#define GTK_PERIODIC_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PERIODIC, GtkPeriodicClass)) -/*! -\return TRUE if \a obj points to a GtkPeriodic widget, FALSE otherwise. -*/ -#define GTK_IS_PERIODIC(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PERIODIC)) -/*! -\return TRUE if \a klass points to a GtkPeriodicClass, FALSE otherwise. -*/ -#define GTK_IS_PERIODIC_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PERIODIC)) -/*! -\return the GtkPeriodicClass * associated to \a obj if obj points to a GtkPeriodic widget, -NULL otherwise. -*/ -#define GTK_PERIODIC_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_PERIODIC, GtkPeriodicClass)) - -/*! The GtkPeriodic widget.*/ -typedef struct _GtkPeriodic GtkPeriodic; -/*! The GtkPeriodic widget object class.*/ -typedef struct _GtkPeriodicClass GtkPeriodicClass; - -/*! \struct GtkPeriodic gcu/gtkperiodic.h - The GtkPeriodic Widget displays a Periodic table of the elements, each element being represented in a toggle button. - A test program is available in the tests directory of the Gnome Chemistry Utils source archive -(source in testgtkperiodic.c). -
-

Signals

- - This widget has one signal: -- "element-changed": void user_function (GtkWidget* periodic, guint Z, gpointer data). -\param periodic: the object which received the signal. -\param Z: the atomic number of the newly selected element or 0 if no element is selected. -\param data: user data set when the signal handler was connected. - - This signal is raised when the selected element changes in the widget. - -
-

Properties

-There are two properties: -- "can_unselect": gboolean (Read / Write). -
When this property is set to TRUE, you can unselect the selected element by clicking on the active button, otherwise an element will always be selected. - Default value is FALSE. - -- "color-style": GtkPeriodicColorStyle (Read / Write). -
This property is used to set the coloring scheme used for the buttons when displaying the periodic table. - There are two predefined values: - - GTK_PERIODIC_COLOR_NONE: the default Gtk theme is used. - - GTK_PERIODIC_COLOR_DEFAULT: the default color for each element is used as returned by gcu_element_get_default_color. - Other values can be added using gtk_periodic_add_color_scheme(). - Default value is GTK_PERIODIC_COLOR_NONE. -. -
-

Functions

- -Functions related to the GtkPeriodic Widget are described in the gtkperiodic.h page. -*/ - -/*! -The callback used for color schemes. It takes three arguments: -\li the atomic number Z. -\li a pointer to the GdkColor structure to be filled by the callback -\li a pointer to user's data. -*/ -typedef void (*GtkPeriodicColorFunc) (int, GdkColor*, gpointer); - -GType gtk_periodic_get_type (void) G_GNUC_CONST; -GtkWidget* gtk_periodic_new (void); - -/** - * gtk_periodic_get_element: - * \param periodic a GtkPeriodic widget - * - * Description: used to get the currently selected element in the periodic table. - * - * Returns: the atomic number of the currently selected element or %0 if none is selected. - */ -guint gtk_periodic_get_element (GtkPeriodic* periodic); -/** - * gtk_periodic_set_element: - * \param periodic a GtkPeriodic widget - * \param element the atomic number of the element to select or 0 - * - * Description: sets the selected element in the periodic table. - */ - -void gtk_periodic_set_element (GtkPeriodic* periodic, guint element); - -/*! -\param periodic a GtkPeriodic widget. -\param func the callback used to get the color for an element in the new color scheme. -\param extra_widget a widget to be added as a child of \a periodic. -\param user_data data to be passed to the \a func callback. - -Using this function and the appropriate callback, the color used for the elements buttons -can be changed to depend on any property of the elements. -\return the identifier of the new color scheme. -*/ -int gtk_periodic_add_color_scheme (GtkPeriodic *periodic, - GtkPeriodicColorFunc func, - GtkWidget *extra_widget, - gpointer user_data); - -/*! -\param periodic a GtkPeriodic widget. - -Forces the update of the current color scheme. This is useful when the color scheme depends -upon a parameter which has changed. -*/ -void gtk_periodic_set_colors(GtkPeriodic *periodic); -G_END_DECLS - -#endif //GTK_PERIODIC_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/isotope.cc gnome-chemistry-utils-0.10.9/gcu/isotope.cc --- gnome-chemistry-utils-0.8.6/gcu/isotope.cc 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/isotope.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,200 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * isotope.cc - * Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "isotope.h" - -using namespace gcu; - -Isotope::Isotope () -{ - A = 0; - name = NULL; - abundance.value = 0.; - abundance.prec = 0; - abundance.delta = 0; - mass.value = 0.; - mass.prec = 0; - mass.delta = 0; - spin = 0; - decay_modes = NULL; - decay_period.value = 0.; - decay_period.prec = 0; - decay_period.unit = NULL; -} - -Isotope::~Isotope () -{ - if (name != NULL) - g_free (name); - if (decay_modes != NULL) - g_free (decay_modes); -} - -IsotopicPattern::IsotopicPattern () -{ - m_min = m_max = m_mono = 0; - m_mono_mass = 0.; - ref_count = 1; -} - -IsotopicPattern::IsotopicPattern (int min, int max) -{ - if (max >= min) { - m_min = min; - m_max = max; - } else { - m_max = min; - m_min = max; - } - m_mono = 0; - m_mono_mass = 0.; - m_values.resize (max - min + 1); - ref_count = 1; -} - -IsotopicPattern::~IsotopicPattern () -{ -} - -double IsotopicPattern::epsilon = 1e-6; - -IsotopicPattern *IsotopicPattern::Simplify () -{ - int min = 0, max = m_max - m_min; - int i, j, imax = max + 1; - double vmax = m_values[0], minval; - for (i = 1; i < imax; i++) - if (m_values[i] > vmax) { - vmax = m_values[i]; - } - minval = epsilon * vmax; - while (m_values[min] < minval) - min++; - while (m_values[max] < minval) - max--; - IsotopicPattern *pat = new IsotopicPattern (min + m_min, max + m_min); - pat->m_mono = m_mono; - pat->m_mono_mass = m_mono_mass; - vmax /= 100.; - for (i = min, j = 0; i <= max; i++, j++) - pat->m_values[j] = m_values[i] / vmax; - return pat; -} - -IsotopicPattern *IsotopicPattern::Multiply (IsotopicPattern &pattern) -{ - IsotopicPattern *pat = new IsotopicPattern (m_min + pattern.m_min, m_max + pattern.m_max); - pat->m_mono = m_mono + pattern.m_mono; - pat->m_mono_mass = m_mono_mass + pattern.m_mono_mass; - int i, j, k, imax = pat->m_max - pat->m_min + 1, jmax = m_values.size () - 1, kmax = pattern.m_values.size (); - for (i = 0; i < imax; i++) { - pat->m_values[i] = 0.; - for (j = min (i, jmax), k = i - j; (k < kmax) && (j >= 0); j--, k++) { - pat->m_values[i] += pattern.m_values[k] * m_values[j]; - } - } - return pat; -} - -IsotopicPattern *IsotopicPattern::Square () -{ - IsotopicPattern *pat = new IsotopicPattern (2 * m_min, 2 * m_max); - pat->m_mono = 2 * m_mono; - pat->m_mono_mass = 2. * m_mono_mass; - int i, j, k, imax = pat->m_max - pat->m_min + 1, jmax = m_values.size () - 1; - for (i = 0; i < imax; i++) { - pat->m_values[i] = 0.; - for (j = max (0, i - jmax), k = i - j; k > j; k--, j++) { - pat->m_values[i] += 2. * m_values[k] * m_values[j]; - } - if (j == k) - pat->m_values[i] += m_values[j] * m_values[j]; - } - return pat; -} - -void IsotopicPattern::SetValue (int A, double percent) -{ - if (A >= m_min && A <= m_max) { - A -= m_min; - m_values[A] = percent; - } -} - -void IsotopicPattern::Normalize () -{ - double max = m_values[0]; - int i, maxi = m_max - m_min + 1; - m_mono = 0; - for (i = 1; i < maxi; i++) - if (m_values[i] > max) { - m_mono = i; - max = m_values[i]; - } - m_mono += m_min; - max /= 100.; - for (i = 0; i < maxi; i++) - m_values[i] /= max; -} - -void IsotopicPattern::Unref () -{ - ref_count--; - if (!ref_count) - delete this; -} - -int IsotopicPattern::GetValues (double **values) -{ - int i, result = m_values.size (); - *values = g_new (double, result); - for (i = 0; i < result; i++) - (*values)[i] = m_values[i]; - return result; -} - -void IsotopicPattern::Copy (IsotopicPattern& pattern) -{ - m_min = pattern.m_min; - m_max = pattern.m_max; - m_mono = pattern.m_mono; - m_mono_mass = pattern.m_mono_mass; - int i, max = pattern.m_values.size(); - m_values.resize (max); - for (i = 0; i < max; i++) { - m_values[i] = pattern.m_values[i]; - } -} - -void IsotopicPattern::Clear () -{ - m_min = m_max = m_mono = 0; - m_mono_mass = 0.; -} - -void IsotopicPattern::SetMonoMass (double mass) -{ - if (m_mono_mass == 0.) - m_mono_mass = mass; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/isotope.h gnome-chemistry-utils-0.10.9/gcu/isotope.h --- gnome-chemistry-utils-0.8.6/gcu/isotope.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/isotope.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,167 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * isotope.h - * - * Copyright (C) 2005-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_ISOTOPE_H -#define GCU_ISOTOPE_H - -#include -#include - -using namespace std; - -namespace gcu -{ - -/*!\class Isotope gcu/isotope.h -This class just wrap a GcuIsotope structure. -*/ -class Isotope: public GcuIsotope -{ -public: -/*! -The constructor initialize the member of the GcuIsotope structure with -nul values. -*/ - Isotope (); - ~Isotope (); -}; - -/*!\class IsotopicPattern gcu/isotope.h -Objects of this class represent the isotopic pattern corresponding to a -chemical formula. -
-The formalism used is similar to polynoms algebra, since calculate the -isotopic pattern of the reunion of two fragments is equivalent to a -polynomial multiplication. -*/ -class IsotopicPattern -{ -public: -/*! -Default constructor. Initialize members to nul values. The IsotopicPattern -is given an initial reference count of 1. -*/ - IsotopicPattern (); -/*! -Sets the minimum and maximum mass numbers of the pattern, and reserves memory to -store the abundances of the mass fragments. The IsotopicPattern -is given an initial reference count of 1. -*/ - IsotopicPattern (int min, int max); - ~IsotopicPattern (); - -/*! -This method creates a copy of the original object with abundances normalized -as a percentage of the largest value, and removes very small values to save time -in subsequent calculations. -@return the resulting object. -*/ - IsotopicPattern *Simplify (void); -/*! -Effects a polynomial multiplication to calculate the pattern correponding to -the reunion of the two fragments. -@return the result of the multiplication. -*/ - IsotopicPattern *Multiply (IsotopicPattern& pattern); -/*! -Squares the original pattern to get the pattern corresponding to twice the -original formula. -@return the result of the multiplication. -*/ - IsotopicPattern *Square (void); -/*! -@param pattern: the isotopic pattern to be copied. -Set the values of the isotopic pattern so that it becomes identical to pattern. -*/ - void Copy (IsotopicPattern& pattern); - -/*! -@param A: the mass number of the isotope. -@param percent: the abundance of the isotope. - -This method is used when building an Isotopic Pattern from raw data. -IsotopicPattern::SetMonoMass should be called when data for each isotope have been entered. -*/ - void SetValue (int A, double percent); -/*! -Effects the same multiplication on all abundances so that the largest becomes -100. -*/ - void Normalize (); -/*! -Clears the contents of an isotopic pattern for reuse. -*/ - void Clear (); -/*! -Increments the reference count of the pattern. -*/ - void Ref () {ref_count++;} -/*! -Decrements the reference count of the pattern. If the reference count becomes 0, -the object is destroyed. -*/ - void Unref (); -/*! -@return the mass (actually the nucleons number) of the fragment with the -lowest mass. This might not be the real minimu, since fragments with very low -abundance are discarded during the evaluation. -*/ - int GetMinMass () {return m_min;} -/*! -@return the nucleons number of the fragment made with most abundant -isotopes of each element. -*/ - int GetMonoNuclNb () {return m_mono;} -/*! -@return the mass of the fragment made with most abundant -isotopes of each element. -*/ - double GetMonoMass () {return m_mono_mass;} -/*! -@param mass: the mass of the most abundant isotope. - -This method is used when building an Isotopic Pattern from raw data. -To enter the data for each isotope, use IsotopicPattern::SetValue. It -has no effect if the current monoisotopic mass is not nul. -*/ - void SetMonoMass (double mass); -/*! -@param values: where to store the pointer to the abundances of the various -mass fragments as a percentage of the most abundant one. The pointer should be -freed with g_free when not anymore nedded. - -@return the number of values in the array. -*/ - int GetValues (double **values); - -private: - int m_min, m_max, m_mono; - int ref_count; - vector m_values; - double m_mono_mass; - static double epsilon; -}; - -} -#endif // GCU_ISOTOPE_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/macros.h gnome-chemistry-utils-0.10.9/gcu/macros.h --- gnome-chemistry-utils-0.8.6/gcu/macros.h 2007-05-12 08:46:35.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/macros.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,172 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemisty Utils - * macros.h - * - * Copyright (C) 2001-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_MACROS_H -#define GCU_MACROS_H - -/*!\file */ -/*!\def GCU_PROP() -Defines a private member with appropriate get/set methods. -GCU_PROP((Type,Foo) expands to one private member: -\code - Type m_Foo; -\endcode - -and three public methods: -\code - void SetFoo(Type val); - Type GetFoo(); - Type& GetRefFoo(); -\endcode - -The last one allows code as: -\code - obj.GetRefFoo() = val; -\endcode -*/ -#define GCU_PROP(type,member) \ -public: \ - void Set##member (type val) {m_##member = val;} \ - type Get##member (void) {return m_##member;} \ - type &GetRef##member (void) {return m_##member;} \ -private: \ - type m_##member; - -/*!\def GCU_RO_PROP() -Defines a private member with appropriate get method. RO stands for Read Only. The member -can't be modified from outside the class it belongs too or a friend class. -GCU_RO_PROP(Type,Foo) expands to one private member: -\code - Type m_Foo; -\endcode - -and one public method: -\code - Type GetFoo(); -\endcode -*/ -#define GCU_RO_PROP(type,member) \ -public: \ - type Get##member (void) {return m_##member;} \ -private: \ - type m_##member; - -/*!\def GCU_PROT_PROP() -Defines a protected member with appropriate get method. The member can be modified -the class it belongs too or a friend class or a derived class. -GCU_PROT_PROP(Type,Foo) expands to one protected member: -\code - Type m_Foo; -\endcode - -and one public method: -\code - Type GetFoo(); -\endcode -*/ -#define GCU_PROT_PROP(type,member) \ -public: \ - type Get##member (void) {return m_##member;} \ -protected: \ - type m_##member; - -/*!\def GCU_GCONF_GET() -This macro gets the numerical value of type \a type associated to \a key, and -copies it to \a target. If an error occurs or if the value is 0, -\a defaultval is used instead.\n -Calling class must have a GConfClient member called m_ConfClient, and the code -must provide a GError *error initially set to NULL. -*/ -#define GCU_GCONF_GET(key,type,target,defaultval) \ - target = gconf_client_get_##type (m_ConfClient, key, &error); \ - if (error) { \ - target = defaultval; \ - g_message ("GConf failed: %s", error->message); \ - g_error_free (error); \ - error = NULL; \ - } \ - if (target == (type) 0) \ - target = defaultval; - -/*!\def GCU_GCONF_GET_NO_CHECK() -This macro gets the numerical value of type \a type associated to \a key, and -copies it to \a target. If an error occurs, \a defaultval is used instead.\n -Calling class must have a GConfClient member called m_ConfClient, and the code -must provide a GError *error initially set to NULL. -*/ -#define GCU_GCONF_GET_NO_CHECK(key,type,target,defaultval) \ - target = gconf_client_get_##type (m_ConfClient, key, &error); \ - if (error) { \ - target = defaultval; \ - g_message ("GConf failed: %s", error->message); \ - g_error_free (error); \ - error = NULL; \ - } - -/*!\def GCU_GCONF_GET_N_TRANSFORM() -This macro gets the numerical value of type \a type associated to \a key. If an error -occurs or if the value is 0, \a defaultval is used instead.\n -The resuting value is then passed to \a func and the result is copied -to \a target. \n -Calling class must have a GConfClient member called m_ConfClient, and the code -must provide a GError *error initially set to NULL. -*/ -#define GCU_GCONF_GET_N_TRANSFORM(key,type,target,defaultval,func) \ - { \ - type val = gconf_client_get_##type (m_ConfClient, key, &error); \ - if (error) { \ - val = defaultval; \ - g_message ("GConf failed: %s", error->message); \ - g_error_free (error); \ - error = NULL; \ - } \ - if (val == (type) 0) \ - val = defaultval; \ - target = func (val); \ - } - -/*!\def GCU_GCONF_GET_STRING() -This macro gets the string value associated to \a key, and -copies it to \a target. If an error occurs, \a defaultval is used instead.\n -If \a target is not NULL when entering the macro, it is deallocated using g_free -and set to NULL before calling gconf_client_get_string.\n -Calling class must have a GConfClient member called m_ConfClient, and the code -must provide a GError *error initially set to NULL. -*/ -#define GCU_GCONF_GET_STRING(key,target,defaultval) \ - if (target) { \ - g_free (target); \ - target = NULL; \ - } \ - target = gconf_client_get_string (m_ConfClient, key, &error); \ - if (error) { \ - if (defaultval) \ - target = g_strdup (defaultval); \ - g_message ("GConf failed: %s", error->message); \ - g_error_free (error); \ - error = NULL; \ - } else if (target == NULL && defaultval) \ - target = g_strdup (defaultval); - -#endif // GCU_MACROS_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/Makefile.am gnome-chemistry-utils-0.10.9/gcu/Makefile.am --- gnome-chemistry-utils-0.8.6/gcu/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/Makefile.am 1970-01-01 01:00:00.000000000 +0100 @@ -1,76 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_srcdir) - -DEFS += -DDATADIR=\"$(datadir)\" \ - -DLOCALEDIR=\"$(localedir)\" \ - -DPKGDATADIR=\"$(datadir)/gchemutils\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade\" - -lib_LTLIBRARIES= libgcu.la - -libgcu_la_LDFLAGS = -version-info $(GCU_VERSION_INFO) - -libgcu_la_SOURCES = \ - atom.cc \ - bond.cc \ - object.cc \ - document.cc \ - element.cc \ - isotope.cc \ - formula.cc \ - value.cc \ - matrix.cc \ - matrix2d.cc \ - xml-utils.cc \ - application.cc \ - dialog.cc \ - dialog-owner.cc \ - filechooser.cc \ - chemistry.cc \ - gtkperiodic.c \ - gtkcomboperiodic.c \ - gtkcrystalviewer.cc \ - crystalview.cc \ - crystaldoc.cc \ - crystalatom.cc \ - crystalline.cc \ - crystalcleavage.cc \ - chem3ddoc.cc \ - gtkchem3dviewer.cc \ - gldocument.cc \ - glview.cc - -libgcu_la_headers = \ - atom.h \ - bond.h \ - object.h \ - document.h \ - element.h \ - isotope.h \ - formula.h \ - value.h \ - application.h \ - dialog.h \ - dialog-owner.h \ - filechooser.h \ - macros.h \ - matrix.h \ - matrix2d.h \ - xml-utils.h \ - chemistry.h \ - gtkperiodic.h \ - gtkcomboperiodic.h \ - gtkcrystalviewer.h \ - crystalview.h \ - crystaldoc.h \ - crystalatom.h \ - crystalline.h \ - crystalcleavage.h \ - chem3ddoc.h \ - gtkchem3dviewer.h \ - gldocument.h \ - glview.h - -gcuincludedir = $(includedir)/gcu/gcu -gcuinclude_HEADERS = $(libgcu_la_headers) diff -Nru gnome-chemistry-utils-0.8.6/gcu/Makefile.in gnome-chemistry-utils-0.10.9/gcu/Makefile.in --- gnome-chemistry-utils-0.8.6/gcu/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/Makefile.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,691 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = gcu -DIST_COMMON = $(gcuinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gcuincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libgcu_la_LIBADD = -am_libgcu_la_OBJECTS = atom.lo bond.lo object.lo document.lo \ - element.lo isotope.lo formula.lo value.lo matrix.lo \ - matrix2d.lo xml-utils.lo application.lo dialog.lo \ - dialog-owner.lo filechooser.lo chemistry.lo gtkperiodic.lo \ - gtkcomboperiodic.lo gtkcrystalviewer.lo crystalview.lo \ - crystaldoc.lo crystalatom.lo crystalline.lo crystalcleavage.lo \ - chem3ddoc.lo gtkchem3dviewer.lo gldocument.lo glview.lo -libgcu_la_OBJECTS = $(am_libgcu_la_OBJECTS) -libgcu_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libgcu_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libgcu_la_SOURCES) -DIST_SOURCES = $(libgcu_la_SOURCES) -gcuincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(gcuinclude_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALL_LINGUAS = @ALL_LINGUAS@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DLOCALEDIR=\"$(localedir)\" \ - -DPKGDATADIR=\"$(datadir)/gchemutils\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade\" -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOC_USER_FORMATS = @DOC_USER_FORMATS@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GCONFTOOL = @GCONFTOOL@ -GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ -GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ -GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ -GCU_VERSION_INFO = @GCU_VERSION_INFO@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -HELP_DIR = @HELP_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ -KDECONFIG = @KDECONFIG@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAN = @MAN@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ -MOZILLA_CONFIG = @MOZILLA_CONFIG@ -MOZILLA_LIBS = @MOZILLA_LIBS@ -MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ -MSGMERGE = @MSGMERGE@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OMF_DIR = @OMF_DIR@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TESTSSRCDIR = @TESTSSRCDIR@ -UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ -UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XMLLINT = @XMLLINT@ -XMLLINT_FLAGS = @XMLLINT_FLAGS@ -XSLTPROC = @XSLTPROC@ -XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I$(top_srcdir) -lib_LTLIBRARIES = libgcu.la -libgcu_la_LDFLAGS = -version-info $(GCU_VERSION_INFO) -libgcu_la_SOURCES = \ - atom.cc \ - bond.cc \ - object.cc \ - document.cc \ - element.cc \ - isotope.cc \ - formula.cc \ - value.cc \ - matrix.cc \ - matrix2d.cc \ - xml-utils.cc \ - application.cc \ - dialog.cc \ - dialog-owner.cc \ - filechooser.cc \ - chemistry.cc \ - gtkperiodic.c \ - gtkcomboperiodic.c \ - gtkcrystalviewer.cc \ - crystalview.cc \ - crystaldoc.cc \ - crystalatom.cc \ - crystalline.cc \ - crystalcleavage.cc \ - chem3ddoc.cc \ - gtkchem3dviewer.cc \ - gldocument.cc \ - glview.cc - -libgcu_la_headers = \ - atom.h \ - bond.h \ - object.h \ - document.h \ - element.h \ - isotope.h \ - formula.h \ - value.h \ - application.h \ - dialog.h \ - dialog-owner.h \ - filechooser.h \ - macros.h \ - matrix.h \ - matrix2d.h \ - xml-utils.h \ - chemistry.h \ - gtkperiodic.h \ - gtkcomboperiodic.h \ - gtkcrystalviewer.h \ - crystalview.h \ - crystaldoc.h \ - crystalatom.h \ - crystalline.h \ - crystalcleavage.h \ - chem3ddoc.h \ - gtkchem3dviewer.h \ - gldocument.h \ - glview.h - -gcuincludedir = $(includedir)/gcu/gcu -gcuinclude_HEADERS = $(libgcu_la_headers) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .cc .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gcu/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu gcu/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libgcu.la: $(libgcu_la_OBJECTS) $(libgcu_la_DEPENDENCIES) - $(libgcu_la_LINK) -rpath $(libdir) $(libgcu_la_OBJECTS) $(libgcu_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bond.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chem3ddoc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chemistry.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalatom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalcleavage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystaldoc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalline.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalview.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog-owner.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filechooser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gldocument.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glview.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkchem3dviewer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcomboperiodic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcrystalviewer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkperiodic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isotope.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix2d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-utils.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-gcuincludeHEADERS: $(gcuinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(gcuincludedir)" || $(MKDIR_P) "$(DESTDIR)$(gcuincludedir)" - @list='$(gcuinclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(gcuincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(gcuincludedir)/$$f'"; \ - $(gcuincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(gcuincludedir)/$$f"; \ - done - -uninstall-gcuincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(gcuinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(gcuincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(gcuincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gcuincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-gcuincludeHEADERS - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-gcuincludeHEADERS uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am \ - install-gcuincludeHEADERS install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-gcuincludeHEADERS \ - uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/gcu/matrix2d.cc gnome-chemistry-utils-0.10.9/gcu/matrix2d.cc --- gnome-chemistry-utils-0.8.6/gcu/matrix2d.cc 2007-04-06 18:28:29.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/matrix2d.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,80 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * matrix2d.cc - * - * Copyright (C) 2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "matrix2d.h" -#include - -using namespace gcu; - -Matrix2D::Matrix2D() -{ -} - -Matrix2D::~Matrix2D() -{ -} - -Matrix2D::Matrix2D(double Angle, bool Deg) -{ - if (Deg) Angle *= (M_PI / 180.); - x[0][0] = x[1][1] = cos(Angle); - x[0][1] = sin(Angle); - x[1][0] = - x[0][1]; -} - -Matrix2D::Matrix2D(double x11, double x12, double x21, double x22) -{ - x[0][0] = x11; - x[0][1] = x12; - x[1][0] = x21; - x[1][1] = x22; -} - -Matrix2D& Matrix2D::operator*(Matrix2D& cMat) -{ - static Matrix2D cMat0; - Matrix2D m( - x[0][0] * cMat.x[0][0] + x[0][1] * cMat.x[1][0], - x[0][0] * cMat.x[0][1] + x[0][1] * cMat.x[1][1], - x[1][0] * cMat.x[0][0] + x[1][1] * cMat.x[1][0], - x[1][0] * cMat.x[0][1] + x[1][1] * cMat.x[1][1] - ); - return cMat0 = m; -} - -Matrix2D& Matrix2D::operator=(Matrix2D& cMat) -{ - x[0][0] = cMat.x[0][0]; - x[0][1] = cMat.x[0][1]; - x[1][0] = cMat.x[1][0]; - x[1][1] = cMat.x[1][1]; - return *this; -} - -void Matrix2D::Transform(double &dx, double &dy) -{ - double x1 = dx * x[0][0] + dy * x[0][1]; - dy = dx * x[1][0] + dy * x[1][1]; - dx = x1; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/matrix2d.h gnome-chemistry-utils-0.10.9/gcu/matrix2d.h --- gnome-chemistry-utils-0.8.6/gcu/matrix2d.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/matrix2d.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,90 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * matrix2d.h - * - * Copyright (C) 2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_MATRIX2D_H -#define GCU_MATRIX2D_H - -namespace gcu -{ - -/*!\class Matrix2D gcu/matrix2d.h -This class provides some operations related to transformations in a plane. The matrices are 2x2. -*/ -class Matrix2D -{ -public: - -/*! -Default constructor. Members are not initialized. This constructor is rarely used. -*/ - Matrix2D(); -/*! -The destructor of Matrix. -*/ - virtual ~Matrix2D(); -/*! -@param Angle: rotation angle. -@param Deg: if true, Angle is expressed in degrees, otherwise in radians. -Default is true. - -Constructs a Matrix2D representing a rotation. -*/ - Matrix2D(double Angle, bool Deg = true); -/*! -@param x11: value to use at first line and first column of the matrix. -@param x12: value to use at first line and second column of the matrix. -@param x21: value to use at second line and first column of the matrix. -@param x22: value to use at second line and second column of the matrix. - -Constructs a matrix from its components. -*/ - Matrix2D(double x11, double x12, double x21, double x22); -/*! -@param cMat: a Matrix2D instance to use in the multiplication. - -The matricial multiplication operator. -*/ - Matrix2D& operator*(Matrix2D& cMat); -/*! -@param cMat: the Matrix2D instance to copy. - -Copies a Matrix instance into another one. -*/ - Matrix2D& operator=(Matrix2D& cMat); -/*! -@param dx: the x coordinate. -@param dy: the y coordinate. - -Initially, dx and dy are the components of the vector to transform (multiply) by the matrix and -after execution of this method, dx, dy and dz are the components of the transformed vector. So initial values are lost. -*/ - void Transform(double &dx, double &dy); - -private : - double x[2][2]; -}; - -} //namespace gcu - -#endif //GCRYSTAL_MATRIX2D_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/matrix.cc gnome-chemistry-utils-0.10.9/gcu/matrix.cc --- gnome-chemistry-utils-0.8.6/gcu/matrix.cc 2007-04-06 18:28:29.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/matrix.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,158 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * gcu/matrix.cc - * - * Copyright (C) 2000-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "matrix.h" -#include - -using namespace gcu; - -Matrix::Matrix() -{ -} - -Matrix::~Matrix() -{ -} - -Matrix::Matrix(double Psi, double Theta, double Phi, MatrixType Type) -{ - double sp = sin(Psi); - double cp = cos(Psi); - double st = sin(Theta); - double ct = cos(Theta); - double sf = sin(Phi); - double cf = cos(Phi); - switch(Type) - { - case euler : - x[0][0] = cf * cp - sf * sp * ct; - x[0][1] = - cp * sf - sp * cf * ct; - x[0][2] = st * sp; - x[1][0] = sp * cf + cp * sf * ct; - x[1][1] = cf * cp * ct - sf * sp; - x[1][2] = - st * cp; - x[2][0] = st * sf; - x[2][1] = st * cf; - x[2][2] = ct; - break; - case antieuler : - x[0][0] = cf * cp - sf * sp * ct; - x[0][1] = cf * sp + cp * sf * ct; - x[0][2] = st * sf; - x[1][0] = - sf * cp - cf * sp * ct; - x[1][1] = cf * cp * ct - sf * sp; - x[1][2] = st * cf; - x[2][0] = st * sp; - x[2][1] = - st * cp; - x[2][2] = ct; - break; - case rotation : - Matrix m1(Psi,Theta,Phi,euler); - Matrix m2(Psi,Theta,0,antieuler); - *this = m1 * m2; - break; - } -} - -Matrix::Matrix(double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33) -{ - x[0][0] = x11; - x[0][1] = x12; - x[0][2] = x13; - x[1][0] = x21; - x[1][1] = x22; - x[1][2] = x23; - x[2][0] = x31; - x[2][1] = x32; - x[2][2] = x33; -} - -Matrix& Matrix::operator*(Matrix& cMat) -{ - static Matrix cMat0; - Matrix m( - x[0][0] * cMat.x[0][0] + x[0][1] * cMat.x[1][0] + x[0][2] * cMat.x[2][0], - x[0][0] * cMat.x[0][1] + x[0][1] * cMat.x[1][1] + x[0][2] * cMat.x[2][1], - x[0][0] * cMat.x[0][2] + x[0][1] * cMat.x[1][2] + x[0][2] * cMat.x[2][2], - x[1][0] * cMat.x[0][0] + x[1][1] * cMat.x[1][0] + x[1][2] * cMat.x[2][0], - x[1][0] * cMat.x[0][1] + x[1][1] * cMat.x[1][1] + x[1][2] * cMat.x[2][1], - x[1][0] * cMat.x[0][2] + x[1][1] * cMat.x[1][2] + x[1][2] * cMat.x[2][2], - x[2][0] * cMat.x[0][0] + x[2][1] * cMat.x[1][0] + x[2][2] * cMat.x[2][0], - x[2][0] * cMat.x[0][1] + x[2][1] * cMat.x[1][1] + x[2][2] * cMat.x[2][1], - x[2][0] * cMat.x[0][2] + x[2][1] * cMat.x[1][2] + x[2][2] * cMat.x[2][2] - ); - return cMat0 = m; -} - -Matrix& Matrix::operator=(Matrix& cMat) -{ - x[0][0] = cMat.x[0][0]; - x[0][1] = cMat.x[0][1]; - x[0][2] = cMat.x[0][2]; - x[1][0] = cMat.x[1][0]; - x[1][1] = cMat.x[1][1]; - x[1][2] = cMat.x[1][2]; - x[2][0] = cMat.x[2][0]; - x[2][1] = cMat.x[2][1]; - x[2][2] = cMat.x[2][2]; - return *this; -} - -void Matrix::Euler(double& Psi, double& Theta, double& Phi) -{ - if (fabs(x[2][2]) > .999999999) - { - Theta = (x[2][2] > 0) ? 0 : 3.1415926535897931; - Psi = 0; - if (fabs(x[0][0]) > .999999999) - Phi = (x[0][0] > 0) ? 0 : 3.1415926535897931; - else Phi = (x[1][0] > 0) ? acos(x[0][0]) : - acos(x[0][0]); - } - else - { - Theta = acos(x[2][2]); - double st = sin(Theta); - double si = x[0][2] / st; - double co = - x[1][2] / st; - if (fabs(co) > .999999999) - Psi = (co > 0) ? 0 : 3.1415926535897931; - else - Psi = (si > 0) ? acos(co) : - acos(co); - si = x[2][0] / st; - co = x[2][1] / st; - if (fabs(co) > .999999999) - Phi = (co > 0) ? 0 : 3.1415926535897931; - else - Phi = (si > 0) ? acos(co) : - acos(co); - } -} - -void Matrix::Transform(double &dx, double &dy , double &dz) -{ - double x1 = dx * x[0][0] + dy * x[0][1] + dz * x[0][2]; - double y1 = dx * x[1][0] + dy * x[1][1] + dz * x[1][2]; - dz = dx * x[2][0] + dy * x[2][1] + dz * x[2][2]; - dx = x1; - dy = y1; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/matrix.h gnome-chemistry-utils-0.10.9/gcu/matrix.h --- gnome-chemistry-utils-0.8.6/gcu/matrix.h 2006-12-22 13:39:57.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/matrix.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,127 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * matrix.h - * - * Copyright (C) 2000-2004 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_MATRIX_H -#define GCU_MATRIX_H - -namespace gcu -{ - -/*!\enum MatrixType -This enumeration is used to determine the type a Matrix. -Possible values are: - - euler: matrix used to find absolute positions from the position inside the solid using Euler's angles. - - antieuler: the inverse of euler. - - rotation: matrix representing the rotation to apply to the solid. - . -This enumeration is used in one of the constructors (Matrix(Psi, Theta, Phi, Type)) of class Matrix. -*/ - -enum MatrixType {euler, antieuler, rotation}; - -/*!\class Matrix gcu/matrix.h -This class provides some operations related to rotation of a solid in space. The matrices are 3x3. -*/ -class Matrix -{ -public: - -/*! -Default constructor. Members are not initialized. This constructor is rarely used. -*/ - Matrix (); -/*! -The destructor of Matrix. -*/ - virtual ~Matrix (); -/*! -@param Psi: precession angle. -@param Theta: nutaton angle. -@param Phi: rotation angle. -@param Type: the type of the Matrix. - -Constructs a Matrix instance starting from three angles and the type. if Type is euler or antieuler, the angles are the -Euler's angles. If Type is rotation, the values have a somewhat different meaning: they are the angles describing -the rotation applied to a solid; the resulting matrix is then multiplied by the current "euler" matrix to give the new euler -matrix. -The code used in CrystalView::Rotate and in GtkChem3DViewer code is (when mouse has moved by x and y on the screen): -\code - gdouble z = sqrt(x*x + y*y); - Matrix Mat(0, (y > 0)? - acos(x/z) :acos(x/z), z * M_PI / 90., rotation); - m_Euler = Mat * m_Euler; -\endcode -The (M_PI / 90.) factor is arbitrary here. -*/ - Matrix (double Psi, double Theta, double Phi, MatrixType Type); -/*! -@param x11: value to use at first line and first column of the matrix. -@param x12: value to use at first line and second column of the matrix. -@param x13: value to use at first line and third column of the matrix. -@param x21: value to use at second line and first column of the matrix. -@param x22: value to use at second line and second column of the matrix. -@param x23: value to use at second line and third column of the matrix. -@param x31: value to use at third line and first column of the matrix. -@param x32: value to use at third line and second column of the matrix. -@param x33: value to use at third line and third column of the matrix. - -Constructs a matrix from its components. -*/ - Matrix (double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33); -/*! -@param cMat: a Matrix instance to use in the multiplication. - -The matricial multiplication operator. -*/ - Matrix& operator* (Matrix& cMat); -/*! -@param cMat: the Matrix instance to copy. - -Copies a Matrix instance into another one. -*/ - Matrix& operator= (Matrix& cMat); -/*! -@param Psi: precession angle. -@param Theta: nutaton angle. -@param Phi: rotation angle. - -Get the Euler's angles associated to a "euler" Matrix as defined in MatrixType. -*/ - void Euler (double& Psi, double& Theta, double& Phi); -/*! -@param dx: the x coordinate. -@param dy: the y coordinate. -@param dz: the z coordinate. - -Initially, dx, dy and dz are the components of the vector to transform (multiply) by the matrix and -after execution of this method, dx, dy and dz are the components of the transformed vector. So initial values are lost. -*/ - void Transform (double &dx, double &dy , double &dz); - -private: - double x[3][3]; -}; - -} //namespace gcu - -#endif //GCRYSTAL_MATRIX_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/object.cc gnome-chemistry-utils-0.10.9/gcu/object.cc --- gnome-chemistry-utils-0.8.6/gcu/object.cc 2007-12-19 18:16:49.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/object.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,585 +0,0 @@ -/* - * Gnome Chemistry Utils - * object.cc - * - * Copyright (C) 2002-2007 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "object.h" -#include "document.h" -#include -#include -#include -#include - -using namespace gcu; - -Object::Object(TypeId Id) -{ - m_Type = Id; - m_Id = NULL; - m_Parent = NULL; - m_Locked = 0; -} - -Object::~Object() -{ - if (m_Id) - { - if (m_Parent) m_Parent->m_Children.erase(m_Id); - g_free(m_Id); - } - map::iterator i; - while(!m_Children.empty()) - { - i = m_Children.begin(); - if (m_Parent) m_Parent->AddChild((*i).second); - else { - (*i).second->m_Parent = NULL; - delete (*i).second; - m_Children.erase ((*i).first); - } - } -} - - -void Object::SetId (gchar* Id) -{ - if (!Id) - return; - if (m_Id) { - if (!strcmp (Id, m_Id)) - return; - if (m_Parent) m_Parent->m_Children.erase (m_Id); - g_free(m_Id); - } - m_Id = g_strdup (Id); - if (m_Parent) { - Object *parent = m_Parent; - m_Parent = NULL; - parent->AddChild (this); - } -} - -Object* Object::GetMolecule() -{ - Object* object = this; - while (object && (object->m_Type != MoleculeType)) object = object->m_Parent; - return object; -} - -Object* Object::GetReaction() -{ - Object* object = this; - while (object && (object->m_Type != ReactionType)) object = object->m_Parent; - return object; -} - -Object* Object::GetGroup() -{ - if (!m_Parent || m_Parent->GetType () == DocumentType) return NULL; - Object* object = m_Parent; - while (object->m_Parent->GetType () != DocumentType) - object = object->m_Parent; - return object; -} - -Document* Object::GetDocument() -{ - Object* object = this; - while (object && (object->m_Type != DocumentType)) object = object->m_Parent; - return (Document*) object; -} - -Object* Object::GetParentOfType(TypeId Id) -{ - Object* object = this; - while (object && (object->m_Type != Id)) object = object->m_Parent; - return object; -} - -void Object::AddChild(Object* object) -{ - Document* pDoc = GetDocument(); - if (!pDoc) - { - cerr << "Cannot add an object outside a document" << endl; - } - if (object->m_Id == NULL) - { - int i = 1; - char szId[16]; - while (snprintf(szId, sizeof(szId), "o%d", i++), pDoc->GetDescendant(szId) != NULL); - object->m_Id = g_strdup(szId); - } - else - { - Object* o = pDoc->RealGetDescendant(object->m_Id); - if (o && ((pDoc != object->GetDocument()) || (object != o))) - { - gchar *buf = pDoc->GetNewId (object->m_Id); - if (object->m_Parent) { - object->m_Parent->m_Children.erase (object->m_Id); - object->m_Parent = NULL; - } - g_free(object->m_Id); - object->m_Id = g_strdup(buf); - delete [] buf; - } - } - if (object->m_Parent) - { - object->m_Parent->m_Children.erase(object->m_Id); - object->m_Parent = NULL; - } - object->m_Parent = this; - m_Children[object->m_Id] = object; -} - -void Object::SetParent(Object* Parent) -{ - if (Parent) Parent->AddChild(this); - else - { - if (m_Parent) m_Parent->m_Children.erase(m_Id); - m_Parent = NULL; - } -} - -Object* Object::GetChild(const gchar* Id) -{ - if (Id == NULL) return NULL; - Object* object = m_Children[Id]; - if (!object) m_Children.erase(Id); - return object; -} - -Object* Object::GetDescendant(const gchar* Id) -{ - if (Id == NULL) return NULL; - Document* pDoc = GetDocument(); - string sId = pDoc->GetTranslatedId (Id); - if (sId.size()) Id = sId.c_str(); - else pDoc->EraseTranslationId(Id); - return RealGetDescendant (Id); -} - -Object* Object::RealGetDescendant(const gchar* Id) -{ - Object* object = m_Children[Id]; - if (!object) - { - m_Children.erase (Id); - map::iterator i; - for (i = m_Children.begin (); i != m_Children.end (); i++) - if ((*i).second->HasChildren () && (object = (*i).second->RealGetDescendant (Id))) - break; - } - return object; -} - -Object* Object::GetFirstChild(map::iterator& i) -{ - i = m_Children.begin(); - if (i == m_Children.end()) return NULL; - return (*i).second; -} - -Object* Object::GetNextChild(map::iterator& i) -{ - i++; - if (i == m_Children.end()) return NULL; - return (*i).second; -} - -xmlNodePtr Object::Save (xmlDocPtr xml) -{ - xmlNodePtr node; - node = xmlNewDocNode (xml, NULL, (xmlChar*) GetTypeName (m_Type).c_str (), NULL); - if (!node) return NULL; - SaveId (node); - - if (!SaveChildren (xml, node)) - { - xmlFreeNode (node); - return NULL; - } - return node; -} - -void Object::SaveId(xmlNodePtr node) -{ - if (m_Id && *m_Id) xmlNewProp(node, (xmlChar*)"id", (xmlChar*)m_Id); -} - -bool Object::Load (xmlNodePtr node) -{ - xmlChar* tmp; - xmlNodePtr child; - Object* pObject; - - m_Locked++; - tmp = xmlGetProp (node, (xmlChar*) "id"); - if (tmp) { - SetId ((char*) tmp); - xmlFree (tmp); - } - child = node->children; - while (child) { - node = (strcmp ((const char*) child->name, "object"))? child: child->children; - pObject = CreateObject ((const char*) node->name, this); - if (pObject) { - if (!pObject->Load (node)) - delete pObject; - } else { - m_Locked--; - return false; - } - child = child->next; - } - m_Locked--; - return true; -} - -bool Object::SaveChildren(xmlDocPtr xml, xmlNodePtr node) -{ - map::iterator i; - xmlNodePtr child; - for (i = m_Children.begin(); i != m_Children.end(); i++) - { - if ((child = (*i).second->Save(xml))) xmlAddChild(node, child); - else return false; - } - return true; -} - -xmlNodePtr Object::GetNodeByProp(xmlNodePtr root, char* Property, char* Id) -{ - return GetNextNodeByProp(root->children, Property, Id); -} - -xmlNodePtr Object::GetNextNodeByProp(xmlNodePtr node, char* Property, char* Id) -{ - char *txt; - while (node) - { - txt = (char*)xmlGetProp(node, (xmlChar*)Property); - if (!strcmp(txt, Id)) break; - node = node ->next; - } - return node; -} - -xmlNodePtr Object::GetNodeByName(xmlNodePtr root, char* Name) -{ - return GetNextNodeByName(root->children, Name); -} - -xmlNodePtr Object::GetNextNodeByName(xmlNodePtr node, char* Name) -{ - while (node) - { - if (!strcmp((char*)node->name, Name)) break; - node = node ->next; - } - return node; -} - -void Object::Move(double x, double y, double z) -{ - map::iterator i; - for (i = m_Children.begin(); i != m_Children.end(); i++) (*i).second->Move(x, y, z); -} - -void Object::Transform2D(Matrix2D& m, double x, double y) -{ - map::iterator i; - for (i = m_Children.begin(); i != m_Children.end(); i++) (*i).second->Transform2D(m, x, y); -} - -bool Object::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) -{ - return (m_Parent)? m_Parent->BuildContextualMenu (UIManager, object, x, y): false; -} - -void Object::Add (GtkWidget* w) -{ - map::iterator i; - Object* p = GetFirstChild (i); - while (p) - { - p->Add (w); - p = GetNextChild (i); - } -} - -void Object::Print(GnomePrintContext *pc) -{ -} - -void Object::Update(GtkWidget* w) -{ - map::iterator i; - for (i = m_Children.begin(); i != m_Children.end(); i++) (*i).second->Update(w); -} - -void Object::SetSelected(GtkWidget* w, int state) -{ - map::iterator i; - for (i = m_Children.begin(); i != m_Children.end(); i++) (*i).second->SetSelected(w, state); -} - -Object* Object::GetAtomAt(double x, double y, double z) -{ - return NULL; -} - -bool Object::Build (list& Children) throw (invalid_argument) -{ - return false; -} - -double Object::GetYAlign () -{ - return 0.0; -} - -static TypeId NextType = OtherType; - -class TypeDesc -{ -public: - TypeDesc (); - - TypeId Id; - Object* (*Create) (); - set PossibleChildren; - set PossibleParents; - set RequiredChildren; - set RequiredParents; - string CreationLabel; -}; - -TypeDesc::TypeDesc () -{ - Id = NoType; - Create = NULL; -} - -static map Types; -static vector TypeNames; - -TypeId Object::AddType(string TypeName, Object*(*Create)(), TypeId id) -{ - TypeDesc& typedesc = Types[TypeName]; - typedesc.Create = Create; - if (id == OtherType) { - typedesc.Id = NextType; - NextType = TypeId ((unsigned) NextType + 1); - } else - typedesc.Id = id; - if (TypeNames.size() <= typedesc.Id) { - size_t max = (((size_t) typedesc.Id / 10) + 1) * 10; - TypeNames.resize (max); - } -#if HAS_VECTOR_AT - TypeNames.at (typedesc.Id) = TypeName; -#else - vector::iterator it; - it = TypeNames.begin (); - it += typedesc.Id; - it = TypeNames.insert (it, TypeName); - it++; - TypeNames.erase (it); -#endif - return typedesc.Id; -} - -Object* Object::CreateObject(const string& TypeName, Object* parent) -{ - TypeDesc& typedesc = Types[TypeName]; - Object* pObj = (typedesc.Create)? typedesc.Create(): NULL; - if (parent && pObj) { - if (pObj->m_Id) { - char* newId = parent->GetDocument()->GetNewId (pObj->m_Id, false); - pObj->SetId (newId); - delete [] newId; - } - parent->AddChild(pObj); - } - return pObj; -} - -TypeId Object::GetTypeId (const string& Name) -{ - TypeDesc& typedesc = Types[Name]; - TypeId res = typedesc.Id; - if (res == NoType) - Types.erase (Name); - return res; -} - -string Object::GetTypeName (TypeId Id) -{ - return TypeNames[Id]; -} - -void Object::AddRule (TypeId type1, RuleId rule, TypeId type2) -{ - AddRule (TypeNames[type1], rule, TypeNames[type2]); -} - -void Object::AddRule (const string& type1, RuleId rule, const string& type2) -{ - if (!type1.size() || !type2.size ()) - return; - TypeDesc& typedesc1 = Types[type1]; - if (typedesc1.Id == NoType) { - Types.erase (type1); - return; - } - TypeDesc& typedesc2 = Types[type2]; - if (typedesc2.Id == NoType) { - Types.erase (type2); - return; - } - switch (rule) { - case RuleMustContain: - typedesc1.RequiredChildren.insert (typedesc2.Id); - case RuleMayContain: - typedesc1.PossibleChildren.insert (typedesc2.Id); - typedesc2.PossibleParents.insert (typedesc1.Id); - break; - case RuleMustBeIn: - typedesc1.RequiredParents.insert (typedesc2.Id); - case RuleMayBeIn: - typedesc2.PossibleChildren.insert (typedesc1.Id); - typedesc1.PossibleParents.insert (typedesc2.Id); - break; - } -} - -const set& Object::GetRules (TypeId type, RuleId rule) -{ - return GetRules (TypeNames[type], rule); -} - -const set& Object::GetRules (const string& type, RuleId rule) -{ - static set noId; - TypeDesc& typedesc = Types[type]; - switch (rule) { - case RuleMustContain: - return typedesc.RequiredChildren; - case RuleMayContain: - return typedesc.PossibleChildren; - case RuleMustBeIn: - return typedesc.RequiredParents; - case RuleMayBeIn: - return typedesc.PossibleParents; - default: - return noId; - } - return noId; -} - -static void AddAncestorTypes (TypeId type, set& types) -{ - const set& new_types = Object::GetRules (type, RuleMayBeIn); - set::iterator i = new_types.begin (), end = new_types.end (); - for (; i != end; i++) { - types.insert (*i); - AddAncestorTypes (*i, types); - } -} - -void Object::GetPossibleAncestorTypes (set& types) -{ - AddAncestorTypes (m_Type, types); -} - -void Object::SetCreationLabel (TypeId Id, string Label) -{ - TypeDesc& type = Types[TypeNames[Id]]; - type.CreationLabel = Label; -} - -const string& Object::GetCreationLabel (TypeId Id) -{ - return Types[TypeNames[Id]].CreationLabel; -} - -const string& Object::GetCreationLabel (const string& TypeName) -{ - return Types[TypeName].CreationLabel; -} - -static SignalId NextSignal = 0; - -SignalId Object::CreateNewSignalId () -{ - return NextSignal++; -} - -void Object::EmitSignal (SignalId Signal) -{ - Object *obj = NULL; - Object *ancestor = this; - while (ancestor && !ancestor->IsLocked () && ancestor->OnSignal (Signal, obj)) { - obj = ancestor; - ancestor = obj->m_Parent; - } -} - -bool Object::OnSignal (SignalId Signal, Object *Child) -{ - return true; -} - -Object* Object::GetFirstLink (set::iterator& i) -{ - i = m_Links.begin(); - if (i == m_Links.end()) return NULL; - return *i; -} - -Object* Object::GetNextLink(set::iterator& i) -{ - i++; - if (i == m_Links.end()) return NULL; - return *i; -} - -void Object::Unlink (Object *object) -{ - m_Links.erase (object); - OnUnlink (object); -} - -void Object::OnUnlink (Object *object) -{ -} - -void Object::Lock (bool state) -{ - if (state) - m_Locked++; - else if (m_Locked > 0) - m_Locked--; -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/object.h gnome-chemistry-utils-0.10.9/gcu/object.h --- gnome-chemistry-utils-0.8.6/gcu/object.h 2007-04-06 11:23:23.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/object.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,609 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * object.h - * - * Copyright (C) 2002-2005 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_OBJECT_H -#define GCU_OBJECT_H - -#include "matrix2d.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define square(x) ((x)*(x)) - -using namespace std; - -namespace gcu -{ - -/*!\enum GcuTypeId -This enumeration is used to determine the type of an Object instance. -Possible values are: - - NoType: invalid type - - AtomType: an atom - - FragmentType: several atoms linked and represented by a text such as COOH (only in GChemPaint). - - BondType: a bond between two (or more) atoms. - - MoleculeType: a molecule. - - ChainType: a chain of atoms (only in GChemPaint) - - CycleType: a cycle (only in GChemPaint) - - ReactantType: a molecule involved in a reaction (only in GChemPaint). - - ReactionArrowType: a reaction arrow (only in GChemPaint). - - ReactionOperatorType: a + sign in a reaction (only in GChemPaint). - - ReactionType: a reaction. - - MesomeryType: a mesomery representation (only in GChemPaint). - - MesomeryArrowType: a double headed arrow used to represent mesomery (only in GChemPaint). - - DocumentType: a document, generally the top node in the objects tree. - - TextType: some text (only in GChemPaint). - - OtherType: if the type of an object is at least equal to OtherType, then it is a dynamically created type returned - by the static Object::AddType method. - . -Some types are not used in the Gnome Chemistry Utils, but only in GChemPaint -and might disappear from this list in future versions and replaced by dynamically created types. -*/ -enum GcuTypeId -{ - NoType, - AtomType, - FragmentType, - BondType, - MoleculeType, - ChainType, - CycleType, - ReactantType, - ReactionArrowType, - ReactionOperatorType, - ReactionType, - MesomeryType, - MesomeryArrowType, - DocumentType, - TextType, - OtherType -}; - -/*! -The type of an object instance. Either predefined types are defined in the enum above -or dynamically defined types by calls to Object::AddType. -*/ -typedef unsigned TypeId; - -/*!\enum RuleId -This enumeration is used to maintain a set of rules about the possible -hierarchical of the document. They are used with two class names or ids. -Possible values are: - - RuleMayContain: an instance of the first class may contain an instance of the second. -This implies that an instance of the second class may be in an instance of the first (see RuleMayBeIn); - - RuleMustContain: an instance of the first class may contain an instance of the second class (implies RuleMayContain); -if no instance of the first class is present, the object is not valid. - - RuleMayBeIn: an instance of the first class may be the child of an instance of the second class (see also RuleMayContain); - - RuleMustBeIn:an instance of the first class must be the child of an instance of the second class, otherwise -it is not valid. -*/ -enum RuleId -{ - RuleMayContain, - RuleMustContain, - RuleMayBeIn, - RuleMustBeIn -}; - -/*! -The types of the signals used in Object::EmitSignal() and Object::OnSignal(). Each signal -must type be retrieved from a call to Object::CreateNewSignalId(). -*/ -typedef unsigned SignalId; - -class Document; - -/*!\class Object gcu/object.h -This is the base class for most other objects in the gcu namespace. -*/ -class Object -{ -public: -/*! -Used to create an object of type Id. Shold only be called from the constructor of a derived class. -*/ - Object (TypeId Id = OtherType); -/*! -The standard destructor of Object instances. Automatically called when the object is destroyed. -*/ - virtual ~Object (); - -/*! -@return the type of the object. If the type is at least equal to OtherType, it is a dynamically created type returned by -the Object::AddType method. -*/ - TypeId GetType () {return m_Type;} -/*! - @param Id: the id of the Object instance. - - Every object must have an Id, since searches in the document tree uses it. -*/ - void SetId (gchar* Id); -/*! - @return the Id of the Object instance. -*/ - const gchar* GetId () {return m_Id;} -/*! - @param object*: the Object instance to add as a child. - - Each Object instance maintains a list of its children. If object has already a parent, it will be removed from its - parent children list. The new parent Object must have a Document ancestor to ensure that Ids are unique. -*/ - void AddChild (Object* object); -/*! - Used to get the Molecule in the Object instances ancestors. - - @return the first Object of type MoleculeType encountered when exploring - the Objects tree or NULL if none is found. -*/ - Object* GetMolecule (); -/*! - Used to get the Reaction in the Object instances ancestors. - - @return the first Object of type ReactionType encountered when exploring - the Objects tree or NULL if none is found. -*/ - Object* GetReaction (); -/*! - Used to get the highest ancestor just before the document - in the Object instances ancestors. - - @return the last Object of type ReactionType encountered before the document when exploring - the Objects tree or NULL if the object's parent is the document itself. -*/ - Object* GetGroup (); -/*! - Used to get the Document in the Object instances ancestors. - - @return the first Object of type DocumentType encountered when exploring - the Objects tree (only one should be found) or NULL if none is found. -*/ - Document* GetDocument (); -/*! -@param Id: the type of the ancestor searched. - - Used to get the first ancestor of type Id in the Object instances ancestors. - GetDocument, GetMolecule and GetReaction are special cases of this method. - - @return the first Object of type Id encountered when exploring - the Objects tree (only one should be found) or NULL if none is found. -*/ - Object* GetParentOfType (TypeId Id); -/*! -@param Id: the Id of the child searched. - -To search the Object in lower shells of the tree, use the Object::GetDescendant method. -@return the Object instance of type Id if found in the children list or NULL if not found. -*/ - Object* GetChild (const gchar* Id); -/*! -@param i: a C++ std::map iterator. - -Use this function to retrieve the first child of the object and initialize the iterator. -@return the first child of the object or NULL. -*/ - Object* GetFirstChild (map::iterator& i); -/*! -@param i: a C++ std::map iterator initialized by Object::GetFirstChild. - -Use this method to iterate through the list of the Object children. -@return the next child of the object or NULL. -*/ - Object* GetNextChild (map::iterator& i); -/*! -@param Id: the Id of the descendant searched. - -This method searches the Object in its children and if not found calls the GetDescendant method for its children. -@return the Object instance of type Id if found in the decendants or NULL if not found. -*/ - Object* GetDescendant (const gchar* Id); -/*! -@return the parent of the Object. -*/ - Object* GetParent () {return m_Parent;} -/*! -@param Parent: the new parent of the Object or NULL. - - When Parent is not NULL, this is equivalent to \code Parent->AddChild(this);\endcode - Otherwise, it removes the Object from the Document tree. -*/ - void SetParent (Object* Parent); -/*! - @param xml: the xmlDoc used to save the document. - - Used to save the Object to the xmlDoc. Each serializable Object should implement this virtual method. - @return the xmlNode containing the serialized object. The name of the node should be the name of the - corresponding type used as first parameter to the Object::AddType method. The - default method just saves the id and children. -*/ - virtual xmlNodePtr Save (xmlDocPtr xml); -/*! -@param node: a pointer to the xmlNode containing the serialized object. - -Used to load an Object in memory. The Object must already exist. - -Example: \code - std::string str = (const char*)node->name; - Object* pObject = Object::CreateObject(str, this); - if (pObject) { - if (!pObject->Load(node)) delete Object; - } else - cerr << "Warning: unknown object: " << str << endl; -\endcode - -@return true on succes, false otherwise. -*/ - virtual bool Load (xmlNodePtr node); -/*! -@param x: the x component of the transation vector. -@param y: the y component of the transation vector. -@param z: the z component of the transation vector. - -Used to move an object. This virtual method should most often be overrided by Object derived classes for which it makes sense. -The base Object class has no coordinates and the default method only loads its id and children. -*/ - virtual void Move (double x, double y, double z = 0.); -/*! -@param m: the 2D Matrix of the transformation. -@param x: the x component of the center of the transformation. -@param y: the y component of the center of the transformation. - -Used to move and/or transform an object. -This virtual method must be overrided by Object derived classes for which it makes sense. -The base Object class has no coordinates and the default method calls the corresponding method -for every child. -*/ - virtual void Transform2D (Matrix2D& m, double x, double y); -/*! -@param xml: the xmlDoc used to save the document. -@param node: the node representing the Object. - -This method calls Object::Save fo each child of the Object instance and add the xmlNode returned to the children of node. -It might be called from the Save method of objects having serializable children. -@return true on succes, false otherwise. -*/ - bool SaveChildren (xmlDocPtr xml, xmlNodePtr node); -/*! -@param node: the node representing the Object. - -This helper method saves the Id of the node as a property of the xmlNode. -*/ - void SaveId (xmlNodePtr node); -/*! -@param node: the node where the search is to be done. -@param Property: the name of the property used in the search. -@param Id: the value to match to the property. - -Helper method used in conjunction with Object::GetNextNodeByProp to search xmlNode instances having a property Property -whose value is Id in the children of node. - -@return the node corresponding to the first match. This value is to be passed to Object::GetNextNodeByProp to iterate in the list -*/ - xmlNodePtr GetNodeByProp (xmlNodePtr node, char* Property, char* Id); -/*! -@param node: the xmlNodePtr returned by Object::GetNodeByProp or the last call to Object::GetNextNodeByProp. -@param Property: the name of the property used in the search. -@param Id: the value to match to the property. - -Helper method used to iterate through a list of xmlNodePtr searching for a special value of a property. -Generally, the iteration is initialized by a call to Object::GetNodeByProp. -@return the next matching node. -*/ - xmlNodePtr GetNextNodeByProp (xmlNodePtr node, char* Property, char* Id); -/*! -@param node: the node where the search is to be done. -@param Name: the name of the xmlNode searched. - -Helper method used in conjunction with Object::GetNextNodeByProp to search xmlNode instances of name Name -in the children of node. - -@return the node corresponding to the first match. This value is to be passed to Object::GetNextNodeByName to iterate in the list. -*/ - xmlNodePtr GetNodeByName (xmlNodePtr node, char* Name); -/*! -@param node: the xmlNodePtr returned by Object::GetNodeByName or the last call to Object::GetNextNodeByName. -@param Name: the name of the xmlNode searched. - -Helper method used to iterate through a list of xmlNodePtr searching for nodes whose name is Name. -Generally, the iteration is initialized by a call to Object::GetNodeByName. -@return the next matching node. -*/ - xmlNodePtr GetNextNodeByName (xmlNodePtr node, char* Name); -/*! -@param w: the GtkWidget inside which the Object will be displayed. - -Used to add a representation of the Object in the widget. This method might be overrided for displayable Object classes -unless the application uses another mechanism. -*/ - virtual void Add (GtkWidget* w); -/*! -@param pc: the GnomePrintContext to which the document is printed. - -This method might be used to print a document from an application using the Gnome Chemistry Utils. -*/ - virtual void Print (GnomePrintContext *pc); -/*! -@param w: the GtkWidget inside which the Object is displayed. - -Used to update the representation of the Object in the widget. This method might be overrided for displayable Object classes -unless the application uses another mechanism. -*/ - virtual void Update (GtkWidget* w); -/*! -@param w: the GtkWidget inside which the Object is displayed. -@param state: the selection state of the Object. - -Used to set the selection state of the Object inside the widget. The values of state are application dependant and have no -default value. -*/ - virtual void SetSelected (GtkWidget* w, int state); -/*! -@return true if the Object has at least a child an false if it has none. -*/ - bool HasChildren () {return m_Children.size () != 0;} - -/*! -@return the children number of the Object. -*/ - unsigned GetChildrenNumber () {return m_Children.size ();} - -/*! -@param x: the x coordinate -@param y: the y coordinate -@param z: the z coordinate - -@return a pointer to a child of type Atomtype at or near position defined by the coordinates -passed as parameters. Default implementation returns NULL. -*/ - virtual Object* GetAtomAt (double x, double y, double z = 0.); - -/*! -@param Children: the list of objects used as children to build the object - -This method is called to build a parent object from its children. The object must already exist. -@return true in case of success and false if failed. -*/ - virtual bool Build (list& Children) throw (invalid_argument); - -/*! -Used to retreive the y coordinate for alignment. The default implementation returns 0.0 and -every derived class for which alignment has a meaning should implement this method. -@return y coordinate used for objects alignment. -*/ - virtual double GetYAlign (); - -/*! -@param UIManager: the GtkUI%anager to populate. -@param object: the Object on which occured the mouse click. -@param x: x coordinate of the mouse click. -@param y: y coordinate of the mouse click. - -This method is called to build a contextual menu for the object. It is called by Object::ShowContextualMenu, so -it should not be necessary to call it directly. It should be overrided by derived classes when a contextual menu -is needed. Typically, each class adds a submenu and calls the same method for its parent. -Default implementation just calls the parent's method. -@return true if something is added to the UIManager, false otherwise. -*/ - virtual bool BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y); - -/*! -@param Signal: the appropriate SignalId - -Sends a signal to the object parent. The signal may be propagated to the ancestors (see -Object::OnSignal ()). -*/ - void EmitSignal (SignalId Signal); - -/*! -@param Signal: the appropriate SignalId -@param Child: the child which emitted the signal or NULL - -This function is called by the framework when a signal has been emitted for the object. -It should not be called by a program; call Object::EmitSignal instead. - -@return true if the signal should be propagated to the parent, false otherwise. -*/ - virtual bool OnSignal (SignalId Signal, Object *Child); - -/*! -@param state: whether to block signals or not - -Blocks signals if State is true and unblocs if state is false. - -Since 0.4.2 -*/ - void Lock (bool state = true); - -/*! - -@return true if signals are locked, false otherwise - -Since 0.4.2 -*/ - bool IsLocked () {return m_Locked > 0;} - -/*! -@param i: a C++ std::set iterator. - -Use this function to retrieve the first object linked to the object and initialize the iterator. -Links can be used when the relation between the objects is not a parent to child one. -@return the first object linked to the object or NULL. -*/ - Object* GetFirstLink (set::iterator& i); - -/*! -@param i: a C++ std::set iterator initialized by Object::GetFirstLink. - -Use this method to iterate through the list of Object instances linked to the object. -@return the next object linked to the object or NULL. -*/ - Object* GetNextLink (set::iterator& i); - -/*! -@param object: the object to unlink. - -Unlinks object and calls Object::OnUnlink. -*/ - void Unlink (Object *object); - -/*! -@param object: the object just unlinked by Object::Unlink. - -Virtual method called when an object hs been unlinked. Programs should not call it -directly, but should call Object::OnUnlink instead. -*/ - virtual void OnUnlink (Object *object); - -/*! -@param types: the list of TypeId values to fill - -Fills types with all valid ancestor types for the object as defined by rules created with AddRule -*/ - void GetPossibleAncestorTypes (set& types); - -/*! -@param TypeName: the name of the new type. -@param CreateFunc: a pointer to a function returning a pointer to a new object of the new type. -@param id: the Id of the type to create if a standard one or OtherType for a new type. In this last case, this parameter -can be omitted. - -This method is used to register a new type derived from Object. -@return the Id of the new type. -*/ - static TypeId AddType (string TypeName, Object*(*CreateFunc)(), TypeId id = OtherType); - -/*! -@param TypeName: the name of the new type. -@param parent: the parent of the newly created object or NULL. if NULL, the parameter can be omitted. - -Used to create an object of type name TypeName. The Object::AddType method must have been called with the same -TypeName parameter. if parent is given and not NULL, the new Object will be a child of parent. -It will also be given a default Id. - -@return a pointer to the newly created Object or NULL if the Object could not be created. -*/ - static Object* CreateObject (const string& TypeName, Object* parent = NULL); - -/*! -@param Name: the name of the Object derived class - -@return the TypeId corresponding to Name -*/ - static TypeId GetTypeId (const string& Name); - -/*! -@param Id: the TypeId of the Object derived class - -@return the name of the type. -*/ - static string GetTypeName (TypeId Id); - -/*! -@param type1: the TypeId of the first class in the rule -@param rule: the new rule value -@param type2: the TypeId of the second class in the rule - -Adds a rule. -*/ - static void AddRule (TypeId type1, RuleId rule, TypeId type2); - -/*! -@param type1: the name of the first class in the rule -@param rule: the new rule value -@param type2: the name of the second class in the rule - -Adds a rule. -*/ - static void AddRule (const string& type1, RuleId rule, const string& type2); - -/*! -@param type: the TypeId of a class -@param rule: a RuleId value - -@return the set of rules correponding to the RuleId value for this class. -*/ - static const set& GetRules (TypeId type, RuleId rule); - -/*! -@param type: the name of a class -@param rule: a RuleId value - -@return the set of rules correponding to the RuleId value for this class. -*/ - static const set& GetRules (const string& type, RuleId rule); - -/*! -@param Id: the TypeId of a class -@param Label: the string to display in a contextual menu - -Used to give a label for contextual menus used when the creation of an instance of -the class seems possible. -*/ - static void SetCreationLabel (TypeId Id, string Label); - -/*! -@param Id: the TypeId of a class - -@return the string defined by SetCreationLabel. -*/ - static const string& GetCreationLabel (TypeId Id); - -/*! -@param TypeName: the name of a class - -@return the string defined by SetCreationLabel. -*/ - static const string& GetCreationLabel (const string& TypeName); - -/*! -@return a new SignalId. -*/ - static SignalId CreateNewSignalId (); - -private: - Object* RealGetDescendant (const gchar* Id); - -private: - gchar* m_Id; - TypeId m_Type; - Object *m_Parent; - map m_Children; //string is Id of object, so each object must have an Id - set m_Links; //objects linked to this but outside of the hierarchy - -private: -/*! -Set to true while loading to avoid signal propagation. -*/ - int m_Locked; -}; - -} -#endif //GCU_OBJECT_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/value.cc gnome-chemistry-utils-0.10.9/gcu/value.cc --- gnome-chemistry-utils-0.8.6/gcu/value.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/value.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,164 +0,0 @@ -/* - * Gnome Chemistry Utils - * value.cc - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "config.h" -#include "value.h" -#include -#include - -using namespace gcu; - -Value::Value () -{ -} - -Value::~Value () -{ -} - -char const *Value::GetAsString () const -{ - return ""; -} - -double Value::GetAsDouble () const -{ - return 0.; -} - -SimpleValue::SimpleValue (): Value () -{ -} - -SimpleValue::~SimpleValue () -{ -} - -char const *SimpleValue::GetAsString () const -{ - if (str.length () == 0) { - char *buf = gcu_value_get_string (&val); - const_cast (this)->str = buf; - g_free (buf); - } - return str.c_str (); -} - -double SimpleValue::GetAsDouble () const -{ - return val.value; -} - -DimensionalValue::DimensionalValue (): Value () -{ -} - -DimensionalValue::~DimensionalValue () -{ -} - -char const *DimensionalValue::GetAsString () const -{ - if (str.length () == 0) { - char *buf = gcu_dimensional_value_get_string (&val); - const_cast (this)->str = buf; // this does not change the value. - g_free (buf); - } - return str.c_str (); -} - -double DimensionalValue::GetAsDouble () const -{ - return val.value; -} - -StringValue::StringValue () -{ -} - -StringValue::~StringValue () -{ -} - -char const *StringValue::GetAsString () const -{ - return val.c_str (); -} - -LocalizedStringValue::LocalizedStringValue () -{ -} - -LocalizedStringValue::~LocalizedStringValue () -{ - vals.clear (); -} - -char const *LocalizedStringValue::GetAsString () const -{ - char *lang = getenv ("LANG"); - map ::const_iterator i, end = vals.end (); - if (lang) { - i = vals.find (lang); - if (i == end || (*i).second.length () == 0) { - lang = g_strdup (lang); - char *dot = strchr (lang, '.'); - if (dot) { - *dot = 0; - i = vals.find (lang); - if (i == end || (*i).second.length () > 0) { - g_free (lang); - return (*i).second.c_str (); - } - } - if (strlen (lang) > 2) { - lang[2] = 0; - i = vals.find (lang); - if (i == end || (*i).second.length () > 0) { - g_free (lang); - return (*i).second.c_str (); - } - } - g_free (lang); - } else - return (*i).second.c_str (); - } - // if we are there, try "C" or "en" locales - i = vals.find ("C"); - if (i != end && (*i).second.length () > 0) - return (*i).second.c_str (); - i = vals.find ("en"); - if (i != end && (*i).second.length () > 0) - return (*i).second.c_str (); - // if not found, return first occurence or a void string - if (vals.size () > 0) - return (*vals.begin ()).second.c_str (); - return ""; -} - -char const *LocalizedStringValue::GetLocalizedString (char const *lang) const -{ - string s; - if (lang) - s = const_cast (this)->vals[lang]; - return (s.length () > 0)? s.c_str (): GetAsString (); -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/value.h gnome-chemistry-utils-0.10.9/gcu/value.h --- gnome-chemistry-utils-0.8.6/gcu/value.h 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/gcu/value.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,192 +0,0 @@ -/* - * Gnome Chemistry Utils - * value.h - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#ifndef GCU_VALUE_H -#define GCU_VALUE_H - -#include "chemistry.h" -#include -#include - -using namespace std; - -namespace gcu -{ - -/*!\class Value gcu/value.h -Base class used for data storing. -*/ -class Value -{ -public: -/*! -Default constructor -*/ - Value (); -/*! -Default destructor -*/ - virtual ~Value (); - -/*! -@return the value representation as a string. -*/ - virtual char const *GetAsString () const; - -/*! -@return the value representation as a double or 0. if not a numeric value. -*/ - virtual double GetAsDouble () const; -}; - -/*!\class SimpleValue gcu/value.h -Used to store adimensional data. -*/ -class SimpleValue: public Value -{ -friend class Element; - -public: -/*! -Default constructor -*/ - SimpleValue (); -/*! -Default destructor -*/ - virtual ~SimpleValue (); - -/*! -@return the literal representation of the embedded adimensional data -*/ - char const *GetAsString () const; -/*! -@return the embedded value. -*/ - double GetAsDouble () const; -/*! -@return the embedded GcuValue structure. -*/ - GcuValue const GetValue () const {return val;} - -private: - GcuValue val; - string str; -}; -/*!\class DimensionalValue gcu/value.h -Used for data with a dimension e.g. a time interval expressed in days. -*/ - -class DimensionalValue: public Value -{ -friend class Element; - -public: -/*! -Default constructor -*/ - DimensionalValue (); -/*! -Default destructor -*/ - virtual ~DimensionalValue (); - -/*! -@return the literal representation of the embedded dimensional data -*/ - char const *GetAsString () const; -/*! -@return the embedded value. Note that the unit is lost. -*/ - double GetAsDouble () const; -/*! -@return the embedded GcuDimensionalValue structure. -*/ - GcuDimensionalValue const GetValue () {return val;} - -private: - GcuDimensionalValue val; - string str; -}; - -/*!\class StringValue gcu/value.h -Used to store literal data. -*/ -class StringValue: public Value -{ -friend class Element; - -public: -/*! -Default constructor -*/ - StringValue (); -/*! -Default destructor -*/ - virtual ~StringValue (); - -/*! -@return the embedded string. -*/ - char const *GetAsString () const; - -private: - string val; -}; - -/*!\class LocalizedStringValue gcu/value.h -Used to store translatable strings. -*/ -class LocalizedStringValue: public Value -{ -friend class Element; - -public: -/*! -Default constructor -*/ - LocalizedStringValue (); -/*! -Default destructor -*/ - virtual ~LocalizedStringValue (); - -/*! -@return the string translated to the current locale if known, otherwise, the untranslated -string. -*/ - char const *GetAsString () const; -/*! -@param lang a locale name. -@return the string translated to the requested locale if known, otherwise, the untranslated -string. -*/ - char const *GetLocalizedString (char const *lang) const; - -private: - map vals; -}; - -} // namespace gcu - -#endif // GCU_VALUE_H diff -Nru gnome-chemistry-utils-0.8.6/gcu/xml-utils.cc gnome-chemistry-utils-0.10.9/gcu/xml-utils.cc --- gnome-chemistry-utils-0.8.6/gcu/xml-utils.cc 2007-04-06 18:28:29.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/xml-utils.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,287 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * chemistry/xml-utils.cc - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -#include "xml-utils.h" -#include -#include -#include - -using namespace std; - -xmlNodePtr FindNodeByNameAndId (xmlNodePtr node, const char* name, const char* id) -{ - xmlNodePtr child = node->children; - char* tmp; - while (child) - { - if (!strcmp ((char*) child->name, name)) - { - tmp = (char*) xmlGetProp (child, (xmlChar*) "id"); - if ((!id && !tmp) || (id && tmp && !strcmp (tmp, id))) { - if (tmp) - xmlFree (tmp); - break; - } else if (tmp) - xmlFree (tmp); - } - child = child->next; - } - return child; -} - -bool ReadPosition (xmlNodePtr node, const char* id, double* x, double* y, double* z) -{ - xmlNodePtr child = FindNodeByNameAndId (node, "position", id); - if (!child) return false; - char* tmp; - tmp = (char*) xmlGetProp (child, (xmlChar*) "x"); - if (tmp) { - sscanf (tmp, "%lg", x); - xmlFree (tmp); - } else - return false; - tmp = (char*) xmlGetProp (child, (xmlChar*) "y"); - if (tmp) { - sscanf (tmp, "%lg", y); - xmlFree (tmp); - } else - return false; - if (z) - { - tmp = (char*) xmlGetProp (child, (xmlChar*) "z"); - if (tmp) { - sscanf (tmp, "%lg", z); - xmlFree (tmp); - } else - *z = 0.0; - } - return true; -} - -bool WritePosition (xmlDocPtr xml, xmlNodePtr node, const char* id, double x, double y, double z) -{ - xmlNodePtr child; - char buf[16]; - child = xmlNewDocNode (xml, NULL, (xmlChar*) "position", NULL); - if (child) - xmlAddChild (node, child); - else - return false; - if (id) - xmlNewProp (child, (xmlChar*) "id", (xmlChar*) id); - snprintf (buf, sizeof (buf), "%g", x); - xmlNewProp (child, (xmlChar*) "x", (xmlChar*) buf); - snprintf (buf, sizeof (buf), "%g", y); - xmlNewProp (child, (xmlChar*) "y", (xmlChar*) buf); - if (z != 0.0) { - snprintf (buf, sizeof (buf), "%g", z); - xmlNewProp (child, (xmlChar*) "z", (xmlChar*) buf); - } - return true; -} - -bool ReadColor (xmlNodePtr node, const char* id, float* red, float* green, float* blue, float* alpha) -{ - xmlNodePtr child = FindNodeByNameAndId (node, "color", id); - if (!child) return false; - char* tmp; - tmp = (char*) xmlGetProp (child, (xmlChar*) "red"); - if (tmp) { - sscanf (tmp, "%g", red); - xmlFree (tmp); - } else - return false; - tmp = (char*) xmlGetProp (child, (xmlChar*) "green"); - if (tmp) { - sscanf (tmp, "%g", green); - xmlFree (tmp); - } else - return false; - tmp = (char*) xmlGetProp (child, (xmlChar*) "blue"); - if (tmp) { - sscanf (tmp, "%g", blue); - xmlFree (tmp); - } else - return false; - if (alpha) - { - tmp = (char*) xmlGetProp (child, (xmlChar*) "alpha"); - if (tmp) { - sscanf (tmp, "%g", alpha); - xmlFree (tmp); - } else - *alpha = 1.0; - } - return true; -} - -bool WriteColor (xmlDocPtr xml, xmlNodePtr node, const char* id, double red, double green, double blue, double alpha) -{ - xmlNodePtr child; - char buf[16]; - child = xmlNewDocNode (xml, NULL, (xmlChar*) "color", NULL); - if (child) xmlAddChild (node, child); else return false; - if (id) xmlNewProp (child, (xmlChar*) "id", (xmlChar*) id); - snprintf (buf, sizeof (buf), "%g", red); - xmlNewProp (child, (xmlChar*) "red", (xmlChar*) buf); - snprintf (buf, sizeof (buf), "%g", green); - xmlNewProp (child, (xmlChar*) "green", (xmlChar*) buf); - snprintf (buf, sizeof (buf), "%g", blue); - xmlNewProp (child, (xmlChar*) "blue", (xmlChar*) buf); - if (alpha != 1.0) - { - snprintf (buf, sizeof (buf), "%g", alpha); - xmlNewProp (child, (xmlChar*) "alpha", (xmlChar*) buf); - } - return true; -} - -bool ReadRadius (xmlNodePtr node, GcuAtomicRadius& radius) -{ - char *tmp, *dot, *end; - tmp = (char*) xmlGetProp (node, (xmlChar*) "type"); - if (!tmp || - ((!((!strcmp (tmp, "unknown")) && (radius.type = GCU_RADIUS_UNKNOWN))) && - (!((!strcmp (tmp, "covalent")) && (radius.type = GCU_COVALENT))) && - (!((!strcmp (tmp, "vdW")) && (radius.type = GCU_VAN_DER_WAALS))) && - (!((!strcmp (tmp, "ionic")) && (radius.type = GCU_IONIC))) && - (!((!strcmp (tmp, "metallic")) && (radius.type = GCU_METALLIC))) && - (!((!strcmp (tmp, "atomic")) && (radius.type = GCU_ATOMIC))))) - radius.type = GCU_RADIUS_UNKNOWN; - if (tmp) - xmlFree (tmp); - tmp = (char*) xmlGetProp (node, (xmlChar*) "scale"); - if (tmp) { - radius.scale = GetStaticScale (tmp); - xmlFree (tmp); - } else - radius.scale = NULL; - tmp = (char*) xmlGetProp (node, (xmlChar*) "charge"); - if (tmp) { - radius.charge = strtol (tmp, NULL, 10); - xmlFree (tmp); - } else - radius.charge = 0; - tmp = (char*) xmlGetProp (node, (xmlChar*)"cn"); - if (tmp) { - radius.cn = strtol (tmp, NULL, 10); - xmlFree (tmp); - } else - radius.cn = -1; - tmp = (char*) xmlGetProp(node, (xmlChar*) "spin"); - if ((!tmp) || - ((!((!strcmp (tmp, "low")) && (radius.spin = GCU_LOW_SPIN))) && - (!((!strcmp (tmp, "high")) && (radius.spin = GCU_HIGH_SPIN))))) - radius.spin = GCU_N_A_SPIN; - if (tmp) - xmlFree(tmp); - if (((tmp = (char*) xmlGetProp (node, (xmlChar*) "value")) || - (tmp = (char*) xmlNodeGetContent (node))) && *tmp) { - radius.value.value = strtod (tmp, &end); - dot = strchr (tmp, '.'); - radius.value.prec = (dot)? end - dot - 1: 0; - radius.scale = "custom"; - xmlFree(tmp); - } else { - if (tmp) - xmlFree(tmp); - if (radius.scale && (!strcmp (radius.scale, "custom"))) - return false; - else if (!gcu_element_get_radius (&radius)) - return false; - } - if (radius.value.value <= 0.0) - return false; - return true; -} - -bool WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius& radius) -{ - xmlNodePtr child; - gchar buf[256], *tmp; - - child = xmlNewDocNode (xml, NULL, (xmlChar*) "radius", NULL); - if (child) - xmlAddChild (node, child); - else return false; - switch (radius.type) { - case GCU_RADIUS_UNKNOWN: - tmp = NULL; - break; - case GCU_ATOMIC: - tmp = (char*) "atomic"; - break; - case GCU_IONIC: - tmp = (char*) "ionic"; - break; - case GCU_METALLIC: - tmp = (char*) "metallic"; - break; - case GCU_COVALENT: - tmp = (char*) "covalent"; - break; - case GCU_VAN_DER_WAALS: - tmp = (char*) "vdW"; - break; - default: - tmp = NULL; - } - if (tmp) - xmlNewProp (child, (xmlChar*) "type", (xmlChar*) tmp); - if ((radius.type == GCU_RADIUS_UNKNOWN) || (radius.scale && (!strcmp (radius.scale, "custom")))) { - char *format = g_strdup_printf ("%%0.%df",radius.value.prec); - g_snprintf (buf, sizeof (buf) - 1, format, radius.value.value); - g_free (format); - xmlNewProp (child, (xmlChar*) "value", (xmlChar*) buf); - } - if (radius.scale && strcmp (radius.scale, "custom")) - xmlNewProp (child, (xmlChar*) "scale", (xmlChar*) radius.scale); - if (radius.charge) { - g_snprintf (buf, sizeof (buf) - 1, "%d", radius.charge); - xmlNewProp (child, (xmlChar*) "charge", (xmlChar*) buf); - } - if (radius.cn != -1) { - g_snprintf (buf, sizeof (buf) - 1, "%d", radius.cn); - xmlNewProp (child, (xmlChar*) "cn", (xmlChar*) buf); - } - if (radius.spin != GCU_N_A_SPIN) - xmlNewProp (child, (xmlChar*) "spin", (xmlChar*)((radius.spin == GCU_LOW_SPIN)? "low": "high")); - return true; -} - -// we must have static strings -static set ScaleNames; - -char const *GetStaticScale (char *buf) -{ - set ::iterator i = ScaleNames.find (buf); - if (i == ScaleNames.end ()) { - std::pair::iterator,bool> res = ScaleNames.insert (buf); - if (res.second) - return (*res.first).c_str (); - else - return NULL; - } - return (*i).c_str (); -} diff -Nru gnome-chemistry-utils-0.8.6/gcu/xml-utils.h gnome-chemistry-utils-0.10.9/gcu/xml-utils.h --- gnome-chemistry-utils-0.8.6/gcu/xml-utils.h 2006-09-02 17:12:02.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu/xml-utils.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,140 +0,0 @@ -// -*- C++ -*- - -/* - * Gnome Chemistry Utils - * xml-utils.h - * - * Copyright (C) 2002-2006 Jean Bréfort - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - - -#ifndef GCU_XML_UTILS_H -#define GCU_XML_UTILS_H - -#include -#include "chemistry.h" - -/*!\file -Some helper functions to load / save Object instances. -*/ - -/*!ReadPosition -@param node: a pointer to the current parsed XML Node. -@param name: the name of the searched node. -@param id: the id property of the node or NULL if not significant. This parameter might be omitted in the last case. - -Helper method used to search the xmlNode instance of name Name and with id property equal to id -in the children of node. When id is NULL, the searched node does not have an id property. -When id is not NULL, the searched node should be unique. - -@return the matching node or NULL. -*/ -xmlNodePtr FindNodeByNameAndId (xmlNodePtr node, const char* name, const char* id = NULL); - -/*! -@param node: a pointer to the xmlNode representing an Object instance. -@param id: the value of the id property of the position. This is used for example for arrows because both the head and the tail -of the arrow are positions. -@param x: a pointer to the x coordinate of the position. -@param y: a pointer to the y coordinate of the position. -@param z: a pointer to the z coordinate of the position or NULL for 2D objects. - -This method can be used to load the coordinates of a point in an Object instance. It should be used in cunjunction with WritePosition() which -executes the inverse operation. If id is NULL, a position with no id property will be search and parsed. - -@return true on success and false on failure. -*/ -bool ReadPosition (xmlNodePtr node, const char* id, double* x, double* y, double* z = NULL); -/*!WritePosition -@param xml: a pointer to the xmlDoc used to serialize the document. -@param node: a pointer to the xmlNode representing an Object instance. -@param id: the value of the id property of the position. This is used for example for arrows because both the head and the tail -of the arrow are positions. -@param x: the x coordinate of the position. -@param y: the y coordinate of the position. -@param z: the z coordinate of the position. - -Save a position as an XML node added to the children of node. This position can then be parsed using ReadPosition(). - -@return true on success and false on failure. -*/ -bool WritePosition (xmlDocPtr xml, xmlNodePtr node, const char* id, double x, double y, double z = 0.0); - -/*! -@param node: a pointer to the xmlNode representing an Object instance. -@param id: the value of the id property of the color. This is used for Object instances having at least two colors. -@param red: a pointer to the red component of the color. -@param green: a pointer to the green component of the color. -@param blue: a pointer to the blue component of the color. -@param alpha: a pointer to the alpha component of the color or NULL if tranparency is not managed. - -This method can be used to load a color in an Object instance. It should be used in cunjunction with WriteColor() which -executes the inverse operation. If id is NULL, a color with no id property will be search and parsed. - -@return true on success and false on failure. -*/ -bool ReadColor (xmlNodePtr node, const char* id, float* red, float* green, float* blue, float* alpha = NULL); -/*! -@param xml: a pointer to the xmlDoc used to serialize the document. -@param node: a pointer to the xmlNode representing an Object instance. -@param id: the value of the id property of the color. This is used for Object instances having at least two colors. -of the arrow are positions. -@param red: the red component of the color. -@param green: the green component of the color. -@param blue: the blue component of the color. -@param alpha: the alpha component of the color. - -Save a color as an XML node added to the children of node. This color can then be parsed using ReadColor(). - -@return true on success and false on failure. -*/ -bool WriteColor (xmlDocPtr xml, xmlNodePtr node, const char* id, double red, double green, double blue, double alpha = 1.0); - -/*! -@param node: a pointer to the xmlNode representing an Object instance. -@param radius: a GcuAtomicRadius structure. - -This function parses the XML node representing a radius (written using WriteRadius()) and fills the fields in the GcuAtomicRadius -structure with the data parsed. - -@return true on success and false on failure. -*/ -bool ReadRadius (xmlNodePtr node, GcuAtomicRadius& radius); - -/*! -@param xml: a pointer to the xmlDoc used to serialize the document. -@param node: a pointer to the xmlNode representing an Object instance. -@param radius: a GcuAtomicRadius structure. - -Save a radius as an XML node added to the children of node. This radius can then be parsed using ReadRadius(). - -@return true on success and false on failure. -*/ -bool WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius& radius); - -/*! -@param buf: a string to convert to a static instance. - -This function is used to replace a dynamically allocated string by a static instance. It -works managing a set of string instances. It is used for scale names (as for radii and -electronegativity), hence its name. - -@return a static version of buf or NULL if a new static string could not be created. -*/ -char const *GetStaticScale (char *buf); -#endif // GCU_XML_UTILS_H diff -Nru gnome-chemistry-utils-0.8.6/gcu.pc.in gnome-chemistry-utils-0.10.9/gcu.pc.in --- gnome-chemistry-utils-0.8.6/gcu.pc.in 2007-10-14 16:20:16.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/gcu.pc.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Gnome Chemistry Utils -Description: A collection of C++ classes and some Gtk+ widgets related to chemistry -Version: @VERSION@ -URL: http://www.nongnu.org/gchemutils/ -Requires: libgnomeui-2.0 libgnomeprintui-2.2 gtkglext-1.0 openbabel-2.0 libgoffice-0.4 -Libs: -L${libdir} -lgcu -Cflags: -I${includedir}/gcu diff -Nru gnome-chemistry-utils-0.8.6/glade/crystal/atoms.glade gnome-chemistry-utils-0.10.9/glade/crystal/atoms.glade --- gnome-chemistry-utils-0.8.6/glade/crystal/atoms.glade 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/crystal/atoms.glade 2009-11-14 11:30:40.000000000 +0100 @@ -1,519 +1,386 @@ - - - + + + - - - - True - Atoms - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 5 - True - False - 0 - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - - - - - True - Periodic table of the elements - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - False - 10 - - - - True - False - 0 - - - - True - Charge: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 5 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 -8 8 1 4 4 - - - 0 - True - True - - - - - 0 - False - False - - - - - - True - False - 0 - - - - 5 - True - True - Custom color: - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - False - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 0 - - - - True - False - 0 - - - - True - Type: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 5 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - Unknown + + True + Atoms + False + + + True + 5 + + + True + 0 + + + + + + True + Periodic table of the elements + + + label_item + + + + + + + True + + + True + 10 + + + True + + + True + 5 + Charge: + + + False + False + + + + + True + True + 0 -8 8 1 4 0 + 1 + + + 1 + + + + + False + False + + + + + True + + + True + True + 5 + Custom color: + True + 0 + True + + + False + False + + + + + True + True + 0 + + + False + False + 1 + + + + + False + False + 1 + + + + + True + 0 + + + True + + + True + + + True + 5 + Type: + + + False + False + + + + + True + Unknown Ionic Metallic Covalent Van der Waals - False - True - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - Custom - False - True - - - 0 - False - False - - - - - - True - False - 0 - - - - True - value (pm): - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 5 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 100 - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - 0 - True - True - - - - - - - - True - Radius - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - 0 - True - True - - - - - - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - 306 - 200 - True - True - True - False - False - True - False - False - False - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_START - 0 - - - - True - True - True - _Add - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - _Delete - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - Dele_te all - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_END - 0 - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-apply - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-help - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - False - - - - - - + + + 1 + + + + + + + True + Custom + + + False + False + 1 + + + + + True + + + True + 5 + Value (pm): + + + False + False + + + + + 100 + True + True + * + + + 1 + + + + + 2 + + + + + True + + + True + 5 + Scale factor: + True + + + False + + + + + True + True + 100 1 100 1 10 0 + + + 1 + + + + + 3 + + + + + True + 0 + 5 + 5 + Apply changes to: + + + 4 + + + + + True + Selected element +Selected atom +All atoms + + + 5 + + + + + + + True + Radius + + + label_item + + + + + False + 2 + + + + + + + True + True + + + 306 + 200 + True + True + + + + + 1 + + + + + True + GTK_BUTTONBOX_START + + + True + True + True + _Add + True + 0 + + + + + True + True + True + _Delete + True + 0 + + + 1 + + + + + True + True + True + Dele_te all + True + 0 + + + 2 + + + + + False + False + 2 + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-ok + True + 0 + + + + + True + True + True + gtk-apply + True + 0 + + + 1 + + + + + True + True + True + gtk-cancel + True + 0 + + + 2 + + + + + True + True + True + gtk-help + True + 0 + + + 3 + + + + + False + False + 2 + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/crystal/bonds.glade gnome-chemistry-utils-0.10.9/glade/crystal/bonds.glade --- gnome-chemistry-utils-0.8.6/glade/crystal/bonds.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/crystal/bonds.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,104 @@ + + + + + + + True + Bonds + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + 0 + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + + True + True + True + gtk-apply + True + GTK_RELIEF_NORMAL + True + + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + + + 0 + True + True + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/crystal/docprop.glade gnome-chemistry-utils-0.10.9/glade/crystal/docprop.glade --- gnome-chemistry-utils-0.8.6/glade/crystal/docprop.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/crystal/docprop.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,304 @@ + + + + + + True + Document properties + GDK_WINDOW_TYPE_HINT_DIALOG + + + True + + + True + 12 + 9 + 2 + 12 + + + True + 0 + <b>_Comments:</b> + True + True + comments + + + 2 + 7 + 8 + GTK_FILL + + 6 + + + + + True + 24 + + + True + True + GTK_SHADOW_IN + + + True + True + + + + + + + 2 + 8 + 9 + GTK_FILL + + + + + True + 24 + + + True + 0 + Revision date: + + + + + 6 + 7 + GTK_FILL + + 3 + + + + + True + 24 + + + True + 0 + Creation date: + + + + + 5 + 6 + GTK_FILL + + 3 + + + + + True + 24 + + + True + 0.0099999997764825821 + _Title: + True + title + + + + + GTK_FILL + + + + + + True + 24 + + + True + 0 + _Name: + True + name + + + + + 2 + 3 + GTK_FILL + + + + + + True + 24 + + + True + 0 + E-_mail: + True + mail + + + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + <b>History</b> + True + + + 2 + 4 + 5 + GTK_FILL + + 6 + + + + + True + 0 + <b>Author:</b> + True + + + 2 + 1 + 2 + GTK_FILL + + 6 + + + + + True + True + * + + + 1 + 2 + 3 + 4 + + + + + + True + True + * + + + 1 + 2 + 2 + 3 + + + + + + True + 0 + + + 1 + 2 + 6 + 7 + GTK_FILL + + + + + + True + 0 + + + 1 + 2 + 5 + 6 + GTK_FILL + + + + + + True + True + * + + + 1 + 2 + + + + + + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-help + True + -11 + + + + + True + True + True + gtk-close + True + -7 + + + 1 + + + + + False + GTK_PACK_END + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/crystal/Makefile.am gnome-chemistry-utils-0.10.9/glade/crystal/Makefile.am --- gnome-chemistry-utils-0.8.6/glade/crystal/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/crystal/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -1,13 +1,13 @@ -EXTRA_DIST = $(glade_DATA) - MAINTAINERCLEANFILES = Makefile.in -gladedir = $(datadir)/gchemutils/glade/crystal -glade_DATA = \ - atoms.glade \ - cell.glade \ - cleavages.glade \ - lines.glade \ - prefs.glade \ - size.glade \ +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/crystal +dist_glade_DATA = \ + atoms.glade \ + bonds.glade \ + cell.glade \ + cleavages.glade \ + docprop.glade \ + lines.glade \ + prefs.glade \ + size.glade \ view-settings.glade diff -Nru gnome-chemistry-utils-0.8.6/glade/crystal/Makefile.in gnome-chemistry-utils-0.10.9/glade/crystal/Makefile.in --- gnome-chemistry-utils-0.8.6/glade/crystal/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/crystal/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,7 +35,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = glade/crystal -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(dist_glade_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -42,6 +45,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -49,16 +53,29 @@ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(gladedir)" -gladeDATA_INSTALL = $(INSTALL_DATA) -DATA = $(glade_DATA) +DATA = $(dist_glade_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -78,26 +95,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -107,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -148,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -167,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -178,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -216,32 +256,42 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -EXTRA_DIST = $(glade_DATA) +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ MAINTAINERCLEANFILES = Makefile.in -gladedir = $(datadir)/gchemutils/glade/crystal -glade_DATA = \ - atoms.glade \ - cell.glade \ - cleavages.glade \ - lines.glade \ - prefs.glade \ - size.glade \ +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/crystal +dist_glade_DATA = \ + atoms.glade \ + bonds.glade \ + cell.glade \ + cleavages.glade \ + docprop.glade \ + lines.glade \ + prefs.glade \ + size.glade \ view-settings.glade all: all-am @@ -251,14 +301,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/crystal/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu glade/crystal/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/crystal/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu glade/crystal/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -276,29 +326,33 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -install-gladeDATA: $(glade_DATA) +install-dist_gladeDATA: $(dist_glade_DATA) @$(NORMAL_INSTALL) test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" - @list='$(glade_DATA)'; for p in $$list; do \ + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ - $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ done -uninstall-gladeDATA: +uninstall-dist_gladeDATA: @$(NORMAL_UNINSTALL) - @list='$(glade_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ - rm -f "$(DESTDIR)$(gladedir)/$$f"; \ - done + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files tags: TAGS TAGS: @@ -322,13 +376,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -359,6 +417,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -378,26 +437,38 @@ html: html-am +html-am: + info: info-am info-am: -install-data-am: install-gladeDATA +install-data-am: install-dist_gladeDATA install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -416,21 +487,22 @@ ps-am: -uninstall-am: uninstall-gladeDATA +uninstall-am: uninstall-dist_gladeDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-gladeDATA install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-gladeDATA + install-data install-data-am install-dist_gladeDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-dist_gladeDATA + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnome-chemistry-utils-0.8.6/glade/crystal/prefs.glade gnome-chemistry-utils-0.10.9/glade/crystal/prefs.glade --- gnome-chemistry-utils-0.8.6/glade/crystal/prefs.glade 2007-05-07 13:59:19.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/glade/crystal/prefs.glade 2009-11-14 11:30:40.000000000 +0100 @@ -1,6 +1,6 @@ - + + + - - True - Crystal size - False - - - True - - - True - Give minimum and maximum coordinates in cell units - GTK_JUSTIFY_CENTER - - - False - False - - - - - True - 4 - 3 - - - - - - True - True - - - 2 - 3 - 2 - 3 - - - - - - - True - True - - - 2 - 3 - 3 - 4 - - - - - - - True - True - - - 2 - 3 - 1 - 2 - - - - - - - True - True - - - 1 - 2 - 3 - 4 - - - - - - - True - True - - - 1 - 2 - 2 - 3 - - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - - True - 0 - z - GTK_JUSTIFY_CENTER - - - 3 - 4 - GTK_FILL - - 4 - - - - - True - 0 - x - GTK_JUSTIFY_CENTER - - - 1 - 2 - GTK_FILL - - 4 - - - - - True - 0 - y - GTK_JUSTIFY_CENTER - - - 2 - 3 - GTK_FILL - - 5 - - - - - True - 0 - Maximum - GTK_JUSTIFY_CENTER - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Minimum - GTK_JUSTIFY_CENTER - - - 1 - 2 - GTK_FILL - - - - - - 1 - - - - - True - - - 3 - - - - - True - GTK_BUTTONBOX_END - - - True - True - True - gtk-ok - True - - - - - True - True - True - gtk-apply - True - - - 1 - - - - - True - True - True - gtk-cancel - True - - - 2 - - - - - True - True - True - gtk-help - True - - - 3 - - - - - False - GTK_PACK_END - 2 - - - - - + + + True + Crystal size + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + False + + + + True + False + 0 + + + + True + Give minimum and maximum coordinates in cell units + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + 4 + 3 + False + 0 + 0 + + + + True + Minimum + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + Maximum + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + y + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + 5 + fill + + + + + + + True + x + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + 4 + fill + + + + + + + True + z + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 3 + 4 + 4 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 1 + 2 + + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 2 + 3 + + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 3 + 4 + + + + + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 3 + 1 + 2 + + + + + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 3 + 3 + 4 + + + + + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 3 + 2 + 3 + + + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_END + 0 + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-apply + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + + + 0 + True + True + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/crystal/view-settings.glade gnome-chemistry-utils-0.10.9/glade/crystal/view-settings.glade --- gnome-chemistry-utils-0.8.6/glade/crystal/view-settings.glade 2007-05-07 13:59:19.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/glade/crystal/view-settings.glade 2009-11-14 11:30:40.000000000 +0100 @@ -1,6 +1,6 @@ - - - + + + - - - 320 - True - Chemical calculator - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - True - True - True - True - 0 - - True - * - False - - - 0 - False - False - - - - - - 30 - True - Formula: - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 5 - 4 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 30 - True - Raw formula: - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 5 - 4 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Molecular weight: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 5 - 4 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - True - True - True - GTK_POS_BOTTOM - False - False - - - - 277 - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - False - True - False - False - False - - - - - False - True - - - - - - True - Composition - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - Monoisotopic mass: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 5 - 4 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - gtk-copy - True - GTK_RELIEF_NORMAL - True - - - 0 - False - False - - - - - 0 - False - False - - - - - False - True - - - - - - True - Isotopic Pattern - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - 0 - True - True - - - - - - + + 320 + True + Chemical calculator + False + + + True + + + True + True + * + + + False + False + + + + + 30 + True + 0 + 5 + 4 + Formula: + True + + + False + False + 1 + + + + + 30 + True + 0 + 5 + 4 + Raw formula: + True + + + False + False + 2 + + + + + True + + + True + 5 + 4 + Molecular weight: + + + False + False + + + + + True + + + False + False + 1 + + + + + 3 + + + + + True + True + GTK_POS_BOTTOM + + + 277 + True + True + GTK_SHADOW_IN + + + True + True + + + + + + + True + Composition + + + tab + False + + + + + True + + + True + + + True + 5 + 4 + Monoisotopic mass: + + + False + False + + + + + True + 0.47999998927116394 + + + False + False + 1 + + + + + True + + + 2 + + + + + + + + False + False + + + + + + + + 1 + + + + + True + Isotopic Pattern + + + tab + 1 + False + + + + + 4 + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/image-resolution.glade gnome-chemistry-utils-0.10.9/glade/image-resolution.glade --- gnome-chemistry-utils-0.8.6/glade/image-resolution.glade 2006-11-08 13:29:36.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/image-resolution.glade 2009-11-14 11:30:40.000000000 +0100 @@ -1,23 +1,24 @@ - + True - 1 3 12 6 - + True - 0 + True + 72 16 4800 1 10 0 + True - 2 - 3 + 1 + 2 @@ -34,15 +35,13 @@ - + True - True - 72 16 4800 1 10 10 - True + 0 - 1 - 2 + 2 + 3 diff -Nru gnome-chemistry-utils-0.8.6/glade/image-size.glade gnome-chemistry-utils-0.10.9/glade/image-size.glade --- gnome-chemistry-utils-0.8.6/glade/image-size.glade 2006-11-30 16:50:11.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/image-size.glade 2009-11-14 11:30:40.000000000 +0100 @@ -1,59 +1,58 @@ - + True - 1 4 12 - + True - True - 0 0 10000 1 10 10 + 1 + Width: - 3 - 4 + GTK_FILL - + True - True - 0 0 10000 1 10 10 + 1 + 3 + Height: - 1 - 2 + 2 + 3 - + True - 1 - 3 - Height: + True + 0 0 10000 1 10 0 - 2 - 3 + 1 + 2 - + True - 1 - Width: + True + 0 0 10000 1 10 0 - GTK_FILL + 3 + 4 diff -Nru gnome-chemistry-utils-0.8.6/glade/Makefile.am gnome-chemistry-utils-0.10.9/glade/Makefile.am --- gnome-chemistry-utils-0.8.6/glade/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -1,12 +1,11 @@ -SUBDIRS = crystal table - -EXTRA_DIST = $(glade_DATA) +SUBDIRS = crystal paint table MAINTAINERCLEANFILES = Makefile.in -gladedir = $(datadir)/gchemutils/glade -glade_DATA = \ +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade +dist_glade_DATA = \ gtkperiodic.glade \ gchemcalc.glade \ image-resolution.glade \ - image-size.glade + image-size.glade \ + print-setup.glade diff -Nru gnome-chemistry-utils-0.8.6/glade/Makefile.in gnome-chemistry-utils-0.10.9/glade/Makefile.in --- gnome-chemistry-utils-0.8.6/glade/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,7 +35,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = glade -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(dist_glade_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -42,6 +45,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -56,21 +60,62 @@ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(gladedir)" -gladeDATA_INSTALL = $(INSTALL_DATA) -DATA = $(glade_DATA) +DATA = $(dist_glade_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -90,26 +135,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -119,35 +167,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -160,14 +194,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -179,6 +220,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -190,31 +233,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -228,31 +296,40 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -SUBDIRS = crystal table -EXTRA_DIST = $(glade_DATA) +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = crystal paint table MAINTAINERCLEANFILES = Makefile.in -gladedir = $(datadir)/gchemutils/glade -glade_DATA = \ +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade +dist_glade_DATA = \ gtkperiodic.glade \ gchemcalc.glade \ image-resolution.glade \ - image-size.glade + image-size.glade \ + print-setup.glade all: all-recursive @@ -261,14 +338,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu glade/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu glade/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -286,29 +363,33 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -install-gladeDATA: $(glade_DATA) +install-dist_gladeDATA: $(dist_glade_DATA) @$(NORMAL_INSTALL) test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" - @list='$(glade_DATA)'; for p in $$list; do \ + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ - $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ done -uninstall-gladeDATA: +uninstall-dist_gladeDATA: @$(NORMAL_UNINSTALL) - @list='$(glade_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ - rm -f "$(DESTDIR)$(gladedir)/$$f"; \ - done + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -334,7 +415,7 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -368,16 +449,16 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -385,14 +466,14 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -404,39 +485,43 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -457,29 +542,44 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -512,6 +612,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -531,26 +632,38 @@ html: html-recursive +html-am: + info: info-recursive info-am: -install-data-am: install-gladeDATA +install-data-am: install-dist_gladeDATA install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -569,24 +682,26 @@ ps-am: -uninstall-am: uninstall-gladeDATA +uninstall-am: uninstall-dist_gladeDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-gladeDATA install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-gladeDATA + install-data-am install-dist_gladeDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-dist_gladeDATA + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/arrow-object.glade gnome-chemistry-utils-0.10.9/glade/paint/arrow-object.glade --- gnome-chemistry-utils-0.8.6/glade/paint/arrow-object.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/arrow-object.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,106 @@ + + + + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Arrow associated object + False + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + _Role: + True + + + False + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + + GTK_PACK_END + 1 + + + + + False + False + + + + + + + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-help + True + 0 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-close + True + 0 + + + 1 + + + + + False + GTK_PACK_END + + + + + + Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/glade/paint/arrow.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/glade/paint/arrow.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/docprop.glade gnome-chemistry-utils-0.10.9/glade/paint/docprop.glade --- gnome-chemistry-utils-0.8.6/glade/paint/docprop.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/docprop.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,633 @@ + + + + + + + + True + Document properties + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + -11 + + + + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + -7 + + + + + 0 + False + True + GTK_PACK_END + + + + + + 12 + True + 11 + 2 + False + 0 + 12 + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 0 + 1 + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 5 + 6 + fill + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 6 + 7 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 2 + 3 + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 3 + 4 + + + + + + + True + <b>Author:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 2 + 1 + 2 + 6 + fill + + + + + + + True + <b>History</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 2 + 4 + 5 + 6 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 24 + 0 + + + + True + E-_mail: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + mail + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 24 + 0 + + + + True + _Name: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + name + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 24 + 0 + + + + True + _Title: + True + False + GTK_JUSTIFY_LEFT + False + False + 0.00999999977648 + 0.5 + 0 + 0 + title + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 24 + 0 + + + + True + Creation date: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + 1 + 5 + 6 + 3 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 24 + 0 + + + + True + Revision date: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + 1 + 6 + 7 + 3 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 24 + 0 + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + 0 + 2 + 10 + 11 + fill + + + + + + True + <b>_Comments:</b> + True + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + comments + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 2 + 9 + 10 + 6 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 24 + 0 + + + + True + Theme: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + 1 + 8 + 9 + fill + + + + + + True + <b>Theme</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 2 + 7 + 8 + 6 + fill + + + + + + 0 + True + True + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/H-pos.glade gnome-chemistry-utils-0.10.9/glade/paint/H-pos.glade --- gnome-chemistry-utils-0.8.6/glade/paint/H-pos.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/H-pos.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,81 @@ + + + + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Hydrogen atoms position + False + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Left +Right +Top +Bottom +Auto + + + 6 + + + + + 6 + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_BUTTONBOX_EDGE + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-help + True + 0 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-close + True + 0 + + + 1 + + + + + False + GTK_PACK_END + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/Makefile.am gnome-chemistry-utils-0.10.9/glade/paint/Makefile.am --- gnome-chemistry-utils-0.8.6/glade/paint/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,13 @@ +MAINTAINERCLEANFILES = Makefile.in + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint +dist_glade_DATA = \ + arrow.png \ + arrow-object.glade \ + docprop.glade \ + H-pos.glade \ + newfiledlg.glade \ + preferences.glade \ + stringdlg.glade \ + tools.glade \ + zoom.glade diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/Makefile.in gnome-chemistry-utils-0.10.9/glade/paint/Makefile.in --- gnome-chemistry-utils-0.8.6/glade/paint/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -0,0 +1,509 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = glade/paint +DIST_COMMON = $(dist_glade_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(gladedir)" +DATA = $(dist_glade_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint +dist_glade_DATA = \ + arrow.png \ + arrow-object.glade \ + docprop.glade \ + H-pos.glade \ + newfiledlg.glade \ + preferences.glade \ + stringdlg.glade \ + tools.glade \ + zoom.glade + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/paint/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu glade/paint/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_gladeDATA: $(dist_glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-dist_gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_gladeDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_gladeDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dist_gladeDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-dist_gladeDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/newfiledlg.glade gnome-chemistry-utils-0.10.9/glade/paint/newfiledlg.glade --- gnome-chemistry-utils-0.8.6/glade/paint/newfiledlg.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/newfiledlg.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,86 @@ + + + + + + 5 + New file with theme + False + 342 + 97 + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK + 2 + + + True + 6 + 12 + + + True + 12 + + + True + 0 + Theme: + + + False + + + + + + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK + + + True + gtk-help + True + + + + + True + gtk-cancel + True + + + 1 + + + + + True + gtk-apply + True + + + 2 + + + + + False + GTK_PACK_END + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/preferences.glade gnome-chemistry-utils-0.10.9/glade/paint/preferences.glade --- gnome-chemistry-utils-0.8.6/glade/paint/preferences.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/preferences.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,1392 @@ + + + + + + True + GChemPaint Preferences + GDK_WINDOW_TYPE_HINT_DIALOG + + + True + + + True + 6 + 0 + 0 + + + True + 6 + + + True + 3 + 3 + 24 + 8 + + + + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + _Default theme: + True + + + 2 + 3 + GTK_FILL + + + + + True + True + Ha_ve a tearable table of the elements + True + 0 + True + + + 2 + 1 + 2 + GTK_FILL + + + + + + True + True + 0 0 9 1 5 0 + 1 + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + 0 + 1 + Default Compression _Level For GChemPaint Files: + True + compression + True + + + 2 + GTK_FILL + + + + + + False + 8 + + + + + True + + + False + 1 + + + + + True + 0 + 0 + <b>Themes</b> + True + + + False + False + 2 + + + + + True + + + True + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + True + True + + + + + + + True + True + gtk-new + True + 0 + + + False + False + 1 + + + + + False + False + + + + + True + False + False + + + True + 0 + 0 + + + + + True + 0 + 0 + + + tab + False + + + + + True + 0 + 1 + 12 + + + True + 6 + 3 + 12 + 6 + + + + + + + + + + + + + + + True + 0 + 0 + + + 1 + 2 + 1 + 2 + + + + + + True + True + Scale used to convert real distance to canvas distance expressed in pm per pixel. + 1 1 20 1 10 0 + 1 + 2 + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + True + True + + + 1 + 3 + + + + + + True + True + Padding used around text objects such as atoms, texts and other typographic signs in pixels. + 1 0 50 1 10 0 + 1 + 2 + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + True + Default padding in pixels added between consecutive objects during an alignment operation. + 1 0 500 1 10 0 + 1 + 2 + + + 2 + 3 + 3 + 4 + GTK_FILL + + + + + + True + True + Extra padding between a stoichiometric coefficient and its associated molecule in pixels. + 1 0 20 1 10 0 + 1 + 2 + + + 2 + 3 + 4 + 5 + GTK_FILL + + + + + + True + True + Padding between a '+' sign in a reaction equation and reactants symbols in pixels. + 1 0 50 1 10 0 + 1 + 2 + + + 2 + 3 + 5 + 6 + GTK_FILL + + + + + + True + 0 + 0 + N_ame: + True + + + GTK_FILL + + + + + + True + 0 + 0 + _Scale: + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + 0 + General _padding: + True + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + 0 + _Object padding: + True + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + 0 + Stoichio_metry padding: + True + + + 4 + 5 + GTK_FILL + + + + + + True + 0 + 0 + Si_gn padding: + True + + + 5 + 6 + GTK_FILL + + + + + + + + 1 + + + + + True + 0 + 0 + + + tab + 1 + False + + + + + True + + + + + + + + + + + + 2 + + + + + True + 0 + 0 + + + tab + 2 + False + + + + + True + 12 + + + True + 12 + + + True + 0 + 0 + GTK_SHADOW_NONE + + + True + 0 + 0 + 12 + + + True + 4 + 2 + 6 + 6 + + + True + 0 + 0 + Len_gth: + True + bond-length-btn + + + + + + + + 56 + True + True + Distance in pixels between two lines representing a multiple bond. + 5 2 20 1 10 0 + 1 + 2 + True + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + + 56 + True + True + Bond line width (in pixels). + 1 0.10000000000000001 10 0.10000000000000001 1 0 + 1 + 2 + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + 56 + True + True + Default angle between two consecutive bonds in a chain. + 120 10 180 1 10 0 + 1 + 2 + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + 85 + True + True + Default bond length (pm). + 140 10 1000 1 10 0 + 1 + 2 + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + 0 + _Distance: + True + bond-dist-btn + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + 0 + _Width: + True + bond-width-btn + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + 0 + Angl_e: + True + bond-angle-btn + + + 1 + 2 + GTK_FILL + + + + + + + + + + True + 0 + 0 + <b>Normal bonds</b> + True + + + label_item + + + + + False + + + + + True + 0 + 0 + GTK_SHADOW_NONE + + + True + 0 + 0 + GTK_SHADOW_NONE + + + True + 0 + 0 + 12 + + + True + 3 + 2 + 6 + 6 + + + True + 0 + 0 + Wid_th + True + stereo-width-btn + + + + + + + + 56 + True + True + Distance between hashes in pixels. + 2 0.10000000000000001 10 0.10000000000000001 1 0 + 1 + 2 + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + 56 + True + True + Width of hashes in pixels. + 1 0.10000000000000001 10 0.10000000000000001 1 0 + 1 + 2 + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + 85 + True + True + Width in pixels at the largest end. + 5 1 20 1 10 0 + 1 + 2 + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + 0 + Dist_ance: + True + hash-dist-btn + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + 0 + Ha_sh width: + True + hash-width-btn + + + 1 + 2 + GTK_FILL + + + + + + + + + + True + 0 + 0 + <b>Stereochemical bonds</b> + True + + + label_item + + + + + + + False + 1 + + + + + False + False + + + + + 3 + False + + + + + True + 0 + 0 + + + tab + 3 + False + + + + + True + 12 + + + True + 6 + + + True + 0 + 0 + GTK_SHADOW_NONE + + + True + 0 + 0 + 12 + + + True + 4 + 2 + 12 + 6 + + + True + True + Arrow line width (in pixels). + 1 0.10000000000000001 10 0.10000000000000001 1 0 + 1 + 2 + True + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_EXPAND + + + + + True + True + Distance in pixels between two parallel lines (either two arrows or one arrow with two lines). + 2 2 20 1 10 0 + 1 + 2 + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_EXPAND + + + + + True + True + Padding added at each end of an arrow (in pixels). + 1 1 1000 1 10 0 + 1 + 2 + True + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_EXPAND + + + + + True + True + Default arrow length (in pm just like bond lengths). + 200 10 1000 1 10 0 + 1 + 2 + True + + + 1 + 2 + + GTK_EXPAND + + + + + True + 0 + 0 + Len_gth: + True + + + + + + + + True + 0 + 0 + _Width: + True + + + 1 + 2 + + + + + + True + 0 + 0 + _Distance: + True + + + 2 + 3 + + + + + + True + 0 + 0 + _Padding: + True + + + 3 + 4 + + + + + + + + + + True + 0 + 0 + True + + + label_item + + + + + False + + + + + True + 0 + 0 + GTK_SHADOW_NONE + + + True + 0 + 0 + 12 + + + True + 3 + 3 + 12 + 6 + + + True + 0 + 0 + C: + True + + + 2 + 3 + + + + + + True + 0 + 0 + A: + True + + + + + + + + True + 0 + 0 + B: + True + + + 1 + 2 + + + + + + True + 0 + 0 + arrow.png + + + 2 + 3 + 3 + + + + + + True + True + Distance in pixels from tip of arrowhead to center. + 6 0.10000000000000001 100 1 10 0 + 1 + 2 + + + 1 + 2 + + + + + + + True + True + Distance in pixels from tip of arrowhead to trailing point, measured along shaft. + 8 0.10000000000000001 100 1 10 0 + 1 + 2 + + + 1 + 2 + 1 + 2 + + + + + + + True + True + Distance in pixels of arrowhead trailing points from outside edge of shaft. + 4 0.10000000000000001 100 1 10 0 + 1 + 2 + + + 1 + 2 + 2 + 3 + + + + + + + + + + + True + 0 + 0 + <b>Arrow heads</b> + True + + + label_item + + + + + False + 1 + + + + + False + False + + + + + 4 + + + + + True + 0 + 0 + + + tab + 4 + False + + + + + True + 6 + + + + + + 5 + + + + + True + 0 + 0 + + + tab + 5 + False + + + + + True + 0 + 0 + 12 + + + True + 2 + 12 + 6 + + + True + True + Size of the charge sign in pixels. + 1 1 100 1 10 0 + 1 + 2 + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + 0 + Charge _sign size: + True + + + GTK_FILL + + + + + + + + 6 + + + + + True + 0 + 0 + + + tab + 6 + False + + + + + + + + True + 0 + 0 + + + tab + 7 + False + + + + + + + + True + 0 + 0 + + + tab + 8 + False + + + + + + + + True + 0 + 0 + + + tab + 9 + False + + + + + + + + True + 0 + 0 + + + tab + 10 + False + + + + + + + + True + 0 + 0 + + + tab + 11 + False + + + + + GTK_PACK_END + 1 + + + + + 3 + + + + + + + 2 + + + + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-help + True + -11 + + + + + True + True + True + gtk-close + True + -7 + + + 1 + + + + + False + GTK_PACK_END + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/stringdlg.glade gnome-chemistry-utils-0.10.9/glade/paint/stringdlg.glade --- gnome-chemistry-utils-0.8.6/glade/paint/stringdlg.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/stringdlg.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,88 @@ + + + + + + True + + + True + 5 + 6 + + + True + True + GTK_SHADOW_IN + + + True + True + False + GTK_WRAP_CHAR + False + + + + + + + True + 6 + GTK_BUTTONBOX_END + + + True + True + True + gtk-help + True + + + + + True + True + True + gtk-save-as + True + + + 1 + + + + + True + True + True + gtk-close + True + + + 2 + + + + + True + True + True + gtk-copy + True + + + 3 + + + + + False + False + 1 + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/tools.glade gnome-chemistry-utils-0.10.9/glade/paint/tools.glade --- gnome-chemistry-utils-0.8.6/glade/paint/tools.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/tools.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,128 @@ + + + + + + True + + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + False + False + + + True + + + True + + + True + + + + + + + + True + + + True + 0 + 4 + _Current element: + True + + + False + False + + + + + True + gtk_combo_periodic_new + + + False + False + 1 + + + + + False + False + 1 + + + + + True + False + + + 250 + 250 + True + 0 + 0 + + + False + + + + + True + 0 + 0 + label1 + + + tab + False + False + + + + + 2 + + + + + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-help + True + -11 + + + + + False + GTK_PACK_END + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/paint/zoom.glade gnome-chemistry-utils-0.10.9/glade/paint/zoom.glade --- gnome-chemistry-utils-0.8.6/glade/paint/zoom.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/paint/zoom.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,107 @@ + + + + + + True + Zoom + GDK_WINDOW_TYPE_HINT_DIALOG + + + True + + + True + + + True + 4 + Zoom factor (%): + + + False + False + + + + + True + True + 100 20 800 1 10 0 + 1 + True + + + False + False + 1 + + + + + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-help + True + -11 + + + + + True + True + True + gtk-apply + True + -10 + + + 1 + + + + + True + True + True + gtk-cancel + True + -6 + + + 2 + + + + + True + True + True + gtk-ok + True + -5 + + + 3 + + + + + False + GTK_PACK_END + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/print-setup.glade gnome-chemistry-utils-0.10.9/glade/print-setup.glade --- gnome-chemistry-utils-0.8.6/glade/print-setup.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/print-setup.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,1264 @@ + + + + + + 5 + Page Setup + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + 8 + + + True + 3 + 5 + 5 + + + True + True + 0 + + + True + 12 + 4 + + + True + 12 + + + True + 9 + 4 + 10 + 5 + + + + + + + + + True + 0 + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + True + 0 + + + True + 0 + 0 + + + True + 2 + + + True + gtk-properties + + + False + False + + + + + True + Change Paper Type + True + + + False + False + 1 + + + + + + + + + 2 + 4 + 2 + GTK_FILL + + + + + + True + True + 1 0 100 1 0 0 + 1 + True + GTK_UPDATE_IF_VALID + + + 3 + 4 + 7 + 8 + GTK_FILL + + + + + + True + True + 1 0 100 1 0 0 + 1 + True + GTK_UPDATE_IF_VALID + + + 3 + 4 + 6 + 7 + GTK_FILL + + + + + + True + True + 1 0 100 1 0 0 + 1 + True + GTK_UPDATE_IF_VALID + + + 3 + 4 + 5 + 6 + GTK_FILL + + + + + + True + True + 1 0 100 1 0 0 + 1 + True + GTK_UPDATE_IF_VALID + + + 3 + 4 + 4 + 5 + GTK_FILL + + + + + + True + True + 1 0 100 1 0 0 + 1 + True + GTK_UPDATE_IF_VALID + + + 3 + 4 + 3 + 4 + GTK_FILL + + + + + + True + True + 1 0 100 1 0 0 + 1 + 1 + True + GTK_UPDATE_IF_VALID + + + 3 + 4 + 2 + 3 + GTK_FILL + + + + + + True + 0 + Right margin: + + + 2 + 3 + 5 + 6 + GTK_FILL + + + + + + True + 0 + Left margin: + + + 2 + 3 + 4 + 5 + GTK_FILL + + + + + + True + 0 + Footer: + + + 2 + 3 + 6 + 7 + GTK_FILL + + + + + + True + 0 + Header: + + + 2 + 3 + 3 + 4 + GTK_FILL + + + + + + True + 0 + Bottom margin: + + + 2 + 3 + 7 + 8 + GTK_FILL + + + + + + True + 0 + Top margin: + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + 0 + Unit: + + + 2 + 3 + 8 + 9 + GTK_FILL + GTK_SHRINK | GTK_FILL + + + + + True + 0 + + + 1 + 2 + + + + + + True + 0 + <b>Paper:</b> + True + + + GTK_FILL + + 5 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 2 + 2 + 9 + + + + + 5 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 3 + 3 + + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + True + True + portrait-btn + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-orientation-reverse-landscape + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Reverse landscape + + + 1 + + + + + + + 2 + 3 + 2 + 3 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + True + True + portrait-btn + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-orientation-reverse-portrait + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Reverse portrait + + + 1 + + + + + + + 2 + 3 + 1 + 2 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + True + True + portrait-btn + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-orientation-landscape + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Landscape + + + 1 + + + + + + + 1 + 2 + 2 + 3 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + True + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-orientation-portrait + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Portrait + + + 1 + + + + + + + 1 + 2 + 1 + 2 + + + + + True + 0 + 4 + <b>O_rientation:</b> + True + True + + + 1 + 2 + + + + + True + 0 + 4 + <b>Center on page:</b> + True + + + + + True + True + _Horizontally + True + 0 + True + + + 1 + 2 + + + + + True + True + _Vertically + True + 0 + True + + + 2 + 3 + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 15 + GTK_BUTTONBOX_END + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-refresh + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Reload defaults + + + 1 + + + + + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-save + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Save as defaults + + + 1 + + + + + + + 1 + + + + + 2 + + + + + + + + + True + Page + GTK_JUSTIFY_CENTER + + + tab + False + + + + + True + + + True + 5 + 6 + + + True + 0 + <b>Scale</b> + True + + + False + False + + + + + True + 18 + + + True + 5 + 5 + 12 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + _Automatic scaling: + True + 0 + True + scale-no-btn + + + 2 + 2 + 3 + GTK_SHRINK | GTK_FILL + GTK_EXPAND | GTK_SHRINK | GTK_FILL + + + + + True + True + _Fixed scaling: + True + 0 + True + True + scale-no-btn + + + 2 + 1 + 2 + GTK_SHRINK | GTK_FILL + GTK_EXPAND | GTK_SHRINK | GTK_FILL + + + + + True + True + _No scaling + True + 0 + True + True + + + 2 + GTK_FILL + + + + + + True + True + 50 10 1000 1 10 0 + 1 + 1 + True + + + 2 + 3 + 1 + 2 + + + + + True + 0 + % of normal size + True + + + 3 + 4 + 1 + 2 + GTK_SHRINK | GTK_FILL + + + + + True + 0 + page(s) + + + 3 + 4 + 4 + 5 + GTK_FILL + + + + + + True + True + 1 1 100 1 10 0 + 1 + + + 2 + 3 + 4 + 5 + + + + + + True + True + Scale to fit _vertically on + True + 0 + True + True + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + + True + 0 + page(s) + + + 3 + 4 + 3 + 4 + GTK_FILL + + + + + + True + True + 1 1 100 1 0 0 + 1 + + + 2 + 3 + 3 + 4 + + + + + + True + True + Scale to fit _horizontally on + True + 0 + True + True + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + + + + 1 + + + + + False + + + + + + + + 1 + + + + + True + Scale + + + tab + 1 + False + + + + + True + 12 + 24 + + + True + 6 + + + True + 0 + True + + + False + False + + + + + True + 18 + + + True + 6 + + + True + 12 + + + True + _Header: + True + GTK_JUSTIFY_CENTER + + + False + False + + + + + True + + + 1 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Configure + 0 + + + False + 2 + + + + + False + False + + + + + True + + + 1 + + + + + True + + + 2 + + + + + True + 12 + + + True + _Footer: + True + GTK_JUSTIFY_CENTER + + + False + False + + + + + True + + + 1 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Configure + 0 + + + False + 2 + + + + + False + False + 3 + + + + + True + False + 12 + + + True + 0 + Fi_rst page number: + True + GTK_JUSTIFY_CENTER + + + False + False + + + + + True + + + + + + + 1 + + + + + False + False + 4 + + + + + + + 1 + + + + + + + 2 + + + + + True + Headers and Footers + GTK_JUSTIFY_CENTER + + + tab + 2 + False + + + + + + + GTK_PACK_END + 1 + + + + + True + GTK_BUTTONBOX_EDGE + + + True + True + True + gtk-help + True + 0 + + + + + True + True + True + 0 + + + True + 0 + 0 + + + True + 2 + + + True + gtk-print-preview + + + False + False + GTK_PACK_END + 1 + + + + + True + _Preview + True + + + False + False + GTK_PACK_END + + + + + + + + + 1 + + + + + True + True + True + gtk-print + True + 0 + + + 2 + + + + + True + True + True + True + gtk-close + True + 0 + + + 3 + + + + + False + GTK_PACK_END + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/table/acidity.glade gnome-chemistry-utils-0.10.9/glade/table/acidity.glade --- gnome-chemistry-utils-0.8.6/glade/table/acidity.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/table/acidity.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,60 @@ + + + + + + + + True + 4 + 2 + 2 + 5 + 5 + + + True + <span background="magenta"><b>Amphoteric</b></span> + True + + + 1 + 2 + 1 + 2 + + + + + True + <span background="green"><b>Neutral</b></span> + True + + + 1 + 2 + + + + + True + <span background="blue"><b>Basic</b></span> + True + + + 1 + 2 + + + + + True + <span background="red"><b>Acidic</b></span> + True + GTK_JUSTIFY_CENTER + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/table/block.glade gnome-chemistry-utils-0.10.9/glade/table/block.glade --- gnome-chemistry-utils-0.8.6/glade/table/block.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/table/block.glade 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,68 @@ + + + + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + 3 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <span background="#00008e" foreground="white" size="larger" weight="bold"> s block </span> + True + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <span background="#8e0000" foreground="white" size="larger" weight="bold"> p block </span> + True + + + 2 + 3 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <span background="#008e00" foreground="white" size="larger" weight="bold"> d block </span> + True + + + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <span background="#8e008e" foreground="white" size="larger" weight="bold"> f block </span> + True + + + 2 + 3 + 1 + 2 + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/table/curve.glade gnome-chemistry-utils-0.10.9/glade/table/curve.glade --- gnome-chemistry-utils-0.8.6/glade/table/curve.glade 2006-09-08 16:52:53.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/glade/table/curve.glade 2009-11-14 11:30:40.000000000 +0100 @@ -1,124 +1,17 @@ - - - + + + - - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - - - - - True - - - 0 - False - True - - - - - - True - False - 0 - - - - 5 - True - GTK_BUTTONBOX_START - 0 - - - - True - True - True - gtk-help - True - GTK_RELIEF_NORMAL - True - - - - - 0 - True - True - - - - - - 5 - True - GTK_BUTTONBOX_END - 0 - - - - True - True - True - gtk-copy - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - - - - - 0 - True - True - - - - - 0 - False - True - GTK_PACK_END - - - - - - + + True + GChemTable Graph + + + True + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/glade/table/eltpage.glade gnome-chemistry-utils-0.10.9/glade/table/eltpage.glade --- gnome-chemistry-utils-0.8.6/glade/table/eltpage.glade 2007-05-10 14:04:32.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/glade/table/eltpage.glade 2009-11-14 11:30:40.000000000 +0100 @@ -309,7 +309,7 @@ 0 0 8 - 1: + 1: GTK_SHRINK | GTK_FILL diff -Nru gnome-chemistry-utils-0.8.6/glade/table/Makefile.am gnome-chemistry-utils-0.10.9/glade/table/Makefile.am --- gnome-chemistry-utils-0.8.6/glade/table/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/table/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -1,10 +1,10 @@ -EXTRA_DIST = $(glade_DATA) - MAINTAINERCLEANFILES = Makefile.in -gladedir = $(datadir)/gchemutils/glade/table -glade_DATA = \ - eltpage.glade \ +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/table +dist_glade_DATA = \ + acidity.glade \ + block.glade \ curve.glade \ - state-thermometer.glade \ - family.glade + eltpage.glade \ + family.glade \ + state-thermometer.glade diff -Nru gnome-chemistry-utils-0.8.6/glade/table/Makefile.in gnome-chemistry-utils-0.10.9/glade/table/Makefile.in --- gnome-chemistry-utils-0.8.6/glade/table/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/glade/table/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,7 +35,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = glade/table -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(dist_glade_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -42,6 +45,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -49,16 +53,29 @@ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(gladedir)" -gladeDATA_INSTALL = $(INSTALL_DATA) -DATA = $(glade_DATA) +DATA = $(dist_glade_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -78,26 +95,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -107,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -148,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -167,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -178,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -216,30 +256,40 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -EXTRA_DIST = $(glade_DATA) +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ MAINTAINERCLEANFILES = Makefile.in -gladedir = $(datadir)/gchemutils/glade/table -glade_DATA = \ - eltpage.glade \ +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/table +dist_glade_DATA = \ + acidity.glade \ + block.glade \ curve.glade \ - state-thermometer.glade \ - family.glade + eltpage.glade \ + family.glade \ + state-thermometer.glade all: all-am @@ -248,14 +298,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/table/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu glade/table/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/table/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu glade/table/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -273,29 +323,33 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -install-gladeDATA: $(glade_DATA) +install-dist_gladeDATA: $(dist_glade_DATA) @$(NORMAL_INSTALL) test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" - @list='$(glade_DATA)'; for p in $$list; do \ + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ - $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ done -uninstall-gladeDATA: +uninstall-dist_gladeDATA: @$(NORMAL_UNINSTALL) - @list='$(glade_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ - rm -f "$(DESTDIR)$(gladedir)/$$f"; \ - done + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files tags: TAGS TAGS: @@ -319,13 +373,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -356,6 +414,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -375,26 +434,38 @@ html: html-am +html-am: + info: info-am info-am: -install-data-am: install-gladeDATA +install-data-am: install-dist_gladeDATA install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -413,21 +484,22 @@ ps-am: -uninstall-am: uninstall-gladeDATA +uninstall-am: uninstall-dist_gladeDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-gladeDATA install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-gladeDATA + install-data install-data-am install-dist_gladeDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-dist_gladeDATA + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnome-chemistry-utils-0.8.6/glade/table/state-thermometer.glade gnome-chemistry-utils-0.10.9/glade/table/state-thermometer.glade --- gnome-chemistry-utils-0.8.6/glade/table/state-thermometer.glade 2006-09-11 21:22:52.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/glade/table/state-thermometer.glade 2009-11-14 11:30:40.000000000 +0100 @@ -1,6 +1,6 @@ - + + diff -Nru gnome-chemistry-utils-0.8.6/INSTALL gnome-chemistry-utils-0.10.9/INSTALL --- gnome-chemistry-utils-0.8.6/INSTALL 2006-10-19 06:51:14.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/INSTALL 2009-08-12 08:51:00.000000000 +0200 @@ -2,15 +2,15 @@ ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007, 2008, 2009 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives + This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== -Briefly, the shell commands `./configure; make; make install' should + Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. @@ -67,12 +67,15 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -85,7 +88,7 @@ Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run @@ -97,10 +100,24 @@ installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + Installation Names ================== -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. @@ -123,7 +140,7 @@ Optional Features ================= -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -135,14 +152,46 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -150,7 +199,8 @@ where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -168,9 +218,9 @@ Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -179,7 +229,7 @@ Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -198,11 +248,19 @@ `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -229,6 +287,16 @@ Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. diff -Nru gnome-chemistry-utils-0.8.6/install-sh gnome-chemistry-utils-0.10.9/install-sh --- gnome-chemistry-utils-0.8.6/install-sh 2006-10-19 06:51:14.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/install-sh 2009-08-12 08:51:00.000000000 +0200 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-10-14.15 +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -48,7 +48,7 @@ # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else @@ -58,34 +58,49 @@ # Put in absolute file names if you don't have them in your path; # or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 +chgrpcmd= chmodcmd=$chmodprog chowncmd= -chgrpcmd= -stripcmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -95,65 +110,55 @@ In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; + + -C) copy_on_change=true;; - -d) dir_arg=true - shift - continue;; + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - shift - shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac - continue;; + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; @@ -165,21 +170,22 @@ *) break;; esac + shift done -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do - if test -n "$dstarg"; then + if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" + set fnord "$@" "$dst_arg" shift # fnord fi shift # arg - dstarg=$arg + dst_arg=$arg done fi @@ -224,7 +230,7 @@ do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -242,22 +248,22 @@ exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst @@ -378,26 +384,19 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; esac - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac + eval "$initialize_posix_glob" oIFS=$IFS IFS=/ - $posix_glob && set -f + $posix_glob set -f set fnord $dstdir shift - $posix_glob && set +f + $posix_glob set +f IFS=$oIFS prefixes= @@ -459,41 +458,54 @@ # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 trap '' 0 fi @@ -503,5 +515,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff -Nru gnome-chemistry-utils-0.8.6/intltool-extract.in gnome-chemistry-utils-0.10.9/intltool-extract.in --- gnome-chemistry-utils-0.8.6/intltool-extract.in 2007-12-17 22:02:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/intltool-extract.in 2009-11-14 11:45:57.000000000 +0100 @@ -1,875 +0,0 @@ -#!@INTLTOOL_PERL@ -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# -# The Intltool Message Extractor -# -# Copyright (C) 2000-2001, 2003 Free Software Foundation. -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# Intltool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# -# Authors: Kenneth Christiansen -# Darin Adler -# - -## Release information -my $PROGRAM = "intltool-extract"; -my $PACKAGE = "intltool"; -my $VERSION = "0.37.0"; - -## Loaded modules -use strict; -use File::Basename; -use Getopt::Long; - -## Scalars used by the option stuff -my $TYPE_ARG = "0"; -my $LOCAL_ARG = "0"; -my $HELP_ARG = "0"; -my $VERSION_ARG = "0"; -my $UPDATE_ARG = "0"; -my $QUIET_ARG = "0"; -my $SRCDIR_ARG = "."; - -my $FILE; -my $OUTFILE; - -my $gettext_type = ""; -my $input; -my %messages = (); -my %loc = (); -my %count = (); -my %comments = (); -my $strcount = 0; - -my $XMLCOMMENT = ""; - -## Use this instead of \w for XML files to handle more possible characters. -my $w = "[-A-Za-z0-9._:]"; - -## Always print first -$| = 1; - -## Handle options -GetOptions ( - "type=s" => \$TYPE_ARG, - "local|l" => \$LOCAL_ARG, - "help|h" => \$HELP_ARG, - "version|v" => \$VERSION_ARG, - "update" => \$UPDATE_ARG, - "quiet|q" => \$QUIET_ARG, - "srcdir=s" => \$SRCDIR_ARG, - ) or &error; - -&split_on_argument; - - -## Check for options. -## This section will check for the different options. - -sub split_on_argument { - - if ($VERSION_ARG) { - &version; - - } elsif ($HELP_ARG) { - &help; - - } elsif ($LOCAL_ARG) { - &place_local; - &extract; - - } elsif ($UPDATE_ARG) { - &place_normal; - &extract; - - } elsif (@ARGV > 0) { - &place_normal; - &message; - &extract; - - } else { - &help; - - } -} - -sub place_normal { - $FILE = $ARGV[0]; - $OUTFILE = "$FILE.h"; - - my $dirname = dirname ($OUTFILE); - if (! -d "$dirname" && $dirname ne "") { - system ("mkdir -p $dirname"); - } -} - -sub place_local { - $FILE = $ARGV[0]; - $OUTFILE = fileparse($FILE, ()); - if (!-e "tmp/") { - system("mkdir tmp/"); - } - $OUTFILE = "./tmp/$OUTFILE.h" -} - -sub determine_type { - if ($TYPE_ARG =~ /^gettext\/(.*)/) { - $gettext_type=$1 - } -} - -## Sub for printing release information -sub version{ - print <<_EOF_; -${PROGRAM} (${PACKAGE}) $VERSION -Copyright (C) 2000, 2003 Free Software Foundation, Inc. -Written by Kenneth Christiansen, 2000. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -## Sub for printing usage information -sub help { - print <<_EOF_; -Usage: ${PROGRAM} [OPTION]... [FILENAME] -Generates a header file from an XML source file. - -It grabs all strings between <_translatable_node> and its end tag in -XML files. Read manpage (man ${PROGRAM}) for more info. - - --type=TYPE Specify the file type of FILENAME. Currently supports: - "gettext/glade", "gettext/ini", "gettext/keys" - "gettext/rfc822deb", "gettext/schemas", - "gettext/scheme", "gettext/xml", "gettext/quoted", - "gettext/quotedxml" - -l, --local Writes output into current working directory - (conflicts with --update) - --update Writes output into the same directory the source file - reside (conflicts with --local) - --srcdir Root of the source tree - -v, --version Output version information and exit - -h, --help Display this help and exit - -q, --quiet Quiet mode - -Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") -or send email to . -_EOF_ - exit; -} - -## Sub for printing error messages -sub error{ - print STDERR "Try `${PROGRAM} --help' for more information.\n"; - exit; -} - -sub message { - print "Generating C format header file for translation.\n" unless $QUIET_ARG; -} - -sub extract { - &determine_type; - - &convert; - - open OUT, ">$OUTFILE"; - binmode (OUT) if $^O eq 'MSWin32'; - &msg_write; - close OUT; - - print "Wrote $OUTFILE\n" unless $QUIET_ARG; -} - -sub convert { - - ## Reading the file - { - local (*IN); - local $/; #slurp mode - open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; - $input = ; - } - - &type_ini if $gettext_type eq "ini"; - &type_keys if $gettext_type eq "keys"; - &type_xml if $gettext_type eq "xml"; - &type_glade if $gettext_type eq "glade"; - &type_scheme if $gettext_type eq "scheme"; - &type_schemas if $gettext_type eq "schemas"; - &type_rfc822deb if $gettext_type eq "rfc822deb"; - &type_quoted if $gettext_type eq "quoted"; - &type_quotedxml if $gettext_type eq "quotedxml"; -} - -sub entity_decode_minimal -{ - local ($_) = @_; - - s/'/'/g; # ' - s/"/"/g; # " - s/&/&/g; - - return $_; -} - -sub entity_decode -{ - local ($_) = @_; - - s/'/'/g; # ' - s/"/"/g; # " - s/<//g; - s/&/&/g; - - return $_; -} - -sub escape_char -{ - return '\"' if $_ eq '"'; - return '\n' if $_ eq "\n"; - return '\\\\' if $_ eq '\\'; - - return $_; -} - -sub escape -{ - my ($string) = @_; - return join "", map &escape_char, split //, $string; -} - -sub type_ini { - ### For generic translatable desktop files ### - while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) { - if (defined($2)) { - $comments{$3} = $2; - } - $messages{$3} = []; - } -} - -sub type_keys { - ### For generic translatable mime/keys files ### - while ($input =~ /^\s*_\w+=(.*)$/mg) { - $messages{$1} = []; - } -} - -sub type_xml { - ### For generic translatable XML files ### - my $tree = readXml($input); - parseTree(0, $tree); -} - -sub print_var { - my $var = shift; - my $vartype = ref $var; - - if ($vartype =~ /ARRAY/) { - my @arr = @{$var}; - print "[ "; - foreach my $el (@arr) { - print_var($el); - print ", "; - } - print "] "; - } elsif ($vartype =~ /HASH/) { - my %hash = %{$var}; - print "{ "; - foreach my $key (keys %hash) { - print "$key => "; - print_var($hash{$key}); - print ", "; - } - print "} "; - } else { - print $var; - } -} - -# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) -sub getAttributeString -{ - my $sub = shift; - my $do_translate = shift || 1; - my $language = shift || ""; - my $translate = shift; - my $result = ""; - foreach my $e (reverse(sort(keys %{ $sub }))) { - my $key = $e; - my $string = $sub->{$e}; - my $quote = '"'; - - $string =~ s/^[\s]+//; - $string =~ s/[\s]+$//; - - if ($string =~ /^'.*'$/) - { - $quote = "'"; - } - $string =~ s/^['"]//g; - $string =~ s/['"]$//g; - - ## differences from intltool-merge.in.in - if ($key =~ /^_/) { - $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; - $messages{entity_decode($string)} = []; - $$translate = 2; - } - ## differences end here from intltool-merge.in.in - $result .= " $key=$quote$string$quote"; - } - return $result; -} - -# Verbatim copy from intltool-merge.in.in -sub getXMLstring -{ - my $ref = shift; - my $spacepreserve = shift || 0; - my @list = @{ $ref }; - my $result = ""; - - my $count = scalar(@list); - my $attrs = $list[0]; - my $index = 1; - - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - - while ($index < $count) { - my $type = $list[$index]; - my $content = $list[$index+1]; - if (! $type ) { - # We've got CDATA - if ($content) { - # lets strip the whitespace here, and *ONLY* here - $content =~ s/\s+/ /gs if (!$spacepreserve); - $result .= $content; - } - } elsif ( "$type" ne "1" ) { - # We've got another element - $result .= "<$type"; - $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements - if ($content) { - my $subresult = getXMLstring($content, $spacepreserve); - if ($subresult) { - $result .= ">".$subresult . ""; - } else { - $result .= "/>"; - } - } else { - $result .= "/>"; - } - } - $index += 2; - } - return $result; -} - -# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed -# Translate list of nodes if necessary -sub translate_subnodes -{ - my $fh = shift; - my $content = shift; - my $language = shift || ""; - my $singlelang = shift || 0; - my $spacepreserve = shift || 0; - - my @nodes = @{ $content }; - - my $count = scalar(@nodes); - my $index = 0; - while ($index < $count) { - my $type = $nodes[$index]; - my $rest = $nodes[$index+1]; - traverse($fh, $type, $rest, $language, $spacepreserve); - $index += 2; - } -} - -# Based on traverse() in intltool-merge.in.in -sub traverse -{ - my $fh = shift; # unused, to allow us to sync code between -merge and -extract - my $nodename = shift; - my $content = shift; - my $language = shift || ""; - my $spacepreserve = shift || 0; - - if ($nodename && "$nodename" eq "1") { - $XMLCOMMENT = $content; - } elsif ($nodename) { - # element - my @all = @{ $content }; - my $attrs = shift @all; - my $translate = 0; - my $outattr = getAttributeString($attrs, 1, $language, \$translate); - - if ($nodename =~ /^_/) { - $translate = 1; - $nodename =~ s/^_//; - } - my $lookup = ''; - - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - if ($translate) { - $lookup = getXMLstring($content, $spacepreserve); - if (!$spacepreserve) { - $lookup =~ s/^\s+//s; - $lookup =~ s/\s+$//s; - } - - if ($lookup && $translate != 2) { - $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; - $messages{$lookup} = []; - } elsif ($translate == 2) { - translate_subnodes($fh, \@all, $language, 1, $spacepreserve); - } - } else { - $XMLCOMMENT = ""; - my $count = scalar(@all); - if ($count > 0) { - my $index = 0; - while ($index < $count) { - my $type = $all[$index]; - my $rest = $all[$index+1]; - traverse($fh, $type, $rest, $language, $spacepreserve); - $index += 2; - } - } - } - $XMLCOMMENT = ""; - } -} - - -# Verbatim copy from intltool-merge.in.in, $fh for compatibility -sub parseTree -{ - my $fh = shift; - my $ref = shift; - my $language = shift || ""; - - my $name = shift @{ $ref }; - my $cont = shift @{ $ref }; - - while (!$name || "$name" eq "1") { - $name = shift @{ $ref }; - $cont = shift @{ $ref }; - } - - my $spacepreserve = 0; - my $attrs = @{$cont}[0]; - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - traverse($fh, $name, $cont, $language, $spacepreserve); -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_comment -{ - my $expat = shift; - my $data = $expat->original_string(); - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - $data =~ s/^$//s; - push @$clist, 1 => $data; -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_cdatastart -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - push @$clist, 0 => $expat->original_string(); -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_cdataend -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - $clist->[$pos] .= $expat->original_string(); -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_char -{ - my $expat = shift; - my $text = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - # Use original_string so that we retain escaped entities - # in CDATA sections. - # - if ($pos > 0 and $clist->[$pos - 1] eq '0') { - $clist->[$pos] .= $expat->original_string(); - } else { - push @$clist, 0 => $expat->original_string(); - } -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_start -{ - my $expat = shift; - my $tag = shift; - my @origlist = (); - - # Use original_string so that we retain escaped entities - # in attribute values. We must convert the string to an - # @origlist array to conform to the structure of the Tree - # Style. - # - my @original_array = split /\x/, $expat->original_string(); - my $source = $expat->original_string(); - - # Remove leading tag. - # - $source =~ s|^\s*<\s*(\S+)||s; - - # Grab attribute key/value pairs and push onto @origlist array. - # - while ($source) - { - if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; - push @origlist, $1; - push @origlist, '"' . $2 . '"'; - } - elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; - push @origlist, $1; - push @origlist, "'" . $2 . "'"; - } - else - { - last; - } - } - - my $ol = [ { @origlist } ]; - - push @{ $expat->{Lists} }, $expat->{Curlist}; - push @{ $expat->{Curlist} }, $tag => $ol; - $expat->{Curlist} = $ol; -} - -# Copied from intltool-merge.in.in and added comment handler. -sub readXml -{ - my $xmldoc = shift || return; - my $ret = eval 'require XML::Parser'; - if(!$ret) { - die "You must have XML::Parser installed to run $0\n\n"; - } - my $xp = new XML::Parser(Style => 'Tree'); - $xp->setHandlers(Char => \&intltool_tree_char); - $xp->setHandlers(Start => \&intltool_tree_start); - $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); - $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); - - ## differences from intltool-merge.in.in - $xp->setHandlers(Comment => \&intltool_tree_comment); - ## differences end here from intltool-merge.in.in - - my $tree = $xp->parse($xmldoc); - #print_var($tree); - -# Hello thereHowdydo -# would be: -# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, -# [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] - - return $tree; -} - -sub type_schemas { - ### For schemas XML files ### - - # FIXME: We should handle escaped < (less than) - while ($input =~ / - \s* - (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? - (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? - (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? - <\/locale> - /sgx) { - my @totranslate = ($3,$6,$9); - my @eachcomment = ($2,$5,$8); - foreach (@totranslate) { - my $currentcomment = shift @eachcomment; - next if !$_; - s/\s+/ /g; - $messages{entity_decode_minimal($_)} = []; - $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); - } - } -} - -sub type_rfc822deb { - ### For rfc822-style Debian configuration files ### - - my $lineno = 1; - my $type = ''; - while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) - { - my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); - while ($pre =~ m/\n/g) - { - $lineno ++; - } - $lineno += length($newline); - my @str_list = rfc822deb_split(length($underscore), $text); - for my $str (@str_list) - { - $strcount++; - $messages{$str} = []; - $loc{$str} = $lineno; - $count{$str} = $strcount; - my $usercomment = ''; - while($pre =~ s/(^|\n)#([^\n]*)$//s) - { - $usercomment = "\n" . $2 . $usercomment; - } - $comments{$str} = $tag . $usercomment; - } - $lineno += ($text =~ s/\n//g); - } -} - -sub rfc822deb_split { - # Debian defines a special way to deal with rfc822-style files: - # when a value contain newlines, it consists of - # 1. a short form (first line) - # 2. a long description, all lines begin with a space, - # and paragraphs are separated by a single dot on a line - # This routine returns an array of all paragraphs, and reformat - # them. - # When first argument is 2, the string is a comma separated list of - # values. - my $type = shift; - my $text = shift; - $text =~ s/^[ \t]//mg; - return (split(/, */, $text, 0)) if $type ne 1; - return ($text) if $text !~ /\n/; - - $text =~ s/([^\n]*)\n//; - my @list = ($1); - my $str = ''; - for my $line (split (/\n/, $text)) - { - chomp $line; - if ($line =~ /^\.\s*$/) - { - # New paragraph - $str =~ s/\s*$//; - push(@list, $str); - $str = ''; - } - elsif ($line =~ /^\s/) - { - # Line which must not be reformatted - $str .= "\n" if length ($str) && $str !~ /\n$/; - $line =~ s/\s+$//; - $str .= $line."\n"; - } - else - { - # Continuation line, remove newline - $str .= " " if length ($str) && $str !~ /\n$/; - $str .= $line; - } - } - $str =~ s/\s*$//; - push(@list, $str) if length ($str); - return @list; -} - -sub type_quoted { - while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { - my $message = $1; - my $before = $`; - $message =~ s/\\\"/\"/g; - $before =~ s/[^\n]//g; - $messages{$message} = []; - $loc{$message} = length ($before) + 2; - } -} - -sub type_quotedxml { - while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { - my $message = $1; - my $before = $`; - $message =~ s/\\\"/\"/g; - $message = entity_decode($message); - $before =~ s/[^\n]//g; - $messages{$message} = []; - $loc{$message} = length ($before) + 2; - } -} - -sub type_glade { - ### For translatable Glade XML files ### - - my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; - - while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { - # Glade sometimes uses tags that normally mark translatable things for - # little bits of non-translatable content. We work around this by not - # translating strings that only includes something like label4 or window1. - $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/; - } - - while ($input =~ /(..[^<]*)<\/items>/sg) { - for my $item (split (/\n/, $1)) { - $messages{entity_decode($item)} = []; - } - } - - ## handle new glade files - while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { - $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/; - if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) { - $comments{entity_decode($3)} = entity_decode($2) ; - } - } - while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { - $messages{entity_decode_minimal($2)} = []; - } -} - -sub type_scheme { - my ($line, $i, $state, $str, $trcomment, $char); - for $line (split(/\n/, $input)) { - $i = 0; - $state = 0; # 0 - nothing, 1 - string, 2 - translatable string - while ($i < length($line)) { - if (substr($line,$i,1) eq "\"") { - if ($state == 2) { - $comments{$str} = $trcomment if ($trcomment); - $messages{$str} = []; - $str = ''; - $state = 0; $trcomment = ""; - } elsif ($state == 1) { - $str = ''; - $state = 0; $trcomment = ""; - } else { - $state = 1; - $str = ''; - if ($i>0 && substr($line,$i-1,1) eq '_') { - $state = 2; - } - } - } elsif (!$state) { - if (substr($line,$i,1) eq ";") { - $trcomment = substr($line,$i+1); - $trcomment =~ s/^;*\s*//; - $i = length($line); - } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) { - $trcomment = ""; - } - } else { - if (substr($line,$i,1) eq "\\") { - $char = substr($line,$i+1,1); - if ($char ne "\"" && $char ne "\\") { - $str = $str . "\\"; - } - $i++; - } - $str = $str . substr($line,$i,1); - } - $i++; - } - } -} - -sub msg_write { - my @msgids; - if (%count) - { - @msgids = sort { $count{$a} <=> $count{$b} } keys %count; - } - else - { - @msgids = sort keys %messages; - } - for my $message (@msgids) - { - my $offsetlines = 1; - $offsetlines++ if $message =~ /%/; - if (defined ($comments{$message})) - { - while ($comments{$message} =~ m/\n/g) - { - $offsetlines++; - } - } - print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" - if defined $loc{$message}; - print OUT "/* ".$comments{$message}." */\n" - if defined $comments{$message}; - print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; - - my @lines = split (/\n/, $message, -1); - for (my $n = 0; $n < @lines; $n++) - { - if ($n == 0) - { - print OUT "char *s = N_(\""; - } - else - { - print OUT " \""; - } - - print OUT escape($lines[$n]); - - if ($n < @lines - 1) - { - print OUT "\\n\"\n"; - } - else - { - print OUT "\");\n"; - } - } - } -} - diff -Nru gnome-chemistry-utils-0.8.6/intltool-merge.in gnome-chemistry-utils-0.10.9/intltool-merge.in --- gnome-chemistry-utils-0.8.6/intltool-merge.in 2007-12-17 22:02:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/intltool-merge.in 2009-11-14 11:45:57.000000000 +0100 @@ -1,1506 +0,0 @@ -#!@INTLTOOL_PERL@ -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# -# The Intltool Message Merger -# -# Copyright (C) 2000, 2003 Free Software Foundation. -# Copyright (C) 2000, 2001 Eazel, Inc -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 published by the Free Software Foundation. -# -# Intltool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# -# Authors: Maciej Stachowiak -# Kenneth Christiansen -# Darin Adler -# -# Proper XML UTF-8'ification written by Cyrille Chepelov -# - -## Release information -my $PROGRAM = "intltool-merge"; -my $PACKAGE = "intltool"; -my $VERSION = "0.37.0"; - -## Loaded modules -use strict; -use Getopt::Long; -use Text::Wrap; -use File::Basename; - -my $must_end_tag = -1; -my $last_depth = -1; -my $translation_depth = -1; -my @tag_stack = (); -my @entered_tag = (); -my @translation_strings = (); -my $leading_space = ""; - -## Scalars used by the option stuff -my $HELP_ARG = 0; -my $VERSION_ARG = 0; -my $BA_STYLE_ARG = 0; -my $XML_STYLE_ARG = 0; -my $KEYS_STYLE_ARG = 0; -my $DESKTOP_STYLE_ARG = 0; -my $SCHEMAS_STYLE_ARG = 0; -my $RFC822DEB_STYLE_ARG = 0; -my $QUOTED_STYLE_ARG = 0; -my $QUOTEDXML_STYLE_ARG = 0; -my $QUIET_ARG = 0; -my $PASS_THROUGH_ARG = 0; -my $UTF8_ARG = 0; -my $MULTIPLE_OUTPUT = 0; -my $cache_file; - -## Handle options -GetOptions -( - "help" => \$HELP_ARG, - "version" => \$VERSION_ARG, - "quiet|q" => \$QUIET_ARG, - "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility - "ba-style|b" => \$BA_STYLE_ARG, - "xml-style|x" => \$XML_STYLE_ARG, - "keys-style|k" => \$KEYS_STYLE_ARG, - "desktop-style|d" => \$DESKTOP_STYLE_ARG, - "schemas-style|s" => \$SCHEMAS_STYLE_ARG, - "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, - "quoted-style" => \$QUOTED_STYLE_ARG, - "quotedxml-style" => \$QUOTEDXML_STYLE_ARG, - "pass-through|p" => \$PASS_THROUGH_ARG, - "utf8|u" => \$UTF8_ARG, - "multiple-output|m" => \$MULTIPLE_OUTPUT, - "cache|c=s" => \$cache_file - ) or &error; - -my $PO_DIR; -my $FILE; -my $OUTFILE; - -my %po_files_by_lang = (); -my %translations = (); -my $iconv = $ENV{"ICONV"} || "iconv"; -my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); - -sub isProgramInPath -{ - my ($file) = @_; - # If either a file exists, or when run it returns 0 exit status - return 1 if ((-x $file) or (system("$file -l >$devnull") == 0)); - return 0; -} - -if (! isProgramInPath ("$iconv")) -{ - print STDERR " *** iconv is not found on this system!\n". - " *** Without it, intltool-merge can not convert encodings.\n"; - exit; -} - -# Use this instead of \w for XML files to handle more possible characters. -my $w = "[-A-Za-z0-9._:]"; - -# XML quoted string contents -my $q = "[^\\\"]*"; - -## Check for options. - -if ($VERSION_ARG) -{ - &print_version; -} -elsif ($HELP_ARG) -{ - &print_help; -} -elsif ($BA_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &ba_merge_translations; - &finalize; -} -elsif ($XML_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &xml_merge_output; - &finalize; -} -elsif ($KEYS_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &keys_merge_translations; - &finalize; -} -elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &desktop_merge_translations; - &finalize; -} -elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &schemas_merge_translations; - &finalize; -} -elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) -{ - &preparation; - &print_message; - &rfc822deb_merge_translations; - &finalize; -} -elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - "ed_merge_translations($QUOTEDXML_STYLE_ARG); - &finalize; -} -else -{ - &print_help; -} - -exit; - -## Sub for printing release information -sub print_version -{ - print <<_EOF_; -${PROGRAM} (${PACKAGE}) ${VERSION} -Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. - -Copyright (C) 2000-2003 Free Software Foundation, Inc. -Copyright (C) 2000-2001 Eazel, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -## Sub for printing usage information -sub print_help -{ - print <<_EOF_; -Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE -Generates an output file that includes some localized attributes from an -untranslated source file. - -Mandatory options: (exactly one must be specified) - -b, --ba-style includes translations in the bonobo-activation style - -d, --desktop-style includes translations in the desktop style - -k, --keys-style includes translations in the keys style - -s, --schemas-style includes translations in the schemas style - -r, --rfc822deb-style includes translations in the RFC822 style - --quoted-style includes translations in the quoted string style - --quotedxml-style includes translations in the quoted xml string style - -x, --xml-style includes translations in the standard xml style - -Other options: - -u, --utf8 convert all strings to UTF-8 before merging - (default for everything except RFC822 style) - -p, --pass-through deprecated, does nothing and issues a warning - -m, --multiple-output output one localized file per locale, instead of - a single file containing all localized elements - -c, --cache=FILE specify cache file name - (usually \$top_builddir/po/.intltool-merge-cache) - -q, --quiet suppress most messages - --help display this help and exit - --version output version information and exit - -Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") -or send email to . -_EOF_ - exit; -} - - -## Sub for printing error messages -sub print_error -{ - print STDERR "Try `${PROGRAM} --help' for more information.\n"; - exit; -} - - -sub print_message -{ - print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; -} - - -sub preparation -{ - $PO_DIR = $ARGV[0]; - $FILE = $ARGV[1]; - $OUTFILE = $ARGV[2]; - - &gather_po_files; - &get_translation_database; -} - -# General-purpose code for looking up translations in .po files - -sub po_file2lang -{ - my ($tmp) = @_; - $tmp =~ s/^.*\/(.*)\.po$/$1/; - return $tmp; -} - -sub gather_po_files -{ - if (my $linguas = $ENV{"LINGUAS"}) - { - for my $lang (split / /, $linguas) { - my $po_file = $PO_DIR . "/" . $lang . ".po"; - if (-e $po_file) { - $po_files_by_lang{$lang} = $po_file; - } - } - } - else - { - if (open LINGUAS_FILE, "$PO_DIR/LINGUAS") - { - while () - { - next if /^#/; - - for my $lang (split) - { - chomp ($lang); - my $po_file = $PO_DIR . "/" . $lang . ".po"; - if (-e $po_file) { - $po_files_by_lang{$lang} = $po_file; - } - } - } - - close LINGUAS_FILE; - } - else - { - for my $po_file (glob "$PO_DIR/*.po") { - $po_files_by_lang{po_file2lang($po_file)} = $po_file; - } - } - } -} - -sub get_local_charset -{ - my ($encoding) = @_; - my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias"; - - # seek character encoding aliases in charset.alias (glib) - - if (open CHARSET_ALIAS, $alias_file) - { - while () - { - next if /^\#/; - return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i) - } - - close CHARSET_ALIAS; - } - - # if not found, return input string - - return $encoding; -} - -sub get_po_encoding -{ - my ($in_po_file) = @_; - my $encoding = ""; - - open IN_PO_FILE, $in_po_file or die; - while () - { - ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" - if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) - { - $encoding = $1; - last; - } - } - close IN_PO_FILE; - - if (!$encoding) - { - print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; - $encoding = "ISO-8859-1"; - } - - system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull"); - if ($?) { - $encoding = get_local_charset($encoding); - } - - return $encoding -} - -sub utf8_sanity_check -{ - print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; - $UTF8_ARG = 1; -} - -sub get_translation_database -{ - if ($cache_file) { - &get_cached_translation_database; - } else { - &create_translation_database; - } -} - -sub get_newest_po_age -{ - my $newest_age; - - foreach my $file (values %po_files_by_lang) - { - my $file_age = -M $file; - $newest_age = $file_age if !$newest_age || $file_age < $newest_age; - } - - $newest_age = 0 if !$newest_age; - - return $newest_age; -} - -sub create_cache -{ - print "Generating and caching the translation database\n" unless $QUIET_ARG; - - &create_translation_database; - - open CACHE, ">$cache_file" || die; - print CACHE join "\x01", %translations; - close CACHE; -} - -sub load_cache -{ - print "Found cached translation database\n" unless $QUIET_ARG; - - my $contents; - open CACHE, "<$cache_file" || die; - { - local $/; - $contents = ; - } - close CACHE; - %translations = split "\x01", $contents; -} - -sub get_cached_translation_database -{ - my $cache_file_age = -M $cache_file; - if (defined $cache_file_age) - { - if ($cache_file_age <= &get_newest_po_age) - { - &load_cache; - return; - } - print "Found too-old cached translation database\n" unless $QUIET_ARG; - } - - &create_cache; -} - -sub create_translation_database -{ - for my $lang (keys %po_files_by_lang) - { - my $po_file = $po_files_by_lang{$lang}; - - if ($UTF8_ARG) - { - my $encoding = get_po_encoding ($po_file); - - if (lc $encoding eq "utf-8") - { - open PO_FILE, "<$po_file"; - } - else - { - print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; - - open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|"; - } - } - else - { - open PO_FILE, "<$po_file"; - } - - my $nextfuzzy = 0; - my $inmsgid = 0; - my $inmsgstr = 0; - my $msgid = ""; - my $msgstr = ""; - - while () - { - $nextfuzzy = 1 if /^#, fuzzy/; - - if (/^msgid "((\\.|[^\\]+)*)"/ ) - { - $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; - $msgid = ""; - $msgstr = ""; - - if ($nextfuzzy) { - $inmsgid = 0; - } else { - $msgid = unescape_po_string($1); - $inmsgid = 1; - } - $inmsgstr = 0; - $nextfuzzy = 0; - } - - if (/^msgstr "((\\.|[^\\]+)*)"/) - { - $msgstr = unescape_po_string($1); - $inmsgstr = 1; - $inmsgid = 0; - } - - if (/^"((\\.|[^\\]+)*)"/) - { - $msgid .= unescape_po_string($1) if $inmsgid; - $msgstr .= unescape_po_string($1) if $inmsgstr; - } - } - $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; - } -} - -sub finalize -{ -} - -sub unescape_one_sequence -{ - my ($sequence) = @_; - - return "\\" if $sequence eq "\\\\"; - return "\"" if $sequence eq "\\\""; - return "\n" if $sequence eq "\\n"; - return "\r" if $sequence eq "\\r"; - return "\t" if $sequence eq "\\t"; - return "\b" if $sequence eq "\\b"; - return "\f" if $sequence eq "\\f"; - return "\a" if $sequence eq "\\a"; - return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) - - return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); - return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); - - # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 - - return $sequence; -} - -sub unescape_po_string -{ - my ($string) = @_; - - $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; - - return $string; -} - -sub entity_decode -{ - local ($_) = @_; - - s/'/'/g; # ' - s/"/"/g; # " - s/<//g; - s/&/&/g; - - return $_; -} - -# entity_encode: (string) -# -# Encode the given string to XML format (encode '<' etc). - -sub entity_encode -{ - my ($pre_encoded) = @_; - - my @list_of_chars = unpack ('C*', $pre_encoded); - - # with UTF-8 we only encode minimalistic - return join ('', map (&entity_encode_int_minimalist, @list_of_chars)); -} - -sub entity_encode_int_minimalist -{ - return """ if $_ == 34; - return "&" if $_ == 38; - return "'" if $_ == 39; - return "<" if $_ == 60; - return ">" if $_ == 62; - return chr $_; -} - -sub entity_encoded_translation -{ - my ($lang, $string) = @_; - - my $translation = $translations{$lang, $string}; - return $string if !$translation; - return entity_encode ($translation); -} - -## XML (bonobo-activation specific) merge code - -sub ba_merge_translations -{ - my $source; - - { - local $/; # slurp mode - open INPUT, "<$FILE" or die "can't open $FILE: $!"; - $source = ; - close INPUT; - } - - open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; - # Binmode so that selftest works ok if using a native Win32 Perl... - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) - { - print OUTPUT $1; - - my $node = $2 . "\n"; - - my @strings = (); - $_ = $node; - while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { - push @strings, entity_decode($3); - } - print OUTPUT; - - my %langs; - for my $string (@strings) - { - for my $lang (keys %po_files_by_lang) - { - $langs{$lang} = 1 if $translations{$lang, $string}; - } - } - - for my $lang (sort keys %langs) - { - $_ = $node; - s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; - s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; - print OUTPUT; - } - } - - print OUTPUT $source; - - close OUTPUT; -} - - -## XML (non-bonobo-activation) merge code - - -# Process tag attributes -# Only parameter is a HASH containing attributes -> values mapping -sub getAttributeString -{ - my $sub = shift; - my $do_translate = shift || 0; - my $language = shift || ""; - my $result = ""; - my $translate = shift; - foreach my $e (reverse(sort(keys %{ $sub }))) { - my $key = $e; - my $string = $sub->{$e}; - my $quote = '"'; - - $string =~ s/^[\s]+//; - $string =~ s/[\s]+$//; - - if ($string =~ /^'.*'$/) - { - $quote = "'"; - } - $string =~ s/^['"]//g; - $string =~ s/['"]$//g; - - if ($do_translate && $key =~ /^_/) { - $key =~ s|^_||g; - if ($language) { - # Handle translation - my $decode_string = entity_decode($string); - my $translation = $translations{$language, $decode_string}; - if ($translation) { - $translation = entity_encode($translation); - $string = $translation; - } - $$translate = 2; - } else { - $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate - } - } - - $result .= " $key=$quote$string$quote"; - } - return $result; -} - -# Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree -sub getXMLstring -{ - my $ref = shift; - my $spacepreserve = shift || 0; - my @list = @{ $ref }; - my $result = ""; - - my $count = scalar(@list); - my $attrs = $list[0]; - my $index = 1; - - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - - while ($index < $count) { - my $type = $list[$index]; - my $content = $list[$index+1]; - if (! $type ) { - # We've got CDATA - if ($content) { - # lets strip the whitespace here, and *ONLY* here - $content =~ s/\s+/ /gs if (!$spacepreserve); - $result .= $content; - } - } elsif ( "$type" ne "1" ) { - # We've got another element - $result .= "<$type"; - $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements - if ($content) { - my $subresult = getXMLstring($content, $spacepreserve); - if ($subresult) { - $result .= ">".$subresult . ""; - } else { - $result .= "/>"; - } - } else { - $result .= "/>"; - } - } - $index += 2; - } - return $result; -} - -# Translate list of nodes if necessary -sub translate_subnodes -{ - my $fh = shift; - my $content = shift; - my $language = shift || ""; - my $singlelang = shift || 0; - my $spacepreserve = shift || 0; - - my @nodes = @{ $content }; - - my $count = scalar(@nodes); - my $index = 0; - while ($index < $count) { - my $type = $nodes[$index]; - my $rest = $nodes[$index+1]; - if ($singlelang) { - my $oldMO = $MULTIPLE_OUTPUT; - $MULTIPLE_OUTPUT = 1; - traverse($fh, $type, $rest, $language, $spacepreserve); - $MULTIPLE_OUTPUT = $oldMO; - } else { - traverse($fh, $type, $rest, $language, $spacepreserve); - } - $index += 2; - } -} - -sub isWellFormedXmlFragment -{ - my $ret = eval 'require XML::Parser'; - if(!$ret) { - die "You must have XML::Parser installed to run $0\n\n"; - } - - my $fragment = shift; - return 0 if (!$fragment); - - $fragment = "$fragment"; - my $xp = new XML::Parser(Style => 'Tree'); - my $tree = 0; - eval { $tree = $xp->parse($fragment); }; - return $tree; -} - -sub traverse -{ - my $fh = shift; - my $nodename = shift; - my $content = shift; - my $language = shift || ""; - my $spacepreserve = shift || 0; - - if (!$nodename) { - if ($content =~ /^[\s]*$/) { - $leading_space .= $content; - } - print $fh $content; - } else { - # element - my @all = @{ $content }; - my $attrs = shift @all; - my $translate = 0; - my $outattr = getAttributeString($attrs, 1, $language, \$translate); - - if ($nodename =~ /^_/) { - $translate = 1; - $nodename =~ s/^_//; - } - my $lookup = ''; - - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - print $fh "<$nodename", $outattr; - if ($translate) { - $lookup = getXMLstring($content, $spacepreserve); - if (!$spacepreserve) { - $lookup =~ s/^\s+//s; - $lookup =~ s/\s+$//s; - } - - if ($lookup || $translate == 2) { - my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); - if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { - $translation = $lookup if (!$translation); - print $fh " xml:lang=\"", $language, "\"" if $language; - print $fh ">"; - if ($translate == 2) { - translate_subnodes($fh, \@all, $language, 1, $spacepreserve); - } else { - print $fh $translation; - } - print $fh ""; - - return; # this means there will be no same translation with xml:lang="$language"... - # if we want them both, just remove this "return" - } else { - print $fh ">"; - if ($translate == 2) { - translate_subnodes($fh, \@all, $language, 1, $spacepreserve); - } else { - print $fh $lookup; - } - print $fh ""; - } - } else { - print $fh "/>"; - } - - for my $lang (sort keys %po_files_by_lang) { - if ($MULTIPLE_OUTPUT && $lang ne "$language") { - next; - } - if ($lang) { - # Handle translation - # - my $translate = 0; - my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); - my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); - if ($translate && !$translation) { - $translation = $lookup; - } - - if ($translation || $translate) { - print $fh "\n"; - $leading_space =~ s/.*\n//g; - print $fh $leading_space; - print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; - if ($translate == 2) { - translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); - } else { - print $fh $translation; - } - print $fh ""; - } - } - } - - } else { - my $count = scalar(@all); - if ($count > 0) { - print $fh ">"; - my $index = 0; - while ($index < $count) { - my $type = $all[$index]; - my $rest = $all[$index+1]; - traverse($fh, $type, $rest, $language, $spacepreserve); - $index += 2; - } - print $fh ""; - } else { - print $fh "/>"; - } - } - } -} - -sub intltool_tree_comment -{ - my $expat = shift; - my $data = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - push @$clist, 1 => $data; -} - -sub intltool_tree_cdatastart -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - push @$clist, 0 => $expat->original_string(); -} - -sub intltool_tree_cdataend -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - $clist->[$pos] .= $expat->original_string(); -} - -sub intltool_tree_char -{ - my $expat = shift; - my $text = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - # Use original_string so that we retain escaped entities - # in CDATA sections. - # - if ($pos > 0 and $clist->[$pos - 1] eq '0') { - $clist->[$pos] .= $expat->original_string(); - } else { - push @$clist, 0 => $expat->original_string(); - } -} - -sub intltool_tree_start -{ - my $expat = shift; - my $tag = shift; - my @origlist = (); - - # Use original_string so that we retain escaped entities - # in attribute values. We must convert the string to an - # @origlist array to conform to the structure of the Tree - # Style. - # - my @original_array = split /\x/, $expat->original_string(); - my $source = $expat->original_string(); - - # Remove leading tag. - # - $source =~ s|^\s*<\s*(\S+)||s; - - # Grab attribute key/value pairs and push onto @origlist array. - # - while ($source) - { - if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; - push @origlist, $1; - push @origlist, '"' . $2 . '"'; - } - elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; - push @origlist, $1; - push @origlist, "'" . $2 . "'"; - } - else - { - last; - } - } - - my $ol = [ { @origlist } ]; - - push @{ $expat->{Lists} }, $expat->{Curlist}; - push @{ $expat->{Curlist} }, $tag => $ol; - $expat->{Curlist} = $ol; -} - -sub readXml -{ - my $filename = shift || return; - if(!-f $filename) { - die "ERROR Cannot find filename: $filename\n"; - } - - my $ret = eval 'require XML::Parser'; - if(!$ret) { - die "You must have XML::Parser installed to run $0\n\n"; - } - my $xp = new XML::Parser(Style => 'Tree'); - $xp->setHandlers(Char => \&intltool_tree_char); - $xp->setHandlers(Start => \&intltool_tree_start); - $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); - $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); - my $tree = $xp->parsefile($filename); - -# Hello thereHowdydo -# would be: -# [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, -# 0, "Howdy", ref, [{}]], 0, "do" ] ] - - return $tree; -} - -sub print_header -{ - my $infile = shift; - my $fh = shift; - my $source; - - if(!-f $infile) { - die "ERROR Cannot find filename: $infile\n"; - } - - print $fh qq{\n}; - { - local $/; - open DOCINPUT, "<${FILE}" or die; - $source = ; - close DOCINPUT; - } - if ($source =~ /()/s) - { - print $fh "$1\n"; - } - elsif ($source =~ /(]*>)/s) - { - print $fh "$1\n"; - } -} - -sub parseTree -{ - my $fh = shift; - my $ref = shift; - my $language = shift || ""; - - my $name = shift @{ $ref }; - my $cont = shift @{ $ref }; - - while (!$name || "$name" eq "1") { - $name = shift @{ $ref }; - $cont = shift @{ $ref }; - } - - my $spacepreserve = 0; - my $attrs = @{$cont}[0]; - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - traverse($fh, $name, $cont, $language, $spacepreserve); -} - -sub xml_merge_output -{ - my $source; - - if ($MULTIPLE_OUTPUT) { - for my $lang (sort keys %po_files_by_lang) { - if ( ! -d $lang ) { - mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; - } - open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - my $tree = readXml($FILE); - print_header($FILE, \*OUTPUT); - parseTree(\*OUTPUT, $tree, $lang); - close OUTPUT; - print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; - } - if ( ! -d "C" ) { - mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n"; - } - open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - my $tree = readXml($FILE); - print_header($FILE, \*OUTPUT); - parseTree(\*OUTPUT, $tree); - close OUTPUT; - print "CREATED C/$OUTFILE\n" unless $QUIET_ARG; - } else { - open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - my $tree = readXml($FILE); - print_header($FILE, \*OUTPUT); - parseTree(\*OUTPUT, $tree); - close OUTPUT; - print "CREATED $OUTFILE\n" unless $QUIET_ARG; - } -} - -sub keys_merge_translation -{ - my ($lang) = @_; - - if ( ! -d $lang && $MULTIPLE_OUTPUT) - { - mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; - } - - open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n"; - open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while () - { - if (s/^(\s*)_(\w+=(.*))/$1$2/) - { - my $string = $3; - - if (!$MULTIPLE_OUTPUT) - { - print OUTPUT; - - my $non_translated_line = $_; - - for my $lang (sort keys %po_files_by_lang) - { - my $translation = $translations{$lang, $string}; - next if !$translation; - - $_ = $non_translated_line; - s/(\w+)=.*/[$lang]$1=$translation/; - print OUTPUT; - } - } - else - { - my $non_translated_line = $_; - my $translation = $translations{$lang, $string}; - $translation = $string if !$translation; - - $_ = $non_translated_line; - s/(\w+)=.*/$1=$translation/; - print OUTPUT; - } - } - else - { - print OUTPUT; - } - } - - close OUTPUT; - close INPUT; - - print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; -} - -sub keys_merge_translations -{ - if ($MULTIPLE_OUTPUT) - { - for my $lang (sort keys %po_files_by_lang) - { - keys_merge_translation ($lang); - } - keys_merge_translation ("C"); - } - else - { - keys_merge_translation ("."); - } -} - -sub desktop_merge_translations -{ - open INPUT, "<${FILE}" or die; - open OUTPUT, ">${OUTFILE}" or die; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while () - { - if (s/^(\s*)_(\w+=(.*))/$1$2/) - { - my $string = $3; - - print OUTPUT; - - my $non_translated_line = $_; - - for my $lang (sort keys %po_files_by_lang) - { - my $translation = $translations{$lang, $string}; - next if !$translation; - - $_ = $non_translated_line; - s/(\w+)=.*/${1}[$lang]=$translation/; - print OUTPUT; - } - } - else - { - print OUTPUT; - } - } - - close OUTPUT; - close INPUT; -} - -sub schemas_merge_translations -{ - my $source; - - { - local $/; # slurp mode - open INPUT, "<$FILE" or die "can't open $FILE: $!"; - $source = ; - close INPUT; - } - - open OUTPUT, ">$OUTFILE" or die; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - # FIXME: support attribute translations - - # Empty nodes never need translation, so unmark all of them. - # For example, <_foo/> is just replaced by . - $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; - - while ($source =~ s/ - (.*?) - (\s+)((\s*) - (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) - (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) - (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) - <\/locale>) - //sx) - { - print OUTPUT $1; - - my $locale_start_spaces = $2 ? $2 : ''; - my $default_spaces = $4 ? $4 : ''; - my $short_spaces = $7 ? $7 : ''; - my $long_spaces = $10 ? $10 : ''; - my $locale_end_spaces = $13 ? $13 : ''; - my $c_default_block = $3 ? $3 : ''; - my $default_string = $6 ? $6 : ''; - my $short_string = $9 ? $9 : ''; - my $long_string = $12 ? $12 : ''; - - print OUTPUT "$locale_start_spaces$c_default_block"; - - $default_string =~ s/\s+/ /g; - $default_string = entity_decode($default_string); - $short_string =~ s/\s+/ /g; - $short_string = entity_decode($short_string); - $long_string =~ s/\s+/ /g; - $long_string = entity_decode($long_string); - - for my $lang (sort keys %po_files_by_lang) - { - my $default_translation = $translations{$lang, $default_string}; - my $short_translation = $translations{$lang, $short_string}; - my $long_translation = $translations{$lang, $long_string}; - - next if (!$default_translation && !$short_translation && - !$long_translation); - - print OUTPUT "\n$locale_start_spaces"; - - print OUTPUT "$default_spaces"; - - if ($default_translation) - { - $default_translation = entity_encode($default_translation); - print OUTPUT "$default_translation"; - } - - print OUTPUT "$short_spaces"; - - if ($short_translation) - { - $short_translation = entity_encode($short_translation); - print OUTPUT "$short_translation"; - } - - print OUTPUT "$long_spaces"; - - if ($long_translation) - { - $long_translation = entity_encode($long_translation); - print OUTPUT "$long_translation"; - } - - print OUTPUT "$locale_end_spaces"; - } - } - - print OUTPUT $source; - - close OUTPUT; -} - -sub rfc822deb_merge_translations -{ - my %encodings = (); - for my $lang (keys %po_files_by_lang) { - $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); - } - - my $source; - - $Text::Wrap::huge = 'overflow'; - $Text::Wrap::break = qr/\n|\s(?=\S)/; - - { - local $/; # slurp mode - open INPUT, "<$FILE" or die "can't open $FILE: $!"; - $source = ; - close INPUT; - } - - open OUTPUT, ">${OUTFILE}" or die; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) - { - my $sep = $1; - my $non_translated_line = $3.$4; - my $string = $5; - my $underscore = length($2); - next if $underscore eq 0 && $non_translated_line =~ /^#/; - # Remove [] dummy strings - my $stripped = $string; - $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; - $stripped =~ s/\[\s[^\[\]]*\]$//; - $non_translated_line .= $stripped; - - print OUTPUT $sep.$non_translated_line; - - if ($underscore) - { - my @str_list = rfc822deb_split($underscore, $string); - - for my $lang (sort keys %po_files_by_lang) - { - my $is_translated = 1; - my $str_translated = ''; - my $first = 1; - - for my $str (@str_list) - { - my $translation = $translations{$lang, $str}; - - if (!$translation) - { - $is_translated = 0; - last; - } - - # $translation may also contain [] dummy - # strings, mostly to indicate an empty string - $translation =~ s/\[\s[^\[\]]*\]$//; - - if ($first) - { - if ($underscore eq 2) - { - $str_translated .= $translation; - } - else - { - $str_translated .= - Text::Tabs::expand($translation) . - "\n"; - } - } - else - { - if ($underscore eq 2) - { - $str_translated .= ', ' . $translation; - } - else - { - $str_translated .= Text::Tabs::expand( - Text::Wrap::wrap(' ', ' ', $translation)) . - "\n .\n"; - } - } - $first = 0; - - # To fix some problems with Text::Wrap::wrap - $str_translated =~ s/(\n )+\n/\n .\n/g; - } - next unless $is_translated; - - $str_translated =~ s/\n \.\n$//; - $str_translated =~ s/\s+$//; - - $_ = $non_translated_line; - s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; - print OUTPUT; - } - } - } - print OUTPUT "\n"; - - close OUTPUT; - close INPUT; -} - -sub rfc822deb_split -{ - # Debian defines a special way to deal with rfc822-style files: - # when a value contain newlines, it consists of - # 1. a short form (first line) - # 2. a long description, all lines begin with a space, - # and paragraphs are separated by a single dot on a line - # This routine returns an array of all paragraphs, and reformat - # them. - # When first argument is 2, the string is a comma separated list of - # values. - my $type = shift; - my $text = shift; - $text =~ s/^[ \t]//mg; - return (split(/, */, $text, 0)) if $type ne 1; - return ($text) if $text !~ /\n/; - - $text =~ s/([^\n]*)\n//; - my @list = ($1); - my $str = ''; - - for my $line (split (/\n/, $text)) - { - chomp $line; - if ($line =~ /^\.\s*$/) - { - # New paragraph - $str =~ s/\s*$//; - push(@list, $str); - $str = ''; - } - elsif ($line =~ /^\s/) - { - # Line which must not be reformatted - $str .= "\n" if length ($str) && $str !~ /\n$/; - $line =~ s/\s+$//; - $str .= $line."\n"; - } - else - { - # Continuation line, remove newline - $str .= " " if length ($str) && $str !~ /\n$/; - $str .= $line; - } - } - - $str =~ s/\s*$//; - push(@list, $str) if length ($str); - - return @list; -} - -sub quoted_translation -{ - my ($xml_mode, $lang, $string) = @_; - - $string = entity_decode($string) if $xml_mode; - $string =~ s/\\\"/\"/g; - - my $translation = $translations{$lang, $string}; - $translation = $string if !$translation; - $translation = entity_encode($translation) if $xml_mode; - $translation =~ s/\"/\\\"/g; - return $translation -} - -sub quoted_merge_translations -{ - my ($xml_mode) = @_; - - if (!$MULTIPLE_OUTPUT) { - print "Quoted only supports Multiple Output.\n"; - exit(1); - } - - for my $lang (sort keys %po_files_by_lang) { - if ( ! -d $lang ) { - mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; - } - open INPUT, "<${FILE}" or die; - open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - while () - { - s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . "ed_translation($xml_mode, $lang, $1) . "\""/ge; - print OUTPUT; - } - close OUTPUT; - close INPUT; - } -} diff -Nru gnome-chemistry-utils-0.8.6/intltool-update.in gnome-chemistry-utils-0.10.9/intltool-update.in --- gnome-chemistry-utils-0.8.6/intltool-update.in 2007-12-17 22:02:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/intltool-update.in 2009-11-14 11:45:57.000000000 +0100 @@ -1,1164 +0,0 @@ -#!@INTLTOOL_PERL@ -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# -# The Intltool Message Updater -# -# Copyright (C) 2000-2003 Free Software Foundation. -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 published by the Free Software Foundation. -# -# Intltool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# -# Authors: Kenneth Christiansen -# Maciej Stachowiak -# Darin Adler - -## Release information -my $PROGRAM = "intltool-update"; -my $VERSION = "0.37.0"; -my $PACKAGE = "intltool"; - -## Loaded modules -use strict; -use Getopt::Long; -use Cwd; -use File::Copy; -use File::Find; - -## Scalars used by the option stuff -my $HELP_ARG = 0; -my $VERSION_ARG = 0; -my $DIST_ARG = 0; -my $POT_ARG = 0; -my $HEADERS_ARG = 0; -my $MAINTAIN_ARG = 0; -my $REPORT_ARG = 0; -my $VERBOSE = 0; -my $GETTEXT_PACKAGE = ""; -my $OUTPUT_FILE = ""; - -my @languages; -my %varhash = (); -my %po_files_by_lang = (); - -# Regular expressions to categorize file types. -# FIXME: Please check if the following is correct - -my $xml_support = -"xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) -"ui|". # Bonobo specific - User Interface desc. files -"lang|". # ? -"glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) -"scm(?:\\.in)*|". # ? (Note: .in is not required) -"oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files -"etspec|". # ? -"server(?:\\.in)+|". # Bonobo specific -"sheet(?:\\.in)+|". # ? -"schemas(?:\\.in)+|". # GConf specific -"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. -"kbd(?:\\.in)+|". # GOK specific. -"policy(?:\\.in)+"; # PolicyKit files - -my $ini_support = -"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec -"desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec -"caves(?:\\.in)+|". # GNOME Games specific -"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec -"soundlist(?:\\.in)+|". # GNOME specific -"keys(?:\\.in)+|". # GNOME Mime database specific -"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec -"service(?:\\.in)+"; # DBus specific - -my $buildin_gettext_support = -"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; - -## Always flush buffer when printing -$| = 1; - -## Sometimes the source tree will be rooted somewhere else. -my $SRCDIR = $ENV{"srcdir"} || "."; -my $POTFILES_in; - -$POTFILES_in = "<$SRCDIR/POTFILES.in"; - -my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); - -## Handle options -GetOptions -( - "help" => \$HELP_ARG, - "version" => \$VERSION_ARG, - "dist|d" => \$DIST_ARG, - "pot|p" => \$POT_ARG, - "headers|s" => \$HEADERS_ARG, - "maintain|m" => \$MAINTAIN_ARG, - "report|r" => \$REPORT_ARG, - "verbose|x" => \$VERBOSE, - "gettext-package|g=s" => \$GETTEXT_PACKAGE, - "output-file|o=s" => \$OUTPUT_FILE, - ) or &Console_WriteError_InvalidOption; - -&Console_Write_IntltoolHelp if $HELP_ARG; -&Console_Write_IntltoolVersion if $VERSION_ARG; - -my $arg_count = ($DIST_ARG > 0) - + ($POT_ARG > 0) - + ($HEADERS_ARG > 0) - + ($MAINTAIN_ARG > 0) - + ($REPORT_ARG > 0); - -&Console_Write_IntltoolHelp if $arg_count > 1; - -my $PKGNAME = FindPackageName (); - -# --version and --help don't require a module name -my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown"; - -if ($POT_ARG) -{ - &GenerateHeaders; - &GeneratePOTemplate; -} -elsif ($HEADERS_ARG) -{ - &GenerateHeaders; -} -elsif ($MAINTAIN_ARG) -{ - &FindLeftoutFiles; -} -elsif ($REPORT_ARG) -{ - &GenerateHeaders; - &GeneratePOTemplate; - &Console_Write_CoverageReport; -} -elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) -{ - my $lang = $ARGV[0]; - - ## Report error if the language file supplied - ## to the command line is non-existent - &Console_WriteError_NotExisting("$SRCDIR/$lang.po") - if ! -s "$SRCDIR/$lang.po"; - - if (!$DIST_ARG) - { - print "Working, please wait..." if $VERBOSE; - &GenerateHeaders; - &GeneratePOTemplate; - } - &POFile_Update ($lang, $OUTPUT_FILE); - &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); -} -else -{ - &Console_Write_IntltoolHelp; -} - -exit; - -######### - -sub Console_Write_IntltoolVersion -{ - print <<_EOF_; -${PROGRAM} (${PACKAGE}) $VERSION -Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. - -Copyright (C) 2000-2003 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -sub Console_Write_IntltoolHelp -{ - print <<_EOF_; -Usage: ${PROGRAM} [OPTION]... LANGCODE -Updates PO template files and merge them with the translations. - -Mode of operation (only one is allowed): - -p, --pot generate the PO template only - -s, --headers generate the header files in POTFILES.in - -m, --maintain search for left out files from POTFILES.in - -r, --report display a status report for the module - -d, --dist merge LANGCODE.po with existing PO template - -Extra options: - -g, --gettext-package=NAME override PO template name, useful with --pot - -o, --output-file=FILE write merged translation to FILE - -x, --verbose display lots of feedback - --help display this help and exit - --version output version information and exit - -Examples of use: -${PROGRAM} --pot just create a new PO template -${PROGRAM} xy create new PO template and merge xy.po with it - -Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") -or send email to . -_EOF_ - exit; -} - -sub echo_n -{ - my $str = shift; - my $ret = `echo "$str"`; - - $ret =~ s/\n$//; # do we need the "s" flag? - - return $ret; -} - -sub POFile_DetermineType ($) -{ - my $type = $_; - my $gettext_type; - - my $xml_regex = "(?:" . $xml_support . ")"; - my $ini_regex = "(?:" . $ini_support . ")"; - my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; - - if ($type =~ /\[type: gettext\/([^\]].*)]/) - { - $gettext_type=$1; - } - elsif ($type =~ /schemas(\.in)+$/) - { - $gettext_type="schemas"; - } - elsif ($type =~ /glade2?(\.in)*$/) - { - $gettext_type="glade"; - } - elsif ($type =~ /scm(\.in)*$/) - { - $gettext_type="scheme"; - } - elsif ($type =~ /keys(\.in)+$/) - { - $gettext_type="keys"; - } - - # bucket types - - elsif ($type =~ /$xml_regex$/) - { - $gettext_type="xml"; - } - elsif ($type =~ /$ini_regex$/) - { - $gettext_type="ini"; - } - elsif ($type =~ /$buildin_regex$/) - { - $gettext_type="buildin"; - } - else - { - $gettext_type="unknown"; - } - - return "gettext\/$gettext_type"; -} - -sub TextFile_DetermineEncoding ($) -{ - my $gettext_code="ASCII"; # All files are ASCII by default - my $filetype=`file $_ | cut -d ' ' -f 2`; - - if ($? eq "0") - { - if ($filetype =~ /^(ISO|UTF)/) - { - chomp ($gettext_code = $filetype); - } - elsif ($filetype =~ /^XML/) - { - $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 - } - } - - return $gettext_code; -} - -sub isNotValidMissing -{ - my ($file) = @_; - - return if $file =~ /^\{arch\}\/.*$/; - return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; -} - -sub FindLeftoutFiles -{ - my (@buf_i18n_plain, - @buf_i18n_xml, - @buf_i18n_xml_unmarked, - @buf_i18n_ini, - @buf_potfiles, - @buf_potfiles_ignore, - @buf_allfiles, - @buf_allfiles_sorted, - @buf_potfiles_sorted, - @buf_potfiles_ignore_sorted - ); - - ## Search and find all translatable files - find sub { - push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; - push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; - push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; - push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; - }, ".."; - find sub { - push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; - push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; - push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; - push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; - }, "$SRCDIR/.." if "$SRCDIR" ne "."; - - open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; - @buf_potfiles = grep !/^(#|\s*$)/, ; - close POTFILES; - - foreach (@buf_potfiles) { - s/^\[.*]\s*//; - } - - print "Searching for missing translatable files...\n" if $VERBOSE; - - ## Check if we should ignore some found files, when - ## comparing with POTFILES.in - foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") - { - (-s "$SRCDIR/$ignore") or next; - - if ("$ignore" eq "POTFILES.ignore") - { - print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". - "content of this file to POTFILES.skip.\n"; - } - - print "Found $ignore: Ignoring files...\n" if $VERBOSE; - open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n"; - - while () - { - push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; - } - close FILE; - - @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore); - } - - foreach my $file (@buf_i18n_plain) - { - my $in_comment = 0; - my $in_macro = 0; - - open FILE, "<$file"; - while () - { - # Handle continued multi-line comment. - if ($in_comment) - { - next unless s-.*\*/--; - $in_comment = 0; - } - - # Handle continued macro. - if ($in_macro) - { - $in_macro = 0 unless /\\$/; - next; - } - - # Handle start of macro (or any preprocessor directive). - if (/^\s*\#/) - { - $in_macro = 1 if /^([^\\]|\\.)*\\$/; - next; - } - - # Handle comments and quoted text. - while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy - { - my $match = $1; - if ($match eq "/*") - { - if (!s-/\*.*?\*/--) - { - s-/\*.*--; - $in_comment = 1; - } - } - elsif ($match eq "//") - { - s-//.*--; - } - else # ' or " - { - if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) - { - warn "mismatched quotes at line $. in $file\n"; - s-$match.*--; - } - } - } - - if (/\w\.GetString *\(QUOTEDTEXT/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - ## Remove the first 3 chars and add newline - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - - ## C_ N_ Q_ and _ are the macros defined in gi8n.h - if (/[CNQ]?_ *\(QUOTEDTEXT/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - ## Remove the first 3 chars and add newline - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_xml) - { - open FILE, "<$file"; - - while () - { - # FIXME: share the pattern matching code with intltool-extract - if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_ini) - { - open FILE, "<$file"; - while () - { - if (/_(.*)=/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_xml_unmarked) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - } - - - @buf_allfiles_sorted = sort (@buf_allfiles); - @buf_potfiles_sorted = sort (@buf_potfiles); - - my %in2; - foreach (@buf_potfiles_sorted) - { - s#^$SRCDIR/../##; - s#^$SRCDIR/##; - $in2{$_} = 1; - } - - foreach (@buf_potfiles_ignore_sorted) - { - s#^$SRCDIR/../##; - s#^$SRCDIR/##; - $in2{$_} = 1; - } - - my @result; - - foreach (@buf_allfiles_sorted) - { - my $dummy = $_; - my $srcdir = $SRCDIR; - - $srcdir =~ s#^../##; - $dummy =~ s#^$srcdir/../##; - $dummy =~ s#^$srcdir/##; - $dummy =~ s#_build/##; - if (!exists($in2{$dummy})) - { - push @result, $dummy - } - } - - my @buf_potfiles_notexist; - - foreach (@buf_potfiles_sorted) - { - chomp (my $dummy = $_); - if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy")) - { - push @buf_potfiles_notexist, $_; - } - } - - ## Save file with information about the files missing - ## if any, and give information about this procedure. - if (@result + @buf_potfiles_notexist > 0) - { - if (@result) - { - print "\n" if $VERBOSE; - unlink "missing"; - open OUT, ">missing"; - print OUT @result; - close OUT; - warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". - "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; - print STDERR @result, "\n"; - warn "If some of these files are left out on purpose then please add them to\n". - "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". - "of left out files has been written in the current directory.\n"; - } - if (@buf_potfiles_notexist) - { - unlink "notexist"; - open OUT, ">notexist"; - print OUT @buf_potfiles_notexist; - close OUT; - warn "\n" if ($VERBOSE or @result); - warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; - warn @buf_potfiles_notexist, "\n"; - warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n". - "containing this list of absent files has been written in the current directory.\n"; - } - } - - ## If there is nothing to complain about, notify the user - else { - print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; - } -} - -sub Console_WriteError_InvalidOption -{ - ## Handle invalid arguments - print STDERR "Try `${PROGRAM} --help' for more information.\n"; - exit 1; -} - -sub isProgramInPath -{ - my ($file) = @_; - # If either a file exists, or when run it returns 0 exit status - return 1 if ((-x $file) or (system("$file --version >$devnull") == 0)); - return 0; -} - -sub isGNUGettextTool -{ - my ($file) = @_; - # Check that we are using GNU gettext tools - if (isProgramInPath ($file)) - { - my $version = `$file --version`; - return 1 if ($version =~ m/.*\(GNU .*\).*/); - } - return 0; -} - -sub GenerateHeaders -{ - my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract"; - - ## Generate the .h header files, so we can allow glade and - ## xml translation support - if (! isProgramInPath ("$EXTRACT")) - { - print STDERR "\n *** The intltool-extract script wasn't found!" - ."\n *** Without it, intltool-update can not generate files.\n"; - exit; - } - else - { - open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; - - while () - { - chomp; - next if /^\[\s*encoding/; - - ## Find xml files in POTFILES.in and generate the - ## files with help from the extract script - - my $gettext_type= &POFile_DetermineType ($1); - - if (/\.($xml_support|$ini_support)$/ || /^\[/) - { - s/^\[[^\[].*]\s*//; - - my $filename = "../$_"; - - if ($VERBOSE) - { - system ($EXTRACT, "--update", "--srcdir=$SRCDIR", - "--type=$gettext_type", $filename); - } - else - { - system ($EXTRACT, "--update", "--type=$gettext_type", - "--srcdir=$SRCDIR", "--quiet", $filename); - } - } - } - close FILE; - } -} - -# -# Generate .pot file from POTFILES.in -# -sub GeneratePOTemplate -{ - my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext"; - my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; - chomp $XGETTEXT; - - if (! isGNUGettextTool ("$XGETTEXT")) - { - print STDERR " *** GNU xgettext is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - print "Building $MODULE.pot...\n" if $VERBOSE; - - open INFILE, $POTFILES_in; - unlink "POTFILES.in.temp"; - open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); - - my $gettext_support_nonascii = 0; - - # checks for GNU gettext >= 0.12 - my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; - if ($? == 0) - { - $gettext_support_nonascii = 1; - } - else - { - # urge everybody to upgrade gettext - print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". - " strings. That means you should install a version of gettext\n". - " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". - " or have to let non-ASCII strings untranslated. (If there is any)\n"; - } - - my $encoding = "ASCII"; - my $forced_gettext_code; - my @temp_headers; - my $encoding_problem_is_reported = 0; - - while () - { - next if (/^#/ or /^\s*$/); - - chomp; - - my $gettext_code; - - if (/^\[\s*encoding:\s*(.*)\s*\]/) - { - $forced_gettext_code=$1; - } - elsif (/\.($xml_support|$ini_support)$/ || /^\[/) - { - s/^\[.*]\s*//; - print OUTFILE "../$_.h\n"; - push @temp_headers, "../$_.h"; - $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); - } - else - { - print OUTFILE "$SRCDIR/../$_\n"; - $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); - } - - next if (! $gettext_support_nonascii); - - if (defined $forced_gettext_code) - { - $encoding=$forced_gettext_code; - } - elsif (defined $gettext_code and "$encoding" ne "$gettext_code") - { - if ($encoding eq "ASCII") - { - $encoding=$gettext_code; - } - elsif ($gettext_code ne "ASCII") - { - # Only report once because the message is quite long - if (! $encoding_problem_is_reported) - { - print STDERR "WARNING: You should use the same file encoding for all your project files,\n". - " but $PROGRAM thinks that most of the source files are in\n". - " $encoding encoding, while \"$_\" is (likely) in\n". - " $gettext_code encoding. If you are sure that all translatable strings\n". - " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". - " line to POTFILES.in:\n\n". - " [encoding: UTF-8]\n\n". - " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". - "(such warning message will only be reported once.)\n"; - $encoding_problem_is_reported = 1; - } - } - } - } - - close OUTFILE; - close INFILE; - - unlink "$MODULE.pot"; - my @xgettext_argument=("$XGETTEXT", - "--add-comments", - "--directory\=.", - "--default-domain\=$MODULE", - "--flag\=g_strdup_printf:1:c-format", - "--flag\=g_string_printf:2:c-format", - "--flag\=g_string_append_printf:2:c-format", - "--flag\=g_error_new:3:c-format", - "--flag\=g_set_error:4:c-format", - "--flag\=g_markup_printf_escaped:1:c-format", - "--flag\=g_log:3:c-format", - "--flag\=g_print:1:c-format", - "--flag\=g_printerr:1:c-format", - "--flag\=g_printf:1:c-format", - "--flag\=g_fprintf:2:c-format", - "--flag\=g_sprintf:2:c-format", - "--flag\=g_snprintf:3:c-format", - "--flag\=g_scanner_error:2:c-format", - "--flag\=g_scanner_warn:2:c-format", - "--output\=$MODULE\.pot", - "--files-from\=\.\/POTFILES\.in\.temp"); - my $XGETTEXT_KEYWORDS = &FindPOTKeywords; - push @xgettext_argument, $XGETTEXT_KEYWORDS; - my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress; - push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS; - push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); - push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; - my $xgettext_command = join ' ', @xgettext_argument; - - # intercept xgettext error message - print "Running $xgettext_command\n" if $VERBOSE; - my $xgettext_error_msg = `$xgettext_command 2>\&1`; - my $command_failed = $?; - - unlink "POTFILES.in.temp"; - - print "Removing generated header (.h) files..." if $VERBOSE; - unlink foreach (@temp_headers); - print "done.\n" if $VERBOSE; - - if (! $command_failed) - { - if (! -e "$MODULE.pot") - { - print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; - } - else - { - print "Wrote $MODULE.pot\n" if $VERBOSE; - } - } - else - { - if ($xgettext_error_msg =~ /--from-code/) - { - # replace non-ASCII error message with a more useful one. - print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". - " string marked for translation. Please make sure that all strings marked\n". - " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". - " following line to POTFILES.in and rerun $PROGRAM:\n\n". - " [encoding: UTF-8]\n\n"; - } - else - { - print STDERR "$xgettext_error_msg"; - if (-e "$MODULE.pot") - { - # is this possible? - print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". - " Please consult error message above if there is any.\n"; - } - else - { - print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". - " error message above if there is any.\n"; - } - } - exit (1); - } -} - -sub POFile_Update -{ - -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; - - my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge"; - my ($lang, $outfile) = @_; - - if (! isGNUGettextTool ("$MSGMERGE")) - { - print STDERR " *** GNU msgmerge is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; - - my $infile = "$SRCDIR/$lang.po"; - $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); - - # I think msgmerge won't overwrite old file if merge is not successful - system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); -} - -sub Console_WriteError_NotExisting -{ - my ($file) = @_; - - ## Report error if supplied language file is non-existing - print STDERR "$PROGRAM: $file does not exist!\n"; - print STDERR "Try '$PROGRAM --help' for more information.\n"; - exit; -} - -sub GatherPOFiles -{ - my @po_files = glob ("./*.po"); - - @languages = map (&POFile_GetLanguage, @po_files); - - foreach my $lang (@languages) - { - $po_files_by_lang{$lang} = shift (@po_files); - } -} - -sub POFile_GetLanguage ($) -{ - s/^(.*\/)?(.+)\.po$/$2/; - return $_; -} - -sub Console_Write_TranslationStatus -{ - my ($lang, $output_file) = @_; - my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; - - if (! isGNUGettextTool ("$MSGFMT")) - { - print STDERR " *** GNU msgfmt is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); - - system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); -} - -sub Console_Write_CoverageReport -{ - my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; - - if (! isGNUGettextTool ("$MSGFMT")) - { - print STDERR " *** GNU msgfmt is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - &GatherPOFiles; - - foreach my $lang (@languages) - { - print STDERR "$lang: "; - &POFile_Update ($lang, ""); - } - - print STDERR "\n\n * Current translation support in $MODULE \n\n"; - - foreach my $lang (@languages) - { - print STDERR "$lang: "; - system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); - } -} - -sub SubstituteVariable -{ - my ($str) = @_; - - # always need to rewind file whenever it has been accessed - seek (CONF, 0, 0); - - # cache each variable. varhash is global to we can add - # variables elsewhere. - while () - { - if (/^(\w+)=(.*)$/) - { - ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; - } - } - - if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) - { - my $rest = $3; - my $untouched = $1; - my $sub = ""; - # Ignore recursive definitions of variables - $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; - - return SubstituteVariable ("$untouched$sub$rest"); - } - - # We're using Perl backticks ` and "echo -n" here in order to - # expand any shell escapes (such as backticks themselves) in every variable - return echo_n ($str); -} - -sub CONF_Handle_Open -{ - my $base_dirname = getcwd(); - $base_dirname =~ s@.*/@@; - - my ($conf_in, $src_dir); - - if ($base_dirname =~ /^po(-.+)?$/) - { - if (-f "Makevars") - { - my $makefile_source; - - local (*IN); - open (IN, ") - { - if (/^top_builddir[ \t]*=/) - { - $src_dir = $_; - $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; - - chomp $src_dir; - if (-f "$src_dir" . "/configure.ac") { - $conf_in = "$src_dir" . "/configure.ac" . "\n"; - } else { - $conf_in = "$src_dir" . "/configure.in" . "\n"; - } - last; - } - } - close IN; - - $conf_in || die "Cannot find top_builddir in Makevars."; - } - elsif (-f "$SRCDIR/../configure.ac") - { - $conf_in = "$SRCDIR/../configure.ac"; - } - elsif (-f "$SRCDIR/../configure.in") - { - $conf_in = "$SRCDIR/../configure.in"; - } - else - { - my $makefile_source; - - local (*IN); - open (IN, ") - { - if (/^top_srcdir[ \t]*=/) - { - $src_dir = $_; - $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; - - chomp $src_dir; - $conf_in = "$src_dir" . "/configure.in" . "\n"; - - last; - } - } - close IN; - - $conf_in || die "Cannot find top_srcdir in Makefile."; - } - - open (CONF, "<$conf_in"); - } - else - { - print STDERR "$PROGRAM: Unable to proceed.\n" . - "Make sure to run this script inside the po directory.\n"; - exit; - } -} - -sub FindPackageName -{ - my $version; - my $domain = &FindMakevarsDomain; - my $name = $domain || "untitled"; - - &CONF_Handle_Open; - - my $conf_source; { - local (*IN); - open (IN, "<&CONF") || return $name; - seek (IN, 0, 0); - local $/; # slurp mode - $conf_source = ; - close IN; - } - - # priority for getting package name: - # 1. GETTEXT_PACKAGE - # 2. first argument of AC_INIT (with >= 2 arguments) - # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) - - # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m - # the \s makes this not work, why? - if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) - { - ($name, $version) = ($1, $2); - $name =~ s/[\[\]\s]//g; - $version =~ s/[\[\]\s]//g; - $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); - $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); - $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); - $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); - } - - if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) - { - ($name, $version) = ($1, $2); - $name =~ s/[\[\]\s]//g; - $version =~ s/[\[\]\s]//g; - $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); - $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); - $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); - $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); - } - - # \s makes this not work, why? - $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; - - # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value - # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. - $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; - - $name = $domain if $domain; - - $name = SubstituteVariable ($name); - $name =~ s/^["'](.*)["']$/$1/; - - return $name if $name; -} - - -sub FindPOTKeywords -{ - - my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; - my $varname = "XGETTEXT_OPTIONS"; - my $make_source; { - local (*IN); - open (IN, "; - close IN; - } - - $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; - - return $keywords; -} - -sub FindMakevarsDomain -{ - - my $domain = ""; - my $makevars_source; { - local (*IN); - open (IN, "; - close IN; - } - - $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; - $domain =~ s/^\s+//; - $domain =~ s/\s+$//; - - return $domain; -} - -sub FindMakevarsBugAddress -{ - - my $address = ""; - my $makevars_source; { - local (*IN); - open (IN, "; - close IN; - } - - $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m; - $address =~ s/^\s+//; - $address =~ s/\s+$//; - - return $address; -} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-bpath.c gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-bpath.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-bpath.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-bpath.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,181 @@ +/* Bpath item type for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * Copyright (C) 1998,1999 The Free Software Foundation + * + * Authors: Federico Mena + * Raph Levien + * Lauris Kaplinski + * Miguel de Icaza + * Cody Russell + * Rusty Conover + */ + +/* These includes are set up for standalone compile. If/when this codebase + is integrated into libgnomeui, the includes will need to change. */ + +#include "config.h" +#include +#include + +#include +#include +#include + +#include "gcp-canvas-bpath.h" +#include "gcp-canvas-shape.h" +#include "gnome-canvas-shape-private.h" +#include + +enum { + PROP_0, + PROP_BPATH, +}; + +static void gnome_canvas_bpath_ext_class_init (GnomeCanvasBpathExtClass *class); +static void gnome_canvas_bpath_ext_init (GnomeCanvasBpathExt *bpath); +static void gnome_canvas_bpath_ext_destroy (GtkObject *object); +static void gnome_canvas_bpath_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void gnome_canvas_bpath_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static void gnome_canvas_bpath_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); + + +static GnomeCanvasShapeExtClass *parent_class; + +GtkType +gnome_canvas_bpath_ext_get_type (void) +{ + static GType bpath_ext_type; + + if (!bpath_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasBpathExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_bpath_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasBpathExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_bpath_ext_init, + NULL /* value_table */ + }; + + bpath_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_SHAPE_EXT, "GnomeCanvasBpathExt", + &object_info, 0); + } + + return bpath_ext_type; +} + +static void +gnome_canvas_bpath_ext_class_init (GnomeCanvasBpathExtClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GnomeCanvasItemClass *item_class; + + gobject_class = (GObjectClass *) class; + object_class = (GtkObjectClass *) class; + item_class = (GnomeCanvasItemClass *) class; + + parent_class = g_type_class_peek_parent (class); + + /* when this gets checked into libgnomeui, change the + GTK_TYPE_POINTER to GTK_TYPE_GNOME_CANVAS_BPATH, and add an + entry to gnome-boxed.defs */ + + gobject_class->set_property = gnome_canvas_bpath_ext_set_property; + gobject_class->get_property = gnome_canvas_bpath_ext_get_property; + + object_class->destroy = gnome_canvas_bpath_ext_destroy; + + g_object_class_install_property (gobject_class, + PROP_BPATH, + g_param_spec_pointer ("bpath", NULL, NULL, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + + item_class->update = gnome_canvas_bpath_ext_update; +} + +static void +gnome_canvas_bpath_ext_init (GnomeCanvasBpathExt *bpath) +{ + +} + +static void +gnome_canvas_bpath_ext_destroy (GtkObject *object) +{ + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + +static void +gnome_canvas_bpath_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasItem *item; + GnomeCanvasBpathExt *bpath; + GnomeCanvasPathDef *gpp; + + item = GNOME_CANVAS_ITEM (object); + bpath = GNOME_CANVAS_BPATH_EXT (object); + + switch (param_id) { + case PROP_BPATH: + gpp = g_value_get_pointer (value); + + gnome_canvas_shape_ext_set_path_def (GNOME_CANVAS_SHAPE_EXT (object), gpp); + + gnome_canvas_item_request_update (item); + break; + + default: + break; + } +} + + +static void +gnome_canvas_bpath_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasShapeExt *shape; + + shape = GNOME_CANVAS_SHAPE_EXT(object); + + switch (param_id) { + case PROP_BPATH: + if (shape->priv->path) { + gnome_canvas_path_def_ref (shape->priv->path); + g_value_set_pointer (value, shape->priv->path); + } else + g_value_set_pointer (value, NULL); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +static void +gnome_canvas_bpath_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +{ + if(GNOME_CANVAS_ITEM_CLASS(parent_class)->update) { + (* GNOME_CANVAS_ITEM_CLASS(parent_class)->update)(item, affine, clip_path, flags); + } +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-bpath.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-bpath.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-bpath.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-bpath.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,61 @@ +/* Bpath item type for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * Copyright (C) 1998,1999 The Free Software Foundation + * + * Authors: Federico Mena + * Raph Levien + * Lauris Kaplinski + * Rusty Conover + */ + +#ifndef GNOME_CANVAS_BPATH_EXT_H +#define GNOME_CANVAS_BPATH_EXT_H + +#include +#include "gcp-canvas-shape.h" +#include + +G_BEGIN_DECLS + + +/* Bpath item for the canvas. + * + * The following object arguments are available: + * + * name type read/write description + * ------------------------------------------------------------------------------------------ + * bpath GnomeCanvasPathDef * RW Pointer to an GnomeCanvasPathDef structure. + * This can be created by a call to + * gp_path_new() in (gp-path.h). + */ + +#define GNOME_TYPE_CANVAS_BPATH_EXT (gnome_canvas_bpath_ext_get_type ()) +#define GNOME_CANVAS_BPATH_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_BPATH_EXT, GnomeCanvasBpathExt)) +#define GNOME_CANVAS_BPATH_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_BPATH_EXT, GnomeCanvasBpathExtClass)) +#define GNOME_IS_CANVAS_BPATH_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_BPATH_EXT)) +#define GNOME_IS_CANVAS_BPATH_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_BPATH_EXT)) + + +typedef struct _GnomeCanvasBpathExt GnomeCanvasBpathExt; +/*typedef struct _GnomeCanvasBpathExtPriv GnomeCanvasBpathExtPriv;*/ +typedef struct _GnomeCanvasBpathExtClass GnomeCanvasBpathExtClass; + +struct _GnomeCanvasBpathExt { + GnomeCanvasShapeExt item; + +}; + +struct _GnomeCanvasBpathExtClass { + GnomeCanvasShapeExtClass parent_class; +}; + + +/* Standard Gtk function */ +GType gnome_canvas_bpath_ext_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-group.c gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-group.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-group.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-group.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,225 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* + * GnomeCanvas widget - Tk-like canvas widget for Gnome + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * + * Authors: Federico Mena + * Raph Levien + */ + +#include "config.h" +#include "gcp-canvas-group.h" +#include "gprintable.h" +#include + +static void gnome_canvas_group_ext_class_init (GnomeCanvasGroupExtClass *class); +static void gnome_canvas_group_ext_init (GnomeCanvasGroupExt *group_ext); +static void gnome_canvas_group_ext_export_svg (GPrintable *gprintable, xmlDocPtr doc, xmlNodePtr node); +static void gnome_canvas_group_ext_draw_cairo (GPrintable *gprintable, cairo_t *ct); + +static void +gnome_canvas_group_print_init (GPrintableIface *iface) +{ + iface->export_svg = gnome_canvas_group_ext_export_svg; + iface->draw_cairo = gnome_canvas_group_ext_draw_cairo; +} + +GType +gnome_canvas_group_ext_get_type (void) +{ + static GType group_ext_type; + + if (!group_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasGroupExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_group_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasGroupExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_group_ext_init, + NULL /* value_table */ + }; + + static const GInterfaceInfo print_info = { + (GInterfaceInitFunc) gnome_canvas_group_print_init, + NULL, NULL + }; + + group_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_GROUP, "GnomeCanvasGroupExt", + &object_info, 0); + + g_type_add_interface_static (group_ext_type, G_TYPE_PRINTABLE, &print_info); + } + + return group_ext_type; +} + +/* Bounds handler for canvas groups */ +static void +gnome_canvas_group_ext_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) +{ + GnomeCanvasGroup *group; + GnomeCanvasItem *child; + GList *list; + double tx1, ty1, tx2, ty2; + double minx, miny, maxx, maxy; + gboolean set = FALSE; + + group = GNOME_CANVAS_GROUP (item); + + /* Get the bounds of the first item, invisible items are acceptable in gchempaint */ + + list = group->item_list; + for (; list; list = list->next) { + child = list->data; + + if (child->object.flags & GNOME_CANVAS_ITEM_VISIBLE) { + gnome_canvas_item_get_bounds (child, &minx, &miny, &maxx, &maxy); + set = TRUE; + break; + } + } + + if (!set) { + /* try using the first invisible child */ + if (group->item_list) { + child = group->item_list->data; + gnome_canvas_item_get_bounds (child, x1, y1, x2, y2); + } else { + *x1 = *y1 = G_MAXDOUBLE; + *x2 = *y2 = -G_MAXDOUBLE; + } + return; + } + + /* Now we can grow the bounds using the rest of the items */ + + list = list->next; + + for (; list; list = list->next) { + child = list->data; + + if (!(child->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) + continue; + + gnome_canvas_item_get_bounds (child, &tx1, &ty1, &tx2, &ty2); + + if (tx1 < minx) + minx = tx1; + + if (ty1 < miny) + miny = ty1; + + if (tx2 > maxx) + maxx = tx2; + + if (ty2 > maxy) + maxy = ty2; + } + + *x1 = minx; + *y1 = miny; + *x2 = maxx; + *y2 = maxy; +} + +static void +gnome_canvas_group_ext_class_init (GnomeCanvasGroupExtClass *klass) +{ + GnomeCanvasItemClass *item_class = (GnomeCanvasItemClass *) klass; + item_class->bounds = gnome_canvas_group_ext_bounds; +} + +static void +gnome_canvas_group_ext_init (GnomeCanvasGroupExt *group_ext) +{ +} + +static void +gnome_canvas_group_ext_export_svg (GPrintable *printable, xmlDocPtr doc, xmlNodePtr node) +{ + GList *list; + double affine[6]; + GnomeCanvasItem *item; + g_return_if_fail (GNOME_IS_CANVAS_GROUP_EXT (printable)); + for (list = GNOME_CANVAS_GROUP (printable) ->item_list; list; list = list->next) { + item = GNOME_CANVAS_ITEM (list->data); + if (!(item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) + continue; + if (GNOME_IS_CANVAS_GROUP_EXT(item)) + gnome_canvas_group_ext_export_svg (G_PRINTABLE (item), doc, node); + else if (G_IS_PRINTABLE (item)) + { + char *buf; + gnome_canvas_item_i2w_affine (item, affine); + buf = g_strdup_printf ("matrix(%g,%g,%g,%g,%g,%g)", + affine[0], + affine[1], + affine[2], + affine[3], + affine[4], + affine[5]); + if (strcmp (buf,"matrix(1,0,0,1,0,0)")) { + xmlNodePtr child = xmlNewDocNode (doc, NULL, (const xmlChar*) "g", NULL); + xmlAddChild (node, child); + xmlNewProp (child, (const xmlChar*) "transform", (const xmlChar*) buf); + g_free (buf); + g_printable_export_svg (G_PRINTABLE (item), doc, child); + } else + g_printable_export_svg (G_PRINTABLE (item), doc, node); + } + } +} + +void gnome_canvas_group_ext_draw_cairo (GPrintable *printable, cairo_t *cr) +{ + GList *list; + double affine[6]; + GnomeCanvasItem *item; + g_return_if_fail (GNOME_IS_CANVAS_GROUP_EXT (printable)); + for (list = GNOME_CANVAS_GROUP (printable) ->item_list; list; list = list->next) { + item = GNOME_CANVAS_ITEM (list->data); + if (!(item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) + continue; + if (GNOME_IS_CANVAS_GROUP_EXT(item)) + gnome_canvas_group_ext_draw_cairo (G_PRINTABLE (item), cr); + else if (G_IS_PRINTABLE (item)) + { + gnome_canvas_item_i2w_affine (item, affine); + cairo_save (cr); + cairo_transform (cr ,(cairo_matrix_t*) affine); + g_printable_draw_cairo (G_PRINTABLE (item), cr); + cairo_restore (cr); + } + } +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-group.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-group.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-group.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-group.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,67 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* GnomeCanvas widget - Tk-like canvas widget for Gnome + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas + * widget. Tk is copyrighted by the Regents of the University of California, + * Sun Microsystems, and other parties. + * + * + * Authors: Federico Mena + * Raph Levien + */ + +#ifndef GNOME_CANVAS_EXT_H +#define GNOME_CANVAS_EXT_H + +#include + +typedef struct _GnomeCanvasGroupExt GnomeCanvasGroupExt; +typedef struct _GnomeCanvasGroupExtClass GnomeCanvasGroupExtClass; + +G_BEGIN_DECLS +#define GNOME_TYPE_CANVAS_GROUP_EXT (gnome_canvas_group_get_type ()) +#define GNOME_CANVAS_GROUP_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_GROUP_EXT, GnomeCanvasGroupExt)) +#define GNOME_CANVAS_GROUP_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_GROUP_EXT, GnomeCanvasGroupExtClass)) +#define GNOME_IS_CANVAS_GROUP_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_GROUP_EXT)) +#define GNOME_IS_CANVAS_GROUP_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_GROUP_EXT)) +#define GNOME_CANVAS_GROUP_EXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_GROUP_EXT, GnomeCanvasGroupExtClass)) + + +struct _GnomeCanvasGroupExt { + GnomeCanvasGroup group; +}; + +struct _GnomeCanvasGroupExtClass { + GnomeCanvasGroupClass parent_class; +}; + + +GType gnome_canvas_group_ext_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-i18n.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-i18n.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-i18n.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-i18n.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,68 @@ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ + +/* + * Handles all of the internationalization configuration options. + * Author: Tom Tromey + */ + +#ifndef __LIBGNOME_CANVAS_I18N_H__ +#define __LIBGNOME_CANVAS_I18N_H__ + +#include + +G_BEGIN_DECLS + +#if !defined(__LIBGNOME_CANVAS_I18NP_H__) + +#ifdef ENABLE_NLS +# include +# ifdef GNOME_EXPLICIT_TRANSLATION_DOMAIN +# undef _ +# define _(String) dgettext (GNOME_EXPLICIT_TRANSLATION_DOMAIN, String) +# else +# define _(String) gettext (String) +# endif +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +/* Stubs that do something close enough. */ +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + +#endif + +G_END_DECLS + +#endif /* __LIBGNOME_CANVAS_I18N_H__ */ diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-line.c gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-line.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-line.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-line.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1267 @@ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ + +/* Line/curve item type for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * + * Author: Federico Mena + */ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include "gcp-canvas-line.h" +#include "gprintable.h" + +#define noVERBOSE + +#define DEFAULT_SPLINE_STEPS 12 /* this is what Tk uses */ +#define NUM_ARROW_POINTS 6 /* number of points in an arrowhead */ +#define NUM_HALF_ARROW_POINTS 5 /* number of points in a half arrowhead */ +#define NUM_STATIC_POINTS 256 /* number of static points to use to avoid allocating arrays */ + + +#define GROW_BOUNDS(bx1, by1, bx2, by2, x, y) \ +{ \ + if (x < bx1) \ + bx1 = x; \ + \ + if (x > bx2) \ + bx2 = x; \ + \ + if (y < by1) \ + by1 = y; \ + \ + if (y > by2) \ + by2 = y; \ +} + + +enum { + PROP_0, + PROP_FIRST_ARROWHEAD_STYLE, + PROP_LAST_ARROWHEAD_STYLE, +}; + + +static void gnome_canvas_line_ext_class_init (GnomeCanvasLineExtClass *class); +static void gnome_canvas_line_ext_init (GnomeCanvasLineExt *line); +static void gnome_canvas_line_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void gnome_canvas_line_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static void gnome_canvas_line_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); +//static void gnome_canvas_line_ext_realize (GnomeCanvasItem *item); +//static void gnome_canvas_line_ext_unrealize (GnomeCanvasItem *item); +static void gnome_canvas_line_ext_draw (GnomeCanvasItem *item, GdkDrawable *drawable, + int x, int y, int width, int height); +static double gnome_canvas_line_ext_point (GnomeCanvasItem *item, double x, double y, + int cx, int cy, GnomeCanvasItem **actual_item); +static void gnome_canvas_line_ext_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2); +static void gnome_canvas_line_ext_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf); +static void gnome_canvas_line_ext_export_svg (GPrintable *printable, xmlDocPtr doc, xmlNodePtr node); +static void gnome_canvas_line_ext_draw_cairo (GPrintable *gprintable, cairo_t *cr); + +static GnomeCanvasItemClass *parent_class; + +static void +gnome_canvas_line_print_init (GPrintableIface *iface) +{ + iface->export_svg = gnome_canvas_line_ext_export_svg; + iface->draw_cairo = gnome_canvas_line_ext_draw_cairo; +} + +GType +gnome_canvas_line_ext_get_type (void) +{ + static GType line_ext_type; + + if (!line_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasLineExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_line_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasLineExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_line_ext_init, + NULL /* value_table */ + }; + + static const GInterfaceInfo print_info = { + (GInterfaceInitFunc) gnome_canvas_line_print_init, + NULL, NULL + }; + + line_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_LINE, "GnomeCanvasLineExt", + &object_info, 0); + + g_type_add_interface_static (line_ext_type, G_TYPE_PRINTABLE, &print_info); + } + + return line_ext_type; +} + +static void +gnome_canvas_line_ext_class_init (GnomeCanvasLineExtClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GnomeCanvasItemClass *item_class; + + gobject_class = (GObjectClass *) class; + object_class = (GtkObjectClass *) class; + item_class = (GnomeCanvasItemClass *) class; + + parent_class = g_type_class_peek_parent (class); + + gobject_class->set_property = gnome_canvas_line_ext_set_property; + gobject_class->get_property = gnome_canvas_line_ext_get_property; + + g_object_class_install_property + (gobject_class, + PROP_FIRST_ARROWHEAD_STYLE, + g_param_spec_uchar ("first_arrowhead_style", NULL, NULL, + 0, 3, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property + (gobject_class, + PROP_LAST_ARROWHEAD_STYLE, + g_param_spec_uchar ("last_arrowhead_style", NULL, NULL, + 0, 3, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + + item_class->update = gnome_canvas_line_ext_update; + item_class->draw = gnome_canvas_line_ext_draw; + item_class->point = gnome_canvas_line_ext_point; + item_class->bounds = gnome_canvas_line_ext_bounds; + + item_class->render = gnome_canvas_line_ext_render; +} + +static void +gnome_canvas_line_ext_init (GnomeCanvasLineExt *line_ext) +{ + GnomeCanvasLine *line = (GnomeCanvasLine*) line_ext; + line->width = 0.0; + line->cap = GDK_CAP_BUTT; + line->join = GDK_JOIN_MITER; + line->line_style = GDK_LINE_SOLID; + line->shape_a = 0.0; + line->shape_b = 0.0; + line->shape_c = 0.0; + line->spline_steps = DEFAULT_SPLINE_STEPS; + line_ext->first_arrow_head_style = ARROW_HEAD_BOTH; + line_ext->last_arrow_head_style = ARROW_HEAD_BOTH; +} + +/* Computes the bounding box of the line, including its arrow points. Assumes that the number of + * points in the line is not zero. + */ +static void +get_bounds (GnomeCanvasLine *line, double *bx1, double *by1, double *bx2, double *by2) +{ + double *coords; + double x1, y1, x2, y2; + double width; + int i; + + if (!line->coords) { + *bx1 = *by1 = *bx2 = *by2 = 0.0; + return; + } + + /* Find bounding box of line's points */ + + x1 = x2 = line->coords[0]; + y1 = y2 = line->coords[1]; + + for (i = 1, coords = line->coords + 2; i < line->num_points; i++, coords += 2) + GROW_BOUNDS (x1, y1, x2, y2, coords[0], coords[1]); + + /* Add possible over-estimate for wide lines */ + + if (line->width_pixels) + width = line->width / line->item.canvas->pixels_per_unit; + else + width = line->width; + + x1 -= width; + y1 -= width; + x2 += width; + y2 += width; + + /* For mitered lines, make a second pass through all the points. Compute the location of + * the two miter vertex points and add them to the bounding box. + */ + + if (line->join == GDK_JOIN_MITER) + for (i = line->num_points, coords = line->coords; i >= 3; i--, coords += 2) { + double mx1, my1, mx2, my2; + + if (gnome_canvas_get_miter_points (coords[0], coords[1], + coords[2], coords[3], + coords[4], coords[5], + width, + &mx1, &my1, &mx2, &my2)) { + GROW_BOUNDS (x1, y1, x2, y2, mx1, my1); + GROW_BOUNDS (x1, y1, x2, y2, mx2, my2); + } + } + + /* Add the arrow points, if any */ + + if (line->first_arrow && line->first_coords) + for (i = 0, coords = line->first_coords; i < NUM_ARROW_POINTS; i++, coords += 2) + GROW_BOUNDS (x1, y1, x2, y2, coords[0], coords[1]); + + if (line->last_arrow && line->last_coords) + for (i = 0, coords = line->last_coords; i < NUM_ARROW_POINTS; i++, coords += 2) + GROW_BOUNDS (x1, y1, x2, y2, coords[0], coords[1]); + + /* Done */ + + *bx1 = x1; + *by1 = y1; + *bx2 = x2; + *by2 = y2; +} + +/* Computes the bounding box of the line, in canvas coordinates. Assumes that the number of points in the polygon is + * not zero. Affine is the i2c transformation. + */ +static void +get_bounds_canvas (GnomeCanvasLine *line, double *bx1, double *by1, double *bx2, double *by2, double affine[6]) +{ + GnomeCanvasItem *item; + + /* It would be possible to tighten the bounds somewhat by transforming the individual points before + aggregating them into the bbox. But it hardly seems worth it. */ + ArtDRect bbox_world; + ArtDRect bbox_canvas; + + item = GNOME_CANVAS_ITEM (line); + + get_bounds (line, &bbox_world.x0, &bbox_world.y0, &bbox_world.x1, &bbox_world.y1); + + art_drect_affine_transform (&bbox_canvas, &bbox_world, affine); + /* include 1 pixel of fudge */ + *bx1 = bbox_canvas.x0 - 1; + *by1 = bbox_canvas.y0 - 1; + *bx2 = bbox_canvas.x1 + 1; + *by2 = bbox_canvas.y1 + 1; +} + +/* Recalculates the arrow polygons for the line */ +static void +reconfigure_arrows (GnomeCanvasLineExt *lineext) +{ + double *poly, *coords; + double dx, dy, length; + double sin_theta, cos_theta, tmp; + double frac_height; /* Line width as fraction of arrowhead width */ + double backup; /* Distance to backup end points so the line ends in the middle of the arrowhead */ + double shape_a, shape_b, shape_c; + double width; + int i; + GnomeCanvasLine* line = GNOME_CANVAS_LINE(lineext); + if (line->num_points == 0) + return; + + /* Set up things */ + + if (lineext->first_arrow_head_style !=ARROW_HEAD_BOTH) + { + if (line->first_arrow && lineext->first_arrow_head_style) { + if (line->first_coords) { + line->coords[0] = lineext->saved_coords[0]; + line->coords[1] = lineext->saved_coords[1]; + } else + line->first_coords = g_new (double, 2 * NUM_ARROW_POINTS); + } else if (line->first_coords) { + line->coords[0] = lineext->saved_coords[0]; + line->coords[1] = lineext->saved_coords[1]; + + g_free (line->first_coords); + line->first_coords = NULL; + } + } + + + if (lineext->last_arrow_head_style !=ARROW_HEAD_BOTH){ + i = 2 * (line->num_points - 1); + if (line->last_arrow && lineext->last_arrow_head_style) { + if (line->last_coords) { + line->coords[i] = lineext->saved_coords[2]; + line->coords[i + 1] = lineext->saved_coords[3]; + } else + line->last_coords = g_new (double, 2 * NUM_ARROW_POINTS); + } else if (line->last_coords) { + line->coords[i] = lineext->saved_coords[2]; + line->coords[i + 1] = lineext->saved_coords[3]; + + g_free (line->last_coords); + line->last_coords = NULL; + } + } + + if (!(line->first_arrow && lineext->first_arrow_head_style) && !(line->last_arrow && lineext->last_arrow_head_style)) + return; + + if (line->width_pixels) + width = line->width / line->item.canvas->pixels_per_unit; + else + width = line->width; + + /* Add fudge value for better-looking results */ + + shape_a = line->shape_a; + shape_b = line->shape_b; + shape_c = line->shape_c + width; + + if (line->width_pixels) { + shape_a /= line->item.canvas->pixels_per_unit; + shape_b /= line->item.canvas->pixels_per_unit; + shape_c /= line->item.canvas->pixels_per_unit; + } + + shape_a += 0.001; + shape_b += 0.001; + shape_c += 0.001; + + /* Compute the polygon for the first arrowhead and adjust the first point in the line so + * that the line does not stick out past the leading edge of the arrowhead. + */ + frac_height = line->width / shape_c; + backup = frac_height * shape_b + shape_a * (1.0 - frac_height) / 2.0; + + if (line->first_arrow && (lineext->first_arrow_head_style != ARROW_HEAD_BOTH)) { + poly = line->first_coords; + + /* save first coords in unsed first_coords */ + line->first_coords[10] = line->coords[0]; + line->first_coords[11] = line->coords[1]; + + dx = line->coords[0] - line->coords[2]; + dy = line->coords[1] - line->coords[3]; + length = sqrt (dx * dx + dy * dy); + if (length < GNOME_CANVAS_EPSILON) + sin_theta = cos_theta = 0.0; + else { + sin_theta = dy / length; + cos_theta = dx / length; + } + + tmp = shape_c * sin_theta; + + switch(lineext->first_arrow_head_style) + { + case ARROW_HEAD_LEFT: + poly[8] = poly[0] = line->coords[0] - line->width / 2.0 * sin_theta; + poly[9] = poly[1] = line->coords[1] + line->width / 2.0 * cos_theta; + poly[2] = poly[0] - shape_b * cos_theta + tmp; + poly[6] = poly[0] - shape_a * cos_theta; + poly[4] = poly[6] + line->width * sin_theta; + + tmp = shape_c * cos_theta; + + poly[3] = poly[1] - shape_b * sin_theta - tmp; + poly[7] = poly[1] - shape_a * sin_theta; + poly[5] = poly[7] - line->width * cos_theta; + break; + case ARROW_HEAD_RIGHT: + poly[8] = poly[0] = line->coords[0] + line->width / 2.0 * sin_theta; + poly[9] = poly[1] = line->coords[1] - line->width / 2.0 * cos_theta; + poly[2] = poly[0] - shape_b * cos_theta - tmp; + poly[6] = poly[0] - shape_a * cos_theta; + poly[4] = poly[6] - line->width * sin_theta; + + tmp = shape_c * cos_theta; + + poly[3] = poly[1] - shape_b * sin_theta + tmp; + poly[7] = poly[1] - shape_a * sin_theta; + poly[5] = poly[7] + line->width * cos_theta; + break; + default: + break; + } + + /* Move the first point towards the second so that the corners at the end of the + * line are inside the arrowhead. + */ + + line->coords[0] -= backup * cos_theta; + line->coords[1] -= backup * sin_theta; + } + + /* Same process for last arrowhead */ + + if (line->last_arrow && (lineext->last_arrow_head_style != ARROW_HEAD_BOTH)) { + coords = line->coords + 2 * (line->num_points - 2); + poly = line->last_coords; + + /* save first coords in unsed first_coords */ + line->last_coords[10] = coords[2]; + line->last_coords[11] = coords[3]; + + dx = line->coords[2] - coords[0]; + dy = line->coords[3] - coords[1]; + length = sqrt (dx * dx + dy * dy); + if (length < GNOME_CANVAS_EPSILON) + sin_theta = cos_theta = 0.0; + else { + sin_theta = dy / length; + cos_theta = dx / length; + } + + tmp = shape_c * sin_theta; + + switch(lineext->last_arrow_head_style) + { + case ARROW_HEAD_LEFT: + poly[8] = poly[0] = coords[2] - line->width / 2.0 * sin_theta; + poly[9] = poly[1] = coords[3] + line->width / 2.0 * cos_theta; + poly[2] = poly[0] - shape_b * cos_theta + tmp; + poly[6] = poly[0] - shape_a * cos_theta; + poly[4] = poly[6] + line->width * sin_theta; + + tmp = shape_c * cos_theta; + + poly[3] = poly[1] - shape_b * sin_theta - tmp; + poly[7] = poly[1] - shape_a * sin_theta; + poly[5] = poly[7] - line->width * cos_theta; + break; + case ARROW_HEAD_RIGHT: + poly[8] = poly[0] = coords[2] + line->width / 2.0 * sin_theta; + poly[9] = poly[1] = coords[3] - line->width / 2.0 * cos_theta; + poly[2] = poly[0] - shape_b * cos_theta - tmp; + poly[6] = poly[0] - shape_a * cos_theta; + poly[4] = poly[6] - line->width * sin_theta; + + tmp = shape_c * cos_theta; + + poly[3] = poly[1] - shape_b * sin_theta + tmp; + poly[7] = poly[1] - shape_a * sin_theta; + poly[5] = poly[7] + line->width * cos_theta; + break; + default: + break; + } + + coords[2] -= backup * cos_theta; + coords[3] -= backup * sin_theta; + } +} + +/* Convenience function to set the line's GC's foreground color */ +static void +set_line_gc_foreground (GnomeCanvasLine *line) +{ + GdkColor c; + + if (!line->gc) + return; + + c.pixel = line->fill_pixel; + gdk_gc_set_foreground (line->gc, &c); +} + +/* Recalculate the line's width and set it in its GC */ +static void +set_line_gc_width (GnomeCanvasLine *line) +{ + int width; + + if (!line->gc) + return; + + if (line->width_pixels) + width = (int) line->width; + else + width = (int) (line->width * line->item.canvas->pixels_per_unit + 0.5); + + gdk_gc_set_line_attributes (line->gc, + width, + line->line_style, + (line->first_arrow || line->last_arrow) ? GDK_CAP_BUTT : line->cap, + line->join); +} + +/* Sets the stipple pattern for the line */ +static void +set_stipple (GnomeCanvasLine *line, GdkBitmap *stipple, int reconfigure) +{ + if (line->stipple && !reconfigure) + g_object_unref (line->stipple); + + line->stipple = stipple; + if (stipple && !reconfigure) + g_object_ref (stipple); + + if (line->gc) { + if (stipple) { + gdk_gc_set_stipple (line->gc, stipple); + gdk_gc_set_fill (line->gc, GDK_STIPPLED); + } else + gdk_gc_set_fill (line->gc, GDK_SOLID); + } +} + +static void +gnome_canvas_line_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasItem *item; + GnomeCanvasLineExt *line; + gboolean color_changed; + int have_pixel; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_LINE_EXT (object)); + + item = GNOME_CANVAS_ITEM (object); + line = GNOME_CANVAS_LINE_EXT (object); + + color_changed = FALSE; + have_pixel = FALSE; + + switch (param_id) { + case PROP_FIRST_ARROWHEAD_STYLE: + line->first_arrow_head_style = g_value_get_uchar (value); + gnome_canvas_item_request_update (item); + break; + + case PROP_LAST_ARROWHEAD_STYLE: + line->last_arrow_head_style = g_value_get_uchar (value); + gnome_canvas_item_request_update (item); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +static void +gnome_canvas_line_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasLineExt *line; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_LINE (object)); + + line = GNOME_CANVAS_LINE_EXT (object); + + switch (param_id) { + case PROP_FIRST_ARROWHEAD_STYLE: + g_value_set_uchar (value, (guchar)line->first_arrow_head_style); + break; + + case PROP_LAST_ARROWHEAD_STYLE: + g_value_set_boolean (value, (guchar)line->last_arrow_head_style); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +static void +gnome_canvas_line_ext_render (GnomeCanvasItem *item, + GnomeCanvasBuf *buf) +{ + GnomeCanvasLine *line; + + line = GNOME_CANVAS_LINE (item); + + if (line->fill_svp != NULL) + gnome_canvas_render_svp (buf, line->fill_svp, line->fill_rgba); + + if (line->first_svp != NULL) + gnome_canvas_render_svp (buf, line->first_svp, line->fill_rgba); + + if (line->last_svp != NULL) + gnome_canvas_render_svp (buf, line->last_svp, line->fill_rgba); +} + + +static ArtSVP * +svp_from_points (const double *item_coords, int num_points, const double affine[6]) +{ + ArtVpath *vpath; + ArtSVP *svp; + double x, y; + int i; + + vpath = art_new (ArtVpath, num_points + 2); + + for (i = 0; i < num_points; i++) { + vpath[i].code = i == 0 ? ART_MOVETO : ART_LINETO; + x = item_coords[i * 2]; + y = item_coords[i * 2 + 1]; + vpath[i].x = x * affine[0] + y * affine[2] + affine[4]; + vpath[i].y = x * affine[1] + y * affine[3] + affine[5]; + } +#if 0 + vpath[i].code = ART_LINETO; + vpath[i].x = vpath[0].x; + vpath[i].y = vpath[0].y; + i++; +#endif + vpath[i].code = ART_END; + vpath[i].x = 0; + vpath[i].y = 0; + + svp = art_svp_from_vpath (vpath); + + art_free (vpath); + + return svp; +} + +static void +gnome_canvas_line_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +{ + GnomeCanvasLineExt *lineext; + GnomeCanvasLine *line; + int i; + ArtVpath *vpath; + ArtPoint pi, pc; + double width; + ArtSVP *svp; + double x1, y1, x2, y2; + + lineext = GNOME_CANVAS_LINE_EXT (item); + line = GNOME_CANVAS_LINE (item); + + if (line->first_coords) { + lineext->saved_coords[0] = line->first_coords[10]; + lineext->saved_coords[1] = line->first_coords[11]; + } else { + lineext->saved_coords[0] = line->coords[0]; + lineext->saved_coords[1] = line->coords[1]; + } + if (line->last_coords) { + lineext->saved_coords[2] = line->last_coords[10]; + lineext->saved_coords[3] = line->last_coords[11]; + } else { + i = (line->num_points - 1) * 2; + lineext->saved_coords[2] = line->coords[i]; + lineext->saved_coords[3] = line->coords[i + 1]; + } + + if (parent_class->update) + (* parent_class->update) (item, affine, clip_path, flags); + + reconfigure_arrows (lineext); + + if (item->canvas->aa) { + gnome_canvas_item_reset_bounds (item); + + vpath = art_new (ArtVpath, line->num_points + 2); + + for (i = 0; i < line->num_points; i++) { + pi.x = line->coords[i * 2]; + pi.y = line->coords[i * 2 + 1]; + art_affine_point (&pc, &pi, affine); + vpath[i].code = i == 0 ? ART_MOVETO : ART_LINETO; + vpath[i].x = pc.x; + vpath[i].y = pc.y; + } + vpath[i].code = ART_END; + vpath[i].x = 0; + vpath[i].y = 0; + + if (line->width_pixels) + width = line->width; + else + width = line->width * art_affine_expansion (affine); + + if (width < 0.5) + width = 0.5; + + svp = art_svp_vpath_stroke (vpath, + gnome_canvas_join_gdk_to_art (line->join), + gnome_canvas_cap_gdk_to_art (line->cap), + width, + 4, + 0.25); + art_free (vpath); + + gnome_canvas_item_update_svp_clip (item, &line->fill_svp, svp, clip_path); + + if (line->first_arrow) + svp = svp_from_points (line->first_coords, + (lineext->first_arrow_head_style == ARROW_HEAD_BOTH)? NUM_ARROW_POINTS: NUM_HALF_ARROW_POINTS, + affine); + else + svp = NULL; + + gnome_canvas_item_update_svp_clip (item, &line->first_svp, svp, clip_path); + + if (line->last_arrow) + svp = svp_from_points (line->last_coords, + (lineext->last_arrow_head_style == ARROW_HEAD_BOTH)? NUM_ARROW_POINTS: NUM_HALF_ARROW_POINTS, + affine); + else + svp = NULL; + + gnome_canvas_item_update_svp_clip (item, &line->last_svp, svp, clip_path); + + } else { + set_line_gc_foreground (line); + set_line_gc_width (line); + set_stipple (line, line->stipple, TRUE); + + get_bounds_canvas (line, &x1, &y1, &x2, &y2, affine); + gnome_canvas_update_bbox (item, x1, y1, x2, y2); + } +} + +static void +item_to_canvas (GnomeCanvas *canvas, double *item_coords, GdkPoint *canvas_coords, int num_points, + int *num_drawn_points, double i2c[6], int x, int y) +{ + int i; + int old_cx, old_cy; + int cx, cy; + ArtPoint pi, pc; + +#ifdef VERBOSE + { + char str[128]; + art_affine_to_string (str, i2c); + g_print ("line item_to_canvas %s\n", str); + } +#endif + + /* the first point is always drawn */ + + pi.x = item_coords[0]; + pi.y = item_coords[1]; + art_affine_point (&pc, &pi, i2c); + cx = floor (pc.x + 0.5); + cy = floor (pc.y + 0.5); + canvas_coords->x = cx - x; + canvas_coords->y = cy - y; + canvas_coords++; + old_cx = cx; + old_cy = cy; + *num_drawn_points = 1; + + for (i = 1; i < num_points; i++) { + pi.x = item_coords[i * 2]; + pi.y = item_coords[i * 2 + 1]; + art_affine_point (&pc, &pi, i2c); + cx = floor (pc.x + 0.5); + cy = floor (pc.y + 0.5); + if (old_cx != cx || old_cy != cy) { + canvas_coords->x = cx - x; + canvas_coords->y = cy - y; + old_cx = cx; + old_cy = cy; + canvas_coords++; + (*num_drawn_points)++; + } + } +} + +static void +gnome_canvas_line_ext_draw (GnomeCanvasItem *item, GdkDrawable *drawable, + int x, int y, int width, int height) +{ + GnomeCanvasLineExt *lineext; + GnomeCanvasLine *line; + GdkPoint static_points[NUM_STATIC_POINTS]; + GdkPoint *points; + int actual_num_points_drawn; + double i2c[6]; + + lineext = GNOME_CANVAS_LINE_EXT (item); + line = GNOME_CANVAS_LINE (item); + + if (line->num_points == 0) + return; + + /* Build array of canvas pixel coordinates */ + + if (line->num_points <= NUM_STATIC_POINTS) + points = static_points; + else + points = g_new (GdkPoint, line->num_points); + + + gnome_canvas_item_i2c_affine (item, i2c); + + item_to_canvas (item->canvas, line->coords, points, line->num_points, + &actual_num_points_drawn, i2c, x, y); + + if (line->stipple) + gnome_canvas_set_stipple_origin (item->canvas, line->gc); + + gdk_draw_lines (drawable, line->gc, points, actual_num_points_drawn); + + if (points != static_points) + g_free (points); + + /* Draw arrowheads */ + + points = static_points; + + if (line->first_arrow) { + item_to_canvas (item->canvas, line->first_coords, points, + ((lineext->first_arrow_head_style == ARROW_HEAD_BOTH)? NUM_ARROW_POINTS: NUM_HALF_ARROW_POINTS), + &actual_num_points_drawn, i2c, x, y); + gdk_draw_polygon (drawable, line->gc, TRUE, points, actual_num_points_drawn ); + } + + if (line->last_arrow) { + item_to_canvas (item->canvas, line->last_coords, points, + ((lineext->last_arrow_head_style == ARROW_HEAD_BOTH)? NUM_ARROW_POINTS: NUM_HALF_ARROW_POINTS), + &actual_num_points_drawn, i2c, x, y); + gdk_draw_polygon (drawable, line->gc, TRUE, points, actual_num_points_drawn ); + } +} + +static double +gnome_canvas_line_ext_point (GnomeCanvasItem *item, double x, double y, + int cx, int cy, GnomeCanvasItem **actual_item) +{ + GnomeCanvasLine *line; + GnomeCanvasLineExt *lineext; + double *line_points = NULL, *coords; + double static_points[2 * NUM_STATIC_POINTS]; + double poly[10]; + double best, dist; + double dx, dy; + double width; + int num_points = 0, i; + int changed_miter_to_bevel; + +#ifdef VERBOSE + g_print ("gnome_canvas_line_ext_point x, y = (%g, %g); cx, cy = (%d, %d)\n", x, y, cx, cy); +#endif + + lineext = GNOME_CANVAS_LINE_EXT (item); + line = GNOME_CANVAS_LINE (item); + + *actual_item = item; + + best = 1.0e36; + + /* Handle smoothed lines by generating an expanded set ot points */ + + if (line->smooth && (line->num_points > 2)) { + /* FIXME */ + } else { + num_points = line->num_points; + line_points = line->coords; + } + + /* Compute a polygon for each edge of the line and test the point against it. The effective + * width of the line is adjusted so that it will be at least one pixel thick (so that zero + * pixel-wide lines can be pickedup as well). + */ + + if (line->width_pixels) + width = line->width / item->canvas->pixels_per_unit; + else + width = line->width; + + if (width < (1.0 / item->canvas->pixels_per_unit)) + width = 1.0 / item->canvas->pixels_per_unit; + + changed_miter_to_bevel = 0; + + for (i = num_points, coords = line_points; i >= 2; i--, coords += 2) { + /* If rounding is done around the first point, then compute distance between the + * point and the first point. + */ + + if (((line->cap == GDK_CAP_ROUND) && (i == num_points)) + || ((line->join == GDK_JOIN_ROUND) && (i != num_points))) { + dx = coords[0] - x; + dy = coords[1] - y; + dist = sqrt (dx * dx + dy * dy) - width / 2.0; + if (dist < GNOME_CANVAS_EPSILON) { + best = 0.0; + goto done; + } else if (dist < best) + best = dist; + } + + /* Compute the polygonal shape corresponding to this edge, with two points for the + * first point of the edge and two points for the last point of the edge. + */ + + if (i == num_points) + gnome_canvas_get_butt_points (coords[2], coords[3], coords[0], coords[1], + width, (line->cap == GDK_CAP_PROJECTING), + poly, poly + 1, poly + 2, poly + 3); + else if ((line->join == GDK_JOIN_MITER) && !changed_miter_to_bevel) { + poly[0] = poly[6]; + poly[1] = poly[7]; + poly[2] = poly[4]; + poly[3] = poly[5]; + } else { + gnome_canvas_get_butt_points (coords[2], coords[3], coords[0], coords[1], + width, FALSE, + poly, poly + 1, poly + 2, poly + 3); + + /* If this line uses beveled joints, then check the distance to a polygon + * comprising the last two points of the previous polygon and the first two + * from this polygon; this checks the wedges that fill the mitered point. + */ + + if ((line->join == GDK_JOIN_BEVEL) || changed_miter_to_bevel) { + poly[8] = poly[0]; + poly[9] = poly[1]; + + dist = gnome_canvas_polygon_to_point (poly, 5, x, y); + if (dist < GNOME_CANVAS_EPSILON) { + best = 0.0; + goto done; + } else if (dist < best) + best = dist; + + changed_miter_to_bevel = FALSE; + } + } + + if (i == 2) + gnome_canvas_get_butt_points (coords[0], coords[1], coords[2], coords[3], + width, (line->cap == GDK_CAP_PROJECTING), + poly + 4, poly + 5, poly + 6, poly + 7); + else if (line->join == GDK_JOIN_MITER) { + if (!gnome_canvas_get_miter_points (coords[0], coords[1], + coords[2], coords[3], + coords[4], coords[5], + width, + poly + 4, poly + 5, poly + 6, poly + 7)) { + changed_miter_to_bevel = TRUE; + gnome_canvas_get_butt_points (coords[0], coords[1], coords[2], coords[3], + width, FALSE, + poly + 4, poly + 5, poly + 6, poly + 7); + } + } else + gnome_canvas_get_butt_points (coords[0], coords[1], coords[2], coords[3], + width, FALSE, + poly + 4, poly + 5, poly + 6, poly + 7); + + poly[8] = poly[0]; + poly[9] = poly[1]; + + dist = gnome_canvas_polygon_to_point (poly, 5, x, y); + if (dist < GNOME_CANVAS_EPSILON) { + best = 0.0; + goto done; + } else if (dist < best) + best = dist; + } + + /* If caps are rounded, check the distance to the cap around the final end point of the line */ + + if (line->cap == GDK_CAP_ROUND) { + dx = coords[0] - x; + dy = coords[1] - y; + dist = sqrt (dx * dx + dy * dy) - width / 2.0; + if (dist < GNOME_CANVAS_EPSILON) { + best = 0.0; + goto done; + } else + best = dist; + } + + /* sometimes the GnomeCanvasItem::update signal will not have + been processed between deleting the arrow points and a call + to this routine -- this can cause a segfault here */ + if ((line->first_arrow && !line->first_coords) || + (line->last_arrow && !line->last_coords)) + reconfigure_arrows(lineext); + + /* If there are arrowheads, check the distance to them */ + + if (line->first_arrow && line->first_coords) { + dist = gnome_canvas_polygon_to_point (line->first_coords, ((lineext->first_arrow_head_style == ARROW_HEAD_BOTH)? NUM_ARROW_POINTS: NUM_HALF_ARROW_POINTS), x, y); + if (dist < GNOME_CANVAS_EPSILON) { + best = 0.0; + goto done; + } else + best = dist; + } + + if (line->last_arrow && line->last_coords) { + dist = gnome_canvas_polygon_to_point (line->last_coords, ((lineext->last_arrow_head_style == ARROW_HEAD_BOTH)? NUM_ARROW_POINTS: NUM_HALF_ARROW_POINTS), x, y); + if (dist < GNOME_CANVAS_EPSILON) { + best = 0.0; + goto done; + } else + best = dist; + } + +done: + + if ((line_points != static_points) && (line_points != line->coords)) + g_free (line_points); + + return best; +} + +static void +gnome_canvas_line_ext_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) +{ + GnomeCanvasLine *line; + + line = GNOME_CANVAS_LINE (item); + + if (line->num_points == 0) { + *x1 = *y1 = *x2 = *y2 = 0.0; + return; + } + + get_bounds (line, x1, y1, x2, y2); +} + +static void +gnome_canvas_line_ext_export_svg (GPrintable *printable, xmlDocPtr doc, xmlNodePtr node) +{ + GnomeCanvasLine *line; + GnomeCanvasLineExt *lineext; + GString *string; + xmlNodePtr child; + char *buf; + double width; + int opacity, i; + + line = GNOME_CANVAS_LINE (printable); + lineext = GNOME_CANVAS_LINE_EXT (printable); + + if (line->num_points == 0) + return; + + child = xmlNewDocNode (doc, NULL, (const xmlChar*) "path", NULL); + xmlAddChild (node, child); + string = g_string_new (""); + g_string_append_printf (string, "M%g %g", line->coords[0], line->coords[1]); + for (i = 1; i < line->num_points; i++) + g_string_append_printf (string, "L%g %g", line->coords[2 * i], line->coords[2 * i + 1]);/*FIXME: Change that for spline lines!*/ + xmlNewProp (child, (const xmlChar*)"d", (const xmlChar*)string->str); + g_string_free (string, TRUE); + xmlNewProp (child, (const xmlChar*)"fill", (const xmlChar*)"none"); + buf = g_strdup_printf ("#%06x", line->fill_rgba >> 8); + xmlNewProp (child, (const xmlChar*)"stroke", (const xmlChar*)buf); + g_free (buf); + opacity = line->fill_rgba & 0xff; + if (opacity != 255) { + buf = g_strdup_printf ("%g", (double) opacity / 255.); + xmlNewProp (child, (const xmlChar*)"stroke-opacity", (const xmlChar*)buf); + g_free (buf); + } + if (line->width_pixels) + width = (double) line->width / line->item.canvas->pixels_per_unit; + else + width = line->width; + buf = g_strdup_printf ("%g", width); + xmlNewProp (child, (const xmlChar*)"stroke-width", (const xmlChar*)buf); + g_free (buf); + + switch (line->cap) { + case GDK_CAP_ROUND: + xmlNewProp (child, (const xmlChar*)"stroke-linecap", (const xmlChar*)"round"); + break; + case GDK_CAP_PROJECTING: + xmlNewProp (child, (const xmlChar*)"stroke-linecap", (const xmlChar*)"square"); + break; + default: + xmlNewProp (child, (const xmlChar*)"stroke-linecap", (const xmlChar*)"butt"); + break; + } + + switch (line->join) { + case GDK_JOIN_ROUND: + xmlNewProp (child, (const xmlChar*)"stroke-join", (const xmlChar*)"round"); + break; + case GDK_JOIN_BEVEL: + xmlNewProp (child, (const xmlChar*)"stroke-linejoin", (const xmlChar*)"bevel"); + break; + default: + xmlNewProp (child, (const xmlChar*)"stroke-linejoin", (const xmlChar*)"miter"); + break; + } + + if (line->line_style == GDK_LINE_ON_OFF_DASH) + xmlNewProp (child, (const xmlChar*)"stroke-dasharray", (const xmlChar*)"3,2"); + + if (line->first_arrow && line->first_coords) { + child = xmlNewDocNode (doc, NULL, (const xmlChar*) "path", NULL); + xmlAddChild (node, child); + string = g_string_new (""); + g_string_append_printf (string, "M%g %g", line->first_coords[0], line->first_coords[1]); + g_string_append_printf (string, "L%g %g", line->first_coords[2], line->first_coords[3]); + g_string_append_printf (string, "L%g %g", line->first_coords[4], line->first_coords[5]); + g_string_append_printf (string, "L%g %g", line->first_coords[6], line->first_coords[7]); + g_string_append_printf (string, "L%g %g", line->first_coords[8], line->first_coords[9]); + if (lineext->first_arrow_head_style == ARROW_HEAD_BOTH) + g_string_append_printf (string, "L%g %g", line->first_coords[10], line->first_coords[11]); + xmlNewProp (child, (const xmlChar*)"d", (const xmlChar*)string->str); + g_string_free (string, TRUE); + xmlNewProp (child, (const xmlChar*)"stroke", (const xmlChar*)"none"); + buf = g_strdup_printf ("#%06x", line->fill_rgba >> 8); + xmlNewProp (child, (const xmlChar*)"fill", (const xmlChar*)buf); + g_free (buf); + opacity = line->fill_rgba & 0xff; + if (opacity != 255) { + buf = g_strdup_printf ("%g", (double) opacity / 255.); + xmlNewProp (child, (const xmlChar*)"fill-opacity", (const xmlChar*)buf); + g_free (buf); + } + } + + if (line->last_arrow && line->last_coords) { + child = xmlNewDocNode (doc, NULL, (const xmlChar*) "path", NULL); + xmlAddChild (node, child); + string = g_string_new (""); + g_string_append_printf (string, "M%g %g", line->last_coords[0], line->last_coords[1]); + g_string_append_printf (string, "L%g %g", line->last_coords[2], line->last_coords[3]); + g_string_append_printf (string, "L%g %g", line->last_coords[4], line->last_coords[5]); + g_string_append_printf (string, "L%g %g", line->last_coords[6], line->last_coords[7]); + g_string_append_printf (string, "L%g %g", line->last_coords[8], line->last_coords[9]); + if (lineext->last_arrow_head_style == ARROW_HEAD_BOTH) + g_string_append_printf (string, "L%g %g", line->last_coords[10], line->last_coords[11]); + xmlNewProp (child, (const xmlChar*)"d", (const xmlChar*)string->str); + g_string_free (string, TRUE); + xmlNewProp (child, (const xmlChar*)"stroke", (const xmlChar*)"none"); + buf = g_strdup_printf ("#%06x", line->fill_rgba >> 8); + xmlNewProp (child, (const xmlChar*)"fill", (const xmlChar*)buf); + g_free (buf); + opacity = line->fill_rgba & 0xff; + if (opacity != 255) { + buf = g_strdup_printf ("%g", (double) opacity / 255.); + xmlNewProp (child, (const xmlChar*)"fill-opacity", (const xmlChar*)buf); + g_free (buf); + } + } +} + +void +gnome_canvas_line_ext_draw_cairo (GPrintable *gprintable, cairo_t *cr) +{ + + gdouble width; + gint i; + GnomeCanvasLine *line; + GnomeCanvasLineExt *lineext; + gdouble dashes[2] = {3.0, 2.0}; + + line = GNOME_CANVAS_LINE (gprintable); + lineext = GNOME_CANVAS_LINE_EXT (gprintable); + + if (line->num_points == 0) + return; + + cairo_set_source_rgba (cr, ((double)(line->fill_rgba >> 24)) / 255.0, + ((double)((line->fill_rgba >> 16) & 0xff)) / 255.0, + ((double)((line->fill_rgba >> 8) & 0xff)) / 255.0, + ((double) (line->fill_rgba & 0xff)) / 255.0); + + if (line->width_pixels) + width = (double) line->width / line->item.canvas->pixels_per_unit; + else + width = line->width; + cairo_set_line_width (cr, width); + + if (line->first_arrow || line->last_arrow) + cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); + else switch (line->cap) { + case GDK_CAP_ROUND: + cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); + break; + case GDK_CAP_PROJECTING: + cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); + break; + default: + cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); + break; + } + + cairo_set_line_join (cr, (cairo_line_join_t) line->join); + + cairo_set_dash (cr, dashes, (line->line_style == GDK_LINE_ON_OFF_DASH)? 2: 0, 0.); + + cairo_move_to (cr, line->coords[0], line->coords[1]); + for (i = 1; i < line->num_points; i++) + cairo_line_to (cr, line->coords[2 * i], line->coords[2 * i + 1]);/*FIXME: Change that for spline lines!*/ + + cairo_stroke (cr); + cairo_set_line_width (cr, 0.); + + if (line->first_arrow && line->first_coords) { + cairo_new_path (cr); + cairo_move_to (cr, line->first_coords[0], line->first_coords[1]); + cairo_line_to (cr, line->first_coords[2], line->first_coords[3]); + cairo_line_to (cr, line->first_coords[4], line->first_coords[5]); + cairo_line_to (cr, line->first_coords[6], line->first_coords[7]); + cairo_line_to (cr, line->first_coords[8], line->first_coords[9]); + if (lineext->first_arrow_head_style == ARROW_HEAD_BOTH) + cairo_line_to (cr, line->first_coords[10], line->first_coords[11]); + cairo_close_path (cr); + cairo_fill (cr); + } + + if (line->last_arrow && line->last_coords) { + cairo_new_path (cr); + cairo_move_to (cr, line->last_coords[0], line->last_coords[1]); + cairo_line_to (cr, line->last_coords[2], line->last_coords[3]); + cairo_line_to (cr, line->last_coords[4], line->last_coords[5]); + cairo_line_to (cr, line->last_coords[6], line->last_coords[7]); + cairo_line_to (cr, line->last_coords[8], line->last_coords[9]); + if (lineext->last_arrow_head_style == ARROW_HEAD_BOTH) + cairo_line_to (cr, line->last_coords[10], line->last_coords[11]); + cairo_close_path (cr); + cairo_fill (cr); + } + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-line.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-line.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-line.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-line.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,124 @@ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ + +/* Line/curve item type for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * + * Author: Federico Mena + */ + + +#ifndef GNOME_CANVAS_LINE_EXT_H +#define GNOME_CANVAS_LINE_EXT_H + + +#include + + +G_BEGIN_DECLS + +/* The following comments are for gnome-canvas-line. The new possiblity here is to have half arrowheads. + * the new variables are fisrt_arrow_head_style and last_arrow_head_style + */ + +/* Line item for the canvas. This is a polyline with configurable width, cap/join styles, and arrowheads. + * If arrowheads are enabled, then three values are used to specify their shape: + * + * arrow_shape_a: Distance from tip of arrowhead to the center point. + * arrow_shape_b: Distance from tip of arrowhead to trailing point, measured along the shaft. + * arrow_shape_c: Distance of trailing point from outside edge of shaft. + * + * The following object arguments are available: + * + * name type read/write description + * ------------------------------------------------------------------------------------------ + * points GnomeCanvasPoints* RW Pointer to a GnomeCanvasPoints structure. + * This can be created by a call to + * gnome_canvas_points_new() (in gnome-canvas-util.h). + * X coordinates are in the even indices of the + * points->coords array, Y coordinates are in + * the odd indices. + * fill_color string W X color specification for line + * fill_color_gdk GdkColor* RW Pointer to an allocated GdkColor + * fill_stipple GdkBitmap* RW Stipple pattern for the line + * width_pixels uint R Width of the line in pixels. The line width + * will not be scaled when the canvas zoom factor changes. + * width_units double R Width of the line in canvas units. The line width + * will be scaled when the canvas zoom factor changes. + * cap_style GdkCapStyle RW Cap ("endpoint") style for the line. + * join_style GdkJoinStyle RW Join ("vertex") style for the line. + * line_style GdkLineStyle RW Line dash style + * first_arrowhead boolean RW Specifies whether to draw an arrowhead on the + * first point of the line. + * last_arrowhead boolean RW Specifies whether to draw an arrowhead on the + * last point of the line. + * smooth boolean RW Specifies whether to smooth the line using + * parabolic splines. + * spline_steps uint RW Specifies the number of steps to use when rendering curves. + * arrow_shape_a double RW First arrow shape specifier. + * arrow_shape_b double RW Second arrow shape specifier. + * arrow_shape_c double RW Third arrow shape specifier. + */ + + +#define GNOME_TYPE_CANVAS_LINE_EXT (gnome_canvas_line_ext_get_type ()) +#define GNOME_CANVAS_LINE_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_LINE_EXT, GnomeCanvasLineExt)) +#define GNOME_CANVAS_LINE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_LINE_EXT, GnomeCanvasLineExtClass)) +#define GNOME_IS_CANVAS_LINE_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_LINE_EXT)) +#define GNOME_IS_CANVAS_LINE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_LINE_EXT)) +#define GNOME_CANVAS_LINE_EXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_LINE_EXT, GnomeCanvasLineExtClass)) + +typedef enum { + ARROW_HEAD_NONE, + ARROW_HEAD_LEFT, + ARROW_HEAD_RIGHT, + ARROW_HEAD_BOTH +} ArrowHeadStyle; + +typedef struct _GnomeCanvasLineExt GnomeCanvasLineExt; +typedef struct _GnomeCanvasLineExtClass GnomeCanvasLineExtClass; + +struct _GnomeCanvasLineExt { + GnomeCanvasLine line; + + ArrowHeadStyle first_arrow_head_style; + ArrowHeadStyle last_arrow_head_style; + double saved_coords[4]; +}; + +struct _GnomeCanvasLineExtClass { + GnomeCanvasLineClass parent_class; +}; + + +/* Standard Gtk function */ +GType gnome_canvas_line_ext_get_type (void) G_GNUC_CONST; + + +G_END_DECLS +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-pango.c gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-pango.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-pango.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-pango.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1534 @@ +/* libgcpcanvas/gcp-canvas-pango.c + * + * Copyright (c) 2005 Jean Bréfort + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" +#include "gcp-canvas-pango.h" +#include "gprintable.h" +#include +#include +#include +#include + +#include +#include + +#include +#include + +struct _GnomeCanvasPangoPrivate { + PangoLayout *layout; + /* Position at anchor */ + double x, y; + /* Dimensions */ + double width, height; /* user set size */ + double _width, _height; /* size of the pango layout */ + GtkAnchorType anchor; + guint rgba; + char *color_name; + gboolean editing, cursor_visible; + guint blink_timeout, clicks; + /* current position and selection bounds */ + gint index, start_sel, xl; + /* Current line */ + gint line; + /* IM */ + guint reseting_im :1; /* quick hack to keep gtk_im_context_reset from starting an edit */ + guint mask_state; + guint preedit_length; + GtkIMContext *im_context; + PangoAttrList *insert_attrs; +}; + +enum { + PROP_0, + PROP_LAYOUT, + PROP_X, + PROP_Y, + PROP_WIDTH, + PROP_HEIGHT, + PROP_ANCHOR, + PROP_FILL_COLOR, + PROP_EDITING, +}; + +enum { + CHANGED, + SEL_CHANGED, + LAST_SIGNAL +}; +static gulong gnome_canvas_pango_signals [LAST_SIGNAL] = { 0, }; + +static GnomeCanvasItemClass *parent_class; + +static void gnome_canvas_pango_class_init (GnomeCanvasPangoClass *klass); +static void gnome_canvas_pango_init(GnomeCanvasPango *text); +static void gnome_canvas_pango_finalize(GObject *object); +static void gnome_canvas_pango_set_property(GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec); +static void gnome_canvas_pango_get_property(GObject *object, guint property_id, + GValue *value, GParamSpec *pspec); +static void gnome_canvas_pango_update(GnomeCanvasItem *item, double *affine, + ArtSVP *clip_path, int flags); +static void gnome_canvas_pango_realize(GnomeCanvasItem *item); +static void gnome_canvas_pango_unrealize(GnomeCanvasItem *item); +static double gnome_canvas_pango_point(GnomeCanvasItem *item, + double x, double y, + int cx, int cy, + GnomeCanvasItem **actual_item); +static void gnome_canvas_pango_draw(GnomeCanvasItem *item, + GdkDrawable *drawable, + int x, int y, int width, int height); +static void gnome_canvas_pango_render(GnomeCanvasItem *item, + GnomeCanvasBuf *buf); +static gint gnome_canvas_pango_event(GnomeCanvasItem *item, + GdkEvent *event); +static void gnome_canvas_pango_get_bounds(GnomeCanvasItem *text, double *px1, double *py1, + double *px2, double *py2); +static void gnome_canvas_pango_export_svg (GPrintable *gprintable, xmlDocPtr doc, xmlNodePtr node); +static void gnome_canvas_pango_draw_cairo (GPrintable *gprintable, cairo_t *cr); +/* some code imported from gnumeric/src/workbook-edit.c */ + +static gboolean +cb_set_attr_list_len (PangoAttribute *a, gpointer len_bytes) +{ + a->start_index = 0; + a->end_index = GPOINTER_TO_INT (len_bytes); + return FALSE; +} + +struct cb_splice { + guint pos, len; + PangoAttrList *result; +}; + +static gboolean +cb_splice (PangoAttribute *attr, gpointer _data) +{ + struct cb_splice *data = _data; + + if (attr->start_index >= data->pos) { + PangoAttribute *new_attr = pango_attribute_copy (attr); + new_attr->start_index += data->len; + new_attr->end_index += data->len; + pango_attr_list_insert (data->result, new_attr); + } else if (attr->end_index <= data->pos) { + PangoAttribute *new_attr = pango_attribute_copy (attr); + pango_attr_list_insert (data->result, new_attr); + } else { + PangoAttribute *new_attr = pango_attribute_copy (attr); + new_attr->end_index = data->pos; + pango_attr_list_insert (data->result, new_attr); + + new_attr = pango_attribute_copy (attr); + new_attr->start_index = data->pos + data->len; + new_attr->end_index += data->len; + pango_attr_list_insert (data->result, new_attr); + } + + return FALSE; +} + +static gboolean +cb_splice_true (G_GNUC_UNUSED PangoAttribute *attr, G_GNUC_UNUSED gpointer data) +{ + return TRUE; +} + +static void +gnome_canvas_pango_attr_list_splice (PangoAttrList *tape, + PangoAttrList *piece, + guint pos, guint len) +{ + struct cb_splice data; + PangoAttrList *tape2; + + data.result = tape; + data.pos = pos; + data.len = len; + + /* Clean out the tape. */ + tape2 = pango_attr_list_filter (tape, cb_splice_true, NULL); + + if (tape2) { + (void)pango_attr_list_filter (tape2, cb_splice, &data); + pango_attr_list_unref (tape2); + } + + /* Apply the new attributes. */ + pango_attr_list_splice (data.result, piece, pos, 0); +} + +typedef struct { + unsigned start_pos, end_pos, len; /* in bytes not chars */ +} EntryDeleteTextClosure; + +/* + * + * | +-------------------+ The attribute + * + * +----+ (1) + * +------------------+ (2) + * +------+ (3) + * +--+ (4) + * +--------------+ (5) + * +---------------------------------+ (6) + * + */ +static gboolean +cb_delete_filter (PangoAttribute *a, EntryDeleteTextClosure *change) +{ + if (change->start_pos >= a->end_index) + return FALSE; /* (1) */ + + if (change->start_pos <= a->start_index) { + if (change->end_pos >= a->end_index) + return TRUE; /* (6) */ + + a->end_index -= change->len; + if (change->end_pos >= a->start_index) + a->start_index = change->start_pos; /* (5) */ + else + a->start_index -= change->len; /* (4) */ + } else { + if (change->end_pos >= a->end_index) + a->end_index = change->start_pos; /* (2) */ + else + a->end_index -= change->len; /* (3) */ + } + + return FALSE; +} + +static void +delete_text (PangoAttrList *list, int start, int length) +{ + PangoAttrList *gunk; + EntryDeleteTextClosure change; + + change.start_pos = start; + change.end_pos = start + length; + change.len = length; + gunk = pango_attr_list_filter (list, + (PangoAttrFilterFunc) cb_delete_filter, &change); + if (gunk != NULL) + pango_attr_list_unref (gunk); +} + +/* IM Context Callbacks + */ + +static void +gnome_canvas_pango_commit_cb (GtkIMContext *context, const gchar *str, GnomeCanvasPango *text) +{ + GString *string = g_string_new (pango_layout_get_text (text->_priv->layout)); + int sel_length = abs (text->_priv->index - text->_priv->start_sel); + int len = strlen (str); + if (sel_length > 0) { + text->_priv->index = text->_priv->start_sel = + MIN (text->_priv->index, text->_priv->start_sel); + g_string_erase (string, text->_priv->index, sel_length); + delete_text (pango_layout_get_attributes (text->_priv->layout), + text->_priv->index, sel_length); + } + g_string_insert (string, text->_priv->index, str); + pango_layout_set_text (text->_priv->layout, string->str, -1); + pango_attr_list_filter (text->_priv->insert_attrs, + cb_set_attr_list_len, + GINT_TO_POINTER (len)); + + gnome_canvas_pango_attr_list_splice (pango_layout_get_attributes (text->_priv->layout), + text->_priv->insert_attrs, + text->_priv->index, len); + text->_priv->start_sel = text->_priv->index += len; + g_string_free (string, TRUE); + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [CHANGED], 0); + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); +} + +static void +gnome_canvas_pango_preedit_changed_cb (GtkIMContext *context, GnomeCanvasPango *text) +{ + /* TODO: write this function */ +} + +static gboolean +gnome_canvas_pango_retrieve_surrounding_cb (GtkIMContext *context, GnomeCanvasPango *text) +{ + /* TODO: write this function */ + return TRUE; +} + +static gboolean +gnome_canvas_pango_delete_surrounding_cb (GtkIMContext *context, + gint offset, + gint n_chars, + GnomeCanvasPango *text) +{ + /* TODO: write this function */ + return TRUE; +} + +#define PREBLINK_TIME 300 +#define CURSOR_ON_TIME 800 +#define CURSOR_OFF_TIME 400 + +static gint +blink_cb (gpointer data) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (data); + + if (text->_priv->cursor_visible) + text->_priv->blink_timeout = g_timeout_add ( + CURSOR_OFF_TIME, blink_cb, text); + else + text->_priv->blink_timeout = g_timeout_add ( + CURSOR_ON_TIME, blink_cb, text); + + text->_priv->cursor_visible = !text->_priv->cursor_visible; + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); + /* Remove ourself */ + return FALSE; +} + +static void +gnome_canvas_pango_print_init (GPrintableIface *iface) +{ + iface->export_svg = gnome_canvas_pango_export_svg; + iface->draw_cairo = gnome_canvas_pango_draw_cairo; +} + +GType +gnome_canvas_pango_get_type(void) +{ + static GType pango_type; + + if (!pango_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasPangoClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_pango_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasPango), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_pango_init, + NULL /* value_table */ + }; + + static const GInterfaceInfo print_info = { + (GInterfaceInitFunc) gnome_canvas_pango_print_init, + NULL, NULL + }; + + pango_type = g_type_register_static (GNOME_TYPE_CANVAS_ITEM, "GnomeCanvasPango", + &object_info, 0); + + g_type_add_interface_static (pango_type, G_TYPE_PRINTABLE, &print_info); + } + + return pango_type; +} + +static void +gnome_canvas_pango_class_init (GnomeCanvasPangoClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); +/* GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass); */ + GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS (klass); + + parent_class = g_type_class_peek_parent (klass); + + gobject_class->set_property = gnome_canvas_pango_set_property; + gobject_class->get_property = gnome_canvas_pango_get_property; + gobject_class->finalize = gnome_canvas_pango_finalize; + + g_object_class_install_property ( + gobject_class, + PROP_LAYOUT, + g_param_spec_object ("layout", + _("Layout"), + _("Pango layout"), + PANGO_TYPE_LAYOUT, + G_PARAM_READWRITE)); + g_object_class_install_property ( + gobject_class, + PROP_X, + g_param_spec_double ("x", + _("X"), + _("X position"), + -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, + G_PARAM_READWRITE)); + g_object_class_install_property ( + gobject_class, + PROP_Y, + g_param_spec_double ("y", + _("Y"), + _("Y position"), + -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, + G_PARAM_READWRITE)); + g_object_class_install_property ( + gobject_class, + PROP_WIDTH, + g_param_spec_double ("width", + _("Width"), + _("Width for text box"), + -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, + G_PARAM_READWRITE)); + g_object_class_install_property ( + gobject_class, + PROP_HEIGHT, + g_param_spec_double ("height", + _("Height"), + _("Height for text box"), + -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, + G_PARAM_READWRITE)); + g_object_class_install_property ( + gobject_class, + PROP_ANCHOR, + g_param_spec_enum ("anchor", + _("Anchor"), + _("Anchor point for text"), + GTK_TYPE_ANCHOR_TYPE, + GTK_ANCHOR_NW, + G_PARAM_READWRITE)); + g_object_class_install_property ( + gobject_class, + PROP_FILL_COLOR, + g_param_spec_string ("fill_color", + _("Color"), + _("Text color, as string"), + NULL, + (G_PARAM_READWRITE))); + g_object_class_install_property ( + gobject_class, + PROP_EDITING, + g_param_spec_boolean ("editing", + _("Editing"), + _("Is this rich text item currently edited?"), + FALSE, + G_PARAM_READWRITE)); + + gnome_canvas_pango_signals [CHANGED] = g_signal_new ("changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GnomeCanvasPangoClass, changed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + gnome_canvas_pango_signals [SEL_CHANGED] = g_signal_new ("sel-changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GnomeCanvasPangoClass, sel_changed), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); + + item_class->update = gnome_canvas_pango_update; + item_class->realize = gnome_canvas_pango_realize; + item_class->unrealize = gnome_canvas_pango_unrealize; + item_class->draw = gnome_canvas_pango_draw; + item_class->point = gnome_canvas_pango_point; + item_class->render = gnome_canvas_pango_render; + item_class->event = gnome_canvas_pango_event; + item_class->bounds = gnome_canvas_pango_get_bounds; +} + +static void +gnome_canvas_pango_init (GnomeCanvasPango *text) +{ + text->_priv = g_new0 (GnomeCanvasPangoPrivate, 1); + text->_priv->anchor = GTK_ANCHOR_NW; + text->_priv->im_context = gtk_im_multicontext_new (); + text->_priv->preedit_length = 0; + text->_priv->insert_attrs = pango_attr_list_new (); + text->_priv->reseting_im = FALSE; + text->_priv->clicks = 0; + g_signal_connect (G_OBJECT (text->_priv->im_context), "commit", + G_CALLBACK (gnome_canvas_pango_commit_cb), text); + g_signal_connect (G_OBJECT (text->_priv->im_context), "preedit_changed", + G_CALLBACK (gnome_canvas_pango_preedit_changed_cb), text); + g_signal_connect (G_OBJECT (text->_priv->im_context), "retrieve_surrounding", + G_CALLBACK (gnome_canvas_pango_retrieve_surrounding_cb), text); + g_signal_connect (G_OBJECT (text->_priv->im_context), "delete_surrounding", + G_CALLBACK (gnome_canvas_pango_delete_surrounding_cb), text); +} + +static void +gnome_canvas_pango_finalize (GObject *object) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (object); + g_return_if_fail (text); + + if (text->_priv->blink_timeout != 0) { + g_source_remove (text->_priv->blink_timeout); + text->_priv->blink_timeout = 0; + } + /*remove idle calls */ + while (g_idle_remove_by_data (object)); + + if (text->_priv->layout) + g_object_unref (text->_priv->layout); + if (text->_priv->insert_attrs) + pango_attr_list_unref (text->_priv->insert_attrs); + if (text->_priv->color_name != NULL) + g_free (text->_priv->color_name); + g_object_unref (text->_priv->im_context); + g_free (text->_priv); + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gnome_canvas_pango_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (object); + + switch (property_id) { + case PROP_LAYOUT: + if (text->_priv->layout) + g_object_unref (text->_priv->layout); + text->_priv->layout = g_value_get_object (value); + g_object_ref (text->_priv->layout); + text->_priv->line = 0; + text->_priv->index = text->_priv->start_sel = 0; + break; + case PROP_X: + text->_priv->x = g_value_get_double (value); + break; + case PROP_Y: + text->_priv->y = g_value_get_double (value); + break; + case PROP_WIDTH: + text->_priv->width = g_value_get_double (value); + break; + case PROP_HEIGHT: + text->_priv->height = g_value_get_double (value); + break; + case PROP_ANCHOR: + text->_priv->anchor = g_value_get_enum (value); + break; + case PROP_FILL_COLOR: { + const char *color_name; + GdkColor color; + + if (text->_priv->color_name != NULL) { + g_free (text->_priv->color_name); + text->_priv->color_name = NULL; + } + + color_name = g_value_get_string (value); + if (color_name) { + text->_priv->color_name = g_strdup (color_name); + gdk_color_parse (color_name, &color); + text->_priv->rgba = ((color.red & 0xff00) << 16 | + (color.green & 0xff00) << 8 | + (color.blue & 0xff00) | + 0xff); + } else + text->_priv->rgba = 0xff; + break; + } + case PROP_EDITING: { + gboolean editing = g_value_get_boolean (value); + if (editing == text->_priv->editing) + break; + text->_priv->editing = editing; + if (editing) { + text->_priv->cursor_visible = TRUE; + text->_priv->blink_timeout = g_timeout_add ( + CURSOR_ON_TIME, blink_cb, text); + } else { + text->_priv->cursor_visible = FALSE; + if (text->_priv->blink_timeout != 0) { + g_source_remove (text->_priv->blink_timeout); + text->_priv->blink_timeout = 0; + } + while ( g_idle_remove_by_data (object)); + } + break; + } + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } + + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); +} + +static void +gnome_canvas_pango_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (object); + + switch (property_id) { + case PROP_LAYOUT: + g_value_set_object (value, text->_priv->layout); + break; + case PROP_X: + g_value_set_double (value, text->_priv->x); + break; + case PROP_Y: + g_value_set_double (value, text->_priv->y); + break; + case PROP_WIDTH: + g_value_set_double (value, text->_priv->width); + break; + case PROP_HEIGHT: + g_value_set_double (value, text->_priv->height); + break; + case PROP_ANCHOR: + g_value_set_enum (value, text->_priv->anchor); + break; + case PROP_FILL_COLOR: + g_value_set_string (value, text->_priv->color_name); + break; + case PROP_EDITING: + g_value_set_boolean (value, text->_priv->editing); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +adjust_for_anchors(GnomeCanvasPango *text, double *ax, double *ay) +{ + double x, y; + double width = (text->_priv->width > 0)? text->_priv->width: text->_priv->_width; + double height = (text->_priv->height > 0)? text->_priv->height: text->_priv->_height; + + x = text->_priv->x; + y = text->_priv->y; + + /* Anchor text */ + /* X coordinates */ + switch (text->_priv->anchor) { + case GTK_ANCHOR_NW: + case GTK_ANCHOR_W: + case GTK_ANCHOR_SW: + break; + + case GTK_ANCHOR_N: + case GTK_ANCHOR_CENTER: + case GTK_ANCHOR_S: + x -= width / 2; + break; + + case GTK_ANCHOR_NE: + case GTK_ANCHOR_E: + case GTK_ANCHOR_SE: + x -= width; + break; + default: + break; + } + + /* Y coordinates */ + switch (text->_priv->anchor) { + case GTK_ANCHOR_NW: + case GTK_ANCHOR_N: + case GTK_ANCHOR_NE: + break; + + case GTK_ANCHOR_W: + case GTK_ANCHOR_CENTER: + case GTK_ANCHOR_E: + y -= height / 2; + break; + + case GTK_ANCHOR_SW: + case GTK_ANCHOR_S: + case GTK_ANCHOR_SE: + y -= height; + break; + default: + break; + } + + if (ax) + *ax = x; + if (ay) + *ay = y; +} /* adjust_for_anchors */ + +static void +gnome_canvas_pango_update (GnomeCanvasItem *item, double *affine, + ArtSVP *clip_path, int flags) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + double i2w[6], w2c[6], i2c[6]; + double x1, y1, x2, y2; + double width = (text->_priv->width > 0)? text->_priv->width: text->_priv->_width; + ArtPoint ip, cp; + + GNOME_CANVAS_ITEM_CLASS (parent_class)->update ( item, affine, clip_path, flags); + + gnome_canvas_item_i2w_affine (item, i2w); + gnome_canvas_w2c_affine (item->canvas, w2c); + art_affine_multiply (i2c, i2w, w2c); + + if (text->_priv->layout) { + PangoRectangle rect; + pango_layout_get_extents (text->_priv->layout, NULL, &rect); + text->_priv->_width = rect.width / PANGO_SCALE; + text->_priv->_height = rect.height / PANGO_SCALE; + } + + adjust_for_anchors (text, &x1, &y1); + if (width < 1.) + width = 1.; + x2 = x1 + width; + y2 = y1 + ((text->_priv->height > 0)? text->_priv->height: text->_priv->_height); + + ip.x = x1; + ip.y = y1; + art_affine_point (&cp, &ip, i2c); + x1 = cp.x; + y1 = cp.y; + + ip.x = x2; + ip.y = y2; + art_affine_point (&cp, &ip, i2c); + x2 = cp.x; + y2 = cp.y; + + gnome_canvas_update_bbox (item, x1, y1, x2 + 1, y2); +} + +static void +gnome_canvas_pango_realize (GnomeCanvasItem *item) +{ +} + +static void +gnome_canvas_pango_unrealize (GnomeCanvasItem *item) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + + if (text->_priv->blink_timeout != 0) { + g_source_remove (text->_priv->blink_timeout); + text->_priv->blink_timeout = 0; + } + /*remove idle calls */ + while (g_idle_remove_by_data (item)); + + (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize)(item); +} + +static double +gnome_canvas_pango_point (GnomeCanvasItem *item, + double x, double y, + int cx, int cy, + GnomeCanvasItem **actual_item) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + double ax, ay; + double x1, x2, y1, y2; + double dx, dy; + + *actual_item = item; + + /* This is a lame cop-out. Anywhere inside of the bounding box. */ + + adjust_for_anchors(text, &ax, &ay); + + x1 = ax; + y1 = ay; + x2 = ax + ((text->_priv->width > 0)? text->_priv->width: text->_priv->_width); + y2 = ay + ((text->_priv->height > 0)? text->_priv->height: text->_priv->_height); + + if ((x > x1) && (y > y1) && (x < x2) && (y < y2)) + return 0.0; + + if (x < x1) + dx = x1 - x; + else if (x > x2) + dx = x - x2; + else + dx = 0.0; + + if (y < y1) + dy = y1 - y; + else if (y > y2) + dy = y - y2; + else + dy = 0.0; + + return sqrt(dx * dx + dy * dy); +} + +static void +gnome_canvas_pango_draw (GnomeCanvasItem *item, + GdkDrawable *drawable, + int x, int y, int width, int height) +{ +} + +static void +gnome_canvas_pango_render (GnomeCanvasItem *item, + GnomeCanvasBuf *buf) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + double x0, y0; + double i2w[6], w2c[6], i2c[6]; + double ax, ay; + double x1, y1, x2, y2; + int x, y, px, py, h, w, dw, i, j; + ArtPoint ip, cp; + guint8 r, g, b, *dst, *src; + guchar *data; + cairo_surface_t *surf; + cairo_t *cr; + cairo_matrix_t matrix; + PangoAttrList *attrs = pango_layout_get_attributes (text->_priv->layout); + if (attrs) + pango_attr_list_ref (attrs); + + g_return_if_fail (text); + g_return_if_fail (text->_priv->layout); + + adjust_for_anchors (text, &ax, &ay); + + gnome_canvas_buf_ensure_buf (buf); + + gnome_canvas_item_i2w_affine (item, i2w); + gnome_canvas_w2c_affine (item->canvas, w2c); + art_affine_multiply (i2c, i2w, w2c); + + matrix.xx = i2c[0]; + matrix.xy = i2c[1]; + matrix.yx = i2c[2]; + matrix.yy = i2c[3]; + + ip.x = ax; + ip.y = ay; + art_affine_point (&cp, &ip, i2c); + x0 = x1 = floor (cp.x + 0.5); + y0 = y1 = floor (cp.y + 0.5); + + ip.x = ax + ((text->_priv->width > 0)? text->_priv->width: text->_priv->_width); + ip.y = ay + ((text->_priv->height > 0)? text->_priv->height: text->_priv->_height); + art_affine_point (&cp, &ip, i2c); + x2 = floor (cp.x + 0.5); + y2 = floor (cp.y + 0.5); + + w = x2 - x1 + 1; + h = y2 - y1 + 1; + if (x0 < buf->rect.x0) { + w -= buf->rect.x0 - x0; + x = 0; + px = x0 - buf->rect.x0; + x0 = buf->rect.x0; + } else { + x = x0 - buf->rect.x0; + px = 0; + } + if (x0 + w >= buf->rect.x1) + w = buf->rect.x1 - x0; + if (y0 < buf->rect.y0) + { + h -= buf->rect.y0 - y0; + y = 0; + py = y0 - buf->rect.y0; + y0 = buf->rect.y0; + } else { + y = y0 - buf->rect.y0; + py = 0; + } + if (y0 + h >= buf->rect.y1) + h = buf->rect.y1 - y0; + if (((int) w <= 0) || ((int) h <= 0)) + return; + + matrix.x0 = px; + matrix.y0 = py; + /* cairo image surfaces must have width that are multiples of 4 */ + dw = (w / 4 + 1) * 4; + data = g_malloc0 (w * h * 4); + /* copy existing buffer */ + src = data; + dst = buf->buf + (int) y * buf->buf_rowstride + (int) x * 3; + j = h; + + while (j-- > 0) { + for (i = w; i-- > 0 ; dst += 3, src += 4) { + src[2] = dst[0]; + src[1] = dst[1]; + src[0] = dst[2]; + } + dst += buf->buf_rowstride - w * 3; + } + surf = cairo_image_surface_create_for_data (data, CAIRO_FORMAT_RGB24, + w, h, w * 4); + cr = cairo_create (surf); + cairo_set_matrix (cr, &matrix); + /* change colors for selected text */ + if (text->_priv->editing && text->_priv->index != text->_priv->start_sel) { + PangoAttribute *fg, *bg; + PangoAttrList *list = (attrs)? pango_attr_list_copy (attrs): pango_attr_list_new (); + fg = pango_attr_foreground_new (0xffff, 0xffff, 0xffff); + bg = pango_attr_background_new (0x8000, 0x8000, 0x8000); + if (text->_priv->index > text->_priv->start_sel) { + fg->start_index = bg->start_index = text->_priv->start_sel; + fg->end_index = bg->end_index = text->_priv->index; + } else { + fg->start_index = bg->start_index = text->_priv->index; + fg->end_index = bg->end_index = text->_priv->start_sel; + } + pango_attr_list_insert (list, bg); + pango_attr_list_insert (list, fg); + pango_layout_set_attributes (text->_priv->layout, list); + pango_attr_list_unref (list); + } + cairo_set_source_rgb (cr, + (double) (text->_priv->rgba >> 24) /255, + (double) ((text->_priv->rgba >> 16) & 0xff) / 255., + (double) ((text->_priv->rgba >> 8) & 0xff) / 255.); + pango_cairo_update_layout (cr, text->_priv->layout); + pango_cairo_show_layout (cr, text->_priv->layout); + pango_context_set_matrix (pango_layout_get_context (text->_priv->layout), NULL); + + if (text->_priv->cursor_visible) { + PangoRectangle rect; + cairo_set_source_rgb (cr, 0., 0., 0.); + pango_layout_get_cursor_pos (text->_priv->layout, + text->_priv->index, &rect, NULL); + cairo_new_path (cr); + cairo_move_to (cr, rect.x / PANGO_SCALE, rect.y / PANGO_SCALE); + cairo_rel_line_to (cr, 0, rect.height / PANGO_SCALE); + cairo_stroke (cr); + } + + r = (guint8) text->_priv->rgba >> 24; + g = (guint8) (text->_priv->rgba >> 16) & 0xff; + b = (guint8) (text->_priv->rgba >> 8) & 0xff; + + src = data; + dst = buf->buf + (int) y * buf->buf_rowstride + (int) x * 3; + + while (h-- > 0) { + for (i = w; i-- > 0 ; dst += 3, src += 4) { + dst[0] = src[2]; + dst[1] = src[1]; + dst[2] = src[0]; + } + dst += buf->buf_rowstride - w * 3; + } + + cairo_destroy (cr); + cairo_surface_destroy (surf); + g_free (data); + pango_layout_set_attributes (text->_priv->layout, attrs); + if (attrs) + pango_attr_list_unref (attrs); +} + +static gboolean +get_event_coordinates(GdkEvent *event, gint *x, gint *y) +{ + g_return_val_if_fail(event, FALSE); + + switch (event->type) { + case GDK_MOTION_NOTIFY: + *x = event->motion.x; + *y = event->motion.y; + return TRUE; + break; + case GDK_BUTTON_PRESS: + case GDK_2BUTTON_PRESS: + case GDK_3BUTTON_PRESS: + case GDK_BUTTON_RELEASE: + *x = event->button.x; + *y = event->button.y; + return TRUE; + break; + + default: + return FALSE; + break; + } +} /* get_event_coordinates */ + +static void +gnome_canvas_pango_update_line_pos (GnomeCanvasPango *text) +{ + int i = 0; + char const *cts = pango_layout_get_text (text->_priv->layout); + PangoLayoutLine *line = pango_layout_get_line (text->_priv->layout, i); + if (text->_priv->index > strlen (cts)) + text->_priv->index = strlen (cts); + else if (text->_priv->index < 0) + text->_priv->index = 0; + while (line) { + if (text->_priv->index >= line->start_index && + text->_priv->index <= line->start_index + line->length) + break; + line = pango_layout_get_line (text->_priv->layout, ++i); + } + pango_layout_line_index_to_x (line, text->_priv->index, 0, &text->_priv->xl); + if (!line) { + /* Should not occur */ + g_warning ("How did we get there?"); + i--; + } + text->_priv->line = i; +} + +static gint +gnome_canvas_pango_button_press_event (GnomeCanvasItem *item, + GdkEventButton *event) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + double newx, newy; + int index, trailing, sel_start, sel_end; + + newx = (event->x - text->_priv->x) * item->canvas->pixels_per_unit; + newy = (event->y - text->_priv->y) * item->canvas->pixels_per_unit; + + text->_priv->clicks++; + if (text->_priv->index >= text->_priv->start_sel) { + sel_start = text->_priv->start_sel; + sel_end = text->_priv->index; + } else { + sel_end = text->_priv->start_sel; + sel_start = text->_priv->index; + } + pango_layout_xy_to_index (text->_priv->layout, newx * PANGO_SCALE, + newy * PANGO_SCALE, &index, &trailing); + index += trailing; + if (index >= sel_start && index <= sel_end) { + /* TODO: start drag and drop, at the moment, just position the cursor */ + text->_priv->index = text->_priv->start_sel = index; + } else { + text->_priv->index = text->_priv->start_sel = index; + } + gnome_canvas_pango_update_line_pos (text); + text->_priv->start_sel = text->_priv->index; + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); + return TRUE; +} + +static gint +gnome_canvas_pango_button_release_event (GnomeCanvasItem *item, + GdkEventButton *event) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + /* TODO: use a timeout to reset clicks */ + text->_priv->clicks = 0; + struct GnomeCanvasPangoSelBounds bounds; + bounds.start = text->_priv->start_sel; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + return TRUE; +} + +static gint +gnome_canvas_pango_drag_event (GnomeCanvasItem *item, + GdkEventButton *event) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + double newx, newy; + int trailing; + + newx = (event->x - text->_priv->x) * item->canvas->pixels_per_unit; + newy = (event->y - text->_priv->y) * item->canvas->pixels_per_unit; + pango_layout_xy_to_index (text->_priv->layout, newx * PANGO_SCALE, + newy * PANGO_SCALE, &text->_priv->index, &trailing); + text->_priv->index += trailing; + gnome_canvas_pango_update_line_pos (text); + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); + /* TODO: implement DnD */ + return TRUE; +} + +static gint +gnome_canvas_pango_key_press_event (GnomeCanvasItem *item, + GdkEventKey *event) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + PangoLayoutLine *line; + struct GnomeCanvasPangoSelBounds bounds; + + if (!text->_priv->layout) + return FALSE; + + if (gtk_im_context_filter_keypress (text->_priv->im_context, event)) { + gnome_canvas_pango_update_line_pos (text); + return TRUE; + } + + switch (event->keyval) { + case GDK_Control_L: + case GDK_Control_R: + return FALSE; + case GDK_Return: + case GDK_KP_Enter: + gnome_canvas_pango_commit_cb (text->_priv->im_context, "\n", text); + break; + + case GDK_Tab: + gnome_canvas_pango_commit_cb (text->_priv->im_context, "\t", text); + break; + + /* MOVEMENT */ + case GDK_Right: + if (text->_priv->index == strlen (pango_layout_get_text (text->_priv->layout))) + break; + if (event->state & GDK_CONTROL_MASK) { + /* move to end of word */ + /* TODO: write this code */ + /* PangoLanguage *language = pango_context_get_language (pango_layout_get_context (text->_priv->layout)); */ + } else { + int trailing; + pango_layout_move_cursor_visually (text->_priv->layout, TRUE, + text->_priv->index, 0, 1, &text->_priv->index, &trailing); + text->_priv->index += trailing; + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_Left: + if (text->_priv->index == 0) + break; + if (event->state & GDK_CONTROL_MASK) { + /* move to start of word */ + /* TODO: write this code */ + } else { + int trailing; + pango_layout_move_cursor_visually (text->_priv->layout, TRUE, + text->_priv->index, 0, -1, &text->_priv->index, &trailing); + text->_priv->index += trailing; + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_f: + if (event->state & GDK_CONTROL_MASK) { + int trailing; + pango_layout_move_cursor_visually (text->_priv->layout, TRUE, + text->_priv->index, 0, 1, &text->_priv->index, &trailing); + text->_priv->index += trailing; + } else if (event->state & GDK_MOD1_MASK) { + /* move to end of word */ + /* TODO: write this code */ + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_b: + if (event->state & GDK_CONTROL_MASK) { + int trailing; + pango_layout_move_cursor_visually (text->_priv->layout, TRUE, + text->_priv->index, 0, -1, &text->_priv->index, &trailing); + text->_priv->index += trailing; + } else if (event->state & GDK_MOD1_MASK) { + /* move to start of word */ + /* TODO: write this code */ + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_p: + if (!(event->state & GDK_CONTROL_MASK)) + break; + case GDK_Up: + if (text->_priv->line > 0) { + int trailing; + text->_priv->line--; + line = pango_layout_get_line (text->_priv->layout, text->_priv->line); + pango_layout_line_x_to_index (line, text->_priv->xl, &text->_priv->index, &trailing); + if (trailing) + text->_priv->index++; + pango_layout_line_index_to_x (line, text->_priv->index, 0, &text->_priv->xl); + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + } + break; + case GDK_n: + if (!(event->state & GDK_CONTROL_MASK)) + break; + case GDK_Down: + if (text->_priv->line < pango_layout_get_line_count (text->_priv->layout) - 1) { + int trailing; + text->_priv->line++; + line = pango_layout_get_line (text->_priv->layout, text->_priv->line); + pango_layout_line_x_to_index (line, text->_priv->xl, &text->_priv->index, &trailing); + if (trailing) + text->_priv->index++; + pango_layout_line_index_to_x (line, text->_priv->index, 0, &text->_priv->xl); + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_Home: + if (event->state & GDK_CONTROL_MASK) { + text->_priv->index = text->_priv->line = 0; + } else { + PangoLayoutLine *line = pango_layout_get_line (text->_priv->layout, + text->_priv->line); + text->_priv->index = line->start_index; + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_End: + if (event->state & GDK_CONTROL_MASK) { + char const *cts = pango_layout_get_text (text->_priv->layout); + text->_priv->index = strlen (cts); + text->_priv->line = pango_layout_get_line_count (text->_priv->layout); + } else { + PangoLayoutLine *line = pango_layout_get_line (text->_priv->layout, + text->_priv->line); + text->_priv->index = line->start_index + line->length; + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_a: + if (event->state & GDK_CONTROL_MASK) { + PangoLayoutLine *line = pango_layout_get_line (text->_priv->layout, + text->_priv->line); + text->_priv->index = line->start_index; + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_e: + if (event->state & GDK_CONTROL_MASK) { + PangoLayoutLine *line = pango_layout_get_line (text->_priv->layout, + text->_priv->line); + text->_priv->index = line->start_index + line->length; + } + bounds.start = (event->state & GDK_SHIFT_MASK)? text->_priv->start_sel: text->_priv->index; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + + /* DELETING TEXT */ + case GDK_Delete: + case GDK_KP_Delete: { + GString *string = g_string_new (pango_layout_get_text (text->_priv->layout)); + if (event->state & GDK_CONTROL_MASK) { + /* delete from cursor to end of word */ + /* TODO: write this code */ + } else { + int sel_length = abs (text->_priv->index - text->_priv->start_sel); + if (sel_length > 0) { + text->_priv->index = text->_priv->start_sel = + MIN (text->_priv->index, text->_priv->start_sel); + g_string_erase (string, text->_priv->index, sel_length); + delete_text (pango_layout_get_attributes (text->_priv->layout), + text->_priv->index, sel_length); + } else if (text->_priv->index < string->len) { + char const* end = g_utf8_find_next_char (string->str + text->_priv->index, NULL); + int delta = end - string->str - text->_priv->index; + g_string_erase (string, text->_priv->index,delta); + delete_text (pango_layout_get_attributes (text->_priv->layout), + text->_priv->index, delta); + } + } + pango_layout_set_text (text->_priv->layout, string->str, -1); + g_string_free (string, TRUE); + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [CHANGED], 0); + bounds.start = text->_priv->start_sel; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + } + case GDK_d: + if (event->state & GDK_CONTROL_MASK) { + } else if (event->state & GDK_MOD1_MASK) { + /* delete from cursor to end of word */ + /* TODO: write this code */ + } + bounds.start = text->_priv->start_sel; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + case GDK_BackSpace: { + GString *string = g_string_new (pango_layout_get_text (text->_priv->layout)); + if (event->state & GDK_CONTROL_MASK) { + /* delete from cursor to start of word */ + /* TODO: write this code */ + } else { + int sel_length = abs (text->_priv->index - text->_priv->start_sel); + if (sel_length > 0) { + text->_priv->index = text->_priv->start_sel = + MIN (text->_priv->index, text->_priv->start_sel); + g_string_erase (string, text->_priv->index, sel_length); + delete_text (pango_layout_get_attributes (text->_priv->layout), + text->_priv->index, sel_length); + } else if (text->_priv->index > 0) { + char const* end = g_utf8_find_prev_char (string->str, string->str + text->_priv->index); + int delta = string->str + text->_priv->index - end; + text->_priv->start_sel = text->_priv->index -= delta; + g_string_erase (string, text->_priv->index, delta); + delete_text (pango_layout_get_attributes (text->_priv->layout), + text->_priv->index, delta); + } + } + pango_layout_set_text (text->_priv->layout, string->str, -1); + g_string_free (string, TRUE); + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [CHANGED], 0); + bounds.start = text->_priv->start_sel; + bounds.cur = text->_priv->index; + g_signal_emit (G_OBJECT (text), gnome_canvas_pango_signals [SEL_CHANGED], 0, &bounds); + break; + } + case GDK_k: + if (event->state & GDK_CONTROL_MASK) { + /* delete from cursor to end of paragraph */ + /* TODO: write this code */ + } + break; + case GDK_u: + if (event->state & GDK_CONTROL_MASK) { + /* delete whole paragraph */ + /* TODO: write this code */ + } + break; + case GDK_backslash: + if (event->state & GDK_MOD1_MASK) { + /* delete all white spaces around the cursor */ + /* TODO: write this code */ + } + break; + default: + break; + } + + gnome_canvas_pango_update_line_pos (text); + if (!(event->state & GDK_SHIFT_MASK)) + text->_priv->start_sel = text->_priv->index; + + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); + + return TRUE; +} /* gnome_canvas_rich_text_ext_key_press_event */ + +static gint +gnome_canvas_pango_event (GnomeCanvasItem *item, + GdkEvent *event) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + int x, y; + + if (get_event_coordinates (event, &x, &y)) { + + x -= text->_priv->x; + y -= text->_priv->y; + +/* emit_event_on_tags(text, event, &iter);*/ + } + else if (event->type == GDK_KEY_PRESS || + event->type == GDK_KEY_RELEASE) { +/* GtkTextMark *insert; + GtkTextIter iter; + + insert = gtk_text_buffer_get_mark(get_buffer(text), "insert"); + gtk_text_buffer_get_iter_at_mark( + get_buffer(text), &iter, insert); + emit_event_on_tags(text, event, &iter);*/ + } + + switch (event->type) { + case GDK_KEY_PRESS: + return gnome_canvas_pango_key_press_event( + item, (GdkEventKey *) event); + case GDK_KEY_RELEASE: +/* return gnome_canvas_rich_text_ext_key_release_event( + item, (GdkEventKey *) event);*/ + return FALSE; + case GDK_BUTTON_PRESS: + return gnome_canvas_pango_button_press_event( + item, (GdkEventButton *) event); + case GDK_BUTTON_RELEASE: + return gnome_canvas_pango_button_release_event( + item, (GdkEventButton *) event); + case GDK_MOTION_NOTIFY: + if (!text->_priv->clicks) + return FALSE; + return gnome_canvas_pango_drag_event ( + item, (GdkEventButton *) event); + case GDK_FOCUS_CHANGE: +/* if (((GdkEventFocus *) event)->window != + item->canvas->layout.bin_window) + return FALSE; + + if (((GdkEventFocus *) event)->in) + return gnome_canvas_rich_text_ext_focus_in_event( + item, (GdkEventFocus *) event); + else + return gnome_canvas_rich_text_ext_focus_out_event( + item, (GdkEventFocus *) event);*/ + default: + break; + } + return FALSE; +} + +static void +gnome_canvas_pango_get_bounds (GnomeCanvasItem *item, double *px1, double *py1, + double *px2, double *py2) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (item); + + adjust_for_anchors(text, px1, py1); + + *px2 = *px1 + ((text->_priv->width > 0)? text->_priv->width: text->_priv->_width); + *py2 = *py1 + ((text->_priv->height > 0)? text->_priv->height: text->_priv->_height); +} + +PangoLayout* +gnome_canvas_pango_get_layout (GnomeCanvasPango *text) +{ + g_return_val_if_fail (GNOME_IS_CANVAS_PANGO (text), NULL); + return text->_priv->layout; +} + +void +gnome_canvas_pango_set_layout (GnomeCanvasPango *text, PangoLayout* layout) +{ + g_return_if_fail (GNOME_IS_CANVAS_PANGO (text)); + if (text->_priv->layout) + g_object_unref (text->_priv->layout); + text->_priv->layout = layout; +} + +struct MergeStruct { + PangoAttrList *l; + unsigned start, end; +}; + +static gboolean +merge_cb (PangoAttribute *attribute, gpointer data) +{ + struct MergeStruct *s = data; + PangoAttribute *attr = pango_attribute_copy (attribute); + attr->start_index = s->start; + attr->end_index = s->end; + pango_attr_list_change (s->l, attr); + return FALSE; +} + +void +gnome_canvas_pango_set_insert_attrs (GnomeCanvasPango *text, + PangoAttrList *attr_list) +{ + g_return_if_fail (GNOME_IS_CANVAS_PANGO (text)); + if (text->_priv->insert_attrs) + pango_attr_list_unref (text->_priv->insert_attrs); + text->_priv->insert_attrs = attr_list; +} + +void +gnome_canvas_pango_apply_attrs_to_selection (GnomeCanvasPango *text, + PangoAttrList *attr_list) +{ + g_return_if_fail (GNOME_IS_CANVAS_PANGO (text)); + if (text->_priv->index != text->_priv->start_sel) { + struct MergeStruct s; + if (text->_priv->index < text->_priv->start_sel) { + s.start = text->_priv->index; + s.end = text->_priv->start_sel; + } else { + s.start = text->_priv->start_sel; + s.end = text->_priv->index; + } + s.l = pango_layout_get_attributes (text->_priv->layout); + if (s.l) + pango_attr_list_filter (attr_list, merge_cb, &s); + } +} + +extern void pango_layout_to_svg (PangoLayout* layout, xmlDocPtr doc, xmlNodePtr node, double x, double y); + +static void +gnome_canvas_pango_export_svg (GPrintable *gprintable, xmlDocPtr doc, xmlNodePtr node) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (gprintable); + double ax, ay; + g_return_if_fail (text); + adjust_for_anchors (text, &ax, &ay); + pango_layout_to_svg (text->_priv->layout, doc, node, ax, ay); +} + +static void +gnome_canvas_pango_draw_cairo (GPrintable *gprintable, cairo_t *cr) +{ + GnomeCanvasPango *text = GNOME_CANVAS_PANGO (gprintable); + double ax, ay; + g_return_if_fail (text); + adjust_for_anchors (text, &ax, &ay); + cairo_translate (cr, ax, ay); + pango_cairo_show_layout (cr, text->_priv->layout); +} + +int gnome_canvas_pango_get_cur_index (GnomeCanvasPango *text) +{ + g_return_val_if_fail (GNOME_IS_CANVAS_PANGO (text), -1); + return text->_priv->index; +} + +int gnome_canvas_pango_get_selection_start (GnomeCanvasPango *text) +{ + g_return_val_if_fail (GNOME_IS_CANVAS_PANGO (text), -1); + return text->_priv->start_sel; +} + +void gcp_pango_layout_replace_text (PangoLayout *layout, unsigned start, unsigned length, char const *new_str, PangoAttrList *l) +{ + GString *string = g_string_new (pango_layout_get_text (layout)); + int len = strlen (new_str); + if (length > 0) { + g_string_erase (string, start, length); + delete_text (pango_layout_get_attributes (layout), start, length); + } + if (len > 0) { + g_string_insert (string, start, new_str); + pango_attr_list_filter (l, cb_set_attr_list_len, GINT_TO_POINTER (len)); + + gnome_canvas_pango_attr_list_splice (pango_layout_get_attributes (layout), + l, start, len); + } + pango_layout_set_text (layout, string->str, -1); + g_string_free (string, TRUE); +} + +void gnome_canvas_pango_set_selection_bounds (GnomeCanvasPango *text, unsigned start, unsigned end) +{ + text->_priv->start_sel = start; + text->_priv->index = end; + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-pango.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-pango.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-pango.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-pango.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,70 @@ +/* libgcpcanvas/gcp-canvas-pango.h + * + * Copyright (c) 2005 Jean Bréfort + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef GNOME_CANVAS_PANGO_H +#define GNOME_CANVAS_PANGO_H + +#include + +G_BEGIN_DECLS + +#define GNOME_TYPE_CANVAS_PANGO (gnome_canvas_pango_get_type ()) +#define GNOME_CANVAS_PANGO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_PANGO, GnomeCanvasPango)) +#define GNOME_CANVAS_PANGO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_PANGO, GnomeCanvasPangoClass)) +#define GNOME_IS_CANVAS_PANGO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_PANGO)) +#define GNOME_IS_CANVAS_PANGO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_PANGO)) +#define GNOME_CANVAS_PANGO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_PANGO, GnomeCanvasPangoClass)) + +typedef struct _GnomeCanvasPango GnomeCanvasPango; +typedef struct _GnomeCanvasPangoPrivate GnomeCanvasPangoPrivate; +typedef struct _GnomeCanvasPangoClass GnomeCanvasPangoClass; + +struct _GnomeCanvasPango { + GnomeCanvasItem item; + + GnomeCanvasPangoPrivate *_priv; +}; + +struct GnomeCanvasPangoSelBounds { + int start, cur; +}; + +struct _GnomeCanvasPangoClass { + GnomeCanvasItemClass parent_class; + + /* signals */ + void (*changed) (GnomeCanvasPango *text); + void (*sel_changed) (GnomeCanvasPango *text, struct GnomeCanvasPangoSelBounds *bounds); +}; + +GType gnome_canvas_pango_get_type(void) G_GNUC_CONST; + +PangoLayout* gnome_canvas_pango_get_layout (GnomeCanvasPango *text); +void gnome_canvas_pango_set_layout (GnomeCanvasPango *text, PangoLayout *layout); +void gnome_canvas_pango_set_insert_attrs (GnomeCanvasPango *text, PangoAttrList *attr_list); +void gnome_canvas_pango_apply_attrs_to_selection (GnomeCanvasPango *text, PangoAttrList *attr_list); +int gnome_canvas_pango_get_cur_index (GnomeCanvasPango *text); +int gnome_canvas_pango_get_selection_start (GnomeCanvasPango *text); +void gnome_canvas_pango_set_selection_bounds (GnomeCanvasPango *text, unsigned start, unsigned end); +void gcp_pango_layout_replace_text (PangoLayout *layout, unsigned start, unsigned length, char const *new_str, PangoAttrList *l); + +G_END_DECLS + +#endif /* GNOME_CANVAS_PANGO_H */ diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-polygon.c gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-polygon.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-polygon.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-polygon.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,253 @@ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* Polygon item type for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * Author: Federico Mena + * Rusty Conover + */ + +#include +#include +#include +#include "libart_lgpl/art_vpath.h" +#include "libart_lgpl/art_svp.h" +#include "libart_lgpl/art_svp_vpath.h" +#include "libart_lgpl/art_svp_vpath_stroke.h" +#include +#include "gcp-canvas-polygon.h" +#include "gcp-canvas-shape.h" + + +#define NUM_STATIC_POINTS 256 /* Number of static points to use to avoid allocating arrays */ + + +enum { + PROP_0, + PROP_POINTS, +}; + + +static void gnome_canvas_polygon_ext_class_init (GnomeCanvasPolygonExtClass *class); +static void gnome_canvas_polygon_ext_init (GnomeCanvasPolygonExt *poly); +static void gnome_canvas_polygon_ext_destroy (GtkObject *object); +static void gnome_canvas_polygon_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void gnome_canvas_polygon_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static void gnome_canvas_polygon_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); + +static GnomeCanvasItemClass *parent_class; + +GType +gnome_canvas_polygon_ext_get_type (void) +{ + static GType polygon_ext_type; + + if (!polygon_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasPolygonExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_polygon_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasPolygonExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_polygon_ext_init, + NULL /* value_table */ + }; + + polygon_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_SHAPE_EXT, "GnomeCanvasPolygonExt", + &object_info, 0); + } + + return polygon_ext_type; +} + +static void +gnome_canvas_polygon_ext_class_init (GnomeCanvasPolygonExtClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GnomeCanvasItemClass *item_class; + + gobject_class = (GObjectClass *) class; + object_class = (GtkObjectClass *) class; + item_class = (GnomeCanvasItemClass *) class; + + parent_class = g_type_class_peek_parent (class); + + gobject_class->set_property = gnome_canvas_polygon_ext_set_property; + gobject_class->get_property = gnome_canvas_polygon_ext_get_property; + + g_object_class_install_property + (gobject_class, + PROP_POINTS, + g_param_spec_boxed ("points", NULL, NULL, + GNOME_TYPE_CANVAS_POINTS, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + + object_class->destroy = gnome_canvas_polygon_ext_destroy; + + item_class->update = gnome_canvas_polygon_ext_update; +} + +static void +gnome_canvas_polygon_ext_init (GnomeCanvasPolygonExt *poly) +{ + poly->path_def = NULL; +} + +static void +gnome_canvas_polygon_ext_destroy (GtkObject *object) +{ + GnomeCanvasPolygonExt *poly; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_POLYGON_EXT (object)); + + poly = GNOME_CANVAS_POLYGON_EXT (object); + + /* remember, destroy can be run multiple times! */ + + if(poly->path_def) + gnome_canvas_path_def_unref(poly->path_def); + + poly->path_def = NULL; + + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + +static void +set_points (GnomeCanvasPolygonExt *poly, GnomeCanvasPoints *points) +{ + int i; + + + if (poly->path_def) + gnome_canvas_path_def_unref(poly->path_def); + + if (!points) { + poly->path_def = gnome_canvas_path_def_new(); + gnome_canvas_shape_ext_set_path_def (GNOME_CANVAS_SHAPE_EXT (poly), poly->path_def); + return; + } + + + /* Optomize the path def to the number of points */ + poly->path_def = gnome_canvas_path_def_new_sized(points->num_points+1); + +#if 0 + /* No need for explicit duplicate, as closepaths does it for us (Lauris) */ + /* See if we need to duplicate the first point */ + duplicate = ((points->coords[0] != points->coords[2 * points->num_points - 2]) + || (points->coords[1] != points->coords[2 * points->num_points - 1])); +#endif + + + gnome_canvas_path_def_moveto (poly->path_def, points->coords[0], points->coords[1]); + + for (i = 1; i < points->num_points; i++) { + gnome_canvas_path_def_lineto(poly->path_def, points->coords[i * 2], points->coords[(i * 2) + 1]); + } + + gnome_canvas_path_def_closepath (poly->path_def); + + gnome_canvas_shape_ext_set_path_def (GNOME_CANVAS_SHAPE_EXT (poly), poly->path_def); +} + + +static void +gnome_canvas_polygon_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasItem *item; + GnomeCanvasPolygonExt *poly; + GnomeCanvasPoints *points; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_POLYGON_EXT (object)); + + item = GNOME_CANVAS_ITEM (object); + poly = GNOME_CANVAS_POLYGON_EXT (object); + + switch (param_id) { + case PROP_POINTS: + points = g_value_get_boxed (value); + + set_points (poly, points); + + gnome_canvas_item_request_update (item); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + + +static void +gnome_canvas_polygon_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasPolygonExt *poly; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_POLYGON_EXT (object)); + + poly = GNOME_CANVAS_POLYGON_EXT (object); + + switch (param_id) { + case PROP_POINTS: + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + + +static void +gnome_canvas_polygon_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +{ + /* Since the path has already been defined just pass the update up. */ + + if (parent_class->update) + (* parent_class->update) (item, affine, clip_path, flags); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-polygon.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-polygon.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-polygon.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-polygon.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,88 @@ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* Polygon item type for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * + * Author: Federico Mena + * Rusty Conover + */ + +#ifndef GNOME_CANVAS_POLYGON_EXT_H +#define GNOME_CANVAS_POLYGON_EXT_H + + +#include +#include "gcp-canvas-shape.h" +#include + +G_BEGIN_DECLS + + +/* Polygon item for the canvas. A polygon is a bit different from rectangles and ellipses in that + * points inside it will always be considered "inside", even if the fill color is not set. If you + * want to have a hollow polygon, use a line item instead. + * + * The following object arguments are available: + * + * name type read/write description + * ------------------------------------------------------------------------------------------ + * points GnomeCanvasPoints* RW Pointer to a GnomeCanvasPoints structure. + * This can be created by a call to + * gnome_canvas_points_new() (in gnome-canvas-util.h). + * X coordinates are in the even indices of the + * points->coords array, Y coordinates are in + * the odd indices. + */ + +#define GNOME_TYPE_CANVAS_POLYGON_EXT (gnome_canvas_polygon_ext_get_type ()) +#define GNOME_CANVAS_POLYGON_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_POLYGON_EXT, GnomeCanvasPolygonExt)) +#define GNOME_CANVAS_POLYGON_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_POLYGON_EXT, GnomeCanvasPolygonExtClass)) +#define GNOME_IS_CANVAS_POLYGON_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_POLYGON_EXT)) +#define GNOME_IS_CANVAS_POLYGON_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_POLYGON_EXT)) +#define GNOME_CANVAS_POLYGON_EXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_POLYGON_EXT, GnomeCanvasPolygonExtClass)) + + +typedef struct _GnomeCanvasPolygonExt GnomeCanvasPolygonExt; +typedef struct _GnomeCanvasPolygonExtClass GnomeCanvasPolygonExtClass; + +struct _GnomeCanvasPolygonExt { + GnomeCanvasShapeExt item; + + GnomeCanvasPathDef *path_def; +}; + +struct _GnomeCanvasPolygonExtClass { + GnomeCanvasShapeExtClass parent_class; +}; + + +/* Standard Gtk function */ +GType gnome_canvas_polygon_ext_get_type (void) G_GNUC_CONST; + +G_END_DECLS +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-rect-ellipse.c gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-rect-ellipse.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-rect-ellipse.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-rect-ellipse.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,437 @@ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* Rectangle and ellipse item types for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * + * Authors: Federico Mena + * Rusty Conover + */ + +#include +#include +#include "gcp-canvas-rect-ellipse.h" +#include "gcp-canvas-shape.h" +#include + + +#include +#include +#include +#include + +/* Base class for rectangle and ellipse item types */ + +#define noVERBOSE + +enum { + PROP_0, + PROP_X1, + PROP_Y1, + PROP_X2, + PROP_Y2, +}; + + +static void gnome_canvas_re_ext_class_init (GnomeCanvasREExtClass *class); +static void gnome_canvas_re_ext_init (GnomeCanvasREExt *re); +static void gnome_canvas_re_ext_destroy (GtkObject *object); +static void gnome_canvas_re_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void gnome_canvas_re_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static void gnome_canvas_rect_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); +static void gnome_canvas_ellipse_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); + +static GnomeCanvasItemClass *re_ext_parent_class; + + +GType +gnome_canvas_re_ext_get_type (void) +{ + static GType re_ext_type; + + if (!re_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasREExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_re_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasREExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_re_ext_init, + NULL /* value_table */ + }; + + re_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_SHAPE_EXT, "GnomeCanvasREExt", + &object_info, 0); + } + + return re_ext_type; +} + +static void +gnome_canvas_re_ext_class_init (GnomeCanvasREExtClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GnomeCanvasItemClass *item_class; + + gobject_class = (GObjectClass *) class; + object_class = (GtkObjectClass *) class; + item_class = (GnomeCanvasItemClass *) class; + + re_ext_parent_class = g_type_class_peek_parent (class); + + gobject_class->set_property = gnome_canvas_re_ext_set_property; + gobject_class->get_property = gnome_canvas_re_ext_get_property; + + g_object_class_install_property + (gobject_class, + PROP_X1, + g_param_spec_double ("x1", NULL, NULL, + -G_MAXDOUBLE, G_MAXDOUBLE, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property + (gobject_class, + PROP_Y1, + g_param_spec_double ("y1", NULL, NULL, + -G_MAXDOUBLE, G_MAXDOUBLE, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property + (gobject_class, + PROP_X2, + g_param_spec_double ("x2", NULL, NULL, + -G_MAXDOUBLE, G_MAXDOUBLE, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property + (gobject_class, + PROP_Y2, + g_param_spec_double ("y2", NULL, NULL, + -G_MAXDOUBLE, G_MAXDOUBLE, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + + object_class->destroy = gnome_canvas_re_ext_destroy; +} + +static void +gnome_canvas_re_ext_init (GnomeCanvasREExt *re) +{ + re->x1 = 0.0; + re->y1 = 0.0; + re->x2 = 0.0; + re->y2 = 0.0; + re->path_dirty = 0; +} + +static void +gnome_canvas_re_ext_destroy (GtkObject *object) +{ + GnomeCanvasREExt *re; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_RE_EXT (object)); + + re = GNOME_CANVAS_RE_EXT (object); + + if (GTK_OBJECT_CLASS (re_ext_parent_class)->destroy) + (* GTK_OBJECT_CLASS (re_ext_parent_class)->destroy) (object); +} + +static void +gnome_canvas_re_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasItem *item; + GnomeCanvasREExt *re; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_RE_EXT (object)); + + item = GNOME_CANVAS_ITEM (object); + re = GNOME_CANVAS_RE_EXT (object); + + switch (param_id) { + case PROP_X1: + re->x1 = g_value_get_double (value); + re->path_dirty = 1; + gnome_canvas_item_request_update (item); + break; + + case PROP_Y1: + re->y1 = g_value_get_double (value); + re->path_dirty = 1; + gnome_canvas_item_request_update (item); + break; + + case PROP_X2: + re->x2 = g_value_get_double (value); + re->path_dirty = 1; + gnome_canvas_item_request_update (item); + break; + + case PROP_Y2: + re->y2 = g_value_get_double (value); + re->path_dirty = 1; + gnome_canvas_item_request_update (item); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +static void +gnome_canvas_re_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasREExt *re; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_RE_EXT (object)); + + re = GNOME_CANVAS_RE_EXT (object); + + switch (param_id) { + case PROP_X1: + g_value_set_double (value, re->x1); + break; + + case PROP_Y1: + g_value_set_double (value, re->y1); + break; + + case PROP_X2: + g_value_set_double (value, re->x2); + break; + + case PROP_Y2: + g_value_set_double (value, re->y2); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +/* Rectangle item */ +static void gnome_canvas_rect_ext_class_init (GnomeCanvasRectExtClass *class); + + + +GType +gnome_canvas_rect_ext_get_type (void) +{ + static GType rect_ext_type; + + if (!rect_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasRectExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_rect_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasRectExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + rect_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_RE_EXT, "GnomeCanvasRectExt", + &object_info, 0); + } + + return rect_ext_type; +} + +static void +gnome_canvas_rect_ext_class_init (GnomeCanvasRectExtClass *class) +{ + GnomeCanvasItemClass *item_class; + + item_class = (GnomeCanvasItemClass *) class; + + item_class->update = gnome_canvas_rect_ext_update; +} + +static void +gnome_canvas_rect_ext_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags) +{ GnomeCanvasREExt *re; + + GnomeCanvasPathDef *path_def; + + re = GNOME_CANVAS_RE_EXT(item); + + if (re->path_dirty) { + path_def = gnome_canvas_path_def_new (); + + gnome_canvas_path_def_moveto(path_def, re->x1, re->y1); + gnome_canvas_path_def_lineto(path_def, re->x2, re->y1); + gnome_canvas_path_def_lineto(path_def, re->x2, re->y2); + gnome_canvas_path_def_lineto(path_def, re->x1, re->y2); + gnome_canvas_path_def_lineto(path_def, re->x1, re->y1); + gnome_canvas_path_def_closepath_current(path_def); + gnome_canvas_shape_ext_set_path_def (GNOME_CANVAS_SHAPE_EXT (item), path_def); + gnome_canvas_path_def_unref(path_def); + re->path_dirty = 0; + } + + if (re_ext_parent_class->update) + (* re_ext_parent_class->update) (item, affine, clip_path, flags); +} + +/* Ellipse item */ + + +static void gnome_canvas_ellipse_ext_class_init (GnomeCanvasEllipseExtClass *class); + + +GType +gnome_canvas_ellipse_ext_get_type (void) +{ + static GType ellipse_ext_type; + + if (!ellipse_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasEllipseExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_ellipse_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasEllipseExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + ellipse_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_RE_EXT, "GnomeCanvasEllipseExt", + &object_info, 0); + } + + return ellipse_ext_type; +} + +static void +gnome_canvas_ellipse_ext_class_init (GnomeCanvasEllipseExtClass *class) +{ + GnomeCanvasItemClass *item_class; + + item_class = (GnomeCanvasItemClass *) class; + + item_class->update = gnome_canvas_ellipse_ext_update; +} + +#define N_PTS 90 + +static void +gnome_canvas_ellipse_ext_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags) { + GnomeCanvasPathDef *path_def; + GnomeCanvasREExt *re; + + re = GNOME_CANVAS_RE_EXT(item); + + if (re->path_dirty) { + gdouble cx, cy, rx, ry; + gdouble beta = 0.26521648983954400922; /* 4*(1-cos(pi/8))/(3*sin(pi/8)) */ + gdouble sincosA = 0.70710678118654752440; /* sin (pi/4), cos (pi/4) */ + gdouble dx1, dy1, dx2, dy2; + gdouble mx, my; + + path_def = gnome_canvas_path_def_new(); + + cx = (re->x2 + re->x1) * 0.5; + cy = (re->y2 + re->y1) * 0.5; + rx = re->x2 - cx; + ry = re->y2 - cy; + + dx1 = beta * rx; + dy1 = beta * ry; + dx2 = beta * rx * sincosA; + dy2 = beta * ry * sincosA; + mx = rx * sincosA; + my = ry * sincosA; + + gnome_canvas_path_def_moveto (path_def, cx + rx, cy); + gnome_canvas_path_def_curveto (path_def, + cx + rx, cy - dy1, + cx + mx + dx2, cy - my + dy2, + cx + mx, cy - my); + gnome_canvas_path_def_curveto (path_def, + cx + mx - dx2, cy - my - dy2, + cx + dx1, cy - ry, + cx, cy - ry); + gnome_canvas_path_def_curveto (path_def, + cx - dx1, cy - ry, + cx - mx + dx2, cy - my - dy2, + cx - mx, cy - my); + gnome_canvas_path_def_curveto (path_def, + cx - mx - dx2, cy - my + dy2, + cx - rx, cy - dy1, + cx - rx, cy); + + gnome_canvas_path_def_curveto (path_def, + cx - rx, cy + dy1, + cx - mx - dx2, cy + my - dy2, + cx - mx, cy + my); + gnome_canvas_path_def_curveto (path_def, + cx - mx + dx2, cy + my + dy2, + cx - dx1, cy + ry, + cx, cy + ry); + gnome_canvas_path_def_curveto (path_def, + cx + dx1, cy + ry, + cx + mx - dx2, cy + my + dy2, + cx + mx, cy + my); + gnome_canvas_path_def_curveto (path_def, + cx + mx + dx2, cy + my - dy2, + cx + rx, cy + dy1, + cx + rx, cy); + + gnome_canvas_path_def_closepath_current(path_def); + + gnome_canvas_shape_ext_set_path_def (GNOME_CANVAS_SHAPE_EXT (item), path_def); + gnome_canvas_path_def_unref(path_def); + re->path_dirty = 0; + } + + if (re_ext_parent_class->update) + (* re_ext_parent_class->update) (item, affine, clip_path, flags); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-rect-ellipse.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-rect-ellipse.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-rect-ellipse.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-rect-ellipse.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,159 @@ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* Rectangle and ellipse item types for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * + * Author: Federico Mena + */ + +#ifndef GNOME_CANVAS_RECT_ELLIPSE_EXT_H +#define GNOME_CANVAS_RECT_ELLIPSE_EXT_H + + +#include "gcp-canvas-shape.h" + +#include + +#include + +G_BEGIN_DECLS + + +/* Base class for rectangle and ellipse item types. These are defined by their top-left and + * bottom-right corners. Rectangles and ellipses share the following arguments: + * + * name type read/write description + * ------------------------------------------------------------------------------------------ + * x1 double RW Leftmost coordinate of rectangle or ellipse + * y1 double RW Topmost coordinate of rectangle or ellipse + * x2 double RW Rightmost coordinate of rectangle or ellipse + * y2 double RW Bottommost coordinate of rectangle or ellipse + * fill_color string W X color specification for fill color, + * or NULL pointer for no color (transparent) + * fill_color_gdk GdkColor* RW Allocated GdkColor for fill + * outline_color string W X color specification for outline color, + * or NULL pointer for no color (transparent) + * outline_color_gdk GdkColor* RW Allocated GdkColor for outline + * fill_stipple GdkBitmap* RW Stipple pattern for fill + * outline_stipple GdkBitmap* RW Stipple pattern for outline + * width_pixels uint RW Width of the outline in pixels. The outline will + * not be scaled when the canvas zoom factor is changed. + * width_units double RW Width of the outline in canvas units. The outline + * will be scaled when the canvas zoom factor is changed. + */ + + +#define GNOME_TYPE_CANVAS_RE_EXT (gnome_canvas_re_ext_get_type ()) +#define GNOME_CANVAS_RE_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_RE_EXT, GnomeCanvasREExt)) +#define GNOME_CANVAS_RE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_RE_EXT, GnomeCanvasREExtClass)) +#define GNOME_IS_CANVAS_RE_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_RE_EXT)) +#define GNOME_IS_CANVAS_RE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_RE_EXT)) +#define GNOME_CANVAS_RE_EXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_RE_EXT, GnomeCanvasREExtClass)) + + +typedef struct _GnomeCanvasREExt GnomeCanvasREExt; +typedef struct _GnomeCanvasREExtClass GnomeCanvasREExtClass; + +struct _GnomeCanvasREExt { + GnomeCanvasShapeExt item; + + double x1, y1, x2, y2; /* Corners of item */ + + unsigned int path_dirty : 1; +}; + +struct _GnomeCanvasREExtClass { + GnomeCanvasShapeExtClass parent_class; +}; + + +/* Standard Gtk function */ +GType gnome_canvas_re_ext_get_type (void) G_GNUC_CONST; + + +/* Rectangle item. No configurable or queryable arguments are available (use those in + * GnomeCanvasRE). + */ + + +#define GNOME_TYPE_CANVAS_RECT_EXT (gnome_canvas_rect_ext_get_type ()) +#define GNOME_CANVAS_RECT_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_RECT_EXT, GnomeCanvasRectExt)) +#define GNOME_CANVAS_RECT_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_RECT_EXT, GnomeCanvasRectExtClass)) +#define GNOME_IS_CANVAS_RECT_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_RECT_EXT)) +#define GNOME_IS_CANVAS_RECT_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_RECT_EXT)) +#define GNOME_CANVAS_RECT_EXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_RECT_EXT, GnomeCanvasRectExtClass)) + + +typedef struct _GnomeCanvasRectExt GnomeCanvasRectExt; +typedef struct _GnomeCanvasRectExtClass GnomeCanvasRectExtClass; + +struct _GnomeCanvasRectExt { + GnomeCanvasREExt re; +}; + +struct _GnomeCanvasRectExtClass { + GnomeCanvasREExtClass parent_class; +}; + + +/* Standard Gtk function */ +GType gnome_canvas_rect_ext_get_type (void) G_GNUC_CONST; + + +/* Ellipse item. No configurable or queryable arguments are available (use those in + * GnomeCanvasRE). + */ + + +#define GNOME_TYPE_CANVAS_ELLIPSE_EXT (gnome_canvas_ellipse_ext_get_type ()) +#define GNOME_CANVAS_ELLIPSE_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_ELLIPSE_EXT, GnomeCanvasEllipseExt)) +#define GNOME_CANVAS_ELLIPSE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_ELLIPSE_EXT, GnomeCanvasEllipseClassExt)) +#define GNOME_IS_CANVAS_ELLIPSE_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_ELLIPSE_EXT)) +#define GNOME_IS_CANVAS_ELLIPSE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_ELLIPSE_EXT)) +#define GNOME_CANVAS_ELLIPSE_EXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_ELLIPSE_EXT, GnomeCanvasEllipseClassExt)) + + +typedef struct _GnomeCanvasEllipseExt GnomeCanvasEllipseExt; +typedef struct _GnomeCanvasEllipseExtClass GnomeCanvasEllipseExtClass; + +struct _GnomeCanvasEllipseExt { + GnomeCanvasREExt re; +}; + +struct _GnomeCanvasEllipseExtClass { + GnomeCanvasREExtClass parent_class; +}; + + +/* Standard Gtk function */ +GType gnome_canvas_ellipse_ext_get_type (void) G_GNUC_CONST; + + +G_END_DECLS + +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-shape.c gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-shape.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-shape.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-shape.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1779 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* + * GnomeCanvas widget - Tk-like canvas widget for Gnome + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * + * Authors: Federico Mena + * Raph Levien + */ + +#include "config.h" +#include +#include + +#include +#include + +#include "gnome-canvas-shape-private.h" +#include "gcp-canvas-shape.h" +#include "gprintable.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + PROP_0, + PROP_FILL_COLOR, + PROP_FILL_COLOR_GDK, + PROP_FILL_COLOR_RGBA, + PROP_OUTLINE_COLOR, + PROP_OUTLINE_COLOR_GDK, + PROP_OUTLINE_COLOR_RGBA, + PROP_FILL_STIPPLE, + PROP_OUTLINE_STIPPLE, + PROP_WIDTH_PIXELS, + PROP_WIDTH_UNITS, + PROP_CAP_STYLE, + PROP_JOIN_STYLE, + PROP_WIND, + PROP_MITERLIMIT, + PROP_DASH +}; + +#define gdk_bitmap_ref gdk_drawable_ref +#define gdk_bitmap_unref gdk_drawable_unref + +static GnomeCanvasItemClass *parent_class; + +static void gnome_canvas_shape_ext_class_init (GnomeCanvasShapeExtClass *class); +static void gnome_canvas_shape_ext_init (GnomeCanvasShapeExt *shape); +static void gnome_canvas_shape_ext_destroy (GtkObject *object); +static void gnome_canvas_shape_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void gnome_canvas_shape_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static void gnome_canvas_shape_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); +static void gnome_canvas_shape_ext_realize (GnomeCanvasItem *item); +static void gnome_canvas_shape_ext_unrealize (GnomeCanvasItem *item); +static void gnome_canvas_shape_ext_draw (GnomeCanvasItem *item, GdkDrawable *drawable, + int x, int y, int width, int height); +static double gnome_canvas_shape_ext_point (GnomeCanvasItem *item, double x, double y, + int cx, int cy, GnomeCanvasItem **actual_item); +static void gnome_canvas_shape_ext_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf); +static void gnome_canvas_shape_ext_bounds (GnomeCanvasItem *item, + double *x1, double *y1, double *x2, double *y2); + +static gulong get_pixel_from_rgba (GnomeCanvasItem *item, guint32 rgba_color); +static guint32 get_rgba_from_color (GdkColor * color); +static void set_gc_foreground (GdkGC *gc, gulong pixel); +static void gcbp_ensure_gdk (GnomeCanvasShapeExt * bpath); +static void gcbp_destroy_gdk (GnomeCanvasShapeExt * bpath); +static void set_stipple (GdkGC *gc, GdkBitmap **internal_stipple, GdkBitmap *stipple, int reconfigure); +static void gcbp_ensure_mask (GnomeCanvasShapeExt * bpath, gint width, gint height); +static void gcbp_draw_ctx_unref (GCBPDrawCtx * ctx); +static void gnome_canvas_shape_ext_export_svg (GPrintable *gprintable, xmlDocPtr doc, xmlNodePtr node); +static void gnome_canvas_shape_ext_draw_cairo (GPrintable *gprintable, cairo_t *cr); + +static void +gnome_canvas_shape_ext_print_init (GPrintableIface *iface) +{ + iface->export_svg = gnome_canvas_shape_ext_export_svg; + iface->draw_cairo = gnome_canvas_shape_ext_draw_cairo; +} + +GType +gnome_canvas_shape_ext_get_type (void) +{ + static GType shape_ext_type; + + if (!shape_ext_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasShapeExtClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_shape_ext_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasShapeExt), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_shape_ext_init, + NULL /* value_table */ + }; + + static const GInterfaceInfo print_info = { + (GInterfaceInitFunc) gnome_canvas_shape_ext_print_init, + NULL, NULL + }; + + shape_ext_type = g_type_register_static (GNOME_TYPE_CANVAS_ITEM, "GnomeCanvasShapeExt", + &object_info, 0); + + g_type_add_interface_static (shape_ext_type, G_TYPE_PRINTABLE, &print_info); + } + + return shape_ext_type; +} + +static void +gnome_canvas_shape_ext_class_init (GnomeCanvasShapeExtClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GnomeCanvasItemClass *item_class; + + gobject_class = (GObjectClass *) class; + object_class = (GtkObjectClass *) class; + item_class = (GnomeCanvasItemClass *) class; + + parent_class = g_type_class_peek_parent (class); + + /* when this gets checked into libgnomeui, change the + GTK_TYPE_POINTER to GTK_TYPE_GNOME_CANVAS_SHAPE, and add an + entry to gnome-boxed.defs */ + + gobject_class->set_property = gnome_canvas_shape_ext_set_property; + gobject_class->get_property = gnome_canvas_shape_ext_get_property; + + + + g_object_class_install_property (gobject_class, + PROP_FILL_COLOR, + g_param_spec_string ("fill_color", NULL, NULL, + NULL, + (G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_FILL_COLOR_GDK, + g_param_spec_boxed ("fill_color_gdk", NULL, NULL, + GDK_TYPE_COLOR, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_FILL_COLOR_RGBA, + g_param_spec_uint ("fill_color_rgba", NULL, NULL, + 0, G_MAXUINT, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_OUTLINE_COLOR, + g_param_spec_string ("outline_color", NULL, NULL, + NULL, + (G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_OUTLINE_COLOR_GDK, + g_param_spec_boxed ("outline_color_gdk", NULL, NULL, + GDK_TYPE_COLOR, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_OUTLINE_COLOR_RGBA, + g_param_spec_uint ("outline_color_rgba", NULL, NULL, + 0, G_MAXUINT, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_FILL_STIPPLE, + g_param_spec_object ("fill_stipple", NULL, NULL, + GDK_TYPE_DRAWABLE, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_OUTLINE_STIPPLE, + g_param_spec_object ("outline_stipple", NULL, NULL, + GDK_TYPE_DRAWABLE, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_WIDTH_PIXELS, + g_param_spec_uint ("width_pixels", NULL, NULL, + 0, G_MAXUINT, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_WIDTH_UNITS, + g_param_spec_double ("width_units", NULL, NULL, + 0.0, G_MAXDOUBLE, 0.0, + (G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_CAP_STYLE, + g_param_spec_enum ("cap_style", NULL, NULL, + GDK_TYPE_CAP_STYLE, + GDK_CAP_BUTT, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_JOIN_STYLE, + g_param_spec_enum ("join_style", NULL, NULL, + GDK_TYPE_JOIN_STYLE, + GDK_JOIN_MITER, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_WIND, + g_param_spec_uint ("wind", NULL, NULL, + 0, G_MAXUINT, 0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_MITERLIMIT, + g_param_spec_double ("miterlimit", NULL, NULL, + 0.0, G_MAXDOUBLE, 0.0, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property (gobject_class, + PROP_DASH, + g_param_spec_pointer ("dash", NULL, NULL, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + + object_class->destroy = gnome_canvas_shape_ext_destroy; + + item_class->update = gnome_canvas_shape_ext_update; + item_class->realize = gnome_canvas_shape_ext_realize; + item_class->unrealize = gnome_canvas_shape_ext_unrealize; + item_class->draw = gnome_canvas_shape_ext_draw; + item_class->point = gnome_canvas_shape_ext_point; + item_class->render = gnome_canvas_shape_ext_render; + item_class->bounds = gnome_canvas_shape_ext_bounds; +} + +static void +gnome_canvas_shape_ext_init (GnomeCanvasShapeExt *shape) +{ + shape->priv = g_new (GnomeCanvasShapePriv, 1); + + shape->priv->path = NULL; + + shape->priv->fill_set = FALSE; + shape->priv->outline_set = FALSE; + shape->priv->width_pixels = FALSE; + + shape->priv->width = 1.0; + + shape->priv->fill_rgba = 0x0000003f; + shape->priv->outline_rgba = 0x0000007f; + + shape->priv->cap = GDK_CAP_BUTT; + shape->priv->join = GDK_JOIN_MITER; + shape->priv->wind = ART_WIND_RULE_ODDEVEN; + shape->priv->miterlimit = 10.43; /* X11 default */ + + shape->priv->dash.n_dash = 0; + shape->priv->dash.dash = NULL; + + shape->priv->fill_svp = NULL; + shape->priv->outline_svp = NULL; + + shape->priv->gdk = NULL; +} + +static void +gnome_canvas_shape_ext_destroy (GtkObject *object) +{ + GnomeCanvasShapeExt *shape; + GnomeCanvasShapePriv *priv; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_CANVAS_SHAPE_EXT (object)); + + shape = GNOME_CANVAS_SHAPE_EXT (object); + + if (shape->priv) { + priv = shape->priv; + if (priv->gdk) gcbp_destroy_gdk (shape); + + if (priv->path) gnome_canvas_path_def_unref (priv->path); + + if (priv->dash.dash) g_free (priv->dash.dash); + if (priv->fill_svp) art_svp_free (priv->fill_svp); + if (priv->outline_svp) art_svp_free (priv->outline_svp); + + g_free (shape->priv); + shape->priv = NULL; + } + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + +/** + * gnome_canvas_shape_set_path_def: + * @shape: a GnomeCanvasShapeExt + * @def: a GnomeCanvasPathDef + * + * This function sets the the GnomeCanvasPathDef used by the + * GnomeCanvasShape. Notice, that it does not request updates, as + * it is meant to be used from item implementations, from inside + * update queue. + */ + +void +gnome_canvas_shape_ext_set_path_def (GnomeCanvasShapeExt *shape, GnomeCanvasPathDef *def) +{ + GnomeCanvasShapePriv *priv; + + g_return_if_fail (shape != NULL); + g_return_if_fail (GNOME_IS_CANVAS_SHAPE_EXT (shape)); + + priv = shape->priv; + + if (priv->path) { + gnome_canvas_path_def_unref (priv->path); + priv->path = NULL; + } + + if (def) { + priv->path = gnome_canvas_path_def_duplicate (def); + } +} + +static void +gnome_canvas_shape_ext_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasItem *item; + GnomeCanvasShapeExt *shape; + GnomeCanvasShapePriv *priv; + GnomeCanvasShapePrivGdk *gdk; + GdkColor color; + GdkColor *colorptr; + ArtVpathDash *dash; + + item = GNOME_CANVAS_ITEM (object); + shape = GNOME_CANVAS_SHAPE_EXT (object); + priv = shape->priv; + + if (!item->canvas->aa) { + gcbp_ensure_gdk (shape); + gdk = priv->gdk; + } else { + gdk = NULL; + } + + switch (param_id) { + case PROP_FILL_COLOR: + if (gnome_canvas_get_color (item->canvas, g_value_get_string (value), &color)) { + priv->fill_set = TRUE; + priv->fill_rgba = get_rgba_from_color (&color); + if (gdk) gdk->fill_pixel = color.pixel; + } else if (priv->fill_set) + priv->fill_set = FALSE; + else + break; + + gnome_canvas_item_request_update (item); + break; + + case PROP_FILL_COLOR_GDK: + colorptr = g_value_get_boxed (value); + if (colorptr != NULL) { + priv->fill_set = TRUE; + priv->fill_rgba = get_rgba_from_color (colorptr); + if (gdk) { + GdkColormap *colormap = gtk_widget_get_colormap (GTK_WIDGET (item->canvas)); + GdkColor tmp = *colorptr; + gdk_rgb_find_color (colormap, &tmp); + gdk->fill_pixel = tmp.pixel; + } + } else if (priv->fill_set) + priv->fill_set = FALSE; + else + break; + + gnome_canvas_item_request_update (item); + break; + + case PROP_FILL_COLOR_RGBA: + priv->fill_set = TRUE; + priv->fill_rgba = g_value_get_uint (value); + if (gdk) gdk->fill_pixel = get_pixel_from_rgba (item, priv->fill_rgba); + + gnome_canvas_item_request_update (item); + break; + + case PROP_OUTLINE_COLOR: + if (gnome_canvas_get_color (item->canvas, g_value_get_string (value), &color)) { + priv->outline_set = TRUE; + priv->outline_rgba = get_rgba_from_color (&color); + if (gdk) gdk->outline_pixel = color.pixel; + } else if (priv->outline_set) + priv->outline_set = FALSE; + else + break; + + gnome_canvas_item_request_update (item); + break; + + case PROP_OUTLINE_COLOR_GDK: + colorptr = g_value_get_boxed (value); + if (colorptr != NULL) { + priv->outline_set = TRUE; + priv->outline_rgba = get_rgba_from_color (colorptr); + if (gdk) { + GdkColormap *colormap = gtk_widget_get_colormap (GTK_WIDGET (item->canvas)); + GdkColor tmp = *colorptr; + gdk_rgb_find_color (colormap, &tmp); + gdk->outline_pixel = tmp.pixel; + } + } else if (priv->outline_set) + priv->outline_set = FALSE; + else + break; + + gnome_canvas_item_request_update (item); + break; + + case PROP_OUTLINE_COLOR_RGBA: + priv->outline_set = TRUE; + priv->outline_rgba = g_value_get_uint (value); + if (gdk) gdk->outline_pixel = get_pixel_from_rgba (item, priv->outline_rgba); + + gnome_canvas_item_request_update (item); + break; + + case PROP_FILL_STIPPLE: + if (gdk) { + set_stipple (gdk->fill_gc, &gdk->fill_stipple, (GdkBitmap*) g_value_get_object (value), FALSE); + gnome_canvas_item_request_update (item); + } + break; + + case PROP_OUTLINE_STIPPLE: + if (gdk) { + set_stipple (gdk->outline_gc, &gdk->outline_stipple, (GdkBitmap*) g_value_get_object (value), FALSE); + gnome_canvas_item_request_update (item); + } + break; + + case PROP_WIDTH_PIXELS: + priv->width = g_value_get_uint (value); + priv->width_pixels = TRUE; + + gnome_canvas_item_request_update (item); + break; + + case PROP_WIDTH_UNITS: + priv->width = fabs (g_value_get_double (value)); + priv->width_pixels = FALSE; + + gnome_canvas_item_request_update (item); + break; + + case PROP_WIND: + priv->wind = g_value_get_uint (value); + gnome_canvas_item_request_update (item); + break; + + case PROP_CAP_STYLE: + priv->cap = g_value_get_enum (value); + gnome_canvas_item_request_update (item); + break; + + case PROP_JOIN_STYLE: + priv->join = g_value_get_enum (value); + gnome_canvas_item_request_update (item); + break; + + case PROP_MITERLIMIT: + priv->miterlimit = g_value_get_double (value); + gnome_canvas_item_request_update (item); + break; + + case PROP_DASH: + dash = g_value_get_pointer (value); + if (priv->dash.dash) g_free (priv->dash.dash); + priv->dash.dash = NULL; + + if (dash) { + priv->dash.offset = dash->offset; + priv->dash.n_dash = dash->n_dash; + if (dash->dash != NULL) { + priv->dash.dash = g_new (double, dash->n_dash * sizeof (double)); + memcpy (priv->dash.dash, dash->dash, dash->n_dash * sizeof (double)); + } + } + gnome_canvas_item_request_update (item); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +/* Allocates a GdkColor structure filled with the specified pixel, and + * puts it into the specified value for returning it in the get_property + * method. + */ + +static void +get_color_value (GnomeCanvasShapeExt *shape, gulong pixel, GValue *value) +{ + GnomeCanvas *canvas = GNOME_CANVAS_ITEM (shape)->canvas; + GdkColormap *colormap = gtk_widget_get_colormap (GTK_WIDGET (canvas)); + GdkColor color; + + gdk_colormap_query_color (colormap, pixel, &color); + g_value_set_boxed (value, &color); +} + +/** + * gnome_canvas_shape_get_path_def: + * @shape: a GnomeCanvasShape + * + * This function returns the #GnomeCanvasPathDef that the shape + * currently uses. It adds a reference to the #GnomeCanvasPathDef and + * returns it, if there is not a #GnomeCanvasPathDef set for the shape + * it returns NULL. + * + * Returns: a #GnomeCanvasPathDef or NULL if none is set for the shape. + */ + +GnomeCanvasPathDef * +gnome_canvas_shape_ext_get_path_def (GnomeCanvasShapeExt *shape) +{ + GnomeCanvasShapePriv *priv; + + g_return_val_if_fail (shape != NULL, NULL); + g_return_val_if_fail (GNOME_IS_CANVAS_SHAPE_EXT (shape), NULL); + + priv = shape->priv; + + if (priv->path) { + gnome_canvas_path_def_ref (priv->path); + return priv->path; + } + + return NULL; +} + +static void +gnome_canvas_shape_ext_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + GnomeCanvasItem *item = GNOME_CANVAS_ITEM (object); + GnomeCanvasShapeExt *shape = GNOME_CANVAS_SHAPE_EXT (object); + GnomeCanvasShapePriv *priv = shape->priv; + GnomeCanvasShapePrivGdk *gdk; + + if (!item->canvas->aa) { + gcbp_ensure_gdk (shape); + gdk = priv->gdk; + } + else { + gdk = NULL; + } + + switch (param_id) { + case PROP_FILL_COLOR_GDK: + if (gdk) { + get_color_value (shape, gdk->fill_pixel, value); + } else { + get_color_value (shape, 0, value); + } + break; + + case PROP_OUTLINE_COLOR_GDK: + if (gdk) { + get_color_value (shape, gdk->outline_pixel, value); + } else { + get_color_value (shape, 0, value); + } + break; + + case PROP_FILL_COLOR_RGBA: + g_value_set_uint (value, priv->fill_rgba); + break; + + case PROP_OUTLINE_COLOR_RGBA: + g_value_set_uint (value, priv->outline_rgba); + break; + + case PROP_FILL_STIPPLE: + if (gdk) { + g_value_set_object (value, gdk->fill_stipple); + } else { + g_value_set_object (value, NULL); + } + break; + + case PROP_OUTLINE_STIPPLE: + if (gdk) { + g_value_set_object (value, gdk->outline_stipple); + } else { + g_value_set_object (value, NULL); + } + break; + + case PROP_WIND: + g_value_set_uint (value, priv->wind); + break; + + case PROP_CAP_STYLE: + g_value_set_enum (value, priv->cap); + break; + + case PROP_JOIN_STYLE: + g_value_set_enum (value, priv->join); + break; + + case PROP_WIDTH_PIXELS: + g_value_set_uint (value, priv->width); + break; + + case PROP_MITERLIMIT: + g_value_set_double (value, priv->miterlimit); + break; + + case PROP_DASH: + g_value_set_pointer (value, priv->dash.dash); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +static void +gnome_canvas_shape_ext_realize (GnomeCanvasItem *item) +{ + GnomeCanvasShapeExt *shape; + + shape = GNOME_CANVAS_SHAPE_EXT (item); + + if (parent_class->realize) + (* parent_class->realize) (item); + + if (!item->canvas->aa) { + gcbp_ensure_gdk (shape); + + g_assert(item->canvas->layout.bin_window != NULL); + + shape->priv->gdk->fill_gc = gdk_gc_new (item->canvas->layout.bin_window); + shape->priv->gdk->outline_gc = gdk_gc_new (item->canvas->layout.bin_window); + } +} + +static void +gnome_canvas_shape_ext_unrealize (GnomeCanvasItem *item) +{ + GnomeCanvasShapeExt *shape; + + shape = GNOME_CANVAS_SHAPE_EXT (item); + + if (!item->canvas->aa) { + g_assert (shape->priv->gdk != NULL); + + gdk_gc_unref (shape->priv->gdk->fill_gc); + shape->priv->gdk->fill_gc = NULL; + + gdk_gc_unref (shape->priv->gdk->outline_gc); + shape->priv->gdk->outline_gc = NULL; + } + + if (parent_class->unrealize) + (* parent_class->unrealize) (item); +} + +static void +gnome_canvas_shape_ext_render (GnomeCanvasItem *item, + GnomeCanvasBuf *buf) +{ + GnomeCanvasShapeExt *shape; + + shape = GNOME_CANVAS_SHAPE_EXT (item); + + if (shape->priv->fill_svp != NULL) + gnome_canvas_render_svp (buf, + shape->priv->fill_svp, + shape->priv->fill_rgba); + + if (shape->priv->outline_svp != NULL) + gnome_canvas_render_svp (buf, + shape->priv->outline_svp, + shape->priv->outline_rgba); +} + +static void +gnome_canvas_shape_ext_draw (GnomeCanvasItem *item, + GdkDrawable *drawable, + int x, + int y, + int width, + int height) +{ + static GdkPoint * dpoints = NULL; + static gint num_dpoints = 0; + + GnomeCanvasShapeExt * shape; + GnomeCanvasShapePriv * priv; + GnomeCanvasShapePrivGdk * gdk; + gint i, pos, len; + GSList * l; + + shape = GNOME_CANVAS_SHAPE_EXT (item); + priv = shape->priv; + + /* We have to be realized, so gdk struct should exist! */ + + gdk = shape->priv->gdk; + g_assert (gdk != NULL); + + /* Build temporary point list, translated by -x, -y */ + + if (dpoints == NULL) { + dpoints = g_new (GdkPoint, gdk->num_points); + num_dpoints = gdk->num_points; + } else if (num_dpoints < gdk->num_points) { + dpoints = g_renew (GdkPoint, dpoints, gdk->num_points); + num_dpoints = gdk->num_points; + } + + for (i = 0; i < gdk->num_points; i++) { + dpoints[i].x = gdk->points[i].x - x; + dpoints[i].y = gdk->points[i].y - y; + } + + if (priv->fill_set) { + + /* Ensure, that we have mask and it is big enough */ + + gcbp_ensure_mask (shape, width, height); + + /* Clear mask */ + + gdk_draw_rectangle (gdk->ctx->mask, + gdk->ctx->clear_gc, + TRUE, + 0, 0, + width, height); + + /* Draw subpaths, using XOR gc */ + + pos = 0; + + for (l = gdk->closed_paths; l != NULL; l = l->next) { + len = GPOINTER_TO_INT (l->data); + + gdk_draw_polygon (gdk->ctx->mask, + gdk->ctx->xor_gc, + TRUE, + &dpoints[pos], + len); + + pos += len; + } + + /* Set bitmap to clipping mask */ + + gdk_gc_set_clip_mask (gdk->fill_gc, gdk->ctx->mask); + + /* Stipple offset */ + + if (gdk->fill_stipple) gnome_canvas_set_stipple_origin (item->canvas, gdk->fill_gc); + + /* Draw clipped rect to drawable */ + + gdk_draw_rectangle (drawable, + gdk->fill_gc, + TRUE, + 0, 0, + width, height); + } + + if (priv->outline_set) { + + /* Stipple offset */ + + if (gdk->outline_stipple) gnome_canvas_set_stipple_origin (item->canvas, gdk->outline_gc); + /* Draw subpaths */ + + pos = 0; + + for (l = gdk->closed_paths; l != NULL; l = l->next) { + len = GPOINTER_TO_INT (l->data); + + gdk_draw_polygon (drawable, + gdk->outline_gc, + FALSE, + &dpoints[pos], + len); + + pos += len; + } + + for (l = gdk->open_paths; l != NULL; l = l->next) { + len = GPOINTER_TO_INT (l->data); + + gdk_draw_lines (drawable, + gdk->outline_gc, + &dpoints[pos], + len); + + pos += len; + } + } +} + +#define GDK_POINTS_BLOCK 32 + +static void +gnome_canvas_shape_ext_ensure_gdk_points (GnomeCanvasShapePrivGdk *gdk, gint num) +{ + if (gdk->len_points < gdk->num_points + num) { + gdk->len_points = MAX (gdk->len_points + GDK_POINTS_BLOCK, gdk->len_points + num); + gdk->points = g_renew (GdkPoint, gdk->points, gdk->len_points); + } +} + +static void +gnome_canvas_shape_ext_update_gdk (GnomeCanvasShapeExt * shape, double * affine, ArtSVP * clip, int flags) +{ + GnomeCanvasShapePriv * priv; + GnomeCanvasShapePrivGdk * gdk; + int x1 = 0, y1 = 0, x2 = 0, y2 = 0; + gboolean bbox_set = FALSE; + gint width = 0; /* silence gcc */ + + g_assert (!((GnomeCanvasItem *) shape)->canvas->aa); + + priv = shape->priv; + gdk = priv->gdk; + g_assert (gdk != NULL); + + if (priv->outline_set) { + GdkLineStyle style; + + if (priv->width_pixels) { + width = (int) floor (priv->width + 0.5); + /* Never select 0 pixels unless the user asked for it, + * since that is the X11 zero width lines are non-specified */ + if (priv->width_pixels != 0 && width == 0) { + width = 1; + } + } else { + width = (int) floor ((priv->width * priv->scale) + 0.5); + /* Never select 0 pixels unless the user asked for it, + * since that is the X11 zero width lines are non-speciifed */ + if (priv->width != 0 && width == 0) { + width = 1; + } + } + + /* If dashed, set it in GdkGC */ + + if ((shape->priv->dash.dash != NULL) && (shape->priv->dash.n_dash > 0)) { + gint8 * dash_list; + gint i; + + dash_list = g_new (gint8, shape->priv->dash.n_dash); + + for (i = 0; i < priv->dash.n_dash; i++) { + dash_list[i] = (gint8) shape->priv->dash.dash[i]; + } + + gdk_gc_set_dashes (gdk->outline_gc, + (gint) priv->dash.offset, + dash_list, + priv->dash.n_dash); + + g_free (dash_list); + + style = GDK_LINE_ON_OFF_DASH; + } else { + style = GDK_LINE_SOLID; + } + + /* Set line width, cap, join */ + if(gdk->outline_gc) { + + gdk_gc_set_line_attributes (gdk->outline_gc, + width, + style, + priv->cap, + priv->join); + + /* Colors and stipples */ + set_gc_foreground (gdk->outline_gc, gdk->outline_pixel); + set_stipple (gdk->outline_gc, &gdk->outline_stipple, gdk->outline_stipple, TRUE); + } + } + + if (priv->fill_set) { + + /* Colors and stipples */ + if(gdk->fill_gc) { + set_gc_foreground (gdk->fill_gc, gdk->fill_pixel); + set_stipple (gdk->fill_gc, &gdk->fill_stipple, gdk->fill_stipple, TRUE); + } + } + + /* Now the crazy part */ + + /* Free existing GdkPoint array */ + + if (gdk->points) { + g_free (gdk->points); + gdk->points = NULL; + gdk->len_points = 0; + gdk->num_points = 0; + } + + /* Free subpath lists */ + + while (gdk->closed_paths) gdk->closed_paths = g_slist_remove (gdk->closed_paths, gdk->closed_paths->data); + while (gdk->open_paths) gdk->open_paths = g_slist_remove (gdk->open_paths, gdk->open_paths->data); + + /* Calcualte new GdkPoints array and subpath lists */ + + if (priv->path) { + GnomeCanvasPathDef * apath, * cpath, * opath; + ArtBpath * abpath; + GSList * clist, * olist; + gint pos; + +#if 0 + /* Allocate array */ + gdk->num_points = gnome_canvas_path_def_length (priv->path) * 1000 - 1; + gdk->points = g_new (GdkPoint, gdk->num_points); + g_print ("Points %d\n", gdk->num_points); + /* Transform path */ +#endif + + abpath = art_bpath_affine_transform (gnome_canvas_path_def_bpath (priv->path), affine); + apath = gnome_canvas_path_def_new_from_bpath (abpath); + + /* Split path into open and closed parts */ + + cpath = gnome_canvas_path_def_closed_parts (apath); + opath = gnome_canvas_path_def_open_parts (apath); + gnome_canvas_path_def_unref (apath); + + /* Split partial paths into subpaths */ + + clist = gnome_canvas_path_def_split (cpath); + gnome_canvas_path_def_unref (cpath); + olist = gnome_canvas_path_def_split (opath); + gnome_canvas_path_def_unref (opath); + + pos = 0; + + /* Fill GdkPoints and add subpaths to list: closed subpaths */ + + while (clist) { + GnomeCanvasPathDef * path; + ArtBpath * bpath; + ArtVpath * vpath; + gint len, i; + + path = (GnomeCanvasPathDef *) clist->data; + bpath = gnome_canvas_path_def_bpath (path); + vpath = art_bez_path_to_vec (bpath, 0.1); + for (len = 0; vpath[len].code != ART_END; len++) ; + + gnome_canvas_shape_ext_ensure_gdk_points (gdk, len); + for (i = 0; i < len; i++) { + gdk->points[pos + i].x = (gint) floor (vpath[i].x + 0.5); + gdk->points[pos + i].y = (gint) floor (vpath[i].y + 0.5); + + if (bbox_set) { + x1 = MIN (x1, gdk->points[pos + i].x); + x2 = MAX (x2, gdk->points[pos + i].x); + y1 = MIN (y1, gdk->points[pos + i].y); + y2 = MAX (y2, gdk->points[pos + i].y); + } else { + bbox_set = TRUE; + x1 = x2 = gdk->points[pos + i].x; + y1 = y2 = gdk->points[pos + i].y; + } + } + gdk->num_points += len; + + art_free (vpath); + + if (len > 0) { + pos += len; + gdk->closed_paths = g_slist_append (gdk->closed_paths, GINT_TO_POINTER (len)); + } + + gnome_canvas_path_def_unref (path); + clist = g_slist_remove (clist, clist->data); + } + + /* Fill GdkPoints and add subpaths to list: open subpaths */ + + while (olist) { + GnomeCanvasPathDef * path; + ArtBpath * bpath; + ArtVpath * vpath; + gint len, i; + + path = (GnomeCanvasPathDef *) olist->data; + bpath = gnome_canvas_path_def_bpath (path); + vpath = art_bez_path_to_vec (bpath, 0.1); + for (len = 0; vpath[len].code != ART_END; len++) ; + + gnome_canvas_shape_ext_ensure_gdk_points (gdk, len); + for (i = 0; i < len; i++) { + gdk->points[pos + i].x = (gint) floor (vpath[i].x + 0.5); + gdk->points[pos + i].y = (gint) floor (vpath[i].y + 0.5); + + if (bbox_set) { + x1 = MIN (x1, gdk->points[pos + i].x); + x2 = MAX (x2, gdk->points[pos + i].x); + y1 = MIN (y1, gdk->points[pos + i].y); + y2 = MAX (y2, gdk->points[pos + i].y); + } else { + bbox_set = TRUE; + x1 = x2 = gdk->points[pos + i].x; + y1 = y2 = gdk->points[pos + i].y; + } + } + gdk->num_points += len; + + art_free (vpath); + + if (len > 0) { + pos += len; + gdk->open_paths = g_slist_append (gdk->open_paths, GINT_TO_POINTER (len)); + } + + gnome_canvas_path_def_unref (path); + olist = g_slist_remove (olist, olist->data); + } + + } + + if (bbox_set) { + if (priv->outline_set) { + int stroke_border = (priv->join == GDK_JOIN_MITER) + ? ceil (10.43*width/2) /* 10.43 is the miter limit for X11 */ + : ceil (width/2); + x1 -= stroke_border; + x2 += stroke_border; + y1 -= stroke_border; + y2 += stroke_border; + } + + gnome_canvas_update_bbox (GNOME_CANVAS_ITEM (shape), + x1, y1, + x2 + 1, y2 + 1); + } + +} + +static void +gnome_canvas_shape_ext_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +{ + GnomeCanvasShapeExt * shape; + GnomeCanvasShapePriv * priv; + ArtSVP * svp; + + shape = GNOME_CANVAS_SHAPE_EXT (item); + + priv = shape->priv; + + /* Common part */ + if (parent_class->update) { + (* parent_class->update) (item, affine, clip_path, flags); + } + + /* Outline width */ + shape->priv->scale = (fabs (affine[0]) + fabs (affine[3])) / 2.0; + + /* Reset bbox */ + if (item->canvas->aa) { + gnome_canvas_item_reset_bounds (item); + } + + /* Clipped fill SVP */ + + if ((shape->priv->fill_set) && (gnome_canvas_path_def_any_closed (shape->priv->path))) { + GnomeCanvasPathDef * cpath; + ArtSvpWriter *swr; + ArtVpath *vpath; + ArtBpath *abp; + ArtSVP *svp2; + + /* Get closed part of path */ + + cpath = gnome_canvas_path_def_closed_parts (shape->priv->path); + abp = art_bpath_affine_transform (gnome_canvas_path_def_bpath (cpath), affine); + gnome_canvas_path_def_unref (cpath); + + /* Render, until SVP */ + + vpath = art_bez_path_to_vec (abp, 0.1); + art_free (abp); + + svp = art_svp_from_vpath (vpath); + art_free (vpath); + + swr = art_svp_writer_rewind_new (shape->priv->wind); + art_svp_intersector (svp, swr); + + svp2 = art_svp_writer_rewind_reap (swr); + art_svp_free (svp); + + if (item->canvas->aa) { + /* Update clipped path */ + gnome_canvas_item_update_svp_clip (item, + &shape->priv->fill_svp, + svp2, + clip_path); + } else { + if (priv->fill_svp) { + art_svp_free (priv->fill_svp); + priv->fill_svp = NULL; + } + /* No clipping */ + shape->priv->fill_svp = svp2; + } + } + + if (priv->outline_set && priv->path && !gnome_canvas_path_def_is_empty (priv->path)) { + gdouble width; + ArtBpath * abp; + ArtVpath * vpath; + + /* Set linewidth */ + + if (priv->width_pixels) { + width = priv->width; + } else { + width = priv->width * priv->scale; + } + + if (width < 0.5) width = 0.5; + + /* Render full path until vpath */ + + abp = art_bpath_affine_transform (gnome_canvas_path_def_bpath (priv->path), affine); + + vpath = art_bez_path_to_vec (abp, 0.1); + art_free (abp); + + /* If dashed, apply dash */ + + if (priv->dash.dash != NULL) + { + ArtVpath *old = vpath; + + vpath = art_vpath_dash (old, &priv->dash); + art_free (old); + } + + /* Stroke vpath to SVP */ + + svp = art_svp_vpath_stroke (vpath, + gnome_canvas_join_gdk_to_art (priv->join), + gnome_canvas_cap_gdk_to_art (priv->cap), + width, + priv->miterlimit, + 0.25); + art_free (vpath); + + if (item->canvas->aa) { + /* Update clipped */ + gnome_canvas_item_update_svp_clip (item, &priv->outline_svp, svp, clip_path); + } else { + if (priv->outline_svp) { + art_svp_free (priv->outline_svp); + priv->outline_svp = NULL; + } + /* No clipping (yet) */ + shape->priv->outline_svp = svp; + } + } + + /* Gdk requires additional handling */ + + if (!item->canvas->aa) { + gnome_canvas_shape_ext_update_gdk (shape, affine, clip_path, flags); + } +} + +static double +gnome_canvas_shape_ext_point (GnomeCanvasItem *item, double x, double y, + int cx, int cy, GnomeCanvasItem **actual_item) +{ + GnomeCanvasShapeExt *shape; + double dist; + int wind; + +#if 0 + /* fixme: This is just for debugging, canvas should ensure that */ + /* fixme: IF YOU ARE SURE THAT IT IS CORRECT BEHAVIOUR, you can remove warning */ + /* fixme: and make it to return silently */ + g_return_val_if_fail (!item->canvas->need_update, 1e18); +#endif + + shape = GNOME_CANVAS_SHAPE_EXT (item); + + /* todo: update? */ + if (shape->priv->fill_set && shape->priv->fill_svp) { + wind = art_svp_point_wind (shape->priv->fill_svp, cx, cy); + if ((shape->priv->wind == ART_WIND_RULE_NONZERO) && (wind != 0)) { + *actual_item = item; + return 0.0; + } + if ((shape->priv->wind == ART_WIND_RULE_ODDEVEN) && ((wind & 0x1) != 0)) { + *actual_item = item; + return 0.0; + } + } + + if (shape->priv->outline_set && shape->priv->outline_svp) { + wind = art_svp_point_wind (shape->priv->outline_svp, cx, cy); + if (wind) { + *actual_item = item; + return 0.0; + } + } + + if (shape->priv->outline_set && shape->priv->outline_svp) { + dist = art_svp_point_dist (shape->priv->outline_svp, cx, cy); + } else if (shape->priv->fill_set && shape->priv->outline_svp) { + dist = art_svp_point_dist (shape->priv->fill_svp, cx, cy); + } else { + return 1e12; + } + + *actual_item = item; + + return dist; +} + +/* Helpers */ + +/* Get 32bit rgba color from GdkColor */ + +static guint32 +get_rgba_from_color (GdkColor * color) +{ + return ((color->red & 0xff00) << 16) | ((color->green & 0xff00) << 8) | (color->blue & 0xff00) | 0xff; +} + +/* Get Gdk pixel value from 32bit rgba color */ + +static gulong +get_pixel_from_rgba (GnomeCanvasItem *item, guint32 rgba_color) +{ + return gnome_canvas_get_color_pixel (item->canvas, rgba_color); +} + +/* Convenience function to set a GC's foreground color to the specified pixel value */ + +static void +set_gc_foreground (GdkGC *gc, gulong pixel) +{ + GdkColor c; + + g_assert (gc != NULL); + + c.pixel = pixel; + + gdk_gc_set_foreground (gc, &c); +} + +/* Sets the stipple pattern for the specified gc */ + +static void +set_stipple (GdkGC *gc, GdkBitmap **internal_stipple, GdkBitmap *stipple, int reconfigure) +{ + if (*internal_stipple && !reconfigure) + gdk_bitmap_unref (*internal_stipple); + + *internal_stipple = stipple; + if (stipple && !reconfigure) + gdk_bitmap_ref (stipple); + + if (gc) { + if (stipple) { + gdk_gc_set_stipple (gc, stipple); + gdk_gc_set_fill (gc, GDK_STIPPLED); + } else + gdk_gc_set_fill (gc, GDK_SOLID); + } +} + +/* Creates private Gdk struct, if not present */ +/* We cannot do it during ::init, as we have to know canvas */ + +static void +gcbp_ensure_gdk (GnomeCanvasShapeExt * shape) +{ + g_assert (!((GnomeCanvasItem *) shape)->canvas->aa); + + if (!shape->priv->gdk) { + GnomeCanvasShapePrivGdk * gdk; + + gdk = g_new (GnomeCanvasShapePrivGdk, 1); + + gdk->fill_pixel = get_pixel_from_rgba ((GnomeCanvasItem *) shape, shape->priv->fill_rgba); + gdk->outline_pixel = get_pixel_from_rgba ((GnomeCanvasItem *) shape, shape->priv->outline_rgba); + + gdk->fill_stipple = NULL; + gdk->outline_stipple = NULL; + + gdk->fill_gc = NULL; + gdk->outline_gc = NULL; + + gdk->len_points = 0; + gdk->num_points = 0; + gdk->points = NULL; + gdk->closed_paths = NULL; + gdk->open_paths = NULL; + + gdk->ctx = NULL; + + shape->priv->gdk = gdk; + } +} + +/* Destroy private Gdk struct */ +/* It is here, to make ::destroy implementation shorter :) */ + +static void +gcbp_destroy_gdk (GnomeCanvasShapeExt * shape) +{ + GnomeCanvasShapePrivGdk * gdk; + + g_assert (!((GnomeCanvasItem *)shape)->canvas->aa); + + gdk = shape->priv->gdk; + + if (gdk) { + g_assert (!gdk->fill_gc); + g_assert (!gdk->outline_gc); + + if (gdk->fill_stipple) + gdk_bitmap_unref (gdk->fill_stipple); + + if (gdk->outline_stipple) + gdk_bitmap_unref (gdk->outline_stipple); + + if (gdk->points) + g_free (gdk->points); + + while (gdk->closed_paths) + gdk->closed_paths = g_slist_remove (gdk->closed_paths, gdk->closed_paths->data); + while (gdk->open_paths) + gdk->open_paths = g_slist_remove (gdk->open_paths, gdk->open_paths->data); + + if (gdk->ctx) + gcbp_draw_ctx_unref (gdk->ctx); + + g_free (gdk); + + shape->priv->gdk = NULL; + } +} + +/* + * Ensure, that per-canvas Ctx struct is present and bitmaps are + * big enough, to mask full redraw area. Ctx is refcounted and + * defined as "BpathDrawCtx" data member on parent canvas + */ + +static void +gcbp_ensure_mask (GnomeCanvasShapeExt * shape, gint width, gint height) +{ + GnomeCanvasShapePrivGdk * gdk; + GCBPDrawCtx * ctx; + + gdk = shape->priv->gdk; + g_assert (gdk != NULL); + ctx = gdk->ctx; + + if (!ctx) { + /* Ctx is not yet defined for us */ + + GnomeCanvas * canvas; + + canvas = GNOME_CANVAS_ITEM (shape)->canvas; + + ctx = g_object_get_data (G_OBJECT (canvas), "BpathDrawCtx"); + + if (!ctx) { + /* Ctx is not defined for parent canvas yet */ + + GdkWindow * window; + + window = ((GtkWidget *) (((GnomeCanvasItem *) shape)->canvas))->window; + + ctx = g_new (GCBPDrawCtx, 1); + + ctx->refcount = 1; + ctx->canvas = canvas; + ctx->width = 0; + ctx->height = 0; + + ctx->mask = NULL; + ctx->clip = NULL; + + ctx->clear_gc = NULL; + ctx->xor_gc = NULL; + + g_object_set_data (G_OBJECT (canvas), "BpathDrawContext", ctx); + + } else { + ctx->refcount++; + } + + gdk->ctx = ctx; + + } + + /* Now we are sure, that ctx is present and properly refcounted */ + + if ((width > ctx->width) || (height > ctx->height)) { + /* Ctx is too small */ + + GdkWindow * window; + + window = ((GtkWidget *) (((GnomeCanvasItem *) shape)->canvas))->window; + + if (ctx->clear_gc) gdk_gc_unref (ctx->clear_gc); + if (ctx->xor_gc) gdk_gc_unref (ctx->xor_gc); + if (ctx->mask) gdk_bitmap_unref (ctx->mask); + if (ctx->clip) gdk_bitmap_unref (ctx->clip); + + ctx->mask = gdk_pixmap_new (window, width, height, 1); + ctx->clip = NULL; + + ctx->clear_gc = gdk_gc_new (ctx->mask); + gdk_gc_set_function (ctx->clear_gc, GDK_CLEAR); + + ctx->xor_gc = gdk_gc_new (ctx->mask); + gdk_gc_set_function (ctx->xor_gc, GDK_INVERT); + } +} + +/* It is cleaner to have it here, not in parent function */ + +static void +gcbp_draw_ctx_unref (GCBPDrawCtx * ctx) +{ + if (--ctx->refcount < 1) { + if (ctx->clear_gc) + gdk_gc_unref (ctx->clear_gc); + if (ctx->xor_gc) + gdk_gc_unref (ctx->xor_gc); + + if (ctx->mask) + gdk_bitmap_unref (ctx->mask); + if (ctx->clip) + gdk_bitmap_unref (ctx->clip); + + g_object_set_data (G_OBJECT (ctx->canvas), "BpathDrawCtx", NULL); + } +} + +static void +gnome_canvas_shape_ext_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) +{ + GnomeCanvasShapeExt * shape; + GnomeCanvasShapePriv * priv; + ArtDRect bbox; + ArtSVP * svp; + + shape = GNOME_CANVAS_SHAPE_EXT (item); + + priv = shape->priv; + + bbox.x0 = *x1; + bbox.y0 = *y1; + bbox.x1 = *x2; + bbox.y1 = *y2; + + if (priv->outline_set && priv->path && !gnome_canvas_path_def_is_empty (priv->path)) { + gdouble width; + ArtVpath * vpath; + + /* Set linewidth */ + + if (priv->width_pixels) { + width = priv->width; + } else { + width = priv->width * priv->scale; + } + + if (width < 0.5) width = 0.5; + + /* Render full path until vpath */ + + vpath = art_bez_path_to_vec (gnome_canvas_path_def_bpath (priv->path), 0.1); + + /* If dashed, apply dash */ + + if (priv->dash.dash != NULL) + { + ArtVpath *old = vpath; + + vpath = art_vpath_dash (old, &priv->dash); + art_free (old); + } + + /* Stroke vpath to SVP */ + + svp = art_svp_vpath_stroke (vpath, + gnome_canvas_join_gdk_to_art (priv->join), + gnome_canvas_cap_gdk_to_art (priv->cap), + width, + priv->miterlimit, + 0.25); + art_free (vpath); + art_drect_svp (&bbox, svp); + art_svp_free (svp); + } else if ((shape->priv->fill_set) && priv->path && (gnome_canvas_path_def_any_closed (shape->priv->path))) { + GnomeCanvasPathDef *cpath; + ArtSvpWriter *swr; + ArtVpath *vpath; + ArtSVP *svp2; + + /* Get closed part of path */ + cpath = gnome_canvas_path_def_closed_parts (shape->priv->path); + /* Render, until SVP */ + vpath = art_bez_path_to_vec (gnome_canvas_path_def_bpath (cpath), 0.1); + gnome_canvas_path_def_unref (cpath); + + svp = art_svp_from_vpath (vpath); + art_free (vpath); + + swr = art_svp_writer_rewind_new (shape->priv->wind); + art_svp_intersector (svp, swr); + + svp2 = art_svp_writer_rewind_reap (swr); + art_svp_free (svp); + + art_drect_svp (&bbox, svp2); + art_svp_free (svp2); + } + + *x1 = bbox.x0; + *y1 = bbox.y0; + *x2 = bbox.x1; + *y2 = bbox.y1; +} + +static void +gnome_canvas_shape_ext_export_svg (GPrintable *printable, xmlDocPtr doc, xmlNodePtr node) +{ + GnomeCanvasShapeExt *shape; + GnomeCanvasShapePriv * priv; + GnomeCanvasPathDef * path; + gdouble width; + ArtBpath * bpath; + GString *string; + xmlNodePtr child; + char *buf; + int opacity, i; + + g_return_if_fail (GNOME_IS_CANVAS_SHAPE_EXT (printable)); + shape = GNOME_CANVAS_SHAPE_EXT (printable); + priv = shape->priv; + path = priv->path; + bpath = gnome_canvas_path_def_bpath (path); + + child = xmlNewDocNode (doc, NULL, (const xmlChar*) "path", NULL); + xmlAddChild (node, child); + string = g_string_new (""); + for ( ; bpath->code != ART_END ; bpath++) + switch (bpath->code) { + case ART_CURVETO : + g_string_append_printf (string, "C%g %g %g %g %g %g", bpath->x1, bpath->y1, bpath->x2, bpath->y2, bpath->x3, bpath->y3); + break; + case ART_MOVETO : + g_string_append_printf (string, "M%g %g", bpath->x3, bpath->y3); + break; + case ART_MOVETO_OPEN : + g_string_append_printf (string, "M%g %g", bpath->x3, bpath->y3); + break; + case ART_LINETO : + g_string_append_printf (string, "L%g %g", bpath->x3, bpath->y3); + break; + default : + break; + } + xmlNewProp (child, (const xmlChar*)"d", (const xmlChar*)string->str); + g_string_free (string, TRUE); + if (priv->fill_set) { + buf = g_strdup_printf ("#%06x", priv->fill_rgba >> 8); + xmlNewProp (child, (const xmlChar*)"fill", (const xmlChar*)buf); + g_free (buf); + opacity = priv->fill_rgba & 0xff; + if (opacity != 255) { + buf = g_strdup_printf ("%g", (double) opacity / 255.); + xmlNewProp (child, (const xmlChar*)"fill-opacity", (const xmlChar*)buf); + g_free (buf); + } + } else + xmlNewProp (child, (const xmlChar*)"fill", (const xmlChar*)"none"); + if (priv->outline_set) { + buf = g_strdup_printf ("#%06x", priv->outline_rgba >> 8); + xmlNewProp (child, (const xmlChar*)"stroke", (const xmlChar*)buf); + g_free (buf); + opacity = priv->outline_rgba & 0xff; + if (opacity != 255) { + buf = g_strdup_printf ("%g", (double) opacity / 255.); + xmlNewProp (child, (const xmlChar*)"sroke-opacity", (const xmlChar*)buf); + g_free (buf); + } + if (priv->width_pixels) + width = (double) priv->width / shape->item.canvas->pixels_per_unit; + else + width = priv->width; + buf = g_strdup_printf ("%g", width); + xmlNewProp (child, (const xmlChar*)"stroke-width", (const xmlChar*)buf); + g_free (buf); + } else + xmlNewProp (child, (const xmlChar*)"stroke", (const xmlChar*)"none"); + + switch (priv->cap) { + case GDK_CAP_ROUND: + xmlNewProp (child, (const xmlChar*)"stroke-linecap", (const xmlChar*)"round"); + break; + case GDK_CAP_PROJECTING: + xmlNewProp (child, (const xmlChar*)"stroke-linecap", (const xmlChar*)"square"); + break; + default: + xmlNewProp (child, (const xmlChar*)"stroke-linecap", (const xmlChar*)"butt"); + break; + } + + switch (priv->join) { + case GDK_JOIN_ROUND: + xmlNewProp (child, (const xmlChar*)"stroke-join", (const xmlChar*)"round"); + break; + case GDK_JOIN_BEVEL: + xmlNewProp (child, (const xmlChar*)"stroke-linejoin", (const xmlChar*)"bevel"); + break; + default: + xmlNewProp (child, (const xmlChar*)"stroke-linejoin", (const xmlChar*)"miter"); + break; + } + + if (priv->dash.n_dash) { + char **inc = g_new0 (char*, priv->dash.n_dash + 1); + buf = g_strdup_printf ("%g", priv->dash.dash[0]); + for (i = 0; i < priv->dash.n_dash; i++) + inc[i] = g_strdup_printf ("%g", priv->dash.dash[0]); + buf = g_strjoinv (",", inc); + for (i = 0; i < priv->dash.n_dash; i++) + g_free (inc[i]); + g_free (inc); + xmlNewProp (child, (const xmlChar*)"stroke-dasharray", (const xmlChar*)buf); + g_free (buf); + buf = g_strdup_printf ("%g", priv->dash.offset); + xmlNewProp (child, (const xmlChar*)"stroke-dashoffset", (const xmlChar*)buf); + g_free (buf); + } +} + +void gnome_canvas_shape_ext_draw_cairo (GPrintable *printable, cairo_t *cr) +{ + GnomeCanvasShapeExt *shape; + GnomeCanvasShapePriv * priv; + gdouble width; + ArtBpath * bpath; + + g_return_if_fail (GNOME_IS_CANVAS_SHAPE_EXT (printable)); + shape = GNOME_CANVAS_SHAPE_EXT (printable); + priv = shape->priv; + bpath = gnome_canvas_path_def_bpath (priv->path); + + if (priv->width_pixels) + width = (double) priv->width / shape->item.canvas->pixels_per_unit; + else + width = priv->width; + cairo_set_line_width (cr, width); + + switch (priv->cap) { + case GDK_CAP_ROUND: + cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); + break; + case GDK_CAP_PROJECTING: + cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); + break; + default: + cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); + break; + } + + + cairo_set_line_join (cr, (cairo_line_join_t) priv->join); + + cairo_set_dash (cr, priv->dash.dash, priv->dash.n_dash, priv->dash.offset); + + for ( ; bpath->code != ART_END ; bpath++) + switch (bpath->code) { + case ART_CURVETO : + cairo_curve_to (cr, bpath->x1, bpath->y1, bpath->x2, bpath->y2, bpath->x3, bpath->y3); + break; + case ART_MOVETO : + cairo_move_to (cr, bpath->x3, bpath->y3); + break; + case ART_MOVETO_OPEN : + cairo_move_to (cr, bpath->x3, bpath->y3); + break; + case ART_LINETO : + cairo_line_to (cr, bpath->x3, bpath->y3); + break; + default : + break; + } + + if (priv->fill_set) { + cairo_set_source_rgba (cr, ((double)(priv->fill_rgba >> 24)) / 255.0, + ((double)((priv->fill_rgba >> 16) & 0xff)) / 255.0, + ((double)((priv->fill_rgba >> 8) & 0xff)) / 255.0, + ((double) (priv->fill_rgba & 0xff)) / 255.0); + cairo_path_t *path = cairo_copy_path (cr); + cairo_close_path (cr); + cairo_fill (cr); + cairo_append_path (cr, path); + } + + if (priv->outline_set) { + cairo_set_source_rgba (cr, ((double)(priv->outline_rgba >> 24)) / 255.0, + ((double)((priv->outline_rgba >> 16) & 0xff)) / 255.0, + ((double)((priv->outline_rgba >> 8) & 0xff)) / 255.0, + ((double) (priv->outline_rgba & 0xff)) / 255.0); + + cairo_stroke (cr); + } else + cairo_new_path (cr); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-shape.h gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-shape.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gcp-canvas-shape.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gcp-canvas-shape.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,74 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +/* + @NOTATION@ + */ +/* GnomeCanvas widget - Tk-like canvas widget for Gnome + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas + * widget. Tk is copyrighted by the Regents of the University of California, + * Sun Microsystems, and other parties. + * + * + * Authors: Federico Mena + * Raph Levien + */ + +#ifndef GNOME_CANVAS_SHAPE_EXT_H +#define GNOME_CANVAS_SHAPE_EXT_H + +#include + +typedef struct _GnomeCanvasShapeExt GnomeCanvasShapeExt; +typedef struct _GnomeCanvasShapeExtClass GnomeCanvasShapeExtClass; + +G_BEGIN_DECLS +#define GNOME_TYPE_CANVAS_SHAPE_EXT (gnome_canvas_shape_ext_get_type ()) +#define GNOME_CANVAS_SHAPE_EXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_SHAPE_EXT, GnomeCanvasShapeExt)) +#define GNOME_CANVAS_SHAPE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_SHAPE_EXT, GnomeCanvasShapeExtClass)) +#define GNOME_IS_CANVAS_SHAPE_EXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_SHAPE_EXT)) +#define GNOME_IS_CANVAS_SHAPE_EXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_SHAPE_EXT)) +#define GNOME_CANVAS_SHAPE_EXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_SHAPE_EXT, GnomeCanvasShapeExtClass)) + + +struct _GnomeCanvasShapeExt { + GnomeCanvasItem item; + + GnomeCanvasShapePriv *priv; /* Private data */ +}; + +struct _GnomeCanvasShapeExtClass { + GnomeCanvasItemClass parent_class; +}; + +/* WARNING! These are not usable from modifying shapes from user programs */ +/* These are meant, to set master shape from subclass ::update method */ +void gnome_canvas_shape_ext_set_path_def (GnomeCanvasShapeExt *shape, GnomeCanvasPathDef *def); +GnomeCanvasPathDef *gnome_canvas_shape_ext_get_path_def (GnomeCanvasShapeExt *shape); + +/* Standard Gtk function */ +GType gnome_canvas_shape_ext_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gnome-canvas-shape-private.h gnome-chemistry-utils-0.10.9/libs/canvas/gnome-canvas-shape-private.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gnome-canvas-shape-private.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gnome-canvas-shape-private.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,103 @@ +#ifndef GNOME_CANVAS_SHAPE_PRIVATE_H +#define GNOME_CANVAS_SHAPE_PRIVATE_H + +/* Bpath item type for GnomeCanvas widget + * + * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is + * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. + * + * Copyright (C) 1998,1999 The Free Software Foundation + * + * Authors: Federico Mena + * Raph Levien + * Lauris Kaplinski + */ + +#include +#include +#include +#include +#include +#include + +#include + +G_BEGIN_DECLS + +typedef struct _GnomeCanvasShapePrivGdk GnomeCanvasShapePrivGdk; +typedef struct _GCBPDrawCtx GCBPDrawCtx; + +/* Per canvas private structure, holding necessary data for rendering + * temporary masks, which are needed for drawing multipart bpaths. + * As canvas cannot multithread, we can be sure, that masks are used + * serially, also one set of masks per canvas is sufficent to guarantee, + * that masks are created on needed X server. Masks grow as needed. + * Full structure is refcounted in Bpath implementation + */ + +struct _GCBPDrawCtx { + gint refcount; + + GnomeCanvas * canvas; + + gint width; + gint height; + + GdkBitmap * mask; + GdkBitmap * clip; + + GdkGC * clear_gc; + GdkGC * xor_gc; +}; + +/* Per Bpath private structure, holding Gdk specific data */ + +struct _GnomeCanvasShapePrivGdk { + gulong fill_pixel; /* Color for fill */ + gulong outline_pixel; /* Color for outline */ + + GdkBitmap *fill_stipple; /* Stipple for fill */ + GdkBitmap *outline_stipple; /* Stipple for outline */ + + GdkGC * fill_gc; /* GC for filling */ + GdkGC * outline_gc; /* GC for outline */ + + gint len_points; /* Size of allocated points array */ + gint num_points; /* Gdk points in canvas coords */ + GdkPoint * points; /* Ivariant: closed paths are before open ones */ + GSList * closed_paths; /* List of lengths */ + GSList * open_paths; /* List of lengths */ + + GCBPDrawCtx * ctx; /* Pointer to per-canvas drawing context */ +}; + +struct _GnomeCanvasShapePriv { + GnomeCanvasPathDef * path; /* Our bezier path representation */ + + gdouble scale; /* CTM scaling (for pen) */ + + guint fill_set : 1; /* Is fill color set? */ + guint outline_set : 1; /* Is outline color set? */ + guint width_pixels : 1; /* Is outline width specified in pixels or units? */ + + double width; /* Width of outline, in user coords */ + + guint32 fill_rgba; /* Fill color, RGBA */ + guint32 outline_rgba; /* Outline color, RGBA */ + + GdkCapStyle cap; /* Cap style for line */ + GdkJoinStyle join; /* Join style for line */ + ArtWindRule wind; /* Winding rule */ + double miterlimit; /* Miter limit */ + + ArtVpathDash dash; /* Dashing pattern */ + + ArtSVP * fill_svp; /* The SVP for the filled shape */ + ArtSVP * outline_svp; /* The SVP for the outline shape */ + + GnomeCanvasShapePrivGdk * gdk; /* Gdk specific things */ +}; + +G_END_DECLS + +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gprintable.c gnome-chemistry-utils-0.10.9/libs/canvas/gprintable.c --- gnome-chemistry-utils-0.8.6/libs/canvas/gprintable.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gprintable.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,68 @@ +/* + * gprintable.c + * + * Copyright (C) 2003 Jean Bréfort + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gprintable.h" + +GType +g_printable_get_type (void) +{ + static GType g_printable_type = 0; + + if (!g_printable_type) { + static const GTypeInfo g_printable_info = { + sizeof (GPrintableIface), + NULL, NULL, NULL, NULL, NULL, 0, 0, NULL + }; + g_printable_type = g_type_register_static (G_TYPE_INTERFACE, "GPrintable", &g_printable_info, 0); + } + + return g_printable_type; +} + +void +g_printable_export_svg (GPrintable *gprintable, xmlDocPtr doc, xmlNodePtr node) +{ + GPrintableIface *iface; + + g_return_if_fail (G_IS_PRINTABLE (gprintable)); + g_return_if_fail (doc != NULL); + g_return_if_fail (node != NULL); + + iface = G_PRINTABLE_GET_IFACE (gprintable); + + if (iface->export_svg) + iface->export_svg (gprintable, doc, node); +} + +void +g_printable_draw_cairo (GPrintable *gprintable, cairo_t *cr) +{ + GPrintableIface *iface; + + g_return_if_fail (G_IS_PRINTABLE (gprintable)); + g_return_if_fail (cr != NULL); + + iface = G_PRINTABLE_GET_IFACE (gprintable); + + if (iface->draw_cairo) + iface->draw_cairo (gprintable, cr); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/gprintable.h gnome-chemistry-utils-0.10.9/libs/canvas/gprintable.h --- gnome-chemistry-utils-0.8.6/libs/canvas/gprintable.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/gprintable.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,54 @@ +/* + * gprintable.h + * + * Copyright (C) 2003 Jean Bréfort + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef _INC_G_PRINTABLE_H +#define _INC_G_PRINTABLE_H + +#include +#include +#include + +G_BEGIN_DECLS + +typedef struct _GPrintable GPrintable; +typedef struct _GPrintableIface GPrintableIface; + +struct _GPrintableIface { + GTypeInterface interface; + + /* virtual functions */ + void (*export_svg) (GPrintable *, xmlDocPtr, xmlNodePtr); + void (*draw_cairo) (GPrintable *, cairo_t*); +}; + +#define G_TYPE_PRINTABLE (g_printable_get_type()) +#define G_PRINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_PRINTABLE, GPrintable)) +#define G_IS_PRINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_PRINTABLE)) +#define G_PRINTABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), G_TYPE_PRINTABLE, GPrintableIface)) + +GType g_printable_get_type (void); + +void g_printable_export_svg (GPrintable *gprintable, xmlDocPtr doc, xmlNodePtr node); +void g_printable_draw_cairo (GPrintable *gprintable, cairo_t *cr); + +G_END_DECLS + +#endif /*_INC_G_PRINTABLE_H*/ diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/Makefile.am gnome-chemistry-utils-0.10.9/libs/canvas/Makefile.am --- gnome-chemistry-utils-0.8.6/libs/canvas/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/Makefile.am 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,36 @@ +MAINTAINERCLEANFILES = Makefile.in + +lib_LTLIBRARIES = libgcpcanvas-@GCU_API_VER@.la + +noinst_HEADERS = \ + gprintable.h \ + gnome-canvas-shape-private.h \ + gcp-canvas-group.h \ + gcp-canvas-line.h \ + gcp-canvas-pango.h \ + gcp-canvas-shape.h \ + gcp-canvas-bpath.h \ + gcp-canvas-rect-ellipse.h \ + gcp-canvas-polygon.h \ + gcp-canvas-i18n.h + +libgcpcanvas_@GCU_API_VER@_la_SOURCES = \ + gprintable.c \ + pango-layout-to-svg.c \ + gcp-canvas-group.c \ + gcp-canvas-line.c \ + gcp-canvas-pango.c \ + gcp-canvas-shape.c \ + gcp-canvas-bpath.c \ + gcp-canvas-rect-ellipse.c \ + gcp-canvas-polygon.c + +libgcpcanvas_@GCU_API_VER@_la_LDFLAGS = \ + -version-info @GCU_VERSION_INFO@ +libgcpcanvas_@GCU_API_VER@_la_LIBADD = \ + $(gnome_canvas_LIBS) \ + $(xml_LIBS) +INCLUDES = \ + $(gnome_canvas_CFLAGS) \ + $(xml_CFLAGS) + $(GCU_CFLAGS) diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/Makefile.in gnome-chemistry-utils-0.10.9/libs/canvas/Makefile.in --- gnome-chemistry-utils-0.8.6/libs/canvas/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -0,0 +1,664 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libs/canvas +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +libgcpcanvas_@GCU_API_VER@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libgcpcanvas_@GCU_API_VER@_la_OBJECTS = gprintable.lo \ + pango-layout-to-svg.lo gcp-canvas-group.lo gcp-canvas-line.lo \ + gcp-canvas-pango.lo gcp-canvas-shape.lo gcp-canvas-bpath.lo \ + gcp-canvas-rect-ellipse.lo gcp-canvas-polygon.lo +libgcpcanvas_@GCU_API_VER@_la_OBJECTS = \ + $(am_libgcpcanvas_@GCU_API_VER@_la_OBJECTS) +libgcpcanvas_@GCU_API_VER@_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libgcpcanvas_@GCU_API_VER@_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgcpcanvas_@GCU_API_VER@_la_SOURCES) +DIST_SOURCES = $(libgcpcanvas_@GCU_API_VER@_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in +lib_LTLIBRARIES = libgcpcanvas-@GCU_API_VER@.la +noinst_HEADERS = \ + gprintable.h \ + gnome-canvas-shape-private.h \ + gcp-canvas-group.h \ + gcp-canvas-line.h \ + gcp-canvas-pango.h \ + gcp-canvas-shape.h \ + gcp-canvas-bpath.h \ + gcp-canvas-rect-ellipse.h \ + gcp-canvas-polygon.h \ + gcp-canvas-i18n.h + +libgcpcanvas_@GCU_API_VER@_la_SOURCES = \ + gprintable.c \ + pango-layout-to-svg.c \ + gcp-canvas-group.c \ + gcp-canvas-line.c \ + gcp-canvas-pango.c \ + gcp-canvas-shape.c \ + gcp-canvas-bpath.c \ + gcp-canvas-rect-ellipse.c \ + gcp-canvas-polygon.c + +libgcpcanvas_@GCU_API_VER@_la_LDFLAGS = \ + -version-info @GCU_VERSION_INFO@ + +libgcpcanvas_@GCU_API_VER@_la_LIBADD = \ + $(gnome_canvas_LIBS) \ + $(xml_LIBS) + +INCLUDES = \ + $(gnome_canvas_CFLAGS) \ + $(xml_CFLAGS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libs/canvas/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu libs/canvas/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgcpcanvas-@GCU_API_VER@.la: $(libgcpcanvas_@GCU_API_VER@_la_OBJECTS) $(libgcpcanvas_@GCU_API_VER@_la_DEPENDENCIES) + $(libgcpcanvas_@GCU_API_VER@_la_LINK) -rpath $(libdir) $(libgcpcanvas_@GCU_API_VER@_la_OBJECTS) $(libgcpcanvas_@GCU_API_VER@_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcp-canvas-bpath.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcp-canvas-group.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcp-canvas-line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcp-canvas-pango.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcp-canvas-polygon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcp-canvas-rect-ellipse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcp-canvas-shape.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gprintable.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pango-layout-to-svg.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES + + $(GCU_CFLAGS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/libs/canvas/pango-layout-to-svg.c gnome-chemistry-utils-0.10.9/libs/canvas/pango-layout-to-svg.c --- gnome-chemistry-utils-0.8.6/libs/canvas/pango-layout-to-svg.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/canvas/pango-layout-to-svg.c 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,160 @@ +/* + * pango-layout-to-svg.c + * + * Copyright (C) 2004-2005 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include +#include +#include + +void pango_layout_to_svg (PangoLayout* layout, xmlDocPtr doc, xmlNodePtr node, double x, double y) +{ + xmlNodePtr child, run; + char *buf; + int i, k; + int rise = 0; + gboolean force_rise = FALSE; + GSList *extra_attrs_list; + PangoFontDescription *desc; + PangoGlyphItem *item; + const char *text = pango_layout_get_text (layout); + GString *str; + PangoLayoutIter *iter = pango_layout_get_iter (layout); + /*PangoAlignment align = pango_layout_get_alignment (layout);*/ + + if (*text == 0) + return; + + do { + child = xmlNewDocNode (doc, NULL, (const xmlChar*) "text", NULL); + xmlAddChild (node, child); + buf = g_strdup_printf ("%g", x); + xmlNewProp (child, (const xmlChar*) "x", (const xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf ("%g", y + pango_layout_iter_get_baseline (iter) / PANGO_SCALE); + xmlNewProp (child, (const xmlChar*) "y", (const xmlChar*) buf); + g_free (buf); + + do { + item = pango_layout_iter_get_run (iter); + if (!item) break; + desc = pango_font_describe (item->item->analysis.font); + str = g_string_new (""); + for (i = 0; i < item->glyphs->num_glyphs; i++) + { + k = g_utf8_get_char (text); + if (k < 128) + g_string_append_printf (str, "%c", k); + else + g_string_append_printf (str, "&#x%x;", k); + text = g_utf8_next_char (text); + } + run = xmlNewDocNode (doc, NULL, (const xmlChar*) "tspan", (const xmlChar*) str->str); + g_string_free (str, TRUE); + xmlAddChild (child, run); + xmlNewProp (run, (xmlChar*) "font-family", (xmlChar*) pango_font_description_get_family (desc)); + buf = g_strdup_printf ("%d", (int)(rint (pango_font_description_get_size (desc) / PANGO_SCALE))); + xmlNewProp (run, (xmlChar*) "font-size", (xmlChar*) buf); + g_free (buf); + switch (pango_font_description_get_weight (desc)) { + case PANGO_WEIGHT_BOLD: + xmlNewProp (run, (xmlChar*) "font-weight", (xmlChar*) "bold"); + break; + case PANGO_WEIGHT_NORMAL: break; + default: + buf = g_strdup_printf ("%d", pango_font_description_get_weight (desc)); + xmlNewProp (run, (xmlChar*) "font-weight", (xmlChar*) buf); + g_free (buf); + break; + } + switch (pango_font_description_get_style (desc)) { + case PANGO_STYLE_ITALIC: + xmlNewProp (run,(xmlChar*) "font-syle", (xmlChar*) "italic"); + break; + case PANGO_STYLE_OBLIQUE: + xmlNewProp (run, (xmlChar*) "font-syle", (xmlChar*) "oblique"); + break; + default: break; + } + force_rise = rise != 0; + extra_attrs_list = item->item->analysis.extra_attrs; + while (extra_attrs_list) + { + gboolean decorated = FALSE; /* only supports underline OR strikethrough + so that we export only the first encountered one */ + PangoAttribute *attr = extra_attrs_list->data; + PangoAttrType attr_type = attr->klass->type; + switch (attr_type) { + case PANGO_ATTR_STYLE: + g_warning("style"); + break; + case PANGO_ATTR_RISE: + rise += ((PangoAttrInt *) attr)->value / PANGO_SCALE; + force_rise = FALSE; + buf = g_strdup_printf ("%d", - rise); + xmlNewProp (run, (xmlChar*) "dy", (xmlChar*) buf); + g_free (buf); + break; + case PANGO_ATTR_FOREGROUND: + buf = g_strdup_printf ("rgb(%d,%d,%d)", + ((PangoAttrColor *) attr)->color.red / 0xFF, + ((PangoAttrColor *) attr)->color.green / 0xFF, + ((PangoAttrColor *) attr)->color.blue / 0xFF); + xmlNewProp (run, (xmlChar*) "fill", (xmlChar*) buf); + g_free (buf); + break; + case PANGO_ATTR_UNDERLINE: { + if (decorated) + break; + PangoUnderline u = (PangoUnderline) ((PangoAttrInt*) attr)->value; + if (u != PANGO_UNDERLINE_NONE) { + xmlNewProp (run, (xmlChar*) "text-decoration", (xmlChar*) "underline"); + decorated = TRUE; + } + break; + } + case PANGO_ATTR_STRIKETHROUGH: + if (!decorated && ((PangoAttrInt*) attr)->value) { + xmlNewProp (run, (xmlChar*) "text-decoration", (xmlChar*) "line-through"); + decorated = TRUE; + } + break; + case PANGO_ATTR_SHAPE: + g_warning ("Pango attribute PANGO_ATTR_SHAPE not supported"); + break; + case PANGO_ATTR_SCALE: + g_warning ("Pango attribute PANGO_ATTR_SCALE not supported"); + break; + default: + break; + } + extra_attrs_list = extra_attrs_list->next; + } + if (force_rise) { + buf = g_strdup_printf ("%d", rise); + xmlNewProp (run, (xmlChar*) "dy", (xmlChar*) buf); + g_free (buf); + rise = 0; + } + } while (pango_layout_iter_next_run (iter)); + text = g_utf8_next_char (text); + } while (pango_layout_iter_next_line (iter)); + pango_layout_iter_free (iter); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/about.cc gnome-chemistry-utils-0.10.9/libs/gcp/about.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/about.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/about.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,67 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * about.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "about.h" +#include +#include +#include + +void on_about (GtkWidget* widget, void* data) +{ + char const *authors[] = {"Jean Bréfort", NULL}; + char const *artists[] = {"Nestor Diaz", NULL}; +// char * documentors[] = {NULL}; + char license[] = "This program is free software; you can redistribute it and/or\n" + "modify it under the terms of the GNU General Public License as\n" + "published by the Free Software Foundation; either version 2 of the\n" + "License, or (at your option) any later version.\n\n" + "This program is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n\n" + "You should have received a copy of the GNU General Public License\n" + "along with this program; if not, write to the Free Software\n" + "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301\n" + "USA"; +/* Note to translators: replace the following string with the appropriate credits for you lang */ + char const *translator_credits = _("translator_credits"); + GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file (PIXMAPSDIR"/gchempaint_logo.png", NULL); + gtk_show_about_dialog (NULL, + "name", "GChemPaint", + "authors", authors, + "artists", artists, + "comments", _("GChemPaint is a 2D chemical structures editor for Gnome"), + "copyright", _("Copyright © 2001-2008 by Jean Bréfort"), + "license", license, + "logo", pixbuf, + "icon-name", "gchempaint", + "translator_credits", strcmp (translator_credits, "translator_credits") != 0 ? + translator_credits : NULL, + "version", VERSION, + "website", "http://www.nongnu.org/gchempaint", + NULL); + if (pixbuf != NULL) + g_object_unref (pixbuf); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/about.h gnome-chemistry-utils-0.10.9/libs/gcp/about.h --- gnome-chemistry-utils-0.8.6/libs/gcp/about.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/about.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,37 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * about.h + * + * Copyright (C) 2004-2008 by Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ABOUT_H +#define GCHEMPAINT_ABOUT_H + +#include + +/*!\file*/ +/*! +Displays the GChemPaint "About" box. This function might be deprecated +in future versions. +*/ +void on_about (GtkWidget* widget, void* data); + +#endif //GCHEMPAINT_ABOUT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/application.cc gnome-chemistry-utils-0.10.9/libs/gcp/application.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/application.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/application.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1295 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * application.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "document.h" +#include "electron.h" +#include "fragment.h" +#include "text.h" +#include "plugin.h" +#include "mesomer.h" +#include "mesomery.h" +#include "mesomery-arrow.h" +#include "molecule.h" +#include "newfiledlg.h" +#include "reaction.h" +#include "reactant.h" +#include "reaction-step.h" +#include "reaction-arrow.h" +#include "reaction-prop.h" +#include "settings.h" +#include "theme.h" +#include "tool.h" +#include "tools.h" +#include "target.h" +#include "window.h" +#include "zoomdlg.h" +#include +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +#endif +#ifndef HAVE_GO_CONF_SYNC +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace OpenBabel; +using namespace std; +using namespace gcu; + +// following code is needed to get file extensions, it as been essentially copied from gnome-vfs +static map > globs; + +static void load_globs_from_dir (char const *directory) +{ + char *file_name = (char*) malloc (strlen (directory) + strlen ("/mime/globs") + 1); + struct stat st; + strcpy (file_name, directory); strcat (file_name, "/mime/globs"); + if (stat (file_name, &st) == 0) + { + FILE *glob_file; + char line[255]; + + glob_file = fopen (file_name, "r"); + + if (glob_file == NULL) + return; + + /* FIXME: Not UTF-8 safe. Doesn't work if lines are greater than 255 chars. + * Blah */ + while (fgets (line, 255, glob_file) != NULL) + { + char *colon; + if (line[0] == '#') + continue; + + colon = strchr (line, ':'); + if (colon == NULL) + continue; + *(colon++) = '\000'; + colon[strlen (colon) -1] = '\000'; + colon = strchr (colon, '.'); + if (colon == NULL) + continue; + colon++; + if (!*colon) + continue; + globs[line].push_back (colon); + } + + fclose (glob_file); + } + free (file_name); +} + +static void load_globs () +{ + const char *xdg_data_home; + const char *xdg_data_dirs; + const char *ptr; + + xdg_data_home = getenv ("XDG_DATA_HOME"); + if (xdg_data_home) + { + load_globs_from_dir (xdg_data_home); + } + else + { + const char *home; + + home = getenv ("HOME"); + if (home != NULL) + { + char *guessed_xdg_home; + + guessed_xdg_home = (char*) malloc (strlen (home) + strlen ("/.local/share/") + 1); + strcpy (guessed_xdg_home, home); + strcat (guessed_xdg_home, "/.local/share/"); + load_globs_from_dir (guessed_xdg_home); + free (guessed_xdg_home); + } + } + + xdg_data_dirs = getenv ("XDG_DATA_DIRS"); + if (xdg_data_dirs == NULL) + xdg_data_dirs = "/usr/local/share/:/usr/share/"; + + ptr = xdg_data_dirs; + + while (*ptr != '\000') + { + const char *end_ptr; + char *dir; + int len; + + end_ptr = ptr; + while (*end_ptr != ':' && *end_ptr != '\000') + end_ptr ++; + + if (end_ptr == ptr) + { + ptr++; + continue; + } + + if (*end_ptr == ':') + len = end_ptr - ptr; + else + len = end_ptr - ptr + 1; + dir = (char*) malloc (len + 1); + strncpy (dir, ptr, len); + dir[len] = '\0'; + load_globs_from_dir (dir); + free (dir); + + ptr = end_ptr; + } +} + +namespace gcp { + +// Objects creation static methods +static Object* CreateAtom () +{ + return new Atom (); +} + +static Object* CreateBond () +{ + return new Bond (); +} + +static Object* CreateMolecule () +{ + return new Molecule (); +} + +static Object* CreateReaction () +{ + return new Reaction (); +} + +static Object* CreateReactant () +{ + return new Reactant (); +} + +static Object* CreateReactionStep () +{ + return new ReactionStep (); +} + +static Object* CreateReactionArrow () +{ + return new ReactionArrow (NULL); +} + +static Object* CreateReactionProp () +{ + return new ReactionProp (); +} + +static Object* CreateMesomery () +{ + return new Mesomery (); +} + +static Object* CreateMesomeryArrow () +{ + return new MesomeryArrow (NULL); +} + +static Object* CreateMesomer () +{ + return new Mesomer (); +} + +static Object* CreateText () +{ + return new Text (); +} + +static Object* CreateFragment () +{ + return new Fragment (); +} + +bool Application::m_bInit = false; +bool Application::m_Have_Ghemical = false; +bool Application::m_Have_InChI = false; + +#ifdef HAVE_GO_CONF_SYNC +static void on_config_changed (GOConfNode *node, gchar const *key, Application *app) +{ + app->OnConfigChanged (node, key); +} +#else +static void on_config_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, Application *app) +{ + app->OnConfigChanged (client, cnxn_id, entry); +} +#endif + +Application::Application (): + gcu::Application ("GChemPaint", DATADIR, "gchempaint", "gchempaint") +{ + m_CurZ = 6; + m_pActiveDoc = NULL; + m_pActiveTool = NULL; + m_NumWindow = 1; + + if (!m_bInit) { + /* Initialize plugins manager */ + gcu::Loader::Init (); + // Check for programs + char *result = NULL, *errors = NULL; + // check for ghemical + m_Have_Ghemical = (g_spawn_command_line_sync ("which ghemical", &result, &errors, NULL, NULL) + && result && strlen (result)); + if (result) { + g_free (result); + result = NULL; + } + if (errors) { + g_free (errors); + errors = NULL; + } + OBConversion Conv; + m_Have_InChI = Conv.FindFormat ("inchi") != NULL || + (g_spawn_command_line_sync ("which main_inchi", &result, &errors, NULL, NULL) + && result && strlen (result)); + if (result) + g_free (result); + if (errors) { + g_free (errors); + errors = NULL; + } + + // Initialize types + Object::AddType ("atom", CreateAtom, AtomType); + Object::AddType ("bond", CreateBond, gcu::BondType); + Object::AddType ("molecule", CreateMolecule, MoleculeType); + Object::AddType ("reaction", CreateReaction, ReactionType); + Object::SetCreationLabel (ReactionType, _("Create a new reaction")); + ReactionStepType = Object::AddType ("reaction-step", CreateReactionStep); + Object::AddType ("reactant", CreateReactant, ReactantType); + Object::AddType ("reaction-arrow", CreateReactionArrow, ReactionArrowType); + ReactionPropType = Object::AddType ("reaction-prop", CreateReactionProp); + MesomerType = Object::AddType ("mesomer", CreateMesomer); + Object::AddType ("mesomery", CreateMesomery, MesomeryType); + Object::SetCreationLabel (MesomeryType, _("Create a new mesomery relationship")); + Object::AddType ("mesomery-arrow", CreateMesomeryArrow, MesomeryArrowType); + Object::AddType ("text", CreateText, TextType); + Object::AddType ("fragment", CreateFragment, FragmentType); + ElectronType = Object::AddType ("electron", NULL); + // Add rules + Object::AddRule ("reaction", RuleMustContain, "reaction-step"); + Object::AddRule ("reaction-step", RuleMustContain, "reactant"); + Object::AddRule ("reactant", RuleMustBeIn, "reaction-step"); + Object::AddRule ("reaction-step", RuleMustBeIn, "reaction"); + Object::AddRule ("reaction", RuleMustContain, "reaction-arrow"); + Object::AddRule ("reaction-arrow", RuleMustBeIn, "reaction"); + Object::AddRule ("reaction-arrow", RuleMayContain, "reaction-prop"); + Object::AddRule ("reaction-prop", RuleMustBeIn, "reaction-arrow"); + Object::AddRule ("reaction-prop", RuleMayContain, "molecule"); + Object::AddRule ("reaction-prop", RuleMayContain, "text"); + Object::AddRule ("reactant", RuleMayContain, "molecule"); + Object::AddRule ("mesomer", RuleMustContain, "molecule"); + Object::AddRule ("mesomer", RuleMustBeIn, "mesomery"); + Object::AddRule ("mesomery", RuleMustContain, "mesomer"); + Object::AddRule ("mesomery", RuleMustContain, "mesomery-arrow"); + Object::AddRule ("mesomery-arrow", RuleMustBeIn, "mesomery"); + + // Create global signal ids + OnChangedSignal = Object::CreateNewSignalId (); + OnDeleteSignal = Object::CreateNewSignalId (); + OnThemeChangedSignal = Object::CreateNewSignalId (); + + /* get the theme style for labels so that tools buttons colors might + be adapted to the current theme */ + GtkWidget *w=gtk_label_new(""); + m_Style = gtk_rc_get_style(w); + gtk_widget_destroy (w); + + // load plugins + Plugin::LoadPlugins (); + m_bInit = true; + } + RadioActions = NULL; + m_entries = 0; + IconFactory = gtk_icon_factory_new (); + set::iterator i = Plugins.begin (), end = Plugins.end (); + while (i != end) (*i++)->Populate (this); + gtk_icon_factory_add_default (IconFactory); + g_object_unref (G_OBJECT (IconFactory)); + XmlDoc = xmlNewDoc ((xmlChar const*) "1.0"); + visible_windows = 0; + load_globs (); + m_SupportedMimeTypes.push_back ("application/x-gchempaint"); + m_WriteableMimeTypes.push_back ("application/x-gchempaint"); + // browse available loaders + map::iterator it; + bool found = Loader::GetFirstLoader (it); + while (found) { + if ((*it).second.supports2D) { + if ((*it).second.read) + AddMimeType (m_SupportedMimeTypes, (*it).first); + if ((*it).second.write) + AddMimeType (m_WriteableMimeTypes, (*it).first); + } + found = Loader::GetNextLoader (it); + } + // test if OpenBabel supports some extra types + TestSupportedType ("chemical/x-cml"); + TestSupportedType ("chemical/x-mdl-molfile"); + TestSupportedType ("chemical/x-pdb"); + TestSupportedType ("chemical/x-xyz"); + TestSupportedType ("chemical/x-ncbi-asn1"); + TestSupportedType ("chemical/x-ncbi-asn1-binary"); + TestSupportedType ("chemical/x-ncbi-asn1-xml"); + // now read extra types declared by the user + char *home = getenv ("HOME"); + if (home) { + string path = home; + path += "/.gchempaint/mime-types"; + char line[255]; + ifstream f (path.c_str ()); + while (!f.fail ()) { + f.getline (line, 255); + if (*line) + TestSupportedType (line); + } + } + +#ifdef HAVE_GO_CONF_SYNC + m_ConfNode = go_conf_get_node (GetConfDir (), GCP_CONF_DIR_SETTINGS); +#else + GError *error = NULL; + m_ConfClient = gconf_client_get_default (); +#endif + GCU_GCONF_GET ("compression", int, CompressionLevel, 0) + GCU_GCONF_GET ("tearable-mendeleiev", bool, TearableMendeleiev, false) + bool CopyAsText; + GCU_GCONF_GET ("copy-as-text", bool, CopyAsText, false) + ClipboardFormats = CopyAsText? GCP_CLIPBOARD_ALL: GCP_CLIPBOARD_NO_TEXT; +#ifdef HAVE_GO_CONF_SYNC + m_NotificationId = go_conf_add_monitor (m_ConfNode, NULL, (GOConfMonitorFunc) on_config_changed, this); +#else + m_NotificationId = gconf_client_notify_add (m_ConfClient, "/apps/gchemutils/paint/settings", (GConfClientNotifyFunc) on_config_changed, this, NULL, NULL); +#endif + // make themes permanent with this as a dummy client + list Names = TheThemeManager.GetThemesNames (); + list ::iterator j, jend = Names.end (); + Theme *pTheme; + m_Dummy = new Object (0); + for (j = Names.begin (); j != jend; j++) { + pTheme = TheThemeManager.GetTheme (*j); + pTheme->AddClient (m_Dummy); + } +} + +Application::~Application () +{ + map::iterator tool = m_Tools.begin(), endtool = m_Tools.end(); + for (; tool!= endtool; tool++) + delete (*tool).second; + m_Tools.clear (); + if (XmlDoc) + xmlFreeDoc (XmlDoc); + m_SupportedMimeTypes.clear (); + // remove themes permanency with this as a dummy client + list Names = TheThemeManager.GetThemesNames (); + list ::iterator j, jend = Names.end (); + Theme *pTheme; + for (j = Names.begin (); j != jend; j++) { + pTheme = TheThemeManager.GetTheme (*j); + pTheme->RemoveClient (m_Dummy); + } + delete m_Dummy; +#ifdef HAVE_GO_CONF_SYNC + go_conf_remove_monitor (m_NotificationId); + go_conf_free_node (m_ConfNode); + m_ConfNode = NULL; +#else + gconf_client_notify_remove (m_ConfClient, m_NotificationId); + g_object_unref (m_ConfClient); + m_ConfClient = NULL; +#endif + TheThemeManager.Shutdown (); +} + +void Application::ActivateTool (const string& toolname, bool activate) +{ + if (m_Tools[toolname]) { + if (activate) { + if (m_pActiveTool != m_Tools[toolname]) { + if (m_pActiveTool) + m_pActiveTool->Activate (false); + m_pActiveTool = m_Tools[toolname]; + m_pActiveTool->Activate (true); + GtkToggleToolButton* button = (GtkToggleToolButton*) ToolItems[toolname]; + if (button && !gtk_toggle_tool_button_get_active (button)) + gtk_toggle_tool_button_set_active (button, true); + } + } else { + if (m_pActiveTool == m_Tools[toolname]) + m_pActiveTool = NULL; + m_Tools[toolname]->Activate (false); + } + } +} + +void Application::ClearStatus () +{ + if (m_pActiveDoc) { + Window *Win = m_pActiveDoc->GetWindow (); + if (Win) + Win->ClearStatus (); + } +} + +void Application::SetStatusText (const char* text) +{ + if (m_pActiveDoc) { + Window *Win = m_pActiveDoc->GetWindow (); + if (Win) + Win->SetStatusText (text); + } +} + +void Application::OnSaveAs () +{ + FileChooser (this, true, m_WriteableMimeTypes, m_pActiveDoc); +} + +enum { + CHEMISTRY, + SVG, + EPS, + PDF, + PS, + PIXBUF +}; + +bool Application::FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, gcu::Document *Doc) +{ + const gchar* ext; + Document *pDoc = static_cast (Doc); + if (!filename || !strlen(filename) || filename[strlen(filename) - 1] == '/') + { + GtkWidget* message = gtk_message_dialog_new (window, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + _("Please enter a file name,\nnot a directory")); + gtk_window_set_icon_name (GTK_WINDOW (message), "gchempaint"); + gtk_dialog_run (GTK_DIALOG (message)); + gtk_widget_destroy (message); + return true; + } + int file_type = -1; + int n = strlen (filename), i = n - 1; + char const *pixbuf_type = NULL; + string filename2 = filename; + while ((i > 0) && (filename[i] != '.') && (filename[i] != '/')) i--; + if (filename[i] == '/') i = 0; + ext = (i > 0)? filename + i + 1: NULL; + if (!mime_type) // to be really sure we don't crash + mime_type = "application/x-gchempaint"; + list::iterator it, itend = m_SupportedMimeTypes.end (); + for (it = m_SupportedMimeTypes.begin (); it != itend; it++) + if (*it == mime_type) { + file_type = CHEMISTRY; + break; + } + if (file_type != CHEMISTRY) { + if (!strcmp (mime_type, "image/svg+xml")) + file_type = SVG; + else if (!strcmp (mime_type, "image/x-eps")) + file_type = EPS; + else if (!strcmp (mime_type, "application/pdf")) + file_type = PDF; + else if (!strcmp (mime_type, "application/ps")) + file_type = PS; + else if ((pixbuf_type = GetPixbufTypeName (filename2, mime_type))) { + file_type = PIXBUF; + if (!ext) { + filename = filename2.c_str (); + i = strlen (filename) - 1; + while ((i > 0) && (filename[i] != '.') && (filename[i] != '/')) i--; + if (filename[i] == '/') i = 0; + ext = (i > 0)? filename + i + 1: NULL; + } + } + } + if (file_type < 0 || (!bSave && (file_type > CHEMISTRY))) { + char *unescaped = g_uri_unescape_string (filename, NULL); + char *mess = g_strdup_printf (_("Sorry, format %s not supported!\nFailed to load %s."), mime_type, unescaped); + g_free (unescaped); + GtkWidget* message = gtk_message_dialog_new (window, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + mess); + gtk_dialog_run (GTK_DIALOG (message)); + g_free (mess); + gtk_widget_destroy (message); + return true; + } + list &exts = globs[mime_type]; + bool err; + GFile *file; + if (bSave) { + char const *default_ext = (exts.size ())? exts.front ().c_str (): NULL; + if (ext) { + list::iterator cur, end = exts.end (); + for (cur = exts.begin (); cur != end; cur++) + if (*cur != ext) { + default_ext = ext; + break; + } + if (default_ext && strcmp (ext, default_ext)) + ext = NULL; + } + if (default_ext && !ext) + filename2 += string(".") + default_ext; + file = g_file_new_for_uri (filename2.c_str ()); + err = g_file_query_exists (file, NULL); + gint result = GTK_RESPONSE_YES; + if (err) { + char *unescaped = g_uri_unescape_string (filename2.c_str (), NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), unescaped); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + } + if (result == GTK_RESPONSE_YES) { + // destroy the old file if needed + if (err) { + GError *error = NULL; + g_file_delete (file, NULL, &error); + if (error) { + char *unescaped = g_uri_unescape_string (filename2.c_str (), NULL); + gchar * message = g_strdup_printf (_("Error while processing %s:\n%s"), unescaped, error->message); + g_free (unescaped); + g_error_free (error); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + g_object_unref (file); + return false; + } + } + switch (file_type) { + case SVG: + m_pActiveDoc->ExportImage (filename2, "svg"); + break; + case EPS: + m_pActiveDoc->ExportImage (filename2, "eps"); + break; + case PDF: + m_pActiveDoc->ExportImage (filename2, "pdf"); + break; + case PS: + m_pActiveDoc->ExportImage (filename2, "ps"); + break; + case PIXBUF: + m_pActiveDoc->ExportImage (filename2, pixbuf_type, GetImageResolution ()); + break; + default: + if (Save (filename2, mime_type, pDoc)); + else if (!strcmp (mime_type, "application/x-gchempaint")) + SaveGcp (filename2, pDoc); + else + SaveWithBabel (filename2, mime_type, pDoc); + } + } + g_object_unref (file); + } else { //loading + file = g_file_new_for_uri (filename); + err = g_file_query_exists (file, NULL); + g_object_unref (file); + if (err) { + if (!ext) { + list::iterator cur, end = exts.end (); + for (cur = exts.begin (); cur != end; cur++) { + filename2 = string (filename) + "." + *cur; + file = g_file_new_for_uri (filename2.c_str ()); + err = !g_file_query_exists (file, NULL); + g_object_unref (file); + if (!err) + break; + } + } + if (err) { + filename2 = filename; + } + } + bool create = false; + if (!pDoc || !pDoc->GetEmpty () || pDoc->GetDirty ()) { + create = true; + OnFileNew (); + pDoc = m_pActiveDoc; + } + pDoc->SetFileName(filename2, mime_type); + if (Load (filename2, mime_type, pDoc)) { + pDoc->GetView ()->AddObject (pDoc); + pDoc->GetView ()->Update (pDoc); + pDoc->GetView ()->EnsureSize (); + if (pDoc->GetWindow ()) + pDoc->GetWindow ()->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", pDoc->HasChildren ()); + } else { + if (create) { + pDoc->GetWindow ()->Destroy ();; + pDoc = NULL; + while (gdk_events_pending ()) + gtk_main_iteration (); + } + if (!strcmp (mime_type, "application/x-gchempaint")) + OpenGcp (filename2, pDoc); + else + OpenWithBabel (filename2, mime_type, pDoc); + } + } + return false; +} + +void Application::SaveWithBabel (string const &filename, const gchar *mime_type, Document* pDoc) +{ + pDoc->SetFileName (filename, mime_type); + pDoc->Save (); + GtkRecentData data; + data.display_name = (char*) pDoc->GetTitle (); + data.description = NULL; + data.mime_type = (char*) mime_type; + data.app_name = const_cast ("gchempaint"); + data.app_exec = const_cast ("gchempaint %u"); + data.groups = NULL; + data.is_private = FALSE; + gtk_recent_manager_add_full (GetRecentManager (), filename.c_str (), &data); +} + +void Application::OpenWithBabel (string const &filename, const gchar *mime_type, Document* pDoc) +{ + string old_num_locale; + bool bNew = (pDoc == NULL || !pDoc->GetEmpty () || pDoc->GetDirty ()); + GFile *file; + GFileInfo *info = NULL; + GError *error = NULL; + bool result = true, read_only = false; + gsize size = 0; + try { + if (!filename.length ()) + throw (int) 0; + file = g_file_new_for_uri (filename.c_str ()); + info = g_file_query_info (file, + G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE","G_FILE_ATTRIBUTE_STANDARD_SIZE, + G_FILE_QUERY_INFO_NONE, NULL, &error); + if (error) { + g_warning ("GIO error: %s", error->message); + g_error_free (error); + if (info) + g_object_unref (info); + g_object_unref (file); + return; + } + size = g_file_info_get_size (info); + read_only = !g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE); + g_object_unref (info); + if (bNew) { + OnFileNew (); + pDoc = m_pActiveDoc; + } + char *buf = new char[size + 1]; + GInputStream *input = G_INPUT_STREAM (g_file_read (file, NULL, &error)); + gsize n = 0; + while (n < size) { + n += g_input_stream_read (input, buf, size, NULL, &error); + if (error) { + g_message ("GIO could not read the file: %s", error->message); + g_error_free (error); + delete [] buf; + g_object_unref (input); + g_object_unref (file); + return; + } + } + g_object_unref (input); + g_object_unref (file); + buf[size] = 0; + istringstream iss (buf); + old_num_locale = setlocale (LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); + OBMol Mol; + OBConversion Conv; + OBFormat* pInFormat = Conv.FormatFromExt (filename.c_str ()); + if (pInFormat == NULL) { + delete [] buf; + throw 1; + } + Conv.SetInFormat (pInFormat); + while (!iss.eof () && Conv.Read (&Mol, &iss)) { + result = pDoc->ImportOB(Mol); + Mol.Clear (); + if (!result) + break; + } + setlocale (LC_NUMERIC, old_num_locale.c_str ()); + delete [] buf; + if (!result) + { + if (bNew) + pDoc->GetWindow ()->Destroy (); + throw (int) 2; + } + pDoc->SetFileName (filename, mime_type); + pDoc->SetReadOnly (read_only); + double l = pDoc->GetMedianBondLength (); + if (l > 0.) { + double r = pDoc->GetBondLength () / l; + if (fabs (r - 1.) > .0001) { + Matrix2D m (r, 0., 0., r); + // FIXME: this would not work for reactions + pDoc->Transform2D (m, 0., 0.); + } + } + View *pView = pDoc->GetView (); + pView->Update (pDoc); + pDoc->Update (); + pView->EnsureSize (); + Window *win = pDoc->GetWindow (); + if (win) + win->SetTitle (pDoc->GetTitle ()); + GtkRecentData data; + data.display_name = (char*) pDoc->GetTitle (); + data.description = NULL; + data.mime_type = (char*) mime_type; + data.app_name = const_cast ("gchempaint"); + data.app_exec = const_cast ("gchempaint %u"); + data.groups = NULL; + data.is_private = FALSE; + gtk_recent_manager_add_full (GetRecentManager (), filename.c_str (), &data); + } + catch (int num) + { + gchar *mess = NULL; + GtkWidget* message; + switch (num) + { + case 0: + mess = _("No filename"); + break; + case 1: + mess = _("Could not open file\n%s"); + break; + case 2: + mess = _("%s: parse error."); + break; + default: + throw (num); //this should not occur + } + char *unescaped = g_uri_unescape_string (filename.c_str (), NULL); + message = gtk_message_dialog_new (NULL, (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, mess, unescaped, NULL); + g_free (unescaped); + gtk_window_set_icon_name (GTK_WINDOW (message), "gchempaint"); + g_signal_connect_swapped (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (message)); + gtk_widget_show(message); + } +} + +void Application::SaveGcp (string const &filename, Document* pDoc) +{ + pDoc->SetFileName (filename, "application/x-gchempaint"); + pDoc->Save (); + GtkRecentData data; + data.display_name = (char*) pDoc->GetTitle (); + data.description = NULL; + data.mime_type = const_cast ("application/x-gchempaint"); + data.app_name = const_cast ("gchempaint"); + data.app_exec = const_cast ("gchempaint %u"); + data.groups = NULL; + data.is_private = FALSE; + gtk_recent_manager_add_full (GetRecentManager (), filename.c_str (), &data); +} + +static int cb_vfs_to_xml (GInputStream *input, char* buf, int nb) +{ + GError *error = NULL; + int n = g_input_stream_read (input, buf, nb, NULL, &error); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + } + return n; +} + +void Application::OpenGcp (string const &filename, Document* pDoc) +{ + xmlDocPtr xml = NULL; + char *old_num_locale, *old_time_locale; + GError *error = NULL; + GFileInfo *info = NULL; + bool create = false; + try + { + if (!filename.length ()) + throw (int) 0; + + // try opening with write access to see if it is readonly + // use xmlReadIO for non local files. + GFile *file = g_file_new_for_uri (filename.c_str ()); + info = g_file_query_info (file, + G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, + G_FILE_QUERY_INFO_NONE, NULL, &error); + if (error) { + g_object_unref (file); + g_message ("GIO error: %s\n", error->message); + g_error_free (error); + throw 1; + } + GInputStream *input = G_INPUT_STREAM (g_file_read (file, NULL, &error)); + if (error) { + g_object_unref (file); + g_message ("GIO error: %s\n", error->message); + g_error_free (error); + throw 1; + } + xmlKeepBlanksDefault (1); // to be sure we don't loose significant spaces. + if (!(xml = xmlReadIO ((xmlInputReadCallback) cb_vfs_to_xml, + (xmlInputCloseCallback) g_input_stream_close, input, filename.c_str (), NULL, 0))) { + g_object_unref (file); + throw 1; + } + g_object_unref (file); + if (xml->children == NULL) + throw (int) 2; + if (strcmp((char*)xml->children->name, "chemistry")) + throw (int) 3; //FIXME: that could change when a dtd is available + old_num_locale = g_strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + old_time_locale = g_strdup(setlocale(LC_TIME, NULL)); + setlocale(LC_TIME, "C"); + if (!pDoc || !pDoc->GetEmpty () || pDoc->GetDirty ()) { + create = true; + OnFileNew (); + pDoc = m_pActiveDoc; + } + pDoc->SetFileName(filename, "application/x-gchempaint"); + bool result = pDoc->Load(xml->children); + setlocale(LC_NUMERIC, old_num_locale); + g_free(old_num_locale); + setlocale(LC_TIME, old_time_locale); + g_free(old_time_locale); + if (!result) { + if (create) + pDoc->GetWindow ()->Destroy (); + throw (int) 4; + } + pDoc->SetReadOnly (!g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)); + g_object_unref (info); + xmlFreeDoc(xml); + GtkRecentData data; + data.display_name = (char*) pDoc->GetTitle (); + data.description = NULL; + data.mime_type = const_cast ("application/x-gchempaint"); + data.app_name = const_cast ("gchempaint"); + data.app_exec = const_cast ("gchempaint %u"); + data.groups = NULL; + gtk_recent_manager_add_full (GetRecentManager (), filename.c_str (), &data); + } + catch (int num) + { + if (num > 1) + xmlFreeDoc(xml); + if (info) + g_object_unref (info); + gchar *mess = NULL; + GtkWidget* message; + switch (num) + { + case 0: + mess = _("No filename"); + break; + case 1: + mess = _("Could not load file\n%s"); + break; + case 2: + mess = _("%s: invalid xml file.\nTree is empty?"); + break; + case 3: + mess = _("%s: invalid file format."); + break; + case 4: + mess = _("%s: parse error."); + break; + default: + throw (num); //this should not occur + } + char *unescaped = g_uri_unescape_string (filename.c_str (), NULL); + message = gtk_message_dialog_new (NULL, (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, mess, unescaped, NULL); + g_free (unescaped); + gtk_window_set_icon_name (GTK_WINDOW (message), "gchempaint"); + g_signal_connect_swapped (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (message)); + gtk_widget_show(message); + } +} + +void Application::InitTools() +{ + map::iterator i = m_Tools.begin (), end = m_Tools.end (); + for (; i != end; i++) + if ((*i).second) + (*i).second->Activate ((*i).first == "Select"); +} + +void Application::OnSaveAsImage () +{ + if (!m_pActiveDoc) + return; + list l; + map::iterator i, end = m_SupportedPixbufFormats.end (); + for (i = m_SupportedPixbufFormats.begin (); i != end; i++) + l.push_front ((*i).first.c_str ()); + l.push_front ("application/ps"); + l.push_front ("application/pdf"); + l.push_front ("image/x-eps"); + l.push_front ("image/svg+xml"); + FileChooser (this, true, l, m_pActiveDoc, _("Save as image"), GetImageResolutionWidget ()); +} + +void Application::Zoom (double zoom) +{ + View *pView = m_pActiveDoc->GetView (); + // authorized zooms: 20% to 800% all other values will open the zoom dialog. + if (zoom >= 0.2 && zoom <= 8.) + pView->Zoom (zoom); + else { + Dialog *pDialog = GetDialog ("Zoom"); + if (pDialog) + gtk_window_present (pDialog->GetWindow ()); + else + new ZoomDlg (m_pActiveDoc); + } +} + +static void on_tool_changed (GtkAction *action, GtkAction *current, Application* App) +{ + App->OnToolChanged (current); +} + +void Application::OnToolChanged (GtkAction *current) +{ + char const *name = gtk_action_get_name (current); + if (m_pActiveTool) { + if (m_pActiveTool->GetName () == name) + return; + if (!m_pActiveTool->Activate(false)) { + GSList *list = gtk_radio_action_get_group (GTK_RADIO_ACTION (current)); + while (list) { + if (m_pActiveTool->GetName () == gtk_action_get_name ((GtkAction *) list->data)) { + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (list->data), true); + break; + } + list = list->next; + } + return; + } + } + m_pActiveTool = m_Tools[gtk_action_get_name (current)]; + Tools *ToolsBox = dynamic_cast (GetDialog ("tools")); + if (ToolsBox) + ToolsBox->OnSelectTool (m_pActiveTool); + if (m_pActiveTool) + m_pActiveTool->Activate(true); +} + +void Application::BuildTools () throw (std::runtime_error) +{ + Tools *ToolsBox = new Tools (this); + map::iterator i, iend = ToolbarNames.end (); + list::iterator j, jend = UiDescs.end (); + string s; + GError *error = NULL; + GtkUIManager *ToolsManager = gtk_ui_manager_new (); + ToolsBox->SetUIManager (ToolsManager); + GtkActionGroup *action_group = gtk_action_group_new ("Tools"); + gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); + gtk_action_group_add_radio_actions (action_group, RadioActions, m_entries, 0, G_CALLBACK (on_tool_changed), this); + gtk_ui_manager_insert_action_group (ToolsManager, action_group, 0); + for (j = UiDescs.begin (); j != jend; j++) + if (!gtk_ui_manager_add_ui_from_string (ToolsManager, *j, -1, &error)) { + string what = string ("building user interface failed: ") + error->message; + g_error_free (error); + throw runtime_error (what); + } + for (i = ToolbarNames.begin (); i != iend; i++) { + s = "ui/"; + s += (*i).second; + ToolsBox->AddToolbar (s); + } + g_object_unref (ToolsManager); + m_pActiveTool = m_Tools["Select"]; + if (m_pActiveTool) + m_pActiveTool->Activate(true); + ToolsBox->OnSelectTool (m_pActiveTool); + ToolsBox->OnElementChanged (m_CurZ); +} + +void Application::ShowTools (bool visible) +{ + Tools *ToolsBox = dynamic_cast (GetDialog ("tools")); + if (!ToolsBox) { + if (visible) + BuildTools (); + } else + ToolsBox->Show (visible); +} + +void Application::AddActions (GtkRadioActionEntry const *entries, int nb, char const *ui_description, IconDesc const *icons) +{ + static int cur_entry = 1; + if (nb > 0) { + if (m_entries) + RadioActions = g_renew (GtkRadioActionEntry, RadioActions, m_entries + nb); + else + RadioActions = g_new (GtkRadioActionEntry, nb); + memcpy (RadioActions + m_entries, entries, nb * sizeof (GtkRadioActionEntry)); + for (int i = 0; i < nb; i++) + if (strcmp (RadioActions[i + m_entries].name, "Select")) + RadioActions[i + m_entries].value = cur_entry++; + else + RadioActions[i + m_entries].value = 0; + m_entries += nb; + } + if (ui_description) + UiDescs.push_back (ui_description); + if (icons) { + GtkIconSet *set; + GtkIconSource *src; + while (icons->name) { + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_inline (-1, icons->data_24, false, NULL); + set = gtk_icon_set_new (); + src = gtk_icon_source_new (); + gtk_icon_source_set_size_wildcarded (src, true); + gtk_icon_source_set_state_wildcarded (src, false); + gtk_icon_source_set_direction_wildcarded (src, true); + + for (int c = 0; c < 5; c++) { + GdkPixbuf *icon = gdk_pixbuf_copy (pixbuf); + // set the pixbuf color to the corresponding style for the style + unsigned char red, blue, green; + red = m_Style->fg[c].red >> 8; + green = m_Style->fg[c].green >> 8; + blue = m_Style->fg[c].blue >> 8; + unsigned char *line, *cur; + line = gdk_pixbuf_get_pixels (icon); + int i, j, rows, cols, rowstride; + cols = gdk_pixbuf_get_width (icon); + rows = gdk_pixbuf_get_height (icon); + rowstride = gdk_pixbuf_get_rowstride (icon); + for (i = 0; i < rows; i++) { + cur = line; + line += rowstride; + for (j = 0; j < cols; j++) { + cur[0] = cur[0] ^ red; + cur[1] = cur[1] ^ green; + cur[2] = cur[2] ^ blue; + cur += 4; + } + } + gtk_icon_source_set_pixbuf (src, icon); + gtk_icon_source_set_state (src, static_cast (c)); + gtk_icon_set_add_source (set, src); /* copies the src */ + g_object_unref (icon); + } + + gtk_icon_source_free (src); + gtk_icon_factory_add (IconFactory, icons->name, set); /* keeps reference to set */ + gtk_icon_set_unref (set); + g_object_unref (pixbuf); + icons++; + } + } +} + +void Application::RegisterToolbar (char const *name, int index) +{ + if (ToolbarNames[index] == "") + ToolbarNames[index] = name; +} + +void Application::AddTarget (Target *target) +{ + m_Targets.insert (target); + NotifyIconification (false); +} + +void Application::DeleteTarget (Target *target) +{ + m_Targets.erase (target); + ShowTools (false); +} + +void Application::NotifyIconification (bool iconified) +{ + if (iconified) { + ShowTools (false); + } +} + +void Application::NotifyFocus (bool has_focus, Target *target) +{ + if (target) { + m_pActiveTarget = target; + m_pActiveDoc = target->GetDocument (); + m_pActiveTool->Activate (); + if (has_focus) + ShowTools (true); + } +} + +void Application::CloseAll () +{ + while (!m_Targets.empty ()) + if (!(*m_Targets.begin ())->Close ()) + return; +} + +void Application::ActivateWindowsActionWidget (const char *path, bool activate) +{ + std::set::iterator i, iend = m_Targets.end (); + for (i = m_Targets.begin (); i != iend; i++) { + Window *window = dynamic_cast (*i); + if (window) + window->ActivateActionWidget (path, activate); + } +} + +#ifdef HAVE_GO_CONF_SYNC +void Application::OnConfigChanged (GOConfNode *node, gchar const *name) +{ +#else +void Application::OnConfigChanged (GConfClient *client, guint cnxn_id, GConfEntry *entry) +{ + if (client != m_ConfClient) + return; // we might want an error message? + if (cnxn_id != m_NotificationId) + return; // we might want an error message? +#endif + GCU_UPDATE_KEY ("compression", int, CompressionLevel, {}) + GCU_UPDATE_KEY ("tearable-mendeleiev", bool, TearableMendeleiev, + { + Tools *ToolsBox = dynamic_cast (GetDialog ("tools")); + if (ToolsBox) + ToolsBox->Update (); + }) + bool CopyAsText; + GCU_UPDATE_KEY ("copy-as-text", bool, CopyAsText, ClipboardFormats = CopyAsText?GCP_CLIPBOARD_ALL: GCP_CLIPBOARD_NO_TEXT;) +} + +void Application::AddMimeType (list &l, string const& mime_type) +{ + list::iterator i, iend = l.end (); + for (i = l.begin (); i != iend; i++) + if (*i == mime_type) + break; + if (i == iend) + l.push_back (mime_type); + else + g_warning ("Duplicate mime type: %s", mime_type.c_str ()); +} + +void Application::TestSupportedType (char const *mime_type) +{ + OBFormat *f = OBConversion::FormatFromMIME (mime_type); + if (f != NULL) { + AddMimeType (m_SupportedMimeTypes, mime_type); + if (!(f->Flags () & NOTWRITABLE)) + AddMimeType (m_WriteableMimeTypes, mime_type); + } +} + +list &Application::GetExtensions(string &mime_type) +{ + return globs[mime_type]; +} + +void Application::OnThemeNamesChanged () +{ + NewFileDlg *dlg = dynamic_cast (GetDialog ("newfile")); + if (dlg) + dlg->OnThemeNamesChanged (); + set ::iterator i, end = m_Docs.end (); + for (i = m_Docs.begin (); i != end; i++) + dynamic_cast (*i)->OnThemeNamesChanged (); +} + +void Application::AddMenuCallback (BuildMenuCb cb) +{ + m_MenuCbs.push_back (cb); +} + +void Application::BuildMenu (GtkUIManager *manager) +{ + list::iterator i, end = m_MenuCbs.end (); + for (i = m_MenuCbs.begin (); i != end; i++) + (*i) (manager); +} + +struct option_data { + GOptionEntry const *entries; + char const *translation_domain; +}; + +void Application::RegisterOptions (GOptionEntry const *entries, char const *translation_domain) +{ + struct option_data d; + d.entries = entries; + d.translation_domain = translation_domain; + m_Options.push_back (d); +} + +void Application::AddOptions (GOptionContext *context) +{ + list::iterator i, end = m_Options.end (); + for (i = m_Options.begin (); i != end; i++) + g_option_context_add_main_entries (context, (*i).entries, (*i).translation_domain); +} + +gcu::Document *Application::CreateNewDocument () +{ + return new Document (this, true, NULL); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/application.h gnome-chemistry-utils-0.10.9/libs/gcp/application.h --- gnome-chemistry-utils-0.8.6/libs/gcp/application.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/application.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,510 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * application.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_APPLICATION_H +#define GCHEMPAINT_APPLICATION_H + +#include +#include +#include +#ifdef HAVE_GO_CONF_SYNC +# ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +# else +# include +# endif +#else +# include +#endif +#include +#include +#include +#include +#include + +/*!\file*/ +/*!\namespace gcp +\brief GChemPaint specific C++ classes + +The namespace used for the C++ classes used by GChemPaint. +*/ + +namespace gcp { + +/*!\struct IconDesc +Structure to use as icon descriptors for tools. +See gcp::Application::AddActions() for information about its use. +*/ +typedef struct +{ +/*! +The name of the icon. +*/ + char const *name; +/*! +The icon as in line bytes. +*/ + unsigned char const *data_24; +} IconDesc; + +class Target; +class NewFileDlg; +class Tool; +class Document; +struct option_data; +typedef void (*BuildMenuCb) (GtkUIManager *UIManager); + +/*!\class Application gcp/application.h +\brief GChemPaint application base class. + +This class is used to represent a GChemPaint application. +It is a virtual class since at least one method is pure virtual (gcp::Application::GetWindow) +*/ +class Application: public gcu::Application +{ +public: +/*! +The default constructor. +*/ + Application (); +/*! +The destructor. +*/ + virtual ~Application (); + +/*! +@param toolname the name of the tool. +@param activate whether to activate or deactivate. + +Activates or deactivates a tool in the GChempaint tool box. + +To activate the selection tool: +\code + ActivateTool ("Select", true); +\endcode +*/ + void ActivateTool (const std::string& toolname, bool activate); + +/*! +@param path the path to activate. +@param activate whether to activate or deactivate. + +Activates or deactivates the menu item corresponding to \a path according +to the value of \a activate. + +To deactivate the "Paste" menu item, use: +\code + ActivateWindowsActionWidget ("/MainMenu/EditMenu/Paste", false); +\endcode + +Calls gcp::Window::ActivateActionWidget. +*/ + void ActivateWindowsActionWidget (const char *path, bool activate); +/*! +Clears the message in the status bar. +*/ + virtual void ClearStatus (); +/*! +@param text a text to display + +Displays \a text in the status bar. +*/ + virtual void SetStatusText (const char* text); +/*! +This pure virtual method must be overloaded by derived classes. +@return the current active top level window if any, or NULL. +*/ + virtual GtkWindow* GetWindow () = 0; +/*! +@return the active tool. +*/ + Tool* GetActiveTool () {return m_pActiveTool;} +/*! +@return the active document. +*/ + gcp::Document* GetActiveDocument () {return m_pActiveDoc;} +/*! +@param pDoc the document becoming active. + +Sets the new active document. +*/ + void SetActiveDocument (gcp::Document* pDoc) {m_pActiveDoc = pDoc;} +/*! +@param name the name of a tool +@return the Tool corresponding to \a name. +*/ + Tool* GetTool (const std::string& name) {return m_Tools[name];} +/*! +@param toolname the name of a new tool. +@param tool the new Tool. + +Adds a new tool to the tools box. This method is called from the Tool +constructor. +*/ + void SetTool (const std::string& toolname, Tool* tool) {m_Tools[toolname] = tool;} +/*! +@param name the name of a tool +@return the GtkWidget corresponding to the Tool named \a name. +*/ + GtkWidget* GetToolItem(const std::string& name) {return ToolItems[name];} +/*! +@param name the name of a new tool. +@param w a GtkWidget. + +Associates \a w to the Tool named \a name. SetTool() will return this widget +when its argument is \a name. +*/ + void SetToolItem (const std::string& name, GtkWidget* w) {ToolItems[name] = w;} +/*! +@param Z the new current atomic number. + +Sets the new current atomic number. This number is used for new atoms. +*/ + void SetCurZ (int Z) {m_CurZ = Z;} +/*! +@return the current atomic number. +*/ + int GetCurZ () {return m_CurZ;} +/*! +Open the file save as dialog to save the current document with a new name. +*/ + void OnSaveAs (); +/*! +@param filename the URI of the file to save or open. +@param mime_type the mime type. +@param bSave true when saving and false when opening. +@param window a parent GtkWindow which is used for messabe boxes if any. +@param pDoc a document (might be NULL when loading. + +Callback called when the user clicks on the Save or Open button in the file +chooser to process the file. +@return false on success, true otherwise. +*/ + bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, gcu::Document *pDoc = NULL); +/*! +@param filename the URI of the file to save. +@param mime_type the mime type. +@param pDoc the document to save. + +Saves the active document using the Openbabel library. +*/ + void SaveWithBabel (std::string const &filename, const gchar *mime_type, gcp::Document* pDoc); +/*! +@param filename the URI of the file to load. +@param mime_type the mime type. +@param pDoc a document or NULL. + +Loads a document using the Openbabel library. +*/ + void OpenWithBabel (std::string const &filename, const gchar *mime_type, gcp::Document* pDoc); +/*! +@param filename the URI of the file to save. +@param pDoc the document to save. + +Saves the active document in the native GChemPaint format. +*/ + void SaveGcp (std::string const &filename, gcp::Document* pDoc); +/*! +@param filename the URI of the file to load. +@param pDoc a document or NULL. + +Loads a GChemPaint document. +*/ + void OpenGcp (std::string const &filename, gcp::Document* pDoc); +/*! +@return a xmlDocPtr used for some undo/redo related operations. The text +tools use it. +*/ + xmlDocPtr GetXmlDoc () {return XmlDoc;} +/*! +Saves the active view as an image. +*/ + void OnSaveAsImage (); +/*! +@return true if ghemical is usable. +*/ + bool HaveGhemical () {return m_Have_Ghemical;} +/*! +@return true if InChIs can be evaluated for molecules. +*/ + bool HaveInChI () {return m_Have_InChI;} +/*! +@return the number of opened documents. +*/ + int GetDocsNumber () {return m_Docs.size ();} +/*! +@param zoom the new zoom level. + +Sets the zoom level for the active document window. +*/ + void Zoom (double zoom); +/*! +@param entries an array of GtkRadioActionEntry structures. +@param nb the number of entries. +@param ui_description an xml like text describing the user interface. +@param icons an array of IconDesc structures for the icons used by the buttons. + +Adds new buttons in the tools box. The code used in the selection plugin is: +\code +static gcp::IconDesc icon_descs[] = { + {"gcp_Selection", gcp_selection_24}, + {"gcp_Eraser", gcp_eraser_24}, + {NULL, NULL} +}; + +static GtkRadioActionEntry entries[] = { + { "Select", "gcp_Selection", N_("Select"), NULL, + N_("Select one or more objects"), + 0 }, + { "Erase", "gcp_Eraser", N_("Erase"), NULL, + N_("Eraser"), + 0 } +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +""; + +void gcpSelectionPlugin::Populate (gcp::Application* App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + App->RegisterToolbar ("SelectToolbar", 0); + new gcpSelectionTool (App); + new gcpEraserTool (App); + App->ActivateTool ("Select", true); +} +\endcode +*/ + void AddActions (GtkRadioActionEntry const *entries, int nb, char const *ui_description, IconDesc const *icons); +/*! +@param name the name of the toolbar. +@param index the rank of the toolbar in the toolbox. + +Adds a new toolbar to the tools box. See the documentation of +gcp::Application::AddActions() for a case use. +*/ + void RegisterToolbar (char const *name, int index); +/*! +@param current the GtkAction for the activated tool. + +Call by the framework when the active tool changed. +*/ + void OnToolChanged (GtkAction *current); +/*! +@param target the Target to add. + +Adds a Target to the list of known Targets and displays the tools box next to +the Target. +*/ + void AddTarget (Target *target); +/*! +@param target the Target to delete. + +Deletes a Target from the list of known Targets. The tools box will be hidden +if no Target remains active. +*/ + void DeleteTarget (Target *target); +/*! +@param iconified whether the currently active Target is iconified or not. + +If \a iconified is true, the tools box will be hidden if no Target remains +active, otherwise it will be displayed next to the active Target. +*/ + void NotifyIconification (bool iconified); +/*! +@param has_focus whether the Target has focus or not. +@param target the Target for which the event occured. + +Shows the tools box next to \a target if \a has_focus is true and if \a target +is not NULL. +*/ + void NotifyFocus (bool has_focus, Target *target = NULL); +/*! +Closes all open documents and ends the application. +*/ + void CloseAll (); +/*! +@return a list of supported mime types. +*/ + std::list &GetSupportedMimeTypes () {return m_SupportedMimeTypes;} +#ifdef HAVE_GO_CONF_SYNC +/*! +@param node the GONode which changed. +@param name the name of the key. + +Called by the framework when the configuration entry has changed to update a +running application preferences if the system allows such callbacks. +*/ + void OnConfigChanged (GOConfNode *node, gchar const *name); +#else +/*! +@param client a GConfClient. +@param cnxn_id the id returned by gconf_client_notify_add. +@param entry the entry which changed. + +Called by the framework when the configuration entry has changed to update a +running application preferences. +*/ + void OnConfigChanged (GConfClient *client, guint cnxn_id, GConfEntry *entry); +#endif +/*! +@param mime_type a mime type. +@return the list of file name extensions corresponding to the mime type. +*/ + std::list &GetExtensions(std::string &mime_type); + +/*! +Called by the framework after a change of a theme name. Ensure evrything is +correctly updated. +*/ + void OnThemeNamesChanged (); + +/*! +@param cb: the BuildMenuCb callback to call when building the menu. + +adds a callback for adding entries to the windows menus. +*/ + void AddMenuCallback (BuildMenuCb cb); + +/*! +@param manager: the GtkUIManager to populate. + +Populates the user interface by calling all callbacks registered +with AddMenuCallback. +*/ + void BuildMenu (GtkUIManager *manager); + +/*! +@param entries: the entries to register. +@param translation_domain: the entries to register. + +Adds new command line options. Typically called from a plugin. The new +options are added to the main group. +*/ + void RegisterOptions (GOptionEntry const *entries, char const *translation_domain = GETTEXT_PACKAGE); + +/*! +@param context: a GOptionContext + +Adds all registered options to the context. This should be called once +just after creating the application and before parsing options. +*/ + void AddOptions (GOptionContext *context); + +/*! +Creates a new document using the default theme. +@return the newly created document. +*/ + gcu::Document *CreateNewDocument (); + + // virtual menus actions: +/*! +@param Theme a gcp::Theme or NULL. + +Creates a new document using the ginev theme or the default theme if +\a Theme is NULL. This method must be overloaded by derived classes since +it is pure virtual. +*/ + virtual void OnFileNew (char const *Theme = NULL) = 0; + +protected: +/*! +Initialize the tools box so that the selection tool is active. This method is +called only once aafter startup by the framework. +*/ + void InitTools(); +/*! +Builds the tools box. This method is +called only once after startup by the framework. +*/ + void BuildTools () throw (std::runtime_error); +/*! +@param visible whether the tools box should be visible or not + +Shows or hides the tools box. +*/ + void ShowTools (bool visible); + +private: + void TestSupportedType (char const *mime_type); + void AddMimeType (std::list &l, std::string const& mime_type); + +protected: +/*! +The active document. +*/ + gcp::Document *m_pActiveDoc; +/*! +The active target. +*/ + Target *m_pActiveTarget; +/*! +Used to add a number to new files default names. +*/ + unsigned m_NumWindow; //used for new files (Untitled%d) + +private: + int m_CurZ; + std::map ToolItems; + std::map Toolbars; + std::map m_Tools; + Tool* m_pActiveTool; + static bool m_bInit; + static bool m_Have_Ghemical; + static bool m_Have_InChI; + xmlDocPtr XmlDoc; + GtkIconFactory *IconFactory; + std::list UiDescs; + GtkRadioActionEntry* RadioActions; + int m_entries; + std::map ToolbarNames; + unsigned m_NumDoc; //used to build the name of the action associated with the menu + std::set m_Targets; + int visible_windows; + std::list m_SupportedMimeTypes; + std::list m_WriteableMimeTypes; +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *m_ConfNode; +#else + GConfClient *m_ConfClient; +#endif + guint m_NotificationId; + gcu::Object *m_Dummy; + std::list m_MenuCbs; + std::list m_Options; + +GCU_RO_POINTER_PROP (GtkStyle, Style) +}; + +} // namespace gcp + +#endif //GCHEMPAINT_APPLICATION_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/arrow.cc gnome-chemistry-utils-0.10.9/libs/gcp/arrow.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/arrow.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/arrow.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,214 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * arrow.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "widgetdata.h" +#include "view.h" +#include "settings.h" +#include +#include +#include +#include "arrow.h" +#include "document.h" +#include + +using namespace gcu; + +namespace gcp { + +Arrow::Arrow (TypeId Type): Object (Type) +{ +} + +Arrow::~Arrow () +{ +} + +bool Arrow::Save (xmlDocPtr xml, xmlNodePtr node) const +{ + xmlNodePtr child; + gchar buf[16]; + if (!node) + return false; + SaveId (node); + child = xmlNewDocNode (xml, NULL, (xmlChar*) "start", NULL); + if (child) + xmlAddChild (node, child); + else + return false; + g_snprintf (buf, sizeof (buf), "%g", m_x); + xmlNewProp (child, (xmlChar*) "x", (xmlChar*) buf); + g_snprintf (buf, sizeof (buf), "%g", m_y); + xmlNewProp (child, (xmlChar*) "y", (xmlChar*) buf); + child = xmlNewDocNode (xml, NULL, (xmlChar*) "end", NULL); + if (child) + xmlAddChild(node, child); + else + return false; + g_snprintf (buf, sizeof (buf), "%g", m_x + m_width); + xmlNewProp (child, (xmlChar*) "x", (xmlChar*) buf); + g_snprintf (buf, sizeof (buf), "%g", m_y + m_height); + xmlNewProp (child, (xmlChar*) "y", (xmlChar*) buf); + return true; +} + +bool Arrow::Load (xmlNodePtr node) +{ + char* tmp, *endptr; + bool result; + xmlNodePtr child; + tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId (tmp); + xmlFree (tmp); + } + child = GetNodeByName (node, "start"); + if (!child) + return false; + tmp = (char*) xmlGetProp (child, (xmlChar*) "x"); + if (!tmp) + return false; + m_x = strtod (tmp, &endptr); + result = *endptr; + xmlFree (tmp); + if (result) + return false; + tmp = (char*) xmlGetProp (child, (xmlChar*) "y"); + if (!tmp) + return false; + m_y = strtod (tmp, &endptr); + result = *endptr; + xmlFree (tmp); + if (result) + return false; + child = GetNodeByName (node, "end"); + if (!child) + return false; + tmp = (char*) xmlGetProp (child, (xmlChar*) "x"); + if (!tmp) + return false; + m_width = strtod (tmp, &endptr) - m_x; + result = *endptr; + xmlFree (tmp); + if (result) + return false; + tmp = (char*) xmlGetProp (child, (xmlChar*) "y"); + if (!tmp) + return false; + m_height = strtod (tmp, &endptr) - m_y; + result = *endptr; + xmlFree (tmp); + if (result) + return false; + return true; +} + +void Arrow::SetSelected (GtkWidget* w, int state) +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + gchar const *color; + switch (state) { + case SelStateUnselected: + color = Color; + break; + case SelStateSelected: + color = SelectColor; + break; + case SelStateUpdating: + color = AddColor; + break; + case SelStateErasing: + color = DeleteColor; + break; + default: + color = Color; + break; + } + GList* il = group->item_list; + while (il) { + g_object_set (G_OBJECT(il->data), "fill_color", color, NULL); + il = il->next; + } +} + +void Arrow::SetCoords (double xstart, double ystart, double xend, double yend) +{ + m_x = xstart; + m_y = ystart; + m_width = xend - xstart; + m_height = yend - ystart; +} + +bool Arrow::GetCoords (double* xstart, double* ystart, double* xend, double* yend) +{ + *xstart = m_x; + *ystart = m_y; + *xend = m_x + m_width; + *yend = m_y + m_height; + return true; +} + +void Arrow::Move (double x, double y, double) +{ + m_x += x; + m_y += y; +} + +void Arrow::Transform2D (Matrix2D& m, double x, double y) +{ + m_x -= x; + m_y -= y; + m.Transform (m_x, m_y); + m_x += x; + m_y += y; + m.Transform (m_width, m_height); +} + +double Arrow::GetYAlign () +{ + return m_y + m_height / 2.; +} + +bool Arrow::SetProperty (unsigned property, char const *value) +{ + switch (property) { + case GCU_PROP_ARROW_COORDS: { + double x0, y0, x1, y1; + sscanf (value, "%lg %lg %lg %lg", &x0, &y0, &x1, &y1); + gcu::Document *doc = GetDocument (); + if (doc) { + x0 *= doc->GetScale (); + y0 *= doc->GetScale (); + x1 *= doc->GetScale (); + y1 *= doc->GetScale (); + } + SetCoords (x0, y0, x1, y1); + break; + } + } + return true; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/arrow.h gnome-chemistry-utils-0.10.9/libs/gcp/arrow.h --- gnome-chemistry-utils-0.8.6/libs/gcp/arrow.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/arrow.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,168 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * arrow.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ARROW_H +#define GCHEMPAINT_ARROW_H + +#include + +/*!\file*/ +namespace gcp { + +/*!\enum ArrowTypes +Enumeration of the known reaction arrow types. +*/ +enum ArrowTypes +{ +/*! +Simple reaction arrow. +*/ + SimpleArrow, +/*! +Double reaction arrow for reversible reactions with half heads. +*/ + ReversibleArrow, +/*! +Double reaction arrow for reversible reactions with full heads. +*/ + FullReversibleArrow, +}; + +/*!\class Arrow gcp/arrow.h +*/ +class Arrow: public gcu::Object +{ +public: +/*! +@param Type an arrow type id. + +Used to create an arrow of type Id. Should only be called from the constructor +of a derived class. +*/ + Arrow(gcu::TypeId Type); +/*! +The destructor. +*/ + virtual ~Arrow(); + +/*! +@param node: a pointer to the xmlNode containing the serialized arrow. + +Used to load an Arrow in memory. +This method must be called from derived classes overloaded Load methods. + +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param w: the GtkWidget inside which the Object is displayed. +@param state: the selection state of the arrow. + +Used to set the selection state of the arrow inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. +*/ + void SetSelected (GtkWidget* w, int state); +/*! +@param xstart the x coordinate of the start point. +@param ystart the y coordinate of the start point. +@param xend the x coordinate of the end point. +@param yend the y coordinate of the end point. + +Sets the position and length of an arrow. +*/ + void SetCoords (double xstart, double ystart, double xend, double yend); +/*! +@param xstart where to store the x coordinate of the start point. +@param ystart where to store the y coordinate of the start point. +@param xend where to store the x coordinate of the end point. +@param yend where to store the y coordinate of the end point. + +Retrieves the position of the arrow. +*/ + bool GetCoords (double* xstart, double* ystart, double* xend, double* yend); +/*! +@param x: the x component of the transation vector. +@param y: the y component of the transation vector. +@param z: the z component of the transation vector (unused). + +Used to move an arrow. The third parameter is not taken into account. +*/ + void Move (double x, double y, double z = 0); +/*! +@param m: the Matrix2D of the transformation. +@param x: the x component of the center of the transformation. +@param y: the y component of the center of the transformation. + +Used to move and/or transform an arrow. +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +Used to retrieve the y coordinate for alignment. +@return y coordinate used for arrows alignment. +*/ + double GetYAlign (); +/*! +@param property the property id as defined in objprops.h +@param value the property value as a string + +Used when loading to set common properties to arrows. Only one property is +currently supported: gcu::GCU_PROP_ARROW_COORDS. +@return true if the property could be set, or if the property is not relevant, +false otherwise. +*/ + bool SetProperty (unsigned property, char const *value); + +protected: +/*! +@param xml: the xmlDoc used to save the document. +@param node: the node representing the Object. + +This method must be called from derived classes overloaded Save methods. +@return true on succes, false otherwise. +*/ + bool Save (xmlDocPtr xml, xmlNodePtr node) const; + +protected: +/*! +The x coordinate to the start point. +*/ + double m_x; +/*! +The y coordinate to the start point. +*/ + double m_y; +/*! +The x coordinate to the end point. +*/ + double m_width; +/*! +The y coordinate to the end point. +*/ + double m_height; +}; + +} // namespace gcp + +#endif //GCHEMPAINT_ARROW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/atom.cc gnome-chemistry-utils-0.10.9/libs/gcp/atom.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/atom.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/atom.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1930 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * atom.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "atom.h" +#include "electron.h" +#include "bond.h" +#include "molecule.h" +#include "settings.h" +#include "theme.h" +#include "view.h" +#include "document.h" +#include "Hposdlg.h" +#include +#include +#include +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +#endif +#include +#include +#include +#include + +using namespace gcu; +using namespace OpenBabel; +using namespace std; + +#define ATOM_EPSILON 0.1 + +namespace gcp { + +Atom::Atom (): gcu::Atom (), + m_ShowSymbol (false), + m_HPosStyle (AUTO_HPOS) +{ + m_Valence = -1; //unspecified + m_nlp = 0; + m_nH = 0; + m_HPos = GetBestSide(); + m_ChargeAuto = false; + m_ascent = 0; + m_CHeight = 0.; + m_Changed = 0; + m_AvailPosCached = false; + m_OccupiedPos = 0; + m_ChargePos = 0xff; + m_ChargeAngle = 0.; + m_ChargeDist = 0.; + m_ChargeAutoPos = true; + m_Layout = m_ChargeLayout = m_HLayout = NULL; + m_DrawCircle = false; + m_SWidth = 0.; +} + +Atom::~Atom () +{ + Document *pDoc = (Document*) GetDocument (); + if (!pDoc) + return; + View *pView = pDoc->GetView (); + map::iterator i; + Object* electron = GetFirstChild (i); + while (electron) { + pView->Remove (electron); + electron->SetParent (NULL); // avoids a call to RemoveElectron() + delete electron; + electron = GetNextChild (i); + } + if (m_Layout) + g_object_unref (G_OBJECT (m_Layout)); + if (m_ChargeLayout) + g_object_unref (G_OBJECT (m_ChargeLayout)); +} + +Atom::Atom (int Z, double x, double y, double z): gcu::Atom (Z, x, y, z), + m_ShowSymbol (false), + m_HPosStyle (AUTO_HPOS) +{ + m_ChargeAuto = false; + m_HPos = GetBestSide (); + m_nlp = 0; + SetZ(Z); + m_ascent = 0; + m_CHeight = 0.; + m_Changed = 0; + m_AvailPosCached = false; + m_OccupiedPos = 0; + m_ChargePos = 0xff; + m_ChargeAngle = 0.; + m_ChargeDist = 0.; + m_ChargeAutoPos = true; + m_Layout = m_ChargeLayout = m_HLayout = NULL; + m_DrawCircle = false; + m_SWidth = 0.; +} + +Atom::Atom (OBAtom* atom): gcu::Atom (), + m_ShowSymbol (false), + m_HPosStyle (AUTO_HPOS) +{ + m_x = atom->GetX (); + m_y = - atom->GetY (); + m_z = atom->GetZ (); + m_nlp = 0; + SetZ (atom->GetAtomicNum ()); + gchar* Id = g_strdup_printf ("a%d", atom->GetIdx()); + SetId (Id); + g_free (Id); + m_HPos = GetBestSide (); + m_ascent = 0; + m_CHeight = 0.; + m_Changed = 0; + m_AvailPosCached = false; + m_OccupiedPos = 0; + m_ChargePos = 0xff; + m_ChargeAngle = 0.; + m_ChargeDist = 0.; + m_ChargeAutoPos = true; + m_Layout = m_ChargeLayout = m_HLayout = NULL; + m_DrawCircle = false; + m_Charge = atom->GetFormalCharge (); + m_SWidth = 0.; +} + +void Atom::SetZ (int Z) +{ + gcu::Atom::SetZ (Z); + if (Z < 1) + return; + m_Element = Element::GetElement (m_Z); + if ((m_Valence = (m_Element)? m_Element->GetDefaultValence (): 0)) + m_HPos = (m_HPosStyle == AUTO_HPOS)? GetBestSide(): m_HPosStyle; + else + m_nH = 0; + int max = (m_Element)? m_Element->GetMaxValenceElectrons (): 0; + int diff = (m_Element)? m_Element->GetTotalValenceElectrons () - m_Element->GetValenceElectrons (): 0; + switch (max) { + case 2: + m_ValenceOrbitals = 1; + break; + case 8: + m_ValenceOrbitals = 4; + break; + case 18: + if (!diff) + m_ValenceOrbitals = 6; + else + m_ValenceOrbitals = 4; + break; + case 32: + if (!diff) + m_ValenceOrbitals = 8; + else if (diff == 14) + m_ValenceOrbitals = 6; + else + m_ValenceOrbitals = 4; + break; + default: + m_ValenceOrbitals = 0; //should not occur + } + Update(); + EmitSignal (OnChangedSignal); +} + +int Atom::GetTotalBondsNumber () const +{ + std::map::const_iterator i, end = m_Bonds.end (); + int n = 0; + for (i = m_Bonds.begin(); i != end; i++) + n += (*i).second->GetOrder (); + return n; +} + +void Atom::AddBond (gcu::Bond* pBond) +{ + gcu::Atom::AddBond (pBond); + Update (); +} + +void Atom::RemoveBond (gcu::Bond* pBond) +{ + gcu::Atom::RemoveBond (pBond); + Update (); +} + +HPos Atom::GetBestSide () +{ + size_t nb_bonds = m_Bonds.size (); + if (nb_bonds == 0) + return (Element::BestSide (m_Z))? RIGHT_HPOS: LEFT_HPOS; + std::map::iterator i, end = m_Bonds.end(); + double sumc = 0.0, sums = 0.0, a; + for (i = m_Bonds.begin(); i != end; i++) { + a = ((Bond*) (*i).second)->GetAngle2DRad (this); + sumc += cos (a); + sums += sin (a); + } + if (fabs (sums) > fabs (sumc) && nb_bonds > 1) + return (fabs (sums) > .1)? ((sums >= 0.)? BOTTOM_HPOS: TOP_HPOS): ((Element::BestSide (m_Z))? RIGHT_HPOS: LEFT_HPOS); + else + return (fabs (sumc) > .1)? ((sumc >= 0.)? LEFT_HPOS: RIGHT_HPOS): ((Element::BestSide (m_Z))? RIGHT_HPOS: LEFT_HPOS); +} + +void Atom::Update () +{ + if (m_ChargeAuto) { + m_Charge = 0; + m_ChargeAuto = false; + } + if (m_ChargeAutoPos) { + NotifyPositionOccupation (m_ChargePos, false); + m_ChargePos = 0xff; + } + int nb, nexplp = 0, nexplu = 0; //nexplp is the number of explicit lone pairs + //nexplu is the number of explicit unpaired electrons + map::iterator i; + Electron* electron = (Electron*) GetFirstChild (i); + while (electron) { + if (electron->IsPair ()) + nexplp++; + else + nexplu++; + electron = (Electron*) GetNextChild (i); + } + int nbonds = GetTotalBondsNumber (); + if (m_Valence > 0 && !m_Element->IsMetallic ()) { + m_nlp = (m_Element->GetValenceElectrons () - m_Valence) / 2; + if ((m_Charge > 0) && (m_nlp > 0)) m_nlp -= (m_Charge + 1) / 2; + else if (m_Charge < 0) + m_nlp -= m_Charge; + if (m_nlp < nexplp) // Can this occur ? + m_nlp = nexplp; + else if (m_nlp > m_ValenceOrbitals - nbonds - nexplu) + m_nlp = m_ValenceOrbitals - nbonds - nexplu; + if (m_nlp < 0) + m_nlp = 0; + nb = m_Element->GetValenceElectrons () - 2 * m_nlp - m_Charge; + if (nb + m_nlp > 4) nb -= 2; //octet rule + m_nH = nb - nbonds - nexplu; + if (!m_Charge && m_nH == -1 && m_nlp > 0) + { + m_Charge = m_Element->GetValenceElectrons () - nbonds + - m_nlp * 2 - nexplu; + m_ChargeAuto = true; + m_nH = 0; + } + if (m_nH < 0) { // extended octet or missing core electrons + m_nH = 0; + if (m_nlp || nexplu || nbonds) { + m_Charge = m_Element->GetValenceElectrons () - 2 * m_nlp - nexplu - nbonds; + m_ChargeAuto = true; + } + } + m_HPos = (m_HPosStyle == AUTO_HPOS)? GetBestSide(): m_HPosStyle; + } else { + m_nH = 0; + if (m_ChargeAuto || !m_Charge) { + m_Charge = (m_Element)? m_Element->GetValenceElectrons () - 2 * nexplp - nexplu - nbonds: 0; + if (m_Charge > 0) + m_Charge = 0; + m_ChargeAuto = true; + } + } + Document *pDoc = (Document *) GetDocument (); + if (pDoc && pDoc->GetView ()) + m_Changed = pDoc->GetView ()->GetNbWidgets (); + m_AvailPosCached = false; + map::iterator j = m_Bonds.begin(), jend = m_Bonds.end (); + if (nbonds && GetZ () == 6) { + // update large bonds ends + Bond *bond; + BondType type; + bool DrawCircle; + int nb = 0; + j = m_Bonds.begin(); + while (j != jend) + { + bond = dynamic_cast ((Bond*)(*j).second); + type = bond->GetType (); + if (type == ForeBondType || (type == UpBondType && bond->GetAtom (1) == this)) + nb++; + j++; + } + DrawCircle = nb > 1; + if (!DrawCircle && GetBondsNumber () == 2) { + j = m_Bonds.begin(); + double angle = static_cast ((*j).second)->GetAngle2D (this); + j++; + angle -= static_cast ((*j).second)->GetAngle2D (this); + if (go_finite (angle)) { + while (angle < 0) + angle += 360.; + while (angle > 360.) + angle -= 360; + if (fabs (angle - 180.) < 1) + DrawCircle = true; + } + } + if (DrawCircle != m_DrawCircle) { + m_DrawCircle = DrawCircle; + m_Changed = true; + } + } + // Update all double bonds + for (j = m_Bonds.begin(); j != jend; j++) + if (((*j).second)->GetOrder () == 2) + static_cast ((*j).second)->SetDirty (); +} + +void Atom::Add (GtkWidget* w) const +{ + if (!w || !GetZ ()) + return; + if (m_Changed > 0) + const_cast (this)->m_Changed--; + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + View* pView = pData->m_View; + Theme *pTheme = pView->GetDoc ()->GetTheme (); + if (m_Layout == NULL) { + PangoContext* pc = pView->GetPangoContext (); + const_cast (this)->m_Layout = pango_layout_new (pc); + const_cast (this)->m_HLayout = pango_layout_new (pc); + } + if (m_FontName != pView->GetFontName ()) { + const_cast (this)->m_FontName = pView->GetFontName (); + pango_layout_set_font_description (m_Layout, pView->GetPangoFontDesc ()); + pango_layout_set_font_description (m_HLayout, pView->GetPangoFontDesc ()); + pango_layout_set_text (m_Layout, "l", 1); + PangoLayoutIter* iter = pango_layout_get_iter (m_Layout); + const_cast (this)->m_ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + const_cast (this)->m_FontName = pView->GetFontName (); + const_cast (this)->m_CHeight = 0.; + } + PangoRectangle rect; + if (m_CHeight == 0.) { + pango_layout_set_text (m_Layout, "C", 1); + pango_layout_get_extents (m_Layout, &rect, NULL); + const_cast (this)->m_CHeight = double (rect.height / PANGO_SCALE) / 2.0; + } + double x, y, xc = 0., yc; + const_cast (this)->m_width = const_cast (this)->m_height = 2.0 * pTheme->GetPadding (); + GetCoords (&x, &y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + GnomeCanvasItem *item; + GnomeCanvasGroup *group, *chgp; + group = GNOME_CANVAS_GROUP (gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL)); + g_signal_connect (G_OBJECT (group), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (group), "object", (void *) this); + if ((GetZ () != 6) || (GetBondsNumber () == 0)) { + int sw; + const gchar* symbol = GetSymbol (), *text; + sw = strlen (symbol); + pango_layout_set_text (m_Layout, symbol, sw); + pango_layout_get_extents (m_Layout, &rect, NULL); + const_cast (this)->m_width += rect.width / PANGO_SCALE; + const_cast (this)->BuildSymbolGeometry ((double) rect.width / PANGO_SCALE, (double) rect.height / PANGO_SCALE, m_ascent - (double) rect.y / PANGO_SCALE - m_CHeight); + const_cast (this)->m_lbearing = m_width / 2.; + const_cast (this)->m_xROffs = const_cast (this)->m_yROffs = 0.; + pango_layout_get_extents (m_Layout, NULL, &rect); + const_cast (this)->m_length = double (rect.width / PANGO_SCALE); + const_cast (this)->m_text_height = const_cast (this)->m_height = rect.height / PANGO_SCALE; + int n = GetAttachedHydrogens (); + if (n > 0) { + pango_layout_set_text (m_HLayout, "H", -1); + PangoRectangle HRect; + HRect.width = 0.; + pango_layout_get_extents (m_HLayout, &HRect, NULL); + switch (m_HPos) { + case LEFT_HPOS: + //the x offset needs to be calculated after adding possible stoichimoetry. + const_cast (this)->m_yHOffs = 0.; + break; + case RIGHT_HPOS: + const_cast (this)->m_xHOffs = rect.width / PANGO_SCALE + 1.; + const_cast (this)->m_yHOffs = 0.; + break; + case TOP_HPOS: + const_cast (this)->m_xHOffs = m_lbearing - pTheme->GetPadding () - HRect.width / PANGO_SCALE / 2.; + break; + case BOTTOM_HPOS: + const_cast (this)->m_xHOffs = m_lbearing - pTheme->GetPadding () - HRect.width / PANGO_SCALE / 2.; + const_cast (this)->m_yHOffs = m_CHeight * 2. + pTheme->GetPadding (); + break; + default: + g_critical ("This should not happen, please file a bug report"); + break; + } + if (n > 1) { + gchar const *nb = g_strdup_printf ("%d", n); + int nw = strlen (nb) + 1; + PangoAttrList *pal = pango_attr_list_new (); + text = g_strconcat ("H", nb, NULL); + pango_layout_set_text (m_HLayout, text, -1); + nw = strlen (text); + PangoAttribute *attr = pango_attr_font_desc_new (pView->GetPangoSmallFontDesc()); + attr->start_index = 1; + attr->end_index = nw; + pango_attr_list_insert (pal, attr); + attr = pango_attr_rise_new (-2 * PANGO_SCALE); + attr->start_index = 1; + attr->end_index = nw; + pango_attr_list_insert (pal, attr); + pango_layout_set_attributes (m_HLayout, pal); + pango_attr_list_unref (pal); + } + pango_layout_get_extents (m_HLayout, &HRect, NULL); + // evaluate underlying rectangle size and position + if (HRect.width > 0) { + switch (m_HPos) { + case LEFT_HPOS: + const_cast (this)->m_xHOffs = -HRect.width / PANGO_SCALE - 1.; + const_cast (this)->m_xROffs = m_xHOffs; + const_cast (this)->m_length += HRect.width / PANGO_SCALE + 1.; + break; + case RIGHT_HPOS: + const_cast (this)->m_length += HRect.width / PANGO_SCALE + 1.; + break; + case TOP_HPOS: + const_cast (this)->m_yHOffs = -HRect.height / PANGO_SCALE - pTheme->GetPadding (); + const_cast (this)->m_yROffs = -HRect.height / PANGO_SCALE - pTheme->GetPadding (); + const_cast (this)->m_text_height += HRect.height / PANGO_SCALE + pTheme->GetPadding (); + const_cast (this)->m_length = MAX (m_length, HRect.width / PANGO_SCALE); + break; + case BOTTOM_HPOS: + const_cast (this)->m_text_height += HRect.height / PANGO_SCALE + pTheme->GetPadding (); + const_cast (this)->m_length = MAX (m_length, HRect.width / PANGO_SCALE); + break; + default: + break; + } + } + } + item = gnome_canvas_item_new ( + group, + gnome_canvas_rect_ext_get_type (), + "x1", x - m_lbearing + m_xROffs, + "y1", y - m_ascent + m_CHeight - pTheme->GetPadding () + m_yROffs, + "x2", x - m_lbearing + m_length + 2 * pTheme->GetPadding () + m_xROffs, + "y2", y - m_ascent + m_CHeight + m_text_height + pTheme->GetPadding () + m_yROffs, + "fill_color", (pData->IsSelected (this))? SelectColor: NULL, + NULL); + g_object_set_data (G_OBJECT (group), "rect", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + gnome_canvas_item_hide (item); + + item = gnome_canvas_item_new ( + group, + gnome_canvas_pango_get_type (), + "x", x - m_lbearing, + "y", y - m_ascent + m_CHeight, + "layout", m_Layout, + NULL); + g_object_set_data (G_OBJECT (group), "symbol", item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + if (GetAttachedHydrogens ()) { + item = gnome_canvas_item_new ( + group, + gnome_canvas_pango_get_type (), + "x", x - m_lbearing + m_xHOffs, + "y", y - m_ascent + m_CHeight + m_yHOffs, + "layout", m_HLayout, + NULL); + g_object_set_data (G_OBJECT (group), "hydrogens", item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + } + } else { + item = gnome_canvas_item_new ( + group, + gnome_canvas_rect_ext_get_type (), + "x1", x - 3, + "y1", y - 3, + "x2", x + 3, + "y2", y + 3, + "fill_color", (pData->IsSelected (this))? SelectColor: NULL, + NULL); + g_object_set_data(G_OBJECT (group), "rect", item); + gnome_canvas_request_redraw ((GnomeCanvas*) w, (int) x - 3, (int) y - 3, (int) x + 3, (int) y + 3); + gnome_canvas_item_lower_to_bottom (GNOME_CANVAS_ITEM (group)); + gnome_canvas_item_raise (GNOME_CANVAS_ITEM (group), 1); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + if (m_DrawCircle) { + double dx = pTheme->GetStereoBondWidth () / 2.; + item = gnome_canvas_item_new ( + group, + gnome_canvas_ellipse_ext_get_type (), + "x1", x - dx, + "y1", y - dx, + "x2", x + dx, + "y2", y + dx, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + NULL); + g_object_set_data (G_OBJECT (group), "bullet", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + } + } + pData->Items[this] = group; + const_cast (this)->m_width /= pTheme->GetZoomFactor (); + const_cast (this)->m_height /= pTheme->GetZoomFactor (); + /* add charge */ + int charge = GetCharge (); + if (charge) { + int align = const_cast (this)->GetChargePosition (const_cast (this)->m_ChargePos, m_ChargeAngle * 180 / M_PI, x, y); + if (m_ChargeDist != 0.) { + align = 0; + x = m_x + m_ChargeDist * cos (m_ChargeAngle); + y = m_y - m_ChargeDist * sin (m_ChargeAngle); + } + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + char *fig = NULL; + if (abs (charge) > 1) { + fig = g_strdup_printf ("%d", abs (charge)); + PangoRectangle rect; + if (!m_ChargeLayout) { + PangoContext* pc = pData->m_View->GetPangoContext(); + const_cast (this)->m_ChargeLayout = pango_layout_new (pc); + pango_layout_set_font_description (m_ChargeLayout, pData->m_View->GetPangoSmallFontDesc ()); + } + pango_layout_set_text (m_ChargeLayout, fig, -1); + pango_layout_get_extents (m_ChargeLayout, NULL, &rect); + const_cast (this)->m_ChargeWidth = rect.width / PANGO_SCALE; + const_cast (this)->m_ChargeTWidth = m_ChargeWidth + 1. + pTheme->GetChargeSignSize (); + } else { + const_cast (this)->m_ChargeWidth = 0.; + const_cast (this)->m_ChargeTWidth = pTheme->GetChargeSignSize (); + } + switch (align) { + case -2: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + y += pTheme->GetChargeSignSize () / 2.; + break; + case -1: + xc = x - pTheme->GetChargeSignSize () - pTheme->GetPadding (); + break; + case 0: + case -3: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + break; + case 1: + xc = x + m_ChargeWidth + pTheme->GetPadding (); + break; + case 2: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + y -= pTheme->GetChargeSignSize () / 2.; + break; + } + x = xc - 1.; + yc = y - pTheme->GetChargeSignSize () / 2.; + chgp = (GnomeCanvasGroup*) gnome_canvas_item_new ( + group, + gnome_canvas_group_ext_get_type(), + NULL); + g_object_set_data (G_OBJECT (group), "charge", chgp); + if (fig) { + item = gnome_canvas_item_new( + chgp, + gnome_canvas_pango_get_type(), + "layout", m_ChargeLayout, + "fill_color", (pData->IsSelected(this))? SelectColor: Color, + "anchor", GTK_ANCHOR_EAST, + "x", x, + "y", y, + NULL); + g_object_set_data (G_OBJECT (group), "figure", item); + g_free (fig); + } + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_ellipse_ext_get_type (), + "x1", xc, + "y1", yc, + "x2", xc + pTheme->GetChargeSignSize (), + "y2", yc + pTheme->GetChargeSignSize (), + "outline_color", (pData->IsSelected(this))? SelectColor: Color, + "width_units", 0.5, + NULL + ); + g_object_set_data (G_OBJECT (group), "circle", item); + ArtBpath *path = art_new (ArtBpath, 5); + path[0].code = ART_MOVETO_OPEN; + path[0].x3 = xc + 1.; + path[1].code = ART_LINETO; + path[1].x3 = xc + pTheme->GetChargeSignSize () - 1.; + path[0].y3 = path[1].y3 = yc + pTheme->GetChargeSignSize () / 2.; + if (charge > 0) { + path[2].code = ART_MOVETO_OPEN; + path[2].y3 = yc + 1.; + path[3].code = ART_LINETO; + path[3].y3 = yc + pTheme->GetChargeSignSize () - 1.; + path[2].x3 = path[3].x3 = xc + pTheme->GetChargeSignSize () / 2.; + path[4].code = ART_END; + } else + path[2].code = ART_END; + GnomeCanvasPathDef *cpd = gnome_canvas_path_def_new_from_bpath (path); + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_bpath_ext_get_type (), + "bpath", cpd, + "outline_color", (pData->IsSelected(this))? SelectColor: Color, + "width_units", 1., + NULL + ); + gnome_canvas_path_def_unref (cpd); + g_object_set_data (G_OBJECT (group), "sign", item); + } + map::const_iterator i; + Object const *electron = GetFirstChild (i); + while (electron){ + electron->Add (w); + electron = GetNextChild (i); + } +} + +void Atom::Update (GtkWidget* w) const +{ + if (!w || !GetZ ()) + return; + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] == NULL) + return; + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + double x, y, xc = 0., yc; + GetCoords (&x, &y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + GnomeCanvasGroup *group = pData->Items[this]; + if (m_FontName != pData->m_View->GetFontName ()) { + View *pView = pData->m_View; + PangoContext* pc = pView->GetPangoContext (); + PangoLayout *Layout = pango_layout_new (pc); + pango_layout_set_font_description (Layout, pView->GetPangoFontDesc ()); + pango_layout_set_font_description (m_Layout, pView->GetPangoFontDesc ()); + pango_layout_set_text (Layout, "l", 1); + PangoLayoutIter* iter = pango_layout_get_iter (Layout); + const_cast (this)->m_ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + const_cast (this)->m_FontName = pView->GetFontName (); + pango_layout_set_text (Layout, "C", 1); + PangoRectangle rect; + pango_layout_get_extents (Layout, &rect, NULL); + const_cast (this)->m_CHeight = double (rect.height / PANGO_SCALE) / 2.0; + g_object_unref (G_OBJECT (Layout)); + } + if (m_Changed) + const_cast (this)->BuildItems (pData); + else { + if ((GetZ() != 6) || (GetBondsNumber () == 0) || m_ShowSymbol) { + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "symbol")), + "x", x - m_lbearing, + "y", y - m_ascent + m_CHeight, + NULL); + if (GetAttachedHydrogens ()) + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "hydrogens")), + "x", x - m_lbearing + m_xHOffs, + "y", y - m_ascent + m_CHeight + m_yHOffs, + NULL); + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "rect")), + "x1", x - m_lbearing + m_xROffs, + "y1", y - m_ascent + m_CHeight - pTheme->GetPadding () + m_yROffs, + "x2", x - m_lbearing + m_length + 2 * pTheme->GetPadding () + m_xROffs, + "y2", y - m_ascent + m_CHeight + m_text_height + pTheme->GetPadding () + m_yROffs, + NULL); + } else { + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "rect")), + "x1", x - 3, + "y1", y - 3, + "x2", x + 3, + "y2", y + 3, + NULL); + if (m_DrawCircle) { + double dx = pTheme->GetStereoBondWidth () / 2.; + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "bullet")), + "x1", x - dx, + "y1", y - dx, + "x2", x + dx, + "y2", y + dx, + NULL); + } + } + } + void* item = g_object_get_data (G_OBJECT (group), "charge"); + int charge = GetCharge (); + if (charge) { + if (item) { + int align = const_cast (this)->GetChargePosition (const_cast (this)->m_ChargePos, m_ChargeAngle * 180. / M_PI, x, y); + if (m_ChargeDist != 0.) { + align = 0; + x = m_x + m_ChargeDist * cos (m_ChargeAngle); + y = m_y - m_ChargeDist * sin (m_ChargeAngle); + } + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + GnomeCanvasItem *figure = (GnomeCanvasItem*) g_object_get_data (G_OBJECT (group), "figure"); + char *fig = NULL; + if (abs (charge) > 1) { + fig = g_strdup_printf ("%d", abs (charge)); + PangoRectangle rect; + if (!m_ChargeLayout) { + PangoContext* pc = pData->m_View->GetPangoContext (); + const_cast (this)->m_ChargeLayout = pango_layout_new (pc); + pango_layout_set_font_description (m_ChargeLayout, pData->m_View->GetPangoSmallFontDesc ()); + } + pango_layout_set_text (m_ChargeLayout, fig, -1); + pango_layout_get_extents (m_ChargeLayout, NULL, &rect); + const_cast (this)->m_ChargeWidth = rect.width / PANGO_SCALE; + } else + const_cast (this)->m_ChargeWidth = 0.; + const_cast (this)->m_ChargeTWidth = m_ChargeWidth + 1. + pTheme->GetChargeSignSize (); + if (figure == NULL && fig != NULL) { + figure = gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (item), + gnome_canvas_pango_get_type (), + "anchor", GTK_ANCHOR_EAST, + NULL); + g_object_set_data (G_OBJECT (group), "figure", figure); + } else if (figure != NULL && fig == NULL) { + gtk_object_destroy (GTK_OBJECT (figure)); + g_object_set_data ((GObject*)group, "figure", NULL); + } + switch (align) { + case -2: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + y += pTheme->GetChargeSignSize () / 2.; + break; + case -1: + xc = x - pTheme->GetChargeSignSize () - pTheme->GetPadding (); + break; + case 0: + case -3: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + break; + case 1: + xc = x + m_ChargeWidth + pTheme->GetPadding (); + break; + case 2: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + y -= pTheme->GetChargeSignSize () / 2.; + break; + } + x = xc -1.; + yc = y - pTheme->GetChargeSignSize () / 2.; + if (fig) { + g_object_set (G_OBJECT (figure), + "layout", m_ChargeLayout, + "x", x, + "y", y, + NULL); + g_free (fig); + } + item = g_object_get_data (G_OBJECT (group), "circle"); + g_object_set (G_OBJECT (item), + "x1", xc, + "y1", yc, + "x2", xc + pTheme->GetChargeSignSize (), + "y2", yc + pTheme->GetChargeSignSize (), + NULL); + item = g_object_get_data (G_OBJECT (group), "sign"); + ArtBpath *path = art_new (ArtBpath, 5); + path[0].code = ART_MOVETO_OPEN; + path[0].x3 = xc + 1.; + path[1].code = ART_LINETO; + path[1].x3 = xc + pTheme->GetChargeSignSize () - 1.; + path[0].y3 = path[1].y3 = yc + pTheme->GetChargeSignSize () / 2.; + if (charge > 0) { + path[2].code = ART_MOVETO_OPEN; + path[2].y3 = yc + 1.; + path[3].code = ART_LINETO; + path[3].y3 = yc + pTheme->GetChargeSignSize () - 1.; + path[2].x3 = path[3].x3 = xc + pTheme->GetChargeSignSize () / 2.; + path[4].code = ART_END; + } else + path[2].code = ART_END; + GnomeCanvasPathDef *cpd = gnome_canvas_path_def_new_from_bpath (path); + g_object_set (G_OBJECT (item), + "bpath", cpd, + NULL + ); + gnome_canvas_path_def_unref (cpd); + } else { + GnomeCanvasGroup *chgp; + int align = const_cast (this)->GetChargePosition(const_cast (this)->m_ChargePos, m_ChargeAngle * 180 / M_PI, x, y); + if (m_ChargeDist != 0.) { + align = 0; + x = (m_x + m_ChargeDist * cos (m_ChargeAngle)); + y = (m_y - m_ChargeDist * sin (m_ChargeAngle)); + } + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + + char *fig = NULL; + if (abs (charge) > 1) { + fig = g_strdup_printf ("%d", abs (charge)); + if (!m_ChargeLayout) { + PangoContext* pc = pData->m_View->GetPangoContext (); + const_cast (this)->m_ChargeLayout = pango_layout_new (pc); + pango_layout_set_font_description (m_ChargeLayout, pData->m_View->GetPangoSmallFontDesc ()); + } + pango_layout_set_text (m_ChargeLayout, fig, -1); + PangoRectangle rect; + pango_layout_get_extents (m_ChargeLayout, NULL, &rect); + const_cast (this)->m_ChargeWidth = rect.width / PANGO_SCALE; + const_cast (this)->m_ChargeTWidth = m_ChargeWidth + pTheme->GetPadding () + pTheme->GetChargeSignSize (); + } else { + const_cast (this)->m_ChargeWidth = 0.; + const_cast (this)->m_ChargeTWidth = pTheme->GetChargeSignSize (); + } + switch (align) { + case -2: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + y += pTheme->GetChargeSignSize () / 2.; + break; + case -1: + xc = x - pTheme->GetChargeSignSize () - pTheme->GetPadding (); + break; + case 0: + case -3: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + break; + case 1: + xc = x + m_ChargeWidth + pTheme->GetPadding (); + break; + case 2: + xc = x + m_ChargeTWidth / 2. - pTheme->GetChargeSignSize (); + y -= pTheme->GetChargeSignSize () / 2.; + break; + } + x = xc - 1.; + yc = y - pTheme->GetChargeSignSize () / 2.; + chgp = (GnomeCanvasGroup*) gnome_canvas_item_new ( + group, + gnome_canvas_group_ext_get_type (), + NULL); + g_object_set_data (G_OBJECT (group), "charge", chgp); + if (fig) { + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_pango_get_type (), + "layout", m_ChargeLayout, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + "anchor", GTK_ANCHOR_EAST, + "x", x, + "y", y, + NULL); + g_object_set_data (G_OBJECT (group), "figure", item); + g_free (fig); + } + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_ellipse_ext_get_type (), + "x1", xc, + "y1", yc, + "x2", xc + pTheme->GetChargeSignSize (), + "y2", yc + pTheme->GetChargeSignSize (), + "outline_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", .5, + NULL + ); + g_object_set_data (G_OBJECT (group), "circle", item); + ArtBpath *path = art_new (ArtBpath, 5); + path[0].code = ART_MOVETO_OPEN; + path[0].x3 = xc + 1.; + path[1].code = ART_LINETO; + path[1].x3 = xc + pTheme->GetChargeSignSize () - 1.; + path[0].y3 = path[1].y3 = yc + pTheme->GetChargeSignSize () / 2.; + if (charge > 0) { + path[2].code = ART_MOVETO_OPEN; + path[2].y3 = yc + 1.; + path[3].code = ART_LINETO; + path[3].y3 = yc + pTheme->GetChargeSignSize () - 1.; + path[2].x3 = path[3].x3 = xc + pTheme->GetChargeSignSize () / 2.; + path[4].code = ART_END; + } else + path[2].code = ART_END; + GnomeCanvasPathDef *cpd = gnome_canvas_path_def_new_from_bpath (path); + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_bpath_ext_get_type (), + "bpath", cpd, + "outline_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", 1., + NULL + ); + gnome_canvas_path_def_unref (cpd); + g_object_set_data (G_OBJECT (group), "sign", item); + } + } else { + if (item) + gtk_object_destroy (GTK_OBJECT (item)); + g_object_set_data ((GObject*)group, "charge", NULL); + g_object_set_data ((GObject*)group, "figure", NULL); + g_object_set_data ((GObject*)group, "circle", NULL); + g_object_set_data ((GObject*)group, "sign", NULL); + } + map::const_iterator i; + Object const *electron = GetFirstChild (i); + while (electron){ + electron->Update (w); + electron = GetNextChild (i); + } +} + +void Atom::UpdateAvailablePositions () +{ + list::iterator n; + double angle, delta, dir; + m_AngleList.clear (); + if (((GetZ() != 6 || m_Bonds.size() == 0)) && m_nH) { + switch (m_HPos) { + case LEFT_HPOS: + m_AvailPos = 0x6D; + m_AngleList.push_front(225.0); + m_AngleList.push_front(135.0); + break; + case RIGHT_HPOS: + m_AvailPos = 0xB6; + m_AngleList.push_front(315.0); + m_AngleList.push_front(45.0); + break; + case TOP_HPOS: + m_AvailPos = 0xF8; + m_AngleList.push_front(135.0); + m_AngleList.push_front(45.0); + break; + break; + case BOTTOM_HPOS: + m_AvailPos = 0xC7; + m_AngleList.push_front(315.0); + m_AngleList.push_front(225.0); + break; + break; + default: + break; + } + } else + m_AvailPos = 0xff; + m_AvailPos &= ~m_OccupiedPos; + map::iterator i = m_Bonds.begin(); + while (i != m_Bonds.end()) { + n = m_AngleList.begin (); + angle = ((Bond*) (*i).second)->GetAngle2D (this); + if (angle < 0) + angle += 360.; + while ((n != m_AngleList.end ()) && (*n < angle)) n++; + m_AngleList.insert (n, angle); + i++; + if ((m_AvailPos & POSITION_SW) && (angle >= 180.0 - ATOM_EPSILON) && + (angle <= 270.0 + ATOM_EPSILON)) + m_AvailPos -= POSITION_SW; + if ((m_AvailPos & POSITION_SE) && (((angle >= 270.0 - ATOM_EPSILON) && + (angle <= 360.0 + ATOM_EPSILON)) || (fabs(angle) < ATOM_EPSILON))) + m_AvailPos -= POSITION_SE; + if ((m_AvailPos & POSITION_S) && (angle >= 225.0 - ATOM_EPSILON) && + (angle <= 315.0 + ATOM_EPSILON)) + m_AvailPos -= POSITION_S; + if ((m_AvailPos & POSITION_NW) && (angle >= 90.0 - ATOM_EPSILON) && + (angle <= 180.0 + ATOM_EPSILON)) + m_AvailPos -= POSITION_NW; + if ((m_AvailPos & POSITION_NE) && (((angle >= 0.0 - ATOM_EPSILON) && + (angle <= 90.0 + ATOM_EPSILON)) || (fabs(angle - 360.0) < ATOM_EPSILON))) + m_AvailPos -= POSITION_NE; + if ((m_AvailPos & POSITION_N) && (angle >= 45.0 - ATOM_EPSILON) && + (angle <= 135.0 + ATOM_EPSILON)) + m_AvailPos -= POSITION_N; + if ((m_AvailPos & POSITION_W) && ((angle <= 225.0 + ATOM_EPSILON) && + (angle >= 135.0 - ATOM_EPSILON))) + m_AvailPos -= POSITION_W; + if ((m_AvailPos & POSITION_E) && ((angle >= 315.0 - ATOM_EPSILON) || + (angle <= 45.0 + ATOM_EPSILON))) + m_AvailPos -= POSITION_E; + } + m_AngleList.push_back ((angle = m_AngleList.front ()) + 360.0); + m_InterBonds.clear (); + for (n = m_AngleList.begin (), n++; n != m_AngleList.end (); n++) { + delta = *n - angle; + while (m_InterBonds.find (delta) != m_InterBonds.end ()) + delta -= 1e-8; + dir = (*n + angle) / 2.; + if ((m_AvailPos == 0xff) || (m_HPos && (dir < 135. || dir > 225.)) || + (!m_HPos && (dir > 45. && dir < 315.))) + m_InterBonds[delta] = dir; + angle = *n; + } + m_AvailPosCached = true; +} + +int Atom::GetChargePosition (unsigned char& Pos, double Angle, double& x, double& y) +{ + list::iterator n, end; + double angle; + if (m_ChargePos != 0xff) + m_OccupiedPos &= ~m_ChargePos; + if (!m_AvailPosCached) + UpdateAvailablePositions (); + if (m_ChargePos != 0xff) + m_OccupiedPos |= m_ChargePos; + if (!m_ChargeAutoPos && Pos == 0xff) { + Pos = m_ChargePos; + if (!Pos) + Angle = m_ChargeAngle * 180 / M_PI; + } else if (Pos == 0xff) { + if (m_AvailPos) { + if (m_AvailPos & POSITION_NE) + Pos = POSITION_NE; + else if (m_AvailPos & POSITION_NW) + Pos = POSITION_NW; + else if (m_AvailPos & POSITION_N) + Pos = POSITION_N; + else if (m_AvailPos & POSITION_SE) + Pos = POSITION_SE; + else if (m_AvailPos & POSITION_SW) + Pos = POSITION_SW; + else if (m_AvailPos & POSITION_S) + Pos = POSITION_S; + else if (m_AvailPos & POSITION_E) + Pos = POSITION_E; + else if (m_AvailPos & POSITION_W) + Pos = POSITION_W; + } else { + Pos = 0; + angle = m_AngleList.front(); + double max = 0.0; + end = m_AngleList.end (); + //if we are there, there are at least two bonds + for (n = m_AngleList.begin (), n++; n != end; n++) { + if (*n - angle > max) { + if (*n - angle - max > 0.1) x = (*n + angle) / 2; + if (m_nH) { + if (m_HPos && ((x > 225.0) || (x < 135.0))) + Angle = x; + else if (m_HPos && (x > 45.0) && (x < 315.0)) + Angle = x; + } + else Angle = x; + max = *n - angle; + } + angle = *n; + } + } + } else if (Pos) { + if (!(Pos & m_AvailPos) && (Pos != m_ChargePos)) + return 0; + } else { + if (Angle > 360.) + Angle -= 360; + else if (Angle < 0.) + Angle += 360; + if (!(((GetZ() == 6) && (m_Bonds.size() != 0)) || + !m_nH || ((!m_HPos && (Angle < 135. || Angle > 225.)) || + (m_HPos && (Angle > 45. && Angle < 315.))))) + return 0; + } + switch (Pos) { + case POSITION_NE: + x = m_x + m_width / 2.0; + y = m_y - m_height / 2.0; + return 1; + case POSITION_NW: + x = m_x - m_width / 2.0; + y = m_y - m_height / 2.0; + return -1; + case POSITION_N: + x = m_x; + y = m_y - m_height / 2.0; + return 2; + case POSITION_SE: + x = m_x + m_width / 2.0; + y = m_y + m_height / 2.0; + return 1; + case POSITION_SW: + x = m_x - m_width / 2.0; + y = m_y + m_height / 2.0; + return -1; + case POSITION_S: + x = m_x; + y = m_y + m_height / 2.0; + return -2; + case POSITION_E: + x = m_x + m_width / 2.0; + y = m_y; + return 1; + case POSITION_W: + x = m_x - m_width / 2.0; + y = m_y; + return -1; + default: { + double t = tan (Angle / 180. * M_PI); + double limit = atan (m_height / m_width) * 180. / M_PI; + if (Angle < limit) { + x = m_x /*+ 12. */+ m_width / 2.; + y = m_y - m_width / 2. * t; + return 1; + } else if (Angle < 180. - limit) { + if (!isnan (t)) + x = m_x + m_height / 2. / t; + else + x = m_x; + y = m_y - m_height / 2.; + return 2; + } else if (Angle < 180. + limit) { + x = m_x /*- 12.*/ - m_width / 2.; + y = m_y + m_width / 2. * t; + return -1; + } else if (Angle < 360. - limit) { + if (!isnan (t)) + x = m_x - m_height / 2. / t; + else + x = m_x; + y = m_y + m_height / 2.; + return -2; + } else { + x = m_x /*+ 12.*/ + m_width / 2.; + y = m_y - m_width / 2. * t; + return 1; + } + } + } + return 0; // should not occur +} + +int Atom::GetAvailablePosition (double& x, double& y) +{ + list::iterator n, end; + double angle; + if (!m_AvailPosCached) + UpdateAvailablePositions (); + if (m_AvailPos) { + if (m_AvailPos & POSITION_N) { + x = m_x; + y = m_y - m_height / 2.0; + return POSITION_N; + } + if (m_AvailPos & POSITION_S) { + x = m_x; + y = m_y + m_height / 2.0; + return POSITION_S; + } + if (m_AvailPos & POSITION_E) { + x = m_x + m_width / 2.0; + y = m_y; + return POSITION_E; + } + if (m_AvailPos & POSITION_W) { + x = m_x - m_width / 2.0; + y = m_y; + return POSITION_W; + } + if (m_AvailPos & POSITION_NE) { + x = m_x + m_width / 2.0; + y = m_y - m_height / 2.0; + return POSITION_NE; + } + if (m_AvailPos & POSITION_NW) { + x = m_x - m_width / 2.0; + y = m_y - m_height / 2.0; + return POSITION_NW; + } + if (m_AvailPos & POSITION_SE) { + x = m_x + m_width / 2.0; + y = m_y + m_height / 2.0; + return POSITION_SE; + } + if (m_AvailPos & POSITION_SW) { + x = m_x - m_width / 2.0; + y = m_y + m_height / 2.0; + return POSITION_SW; + } + } + angle = m_AngleList.front (); + double dir = 0.0, max = 0.0; + end = m_AngleList.end (); + //if we are there, there are at least two bonds + for (n = m_AngleList.begin (), n++; n != end; n++) { + if (*n - angle > max) { + if (*n - angle - max > 0.1) + x = (*n + angle) / 2; + if (m_nH) { + if (m_HPos && ((x > 225.0) || (x < 135.0))) + dir = x; + else if (m_HPos && (x > 45.0) && (x < 315.0)) + dir = x; + } else + dir = x; + max = *n - angle; + } + angle = *n; + } + max = sqrt (square (m_width) + square (m_height)) / 2.0 + 24.;//Could do better, should replace 24 by something more intelligent + x = m_x + max * cos (dir / 180.0 * M_PI); + y = m_y - max * sin (dir / 180.0 * M_PI); + return 0; +} + +bool Atom::LoadNode (xmlNodePtr) +{ + SetZ (GetZ ()); + return true; +} + +void Atom::SetSelected (GtkWidget* w, int state) +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + gpointer item; + gchar const *color, *chargecolor; + bool visible = true; + + switch (state) { + case SelStateUnselected: + color = NULL; + chargecolor = "black"; + visible = false; + break; + case SelStateSelected: + chargecolor = color = SelectColor; + break; + case SelStateUpdating: + chargecolor = color = AddColor; + break; + case SelStateErasing: + chargecolor = color = DeleteColor; + break; + default: + color = NULL; + chargecolor = "black"; + break; + } + item = g_object_get_data (G_OBJECT (group), "rect"); + g_object_set (G_OBJECT (item), + "fill_color", color, NULL); + if (visible) + gnome_canvas_item_show (GNOME_CANVAS_ITEM (item)); + else + gnome_canvas_item_hide (GNOME_CANVAS_ITEM (item)); + if ((item = g_object_get_data (G_OBJECT (group), "bullet"))) + g_object_set (item, "fill_color", chargecolor, NULL); + if ((item = g_object_get_data (G_OBJECT (group), "figure"))) + g_object_set (item, "fill_color", chargecolor, NULL); + if ((item = g_object_get_data (G_OBJECT (group), "circle"))) + g_object_set (item, "outline_color", chargecolor, NULL); + if ((item = g_object_get_data (G_OBJECT (group), "sign"))) + g_object_set (item, "outline_color", chargecolor, NULL); + Object::SetSelected (w, state); +} + +bool Atom::AcceptNewBonds (int nb) +{ + if ((m_Valence > 0) || m_ChargeAuto) + return Element::GetMaxBonds (m_Z) >= (GetTotalBondsNumber () + GetChildrenNumber () + nb); + map::iterator i; + Electron* electron = (Electron*) GetFirstChild (i); + unsigned nel = 0; + while (electron){ + if (electron->IsPair ()) + nel += 2; + else + nel++; + electron = (Electron*) GetNextChild (i); + } + nel += GetTotalBondsNumber (); + return (m_ValenceOrbitals - GetTotalBondsNumber () - GetChildrenNumber () > 0) + && (((m_Element->GetValenceElectrons() - m_Charge) > nel) || m_ChargeAuto); +} + +void Atom::AddToMolecule (Molecule* Mol) +{ + Mol->AddAtom (this); +} + +void Atom::BuildItems (WidgetData* pData) +{ + GnomeCanvasGroup* group = pData->Items[this]; + void* item; + View* pView = pData->m_View; + Theme *pTheme = pView->GetDoc ()->GetTheme (); + double x, y; + m_width = m_height = 2.0 * pTheme->GetPadding (); + GetCoords (&x, &y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + m_xROffs = m_yROffs = 0.; + if ((GetZ() != 6) || (GetBondsNumber() == 0) || m_ShowSymbol) { + int sw; + const gchar* symbol = GetSymbol (), *text; + PangoRectangle rect, HRect; + sw = strlen (symbol); + pango_layout_set_text (m_Layout, symbol, sw); + pango_layout_get_extents (m_Layout, &rect, NULL); + m_width += rect.width / PANGO_SCALE; + pango_layout_get_extents (m_Layout, NULL, &rect); + m_length = double (rect.width / PANGO_SCALE); + m_text_height = m_height = rect.height / PANGO_SCALE; + m_lbearing = m_width / 2.; + HRect.width = 0; + int n = GetAttachedHydrogens (); + if (n > 0) { + pango_layout_set_text (m_HLayout, "H", -1); + pango_layout_get_extents (m_HLayout, &HRect, NULL); + switch (m_HPos) { + case LEFT_HPOS: + //the x offset needs to be calculated after adding possible stoichimoetry. + m_xHOffs = m_yHOffs = 0.; + break; + case RIGHT_HPOS: + m_xHOffs = rect.width / PANGO_SCALE + 1.; + m_yHOffs = 0.; + break; + case TOP_HPOS: + m_xHOffs = m_lbearing - pTheme->GetPadding () - HRect.width / PANGO_SCALE / 2.; + break; + case BOTTOM_HPOS: + m_xHOffs = m_lbearing - pTheme->GetPadding () - HRect.width / PANGO_SCALE / 2.; + m_yHOffs = m_CHeight * 2. + pTheme->GetPadding (); + break; + default: + g_critical ("This should not happen, please file a bug report"); + break; + } + if (n > 1) { + gchar const *nb = g_strdup_printf ("%d", n); + int nw = strlen (nb); + PangoAttrList *pal = pango_attr_list_new (); + text = g_strconcat ("H", nb, NULL); + pango_layout_set_text (m_HLayout, text, -1); + nw = strlen (text); + PangoAttribute *attr = pango_attr_font_desc_new (pView->GetPangoSmallFontDesc()); + attr->start_index = 1; + attr->end_index = strlen (text); + pango_attr_list_insert (pal, attr); + attr = pango_attr_rise_new (-2 * PANGO_SCALE); + attr->start_index = 1; + attr->end_index = nw; + pango_attr_list_insert (pal, attr); + pango_layout_set_attributes (m_HLayout, pal); + pango_attr_list_unref (pal); + } + pango_layout_get_extents (m_HLayout, &HRect, NULL); + // evaluate underlying rectangle size and position + if (HRect.width > 0) { + switch (m_HPos) { + case LEFT_HPOS: + m_xHOffs = -HRect.width / PANGO_SCALE - 1.; + m_xROffs = m_xHOffs; + m_length += HRect.width / PANGO_SCALE + 1.; + break; + case RIGHT_HPOS: + m_length += HRect.width / PANGO_SCALE + 1.; + break; + case TOP_HPOS: + m_yHOffs = -HRect.height / PANGO_SCALE - pTheme->GetPadding (); + m_yROffs = -HRect.height / PANGO_SCALE - pTheme->GetPadding (); + m_text_height += HRect.height / PANGO_SCALE + pTheme->GetPadding (); + m_length = MAX (m_length, HRect.width / PANGO_SCALE); + break; + case BOTTOM_HPOS: + m_text_height += HRect.height / PANGO_SCALE + pTheme->GetPadding (); + m_length = MAX (m_length, HRect.width / PANGO_SCALE); + break; + default: + break; + } + } + } + item = g_object_get_data (G_OBJECT (group), "rect"); + g_object_set (item, + "x1", x - m_lbearing + m_xROffs, + "y1", y - m_ascent + m_CHeight - pTheme->GetPadding () + m_yROffs, + "x2", x - m_lbearing + m_length + 2 * pTheme->GetPadding () + m_xROffs, + "y2", y - m_ascent + m_CHeight + m_text_height + pTheme->GetPadding () + m_yROffs, + NULL); + + item = g_object_get_data (G_OBJECT (group), "symbol"); + if (item) + g_object_set (item, + "x", x - m_lbearing, + "y", y - m_ascent + m_CHeight, + NULL); + else { + item = gnome_canvas_item_new ( + group, + gnome_canvas_pango_get_type(), + "layout", m_Layout, + "x", x - m_lbearing, + "y", y - m_ascent + m_CHeight, + NULL); + g_object_set_data (G_OBJECT (group), "symbol", item); + g_object_set_data (G_OBJECT (item), "object", this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), pData->Canvas); + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (group)); + } + item = g_object_get_data (G_OBJECT (group), "hydrogens"); + if (item) { + if (n == 0) { + gtk_object_destroy (GTK_OBJECT (item)); + g_object_set_data ((GObject*)group, "hydrogens", NULL); + } else + g_object_set (item, + "x", x - m_lbearing + m_xHOffs, + "y", y - m_ascent + m_CHeight + m_yHOffs, + NULL); + } else if (n > 0) { + item = gnome_canvas_item_new ( + group, + gnome_canvas_pango_get_type(), + "layout", m_HLayout, + "x", x - m_lbearing + m_xHOffs, + "y", y - m_ascent + m_CHeight + m_yHOffs, + NULL); + g_object_set_data (G_OBJECT (group), "hydrogens", item); + g_object_set_data (G_OBJECT (item), "object", this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), pData->Canvas); + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (group)); + } + item = g_object_get_data (G_OBJECT (group), "bullet"); + if (item) { + gtk_object_destroy (GTK_OBJECT (item)); + g_object_set_data (G_OBJECT (group), "bullet", NULL); + } + } else { + item = g_object_get_data (G_OBJECT (group), "rect"); + g_object_set (item, + "x1", x - 3, + "y1", y - 3, + "x2", x + 3, + "y2", y + 3, + NULL); + item = g_object_get_data (G_OBJECT (group), "symbol"); + if (item) { + gtk_object_destroy (GTK_OBJECT (item)); + g_object_set_data (G_OBJECT (group), "symbol", NULL); + } + item = g_object_get_data (G_OBJECT (group), "hydrogens"); + if (item) { + gtk_object_destroy (GTK_OBJECT (item)); + g_object_set_data ((GObject*)group, "hydrogens", NULL); + } + item = g_object_get_data (G_OBJECT (group), "bullet"); + if (m_DrawCircle) { + if (!item) { + double dx = pTheme->GetStereoBondWidth () / 2.; + item = gnome_canvas_item_new( + group, + gnome_canvas_ellipse_ext_get_type (), + "x1", x - dx, + "y1", y - dx, + "x2", x + dx, + "y2", y + dx, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + NULL); + g_object_set_data (G_OBJECT (group), "bullet", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), pData->Canvas); + g_object_set_data (G_OBJECT (item), "object", this); + } + } else if (item) { + gtk_object_destroy (GTK_OBJECT (item)); + g_object_set_data (G_OBJECT (group), "bullet", NULL); + } + m_length = m_text_height = 0; + gnome_canvas_item_lower_to_bottom (GNOME_CANVAS_ITEM (group)); + } + m_width /= pTheme->GetZoomFactor (); + m_height /= pTheme->GetZoomFactor (); + if (m_Changed > 0) + m_Changed--; +} + +double Atom::GetYAlign () +{ + return m_y; +} + +bool Atom::HasImplicitElectronPairs () +{ + map::iterator i; + Electron* electron = (Electron*) GetFirstChild (i); + if (m_Valence > 0) { + int nexplp = 0; //nexplp is the number of explicit lone pairs + while (electron) { + if (electron->IsPair ()) + nexplp++; + electron = (Electron*) GetNextChild (i); + } + return (m_nlp > nexplp); + } + unsigned nel = 0; + while (electron){ + if (electron->IsPair ()) + nel += 2; + else + nel++; + electron = (Electron*) GetNextChild (i); + } + nel += GetTotalBondsNumber (); + int nocc = GetChildrenNumber () + GetTotalBondsNumber (); + return (nocc < m_ValenceOrbitals) && (((m_Element->GetValenceElectrons() - m_Charge) > nel + 1) || m_ChargeAuto); +} + +bool Atom::MayHaveImplicitUnpairedElectrons () +{ + map::iterator i; + Electron* electron = (Electron*) GetFirstChild (i); + unsigned nel = 0; + while (electron) { + if (electron->IsPair ()) + nel += 2; + else + nel++; + electron = (Electron*) GetNextChild (i); + } + nel += GetTotalBondsNumber (); + return (m_ValenceOrbitals - GetTotalBondsNumber () - GetChildrenNumber () > 0) + && (((m_Element->GetValenceElectrons() - m_Charge) > nel) || m_ChargeAuto); +} + +bool Atom::GetPosition(double angle, double& x, double& y) +{ + if (angle > 360.) + angle -= 360; + else if (angle < 0.) + angle += 360; + if (((GetZ() == 6) && (m_Bonds.size() != 0)) || + !m_nH || ((m_HPos == LEFT_HPOS && (angle < 135. || angle > 225.)) || + (m_HPos == RIGHT_HPOS && (angle > 45. && angle < 315.)) || + (m_HPos == TOP_HPOS && (angle > 45. || angle > 135.)) || + (m_HPos == BOTTOM_HPOS && (angle < 225. || angle > 315.)))) { + double t = tan (angle / 180. * M_PI); + double limit = atan (m_height / m_width) * 180. / M_PI; + if (angle < limit) { + x = m_x + 12. + m_width / 2.; + y = m_y - m_width / 2. * t; + } else if (angle < 180. - limit) { + if (!isnan (t)) + x = m_x + m_height / 2. / t; + else + x = m_x; + y = m_y - m_height / 2.; + } else if (angle < 180. + limit) { + x = m_x - 12. - m_width / 2.; + y = m_y + m_width / 2. * t; + } else if (angle < 360. - limit) { + if (!isnan (t)) + x = m_x - m_height / 2. / t; + else + x = m_x; + y = m_y + m_height / 2.; + } else { + x = m_x + 12. + m_width / 2.; + y = m_y - m_width / 2. * t; + } + return true; + } + return false; +} + +void Atom::AddElectron (Electron* electron) +{ + AddChild (electron); + Update (); +} + +void Atom::RemoveElectron (Electron* electron) +{ + // remove the electron from children so that it is not taken into account when + // updating. + electron->SetParent (NULL); + Update (); + // Force view update. + Document *pDoc = reinterpret_cast (GetDocument ()); + if (pDoc) + pDoc->GetView ()->Update (this); +} + +void Atom::NotifyPositionOccupation (unsigned char pos, bool occupied) +{ + if (occupied) + m_OccupiedPos |= pos; + else + m_OccupiedPos &= ~pos; +} + +xmlNodePtr Atom::Save (xmlDocPtr xml) const +{ + xmlNodePtr node = gcu::Atom::Save (xml), child; + if (node) { + // Save electrons + map::const_iterator i; + Electron* electron = (Electron*) GetFirstChild (i); + while (electron){ + child = electron->Save (xml); + if (child) + xmlAddChild (node, child); + electron = (Electron*) GetNextChild (i); + } + } + if (m_Charge && !m_ChargeAutoPos) { + char *buf; + if (m_ChargePos) { + char const *buf; + switch (m_ChargePos) { + case POSITION_NE: + buf = "ne"; + break; + case POSITION_NW: + buf = "nw"; + break; + case POSITION_N: + buf = "n"; + break; + case POSITION_SE: + buf = "se"; + break; + case POSITION_SW: + buf = "sw"; + break; + case POSITION_S: + buf = "s"; + break; + case POSITION_E: + buf = "e"; + break; + case POSITION_W: + buf = "w"; + break; + default: + buf = "def"; // should not occur + } + xmlNewProp (node, (xmlChar*) "charge-position", (xmlChar*) buf); + } else { + buf = g_strdup_printf ("%g", m_ChargeAngle * 180. / M_PI); + xmlNewProp (node, (xmlChar*) "charge-angle", (xmlChar*) buf); + g_free (buf); + } + if (m_ChargeDist != 0.) { + buf = g_strdup_printf ("%g", m_ChargeDist); + xmlNewProp (node, (xmlChar*) "charge-dist", (xmlChar*) buf); + g_free (buf); + } + } + if (GetZ () == 6 && m_ShowSymbol) { + xmlNewProp (node, (xmlChar*) "show-symbol", (xmlChar*) "true"); + } + if (m_HPosStyle != AUTO_HPOS) { + xmlNewProp (node, (xmlChar*) "H-position", + (xmlChar*) ((m_HPosStyle == LEFT_HPOS)? "left": "right")); + } + return node; +} + +bool Atom::Load (xmlNodePtr node) +{ + if (!gcu::Atom::Load (node)) + return false; + //Load electrons + xmlNodePtr child = node->children; + Electron *electron; + while (child) { + electron = NULL; + if (!strcmp ((char*) child->name, "electron")) + electron = new Electron (this, false); + else if (!strcmp ((char*) child->name, "electron-pair")) + electron = new Electron (this, true); + if (electron && !electron->Load (child)) + return false; + child = child->next; + } + char *buf = (char*) xmlGetProp (node, (xmlChar*) "charge-position"); + m_ChargePos = 0xff; + if (buf) { + if (! strcmp (buf, "ne")) { + m_ChargePos = POSITION_NE; + m_ChargeAngle = M_PI / 4.; + } else if (! strcmp (buf, "nw")) { + m_ChargePos = POSITION_NW; + m_ChargeAngle = 3. * M_PI / 4.; + } else if (! strcmp (buf, "n")) { + m_ChargePos = POSITION_N; + m_ChargeAngle = M_PI / 2.; + } else if (! strcmp (buf, "se")) { + m_ChargePos = POSITION_SE; + m_ChargeAngle = 7. * M_PI / 4; + } else if (! strcmp (buf, "sw")) { + m_ChargePos = POSITION_SW; + m_ChargeAngle = 5. * M_PI / 4; + } else if (! strcmp (buf, "s")) { + m_ChargePos = POSITION_S; + m_ChargeAngle = 3 * M_PI / 2.; + } else if (! strcmp (buf, "e")) { + m_ChargePos = POSITION_E; + m_ChargeAngle = 0.; + } else if (! strcmp (buf, "w")) { + m_ChargePos = POSITION_W; + m_ChargeAngle = M_PI; + } + m_ChargeAutoPos = false; + xmlFree (buf); + } else { + buf = (char*) xmlGetProp(node, (xmlChar*)"charge-angle"); + if (buf) { + sscanf(buf, "%lg", &m_ChargeAngle); + m_ChargeAngle *= M_PI / 180.; + xmlFree (buf); + m_ChargePos = 0; + m_ChargeAutoPos = false; + } + } + buf = (char*) xmlGetProp(node, (xmlChar*)"charge-dist"); + if (buf) { + sscanf(buf, "%lg", &m_ChargeDist); + xmlFree (buf); + m_ChargeAutoPos = false; + } else + m_ChargeDist = 0.; + buf = (char*) xmlGetProp (node, (xmlChar*) "show-symbol"); + if (buf) { + if (!strcmp (buf, "true")) + m_ShowSymbol = true; + xmlFree (buf); + } + // Load H atoms position if any + buf = (char*) xmlGetProp (node, (xmlChar*) "H-position"); + if (buf) { + if (!strcmp (buf, "left")) + m_HPosStyle = LEFT_HPOS; + else if (!strcmp (buf, "right")) + m_HPosStyle = RIGHT_HPOS; + xmlFree (buf); + Update (); + } + return true; +} + +bool Atom::AcceptCharge (int charge) { + unsigned nb = GetTotalBondsNumber (), ne = 0; + map::iterator i; + Electron* electron = (Electron*) GetFirstChild (i); + while (electron){ + if (electron->IsPair ()) + ne += 2; + else + ne++; + electron = (Electron*) GetNextChild (i); + } + if (charge < 0) + return (m_Element->GetTotalValenceElectrons () <= m_Element->GetMaxValenceElectrons () + charge - nb - 2 * GetChildrenNumber () + ne); + if (nb) + return (m_Element->GetValenceElectrons () >= charge + nb + ne); + return (charge <= GetZ ()); +} + +void Atom::SetChargePosition (unsigned char Pos, bool def, double angle, double distance) +{ + if (Pos != m_ChargePos) { + m_ChargeAutoPos = def; + if (m_ChargePos > 0) + NotifyPositionOccupation (m_ChargePos, false); + m_ChargePos = Pos; + if (m_ChargePos > 0) + NotifyPositionOccupation (m_ChargePos, true); + } + m_ChargeAngle = angle; + m_ChargeDist = distance; + m_AvailPosCached = false; +} + +char Atom::GetChargePosition (double *Angle, double *Dist) const +{ + if (Angle) + *Angle = m_ChargeAngle; + if (Dist) + *Dist = m_ChargeDist; + return (m_ChargeAutoPos)? -1: m_ChargePos; +} + +void Atom::SetCharge (int charge) +{ + gcu::Atom::SetCharge (charge); + m_ChargeAuto = false; + Update (); +} + +void Atom::Transform2D (Matrix2D& m, double x, double y) +{ + gcu::Atom::Transform2D (m, x, y); + // Now transform electrons + map::iterator i; + Object* electron = GetFirstChild (i); + while (electron) { + electron->Transform2D (m, x, y); + electron = GetNextChild (i); + } + if (GetCharge ()) { + if (m_ChargeAutoPos) { + if (m_ChargePos > 0) + NotifyPositionOccupation (m_ChargePos, false); + m_ChargePos = 0xff; + Update (); + } else { + double xc = cos (m_ChargeAngle), yc = - sin (m_ChargeAngle); + m.Transform (xc, yc); + m_ChargeAngle = atan2 (- yc, xc); + if (m_ChargeAngle < 0) + m_ChargeAngle += 2 * M_PI; + SetChargePosition (0, FALSE, m_ChargeAngle, m_ChargeDist); + } + } +} + +static void do_display_symbol (GtkToggleAction *action, Atom *pAtom) +{ + Document *Doc = static_cast (pAtom->GetDocument ()); + Operation *Op = Doc->GetNewOperation (GCP_MODIFY_OPERATION); + Object *Obj = pAtom->GetGroup (); + Op->AddObject (Obj, 0); + pAtom->SetShowSymbol (gtk_toggle_action_get_active (action)); + pAtom->Update (); + pAtom->ForceChanged (); + pAtom->EmitSignal (OnChangedSignal); + Op->AddObject (Obj, 1); + Doc->FinishOperation (); + Doc->GetView ()->Update (pAtom); +} + +static void do_choose_H_pos (Atom* Atom) +{ + new HPosDlg (static_cast (Atom->GetDocument ()), Atom); +} + +bool Atom::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + bool result = false; + GtkActionGroup *group = NULL; + GtkAction *action; + if (GetZ () == 6 && GetBondsNumber() != 0) { + group = gtk_action_group_new ("atom"); + action = gtk_action_new ("Atom", _("Atom"),NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + action = GTK_ACTION (gtk_toggle_action_new ("show-symbol", _("Display symbol"), _("Whether to display carbon atom symbol or not"), NULL)); + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), m_ShowSymbol); + g_signal_connect (action, "toggled", G_CALLBACK (do_display_symbol), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + result = true; + } + if (m_nH) { + if (!group) { + group = gtk_action_group_new ("atom"); + action = gtk_action_new ("Atom", _("Atom"),NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + } + action = GTK_ACTION (gtk_action_new ("H-position", _("Hydrogen atoms position"), NULL, NULL)); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_choose_H_pos), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + } + if (group) { + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + } + return result | Object::BuildContextualMenu (UIManager, object, x, y); +} + +bool Atom::Match (gcu::Atom *atom, AtomMatchState &state) +{ + if (m_nH != static_cast (atom)->m_nH) + return false; + return gcu::Atom::Match (atom, state); +} + +void Atom::GetSymbolGeometry (double &width, double &height, double &angle, bool up) const +{ + if ((GetZ() != 6) || (GetBondsNumber () == 0) || m_ShowSymbol) { + width = m_SWidth; + if (up) { + height = m_SHeightH ; + angle = m_SAngleH; + } else { + height = m_SHeightL ; + angle = m_SAngleL; + } + } else + width = height = angle = 0.; +} + +void Atom::BuildSymbolGeometry (double width, double height, double ascent) +{ + m_SWidth = width / 2.; + m_SHeightH = ascent; + m_SHeightL = height - m_SHeightH; + m_SAngleH = atan2 (m_SHeightH, m_SWidth); + m_SAngleL = atan2 (m_SHeightL, m_SWidth); +} + + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/atom.h gnome-chemistry-utils-0.10.9/libs/gcp/atom.h --- gnome-chemistry-utils-0.8.6/libs/gcp/atom.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/atom.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,460 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * atom.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ATOM_H +#define GCHEMPAINT_ATOM_H + +#include +#include +#include +#include +#include +#include +#include +#include "widgetdata.h" + +namespace OpenBabel +{ + class OBAtom; +} + +/*!\file*/ +namespace gcp { + +class Bond; +class Molecule; + +/*! +Top left position for charges and electrons around an atom. +*/ +#define POSITION_NE 1 +/*! +Top right position for charges and electrons around an atom. +*/ +#define POSITION_NW 2 +/*! +Top center position for charges and electrons around an atom. +*/ +#define POSITION_N 4 +/*! +Bottom left position for charges and electrons around an atom. +*/ +#define POSITION_SE 8 +/*! +Bottom right position for charges and electrons around an atom. +*/ +#define POSITION_SW 16 +/*! +Bottom center position for charges and electrons around an atom. +*/ +#define POSITION_S 32 +/*! +Left position for charges and electrons around an atom. +*/ +#define POSITION_E 64 +/*! +Right position for charges and electrons around an atom. +*/ +#define POSITION_W 128 + +/*!\enum HPos +Represents the various possiblepositions for implicit hydrogen atoms bonded +to non metals. +*/ +typedef enum { +/*! +Hydrogen atoms at left. +*/ + LEFT_HPOS, +/*! +Hydrogen atoms at right. +*/ + RIGHT_HPOS, +/*! +Hydrogen atoms at top. +*/ + TOP_HPOS, +/*! +Hydrogen atoms at bottom. +*/ + BOTTOM_HPOS, +/*! +Automatic position. +*/ + AUTO_HPOS, +} HPos; + +class Electron; + +/*!\class Atom +Represents atoms in GChemPaint. +*/ +class Atom: public gcu::Atom, public gcu::DialogOwner +{ +public: +/*! +Default construtor. +*/ + Atom (); +/*! +@param Z the atomic number. +@param x the x coordinate. +@param y the y coordinate. +@param z the z coordinate. + + +*/ + Atom (int Z, double x, double y, double z); +/*! +@param atom an OpenBabel Atom instance. + +Builds an atom importing as many properties from an existing OpenBabel +Atom instance. +*/ + Atom (OpenBabel::OBAtom* atom); +/*! +The destructor. +*/ + virtual ~Atom (); + +public : +/*! +@param Z the new atomic number. + +Changes the atomic number of the atom. +*/ + virtual void SetZ (int Z); +/*! +@param pBond a bond. + +Adds a bond to the atom. +*/ + void AddBond (gcu::Bond* pBond); +/*! +@param pBond a bond. + +Removes a bond from the atom. +*/ + void RemoveBond (gcu::Bond* pBond); +/*! +Updates the atom after changing its bonds, charge or explicit electrons. +*/ + virtual void Update (); +/*! +@param w a GtkWidget. + +Adds the representation of the atom to the canvas widget. +*/ + virtual void Add (GtkWidget* w) const; +/*! +@param w a GtkWidget. + +Updates the representation of the atom in the canvas widget. +*/ + virtual void Update (GtkWidget* w) const; +/*! +@return the bonds number for this atom taking bond order into account +*/ + int GetTotalBondsNumber () const; //take bond order into account +/*! +@return the number of implicit hydrogens lnked to the atom. +*/ + int GetAttachedHydrogens () const {return m_nH;} +/*! +@return the position of the attached hydrogen atoms symbol when automatically +arranged. +*/ + HPos GetBestSide (); +/*! +@param Pos the approximate position of the charge. +@param Angle the angle from horizontal left. +@param x the x position of the charge symbol. +@param y the y position of the charge symbol. + +On input \a Pos can be one of POSITION_E, POSITION_N,... or 0xff, in which case, +it will be given a default value. \a x and \a y are set to the position where the charge +sign should be displayed usding the alignment code returned by this method. +@return a number to set how the charge symbol should be aligned relative to its +position. Possible values are: +- −2: center top. +- −1: right. +- 0: center. +- 1: left. +- 2: center bottom. +*/ + virtual int GetChargePosition (unsigned char& Pos, double Angle, double& x, double& y); +/*! +@param x the x position. +@param y the y position. + +This method finds an available position for drawing a charge sign or electrons and returns +it as a symbolic value (see POSITION_E, POSITION_N,...). The \a x and \a y are updated so +that they give the absolute position. +@return an available position. +*/ + virtual int GetAvailablePosition (double& x, double& y); +/*! +@param angle the angle at which a charge sign or an electron should be displayed. +@param x the x position. +@param y the y position. + +Updates \a x and \a y so that they become the absolute position corresponding to the angle +when the position is available. +@return true on success, false otherwise. +*/ + virtual bool GetPosition (double angle, double& x, double& y); +/*! +@param xml the xmlDoc used to save the document. + +Used to save the Atom to the xmlDoc. +@return the xmlNode containing the serialized atom. +*/ + virtual xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node a pointer to the xmlNode containing the serialized atom. + +Used to load an atom in memory. The Atom must already exist. +@return true on succes, false otherwise. +*/ + virtual bool Load (xmlNodePtr node); +/*! +@param node a pointer to the xmlNode containing the serialized Atom. + +Used in this class to correctly set the atomic number. +*/ + virtual bool LoadNode (xmlNodePtr node); +/*! +@param w the GtkWidget inside which the atom is displayed. +@param state the selection state of the atom. + +Used to set the selection state of the atom inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. +*/ + virtual void SetSelected (GtkWidget* w, int state); +/*! +@param nb the number of bonds to add, taking orders into account. +@return true if the operation is allowed, false if the new bonds would exceed +the maximum valence for the element. +*/ + virtual bool AcceptNewBonds (int nb = 1); +/*! +@param charge the charge that might be set. + +@return true if the charge is acceptable. +*/ + virtual bool AcceptCharge (int charge); +/*! +@return the y coordinate at half height of the atom symbol if it was carbon. +*/ + virtual double GetYAlign (); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Used to move and/or transform an object. +*/ + virtual void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +@param UIManager: the GtkUIManager to populate. +@param object the atom on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +This method is called to build a contextual menu for the atom. +*/ + bool BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y); +/*! +@param Mol: a pointer to a molecule + +Adds the atom to the molecule calling gcpMolecule::AddAtom() +*/ + virtual void AddToMolecule (Molecule* Mol); +/*! +@return true if the atom has implicit electron pairs, false otherwise. +*/ + bool HasImplicitElectronPairs (); +/*! +@return true if the atom has implcit electrons that might be unpaired. +*/ + bool MayHaveImplicitUnpairedElectrons (); +/*! +@param electron a pointer to an Electron instance. + +Adds the Electron (representing either a single electron or a pair) to the Atom. +*/ + void AddElectron (Electron* electron); +/*! +@param electron a pointer to an Electron instance. + +Removes the Electron (representing either a single electron or a pair) from the Atom. +*/ + void RemoveElectron (Electron* electron); +/*! +@param pos one of POSITION_E, POSITION_N,... +@param occupied true if occupied, false otherwise. + +Notifies if a position is occupied or not. +*/ + void NotifyPositionOccupation (unsigned char pos, bool occupied); +/*! +@param Pos one of POSITION_E, POSITION_N,... +@param def true if the position is automatic. +@param angle the angle from the east direction in the trigonometric convention. +@param distance the distance from the center of the atom, or 0. if automatic. + +Sets the relative position of a charge sign. +*/ + void SetChargePosition (unsigned char Pos, bool def, double angle = 0., double distance = 0.); +/*! +@param Angle where to store the angle from east direction in the trigonometric convention. +@param Dist where to store the distance from the center of the atom. + +@return the charge position as one of POSITION_E, POSITION_N,... +*/ + char GetChargePosition (double *Angle, double *Dist) const; +/*! +@param charge the charge to set. + +Sets the formal local charge of an atom. +*/ + void SetCharge (int charge); +/*! +@return the current formal local charge. +*/ + int GetCharge () const {return m_Charge;} +/*! +Forces an update. +*/ + void ForceChanged () {m_Changed = true;} +/*! +@param atom the atom to which the this instance is to be compared. +@param state the AtomMatchState representing the current comparison state. + +Try to match atoms from two molecules which are compared. This function calls +itself recursively until all atoms from the two molecules have been matched or +until an difference is found. Overriden methods should call this base function +and return its result. +@return true if the atoms match, false otherwise. +*/ + bool Match (gcu::Atom *atom, gcu::AtomMatchState &state); + +/*! +@param width where to store the width. +@param height where to store the height. +@param angle where to store the limit angle. +@param up whether considering the top half or the bottom half + +Used to retrieve the size of the ink rectangle of the atom symbol (if displayed). +\a angle is absolute value of the angle between an horizontal line and the line joining +the center and the top left or the bottom left vertex. +The returned width value is actually half the full width. Height is the height. +This method is used to avoid bonds lines extyending over their atoms symbols. +*/ + void GetSymbolGeometry (double &width, double &height, double &angle, bool up) const; + +protected: +/*! +@param width the witdh of the atomic symbol. +@param height the height of the atomic symbol. +@param ascent the ascent of the atomic symbol. + +Evaluates where lines representing bonds should end to not overload the symbol. +*/ + void BuildSymbolGeometry (double width, double height, double ascent); + +private: + void BuildItems (WidgetData* pData); + void UpdateAvailablePositions (); + +private: + gcu::Element *m_Element; + int m_nH; + int m_Valence; //valence + int m_ValenceOrbitals; + int m_nlp; //lone electron pairs number + int m_nlu; //single electrons number + double m_width, m_height; //size of the atomic symbol in the canvas + double m_length, m_text_height; // size of the text buffer + HPos m_HPos; //0 = left, 1 = right, 2 = top, 3 = bottom, 4 = auto + bool m_ChargeAuto; + int m_Changed; //update needs regenerate the buffer + int m_ascent; + double m_lbearing; + unsigned char m_AvailPos; //available standard positions for charge and electrons representations + unsigned char m_OccupiedPos; + bool m_AvailPosCached; + unsigned char m_ChargePos; + bool m_ChargeAutoPos; + double m_ChargeAngle; + double m_ChargeDist; + double m_ChargeWidth, m_ChargeTWidth, m_ChargeXOffset, m_ChargeYOffset; + std::list m_AngleList; + std::map m_InterBonds; /* positions betwen bonds. First value is the + angle between the two bonds and second value is the direction */ + PangoLayout *m_Layout, *m_ChargeLayout, *m_HLayout; + double m_xHOffs, m_yHOffs; + bool m_DrawCircle; + std::string m_FontName; + double m_SWidth, m_SHeightH, m_SHeightL, m_SAngleH, m_SAngleL; + // special offset for underlying rectangle; will be removed in next version + double m_xROffs, m_yROffs; + +protected: +/*! +Half the height of the "C" character. +*/ + double m_CHeight; + +/*!\fn SetShowSymbol(bool ShowSymbol) +@param ShowSymbol whether the symbol of a carbon atom is to be displayed or not. + +Sets the visibility of a carbon atom symbol in a chain. +*/ +/*!\fn GetShowSymbol() +@return whether the symbol of a carbon atom is displayed or not. +*/ +/*!\fn GetRefShowSymbol() +@return whether the symbol of a carbon atom is displayed or not as a reference. +*/ +GCU_PROP (bool, ShowSymbol) + +/*!\fn SetHPosStyle(HPos val) +@param val the new position. + +Sets the position of attached hydrogen atoms symbol. +*/ +/*!\fn GetHPosStyle() +@return the position of attached hydrogen atoms symbol. +*/ +/*!\fn GetRefHPosStyle() +@return the position of attached hydrogen atoms symbol as a reference. +*/ +GCU_PROP (HPos, HPosStyle) //0=force left, 1=force right, 2=force top, 3=force bottom, 4=auto. +}; + +} // namespace gcp + +#endif // GCHEMPAINT_ATOM_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/bond.cc gnome-chemistry-utils-0.10.9/libs/gcp/bond.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/bond.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/bond.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1092 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * bond.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "bond.h" +#include "atom.h" +#include "fragment.h" +#include "settings.h" +#include "document.h" +#include "theme.h" +#include "view.h" +#include "widgetdata.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +Bond::Bond (): gcu::Bond () +{ + m_CoordsCalc = false; + m_type = NormalBondType; + m_level = 0; +} + +Bond::Bond (Atom* first, Atom* last, unsigned char order): + gcu::Bond (first, last, order) +{ + m_CoordsCalc = false; + m_type = NormalBondType; + m_level = 0; +} + +Bond::~Bond () +{ +} + +void Bond::SetType (BondType type) +{ + m_type = type; + m_CoordsCalc = false; + if (m_type != NormalBondType) + m_order = 1; +} + +double Bond::GetAngle2D (Atom* pAtom) +{ + double x1, y1, x2, y2; + m_Begin->GetCoords (&x1, &y1); + m_End->GetCoords (&x2, &y2); + x2 -= x1; + y2 -= y1; + double length = square (x2) + square (y2); + if (length == 0.0) + return HUGE_VAL; + if (pAtom == m_Begin) + return atan2 (-y2, x2) * 180. / M_PI; + else if (pAtom == m_End) + return atan2 (y2, -x2) * 180. / M_PI; + return HUGE_VAL; +} + +bool Bond::GetLine2DCoords (unsigned Num, double* x1, double* y1, double* x2, double* y2) +{ + if ((Num == 0) || (Num > m_order)) + return false; + if (!m_CoordsCalc) { + Theme *Theme = dynamic_cast (GetDocument ())->GetTheme (); + m_Begin->GetCoords (x1, y1); + m_End->GetCoords (x2, y2); + double dx = *x2 - *x1, dy = *y2 - *y1; + double l = sqrt (square (dx) + square (dy)); + double BondDist = Theme->GetBondDist () / Theme->GetZoomFactor (); + dx *= (BondDist / l); + dy *= (BondDist / l); + // now, exclude symbols rectangles from the drawing + double ax, ay, anga, angb = atan2 (fabs (dy), fabs (dx)); + reinterpret_cast (m_Begin)->GetSymbolGeometry (ax, ay, anga, dy < 0); + bool horizontal; + if (ax > 0) { + horizontal = anga >= angb; + if (horizontal) { + ax = (ax + 2.) / Theme->GetZoomFactor (); + if (dx > 0) + ax = - ax; + *x1 -= ax; + *y1 -= ax * dy / dx; + } else { + ay = (ay + 2.) / Theme->GetZoomFactor (); + if (dy > 0) + ay = - ay; + *y1 -= ay; + *x1 -= ay * dx / dy; + } + } + reinterpret_cast (m_End)->GetSymbolGeometry (ax, ay, anga, dy > 0); + if (ax > 0) { + horizontal = anga >= angb; + if (horizontal) { + ax = (ax + 2.) / Theme->GetZoomFactor (); + if (dx > 0) + ax = - ax; + *x2 += ax; + *y2 += ax * dy / dx; + } else { + ay = (ay + 2.) / Theme->GetZoomFactor (); + if (dy > 0) + ay = - ay; + *y2 += ay; + *x2 += ay * dx / dy; + } + } + // always set the first line coords, even if changed later + m_coords[0] = *x1; + m_coords[1] = *y1; + m_coords[2] = *x2; + m_coords[3] = *y2; + if (m_order & 1) { + if (m_order == 3) { + m_coords[4] = *x1 - dy; + m_coords[5] = *y1 + dx; + m_coords[6] = *x2 - dy; + m_coords[7] = *y2 + dx; + m_coords[8] = *x1 + dy; + m_coords[9] = *y1 - dx; + m_coords[10] = *x2 + dy; + m_coords[11] = *y2 - dx; + } + } else if ((m_order == 2) && IsCyclic ()) { + Cycle* pCycle; + double a0 = atan2 (*y1 - *y2, *x2 - *x1), a1, a2; + if (IsCyclic() > 1) { + //Search prefered cycle + list::iterator i = m_Cycles.begin (), end = m_Cycles.end (); + pCycle = *i; + pCycle->GetAngles2D (this, &a1, &a2); + bool trans = sin(a0 - a1) * sin (a0 - a2) <= 0; // we prefer a cycle with cis configuration + for (; i != end; i++) { + if (trans) { + (*i)->GetAngles2D (this, &a1, &a2); + if (sin(a0 - a1) * sin (a0 - a2) > 0) { + trans = false; + pCycle = *i; + continue; + } + } + if (pCycle->IsBetterForBonds (*i)) { + if (!trans) { + (*i)->GetAngles2D (this, &a1, &a2); + if (sin(a0 - a1) * sin (a0 - a2) <= 0) + continue; + } + pCycle = *i; + } + } + } else + pCycle = m_Cycles.front(); + pCycle->GetAngles2D (this, &a1, &a2); + if (sin(a0 - a1) * sin (a0 - a2) > 0) { + double sign = sin (a0 - a1) > 0.0 ? 1.0 : -1.0; + double tanb = 0., cosa = cos (a0), sina = sin (a0); + if (m_Begin->GetZ () == 6 && !reinterpret_cast (m_Begin)->GetShowSymbol ()) + tanb = fabs (tan ((M_PI - a0 + a1) / 2)); + m_coords[4] = *x1 + BondDist * cosa * tanb - dy * sign; + m_coords[5] = *y1 + dx * sign - BondDist * sina * tanb; + tanb = (m_End->GetZ () == 6 && !reinterpret_cast (m_End)->GetShowSymbol ())? fabs (tan ((a2 - a0) / 2)): 0.; + m_coords[6] = *x2 - BondDist * cosa * tanb - dy * sign; + m_coords[7] = *y2 + dx * sign + BondDist * sina * tanb; + } else goto general; + } else { +general: + // search how many bonds have each atom + int n1 = m_Begin->GetBondsNumber () - 1, n2 = m_End->GetBondsNumber () - 1; + if (n1 == 1) { + // put the second line on the bond side if any + map ::iterator it; + Bond *bond = reinterpret_cast (m_Begin->GetFirstBond (it)); + if (bond == this) + bond = reinterpret_cast (m_Begin->GetNextBond (it)); + double a0 = atan2 (*y1 - *y2, *x2 - *x1), a1 = bond->GetAngle2DRad (reinterpret_cast (m_Begin)), a2, a; + if (fabs (fabs (a0 - a1) - M_PI) > 0.01) { + double sign = sin (a0 - a1) > 0.0 ? 1.0 : -1.0; + double tanb = ((m_Begin->GetZ () == 6)? fabs (tan ((M_PI - a0 + a1) / 2)): 0.), cosa = cos (a0), sina = sin (a0); + m_coords[4] = *x1 + BondDist * cosa * tanb - dy * sign; + m_coords[5] = *y1 + dx * sign - BondDist * sina * tanb; + tanb = 0.; + a2 = M_PI + a0; + if (a2 > 2 * M_PI) + a2 -= 2 * M_PI; + bond = reinterpret_cast (m_End->GetFirstBond (it)); + if (m_End->GetZ () == 6) + while (bond) { + if (bond != this) { + a = tan ((bond->GetAngle2DRad (reinterpret_cast (m_End)) - a0) / 2); + if (sign * a < sign * tanb) + tanb = a; + + } + bond = reinterpret_cast (m_End->GetNextBond (it)); + } + m_coords[6] = *x2 + BondDist * cosa * tanb - dy * sign; + m_coords[7] = *y2 + dx * sign - BondDist * sina * tanb; + goto done; + } + } else if (n1 > 1 && n2 > 0) { + if (n2 == 1) { + map ::iterator it; + Bond *bond = reinterpret_cast (m_End->GetFirstBond (it)); + if (bond == this) + bond = reinterpret_cast (m_End->GetNextBond (it)); + double a0 = atan2 (*y1 - *y2, *x2 - *x1), a1 = bond->GetAngle2DRad (reinterpret_cast (m_End)), a2, a; + if (fabs (fabs (a0 - a1) - M_PI) > 0.01) { + double sign = sin (a0 - a1) > 0.0 ? 1.0 : -1.0; + double tanb = 0., cosa = cos (a0), sina = sin (a0); + a2 = M_PI + a0; + if (a2 > 2 * M_PI) + a2 -= 2 * M_PI; + bond = reinterpret_cast (m_Begin->GetFirstBond (it)); + if (m_Begin->GetZ () == 6) + while (bond) { + if (bond != this) { + a = tan ((bond->GetAngle2DRad (reinterpret_cast (m_Begin)) - a2) / 2); + if (sign * a < sign * tanb) + tanb = a; + + } + bond = reinterpret_cast (m_Begin->GetNextBond (it)); + } + m_coords[4] = *x1 - BondDist * cosa * tanb - dy * sign; + m_coords[5] = *y1 + dx * sign + BondDist * sina * tanb; + tanb = (m_End->GetZ () == 6)? fabs (tan ((a1 - a0) / 2)): 0.; + m_coords[6] = *x2 - BondDist * cosa * tanb - dy * sign; + m_coords[7] = *y2 + dx * sign + BondDist * sina * tanb; + } + } else { + // use the side with more room. + double tana = 0., tanb = 0., tanc = 0., tand = 0.; + double a, a0 = GetAngle2DRad (reinterpret_cast (m_End)), a1 = GetAngle2DRad (reinterpret_cast (m_Begin)); + double cosa = cos (a0), sina = sin (a0); + map ::iterator it; + Bond *bond; + if (m_Begin->GetZ () == 6) { + bond = reinterpret_cast (m_Begin->GetFirstBond (it)); + while (bond) { + if (bond != this) { + a = tan ((bond->GetAngle2DRad (reinterpret_cast (m_Begin)) - a0) / 2); + if (a > tana) + tana = a; + if (a < tanb) + tanb = a; + + } + bond = reinterpret_cast (m_Begin->GetNextBond (it)); + } + } + if (m_End->GetZ () == 6) { + bond = reinterpret_cast (m_End->GetFirstBond (it)); + while (bond) { + if (bond != this) { + a = tan ((bond->GetAngle2DRad (reinterpret_cast (m_End)) - a1) / 2); + if (a > tanc) + tanc = a; + if (a < tand) + tand = a; + + } + bond = reinterpret_cast (m_End->GetNextBond (it)); + } + } + if (tana - tand > tanc - tanb) { + m_coords[4] = *x1 + BondDist * cosa * tanb + dy; + m_coords[5] = *y1 - dx - BondDist * sina * tanb; + m_coords[6] = *x2 + BondDist * cosa * tanc + dy; + m_coords[7] = *y2 - dx - BondDist * sina * tanc; + } else { + m_coords[4] = *x1 - BondDist * cosa * tana - dy; + m_coords[5] = *y1 + dx + BondDist * sina * tana; + m_coords[6] = *x2 - BondDist * cosa * tand - dy; + m_coords[7] = *y2 + dx + BondDist * sina * tand; + } + } + goto done; + } else if (n2 == 1) { // n1 is 0 + map ::iterator it; + Bond *bond = reinterpret_cast (m_End->GetFirstBond (it)); + if (bond == this) + bond = reinterpret_cast (m_End->GetNextBond (it)); + double a0 = atan2 (*y1 - *y2, *x2 - *x1), a1 = bond->GetAngle2DRad (reinterpret_cast (m_End)); + if (fabs (fabs (a0 - a1) - M_PI) > 0.01) { + double sign = sin (a0 - a1) > 0.0 ? 1.0 : -1.0; + double tanb, cosa = cos (a0), sina = sin (a0); + m_coords[4] = *x1 - dy * sign; + m_coords[5] = *y1 + dx * sign; + tanb = (m_End->GetZ () == 6)? fabs (tan ((a1 - a0) / 2)): 0.; + m_coords[6] = *x2 - BondDist * cosa * tanb - dy * sign; + m_coords[7] = *y2 + dx * sign + BondDist * sina * tanb; + goto done; + } + } + m_coords[0] = *x1 - dy / 2; + m_coords[1] = *y1 + dx / 2; + m_coords[2] = *x2 - dy / 2; + m_coords[3] = *y2 + dx / 2; + m_coords[4] = *x1 + dy / 2; + m_coords[5] = *y1 - dx / 2; + m_coords[6] = *x2 + dy / 2; + m_coords[7] = *y2 - dx / 2; + if (m_order == 4) { + m_coords[8] = *x1 - dy * 1.5; + m_coords[9] = *y1 + dx * 1.5; + m_coords[10] = *x2 - dy * 1.5; + m_coords[11] = *y2 + dx * 1.5; + m_coords[12] = *x1 + dy * 1.5; + m_coords[13] = *y1 - dx * 1.5; + m_coords[14] = *x2 + dy * 1.5; + m_coords[15] = *y2 - dx * 1.5; + } + } + m_CoordsCalc = true; + } +done: + Num--; + Num *= 4; + *x1 = m_coords[Num++]; + *y1 = m_coords[Num++]; + *x2 = m_coords[Num++]; + *y2 = m_coords[Num++]; + return true; +} + +Object* Bond::GetAtomAt(double x, double y, double z) +{ + double x1, y1; + m_Begin->GetCoords (&x1, &y1); + if ((fabs (x - x1) < 10) && (fabs (y - y1) < 10)) + return m_Begin; + m_End->GetCoords (&x1, &y1); + if ((fabs (x - x1) < 10) && (fabs (y - y1) < 10)) + return m_End; + return NULL; +} + +bool Bond::SaveNode (xmlDocPtr xml, xmlNodePtr node) const +{ + switch(m_type) { + case UpBondType: + xmlNewProp (node, (xmlChar*) "type", (xmlChar*) "up"); + break; + case DownBondType: + xmlNewProp (node, (xmlChar*) "type", (xmlChar*) "down"); + break; + case ForeBondType: + xmlNewProp (node, (xmlChar*) "type", (xmlChar*) "fore"); + break; + case UndeterminedBondType: + xmlNewProp (node, (xmlChar*) "type", (xmlChar*) "undetermined"); + break; + default: + break; + } + if (m_level != 0) { + char *buf = g_strdup_printf ("%d", m_level); + xmlNewProp (node, (xmlChar*) "level", (xmlChar*) buf); + g_free (buf); + } + return true; +} + +bool Bond::LoadNode (xmlNodePtr node) +{ + char* buf; + buf = (char*) xmlGetProp (node, (xmlChar*) "type"); + if (!buf) + SetType (NormalBondType); + else if (!strcmp (buf, "up")) + SetType (UpBondType); + else if (!strcmp (buf, "down")) + SetType (DownBondType); + else if (!strcmp (buf, "fore")) + SetType (ForeBondType); + else if (!strcmp (buf, "undetermined")) + SetType (UndeterminedBondType); + else + SetType (NormalBondType); + if (buf) + xmlFree (buf); + buf = (char*) xmlGetProp (node, (xmlChar*) "level"); + if (buf) { + m_level = atoi (buf); + xmlFree (buf); + } + return true; +} + +void Bond::IncOrder (int n) +{ + if (!m_Begin || !m_End) + return; + if (!((Atom*) GetAtom(0))->AcceptNewBonds () || + !((Atom*) GetAtom (1))->AcceptNewBonds ()) + m_order = 1; + else { + gcu::Bond::IncOrder (n); + if (m_order == 4) + m_order = 1; //avoid quadruple bonds for now + } + m_CoordsCalc = false; + ((Atom*) m_Begin)->Update (); + ((Atom*) m_End)->Update (); +} + +double Bond::GetDist (double x, double y) +{ + double x1, y1, x2, y2, l, d1, d2; + if (!m_Begin || !m_End) + return G_MAXDOUBLE; + Theme *Theme = dynamic_cast (GetDocument ())->GetTheme (); + double BondDist = Theme->GetBondDist () / Theme->GetZoomFactor (); + m_Begin->GetCoords (&x1, &y1); + m_End->GetCoords (&x2, &y2); + d1 = (x2 - x1) * (x1 - x) + (y2 - y1) * (y1 - y); + d2 = (x2 - x1) * (x2 - x) + (y2 - y1) * (y2 - y); + if ((d1 < 0.0) && (d2 < 0.0)) + return sqrt (square (x2 - x) + square (y2 - y)); + if ((d1 > 0.0) && (d2 > 0.0)) + return sqrt (square (x1 - x) + square (y1 - y)); + x2 -= x1; + y2 -= y1; + x -= x1; + y -= y1; + l = fabs (x2 * y - y2 * x) / sqrt(square (x2) + square (y2)); + return (l < BondDist * (m_order - 1)) ? 0 : l - BondDist * (m_order - 1); +} + +void Bond::AddCycle (Cycle* pCycle) +{ + gcu::Bond::AddCycle (pCycle); + if ((m_order == 2) && m_CoordsCalc) + SetDirty(); +} + +void Bond::RemoveCycle (Cycle* pCycle) +{ + gcu::Bond::RemoveCycle (pCycle); + if ((m_order == 2) && m_CoordsCalc) + SetDirty(); +} + +void Bond::SetDirty () +{ + Document *pDoc = (Document*) GetDocument (); + if (pDoc) + pDoc->NotifyDirty (this); + m_CoordsCalc = false; +} + +void Bond::RemoveAllCycles () +{ + gcu::Bond::RemoveAllCycles (); + if (m_order == 2) { + Document *pDoc = (Document*) GetDocument (); + if (pDoc) + pDoc->NotifyDirty (this); + m_CoordsCalc = false; + } +} + +void Bond::Move (double x, double y, double z) +{ + m_CoordsCalc = false; +} + +void Bond::Transform2D (Matrix2D& m, double x, double y) +{ + m_CoordsCalc = false; +} + +void Bond::Revert () +{ + m_CoordsCalc = false; + gcu::Atom* pAtom = m_Begin; + m_Begin = m_End; + m_End = pAtom; +} + +void Bond::SetSelected (GtkWidget* w, int state) +{ + if (!m_order) + return; + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + if (!group) + return; // this should not occur, but it might crash if it does occur after loading a bad file. + gchar const *color; + switch (state) { + case SelStateUnselected: + color = Color; + break; + case SelStateSelected: + color = SelectColor; + break; + case SelStateUpdating: + color = AddColor; + break; + case SelStateErasing: + color = DeleteColor; + break; + default: + color = Color; + break; + } + void *obj = g_object_get_data (G_OBJECT (group), "path"); + switch (GetType ()) + { + case NormalBondType: + case UndeterminedBondType: + g_object_set (obj, "outline_color", color, NULL); + break; + case ForeBondType: + case UpBondType: + case DownBondType: + g_object_set (obj, "fill_color", color, NULL); + break; + } +} + +void Bond::Add (GtkWidget* w) const +{ + if (!w) + return; + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + gcu::Atom *pAtom0, *pAtom1; + if (!(pAtom0 = GetAtom (0))) + return; + if (!(pAtom1 = GetAtom (1))) + return; + unsigned char order = GetOrder (); + if (order == 0) + return; + GnomeCanvasGroup* group; + GnomeCanvasItem* item = NULL; + group = GNOME_CANVAS_GROUP (gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL)); + g_signal_connect (G_OBJECT (group), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (group), "object", (void *) this); + bool result = false; + if (m_Crossing.size () > 0) { + map::const_iterator i, iend = m_Crossing.end (); + for (i = m_Crossing.begin (); i != iend; i++) + if ((result |= (*i).second.is_before)) + break; + } + GnomeCanvasPathDef *path = NULL; + if (result) { + path = const_cast (this)->BuildCrossingPathDef (pData); + if (path) { + GnomeCanvasItem *item = (m_type == NormalBondType || m_type == UndeterminedBondType)? + gnome_canvas_item_new ( + group, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "outline_color", "white", + "width_units", pTheme->GetBondWidth () * 3., + NULL): + gnome_canvas_item_new ( + group, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "fill_color", "white", + "width_units", 0., + NULL); + g_object_set_data (G_OBJECT (group), "back", item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + /* now bring to front, FIXME: not secure ! */ + gnome_canvas_item_lower_to_bottom (item); + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (group)); + gcu::Atom *pAtom = GetAtom (0); + if (pAtom->GetZ () != 6 || static_cast (pAtom)->GetShowSymbol ()) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom])); + pAtom = GetAtom (1); + if (pAtom->GetZ () != 6 || static_cast (pAtom)->GetShowSymbol ()) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom])); + gnome_canvas_path_def_unref (path); + } + } + path = const_cast (this)->BuildPathDef (pData); + switch (GetType ()) + { + case NormalBondType: + case UndeterminedBondType: + item = gnome_canvas_item_new( + group, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "outline_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", pTheme->GetBondWidth (), + NULL); + break; + case ForeBondType: + case UpBondType: + case DownBondType: + item = gnome_canvas_item_new ( + group, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", 0., + NULL); + break; + } + gnome_canvas_path_def_unref (path); + g_object_set_data (G_OBJECT (group), "path", item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + pData->Items[this] = group; + if (pAtom0->GetParent ()->GetType () == FragmentType) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom0->GetParent ()])); + else if (pAtom0->GetZ() != 6 || static_cast (pAtom0)->GetShowSymbol ()) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom0])); + else + gnome_canvas_item_lower_to_bottom (GNOME_CANVAS_ITEM (pData->Items[pAtom0])); + map::iterator i; + Object* electron = pAtom0->GetFirstChild (i); + while (electron) { + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[electron])); + electron = pAtom0->GetNextChild (i); + } + if (pAtom1->GetParent ()->GetType () == FragmentType) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom1->GetParent ()])); + else if (pAtom1->GetZ () != 6 || static_cast (pAtom1)->GetShowSymbol ()) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom1])); + else + gnome_canvas_item_lower_to_bottom (GNOME_CANVAS_ITEM (pData->Items[pAtom1])); + electron = pAtom1->GetFirstChild (i); + while (electron) { + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[electron])); + electron = pAtom1->GetNextChild (i); + } +} + +GnomeCanvasPathDef* Bond::BuildPathDef (WidgetData* pData) +{ + double x1, y1, x2, y2, x, y, dx, dy, dx1, dy1; + int i, n; + GnomeCanvasPathDef* path = gnome_canvas_path_def_new (); + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + switch (GetType ()) + { + case NormalBondType: + i = 1; + while (GetLine2DCoords (i++, &x1, &y1, &x2, &y2)) + { + gnome_canvas_path_def_moveto (path, x1 * pTheme->GetZoomFactor (), y1 * pTheme->GetZoomFactor ()); + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor (), y2 * pTheme->GetZoomFactor ()); + } + break; + case UpBondType: + GetLine2DCoords(1, &x1, &y1, &x2, &y2); + gnome_canvas_path_def_moveto (path, x1 * pTheme->GetZoomFactor (), y1 * pTheme->GetZoomFactor ()); + x = sqrt (square (x2 - x1) + square (y2 - y1)); + dx = (y1 - y2) / x * pTheme->GetStereoBondWidth () / 2; + dy = (x2 - x1) / x * pTheme->GetStereoBondWidth () / 2; + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor () + dx, y2 * pTheme->GetZoomFactor () + dy); + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor () -dx, y2 * pTheme->GetZoomFactor () -dy); + gnome_canvas_path_def_closepath (path); + break; + case DownBondType: + { + double xi[8]; + GetLine2DCoords (1, &x1, &y1, &x2, &y2); + x1 *= pTheme->GetZoomFactor (); + y1 *= pTheme->GetZoomFactor (); + x2 *= pTheme->GetZoomFactor (); + y2 *= pTheme->GetZoomFactor (); + x = sqrt (square (x2 - x1) + square (y2 - y1)); + n = int (floor(x / (pTheme->GetHashDist () + pTheme->GetHashWidth ()))); + dx1 = (x2 - x1) / x * pTheme->GetHashWidth (); + dy1 = (y2 - y1) / x * pTheme->GetHashWidth (); + dx = (y1 - y2) / x * pTheme->GetStereoBondWidth () / 2; + dy = (x2 - x1) / x * pTheme->GetStereoBondWidth () / 2; + gnome_canvas_path_def_moveto (path, xi[0] = x1 + dx, xi[1] = y1 + dy); + gnome_canvas_path_def_lineto (path, xi[2] = x1 - dx, xi[3] = y1 - dy); + dx *= (1 - pTheme->GetHashWidth () / x); + dy *= (1 - pTheme->GetHashWidth () / x); + gnome_canvas_path_def_lineto (path, xi[4] = x1 + dx1 - dx, xi[5] = y1 + dy1 - dy); + gnome_canvas_path_def_lineto (path, xi[6] = x1 + dx1 + dx, xi[7] = y1 + dy1 + dy); + gnome_canvas_path_def_lineto (path, xi[0], xi[1]); + gnome_canvas_path_def_closepath_current (path); + dx = (x2 - x1) / x * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + - (y1 - y2) / x * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / x; + dy = (y2 - y1) / x * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + - (x2 - x1) / x * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / x; + dx1 = (x2 - x1) / x * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + + (y1 - y2) / x * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / x; + dy1 = (y2 - y1) / x * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + + (x2 - x1) / x * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / x; + for (int i = 1; i < n; i++) { + gnome_canvas_path_def_moveto (path, xi[0] += dx, xi[1] += dy); + gnome_canvas_path_def_lineto (path, xi[2] += dx1, xi[3] += dy1); + gnome_canvas_path_def_lineto (path, xi[4] += dx1, xi[5] += dy1); + gnome_canvas_path_def_lineto (path, xi[6] += dx, xi[7] += dy); + gnome_canvas_path_def_lineto (path, xi[0], xi[1]); + gnome_canvas_path_def_closepath_current (path); + } + break; + } + case ForeBondType: + GetLine2DCoords (1, &x1, &y1, &x2, &y2); + x = sqrt (square (x2 - x1) + square (y2 - y1)); + dx = (y1 - y2) / x * pTheme->GetStereoBondWidth () / 2; + dy = (x2 - x1) / x * pTheme->GetStereoBondWidth () / 2; + gnome_canvas_path_def_moveto (path, x1 * pTheme->GetZoomFactor () + dx, y1 * pTheme->GetZoomFactor () + dy); + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor () + dx, y2 * pTheme->GetZoomFactor () + dy); + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor () -dx, y2 * pTheme->GetZoomFactor () -dy); + gnome_canvas_path_def_lineto (path, x1 * pTheme->GetZoomFactor () -dx, y1 * pTheme->GetZoomFactor () -dy); + gnome_canvas_path_def_closepath (path); + break; + case UndeterminedBondType: + { + GetLine2DCoords (1, &x1, &y1, &x2, &y2); + x1 *= pTheme->GetZoomFactor (); + y1 *= pTheme->GetZoomFactor (); + x2 *= pTheme->GetZoomFactor (); + y2 *= pTheme->GetZoomFactor (); + gnome_canvas_path_def_moveto (path, x1, y1); + double length; + length = sqrt (square (x2 - x1) + square (y2 - y1)); + n = (int) length / 3; + int s = 1; + dx = (x2 - x1) / n; + dy = (y2 - y1) / n; + x = x1; + y = y1; + for (int i = 1; i < n; i++) { + x1 = x + dx / 3 + dy /1.5 * s; + y1 = y + dy / 3 - dx /1.5 * s; + dx1 = x + dx / 1.5 + dy /1.5 * s; + dy1 = y + dy / 1.5 - dx /1.5 * s; + x += dx; + y += dy; + s *= -1; + gnome_canvas_path_def_curveto (path, x1, y1, dx1, dy1, x, y); + } + x1 = x + dx / 3 + dy /1.5 * s; + y1 = y + dy / 3 - dx /1.5 * s; + dx1 = x + dx / 1.5 + dy /1.5 * s; + dy1 = y + dy / 1.5 - dx /1.5 * s; + gnome_canvas_path_def_curveto (path, x1, y1, dx1, dy1, x2, y2); + break; + } + } + return path; +} + +GnomeCanvasPathDef *Bond::BuildCrossingPathDef (WidgetData* pData) +{ + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasPathDef* path = NULL; + double x1, y1, x2, y2, x, dx, dy; + int i; + switch (GetType ()) { + case NormalBondType: + i = 1; + path = gnome_canvas_path_def_new (); + while (GetLine2DCoords (i++, &x1, &y1, &x2, &y2)) { + dx = (x2 - x1) / 10.; + dy = (y2 - y1) / 10.; + x1 += dx; + x2 -= dx; + y1 += dy; + y2 -= dy; + gnome_canvas_path_def_moveto (path, x1 * pTheme->GetZoomFactor (), y1 * pTheme->GetZoomFactor ()); + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor (), y2 * pTheme->GetZoomFactor ()); + } + break; + case UpBondType: + break; + case DownBondType: + break; + case ForeBondType: + path = gnome_canvas_path_def_new (); + GetLine2DCoords (1, &x1, &y1, &x2, &y2); + dx = (x2 - x1) / 10.; + dy = (y2 - y1) / 10.; + x1 += dx; + x2 -= dx; + y1 += dy; + y2 -= dy; + x = sqrt(square(x2 - x1) + square(y2 - y1)); + dx = (y1 - y2) / x * pTheme->GetStereoBondWidth () / 2; + dy = (x2 - x1) / x * pTheme->GetStereoBondWidth () / 2; + dx += (dx > 0.)? 1.: -1.; + dy += (dy > 0.)? 1.: -1.; + gnome_canvas_path_def_moveto (path, x1 * pTheme->GetZoomFactor () + dx, y1 * pTheme->GetZoomFactor () + dy); + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor () + dx, y2 * pTheme->GetZoomFactor () + dy); + gnome_canvas_path_def_lineto (path, x2 * pTheme->GetZoomFactor () -dx, y2 * pTheme->GetZoomFactor () -dy); + gnome_canvas_path_def_lineto (path, x1 * pTheme->GetZoomFactor () -dx, y1 * pTheme->GetZoomFactor () -dy); + gnome_canvas_path_def_closepath (path); + break; + case UndeterminedBondType: + break; + } + return path; +} + +void Bond::Update(GtkWidget* w) const +{ + if (!w || !m_order) + return; + WidgetData* pData = (WidgetData*) g_object_get_data(G_OBJECT(w), "data"); + if (pData->Items[this] == NULL) + return; + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + bool result = false; + if (m_Crossing.size () > 0) { + map::const_iterator i, iend = m_Crossing.end (); + for (i = m_Crossing.begin (); i != iend; i++) + if ((result |= (*i).second.is_before)) + break; + } + GnomeCanvasPathDef* path; + void * obj; + GnomeCanvasGroup *group = pData->Items[this]; + if (!group) { + Add (w); + return; + } + obj = g_object_get_data(G_OBJECT(group), "back"); + if (result) { + path = const_cast (this)->BuildCrossingPathDef (pData); + if (path) { + if (obj) + g_object_set (obj, "bpath", path, NULL); + else { + GnomeCanvasItem *item = (m_type == NormalBondType || m_type == UndeterminedBondType)? + gnome_canvas_item_new ( + group, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "outline_color", "white", + "width_units", pTheme->GetBondWidth () * 3., + NULL): + gnome_canvas_item_new ( + group, + gnome_canvas_bpath_ext_get_type(), + "bpath", path, + "fill_color", "white", + "width_units", 0., + NULL); + g_object_set_data (G_OBJECT (group), "back", item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + /* now bring to front, FIXME: not secure ! */ + gnome_canvas_item_lower_to_bottom (item); + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (group)); + gcu::Atom *pAtom = GetAtom (0); + if (pAtom->GetZ () != 6 || static_cast (pAtom)->GetShowSymbol ()) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom])); + pAtom = GetAtom (1); + if (pAtom->GetZ () != 6 || static_cast (pAtom)->GetShowSymbol ()) + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM (pData->Items[pAtom])); + } + gnome_canvas_path_def_unref (path); + } + } else if (obj) { + g_object_set_data (G_OBJECT(group), "back", NULL); + } + path = const_cast (this)->BuildPathDef (pData); + obj = g_object_get_data(G_OBJECT(group), "path"); + if (obj) { + g_object_set (obj, "bpath", path, NULL); + if (m_type == NormalBondType || m_type == UndeterminedBondType) + g_object_set (obj, "width_units", pTheme->GetBondWidth (), NULL); + } + gnome_canvas_path_def_unref (path); +} + +double Bond::GetYAlign () +{ + double x1, y1, x2, y2; + m_Begin->GetCoords(&x1, &y1); + m_End->GetCoords (&x2, &y2); + return (y1 + y2) / 2; +} + +bool Bond::IsCrossing (Bond *pBond) +{ + double a1, a2, b1, b2, c1, c2, d, d1, d2; + double x0, x1, x2, x3, y0, y1, y2, y3, z0, z1, z2, z3; + if (m_Begin == pBond->m_Begin || m_Begin == pBond->m_End || + m_End == pBond->m_Begin || m_End == pBond->m_End) + return false; + m_Begin->GetCoords (&x0, &y0, &z0); + m_End->GetCoords (&x1, &y1, &z1); + pBond->m_Begin->GetCoords (&x2, &y2, &z2); + pBond->m_End->GetCoords (&x3, &y3, &z3); + a1 = x1 - x0; + a2 = y1 - y0; + b1 = x2 - x3; + b2 = y2 - y3; + d = a1 * b2 - a2 * b1; + if (d == 0.) + return false; + c1 = x2 - x0; + c2 = y2 - y0; + d1 = c1 * b2 - c2 * b1; + d2 = c2 * a1 - c1 * a2; + a1 = d1 / d; + a2 = d2 / d; + if ((a1 <= 0.) || (a1 >= 1.)) + return false; + if ((a2 > 0.) && (a2 < 1.)) { + double z = z0 + a1 * (z1 - z0), z_ = z2 + a2 * (z3 - z2); + bool is_before = z > z_ || m_level > pBond->m_level; + if (z == z_ && m_level == pBond->m_level) { + if (m_type == ForeBondType && pBond->m_type != ForeBondType) { + is_before = true; + pBond->m_level -= 1; + } else { + is_before = false; + pBond->m_level += 1; + } + } + m_Crossing[pBond].a = a1; + m_Crossing[pBond].is_before = is_before; + pBond->m_Crossing[this].a = a2; + pBond->m_Crossing[this].is_before = !is_before; + return true; + } else + return false; +} + +static void on_bring_to_front (Bond *pBond) +{ + pBond->BringToFront (); +} + +static void on_move_to_back (Bond *pBond) +{ + pBond->MoveToBack (); +} + +bool Bond::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + Object *pAtom = GetAtomAt (x, y); + if (pAtom) + return pAtom->BuildContextualMenu (UIManager, object, x, y); + if (m_Crossing.size () == 0) + return Object::BuildContextualMenu (UIManager, object, x, y); + bool is_before = false, is_after = false; + if (m_Crossing.size () > 0) { + map::iterator i, iend = m_Crossing.end (); + for (i = m_Crossing.begin (); i != iend; i++) { + if (m_level == (*i).first->m_level || m_type != (*i).first->m_type) + continue; + if ((*i).second.is_before) + is_before = true; + else + is_after = true; + } + } + if (!(is_before || is_after)) + return Object::BuildContextualMenu (UIManager, object, x, y); + GtkActionGroup *group = gtk_action_group_new ("bond"); + GtkAction *action; + action = gtk_action_new ("Bond", _("Bond"), NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + if (is_before) { + action = gtk_action_new ("MoveBack", _("Move to back"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (on_move_to_back), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + } + if (is_after) { + action = gtk_action_new ("BringFront", _("Bring to front"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (on_bring_to_front), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + } + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + Object::BuildContextualMenu (UIManager, object, x, y); + return true; +} + +void Bond::MoveToBack () +{ + View *pView = reinterpret_cast (GetDocument ())->GetView (); + map::iterator i, iend = m_Crossing.end (); + for (i = m_Crossing.begin (); i != iend; i++) { + if (m_level > (*i).first->m_level && m_type == (*i).first->m_type) { + m_level = (*i).first->m_level - 1; + (*i).second.is_before = false; + (*i).first->m_Crossing[this].is_before = true; + pView->Update ((*i).first); + } + } + pView->Update (this); +} + +void Bond::BringToFront () +{ + View *pView = reinterpret_cast (GetDocument ())->GetView (); + map::iterator i, iend = m_Crossing.end (); + for (i = m_Crossing.begin (); i != iend; i++) { + if (m_level < (*i).first->m_level && m_type == (*i).first->m_type) { + m_level = (*i).first->m_level + 1; + (*i).second.is_before = true; + (*i).first->m_Crossing[this].is_before = false; + pView->Update ((*i).first); + } + } + pView->Update (this); +} + +struct BondTypeStruct { + BondType type; + bool invert; +}; +static map BondTypesValues; +bool Bond::SetProperty (unsigned property, char const *value) +{ + switch (property) { + case GCU_PROP_BOND_TYPE: { + if (BondTypesValues.size () == 0) { + struct BondTypeStruct s; + s.invert = false; + s.type = NormalBondType; + BondTypesValues["normal"] = s; + s.type = ForeBondType; + BondTypesValues["bold"] = s; + s.type = UpBondType; + BondTypesValues["wedge"] = s; + s.type = DownBondType; + BondTypesValues["hash"] = s; + s.invert = true; + s.type = UpBondType; + BondTypesValues["wedge-invert"] = s; + s.type = DownBondType; + BondTypesValues["hash-invert"] = s; + } + map::iterator it; + if ((it = BondTypesValues.find (value)) != BondTypesValues.end ()) { + m_type = (*it).second.type; + if ((*it).second.invert) + Revert (); + } + break; + } + default: + gcu::Bond::SetProperty (property, value); + } + return true; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/bond.h gnome-chemistry-utils-0.10.9/libs/gcp/bond.h --- gnome-chemistry-utils-0.8.6/libs/gcp/bond.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/bond.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,279 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * bond.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_BOND_H +#define GCHEMPAINT_BOND_H + +#include +#include +#include + +namespace gcp { + +/*!\enum BondType gcp/bond.h +The bond types recognized in GChemPaint. Possible values are: + - NormalBondType: normal bonds, + - UpBondType: wedge bond, + - DownBondType: hash bond, + - ForeBondType: large bond, + - UndeterminedBondType: squiggled bond. +*/ +typedef enum +{ + NormalBondType, + UpBondType, + DownBondType, + ForeBondType, + UndeterminedBondType +} BondType; + +/*!\struct BondCrossing gcp/bond.h +This structure is used for crossing bonds, so that the bond behind the other is +partially hidden. +*/ +typedef struct { +/*! +The position of the crossing alog the bond: 0 if at start, 1 at end. +*/ + double a; +/*! +Whether the bond is above the other or not. +*/ + bool is_before; +} BondCrossing; + +class Atom; +class WidgetData; + +/*!\class Bond gcp/bond.h +This class is used to represent bonds. +*/ + +class Bond: public gcu::Bond +{ +public: +/*! +The default constructor. +*/ + Bond (); +/*! +@param first the first bonded atom. +@param last the last bonded atom. +@param order the bond order + +Constructs a bond given its two terminal atoms and its order. +*/ + Bond (Atom* first, Atom* last, unsigned char order); +/*! +The destructor. +*/ + virtual ~Bond (); + +/*! +@param x the x coordinate +@param y the y coordinate +@param z the z coordinate + +@return a pointer to a bonded atom at or near position defined by the +coordinates passed as parameters. +*/ + Object* GetAtomAt (double x, double y, double z = 0.); +/*! +@return the type of the bond. +*/ + BondType GetType() const {return m_type;} +/*! +@param type the new bond type. + +Sets the bond type. +*/ + void SetType (BondType type); +/*! +@param pAtom one of the bonded atoms + +@return the angle (0 to 306°) that the bond makes from the horizontal when +starting from \a pAtom. +*/ + double GetAngle2D (Atom* pAtom); +/*! +@param pCycle a cycle containing the bond. + +Notifies the bond it is in the cycle. +*/ + void AddCycle (gcu::Cycle* pCycle); +/*! +@param pCycle a cycle. + +Notifies the bond that it is not anymore in the cycle. +*/ + void RemoveCycle (gcu::Cycle* pCycle); +/*! +Clears the list of the cycles containing the bond. +*/ + void RemoveAllCycles (); +/*! +@param Num the index of the line representing a, possibly, multiple bond. +@param x1 where to store the first x coordinate. +@param y1 where to store the first y coordinate. +@param x2 where to store the second x coordinate. +@param y2 where to store the second y coordinate. + +Retrievers the coordinates of one of the lines representing the bond. Num must +be lower than the bond order to succeed. +@return true on success, false otherwise. +*/ + bool GetLine2DCoords (unsigned Num, double* x1, double* y1, double* x2, double* y2); +/*! +@param xml the xmlDoc used to save the document. +@param node a pointer to the xmlNode to which this Bond is serialized. + +Saves the GChemPaint Bond class specific properties, such as the bond type +(see gcp::BondType for more information). +*/ + virtual bool SaveNode (xmlDocPtr xml, xmlNodePtr node) const; +/*! +@param node a pointer to the xmlNode containing the serialized Bond. + +Loads properties specific to GChemPaint bonds. +*/ + bool LoadNode (xmlNodePtr node); +/*! +@param w the GtkWidget inside which the bond is displayed. + +Used to update the representation of the bond in the widget. +*/ + void Update (GtkWidget* w) const; +/*! +@param x the x component of the transation vector. +@param y the y component of the transation vector. +@param z the z component of the transation vector. + +Used to move a bond. Just tells the bond it has been moved and that it's +coordinates need to be reevaluated from the new atomic positions. +*/ + void Move (double x, double y, double z = 0); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Used to move and/or transform a bond. Just tells the bond it has been moved +and /or rotated and that it's coordinates need to be reevaluated from the new +atomic positions. +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +@param x the x coordinate. +@param y the x coordinate. + +Evaluates the distance from the point with coordinates \a x and \a y to the bond. +The line segment joining the two atoms is used whatever the type and the order +of the bond. +@return the calculated distance in pm. +*/ + double GetDist (double x, double y); +/*! +Tells that the bond has changed, and that the items representing it should be +updated accordingly. +*/ + void SetDirty (); +/*! +Exchanges the start and end atoms. +*/ + void Revert (); +/*! +@param n the bond order increment. If not given, the default is 1. + +Tries to increment the bond order by n units. If something goes wrong, the +bond order is set to 1. +*/ + void IncOrder (int n = 1); +/*! +@param w the GtkWidget inside which the bond is displayed. +@param state the selection state of the bond. + +Used to set the selection state of the bond inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. +*/ + void SetSelected (GtkWidget* w, int state); +/*! +@param w the GtkWidget inside which the bond will be displayed. + +Used to add a representation of the bond in the widget. +*/ + void Add (GtkWidget* w) const; +/*! +Used to retrieve the y coordinate for alignment. +@return y coordinate of the bond center. +*/ + double GetYAlign (); +/*! +@param pBond a bond which might cross. + +The lines representing two bonds might cross. This method detects this +condition. +@return true if bonds cross, false otherwise. +*/ + bool IsCrossing (Bond *pBond); +/*! +@param UIManager: the GtkUIManager to populate. +@param object the atom on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +This method is called to build a contextual menu for the atom. +*/ + bool BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y); +/*! +Move the bond to the lowest position. It has an effect only for crossing bonds. +*/ + void MoveToBack (); +/*! +Brings the bond to front. It has an effect only for crossing bonds. +*/ + void BringToFront (); +/*! +@param property the property id as defined in objprops.h +@param value the property value as a string + +Used when loading to set properties for the bond. This method supports +GCU_PROP_BOND_TYPE and calls gcu::Bond::SetProperty() for other properties. +@return true if the property could be set, or if the property is not relevant, false otherwise. +*/ + bool SetProperty (unsigned property, char const *value); + +private: + GnomeCanvasPathDef* BuildPathDef (WidgetData* pData); + GnomeCanvasPathDef* BuildCrossingPathDef (WidgetData* pData); + BondType m_type; + double m_coords[16];//coordinates of the lines used to represent the bond in the canvas + bool m_CoordsCalc; //true if m_coords have been calculated, false else + std::map m_Crossing; + int m_level; // to know which bond should be considered front +}; + +} // namespace gcp + +#endif // GCHEMPAINT_BOND_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/docprop.cc gnome-chemistry-utils-0.10.9/libs/gcp/docprop.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/docprop.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/docprop.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,216 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * docprop.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "docprop.h" +#include "document.h" +#include "application.h" +#include "theme.h" +#include "window.h" +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +static void on_theme_changed (GtkComboBox *box, DocPropDlg *dlg) +{ + dlg->OnThemeChanged (TheThemeManager.GetTheme (gtk_combo_box_get_active_text (box))); +} + +static void on_title_changed (GtkEntry *entry, DocPropDlg *dlg) +{ + dlg->OnTitleChanged (gtk_entry_get_text (entry)); +} + +static bool on_title_focused_out (GtkEntry *entry, GdkEventFocus *event, DocPropDlg *dlg) +{ + dlg->OnTitleChanged (gtk_entry_get_text (entry)); + return false; +} + +static void on_name_changed (GtkEntry *entry, DocPropDlg *dlg) +{ + dlg->OnNameChanged (gtk_entry_get_text (entry)); +} + +static bool on_name_focused_out (GtkEntry *entry, GdkEventFocus *event, DocPropDlg *dlg) +{ + dlg->OnNameChanged (gtk_entry_get_text (entry)); + return false; +} + +static void on_mail_changed (GtkEntry *entry, DocPropDlg *dlg) +{ + dlg->OnMailChanged (gtk_entry_get_text (entry)); +} + +static bool on_mail_focused_out (GtkEntry *entry, GdkEventFocus *event, DocPropDlg *dlg) +{ + dlg->OnMailChanged (gtk_entry_get_text (entry)); + return false; +} + +static void on_comments_changed (GtkTextBuffer *buffer, DocPropDlg *dlg) +{ + GtkTextIter start, end; + gtk_text_buffer_get_bounds (buffer, &start, &end); + char *text = gtk_text_buffer_get_text (buffer, &start, &end, true); + dlg->OnCommentsChanged (text); + g_free (text); +} + +DocPropDlg::DocPropDlg (Document* pDoc): + Dialog (pDoc->GetApplication (), GLADEDIR"/docprop.glade", "properties", pDoc), + Object () +{ + if (!xml) { + delete this; + return; + } + m_pDoc = pDoc; + Title = GTK_ENTRY (glade_xml_get_widget (xml, "title")); + const gchar* chn; + chn = m_pDoc->GetTitle (); + if (chn) + gtk_entry_set_text (Title, chn); + g_signal_connect (G_OBJECT (Title), "activate", G_CALLBACK (on_title_changed), this); + g_signal_connect (G_OBJECT (Title), "focus-out-event", G_CALLBACK (on_title_focused_out), this); + Name = GTK_ENTRY (glade_xml_get_widget (xml, "name")); + chn = m_pDoc->GetAuthor (); + if (chn) + gtk_entry_set_text (Name, chn); + g_signal_connect (G_OBJECT (Name), "activate", G_CALLBACK (on_name_changed), this); + g_signal_connect (G_OBJECT (Name), "focus-out-event", G_CALLBACK (on_name_focused_out), this); + Mail = GTK_ENTRY (glade_xml_get_widget (xml, "mail")); + chn = m_pDoc->GetMail (); + if (chn) + gtk_entry_set_text (Mail, chn); + g_signal_connect (G_OBJECT (Mail), "activate", G_CALLBACK (on_mail_changed), this); + g_signal_connect (G_OBJECT (Mail), "focus-out-event", G_CALLBACK (on_mail_focused_out), this); + CreationDate = GTK_LABEL (glade_xml_get_widget(xml, "creation")); + const GDate* Date = pDoc->GetCreationDate (); + gchar tmp[64]; + /* The following format prints date as "Monday, July 8, 2002" */ + if (g_date_valid (Date)) { + g_date_strftime (tmp, sizeof (tmp), _("%A, %B %d, %Y"), Date); + gtk_label_set_text (CreationDate, tmp); + } + RevisionDate = GTK_LABEL (glade_xml_get_widget (xml, "revision")); + Date = pDoc->GetRevisionDate (); + if (g_date_valid(Date)) + { + g_date_strftime (tmp, sizeof (tmp), _("%A, %B %d, %Y"), Date); + gtk_label_set_text (RevisionDate, tmp); + } + Comments = GTK_TEXT_VIEW (glade_xml_get_widget (xml, "comments")); + Buffer = gtk_text_view_get_buffer (Comments); + chn = m_pDoc->GetComment (); + if(chn) + gtk_text_buffer_set_text (Buffer, chn , -1); + g_signal_connect (G_OBJECT (Buffer), "changed", G_CALLBACK (on_comments_changed), this); + GtkWidget *w = glade_xml_get_widget (xml, "props-table"); + m_Box = GTK_COMBO_BOX (gtk_combo_box_new_text ()); + gtk_table_attach (GTK_TABLE (w), GTK_WIDGET (m_Box), 1, 2, 8, 9, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + list names = TheThemeManager.GetThemesNames (); + list ::iterator i, end = names.end (); + Theme *theme; + m_Lines = names.size (); + int nb = 0, n; + for (i = names.begin (), n = 0; i != end; i++, n++) { + gtk_combo_box_append_text (m_Box, (*i).c_str ()); + theme = TheThemeManager.GetTheme (*i); + if (theme) { + theme->AddClient (this); + if (theme == m_pDoc->GetTheme ()) + nb = n; + } + } + gtk_combo_box_set_active (m_Box, nb); + m_ChangedSignal = g_signal_connect (G_OBJECT (m_Box), "changed", G_CALLBACK (on_theme_changed), this); + gtk_widget_show_all(GTK_WIDGET (dialog)); +} + +DocPropDlg::~DocPropDlg () +{ + list names = TheThemeManager.GetThemesNames (); + list ::iterator i, end = names.end (); + Theme *theme; + for (i = names.begin (); i != end; i++) { + theme = TheThemeManager.GetTheme (*i); + if (theme) + theme->RemoveClient (this); + } +} + +void DocPropDlg::OnThemeNamesChanged () +{ + list names = TheThemeManager.GetThemesNames (); + list ::iterator i, end = names.end (); + int n, nb = gtk_combo_box_get_active (m_Box); + g_signal_handler_block (m_Box, m_ChangedSignal); + while (m_Lines--) + gtk_combo_box_remove_text (m_Box, 0); + for (i = names.begin (), n = 0; i != end; i++, n++) { + gtk_combo_box_append_text (m_Box, (*i).c_str ()); + if (m_pDoc->GetTheme () == TheThemeManager.GetTheme (*i)) + nb = n; + } + m_Lines = names.size (); + gtk_combo_box_set_active (m_Box, nb); + g_signal_handler_unblock (m_Box, m_ChangedSignal); +} + +void DocPropDlg::OnThemeChanged (Theme *theme) +{ + m_pDoc->SetTheme (theme); +} + +void DocPropDlg::OnTitleChanged (char const *title) +{ + m_pDoc->SetTitle (title); + Window *window = m_pDoc->GetWindow (); + if (window) + window->SetTitle (m_pDoc->GetTitle ()); +} + +void DocPropDlg::OnNameChanged (char const *name) +{ + m_pDoc->SetAuthor (name); +} + +void DocPropDlg::OnMailChanged (char const *mail) +{ + m_pDoc->SetMail (mail); +} + +void DocPropDlg::OnCommentsChanged (char const *comment) +{ + m_pDoc->SetComment (comment); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/docprop.h gnome-chemistry-utils-0.10.9/libs/gcp/docprop.h --- gnome-chemistry-utils-0.8.6/libs/gcp/docprop.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/docprop.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,103 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * docprop.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_DOC_PROP_H +#define GCHEMPAINT_DOC_PROP_H + +#include +#include +#include + +/*!\file*/ +namespace gcp { + +class Document; +class Theme; + +/*!\class DocPropDlg gcp/docprop.h +The document property dialog. +*/ +class DocPropDlg: public gcu::Dialog, gcu::Object +{ +public: +/*! +@param pDoc the document. + +Constructs a property dialog for \a pDoc. +*/ + DocPropDlg (Document* pDoc); +/*! +The destructor. +*/ + virtual ~DocPropDlg (); + +/*! +Called by the framework to update themes names. +*/ + void OnThemeNamesChanged (); +/*! +@param theme the new document theme. + +Called by the framework when the theme changed. +*/ + void OnThemeChanged (Theme *theme); +/*! +@param title the new document title. + +Called by the framework when the document title changed. +*/ + void OnTitleChanged (char const *title); +/*! +@param title the new author name. + +Called by the framework when the author name changed. +*/ + void OnNameChanged (char const *title); +/*! +@param title the new author mail. + +Called by the framework when the author mail changed. +*/ + void OnMailChanged (char const *title); +/*! +@param title the new document comments. + +Called by the framework when the document comments changed. +*/ + void OnCommentsChanged (char const *title); + +private: + Document* m_pDoc; + GtkEntry *Title, *Name, *Mail; + GtkLabel *CreationDate, *RevisionDate; + GtkTextView *Comments; + GtkTextBuffer *Buffer; + GtkComboBox *m_Box; + unsigned m_Lines; + gulong m_ChangedSignal; +}; + +} // namespace gcp + +#endif //GCHEMPAINT_DOC_PROP_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/document.cc gnome-chemistry-utils-0.10.9/libs/gcp/document.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/document.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/document.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1546 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * document.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "view.h" +#include "document.h" +#include "settings.h" +#include "docprop.h" +#include "fragment.h" +#include "reaction.h" +#include "mesomery.h" +#include "molecule.h" +#include "residue.h" +#include "text.h" +#include "theme.h" +#include "tool.h" +#include "window.h" +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace OpenBabel; +using namespace std; +using namespace gcu; + +namespace gcp { + +SignalId OnChangedSignal; +SignalId OnDeleteSignal; +SignalId OnThemeChangedSignal; + +Document::Document (Application *App, bool StandAlone, Window *window): + gcu::Document (App), + m_FileType ("application/x-gchempaint"), + m_OpID (0), + m_LastStackSize (0) +{ + m_pApp = App; + m_pView = NULL; + m_Window = window; + m_filename = NULL; + m_label = NULL; + m_title = NULL; + m_bWriteable = true; + m_PangoAttrList = pango_attr_list_new (); + m_Theme = NULL; + SetTheme (TheThemeManager.GetTheme ("Default")); + m_pView = new View (this, !StandAlone); + m_bIsLoading = m_bUndoRedo = false; + g_date_set_time_t (&CreationDate, time (NULL)); + g_date_clear (&RevisionDate, 1); + const char* chn = getenv ("REAL_NAME"); + if (!chn) + chn = getenv ("USERNAME"); + if (chn) + m_author = g_strdup (chn); + else + m_author = NULL; + chn = getenv ("E_MAIL"); + if (!chn) + chn = getenv ("EMAIL_ADDRESS"); + if (chn) + m_mail = g_strdup (chn); + else + m_mail = NULL; + m_comment = NULL; + m_pCurOp = NULL; + m_bReadOnly = false; + SetActive (); + m_AllowClipboard = true; +} + +Document::~Document () +{ + Clear (); + if (m_pView) + delete m_pView; + pango_attr_list_unref (m_PangoAttrList); + if (m_Theme) + m_Theme->RemoveClient (this); + if (m_App) + static_cast (m_App)->SetActiveDocument (NULL); +} + +void Document::Clear () +{ + m_bIsLoading = true; + if (m_pCurOp) + delete m_pCurOp; + m_pCurOp = NULL; + g_free (m_filename); + m_filename = NULL; + g_free (m_title); + m_title = NULL; + g_free (m_label); + m_label = NULL; + g_free (m_author); + m_author = NULL; + g_free (m_mail); + m_mail = NULL; + g_free (m_comment); + m_comment = NULL; + map::iterator it; + Object *obj; + while (HasChildren ()) { + obj = GetFirstChild (it); + obj->Lock (); + Remove (obj); + } + while (!m_RedoList.empty ()) { + delete m_RedoList.front (); + m_RedoList.pop_front (); + } + while (!m_UndoList.empty ()) { + delete m_UndoList.front (); + m_UndoList.pop_front (); + } +} + +GtkWidget* Document::GetWidget () +{ + return (m_pView) ? m_pView->GetWidget () : NULL; +} + + +const gchar* Document::GetTitle () const +{ + if (m_title) + return m_title; + else if (m_label) + return m_label; + else + return m_Window->GetDefaultTitle (); +} + +const gchar* Document::GetLabel () const +{ + return m_label; +} + +void Document::SetFileName (string const &Name, const gchar* mime_type) +{ + if (m_filename) + g_free (m_filename); + m_filename = g_strdup (Name.c_str ()); + m_FileType = mime_type; + char *path = g_path_get_dirname (m_filename); + m_pApp->SetCurDir (path); + g_free (path); + int i = strlen (m_filename) - 1; + while ((m_filename[i] != '/') && (i >= 0)) + i--; + i++; + int j = strlen (m_filename) - 1; + while ((i < j) && (m_filename[j] != '.')) + j--; + if (m_label) + g_free (m_label); + char *ext = m_filename + j + 1; + list &exts = m_pApp->GetExtensions (m_FileType); + list::iterator cur, end = exts.end (); + for (cur = exts.begin (); cur != end; cur++) + if (*cur == ext) { + char *buf = g_strndup (m_filename + i, j - i); + m_label = g_uri_unescape_string (buf, NULL); + g_free (buf); + break; + } + if (!m_label) + m_label = g_uri_unescape_string (m_filename + i, NULL); +} + +void Document::BuildBondList (list& BondList, Object const *obj) const +{ + Object const *pObject; + map::const_iterator i; + for (pObject = obj->GetFirstChild (i); pObject; pObject = obj->GetNextChild (i)) + if (pObject->GetType () == gcu::BondType) + BondList.push_back ((Bond*)(*i).second); + else BuildBondList (BondList, pObject); +} + + +bool Document::ImportOB (OBMol& Mol) +{ + //Title, dates, author and so on are not imported and so are invalid + if (m_title) { + g_free (m_title); + m_title = NULL; + } + if (m_author) { + g_free (m_author); + m_author = NULL; + } + if (m_mail) { + g_free (m_mail); + m_mail = NULL; + } + if (m_comment) { + g_free (m_comment); + m_comment = NULL; + } + g_date_clear (&CreationDate, 1); + g_date_clear (&RevisionDate, 1); + m_title = g_strdup (Mol.GetTitle ()); // Hmm, and if there are several molecules? + OBAtom *atom; + Atom* pAtom; + vector::iterator i; + for (atom = Mol.BeginAtom (i); atom; atom = Mol.NextAtom (i)) + { + if (atom->GetAtomicNum () == 0) + continue; + AddAtom (pAtom = new Atom (atom)); + } + Atom *begin, *end; + Bond *pBond; + unsigned char order; + gchar* Id; + OBBond *bond; + vector::iterator j; + for (bond = Mol.BeginBond (j); bond; bond = Mol.NextBond (j)) { + Id = g_strdup_printf ("a%d", bond->GetBeginAtomIdx ()); + begin = (Atom*) GetDescendant (Id);//Don't verify it is really an atom? + g_free (Id); + Id = g_strdup_printf ("a%d", bond->GetEndAtomIdx ()); + end = (Atom*) GetDescendant (Id);//Don't verify it is really an atom? + g_free (Id); + if (!end) + continue; + order = (unsigned char) (bond->GetBO ()); + if ((pBond = (Bond*) begin->GetBond (end)) != NULL) { + pBond->IncOrder (order); + m_pView->Update (pBond); + m_pView->Update (begin); + m_pView->Update (end); + } else { + Id = g_strdup_printf ("b%d", bond->GetIdx()); + pBond = new Bond (begin, end, order); + if (bond->IsWedge ()) + pBond->SetType (UpBondType); + else if (bond->IsHash ()) + pBond->SetType (DownBondType); + pBond->SetId (Id); + g_free (Id); + AddBond (pBond); + } + } + m_Empty = !HasChildren (); + if (m_Window) + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", HasChildren ()); + return true; +} + +void Document::BuildAtomTable (map& AtomTable, Object const *obj, unsigned& index) const +{ + Object const *pObject; + map::const_iterator i; + for (pObject = obj->GetFirstChild (i); pObject; pObject = obj->GetNextChild (i)) + if (pObject->GetType() == AtomType) + AtomTable[(*i).second->GetId ()] = index++; + else + BuildAtomTable (AtomTable, pObject, index); +} + +void Document::ExportOB () const +{ + OBMol Mol; + map::iterator i; + map AtomTable; + list BondList; + OBAtom obAtom; + Atom* pgAtom; + unsigned index = 1; + double x, y, z; + gchar *old_num_locale; + map< string, Object * >::const_iterator m; + stack::const_iterator> iters; + set Mols; + Object const *Cur = this, *Ob; + try { + ostringstream ofs; + GFile *file = g_file_new_for_uri (m_filename); + GError *error = NULL; + GOutputStream *output = G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, NULL, &error)); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + g_object_unref (file); + throw (int) 1; + } + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + OBConversion Conv; + OBFormat* pOutFormat = Conv.FormatFromMIME (m_FileType.c_str ()); + if (pOutFormat != NULL) { + Conv.SetOutFormat (pOutFormat); + Ob = GetFirstChild (m); + while (Ob) { + if (Ob->GetType () == MoleculeType) + Mols.insert (Ob); + else if (Ob->HasChildren ()) { + Cur = Ob; + iters.push (m); + Ob = Cur->GetFirstChild (m); + continue; + } + Ob = Cur->GetNextChild (m); + while (!Ob && !iters.empty ()) { + m = iters.top (); + iters.pop (); + Cur = Cur->GetParent (); + Ob = Cur->GetNextChild (m); + } + } + set::iterator mi, mend = Mols.end (); + unsigned nb = 1; + Conv.SetOneObjectOnly (false); + for (mi = Mols.begin (); mi != mend; mi++) + { + Ob = *mi; + if (nb == Mols.size ()) + Conv.SetOneObjectOnly (true); + Mol.BeginModify (); + index = 1; + BuildAtomTable (AtomTable, Ob, index); + Mol.ReserveAtoms (AtomTable.size ()); + Mol.SetTitle ((char*) GetTitle ()); + Mol.SetDimension (2); + for (i = AtomTable.begin (); i != AtomTable.end (); i++) { + pgAtom = (Atom*) Ob->GetDescendant ((*i).first.data ()); + obAtom.SetIdx ((*i).second); + obAtom.SetAtomicNum (pgAtom->GetZ ()); + pgAtom->GetCoords (&x, &y, &z); + obAtom.SetVector (x / 100., 4. - y / 100., z / 100.); + obAtom.SetFormalCharge (pgAtom->GetCharge ()); + Mol.AddAtom (obAtom); + obAtom.Clear (); + } + BuildBondList (BondList, Ob); + list::iterator j; + int start, end, order, flag; + for (j = BondList.begin (); j != BondList.end (); j++) + { + order = (*j)->GetOrder (); + start = AtomTable[(*j)->GetAtom (0)->GetId ()]; + end = AtomTable[(*j)->GetAtom (1)->GetId ()]; + switch ((*j)->GetType ()) { + case UpBondType: + flag = OB_WEDGE_BOND; + break; + case DownBondType: + flag = OB_HASH_BOND; + break; + default: + flag = 0; + } + Mol.AddBond (start, end, order, flag); + } + Mol.EndModify (); + Conv.SetOutputIndex (nb++); + Conv.Write (&Mol, &ofs); + Mol.Clear (); + AtomTable.clear (); + BondList.clear (); + } + } + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + gsize nb = ofs.str ().size (), n = 0; + while (n < nb) { + n += g_output_stream_write (output, ofs.str ().c_str () + n, nb - n, NULL, &error); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + g_object_unref (file); + throw (int) 1; + } + } + g_object_unref (file); + const_cast (this)->SetReadOnly (false); + } + catch (int n) { + // TODO: implement a meaningful error reporting system + } +} + +void Document::DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const +{ + cairo_t *cr; + double width, height, x, y, w, h; + + // TODO: support multiple pages + cr = gtk_print_context_get_cairo_context (context); + width = gtk_print_context_get_width (context); + height = gtk_print_context_get_height (context); + // adjust position and size + GtkWidget* widget = m_pView->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (widget), "data"); + ArtDRect rect; + pData->GetObjectBounds (this, &rect); + double scale = .75; + x = rect.x0; + y = rect.y0; + w = rect.x1 - rect.x0; + h = rect.y1 - rect.y0; + cairo_save (cr); + cairo_rectangle (cr, 0, 0, width, height); + cairo_clip (cr); + switch (GetScaleType ()) { + case GCU_PRINT_SCALE_NONE: + break; + case GCU_PRINT_SCALE_FIXED: + scale *= Printable::GetScale (); + break; + case GCU_PRINT_SCALE_AUTO: + if (GetHorizFit () && GetVertFit ()) + scale *= min (width / w, height / h); + else if (GetHorizFit ()) + scale *= width / w; + else if (GetVertFit ()) + scale *= height / h; + break; + } + x *= scale; + y *= scale; + w *= scale; + h *= scale; + if (GetHorizCentered ()) + x -= (width - w) / 2; + if (GetVertCentered ()) + y -= (height - h) / 2; + cairo_translate (cr, -x, -y); + cairo_scale (cr, scale, scale); + m_pView->Render (cr); + cairo_restore (cr); +} + +void Document::AddAtom (Atom* pAtom) +{ + int i = 1; + char id[8]; + const gchar *Id; + Id = pAtom->GetId (); + if (Id == NULL) { + id[0] = 'a'; + do + snprintf (id+1, 7, "%d", i++); + while (GetDescendant (id) != NULL); + pAtom->SetId (id); + Id = id; + } + m_pView->AddObject (pAtom); + if (m_bIsLoading) + return; + Molecule* mol = new Molecule (); + i = 1; + id[0] = 'm'; + do + snprintf (id+1, 7, "%d", i++); + while (GetDescendant(id) != NULL); + mol->SetId (id); + AddChild (mol); + mol->AddAtom (pAtom); +} + +void Document::AddFragment (Fragment* pFragment) +{ + int i = 1; + char id[8]; + const gchar *Id; + Id = pFragment->GetId (); + if (Id == NULL) { + id[0] = 'f'; + do + snprintf( id+1, 7, "%d", i++); + while (GetDescendant (id) != NULL); + pFragment->SetId (id); + Id = id; + } + m_pView->AddObject (pFragment); + if (m_bIsLoading) + return; +// AddObject(pFragment); + if (!pFragment->GetMolecule ()) { + Molecule* mol = new Molecule (); + i = 1; + id[0] = 'm'; + do + snprintf (id+1, 7, "%d", i++); + while (GetDescendant (id) != NULL); + mol->SetId (id); + AddChild (mol); + mol->AddFragment (pFragment); + } + pFragment->AnalContent (); +} + +void Document::AddBond (Bond* pBond) +{ + int i = 1; + char id[8]; + const gchar *Id; + Id = pBond->GetId (); + if (Id == NULL) { + id[0] = 'b'; + do + snprintf (id+1, 7, "%d", i++); + while (GetDescendant(id) != NULL); + pBond->SetId (id); + } + AddChild (pBond); + Atom *pAtom0 = (Atom*) pBond->GetAtom (0), *pAtom1 = (Atom*) pBond->GetAtom (1); + m_pView->Update (pAtom0); + m_pView->Update (pAtom1); + m_pView->AddObject (pBond); + if (m_bIsLoading) + return; + //search molecules + Molecule * pMol0 = (Molecule*) pAtom0->GetMolecule (), *pMol1 = (Molecule*) pAtom1->GetMolecule (); + if (pMol0 && pMol1) { + if (pMol0 == pMol1) { + //new cycle + pMol0->UpdateCycles (pBond); + m_pView->Update (pBond); + } else { + //merge two molecules + pMol0->Merge (pMol1); + } + pMol0->AddBond (pBond); + } + else if (pMol0 || pMol1) { + //add bond and atom to existing molecule + if (!pMol0) + pMol0 = pMol1; + pMol0->AddAtom (pAtom0); + pMol0->AddBond (pBond); + } + else { + //new molecule + i = 1; + id[0] = 'm'; + do + snprintf (id+1, 7, "%d", i++); + while (GetDescendant (id) != NULL); + pMol0 = new Molecule (pAtom0); + pMol0->SetId (id); + AddChild (pMol0); + } +} + +static int cb_xml_to_vfs (GOutputStream *output, const char* buf, int nb) +{ + GError *error = NULL; + int n = g_output_stream_write (output, buf, nb, NULL, &error); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + } + return n; +} + +void Document::Save () const +{ + if (m_bReadOnly) + const_cast (this)->SetReadOnly (false); + if (!m_filename || !m_bWriteable || m_bReadOnly) + return; + xmlDocPtr xml = NULL; + char *old_num_locale, *old_time_locale; + const_cast (this)->m_SavedResidues.clear (); + + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + old_time_locale = g_strdup (setlocale (LC_TIME, NULL)); + setlocale (LC_TIME, "C"); + + try { + if (m_FileType != "application/x-gchempaint") + ExportOB (); + else { + xml = BuildXMLTree (); + xmlSetDocCompressMode (xml, CompressionLevel); + + if (!CompressionLevel) { + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + } + + xmlOutputBufferPtr buf = xmlAllocOutputBuffer (NULL); + GFile *file = g_file_new_for_uri (m_filename); + GError *error = NULL; + if (g_file_query_exists (file, NULL)) { + // FIXME: for now, delete it, but we might make a backup? + g_file_delete (file, NULL, &error); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + g_object_unref (file); + throw (int) 1; + } + } + GOutputStream *output = G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, NULL, &error)); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + g_object_unref (file); + throw (int) 1; + } + buf->context = output; + buf->closecallback = NULL; + buf->writecallback = (xmlOutputWriteCallback) cb_xml_to_vfs; + int n = xmlSaveFormatFileTo (buf, xml, NULL, true); + g_output_stream_close (output, NULL, NULL); + g_object_unref (file); + if (n < 0) + throw 1; + const_cast (this)->SetReadOnly (false); + } + const_cast (this)->SetDirty (false); + const_cast (this)->m_LastStackSize = m_UndoList.size (); + const_cast (this)->m_OpID = m_UndoList.front ()->GetID (); + } + catch (int num) { + if (xml) + xmlFreeDoc (xml); + xml = NULL; +// Error (SAVE); + } + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + setlocale (LC_TIME, old_time_locale); + g_free (old_time_locale); + const_cast (this)->m_SavedResidues.clear (); +} + +bool Document::Load (xmlNodePtr root) +{ + if (m_title) { + g_free(m_title); + m_title = NULL; + } + if (m_author) { + g_free(m_author); + m_author = NULL; + } + if (m_mail) { + g_free(m_mail); + m_mail = NULL; + } + if (m_comment) { + g_free(m_comment); + m_comment = NULL; + } + g_date_clear (&CreationDate, 1); + g_date_clear (&RevisionDate, 1); + xmlNodePtr node, child; + char* tmp; + Object* pObject; + tmp = (char*) xmlGetProp (root, (xmlChar*) "id"); + if (tmp) { + SetId (tmp); + xmlFree (tmp); + } + tmp = (char*) xmlGetProp (root, (xmlChar*) "creation"); + if (tmp) { + g_date_set_parse(&CreationDate, tmp); + if (!g_date_valid(&CreationDate)) g_date_clear(&CreationDate, 1); + xmlFree (tmp); + } + tmp = (char*) xmlGetProp (root, (xmlChar*) "revision"); + if (tmp) { + g_date_set_parse(&RevisionDate, tmp); + if (!g_date_valid(&RevisionDate)) g_date_clear(&RevisionDate, 1); + xmlFree (tmp); + } + + node = GetNodeByName (root, "title"); + if (node) { + tmp = (char*) xmlNodeGetContent (node); + if (tmp) { + m_title = g_strdup (tmp); + xmlFree (tmp); + } + } + if (m_Window) + m_Window->SetTitle (GetTitle ()); + node = GetNodeByName (root, "author"); + if (node) { + tmp = (char*) xmlGetProp (node, (xmlChar*) "name"); + if (tmp) { + m_author = g_strdup (tmp); + xmlFree (tmp); + } + tmp = (char*) xmlGetProp (node, (xmlChar*) "e-mail"); + if (tmp) { + m_mail = g_strdup (tmp); + xmlFree (tmp); + } + } + node = GetNodeByName (root, "comment"); + if (node) { + tmp = (char*) xmlNodeGetContent (node); + if (tmp) { + m_comment = g_strdup (tmp); + xmlFree (tmp); + } + } + + node = GetNodeByName (root, "theme"); + if (node) { + Theme *pTheme = new Theme (NULL), *pLocalTheme; + pTheme->Load (node); + pLocalTheme = TheThemeManager.GetTheme (_(pTheme->GetName ().c_str ())); + if (!pLocalTheme) + pLocalTheme = TheThemeManager.GetTheme (pTheme->GetName ().c_str ()); + if (pLocalTheme && *pLocalTheme == *pTheme) { + SetTheme (pLocalTheme); + delete pTheme; + } else { + TheThemeManager.AddFileTheme (pTheme, GetTitle ()); + SetTheme (pTheme); + } + } + + m_bIsLoading = true; + node = root->children; + while (node) { + child = (strcmp ((const char*) node->name, "object"))? node: node->children; + pObject = CreateObject ((const char*) child->name, this); + if (pObject) { + if (!pObject->Load (child)) + delete pObject; + else + m_pView->AddObject (pObject); + } + node = node->next; + } + m_pView->Update (this); + Update (); + m_Empty = !HasChildren (); + m_bIsLoading = false; + if (m_Window) + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", HasChildren ()); + m_pView->EnsureSize (); + return true; +} + +void Document::ParseXMLTree (xmlDocPtr xml) +{ + Load (xml->children); +} + +xmlDocPtr Document::BuildXMLTree () const +{ + xmlDocPtr xml; + xmlNodePtr node; + xmlNsPtr ns; + + xml = xmlNewDoc ((xmlChar*) "1.0"); +//FIXME: do something if an error occurs + if (xml == NULL) + throw (int) 0; + + xmlDocSetRootElement (xml, xmlNewDocNode (xml, NULL, (xmlChar*) "chemistry", NULL)); + ns = xmlNewNs (xml->children, (xmlChar*) "http://www.nongnu.org/gchempaint", (xmlChar*) "gcp"); + xmlSetNs (xml->children, ns); + if (!g_date_valid (&CreationDate)) + g_date_set_time_t (&const_cast (this)->CreationDate, time (NULL)); + g_date_set_time_t (&const_cast (this)->RevisionDate, time (NULL)); + gchar buf[64]; + g_date_strftime (buf, sizeof (buf), "%m/%d/%Y", &CreationDate); + xmlNewProp (xml->children, (xmlChar*) "creation", (xmlChar*) buf); + g_date_strftime (buf, sizeof (buf), "%m/%d/%Y", &RevisionDate); + xmlNewProp (xml->children, (xmlChar*) "revision", (xmlChar*) buf); + node = xmlNewDocNode (xml, NULL, (xmlChar*)"generator", (xmlChar*)"GChemPaint "VERSION); + if (node) + xmlAddChild (xml->children, node); + else + throw (int) 0; + + if (m_title && *m_title) { + node = xmlNewDocNode (xml, NULL, (xmlChar*) "title", (xmlChar*) m_title); + if (node) + xmlAddChild (xml->children, node); + else + throw (int) 0; + } + if ((m_author && *m_author) || (m_mail && *m_mail)) { + node = xmlNewDocNode (xml, NULL, (xmlChar*) "author", NULL); + if (node) { + if (m_author && *m_author) + xmlNewProp (node, (xmlChar*) "name", (xmlChar*) m_author); + if (m_mail && *m_mail) + xmlNewProp (node, (xmlChar*) "e-mail", (xmlChar*) m_mail); + xmlAddChild (xml->children, node); + } + else + throw (int) 0; + } + if (m_comment && *m_comment) { + node = xmlNewDocNode (xml, NULL, (xmlChar*) "comment", (xmlChar*) m_comment); + if (node) + xmlAddChild (xml->children, node); + else + throw (int) 0; + } + + if (!m_Theme->Save (xml)) + throw (int) 0; + if (!SaveChildren (xml, xml->children)) + throw 1; + + return xml; +} + +void Document::Update () +{ + std::set::iterator i, end = m_DirtyObjects.end (); + TypeId Id; + for (i = m_DirtyObjects.begin (); i != end; i++) { + Id = (*i)->GetType (); + switch (Id) { + case gcu::BondType: + m_pView->Update ((Bond*) (*i)); + break; + } + } + m_DirtyObjects.clear (); +} + +void Document::RemoveAtom (Atom* pAtom) +{ + std::map::iterator i; + Bond* pBond; + while ((pBond = (Bond*) pAtom->GetFirstBond (i))) + { + if (!m_bUndoRedo && !m_bIsLoading && m_pCurOp) + m_pCurOp->AddObject (pBond); + RemoveBond (pBond); + } + Molecule *pMol = (Molecule*) pAtom->GetMolecule (); + delete pMol; + m_pView->Remove (pAtom); + delete pAtom; +} + +void Document::RemoveFragment (Fragment* pFragment) +{ + std::map::iterator i; + Atom* pAtom = pFragment->GetAtom (); + Bond* pBond; + while ((pBond = (Bond*) pAtom->GetFirstBond (i))) { + if (!m_bUndoRedo && !m_bIsLoading && m_pCurOp) + m_pCurOp->AddObject (pBond); + RemoveBond (pBond); + } + Molecule *pMol = (Molecule*) pFragment->GetMolecule (); + delete pMol; + m_pView->Remove (pFragment); + delete pFragment; +} + +void Document::RemoveBond (Bond* pBond) +{ + m_pView->Remove (pBond); + Atom *pAtom0, *pAtom1; + pAtom0 = (Atom*) pBond->GetAtom (0); + pAtom1 = (Atom*) pBond->GetAtom (1); + Molecule *pMol = (Molecule*) pBond->GetMolecule (); + char id[16]; + pMol->Lock (true); + pAtom0->RemoveBond (pBond); + m_pView->Update (pAtom0); + pAtom1->RemoveBond (pBond); + m_pView->Update (pAtom1); + pMol->Lock (false); + if (pBond->IsCyclic ()) { + pMol->Remove (pBond); + pMol->UpdateCycles (); + Update (); + } else { + Object *Parent = pMol->GetParent (); + Parent->Lock (); + int i0 = 1; + string align_id = pMol->GetAlignmentId (); + delete pMol; + Molecule * pMol = new Molecule (); + pMol->Lock (true); + do + snprintf (id, sizeof (id), "m%d", i0++); + while (GetDescendant (id) != NULL); + pMol->SetId (id); + Parent->AddChild (pMol); /* do not update at this point it's the caller responsibility */ + Object* pObject = pAtom0->GetParent (); + if (pObject->GetType () == FragmentType) + pMol->AddFragment ((Fragment*) pObject); + else + pMol->AddAtom (pAtom0); + pMol->UpdateCycles (); + if (align_id.size ()) { + Object *obj = pMol->GetDescendant (align_id.c_str ()); + if (obj) + pMol->SelectAlignmentItem (obj); + align_id = ""; + } + pMol->Lock (false); + do + snprintf (id, sizeof (id), "m%d", i0++); + while (GetDescendant (id) != NULL); + pMol = new Molecule (); + pMol->Lock (true); + pMol->SetId (id); + Parent->AddChild (pMol); /* do not update at this point it's the caller responsibility */ + pObject = pAtom1->GetParent (); + if (pObject->GetType () == FragmentType) + pMol->AddFragment ((Fragment*) pObject); + else + pMol->AddAtom (pAtom1); + pMol->UpdateCycles (); + if (align_id.size ()) { + Object *obj = pMol->GetDescendant (align_id.c_str ()); + if (obj) + pMol->SelectAlignmentItem (obj); + } + pMol->Lock (false); + if ((pAtom0->GetZ () == 6) && (pAtom0->GetBondsNumber () == 0)) + m_pView->Update (pAtom0); + if ((pAtom1->GetZ () == 6) && (pAtom1->GetBondsNumber () == 0)) + m_pView->Update (pAtom1); + Parent->Lock (false); + } + m_DirtyObjects.erase (pBond); + delete pBond; +} + +void Document::Remove (Object* pObject) +{ + switch(pObject->GetType ()) + { + case AtomType: + RemoveAtom ((Atom*) pObject); + break; + case FragmentType: + RemoveFragment ((Fragment*) pObject); + break; + case gcu::BondType: + RemoveBond ((Bond*) pObject); + break; + case MoleculeType: { + ((Molecule*) pObject)->Clear (); + m_pView->Remove (pObject); + map::iterator i; + Object* object = pObject->GetFirstChild (i); + while (object) { + m_pView->Remove (object); + delete object; + object = pObject->GetFirstChild (i); + } + delete pObject; + } + break; + default: { + m_pView->Remove (pObject); + map::iterator i; + Object* object = pObject->GetFirstChild (i); + while (object) { + if (pObject->IsLocked ()) + object->Lock (); + Remove (object); + object = pObject->GetFirstChild (i); + } + delete pObject; + } + break; + } +} + +void Document::Remove (const char* Id) +{ + Object* pObj = GetDescendant (Id); + if (pObj) { + pObj->Lock (); + Remove(pObj); + } +} + +void Document::OnProperties () +{ + new DocPropDlg (this); +} + +void Document::SetTitle (const gchar* title) +{ + g_free (m_title); + m_title = (title && *title)? g_strdup (title): NULL; +} + +void Document::SetAuthor (const gchar* author) +{ + g_free (m_author); + m_author = (author && *author)? g_strdup (author): NULL; +} + +void Document::SetMail (const gchar* mail) +{ + g_free (m_mail); + m_mail = (mail && *mail)? g_strdup (mail): NULL; +} + +void Document::SetComment (const gchar* comment) +{ + g_free (m_comment); + m_comment = (comment && *comment)? g_strdup (comment): NULL; +} + +void Document::AddObject (Object* pObject) +{ + if (!pObject->GetParent ()) + AddChild (pObject); + m_pView->AddObject (pObject); + if (m_bIsLoading || m_bUndoRedo) + return; + if (!m_pCurOp) { + m_pCurOp = new AddOperation (this, ++m_OpID); + m_pCurOp->AddObject (pObject); + } +} + +void Document::OnUndo () +{ + if (m_pApp->GetActiveTool ()->OnUndo ()) + return; + m_bUndoRedo = true; + if (!m_UndoList.empty ()) { + Operation* Op = m_UndoList.front (); + Op->Undo (); + m_UndoList.pop_front (); + m_RedoList.push_front (Op); + if (m_Window) + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Redo", true); + } + if (m_Window) { + if (m_UndoList.empty ()) + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Undo", false); + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", HasChildren ()); + } + m_bUndoRedo = false; + Update (); + EmptyTranslationTable (); + SetDirty (m_LastStackSize != m_UndoList.size () || (m_LastStackSize > 0 && m_OpID != m_UndoList.front ()->GetID ())); + m_Empty = !HasChildren (); +} + +void Document::OnRedo () +{ + if (m_pApp->GetActiveTool ()->OnRedo ()) + return; + m_bUndoRedo = true; + if (!m_RedoList.empty ()) { + Operation* Op = m_RedoList.front (); + Op->Redo (); + m_RedoList.pop_front (); + m_UndoList.push_front (Op); + if (m_Window) + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Undo", true); + } + if (m_Window) { + if (m_RedoList.empty ()) + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Redo", false); + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", HasChildren ()); + } + m_bUndoRedo = false; + EmptyTranslationTable (); + SetDirty (m_LastStackSize != m_UndoList.size () || (m_LastStackSize > 0 && m_OpID != m_UndoList.front ()->GetID ())); + m_Empty = !HasChildren (); +} + +void Document::FinishOperation () +{ + if (!m_pCurOp) + return;//FIXME: should at least emit a warning + m_UndoList.push_front (m_pCurOp); + while (!m_RedoList.empty ()) { + delete m_RedoList.front (); + m_RedoList.pop_front (); + } + m_pCurOp = NULL; + SetDirty (true); + m_Empty = !HasChildren (); + if (m_Window) { + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Undo", true); + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Redo", false); + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", HasChildren ()); + } + Update (); +} + +void Document::AbortOperation() +{ + if (m_pCurOp) + delete m_pCurOp; + m_pCurOp = NULL; +} + +void Document::PopOperation () +{ + if (!m_UndoList.empty ()) { + delete m_UndoList.front (); + m_UndoList.pop_front (); + if (m_UndoList.empty () && m_Window) + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Undo", false); + } + SetDirty (m_LastStackSize != m_UndoList.size () || (m_LastStackSize > 0 && m_OpID != m_UndoList.front ()->GetID ())); +} + +void Document::PushOperation (Operation* operation, bool undo) +{ + if (!m_pCurOp || (operation != m_pCurOp)) { + cerr << "Warning: Incorrect operation" << endl; + return; + } + if (undo) + FinishOperation (); + else + { + while (!m_RedoList.empty ()) { + delete m_RedoList.front (); + m_RedoList.pop_front (); + } + m_RedoList.push_front (operation); + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Redo", true); + } + m_pCurOp = NULL; +} + +void Document::SetActive () +{ + if (m_Window) { + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Undo", !m_UndoList.empty ()); + m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Redo", !m_RedoList.empty ()); + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", HasChildren ()); + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/Save", !m_bReadOnly); + m_Window->ActivateActionWidget ("/MainToolbar/Save", !m_bReadOnly); + } +} + +extern xmlDocPtr pXmlDoc; + +void Document::LoadObjects (xmlNodePtr node) +{ + xmlNodePtr child = node->children, child1; + string str; + while (child) { + //Add everything except bonds + if (!strcmp ((const char*)child->name, "atom")) { + Atom* pAtom = new Atom (); + AddChild (pAtom); + pAtom->Load (child); + AddAtom (pAtom); + } else if (!strcmp ((const char*) child->name, "fragment")) { + Fragment* pFragment = new Fragment (); + AddChild (pFragment); + pFragment->Load (child); + AddFragment (pFragment); + } else if (!strcmp ((const char*) child->name, "bond")); + else { + m_bIsLoading = true; + child1 = (strcmp ((const char*) child->name, "object"))? child: child->children; + str = (const char*) child1->name; + Object* pObject = Object::CreateObject (str, this); + pObject->Load (child1); + AddObject (pObject); + m_pView->Update (pObject);//FIXME: should not be necessary, but solve problem with cyclic double bonds + m_bIsLoading = false; + } + child = child->next; + } + //Now, add bonds + child = GetNodeByName (node, "bond"); + while (child) { + Bond* pBond = new Bond (); + AddChild (pBond); + if (pBond->Load (child)) + AddBond (pBond); + else delete pBond; + child = GetNextNodeByName (child->next, "bond"); + } +} + +Operation* Document::GetNewOperation (OperationType type) +{ + m_OpID++; + switch (type) { + case GCP_ADD_OPERATION: + return m_pCurOp = new AddOperation (this, m_OpID); + case GCP_DELETE_OPERATION: + return m_pCurOp = new DeleteOperation (this, m_OpID); + case GCP_MODIFY_OPERATION: + return m_pCurOp = new ModifyOperation (this, m_OpID); + default: + return NULL; + } +} + +void Document::AddData (xmlNodePtr node) +{ + xmlNodePtr child; + string str; + Object* pObject; + m_bIsLoading = true; + EmptyTranslationTable (); + GtkWidget* w = m_pView->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + while (node) { + child = (strcmp ((const char*) node->name, "object"))? node: node->children; + str = (const char*) child->name; + pObject = Object::CreateObject (str, this); + AddObject (pObject); + if (!pObject->Load (child)) + Remove (pObject); + else { + m_pView->Update (pObject);//FIXME: should not be necessary, but solve problem with cyclic double bonds + pData->SetSelected (pObject); + } + node = node->next; + } + m_bIsLoading = false; + EmptyTranslationTable (); + FinishOperation (); +} + +void Document::ExportImage (string const &filename, const char* type, int resolution) +{ + m_pView->ExportImage (filename, type, resolution); +} + +void Document::SetReadOnly (bool ro) +{ + m_bReadOnly = ro; + if (!ro && (m_FileType != "application/x-gchempaint") && !Loader::GetSaver (m_FileType.c_str ())) { + OBFormat *f = OBConversion::FormatFromMIME (m_FileType.c_str ()); + m_bReadOnly = (f == NULL)? true: f->Flags () & NOTWRITABLE; + } + m_bUndoRedo = true; + if (m_Window) { + m_Window->ActivateActionWidget ("/MainMenu/FileMenu/Save", !m_bReadOnly); + m_Window->ActivateActionWidget ("/MainToolbar/Save", !m_bReadOnly); + } +} + +double Document::GetYAlign () +{ + if (GetChildrenNumber () == 1) { + map::iterator i; + Object *Child = GetFirstChild (i); + return Child->GetYAlign (); + } else { + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (GetWidget ()), "data"); + ArtDRect rect; + pData->GetObjectBounds (this, &rect); + return (rect.y1 - rect.y0) / 2.; + } +} + +void Document::SetTheme (Theme *theme) +{ + if (m_Theme) + m_Theme->RemoveClient (this); + if (!theme) { + m_Theme = NULL; + return; + } + m_Theme = theme; + m_Theme->AddClient (this); + m_BondLength = theme->GetBondLength (); + m_BondAngle = theme->GetBondAngle (); + m_ArrowLength = theme->GetArrowLength (); + m_TextFontFamily = theme->GetTextFontFamily (); + m_TextFontStyle = theme->GetTextFontStyle (); + m_TextFontWeight = theme->GetTextFontWeight (); + m_TextFontVariant = theme->GetTextFontVariant (); + m_TextFontStretch = theme->GetTextFontStretch (); + m_TextFontSize = theme->GetTextFontSize (); + pango_attr_list_unref (m_PangoAttrList); + m_PangoAttrList = pango_attr_list_new (); + pango_attr_list_insert (m_PangoAttrList, pango_attr_family_new (theme->GetFontFamily ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_style_new (theme->GetFontStyle ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_weight_new (theme->GetFontWeight ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_stretch_new (theme->GetFontStretch ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_variant_new (theme->GetFontVariant ())); + if (m_pView) + m_pView->UpdateTheme (); +} + +bool Document::OnSignal (SignalId Signal, Object *Child) +{ + if (Signal == OnThemeChangedSignal) { + m_BondLength = m_Theme->GetBondLength (); + m_BondAngle = m_Theme->GetBondAngle (); + m_ArrowLength = m_Theme->GetArrowLength (); + m_TextFontFamily = m_Theme->GetTextFontFamily (); + m_TextFontStyle = m_Theme->GetTextFontStyle (); + m_TextFontWeight = m_Theme->GetTextFontWeight (); + m_TextFontVariant = m_Theme->GetTextFontVariant (); + m_TextFontStretch = m_Theme->GetTextFontStretch (); + m_TextFontSize = m_Theme->GetTextFontSize (); + pango_attr_list_unref (m_PangoAttrList); + m_PangoAttrList = pango_attr_list_new (); + pango_attr_list_insert (m_PangoAttrList, pango_attr_family_new (m_Theme->GetFontFamily ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_style_new (m_Theme->GetFontStyle ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_weight_new (m_Theme->GetFontWeight ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_stretch_new (m_Theme->GetFontStretch ())); + pango_attr_list_insert (m_PangoAttrList, pango_attr_variant_new (m_Theme->GetFontVariant ())); + m_pView->UpdateTheme (); + } + return false; +} + +void Document::SetDirty (bool isDirty) +{ + if (!m_Window) + return; + char *title = g_strdup_printf ((isDirty? "*%s": "%s"), GetTitle ()); + m_Window->SetTitle (title); + g_free (title); + gcu::Document::SetDirty (isDirty); +} + +void Document::SetLabel(const gchar* label) +{ + m_label = g_strdup (label); + m_Window->SetTitle (label); +} + +void Document::OnThemeNamesChanged () +{ + DocPropDlg *dlg = dynamic_cast (GetDialog ("properties")); + if (dlg) + dlg->OnThemeNamesChanged (); +} + +double Document::GetMedianBondLength () +{ + vector lengths; + int max = 128, nb = 0; + lengths.reserve (max); + double result = 0.; + stack::iterator> iters; + map< string, Object * >::iterator m; + Object *Cur = this, *Ob = GetFirstChild (m); + while (Ob) { + if (Ob->GetType () == gcu::BondType) { + if (nb == max) { + max += 128; + lengths.resize (max); + } + lengths[nb++] = static_cast (Ob)->Get2DLength (); + } else if (Ob->HasChildren ()) { + Cur = Ob; + iters.push (m); + Ob = Cur->GetFirstChild (m); + continue; + } + Ob = Cur->GetNextChild (m); + while (!Ob && !iters.empty ()) { + m = iters.top (); + iters.pop (); + Cur = Cur->GetParent (); + Ob = Cur->GetNextChild (m); + } + } + if (nb > 0) + go_range_median_inter_nonconst (lengths.data (), nb, &result); + return result; +} + +bool Document::SetProperty (unsigned property, char const *value) +{ + switch (property) { + case GCU_PROP_DOC_FILENAME: + SetFileName (value, m_FileType.c_str ()); + break; + case GCU_PROP_DOC_MIMETYPE: + m_FileType = value; + break; + case GCU_PROP_DOC_TITLE: + SetTitle (value); + if (m_Window) + m_Window->SetTitle (GetTitle ()); + break; + case GCU_PROP_DOC_COMMENT: + g_free (m_comment); + m_comment = g_strdup (value); + break; + case GCU_PROP_DOC_CREATOR: + g_free (m_author); + m_author = g_strdup (value); + break; + case GCU_PROP_DOC_CREATION_TIME: + g_date_set_parse (&CreationDate, value); + break; + case GCU_PROP_DOC_MODIFICATION_TIME: + g_date_set_parse (&RevisionDate, value); + break; + case GCU_PROP_THEME_BOND_LENGTH: { + char *end; + double length = strtod (value, &end); + if (*end != 0) + return false; + gcu::Document::m_Scale = m_Theme->GetBondLength () / length; + } + } + return true; +} + +GtkWindow *Document::GetGtkWindow () +{ + return (m_Window)? m_Window->GetWindow (): NULL; +} + +void Document::SaveResidue (Residue const *r, xmlNodePtr node) +{ + if (m_SavedResidues.find (r) == m_SavedResidues.end ()) { + m_SavedResidues.insert (r); + xmlNewProp (node, (xmlChar const *) "raw", (xmlChar const *) reinterpret_cast (r->GetMolecule ())->GetRawFormula ().c_str ()); + xmlNewProp (node, (xmlChar const *) "generic", (xmlChar const *) (r->GetGeneric ()? "true": "false")); + map const &symbols = r->GetSymbols (); + map::const_iterator i = symbols.begin (), iend = symbols.end (); + string s = (*i).first; + for (i++; i != iend; i++) { + s += ";"; + s += (*i).first; + } + xmlNodePtr child = xmlNewDocNode (node->doc, NULL, (xmlChar const *) "symbols", (xmlChar const *) s.c_str ()); + xmlAddChild (node, child); + map const &names = r->GetNames (); + map::const_iterator j, jend = names.end (); + j = names.find ("C"); + if (j != jend) { + child = xmlNewDocNode (node->doc, NULL, (xmlChar const *) "name", (xmlChar const *) (*j).second.c_str ()); + xmlAddChild (node, child); + } + for (j = names.begin (); j != jend; j++) { + if ((*j).first == "C") + continue; + child = xmlNewDocNode (node->doc, NULL, (xmlChar const *) "name", (xmlChar const *) (*j).second.c_str ()); + xmlNodeSetLang (child, (xmlChar const *) (*j).first.c_str ()); + xmlAddChild (node, child); + } + child = reinterpret_cast (r->GetMolecule ())->Save (node->doc); + if (child) { + xmlAddChild (node, child); + } + } +} + +gcu::Residue const *Document::GetResidue (char const *symbol, bool *ambiguous) +{ + map::iterator i = m_Residues.find (symbol); + if (i != m_Residues.end ()) { + if (ambiguous) + *ambiguous = (*i).second.ambiguous; + return (*i).second.res; + } else + return gcu::Document::GetResidue (symbol, ambiguous); +} + +gcu::Residue *Document::CreateResidue (char const *name, char const *symbol, gcu::Molecule *molecule) +{ + Residue *res = NULL; + Residue const *r; + bool ambiguous; + map< string, Object * >::iterator i; + Object *obj = molecule->GetFirstChild (i); + gcu::Atom *a = NULL; + while (obj) { + a = dynamic_cast (obj); + if (a && ! a->GetZ ()) + break; + a = NULL; + obj = molecule->GetNextChild (i); + } + if (!a || a->GetBondsNumber () != 1) + return NULL; + if (strcmp (a->GetId (), "a1")) { + Object *o = molecule->GetChild ("a1"); + if (o) { + o->SetId ("at1"); + a->SetId ("a1"); + o->SetId ("a1"); + } else + a->SetId ("a1"); + } + double x, y; + a->GetCoords (&x, &y); + molecule->Move (-x, -y); + map ::iterator j; + gcu::Bond *b = a->GetFirstBond (j); + double angle = b->GetAngle2DRad (a); + Matrix2D m (-angle, false); + molecule->Transform2D (m, 0., 0.); + // does a global residue exists for that symbol? + r = static_cast (Residue::GetResidue (symbol, &ambiguous)); + if (!r) + res = new Residue (name, symbol, dynamic_cast (molecule), NULL); + else { + // TODO: add residues specific to the document + } + return res; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/document.h gnome-chemistry-utils-0.10.9/libs/gcp/document.h --- gnome-chemistry-utils-0.8.6/libs/gcp/document.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/document.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,613 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * document.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_DOCUMENT_H +#define GCHEMPAINT_DOCUMENT_H + +#include "operation.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/*!\file*/ +namespace OpenBabel +{ + class OBMol; +} + +namespace gcp { + +/*! +Signal emitted when an object has been modified. See +gcu::Object::EmitSignal for more information. +*/ +extern gcu::SignalId OnChangedSignal; +/*! +Signal emitted when an object has been deleted. See +gcu::Object::EmitSignal for more information. +*/ +extern gcu::SignalId OnDeleteSignal; +/*! +Signal emitted when the theme has changed. This signal is +called by the theme for all its documents. +*/ +extern gcu::SignalId OnThemeChangedSignal; + +class View; +class Application; +class Window; +class Theme; +class Residue; +class Atom; +class Bond; +class Fragment; +class Molecule; + +/*!\class Document gcp/document.h +The document class for GChemPaint. +*/ +class Document: public gcu::Document, public gcu::Printable +{ + //Constructor and destructor +public: +/*! +@param App the application. +@param StandAlone whether the document is opened in its own window or +embedded in something else. +@param window the document window if it has already been created or NULL. + +Constructs a new empty document using default theme. +*/ + Document (Application *App, bool StandAlone, Window *window = NULL); +/*! +The destructor. +*/ + virtual ~Document (); + + //Interface +public: +/*! +Empties a document and reinitialize it. +*/ + void Clear (); +/*! +@return the canvas widget where the document is displayed. +*/ + GtkWidget* GetWidget (); +/*! +@return the gcp::View associated with the document. +*/ + View* GetView () {return m_pView;} +/*! +@param Mol an OpenBabel molecule to import. + +Imports a molecule using OpenBabel. +*/ + bool ImportOB (OpenBabel::OBMol& Mol); +/*! +Exports the current file using OpenBabel. Only molecules will be exported. +*/ + void ExportOB () const; +/*! +Saves the current file. +*/ + void Save () const; +/*! +@param node the XML root node for the document. + +Loads the document from the XML tree representing it. +@return true on success, false otherwise. +*/ + virtual bool Load (xmlNodePtr node); +/*! +@return the document title. +*/ + const gchar* GetTitle () const; +/*! +@param title the new title. + +The document title. +*/ + void SetTitle (const gchar* title); +/*! +@param label the new window title. + +Sets the label to use as window title. +*/ + void SetLabel (const gchar* label); +/*! +@return the window title. +*/ + const gchar* GetLabel () const; +/*! +@param filename the new file name (URI). +@param mime_type the new mime type. + +Sets the new file name and its associated mime type. +*/ + void SetFileName (std::string const &filename, const gchar *mime_type); +/*! +@return the current file name, actually the URI. +*/ + const gchar* GetFileName () {return m_filename;} +/*! +@param print a GtkPrintOperation. +@param context a GtkPrintContext. + +Prints the document. +*/ + void DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const; +/*! +@param pObject a new object. + +Adds a new object to the document. +*/ + void AddObject (Object* pObject); +/*! +@param pAtom a new atom. + +Adds a new atom to the document. +*/ + void AddAtom (Atom* pAtom); +/*! +@param pFragment a new atoms group. + +Adds a new fragment to the document. +*/ + void AddFragment (Fragment* pFragment); +/*! +@param pBond a new bond. + +Adds a new bond to the document and checks the connectivity of the new covalent +structure. +*/ + void AddBond (Bond* pBond); +/*! +@param xml the XML document representing the GChemPaint document being loaded. + +Parses the XML tree and creates all objects it represents. +*/ + void ParseXMLTree (xmlDocPtr xml); +/*! +@param node the XML node representing objects to add to the document. + +*/ + void LoadObjects (xmlNodePtr node); +/*! +Builds the XML tree representing the document. The returned value must +be freed using xmlFree. +@return the new XML document. +*/ + xmlDocPtr BuildXMLTree () const; +/*! +Updates the view for all objects which have been marked as dirty. +*/ + void Update (); +/*! +@param object the object to remove. + +Removes a child object from the document, and deletes it. +*/ + void Remove (Object* object); +/*! +@param Id the Id of the object to be removed. + +Removes a child object from the document, and deletes it. +*/ + void Remove (const char* Id); +/*! +Called by the framework when the user fires the File/Properties command. +*/ + void OnProperties (); +/*! +Called by the framework when the user fires the Edit/Undo command. +*/ + void OnUndo (); +/*! +Called by the framework when the user fires the Edit/Redo command. +*/ + void OnRedo (); +/*! +@return the date at which the document was first created. +*/ + const GDate* GetCreationDate () {return &CreationDate;} +/*! +@return the last date at which the document was modified. +*/ + const GDate* GetRevisionDate () {return &RevisionDate;} +/*! +@return the author's name. +*/ + const gchar* GetAuthor () {return m_author;} +/*! +@return the author's e-mail address. +*/ + const gchar* GetMail () {return m_mail;} +/*! +@return the comment associated with the document. +*/ + const gchar* GetComment () {return m_comment;} +/*! +@param author the new author name. + +Setes the document author name. +*/ + void SetAuthor (const gchar* author); +/*! +@param mail the new e-mail address. + +Sets the document author e-mail address. +*/ + void SetMail (const gchar* mail); +/*! +@param comment the new comment. + +Sets the comment associated with the document any. +*/ + void SetComment (const gchar* comment); +/*! +Ends the current operation and pushes it on top of the undo stack. This method +must be called after all changes have been done in the document and the changes +described in the operation. +*/ + void FinishOperation (); +/*! +Aborts and deletyes the current operation. +*/ + void AbortOperation (); +/*! +Removes an operation from the udo stack and deletes it. +*/ + void PopOperation (); +/*! +@param operation the operation to add. +@param undo whether to put he operation on the undo or the redo stack. + +Adds the current operation to the appropriate task. +*/ + void PushOperation (Operation* operation, bool undo = true); +/*! +Called by the framework when the document becomes the active one. Updates the +menus according to the document state. +*/ + void SetActive (); +/*! +@param type the type of the new undo/redo operation. + +@return the new operation. +*/ + Operation* GetNewOperation (OperationType type); +/*! +@return the current undo/redo operation. +*/ + Operation* GetCurrentOperation () {return m_pCurOp;} +/*! +@param node the XML node representing objects to add to the document. + +Adds previously serialized objects to the document. +*/ + void AddData (xmlNodePtr node); +/*! +@return true if the undo stack is not empty. +*/ + bool CanUndo () {return m_UndoList.size() > 0;} +/*! +@param editable whether the document might be edited or not + +This method is used to lock a document and inhibit any change in it. +*/ + void SetEditable (bool editable) {m_bWriteable = editable; m_bUndoRedo = true;} +/*! +@return true if the document can be edited. +*/ + bool GetEditable () {return m_bWriteable;} +/*! +@return the application owning the document. +*/ + gcp::Application* GetApplication () {return m_pApp;} +/*! +@param filename the image filename. +@param type a string representing the image type like "png", "svg", or "eps". +@param resolution the resolution to use in the image for bitmaps or −1. + +Exports the current document as an image. The image is limited to the real bounds +of the document. For bitmaps, the size is evaluated using the perceived screen resolution. +If the default resolution (−1) is used, the resoution will be the screen resolution. +*/ + void ExportImage (std::string const &filename, const char* type, int resolution = -1); +/*! +@param ro whether the file is read-only or not. + +If ro is true, the File/Save menu item and corresponding button will be disabled. +*/ + void SetReadOnly (bool ro); +/*! +@return true if the file is read-only or false if it is writeable. +*/ + bool GetReadOnly () {return m_bReadOnly;} +/*! +Used to retrieve the y coordinate for alignment. If the documetn contains just one +objecst as a molecule or a reaction, it will reurn it's alignment value, otherwise +0 is returned. +@return y coordinate used for alignment. +*/ + virtual double GetYAlign (); +/*! +@return the gcp::Window displaying the document if any. +*/ + Window *GetWindow () {return m_Window;} +/*! +@return GtkWindow displaying the document if any. +*/ + GtkWindow *GetGtkWindow (); +/*! +@param theme the new theme for the document. + +Sets the theme to be used by the document. This will not change lengths of +existing bonds or size of existing text. +*/ + void SetTheme (Theme *theme); +/*! +@param Signal a SignalId +@param Child the child which emitted the signal or NULL + +Called when a signal has been emitted by a child. Only OnThemeChangedSignal +is relevant for documents. +@return false since documents have no parent. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); +/*! +Mark the document as dirty. On any attempt to close a dirty document, a +dialog box is opened to ask the user if he wants to save the modified document +or drop the changes. +*/ + void SetDirty (bool isDirty = true); +/*! +Called by the framework when the theme names have changed, i.e. a new theme has +ben added, or a theme has been removed or renamed. +*/ + void OnThemeNamesChanged (); +/*! +@return the median value of bond lengths. This is used when importing data +from a document with a different theme or from an other program to scale the +data so that the bond lengths fit the themed bond length. +*/ + double GetMedianBondLength (); +/*! +@param property the property id as defined in objprops.h +@param value the property value as a string + +Used when loading to set properties. Supported oroperties for documents are: +GCU_PROP_DOC_FILENAME, GCU_PROP_DOC_MIMETYPE, GCU_PROP_DOC_TITLE, +GCU_PROP_DOC_COMMENT, GCU_PROP_DOC_CREATOR, GCU_PROP_DOC_CREATION_TIME, +GCU_PROP_DOC_MODIFICATION_TIME, and GCU_PROP_THEME_BOND_LENGTH. +*/ + bool SetProperty (unsigned property, char const *value); +/*! +@param loading whether the document is loading data or not. + +Used to inhibit undo/redo operation creation when loading. +*/ + void SetLoading (bool loading) {m_bIsLoading = loading;} +/*! +@param r the residue to be saved. +@param node the XML node to which add the saved residue if needed. + +GChemPaint saves the meaning of a residue the first time it is encountered, and +maintains a list of saved residues to avoid duplicates. +*/ + void SaveResidue (Residue const *r, xmlNodePtr node); +/*! +@param symbol the symbol for which a Residue* is searched. +@param ambiguous where to store the boolean telling if the symbol is ambiguous +or NULL. + +Documents might own not global residues with the samesymbol or name +but a different meaning from the standard residue. +@return the Residue* found or NULL. +*/ + gcu::Residue const *GetResidue (char const *symbol, bool *ambiguous = NULL); +/*! +@param name the name of the new residue. +@param symbol the symbol of the new residue. +@param molecule a molecule with a pseudo atom which describes the structure +of the residue. + + +@return the new Residue on success or NULL. +*/ + gcu::Residue *CreateResidue (char const *name, char const *symbol, gcu::Molecule *molecule); + +private: + void BuildBondList (std::list& BondList, gcu::Object const *obj) const; + void BuildAtomTable (std::map& AtomTable, gcu::Object const *obj, unsigned& index) const; + void RemoveAtom (Atom* pAtom); + void RemoveBond (Bond* pBond); + void RemoveFragment (Fragment* pFragment); + + //Implementation +private: + View * m_pView; + gchar* m_filename; + gchar *m_title; + gchar *m_label; + gchar *m_comment, *m_author, *m_mail; + bool m_bIsLoading, m_bUndoRedo, m_bReadOnly; + std::string m_FileType; + bool m_bWriteable; + GDate CreationDate, RevisionDate; + std::list m_UndoList, m_RedoList; + Operation* m_pCurOp; + Application* m_pApp; + Window *m_Window; + unsigned long m_OpID; // last operation ID + unsigned m_LastStackSize; // undo list size when last saved + std::set m_SavedResidues; + std::map m_Residues; + +/* Theme is not really a read only property, but we provide a special Set +method */ +/*!\fn GetTheme() +@return the theme used by the document. +*/ +GCU_RO_PROP (Theme*, Theme) +/*!\fn SetBondLength(double val) +@param val the new default bond length. + +Sets the new default bond length for the document. +*/ +/*!\fn GetBondLength() +@return the current default bond length. +*/ +/*!\fn GetRefBondLength() +@return the current default bond length as a reference. +*/ +GCU_PROP (double, BondLength) +/*!\fn SetBondAngle(double val) +@param val the new default bond angle between two consecutive bonds +in a chain. + +Sets the new default bond angle between two consecutive bonds in a chain +for the document. +*/ +/*!\fn GetBondAngle() +@return the current default angle between two consecutive bonds in a chain. +*/ +/*!\fn GetRefBondAngle() +@return the current default angle between two consecutive bonds in a chain +as a reference. +*/ +GCU_PROP (double, BondAngle) +/*!\fn SetArrowLength(double val) +@param val the new default arrow length. + +Sets the new default arrow length for the document. +*/ +/*!\fn GetArrowLength() +@return the current default arrow length. +*/ +/*!\fn GetRefArrowLength() +@return the current default arrow length as a reference. +*/ +GCU_PROP (double, ArrowLength) +/*!\fn SetTextFontFamily(gchar* val) +@param val the new text font family. + +Sets the new current text font family for the document. +*/ +/*!\fn GetTextFontFamily() +@return the current text font family. +*/ +/*!\fn GetRefTextFontFamily() +@return the current text font family as a reference. +*/ +GCU_PROP (gchar*, TextFontFamily) +/*!\fn SetTextFontStyle(PangoStyle val) +@param val the new text font style. + +Sets the new current text font style for the document. +*/ +/*!\fn GetTextFontStyle() +@return the current text font style. +*/ +/*!\fn GetRefTextFontStyle() +@return the current text font style as a reference. +*/ +GCU_PROP (PangoStyle, TextFontStyle) +/*!\fn SetTextFontWeight(PangoWeight val) +@param val the new text font weight. + +Sets the new current text font weight for the document. +*/ +/*!\fn GetTextFontWeight() +@return the current text font weight. +*/ +/*!\fn GetRefTextFontWeight() +@return the current text font weight as a reference. +*/ +GCU_PROP (PangoWeight, TextFontWeight) +/*!\fn SetTextFontVariant(PangoVariant val) +@param val the new text font variant. + +Sets the new current text font variant for the document. +*/ +/*!\fn GetTextFontVariant() +@return the current text font variant. +*/ +/*!\fn GetRefTextFontVariant() +@return the current text font variant as a reference. +*/ +GCU_PROP (PangoVariant, TextFontVariant) +/*!\fn SetTextFontStretch(PangoStretch val) +@param val the new text font stretch. + +Sets the new current text font stretch for the document. +*/ +/*!\fn GetTextFontStretch() +@return the current text font stretch. +*/ +/*!\fn GetRefTextFontStretch() +@return the current text font stretch as a reference. +*/ +GCU_PROP (PangoStretch, TextFontStretch) +/*!\fn SetTextFontSize(gint val) +@param val the new text font size. + +Sets the new current text font size for the document. +*/ +/*!\fn GetTextFontSize() +@return the current text font size. +*/ +/*!\fn GetRefTextFontSize() +@return the current text font size as a reference. +*/ +GCU_PROP (gint, TextFontSize) +/*!\fn GetPangoAttrList() +@return a PangoAttrList with all the attributes used for atomic symbols display. +*/ +GCU_RO_PROP (PangoAttrList*, PangoAttrList) +/*!\fn SetAllowClipboard(bool val) +@param val whether the document may use the clipboard or no. + +Sets the rights for the document clipbard access. +*/ +/*!\fn GetAllowClipboard() +@return whether the document may use the clipboard or not. +*/ +/*!\fn GetRefAllowClipboard() +@return whether the document may use the clipboard or not as a reference. +*/ +GCU_PROP (bool, AllowClipboard) +}; + +} // namespace gcp + +#endif // GCHEMPAINT_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/electron.cc gnome-chemistry-utils-0.10.9/libs/gcp/electron.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/electron.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/electron.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,386 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * electron.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "electron.h" +#include "atom.h" +#include "document.h" +#include "settings.h" +#include "theme.h" +#include "view.h" +#include "widgetdata.h" +#include +#include +#include +#include + +#define POSITION_NE 1 +#define POSITION_NW 2 +#define POSITION_N 4 +#define POSITION_SE 8 +#define POSITION_SW 16 +#define POSITION_S 32 +#define POSITION_E 64 +#define POSITION_W 128 + +using namespace gcu; + +namespace gcp { + +TypeId ElectronType; + +Electron::Electron (Atom *pAtom, bool IsPair): Object () +{ + m_IsPair = IsPair; + m_pAtom = pAtom; + m_Pos = 1; + if (pAtom) + pAtom->AddElectron (this); +} + +Electron::~Electron () +{ + if (m_pAtom && (GetParent () == m_pAtom)) + // If not, this destructor is called from the Atom destructor and nothing should + // be done in that case. + m_pAtom->RemoveElectron (this); +} + +char Electron::GetPosition (double *angle, double *distance) +{ + *angle = m_Angle; + *distance = m_Dist; + return m_Pos; +} + +void Electron::SetPosition (unsigned char Pos, double angle, double distance) +{ + m_Dist = distance; + if (!Pos) + m_Angle = angle; + else { + switch (Pos) { + case POSITION_NE: + m_Angle = 45.; + break; + case POSITION_NW: + m_Angle = 135.; + break; + case POSITION_N: + m_Angle = 90.; + break; + case POSITION_SE: + m_Angle = 315.; + break; + case POSITION_SW: + m_Angle = 225.; + break; + case POSITION_S: + m_Angle = 270.; + break; + case POSITION_E: + m_Angle = 0.; + break; + case POSITION_W: + m_Angle = 180.; + break; + } + if (m_pAtom) { + m_pAtom->NotifyPositionOccupation (m_Pos, false); + m_pAtom->NotifyPositionOccupation (Pos, true); + } + } + m_Pos = Pos; +} + +void Electron::Add (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + Theme* pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup* group = GNOME_CANVAS_GROUP(gnome_canvas_item_new(pData->Group, gnome_canvas_group_ext_get_type(), NULL)); + GnomeCanvasItem* item; + const char *color = (m_pAtom)? ((pData->IsSelected(m_pAtom))? SelectColor: Color): "white"; + double x, y, angle = m_Angle / 180. * M_PI; + if (m_Dist != 0.){ + m_pAtom->GetCoords (&x, &y); + x += m_Dist * cos (angle); + y -= m_Dist * sin (angle); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + } else { + m_pAtom->GetPosition (m_Angle, x, y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + x += 2. * cos (angle); + y -= 2. * sin (angle); + } + if (m_IsPair) { + double deltax = 3. * sin (angle); + double deltay = 3. * cos (angle); + item = gnome_canvas_item_new ( + group, + gnome_canvas_ellipse_ext_get_type (), + "width_units", 0.0, + "fill_color", color, + "x1", x + deltax - 2. , + "x2", x + deltax + 2., + "y1", y + deltay - 2., + "y2", y + deltay + 2., + NULL); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "0", item); + item = gnome_canvas_item_new ( + group, + gnome_canvas_ellipse_ext_get_type (), + "width_units", 0.0, + "fill_color", color, + "x1", x - deltax - 2. , + "x2", x - deltax + 2., + "y1", y - deltay - 2., + "y2", y - deltay + 2., + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "1", item); + } else { + item = gnome_canvas_item_new ( + group, + gnome_canvas_ellipse_ext_get_type (), + "width_units", 0.0, + "fill_color", color, + "x1", x - 2. , + "x2", x + 2., + "y1", y - 2., + "y2", y + 2., + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "0", item); + } + g_object_set_data (G_OBJECT (group), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + pData->Items[this] = group; +} + +void Electron::Update (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] == NULL) + return; + Theme* pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup *group = pData->Items[this]; + double x, y, angle = m_Angle / 180. * M_PI; + if (m_Dist != 0.){ + m_pAtom->GetCoords (&x, &y); + x += m_Dist * cos (angle); + y -= m_Dist * sin (angle); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + } else { + m_pAtom->GetPosition (m_Angle, x, y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + x += 2. * cos (angle); + y -= 2. * sin (angle); + } + if (m_IsPair) { + double deltax = 3. * sin (angle); + double deltay = 3. * cos (angle); + g_object_set(G_OBJECT(g_object_get_data(G_OBJECT(group), "0")), + "x1", x + deltax - 2. , + "x2", x + deltax + 2., + "y1", y + deltay - 2., + "y2", y + deltay + 2., + NULL); + g_object_set(G_OBJECT(g_object_get_data(G_OBJECT(group), "1")), + "x1", x - deltax - 2. , + "x2", x - deltax + 2., + "y1", y - deltay - 2., + "y2", y - deltay + 2., + NULL); + } else { + g_object_set(G_OBJECT(g_object_get_data(G_OBJECT(group), "0")), + "x1", x - 2. , + "x2", x + 2., + "y1", y - 2., + "y2", y + 2., + NULL); + } +} + +void Electron::SetSelected(GtkWidget* w, int state) +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + gchar const *color; + + switch (state) { + case SelStateUnselected: + color = "black"; + break; + case SelStateSelected: + color = SelectColor; + break; + case SelStateUpdating: + color = AddColor; + break; + case SelStateErasing: + color = DeleteColor; + break; + default: + color = "black"; + break; + } + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "0")), + "fill_color", color, NULL); + if (m_IsPair) + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "1")), + "fill_color", color, NULL); +} + +xmlNodePtr Electron::Save (xmlDocPtr xml) const +{ + xmlNodePtr node = xmlNewDocNode (xml, NULL, (xmlChar*) ((m_IsPair)? "electron-pair": "electron"), NULL); + char *buf; + if (m_Pos) { + char const *buf; + switch (m_Pos) { + case POSITION_NE: + buf = "ne"; + break; + case POSITION_NW: + buf = "nw"; + break; + case POSITION_N: + buf = "n"; + break; + case POSITION_SE: + buf = "se"; + break; + case POSITION_SW: + buf = "sw"; + break; + case POSITION_S: + buf = "s"; + break; + case POSITION_E: + buf = "e"; + break; + case POSITION_W: + buf = "w"; + break; + default: + buf = "def"; // should not occur + } + xmlNewProp (node, (xmlChar*) "position", (xmlChar*) buf); + } else { + buf = g_strdup_printf ("%g", m_Angle); + xmlNewProp (node, (xmlChar*) "angle", (xmlChar*) buf); + g_free (buf); + } + if (m_Dist != 0.) { + buf = g_strdup_printf ("%g", m_Dist); + xmlNewProp (node, (xmlChar*) "dist", (xmlChar*) buf); + g_free (buf); + } + return node; +} + +bool Electron::Load (xmlNodePtr node) +{ + char *buf = (char*) xmlGetProp (node, (xmlChar*) "position"); + m_Pos = 0; + if (buf) { + if (! strcmp (buf, "ne")) { + m_Pos = POSITION_NE; + m_Angle = 45.; + } else if (! strcmp (buf, "nw")) { + m_Pos = POSITION_NW; + m_Angle = 135.; + } else if (! strcmp (buf, "n")) { + m_Pos = POSITION_N; + m_Angle = 90.; + } else if (! strcmp (buf, "se")) { + m_Pos = POSITION_SE; + m_Angle = 315.; + } else if (! strcmp (buf, "sw")) { + m_Pos = POSITION_SW; + m_Angle = 225.; + } else if (! strcmp (buf, "s")) { + m_Pos = POSITION_S; + m_Angle = 270.; + } else if (! strcmp (buf, "e")) { + m_Pos = POSITION_E; + m_Angle = 0.; + } else if (! strcmp (buf, "w")) { + m_Pos = POSITION_W; + m_Angle = 180.; + } + xmlFree (buf); + } else { + buf = (char*) xmlGetProp (node, (xmlChar*) "angle"); + if (!buf) + return false; + sscanf (buf, "%lg", &m_Angle); + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "dist"); + if (buf) { + sscanf (buf, "%lg", &m_Dist); + xmlFree (buf); + } else + m_Dist = 0.; + return true; +} + +bool Electron::OnSignal (SignalId Signal, Object *Child) +{ + if (Signal != OnDeleteSignal) + return true; + Document *pDoc = (Document*) GetDocument (); + Object *pMol = GetMolecule (); + Operation *pOp = pDoc->GetNewOperation (GCP_MODIFY_OPERATION); + pOp->AddObject(pMol, 0); + SetParent (NULL); + pDoc->GetView ()->Remove (this); + if (m_pAtom) + m_pAtom->Update (); + pOp->AddObject(pMol, 1); + pDoc->FinishOperation (); + return false; +} + +void Electron::Transform2D (Matrix2D& m, double x, double y) +{ + double a = m_Angle * M_PI / 180.; + double xc = cos (a), yc = - sin (a); + m.Transform (xc, yc); + a = atan2 (- yc, xc) * 180. / M_PI; + if (a < 0) + a += 360; + SetPosition (0, a, m_Dist); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/electron.h gnome-chemistry-utils-0.10.9/libs/gcp/electron.h --- gnome-chemistry-utils-0.8.6/libs/gcp/electron.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/electron.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,143 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * electron.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ELECTRON_H +#define GCHEMPAINT_ELECTRON_H + +#include + +/*!\file*/ +namespace gcp { + +class Atom; + +/*! +The dynamic TypeId for electrons. +*/ +extern gcu::TypeId ElectronType; + +/*!\class Electron gcp/electron.h +Represents either single elecgtrons or electrons pairs. +*/ +class Electron: public gcu::Object +{ +public: +/*! +@param pAtom the Atom to which the electrons belong. +@param IsPair true for an electron pair and false for a single electron. + +Constructs a new electron representation. +*/ + Electron (Atom *pAtom, bool IsPair); +/*! +The destructor +*/ + ~Electron (); + +/*! +@return true for an electron pair and false for a single electron. +*/ + bool IsPair () {return m_IsPair;} +/*! +@param angle where to store the angle from east direction in the trigonometric convention. +@param distance where to store the distance from the center of the atom. + +@return the electron position relative to its parent atom as one of +POSITION_E, POSITION_N,... +*/ + char GetPosition (double *angle, double *distance); +/*! +@param Pos one of POSITION_E, POSITION_N,... +@param angle the angle from the east direction in the trigonometric convention. +@param distance the distance from the center of the atom, or 0. if automatic. + +Sets the position of an electronn relative to its parent atom. +*/ + void SetPosition (unsigned char Pos, double angle = 0., double distance = 0.); +/*! +@param w the GtkWidget inside which the Electron will be displayed. + +Used to add a representation of the Electron in the widget. +*/ + void Add(GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the Electron is displayed. + +Used to update the representation of the Electron in the widget. +*/ + void Update(GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the Electron is displayed. +@param state the selection state of the Electron. + +Used to set the selection state of the Electron inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. +*/ + void SetSelected(GtkWidget* w, int state); +/*! +@param xml the xmlDoc used to save the document. + +Used to save the Electron to the xmlDoc. +@return the xmlNode containing the serialized Electron. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node a pointer to the xmlNode containing the serialized object. + +Used to load an Electron in memory. The Electron must already exist. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL. + +This function is called by the framework when a signal has been emitted for +the object. Elecgtron don't have children, so that \a Child will be ignored. +Only the gcp::OnDeleteSignal is significant for this class. +It should not be called by a program; call Object::EmitSignal instead. + +@return true if the signal should be propagated to the parent, false otherwise. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Used to move and/or transform an Electron. +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); + +private: + Atom* m_pAtom; + bool m_IsPair; + unsigned char m_Pos; + double m_Angle, m_Dist; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_ELECTRON_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fontsel.cc gnome-chemistry-utils-0.10.9/libs/gcp/fontsel.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/fontsel.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fontsel.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,538 @@ +/* + * GChemPaint library + * fontsel.c + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "fontsel.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +struct _GcpFontSel { + GtkBin base; + GtkEntry *m_SizeEntry; + GtkListStore *FamilyList, *FaceList, *SizeList; + GtkTreeView *FamilyTree, *FacesTree, *SizeTree; + guint FamilySignal, FaceSignal, SizeSignal; + GtkTreeSelection *FamilySel, *FaceSel, *SizeSel; + GtkLabel *Label; + map Families; + map Faces; + char *FamilyName; + PangoStyle Style; + PangoWeight Weight; + PangoStretch Stretch; + PangoVariant Variant; + int Size; +}; + +typedef struct { + GtkBinClass base_class; + + /* signals */ + void (*changed) (GcpFontSel *fs); +} GcpFontSelClass; + +static void +gcp_font_sel_size_request (GtkWidget *widget, + GtkRequisition *requisition) +{ + GtkWidget *w = GTK_WIDGET (gtk_bin_get_child (GTK_BIN (widget))); + if (w) + gtk_widget_size_request (w, requisition); + else { + requisition->width = 0; + requisition->height = 0; + } +} + +static void +gcp_font_sel_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) +{ + GtkWidget *w = GTK_WIDGET (gtk_bin_get_child (GTK_BIN (widget))); + if (w) + gtk_widget_size_allocate (GTK_WIDGET (w), allocation); +} + +enum { + FONT_SEL_PROP_0, + FONT_SEL_PROP_FAMILY, + FONT_SEL_PROP_STYLE, + FONT_SEL_PROP_WEIGHT, + FONT_SEL_PROP_STRETCH, + FONT_SEL_PROP_VARIANT, + FONT_SEL_PROP_SIZE +}; + +enum { + CHANGED, + LAST_SIGNAL +}; +static gulong gcp_font_sel_signals [LAST_SIGNAL] = { 0, }; + +static void gcp_font_sel_set_label (GcpFontSel *fs) +{ + PangoFontDescription *fd = pango_font_description_new (); + pango_font_description_set_family (fd, fs->FamilyName); + pango_font_description_set_style (fd, fs->Style); + pango_font_description_set_weight (fd, fs->Weight); + pango_font_description_set_variant (fd, fs->Variant); + pango_font_description_set_stretch (fd, fs->Stretch); + pango_font_description_set_size (fd, fs->Size); + char *name = pango_font_description_to_string (fd); + char *markup = g_markup_printf_escaped ("%s", name, name); + gtk_label_set_markup (fs->Label, markup); + g_free (name); + g_free (markup); +} + +static void select_best_font_face (GcpFontSel *fs) +{ + PangoFontDescription *desc; + int distance, best; + PangoStyle Style; + PangoWeight Weight; + PangoVariant Variant; + PangoStretch Stretch; + map ::iterator i, iend = fs->Faces.end (); + char const *name = NULL, *buf; + GtkTreeIter iter; + + best = 32000; // This should be enough + for (i = fs->Faces.begin (); i != iend; i++) { + desc = pango_font_face_describe ((*i).second); + // Try to select the best available face + Style = pango_font_description_get_style (desc); + Weight = pango_font_description_get_weight (desc); + Variant = pango_font_description_get_variant (desc); + Stretch = pango_font_description_get_stretch (desc); + distance = abs (Weight - fs->Weight) + + abs ((Style? Style + 2: 0) - (fs->Style? fs->Style + 2: 0)) * 1000 + + abs (Variant - fs->Variant) * 10 + abs (Stretch - fs->Stretch); + if (distance < best) { + best = distance; + name = (*i).first.c_str (); + } + pango_font_description_free (desc); + } + // select the found face + if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (fs->FaceList), &iter)) + return; + do { + gtk_tree_model_get (GTK_TREE_MODEL (fs->FaceList), &iter, 0, &buf, -1); + if (!strcmp (name, buf)) { + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (fs->FaceList), &iter); + gtk_tree_view_set_cursor (fs->FacesTree, path, NULL, FALSE); + gtk_tree_path_free (path); + break; + } + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (fs->FaceList), &iter)); +} + +static void +gcp_font_sel_get_property (GObject *obj, guint param_id, + GValue *value, GParamSpec *pspec) +{ + GcpFontSel *fs = GCP_FONT_SEL (obj); + + switch (param_id) { + case FONT_SEL_PROP_FAMILY: + g_value_set_string (value, fs->FamilyName); + break; + case FONT_SEL_PROP_STYLE: + g_value_set_int (value, fs->Style); + break; + case FONT_SEL_PROP_WEIGHT: + g_value_set_int (value, fs->Weight); + break; + case FONT_SEL_PROP_STRETCH: + g_value_set_int (value, fs->Stretch); + break; + case FONT_SEL_PROP_VARIANT: + g_value_set_int (value, fs->Variant); + break; + case FONT_SEL_PROP_SIZE: + g_value_set_int (value, fs->Size); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec); + return; + } +} + +/* These are what we use as the standard font sizes, for the size list. + */ +static const guint16 font_sizes[] = { + 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, + 32, 36, 40, 48, 56, 64, 72 +}; + +static void gcp_font_sel_set_size_full (GcpFontSel *fs, bool update_list) +{ + char *buf = g_strdup_printf ("%.1f", (double) fs->Size / PANGO_SCALE); + gtk_entry_set_text (fs->m_SizeEntry, buf); + g_free (buf); + if (update_list) { + GtkTreeIter iter; + bool found = false; + g_signal_handler_block (fs->SizeSel, fs->SizeSignal); + + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (fs->SizeList), &iter); + for (unsigned i = 0; i < G_N_ELEMENTS (font_sizes) && !found; i++) { + if (font_sizes[i] * PANGO_SCALE == fs->Size) { + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (fs->SizeList), &iter); + gtk_tree_view_set_cursor (fs->SizeTree, path, NULL, FALSE); + gtk_tree_path_free (path); + found = true; + } + + gtk_tree_model_iter_next (GTK_TREE_MODEL (fs->SizeList), &iter); + } + + if (!found) + gtk_tree_selection_unselect_all (fs->SizeSel); + g_signal_handler_unblock (fs->SizeSel, fs->SizeSignal); + } + g_signal_emit (G_OBJECT (fs), gcp_font_sel_signals [CHANGED], 0); + gcp_font_sel_set_label (fs); +} + +static void +gcp_font_sel_set_property (GObject *obj, guint param_id, + GValue const *value, GParamSpec *pspec) +{ + GcpFontSel *fs = GCP_FONT_SEL (obj); + + switch (param_id) { + case FONT_SEL_PROP_FAMILY: + if (fs->FamilyName) + g_free (fs->FamilyName); + fs->FamilyName = g_strdup (g_value_get_string (value)); + GtkTreeIter iter; + char const *buf; + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (fs->FamilyList), &iter); + do { + gtk_tree_model_get (GTK_TREE_MODEL (fs->FamilyList), &iter, 0, &buf, -1); + if (!strcmp (fs->FamilyName, buf)) { + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (fs->FamilyList), &iter); + gtk_tree_view_set_cursor (fs->FamilyTree, path, NULL, FALSE); + gtk_tree_view_scroll_to_cell (fs->FamilyTree, path, NULL, FALSE, 0., 0.); + gtk_tree_path_free (path); + break; + } + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (fs->FamilyList), &iter)); + return; + case FONT_SEL_PROP_STYLE: + fs->Style = (PangoStyle) g_value_get_int (value); + break; + case FONT_SEL_PROP_WEIGHT: + fs->Weight = (PangoWeight) g_value_get_int (value); break; + case FONT_SEL_PROP_STRETCH: + fs->Stretch = (PangoStretch) g_value_get_int (value); break; + case FONT_SEL_PROP_VARIANT: + fs->Variant = (PangoVariant) g_value_get_int (value); break; + case FONT_SEL_PROP_SIZE: + fs->Size = g_value_get_int (value); + gcp_font_sel_set_size_full (fs, true); + return; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec); + return; + } + select_best_font_face (fs); +} + +static void +gcp_font_sel_class_init (GcpFontSelClass *klass) +{ + GObjectClass *object_class = (GObjectClass*) klass; + GtkWidgetClass *widget_class = (GtkWidgetClass *) klass; + + object_class->get_property = gcp_font_sel_get_property; + object_class->set_property = gcp_font_sel_set_property; + + widget_class->size_request = gcp_font_sel_size_request; + widget_class->size_allocate = gcp_font_sel_size_allocate; + g_object_class_install_property (object_class, FONT_SEL_PROP_FAMILY, + g_param_spec_string ("family", _("Family"), + _("Font family"), + "Bitstream Vera Sans", (GParamFlags) G_PARAM_READWRITE)); + g_object_class_install_property (object_class, FONT_SEL_PROP_STYLE, + g_param_spec_int ("style", _("Style"), + _("The font style (normal, oblique or italic)"), + PANGO_STYLE_NORMAL, PANGO_STYLE_ITALIC, PANGO_STYLE_NORMAL, + (GParamFlags) G_PARAM_READWRITE)); + g_object_class_install_property (object_class, FONT_SEL_PROP_WEIGHT, + g_param_spec_int ("weight", _("Weight"), + _("The font weight"), + PANGO_WEIGHT_ULTRALIGHT, PANGO_WEIGHT_HEAVY, PANGO_WEIGHT_NORMAL, + (GParamFlags) G_PARAM_READWRITE)); + g_object_class_install_property (object_class, FONT_SEL_PROP_VARIANT, + g_param_spec_int ("variant", _("Variant"), + _("The font variant"), + PANGO_VARIANT_NORMAL, PANGO_VARIANT_SMALL_CAPS, PANGO_VARIANT_NORMAL, + (GParamFlags) G_PARAM_READWRITE)); + g_object_class_install_property (object_class, FONT_SEL_PROP_STRETCH, + g_param_spec_int ("stretch", _("Stretch"), + _("The font stretch (condensed, normal or expanded)"), + PANGO_STRETCH_ULTRA_CONDENSED, PANGO_STRETCH_ULTRA_EXPANDED, PANGO_STRETCH_NORMAL, + (GParamFlags) G_PARAM_READWRITE)); + g_object_class_install_property (object_class, FONT_SEL_PROP_SIZE, + g_param_spec_int ("size", _("Size"), + _("The font size (in pango units)"), + 0, G_MAXINT, 12 * PANGO_SCALE, + (GParamFlags) G_PARAM_READWRITE)); + + gcp_font_sel_signals [CHANGED] = g_signal_new ("changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GcpFontSelClass, changed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); +} + +static void on_select_family (GtkTreeSelection *selection, GcpFontSel *fs) +{ + GtkTreeModel *model; + GtkTreeIter iter, selected; + char const *name; + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) + return; + gtk_tree_model_get (model, &iter, 0, &fs->FamilyName, -1); + PangoFontFamily *family = fs->Families[fs->FamilyName]; + PangoFontFace **faces; + int i, besti, nb; + g_signal_handler_block (fs->FaceSel, fs->FaceSignal); + pango_font_family_list_faces (family, &faces, &nb); + gtk_list_store_clear (fs->FaceList); + map::iterator j, jend = fs->Faces.end (); + for (j = fs->Faces.begin (); j != jend; j++) { + g_object_unref ((*j).second); + } + fs->Faces.clear (); + PangoFontDescription *desc; + int distance, best; + PangoStyle Style; + PangoWeight Weight; + PangoVariant Variant; + PangoStretch Stretch; + + best = 32000; // This should be enough + for (i = 0; i < nb; i++) { + name = pango_font_face_get_face_name (faces[i]); + desc = pango_font_face_describe (faces[i]); + fs->Faces[name] = (PangoFontFace*) g_object_ref (faces[i]); + gtk_list_store_append (fs->FaceList, &iter); + gtk_list_store_set (fs->FaceList, &iter, + 0, name, + -1); + // Try to select the best available face + Style = pango_font_description_get_style (desc); + Weight = pango_font_description_get_weight (desc); + Variant = pango_font_description_get_variant (desc); + Stretch = pango_font_description_get_stretch (desc); + distance = abs (Weight - fs->Weight) + + abs ((Style? Style + 2: 0) - (fs->Style? fs->Style + 2: 0)) * 1000 + + abs (Variant - fs->Variant) * 10 + abs (Stretch - fs->Stretch); + if (distance < best) { + best = distance; + selected = iter; + besti = i; + } + // TODO: write this code + pango_font_description_free (desc); + } + g_signal_handler_unblock (fs->FaceSel, fs->FaceSignal); + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (fs->FaceList), &selected); + if (path) { + gtk_tree_selection_select_path (GTK_TREE_SELECTION (fs->FaceSel), path); + gtk_tree_path_free (path); + } +} + +static void on_select_face (GtkTreeSelection *selection, GcpFontSel *fs) +{ + GtkTreeModel *model; + GtkTreeIter iter; + char const *name; + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) + return; + gtk_tree_model_get (model, &iter, 0, &name, -1); + PangoFontFace *face = fs->Faces[name]; + PangoFontDescription *desc = pango_font_face_describe (face); + fs->Style = pango_font_description_get_style (desc); + fs->Weight = pango_font_description_get_weight (desc); + fs->Variant = pango_font_description_get_variant (desc); + fs->Stretch = pango_font_description_get_stretch (desc); + pango_font_description_free (desc); + g_signal_emit (G_OBJECT (fs), gcp_font_sel_signals [CHANGED], 0); + gcp_font_sel_set_label (fs); +} + +static void on_select_size (GtkTreeSelection *selection, GcpFontSel *fs) +{ + GtkTreeModel *model; + GtkTreeIter iter; + gtk_tree_selection_get_selected (selection, &model, &iter); + gtk_tree_model_get (model, &iter, 0, &fs->Size, -1); + fs->Size *= PANGO_SCALE; + gcp_font_sel_set_size_full (fs, false); +} + +static void on_size_activate (GtkEntry *entry, GcpFontSel *fs) +{ + char const *text = gtk_entry_get_text (fs->m_SizeEntry); + fs->Size = (int) (MAX (0.1, atof (text) * PANGO_SCALE + 0.5)); + gcp_font_sel_set_size_full (fs, true); +} + +static bool on_size_focus_out (GtkEntry *entry, GdkEventFocus *event, GcpFontSel *fs) +{ + on_size_activate (entry, fs); + return true; +} + +static void +gcp_font_sel_init (GcpFontSel *fs) +{ + int i, nb; + PangoFontFamily **families; + GtkWidget *sc, *w = gtk_table_new (3, 4, FALSE); + g_object_set (G_OBJECT (w), "border-width", 6, NULL); + fs->Families = map(); + fs->Faces = map(); + GtkTable *table = GTK_TABLE (w); + gtk_table_set_col_spacings (table, 12); + gtk_container_add (GTK_CONTAINER (fs), GTK_WIDGET (w)); + w = gtk_label_new (""); + fs->Label = GTK_LABEL (w); + gtk_table_attach (table, w, 0, 3, 3, 4, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 6); + // Initialize faces list + fs->FaceList = gtk_list_store_new (1, G_TYPE_STRING); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (fs->FaceList), 0, GTK_SORT_ASCENDING); + fs->FacesTree = GTK_TREE_VIEW (gtk_tree_view_new_with_model (GTK_TREE_MODEL (fs->FaceList))); + gtk_tree_view_set_headers_visible (fs->FacesTree, false); + sc = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sc), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sc), GTK_WIDGET (fs->FacesTree)); + gtk_table_attach (table, sc, 1, 2, 1, 3, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes (NULL, renderer, "text", 0, NULL); + gtk_tree_view_append_column (fs->FacesTree, column); + GtkTreeSelection *selection = gtk_tree_view_get_selection (fs->FacesTree); + fs->FaceSel = selection; + fs->FaceSignal = g_signal_connect (fs->FaceSel, "changed", G_CALLBACK (on_select_face), fs); + // Initialize sizes list + fs->SizeList = gtk_list_store_new (1, G_TYPE_INT); + w = gtk_tree_view_new_with_model (GTK_TREE_MODEL (fs->SizeList)); + fs->SizeTree = GTK_TREE_VIEW (w); + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (w), false); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (NULL, renderer, "text", 0, NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (w), column); + GtkTreeIter iter; + for (i = 0; i < (int) G_N_ELEMENTS (font_sizes); i++) { + gtk_list_store_append (fs->SizeList, &iter); + gtk_list_store_set (fs->SizeList, &iter, + 0, font_sizes[i], + -1); + } + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (w)); + fs->SizeSel = selection; + fs->SizeSignal = g_signal_connect (fs->SizeSel, "changed", G_CALLBACK (on_select_size), fs); + sc = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sc), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sc), w); + gtk_table_attach (table, sc, 2, 3, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + w = gtk_entry_new (); + fs->m_SizeEntry = GTK_ENTRY (w); + g_signal_connect (w, "activate", G_CALLBACK (on_size_activate), fs); + g_signal_connect_after (w, "focus_out_event", G_CALLBACK (on_size_focus_out), fs); + gcp_font_sel_set_size_full (fs, true); + gtk_table_attach (table, w, 2, 3, 1, 2, + (GtkAttachOptions) (0), + (GtkAttachOptions) 0, 0, 0); + PangoContext *pc = gtk_widget_get_pango_context (w); + PangoLayout *pl = pango_layout_new (pc); + pango_layout_set_text (pl, "0000000", -1); + PangoRectangle rect; + pango_layout_get_extents (pl, NULL, &rect); + g_object_unref (G_OBJECT (pl)); + gtk_widget_set_size_request (sc, -1, rect.height / PANGO_SCALE * 12); + gtk_widget_set_size_request (w, rect.width / PANGO_SCALE, -1); + pango_context_list_families (pc, &families, &nb); + fs->FamilyList = gtk_list_store_new (1, G_TYPE_STRING); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (fs->FamilyList), 0, GTK_SORT_ASCENDING); + fs->FamilyTree = GTK_TREE_VIEW (gtk_tree_view_new_with_model (GTK_TREE_MODEL (fs->FamilyList))); + gtk_tree_view_set_headers_visible (fs->FamilyTree, false); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (NULL, renderer, "text", 0, NULL); + gtk_tree_view_append_column (fs->FamilyTree, column); + string name; + for (i = 0; i < nb; i++) { + PangoFontFace **faces; + int *sizes, n; + pango_font_family_list_faces (families[i], &faces, &n); + if (n <= 0) + continue; + pango_font_face_list_sizes (faces[0], &sizes, &n); + if (n > 0) // Do not use bitmap fonts + continue; + name = pango_font_family_get_name (families[i]); + fs->Families[name] = (PangoFontFamily*) g_object_ref (families[i]); + gtk_list_store_append (fs->FamilyList, &iter); + gtk_list_store_set (fs->FamilyList, &iter, + 0, name.c_str (), + -1); + } + fs->FamilySel = gtk_tree_view_get_selection (fs->FamilyTree); + gtk_tree_selection_set_mode (fs->FamilySel, GTK_SELECTION_BROWSE); + fs->FamilySignal = g_signal_connect (G_OBJECT (fs->FamilySel), "changed", G_CALLBACK (on_select_family), fs); + sc = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sc), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sc), GTK_WIDGET (fs->FamilyTree)); + gtk_table_attach (table, sc, 0, 1, 1, 3, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); +} + +GSF_CLASS (GcpFontSel, gcp_font_sel, + gcp_font_sel_class_init, gcp_font_sel_init, + GTK_TYPE_BIN) diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fontsel.h gnome-chemistry-utils-0.10.9/libs/gcp/fontsel.h --- gnome-chemistry-utils-0.8.6/libs/gcp/fontsel.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fontsel.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,91 @@ +/* + * GChemPaint library + * fontsel.h + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCP_FONT_SEL_H +#define GCP_FONT_SEL_H + +#include + +/*!\file +Declaration of the GcpFontSel widget. +*/ + +G_BEGIN_DECLS + +typedef struct _GcpFontSel GcpFontSel; + +/*!@return the GType associated to GcpFontSel */ +#define GCP_FONT_SEL_TYPE (gcp_font_sel_get_type ()) +/*! +Casts \a obj to a GcpFontSel * pointer. +@return a pointer to the GcpFontSel * or NULL if \a obj does not point to +a GcpFontSel widget. +*/ +#define GCP_FONT_SEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_FONT_SEL_TYPE, GcpFontSel)) +/*! +\return TRUE if \a obj points to a GcpFontSel widget, FALSE otherwise. +*/ +#define IS_GCP_FONT_SEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_FONT_SEL_TYPE)) + +/*!@return the GType associated to GcpFontSel */ +GType gcp_font_sel_get_type (void); + +/*! \struct GcpFontSel gcp/fontsel.h +The GcpFontSel Widget is a font chooser widget used in GChemPaint. + +\image html gcpfontsel.png + +
+

Signals

+ + This widget has one signal: +- "changed": void user_function (GcpFontSel *fc, gpointer data). +@param fc the object which received the signal. +@param data user data set when the signal handler was connected. + +This signal is raised when any property changes in the widget. + +
+

Properties

+There are six properties: +- "family": char* (Read / Write). +
The font family. Default is "Bitstream Vera Sans". + +- "style": PangoStyle (Read / Write). +
The font style. Default is PANGO_STYLE_NORMAL. + +- "weight": PangoWeight (Read / Write). +
The font weight. Default is PANGO_WEIGHT_NORMAL + +- "variant": PangoVariant (Read / Write). +
The font variant. Default is PANGO_VARIANT_NORMAL + +- "stretch": PangoStretch (Read / Write). +
The font stretch. Default is PANGO_STRETCH_NORMAL + +- "size": int (Read / Write). +
The font size expressed in pango units. Default is 12*PANGO_SCALE. +*/ + +G_END_DECLS + +#endif /* GCP_FONT_SEL_H */ diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fragment-atom.cc gnome-chemistry-utils-0.10.9/libs/gcp/fragment-atom.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/fragment-atom.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fragment-atom.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,299 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * fragment-atom.cc + * + * Copyright (C) 2003-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "fragment-atom.h" +#include "fragment.h" +#include "molecule.h" +#include "view.h" +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +FragmentAtom::FragmentAtom (): Atom () +{ + SetId ("a1"); + SetShowSymbol (true); +} + +FragmentAtom::FragmentAtom (Fragment *fragment, int Z): Atom () +{ + m_Fragment = fragment; + SetZ (Z); + SetId ("a1"); + SetShowSymbol (true); + BuildSymbolGeometry (0,0,0); +} + +FragmentAtom::~FragmentAtom () {} + +void FragmentAtom::SetZ (int Z) +{ + static bool setting = false; + if (setting) + return; + setting = true; + gcu::Atom::SetZ (Z); + if (Z != 0) + m_Fragment->OnChangeAtom (); + setting = false; + BuildSymbolGeometry (0,0,0); +} + +/*! +Only accept a new bond if none exists. So only one bond. +*/ +bool FragmentAtom::AcceptNewBonds (int nb) +{ + return (nb > 1)? false: GetBondsNumber () == 0; +} + +/*! +Overrided to avoid Atom::Add execution. Don't do anything. +*/ +void FragmentAtom::Add (GtkWidget* w) const +{ +} + +/*! +Overrided to avoid Atom::Update execution. Just call fragment Update method. +*/ +void FragmentAtom::Update (GtkWidget* w) const +{ + m_Fragment->Update (w); +} + + +/*! +Overrided to avoid Atom::SetSelected execution. Just call fragment SetSelected method. +*/ +void FragmentAtom::SetSelected (GtkWidget* w, int state) +{ + m_Fragment->SetSelected (w, state); +} + +xmlNodePtr FragmentAtom::Save (xmlDocPtr xml) const +{ + xmlNodePtr node; + gchar buf[16]; + node = xmlNewDocNode (xml, NULL, (xmlChar*) "atom", NULL); + if (!node) + return NULL; + SaveId (node); + + strncpy (buf, GetSymbol (), sizeof (buf)); + xmlNodeSetContent (node, (xmlChar*) buf); + + if (m_Charge) { + snprintf (buf, sizeof (buf), "%d", m_Charge); + xmlNewProp (node, (xmlChar*) "charge", (xmlChar*) buf); + double Angle, Dist; + unsigned char ChargePos = Atom::GetChargePosition (&Angle, &Dist); + if (ChargePos != 0xff) { + char *buf; + if (ChargePos) { + char const *buf; + switch (ChargePos) { + case POSITION_NE: + buf = "ne"; + break; + case POSITION_NW: + buf = "nw"; + break; + case POSITION_N: + buf = "n"; + break; + case POSITION_SE: + buf = "se"; + break; + case POSITION_SW: + buf = "sw"; + break; + case POSITION_S: + buf= "s"; + break; + case POSITION_E: + buf = "e"; + break; + case POSITION_W: + buf = "w"; + break; + default: + buf = "def"; // should not occur + } + xmlNewProp (node, (xmlChar*) "charge-position", (xmlChar*) buf); + } else { + buf = g_strdup_printf ("%g", Angle * 180. / M_PI); + xmlNewProp (node, (xmlChar*) "charge-angle", (xmlChar*) buf); + g_free (buf); + } + if (Dist != 0.) { + buf = g_strdup_printf ("%g", Dist); + xmlNewProp (node, (xmlChar*) "charge-dist", (xmlChar*) buf); + g_free (buf); + } + } + } + return node; +} + +bool FragmentAtom::Load (xmlNodePtr node) +{ + char* buf; + unsigned char ChargePos = 0xff; + double Angle = 0., Dist = 0.; + buf = (char*) xmlGetProp (node, (xmlChar*) "id"); + if (buf) { + SetId (buf); + xmlFree (buf); + } + buf = (char*) xmlNodeGetContent (node); + if (buf) { + m_Z = Element::Z (buf); + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "charge"); + m_Charge = (buf)? (char) atoi (buf): 0; + if (buf) + xmlFree (buf); + if (m_Charge) { + char *buf = (char*) xmlGetProp (node, (xmlChar*) "charge-position"); + if (buf) { + if (! strcmp (buf, "ne")) { + ChargePos = POSITION_NE; + Angle = M_PI / 4.; + } else if (! strcmp (buf, "nw")) { + ChargePos = POSITION_NW; + Angle = 3. * M_PI / 4.; + } else if (! strcmp (buf, "n")) { + ChargePos = POSITION_N; + Angle = M_PI / 2.; + } else if (! strcmp (buf, "se")) { + ChargePos = POSITION_SE; + Angle = 7. * M_PI / 4; + } else if (! strcmp (buf, "sw")) { + ChargePos = POSITION_SW; + Angle = 5. * M_PI / 4; + } else if (! strcmp (buf, "s")) { + ChargePos = POSITION_S; + Angle = 3 * M_PI / 2.; + } else if (! strcmp (buf, "e")) { + ChargePos = POSITION_E; + Angle = 0.; + } else if (! strcmp (buf, "w")) { + ChargePos = POSITION_W; + Angle = M_PI; + } + xmlFree (buf); + } else { + buf = (char*) xmlGetProp (node, (xmlChar*)"charge-angle"); + if (buf) { + sscanf (buf, "%lg", &Angle); + Angle *= M_PI / 180.; + xmlFree (buf); + ChargePos = 0; + } + } + buf = (char*) xmlGetProp (node, (xmlChar*)"charge-dist"); + if (buf) { + sscanf (buf, "%lg", &Dist); + xmlFree (buf); + } + SetChargePosition (ChargePos, ChargePos == 0xff, Angle, Dist); + } + return true; +} + +void FragmentAtom::AddToMolecule (Molecule* Mol) +{ + Mol->AddFragment (m_Fragment); +} + +int FragmentAtom::GetChargePosition (unsigned char& Pos, double Angle, double& x, double& y) +{ + return m_Fragment->GetChargePosition (this, Pos, Angle, x, y); +} + + +int FragmentAtom::GetAvailablePosition (double& x, double& y) +{ + return m_Fragment->GetAvailablePosition (x, y); +} + +bool FragmentAtom::GetPosition (double angle, double& x, double& y) +{ + return m_Fragment->GetPosition (angle, x, y); +} + +bool FragmentAtom::AcceptCharge (int charge) +{ + return (charge >= -1 && charge <= 1); +} + +void FragmentAtom::Update () +{ + m_Fragment->Update (); +} + +bool FragmentAtom::Match (gcu::Atom *atom, AtomMatchState &state) +{ + return false; // not supported at the moment +} + +void FragmentAtom::DoBuildSymbolGeometry (View *pView) +{ + // Building atom geometry if necessary + double ascent, x; + char const *symbol = GetSymbol (); + if (!symbol) + return; + PangoContext* pc = pView->GetPangoContext (); + PangoLayout *layout = pango_layout_new (pc); + pango_layout_set_font_description (layout, pView->GetPangoFontDesc ()); + PangoRectangle rect; + if (m_CHeight == 0.) { + pango_layout_set_text (layout, "C", 1); + pango_layout_get_extents (layout, &rect, NULL); + m_CHeight = double (rect.height / PANGO_SCALE) / 2.0; + } + pango_layout_set_text (layout, symbol, -1); + PangoLayoutIter* iter = pango_layout_get_iter (layout); + ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + pango_layout_get_extents (layout, &rect, NULL); + + BuildSymbolGeometry ((double) rect.width / PANGO_SCALE, (double) rect.height / PANGO_SCALE, ascent - (double) rect.y / PANGO_SCALE - m_CHeight); + g_object_unref (G_OBJECT (layout)); + map::iterator i; + Bond *bond = (Bond*) GetFirstBond (i); + if (bond) + bond->SetDirty (); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fragment-atom.h gnome-chemistry-utils-0.10.9/libs/gcp/fragment-atom.h --- gnome-chemistry-utils-0.8.6/libs/gcp/fragment-atom.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fragment-atom.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,187 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * fragment-atom.h + * + * Copyright (C) 2003-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_FRAGMENT_ATOM_H +#define GCHEMPAINT_FRAGMENT_ATOM_H + +#include "atom.h" +#include + +/*!\file*/ +namespace gcp { + +class Fragment; + +/*!\class FragmentAtom gcp/fragment-atom.h +Represents an atom inside a atoms group (see gcp::Fragment class). +*/ +class FragmentAtom: public Atom +{ +public: +/*! +The default constructor. +*/ + FragmentAtom (); +/*! +@param fragment the parent Fragment. +@param Z the atomic number. + +Constructs a FragmentAtom inside \a fragment with atomic number Z. This does +not add the symbol to the string. +*/ + FragmentAtom (Fragment *fragment, int Z); +/*! +The destructor. +*/ + virtual ~FragmentAtom (); + +/*! +@param Z the new atomic number. + +Changes the atomic number of the atom. +*/ + void SetZ (int Z); +/*! +@param nb the number of bonds to add, taking orders into account. + +This atom class does not currently support more than one single bond and +no multiple bond at all. +@return true if the operation is allowed, false otherwise. +*/ + bool AcceptNewBonds (int nb); +/*! +@param w a GtkWidget. + +Overrided to avoid Atom::Add execution. Don't do anything. +*/ + void Add (GtkWidget* w) const; +/*! +Overrided to avoid Atom::Update execution. Just call Fragment::Update() method. +*/ + void Update (); +/*! +@param w a GtkWidget. + +Overrided to avoid Atom::Update execution. Just call Fragment::Update(w). +*/ + void Update (GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the atom is displayed. +@param state the selection state of the atom. + +Overrided to avoid Atom::SetSelected execution. Just call Fragment::SetSelected +method. +*/ + void SetSelected (GtkWidget* w, int state); +/*! +@param xml the xmlDoc used to save the document. + +Used to save the atome specific data to the xmlDoc. +@return the xmlNode containing the serialized atom. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +param node a pointer to the xmlNode containing the serialized atom. + +Used to load the atom specific properties in memory. The FragmentAtom must +already exist. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param Pos the approximate position of the charge. +@param Angle the angle from horizontal left. +@param x the x position of the charge symbol. +@param y the y position of the charge symbol. + +On input \a Pos can be one of POSITION_E, POSITION_N,... or 0xff, in which case, +it will be given a default value. \a x and \a y are set to the position where the charge +sign should be displayed usding the alignment code returned by this method. +@return a number to set how the charge symbol should be aligned relative to its +position. Possible values are: +- −2: center top. +- −1: right. +- 0: center. +- 1: left. +- 2: center bottom. +*/ + int GetChargePosition (unsigned char& Pos, double Angle, double& x, double& y); +/*! +@param x the x position. +@param y the y position. + +This method finds an available position for drawing a charge sign and returns +it as a symbolic value (see POSITION_E, POSITION_N,...). The \a x and \a y are updated so +that they give the absolute position. +@return an available position. +*/ + int GetAvailablePosition (double& x, double& y); +/*! +@param angle the angle at which a charge sign should be displayed. +@param x the x position. +@param y the y position. + +Updates \a x and \a y so that they become the absolute position corresponding to the angle +when the position is available. +@return true on success, false otherwise. +*/ + bool GetPosition (double angle, double& x, double& y); +/*! +@param charge the charge that might be set. + +Currently, these atoms only accept -1, 0, and +1 as charges. +@return true if the charge is acceptable. +*/ + bool AcceptCharge (int charge); + +/*! +@param Mol: a pointer to a molecule + +Adds the fragment containing the atom to the molecule calling gcpMolecule::AddFragment() +*/ + void AddToMolecule (Molecule* Mol); +/*! +@param atom the atom to which the this instance is to be compared. +@param state the AtomMatchState representing the current comparison state. + +Try to match atoms from two molecules which are compared. This function calls +itself recursively until all atoms from the two molecules have been matched or +until an difference is found. Overriden methods should call this base function +and return its result. FragmentAtom instances can't be matched currently. +@return always false. +*/ + bool Match (gcu::Atom *atom, gcu::AtomMatchState &state); +/*! +@param pView the document view. + +Builds the symbol geometry if necessary. +*/ + void DoBuildSymbolGeometry (View *pView); + +GCU_RO_POINTER_PROP (Fragment, Fragment) +}; + +} // namespace gcp + +#endif // GCHEMPAINT_FRAGMENT_ATOM_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fragment.cc gnome-chemistry-utils-0.10.9/libs/gcp/fragment.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/fragment.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fragment.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1504 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * fragment.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "fragment.h" +#include "fragment-residue.h" +#include "widgetdata.h" +#include "document.h" +#include "application.h" +#include "view.h" +#include "text.h" +#include "theme.h" +#include "tool.h" +#include "settings.h" +#include "window.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +static void on_fragment_changed (Fragment *fragment) +{ + fragment->OnChanged (true); +} + +static void on_fragment_sel_changed (Fragment *fragment, struct GnomeCanvasPangoSelBounds *bounds) +{ + fragment->OnSelChanged (bounds); +} + +Fragment::Fragment (): + TextObject (FragmentType), + m_Inversable (false) +{ + m_Atom = new FragmentAtom (this, 0); + m_BeginAtom = m_EndAtom = 0; + m_StartSel = m_EndSel = 0; + m_lbearing = 0; + m_CHeight = 0.; + SetId ("f1"); +} + +Fragment::Fragment (double x, double y): + TextObject (x, y, FragmentType), + m_Inversable (false) +{ + m_Atom = new FragmentAtom (this, 0); + m_Atom->SetCoords (x, y); + m_BeginAtom = m_EndAtom = 0; + m_lbearing = 0; + m_CHeight = 0.; + SetId ("f1"); +} + +Fragment::~Fragment () +{ + if (m_Atom) + delete m_Atom; +} + +bool Fragment::OnChanged (bool save) +{ +// FIXME: this code is full of bugs: rewrite it + if (m_bLoading) + return false; + Document* pDoc = (Document*) GetDocument (); + if (!pDoc) + return false; + View* pView = pDoc->GetView (); + GtkWidget* pWidget = pView->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (pWidget), "data"); + GnomeCanvasGroup *group = pData->Items[this]; + if (!group) { + pData->Items.erase (this); + m_bLoading = false; + return false; + } + GnomeCanvasPango *PangoItem = GNOME_CANVAS_PANGO (g_object_get_data (G_OBJECT (group), "fragment")); + unsigned CurPos = gnome_canvas_pango_get_cur_index (PangoItem); + AnalContent (m_StartSel, CurPos); + m_bLoading = true; + m_buf = pango_layout_get_text (m_Layout); + if (m_buf.length ()) { + PangoLayoutIter *iter = pango_layout_get_iter (m_Layout); + m_ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + } + if (m_buf.length () < m_EndAtom) { // needed if the symbol of part of it has been destroyed + m_Atom->SetZ (0); + m_EndAtom = m_buf.length (); + if (m_BeginAtom > m_EndAtom) + m_BeginAtom = m_EndAtom; + } + /*main atom management*/ + FragmentResidue *residue = dynamic_cast (m_Atom); + Residue *r = NULL; + char sy[Residue::MaxSymbolLength + 1]; + if (!m_Atom->GetSymbol ()) + m_StartSel = m_BeginAtom; + if (!m_Atom->GetZ () || (residue != NULL && residue->GetResidue () == NULL)) { + strncpy (sy, m_buf.c_str () + m_StartSel, Residue::MaxSymbolLength); + int i = Residue::MaxSymbolLength; + while (i > 0) { + sy[i] = 0; + r = (Residue *) Residue::GetResidue (sy, NULL); + if (r || Element::Z (sy) > 0) + break; + i--; + } + if (r) { + CurPos = m_StartSel + strlen (sy); + m_BeginAtom = m_StartSel; + m_EndAtom = CurPos; + if (residue) + residue->SetResidue (r); + else { + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + m_Atom = new FragmentResidue (this, sy); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + double x, y; + pOldAtom->GetCoords (&x, &y); + m_Atom->SetCoords (x, y); + delete pOldAtom; + AddChild (m_Atom); + } + } else { + int Z = GetElementAtPos (m_StartSel, CurPos); + if (!Z && m_StartSel > m_BeginAtom) + Z = GetElementAtPos (m_StartSel = m_BeginAtom, CurPos); + if (Z) { + if (residue) { + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + m_Atom = new FragmentAtom (this, Z); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + double x, y; + pOldAtom->GetCoords (&x, &y); + m_Atom->SetCoords (x, y); + delete pOldAtom; + AddChild (m_Atom); + } else + m_Atom->SetZ (Z); + m_BeginAtom = m_StartSel; + m_EndAtom = CurPos; + } + } + } else if (m_EndSel <= m_BeginAtom) { + int delta = CurPos - m_EndSel; + m_BeginAtom += delta; + m_EndAtom += delta; + } else if ((m_EndAtom <= m_EndSel && m_EndAtom >= m_StartSel) || + (m_BeginAtom <= m_EndSel && m_BeginAtom >= m_StartSel) || + (m_BeginAtom + Residue::MaxSymbolLength >= CurPos)) { + if (m_BeginAtom > m_StartSel) + m_BeginAtom = m_StartSel; + if (m_EndAtom > CurPos) + m_EndAtom = CurPos; + else if (m_EndAtom < m_BeginAtom + Residue::MaxSymbolLength) + m_EndAtom = m_BeginAtom + Residue::MaxSymbolLength; + strncpy (sy, m_buf.c_str () + m_BeginAtom, Residue::MaxSymbolLength); + int i = Residue::MaxSymbolLength; + while (i > 0) { + sy[i] = 0; + r = (Residue *) Residue::GetResidue (sy, NULL); + if (r || Element::Z (sy)) + break; + i--; + } + if (r) { + m_EndAtom = m_BeginAtom + strlen (sy); + if (residue) + residue->SetResidue (r); + else { + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + m_Atom = new FragmentResidue (this, sy); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + double x, y; + pOldAtom->GetCoords (&x, &y); + m_Atom->SetCoords (x, y); + delete pOldAtom; + AddChild (m_Atom); + } + } else { + int Z = GetElementAtPos (m_BeginAtom, m_EndAtom); + if (residue) { + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + m_Atom = new FragmentAtom (this, Z); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + double x, y; + pOldAtom->GetCoords (&x, &y); + m_Atom->SetCoords (x, y); + delete pOldAtom; + AddChild (m_Atom); + } else + m_Atom->SetZ (Z); + if (!Z) + m_EndAtom = CurPos; + } + } + PangoRectangle rect; + pango_layout_index_to_pos (m_Layout, m_BeginAtom, &rect); + m_lbearing = rect.x / PANGO_SCALE; + pango_layout_index_to_pos (m_Layout, m_EndAtom, &rect); + m_lbearing += rect.x / PANGO_SCALE; + m_lbearing /= 2; + pView->Update (this); + m_bLoading = false; + Window* pWin = pDoc->GetWindow (); + if (m_Atom->GetZ () || ((m_buf.length () == 0) && (m_Atom->GetBondsNumber () == 0))) { + if (!pDoc->GetReadOnly ()) { + pWin->ActivateActionWidget ("/MainMenu/FileMenu/Save", true); + pWin->ActivateActionWidget ("/MainToolbar/Save", true); + } + pWin->ActivateActionWidget ("/MainMenu/FileMenu/SaveAs", true); + pWin->ActivateActionWidget ("/MainMenu/FileMenu/Print", true); + } else { + pWin->ActivateActionWidget ("/MainMenu/FileMenu/Save", false); + pWin->ActivateActionWidget ("/MainMenu/FileMenu/SaveAs", false); + pWin->ActivateActionWidget ("/MainMenu/FileMenu/Print", false); + pWin->ActivateActionWidget ("/MainToolbar/Save", false); + } + pango_layout_get_extents (m_Layout, NULL, &rect); + m_length = rect.width / PANGO_SCALE; + m_height = rect.height / PANGO_SCALE; + pView->Update (this); + EmitSignal (OnChangedSignal); + m_StartSel = m_EndSel = CurPos; + if (m_buf.length () == 0) { + m_BeginAtom = m_EndAtom = 0; + } + if (save) { + Tool* FragmentTool = dynamic_cast (pDoc->GetApplication ())->GetTool ("Fragment"); + if (!FragmentTool) + return true; + xmlNodePtr node = SaveSelected (); + if (node) + FragmentTool->PushNode (node); + } + return true; +} + +void Fragment::Add (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + View* pView = pData->m_View; + Theme *pTheme = pView->GetDoc ()->GetTheme (); + if (m_ascent <= 0) { + PangoContext* pc = pView->GetPangoContext (); + const_cast (this)->m_Layout = pango_layout_new (pc); + PangoAttrList *l = pango_attr_list_new (); + pango_layout_set_attributes (m_Layout, l); + pango_layout_set_font_description (m_Layout, pView->GetPangoFontDesc ()); + pango_layout_set_text (m_Layout, "l", 1); + PangoLayoutIter* iter = pango_layout_get_iter (m_Layout); + const_cast (this)->m_ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + pango_layout_set_text (m_Layout, "C", 1); + PangoRectangle rect; + pango_layout_get_extents (m_Layout, &rect, NULL); + const_cast (this)->m_CHeight = double (rect.height / PANGO_SCALE) / 2.0; + pango_layout_set_text (m_Layout, m_buf.c_str (), -1); + if (m_AttrList) { + pango_layout_set_attributes (m_Layout, m_AttrList); + pango_attr_list_unref (m_AttrList); + const_cast (this)->m_AttrList = NULL; + } + if (m_buf.length () > 0) { + const_cast (this)->m_buf.clear (); + pango_layout_index_to_pos (m_Layout, m_BeginAtom, &rect); + const_cast (this)->m_lbearing = rect.x / PANGO_SCALE; + pango_layout_index_to_pos (m_Layout, m_EndAtom, &rect); + const_cast (this)->m_lbearing += rect.x / PANGO_SCALE; + const_cast (this)->m_lbearing /= 2; + iter = pango_layout_get_iter (m_Layout); + const_cast (this)->m_ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + } + pango_layout_get_extents (m_Layout, NULL, &rect); + const_cast (this)->m_length = rect.width / PANGO_SCALE; + const_cast (this)->m_height = rect.height / PANGO_SCALE; + } + GnomeCanvasGroup* group = GNOME_CANVAS_GROUP (gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL)), *chgp; + GnomeCanvasItem* item = gnome_canvas_item_new( + group, + gnome_canvas_rect_ext_get_type (), + "x1", m_x * pTheme->GetZoomFactor () - pTheme->GetPadding () - m_lbearing, + "y1", m_y * pTheme->GetZoomFactor () - pTheme->GetPadding () - m_ascent + m_CHeight, + "x2", m_x * pTheme->GetZoomFactor () + m_length + pTheme->GetPadding () - m_lbearing, + "y2", m_y * pTheme->GetZoomFactor () + m_height + pTheme->GetPadding () - m_ascent + m_CHeight, + NULL); + gnome_canvas_item_hide (item); + g_object_set_data (G_OBJECT (group), "rect", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + item = gnome_canvas_item_new ( + group, + gnome_canvas_pango_get_type (), + "layout", m_Layout, + "x", m_x * pTheme->GetZoomFactor () - m_lbearing, + "y", m_y * pTheme->GetZoomFactor () - m_ascent + m_CHeight, + "editing", false, + NULL); + g_object_set_data (G_OBJECT (group), "fragment", item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_signal_connect_swapped (G_OBJECT (item), "changed", G_CALLBACK (on_fragment_changed), (void *) this); + g_signal_connect_swapped (G_OBJECT (item), "sel-changed", G_CALLBACK (on_fragment_sel_changed), (void *) this); + /* add charge */ + int charge = m_Atom->GetCharge (); + if (charge) { + double x, y, Angle, Dist; + unsigned char Pos = m_Atom->Atom::GetChargePosition (&Angle, &Dist); + int align = const_cast (this)->GetChargePosition (m_Atom, Pos, 0., x, y); + if (Dist != 0.) { + x = m_x + Dist * cos (Angle); + y = m_y - Dist * sin (Angle); + } + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + switch (align) { + case -2: + x -= pTheme->GetChargeSignSize () / 2.; + y += pTheme->GetChargeSignSize () / 2.; + break; + case -1: + x -= pTheme->GetChargeSignSize () + pTheme->GetPadding (); + break; + case 0: + case -3: + x -= pTheme->GetChargeSignSize () / 2.; + break; + case 1: + x += pTheme->GetPadding (); + break; + case 2: + x -= pTheme->GetChargeSignSize () / 2.; + y -= pTheme->GetChargeSignSize () / 2.; + break; + } + y -= pTheme->GetChargeSignSize () / 2.; + chgp = (GnomeCanvasGroup*) gnome_canvas_item_new ( + group, + gnome_canvas_group_ext_get_type (), + NULL); + g_object_set_data (G_OBJECT (group), "charge", chgp); + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_ellipse_ext_get_type (), + "x1", x, + "y1", y, + "x2", x + pTheme->GetChargeSignSize (), + "y2", y + pTheme->GetChargeSignSize (), + "outline_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", 0.5, + NULL + ); + g_object_set_data (G_OBJECT (group), "circle", item); + ArtBpath *path = art_new (ArtBpath, 5); + path[0].code = ART_MOVETO_OPEN; + path[0].x3 = x + 1.; + path[1].code = ART_LINETO; + path[1].x3 = x + pTheme->GetChargeSignSize () - 1.; + path[0].y3 = path[1].y3 = y + pTheme->GetChargeSignSize () / 2.; + if (charge > 0) { + path[2].code = ART_MOVETO_OPEN; + path[2].y3 = y + 1.; + path[3].code = ART_LINETO; + path[3].y3 = y + pTheme->GetChargeSignSize () - 1.; + path[2].x3 = path[3].x3 = x + pTheme->GetChargeSignSize () / 2.; + path[4].code = ART_END; + } else + path[2].code = ART_END; + GnomeCanvasPathDef *cpd = gnome_canvas_path_def_new_from_bpath (path); + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_bpath_ext_get_type (), + "bpath", cpd, + "outline_color", (pData->IsSelected(this))? SelectColor: Color, + "width_units", 1., + NULL + ); + gnome_canvas_path_def_unref (cpd); + g_object_set_data (G_OBJECT (group), "sign", item); + } + pData->Items[this] = group; + const_cast (m_Atom)->DoBuildSymbolGeometry (pData->m_View); +} + +void Fragment::SetSelected (GtkWidget* w, int state) +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + gchar const *chargecolor, *color; + bool visible = true; + switch (state) { + case SelStateUnselected: + color = NULL; + chargecolor = "black"; + visible = false; + break; + case SelStateSelected: + chargecolor = color = SelectColor; + break; + case SelStateUpdating: + chargecolor = color = AddColor; + break; + case SelStateErasing: + chargecolor = color = DeleteColor; + break; + default: + color = NULL; + chargecolor = "black"; + break; + } + gpointer item; + item = g_object_get_data (G_OBJECT (group), "rect"); + g_object_set (G_OBJECT (item), + "fill_color", color, NULL); + if (visible) + gnome_canvas_item_show (GNOME_CANVAS_ITEM (item)); + else + gnome_canvas_item_hide (GNOME_CANVAS_ITEM (item)); + if ((item = g_object_get_data (G_OBJECT (group), "circle"))) + g_object_set (item, "outline_color", chargecolor, NULL); + if ((item = g_object_get_data (G_OBJECT (group), "sign"))) + g_object_set (item, "outline_color", chargecolor, NULL); +} + +void Fragment::Update (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup *group = pData->Items[this]; + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "fragment")), + "x", m_x * pTheme->GetZoomFactor () - m_lbearing, + "y", m_y * pTheme->GetZoomFactor () - m_ascent + m_CHeight, + "width", m_length, + "height", m_height, + NULL); + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "rect")), + "x1", m_x * pTheme->GetZoomFactor () - pTheme->GetPadding () - m_lbearing, + "y1", m_y * pTheme->GetZoomFactor () - pTheme->GetPadding () - m_ascent + m_CHeight, + "x2", m_x * pTheme->GetZoomFactor () + m_length + pTheme->GetPadding () - m_lbearing, + "y2", m_y * pTheme->GetZoomFactor () + m_height + pTheme->GetPadding () - m_ascent + m_CHeight, + NULL); + void* item = g_object_get_data (G_OBJECT (group), "charge"); + int charge = m_Atom->GetCharge (); + if (charge) { + double x, y, Angle, Dist; + unsigned char Pos = m_Atom->Atom::GetChargePosition (&Angle, &Dist); + if (item) { + int align = const_cast (this)->GetChargePosition (m_Atom, Pos, Angle, x, y); + if (Dist != 0.) { + x = m_x + Dist * cos (Angle); + y = m_y - Dist * sin (Angle); + } + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + switch (align) { + case -2: + x -= pTheme->GetChargeSignSize () / 2.; + y += pTheme->GetChargeSignSize () / 2.; + break; + case -1: + x -= pTheme->GetChargeSignSize () + pTheme->GetPadding (); + break; + case 0: + case -3: + x -= pTheme->GetChargeSignSize () / 2.; + break; + case 1: + x += pTheme->GetPadding (); + break; + case 2: + x -= pTheme->GetChargeSignSize () / 2.; + y -= pTheme->GetChargeSignSize () / 2.; + break; + } + y -= pTheme->GetChargeSignSize () / 2.; + item = g_object_get_data (G_OBJECT (group), "circle"); + g_object_set (G_OBJECT (item), + "x1", x, + "y1", y, + "x2", x + pTheme->GetChargeSignSize (), + "y2", y + pTheme->GetChargeSignSize (), + NULL); + item = g_object_get_data (G_OBJECT (group), "sign"); + ArtBpath *path = art_new (ArtBpath, 5); + path[0].code = ART_MOVETO_OPEN; + path[0].x3 = x + 1.; + path[1].code = ART_LINETO; + path[1].x3 = x + pTheme->GetChargeSignSize () - 1.; + path[0].y3 = path[1].y3 = y + pTheme->GetChargeSignSize () / 2.; + if (charge > 0) { + path[2].code = ART_MOVETO_OPEN; + path[2].y3 = y + 1.; + path[3].code = ART_LINETO; + path[3].y3 = y + pTheme->GetChargeSignSize () - 1.; + path[2].x3 = path[3].x3 = x + pTheme->GetChargeSignSize () / 2.; + path[4].code = ART_END; + } else + path[2].code = ART_END; + GnomeCanvasPathDef *cpd = gnome_canvas_path_def_new_from_bpath (path); + g_object_set (G_OBJECT (item), + "bpath", cpd, + NULL + ); + gnome_canvas_path_def_unref (cpd); + } else { + GnomeCanvasGroup *chgp; + int align = const_cast (this)->GetChargePosition (m_Atom, Pos, Angle, x, y); + x *= pTheme->GetZoomFactor (); + if (Dist != 0.) { + x = m_x + Dist * cos (Angle); + y = m_y - Dist * sin (Angle); + } + y *= pTheme->GetZoomFactor (); + switch (align) { + case -2: + x -= pTheme->GetChargeSignSize () / 2.; + y += pTheme->GetChargeSignSize () / 2.; + break; + case -1: + x -= pTheme->GetChargeSignSize () + pTheme->GetPadding (); + break; + case 0: + case -3: + x -= pTheme->GetChargeSignSize () / 2.; + break; + case 1: + x += pTheme->GetPadding (); + break; + case 2: + x -= pTheme->GetChargeSignSize () / 2.; + y -= pTheme->GetChargeSignSize () / 2.; + break; + } + y -= pTheme->GetChargeSignSize () / 2.; + chgp = (GnomeCanvasGroup*) gnome_canvas_item_new ( + group, + gnome_canvas_group_ext_get_type (), + NULL); + g_object_set_data (G_OBJECT (group), "charge", chgp); + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_ellipse_ext_get_type (), + "x1", x, + "y1", y, + "x2", x + pTheme->GetChargeSignSize (), + "y2", y + pTheme->GetChargeSignSize (), + "outline_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", 0.5, + NULL + ); + g_object_set_data (G_OBJECT (group), "circle", item); + ArtBpath *path = art_new (ArtBpath, 5); + path[0].code = ART_MOVETO_OPEN; + path[0].x3 = x + 1.; + path[1].code = ART_LINETO; + path[1].x3 = x + pTheme->GetChargeSignSize () - 1.; + path[0].y3 = path[1].y3 = y + pTheme->GetChargeSignSize () / 2.; + if (charge > 0) { + path[2].code = ART_MOVETO_OPEN; + path[2].y3 = y + 1.; + path[3].code = ART_LINETO; + path[3].y3 = y + pTheme->GetChargeSignSize () - 1.; + path[2].x3 = path[3].x3 = x + pTheme->GetChargeSignSize () / 2.; + path[4].code = ART_END; + } else + path[2].code = ART_END; + GnomeCanvasPathDef *cpd = gnome_canvas_path_def_new_from_bpath (path); + item = gnome_canvas_item_new ( + chgp, + gnome_canvas_bpath_ext_get_type (), + "bpath", cpd, + "outline_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", 1., + NULL + ); + gnome_canvas_path_def_unref (cpd); + g_object_set_data (G_OBJECT (group), "sign", item); + } + } else { + if (item) { + gtk_object_destroy (GTK_OBJECT (item)); + g_object_set_data ((GObject*) group, "charge", NULL); + } + } + const_cast (m_Atom)->DoBuildSymbolGeometry (pData->m_View); +} + +xmlNodePtr Fragment::Save (xmlDocPtr xml) const +{ + const_cast (this)->m_buf = pango_layout_get_text (m_Layout); + if (m_RealSave && !const_cast (this)->Validate ()) + return NULL; + xmlNodePtr node = xmlNewDocNode (xml, NULL, (xmlChar*) "fragment", NULL); + if (m_buf.length ()) { + if (!m_Atom->GetBondsNumber () || m_Atom->GetZ ()) { + if (!node) + return NULL; + if (!SavePortion (xml, node, 0, m_BeginAtom)) { + xmlFreeNode (node); + return NULL; + } + if (m_Atom->GetZ ()) { + xmlNodePtr child = m_Atom->Save(xml); + if (!child) { + xmlFreeNode(node); + return NULL; + } + xmlAddChild(node, child); + } + if (!SavePortion(xml, node, m_EndAtom, m_buf.length ())) { + xmlFreeNode(node); + return NULL; + } + } + } + return (SaveNode (xml, node))? node: NULL; +} + +struct FilterStruct { + unsigned start, end; + list pal; +}; + +bool filter_func (PangoAttribute *attribute, struct FilterStruct *s) +{ + if (attribute->klass->type == PANGO_ATTR_RISE && ((PangoAttrInt*) attribute)->value > 0 && + s->start <= attribute->start_index && s->end >= attribute->end_index) { + list::iterator i, iend = s->pal.end (); + for (i = s->pal.begin (); i != iend; i++) + if ((*i)->start_index > attribute->end_index) + break; + s->pal.insert (i, attribute); + } + return FALSE; +} + +bool Fragment::SavePortion (xmlDocPtr xml, xmlNodePtr node, unsigned start, unsigned end) const +{ + xmlNodePtr child; + struct FilterStruct s; + s.start = start; + s.end = end; + int charge; + if (m_AttrList == NULL) + const_cast (this)->m_AttrList = pango_layout_get_attributes (m_Layout); + pango_attr_list_filter (m_AttrList, (PangoAttrFilterFunc) filter_func, &s); + list::iterator i, iend = s.pal.end (); + string str; + char *err; + for (i = s.pal.begin (); i != iend; i++) { + if (start < (*i)->start_index) { + str.assign (m_buf, start, (*i)->start_index - start); + xmlNodeAddContent (node, (const xmlChar*) str.c_str ()); + } + str.assign (m_buf, (*i)->start_index, (*i)->end_index - (*i)->start_index); + child = xmlNewDocNode (xml, NULL, (xmlChar*) "charge", NULL); + if (!child) + return false; + charge = strtol (str.c_str (), &err, 10); + if (err && strcmp (err, "+") && strcmp (err, "-")) { + if (!m_RealSave) { + return false; + xmlFreeNode (child); + } + Document *pDoc = (Document*) GetDocument (); + GtkWidget* w = gtk_message_dialog_new ( + pDoc->GetWindow ()->GetWindow (), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + _("Invalid charge.")); + gtk_window_set_icon_name (GTK_WINDOW (w), "gchempaint"); + gtk_dialog_run (GTK_DIALOG (w)); + gtk_widget_destroy (w); + return false; + } else { + if (!charge) + charge = 1; + if (*err == '-') + charge = - charge; + char *buf = g_strdup_printf ("%d", charge); + xmlNewProp (child, (xmlChar*) "value", (xmlChar*) buf); + g_free (buf); + xmlAddChild (node, child); + } + start = (*i)->end_index; + } + if (start < end) { + str.assign (m_buf, start, end - start); + xmlNodeAddContent (node, (const xmlChar*) str.c_str ()); + } + return true; +} + +xmlNodePtr Fragment::SaveSelection (xmlDocPtr xml) const +{ + xmlNodePtr node = xmlNewDocNode (xml, NULL, (xmlChar*) "fragment", NULL); + if (!node) + return NULL; + SavePortion (xml, node, m_StartSel, m_EndSel); + return (TextObject::SaveNode (xml, node))? node: NULL; +} + +bool Fragment::Load (xmlNodePtr node) +{ + Document* pDoc = (Document*) GetDocument (); + Theme *pTheme = pDoc->GetTheme (); + if (!TextObject::Load (node)) + return false; + if (m_AttrList != NULL) + pango_attr_list_unref (m_AttrList); + m_AttrList = pango_attr_list_new (); + m_bLoading = true; + m_buf.clear (); // just in case + xmlNodePtr child = node->children; + char* tmp; + PangoAttribute *attr; + int size = pTheme->GetFontSize (); + while (child) { + if (!strcmp ((const char*) child->name, "text")) { + tmp = (char*) xmlNodeGetContent (child); + m_buf += tmp; + xmlFree (tmp); + } else if (!strcmp ((const char*) child->name, "atom")) { + if (!m_Atom->Load (child)) + return false; + m_BeginAtom = m_buf.length (); + m_buf += m_Atom->GetSymbol(); + m_Atom->SetCoords (m_x, m_y); + m_EndAtom = m_buf.length (); + } else if (!strcmp ((const char*) child->name, "residue")) { + // replace the atom by a residue + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + m_Atom = new FragmentResidue (this, NULL); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + delete pOldAtom; + char id[8]; + int j = 1; + id[0] = 'a'; + do + snprintf (id+1, 7, "%d", j++); + while (pDoc->GetDescendant (id) != NULL); + m_Atom->SetId (id); + AddChild (m_Atom); + if (!m_Atom->Load (child)) + return false; + m_BeginAtom = m_buf.length (); + m_buf += m_Atom->GetSymbol (); + m_Atom->SetCoords (m_x, m_y); + m_EndAtom = m_buf.length (); + } else if (!strcmp ((const char*) child->name, "charge")) { + int start = m_buf.length (), end; + tmp = (char*) xmlGetProp (child, (xmlChar*) "value"); + int charge = atoi (tmp); + xmlFree (tmp); + if (abs(charge) > 1) + tmp = g_strdup_printf ("%d%c", abs (charge), (charge > 0)? '+': '-'); + else if (charge == 1) + tmp = g_strdup ("+"); + else if (charge == -1) + tmp = g_strdup ("-"); + else + tmp = g_strdup ("");//should not occur! + m_buf += tmp; + end = m_buf.length (); + attr = pango_attr_size_new (size * 2 / 3); + attr->start_index = start; + attr->end_index = end; + pango_attr_list_insert (m_AttrList, attr); + attr = pango_attr_rise_new (2 * size / 3); + attr->start_index = start; + attr->end_index = end; + pango_attr_list_insert (m_AttrList, attr); + } + child = child->next; + } + if (m_Layout) { + pango_layout_set_text (m_Layout, m_buf.c_str (), -1); + pango_layout_set_attributes (m_Layout, m_AttrList); + } + AnalContent (); + m_bLoading = false; + return true; +} + +void Fragment::AnalContent () +{ + if (!m_Atom->GetParent ()) + AddChild (m_Atom); + unsigned end = (m_Layout)? strlen (pango_layout_get_text (m_Layout)): m_buf.length (); + AnalContent(0, end); +} + +typedef struct +{ + unsigned index, end; + bool result; +} ChargeFindStruct; + +static bool search_for_charge (PangoAttribute *attr, ChargeFindStruct *s) +{ + if (attr->start_index <= s->index && attr->end_index >= s->index + && attr->klass->type == PANGO_ATTR_RISE && + ((PangoAttrInt*) attr)->value > 0) { + s->result = true; + s->index = attr->start_index; + s->end = attr->end_index; + } + return false; +} + +void Fragment::AnalContent (unsigned start, unsigned &end) +{ + Document* pDoc = (Document*) GetDocument (); + if (!pDoc) + return; + Theme *pTheme = pDoc->GetTheme (); + char const *text; + PangoAttrList *l; + if (m_Layout) { + text = pango_layout_get_text (m_Layout); + l = pango_layout_get_attributes (m_Layout); + } else { + text = m_buf.c_str (); + l = pango_attr_list_ref (m_AttrList); + } + bool Charge = false; + unsigned start_tag, end_tag, next; + char c; + ChargeFindStruct s; + s.index = s.end = 0; + if (start > 0) { + // search if a charge is at preceeding character + s.result = false; + s.index = start; + pango_attr_list_filter (l, (PangoAttrFilterFunc) search_for_charge, &s); + Charge = s.result; + } else if (text[start] == '+' || text[start] == '-') + Charge = true; + else + Charge = false; + next = start; + start_tag = end_tag = start; + while (start < end) { + c = text[start]; + if ((c >= '0') && (c <= '9')) { + s.result = false; + s.index = start; + pango_attr_list_filter (l, (PangoAttrFilterFunc) search_for_charge, &s); + Charge = s.result; + next = start + 1; + // add new size and rise attributes + int size = pTheme->GetFontSize (); + PangoAttribute *attr = pango_attr_size_new (size * 2 / 3); + attr->start_index = start; + attr->end_index = next; + pango_attr_list_change (l, attr); + if (!Charge) + attr = pango_attr_rise_new (-size / 3); + else { + if (text[start - 1] == '+' || text[start - 1] == '-') { + // move character before sign + char *new_t = g_strdup (text); + new_t[start] = new_t[start - 1]; + new_t[start - 1] = c; + if (m_Layout) { + pango_layout_set_text (m_Layout, new_t, -1); + text = pango_layout_get_text (m_Layout); + } else + m_buf = new_t; + text = m_buf.c_str (); + } + attr = pango_attr_rise_new (size * 2 / 3); + } + attr->start_index = start; + attr->end_index = next; + pango_attr_list_change (l, attr); + start = next - 1; + } else if ((c == '+') || (c == '-')) { + if (!m_bLoading) { + //do not allow both local and global charges + if (m_Atom->GetCharge ()) + m_Atom->SetCharge (0); + next = start + 1; + if (!Charge) { + Charge = true; + int size = pTheme->GetFontSize (); + PangoAttribute *attr = pango_attr_size_new (size * 2 / 3); + attr->start_index = start; + attr->end_index = next; + pango_attr_list_change (l, attr); + attr = pango_attr_rise_new (2 * size / 3); + attr->start_index = start; + attr->end_index = next; + pango_attr_list_change (l, attr); + } else { + string old_charge (m_buf, s.index, s.end - s.index); + char *nextch = NULL; + int charge = strtol (old_charge.c_str (), &nextch, 10); + if (charge == 0) + charge = 1; + if (*nextch == 0) { + // no sign, just add it + int size = pTheme->GetFontSize (); + PangoAttribute *attr = pango_attr_size_new (size * 2 / 3); + attr->start_index = start; + attr->end_index = next; + pango_attr_list_change (l, attr); + attr = pango_attr_rise_new (2 * size / 3); + attr->start_index = start; + attr->end_index = next; + pango_attr_list_change (l, attr); + } else { + if (*nextch == '-') + charge = - charge; + if (c == '+') + charge++; + else + charge--; + char *buf; + if (abs(charge) > 1) + buf = g_strdup_printf ("%d%c", abs (charge), (charge > 0)? '+': '-'); + else if (charge == 1) + buf = g_strdup ("+"); + else if (charge == -1) + buf = g_strdup ("-"); + else + buf = g_strdup (""); + int size = pTheme->GetFontSize (); + PangoAttrList *l = pango_attr_list_new (); + PangoAttribute *attr = pango_attr_size_new (size * 2 / 3); + pango_attr_list_insert (l, attr); + attr = pango_attr_rise_new (2 * size / 3); + pango_attr_list_insert (l, attr); + gcp_pango_layout_replace_text (m_Layout, s.index, s.end - s.index + 1, buf, l); + pango_attr_list_unref (l); + m_StartSel = m_EndSel = s.index + strlen (buf); + end += m_StartSel - start - 1; + GnomeCanvasPango* text = pDoc->GetView ()->GetActiveRichText (); + gnome_canvas_pango_set_selection_bounds (text, m_StartSel, m_EndSel); + g_free (buf); + } + } + } + } else + Charge = false; + start++; + } +} + +/*! +Must return NULL if active tool is FragmentTool because this tool needs a fragment, not an atom +TODO: use x and y to figure the best atom in the fragment +*/ +Object* Fragment::GetAtomAt (double x, double y, double z) +{ + Document* pDoc = (Document*) GetDocument (); + Theme *pTheme = pDoc->GetTheme (); + Application* pApp = pDoc->GetApplication (); + if (pApp->GetActiveTool () == pApp->GetTool ("Fragment")) + return NULL; + if (m_Atom->GetBondsNumber () || m_Atom->GetCharge ()) + return m_Atom; + if (!pDoc) + return NULL; + double x0, y0; + x0 = (x - m_x) * pTheme->GetZoomFactor () + m_lbearing; + y0 = (y - m_y) * pTheme->GetZoomFactor () + m_ascent; + if ((x0 < 0.) || (x0 > m_length) || (y0 < 0.) || (y0 > m_height)) + return NULL; + int index, cur, trailing; + pango_layout_xy_to_index (m_Layout, (int) (x0 * PANGO_SCALE), (int) (y0 * PANGO_SCALE), &index, &trailing); + char c = m_buf[index]; + cur = index; + while ((c >= 'a') && (c <= 'z') && cur >=0) { + cur--; + c = m_buf[cur]; + } + if (index - cur > Residue::MaxSymbolLength) + cur = index - Residue::MaxSymbolLength; + if (cur < 0) + cur = 0; + // first search for residues + FragmentResidue *residue = dynamic_cast (m_Atom); + Residue *r = NULL; + char sy[Residue::MaxSymbolLength + 1]; + strncpy (sy, m_buf.c_str () + cur, Residue::MaxSymbolLength); + int i = Residue::MaxSymbolLength; + while (i > 0) { + sy[i] = 0; + r = (Residue *) Residue::GetResidue (sy, NULL); + if (r || Element::Z (sy) > 0) + break; + i--; + } + if (r) { + m_BeginAtom = cur; + m_EndAtom = cur + strlen (sy); + if (residue) + residue->SetResidue (r); + else { + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + m_Atom = NULL; + m_Atom = new FragmentResidue (this, sy); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + delete pOldAtom; + AddChild (m_Atom); + } + m_x -= m_lbearing / pTheme->GetZoomFactor () ; + PangoRectangle rect; + pango_layout_index_to_pos (m_Layout, index, &rect); + m_lbearing = rect.x / PANGO_SCALE; + pango_layout_index_to_pos (m_Layout, index + i, &rect); + m_lbearing += rect.x / PANGO_SCALE; + m_lbearing /= 2; + m_x += m_lbearing / pTheme->GetZoomFactor (); + m_Atom->SetCoords(m_x, m_y); + return m_Atom; + } + if (index - cur > 2) + index -= 2; + else + index = cur; + c = m_buf[index]; + int Z = GetElementAtPos((unsigned) index, (unsigned&) trailing); + if (!Z) + return NULL; + m_bLoading = true; + if (residue) { + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + m_Atom = NULL; + m_Atom = new FragmentAtom (this, Z); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + delete pOldAtom; + AddChild (m_Atom); + } + if (m_Atom) { + m_Atom->SetZ (Z); + m_bLoading = false; + m_BeginAtom = index; + m_EndAtom = trailing; + m_x -= m_lbearing / pTheme->GetZoomFactor () ; + PangoRectangle rect; + pango_layout_index_to_pos (m_Layout, index, &rect); + m_lbearing = rect.x / PANGO_SCALE; + pango_layout_index_to_pos (m_Layout, trailing, &rect); + m_lbearing += rect.x / PANGO_SCALE; + m_lbearing /= 2; + m_x += m_lbearing / pTheme->GetZoomFactor (); + m_Atom->SetCoords(m_x, m_y); + } + + return m_Atom; +} + +void Fragment::Move (double x, double y, double z) +{ + TextObject::Move (x, y, z); + m_Atom->Move (x, y, z); +} + +void Fragment::OnChangeAtom () +{ + if (m_bLoading) + return; + Document *pDoc = (Document*) GetDocument (); + if (!pDoc || !m_Atom) + return; + char const *sym = m_Atom->GetSymbol (); + gcp_pango_layout_replace_text (m_Layout, m_BeginAtom, m_EndAtom - m_BeginAtom, sym, pDoc->GetPangoAttrList ()); + m_EndAtom = m_BeginAtom + strlen (sym); + OnChanged (false); +} + +int Fragment::GetElementAtPos (unsigned start, unsigned &end) +{ + int Z; + char text[4]; + memset (text, 0, 4); + strncpy (text, ((m_Layout)?pango_layout_get_text ( m_Layout): m_buf.c_str ()) + start, 3); + for (unsigned i = strlen (text); i > 0; i--) { + text[i] = 0; + if ((Z = Element::Z (text))) { + end = start + i; + return Z; + } + } + return 0; +} + +int Fragment::GetChargePosition (FragmentAtom *pAtom, unsigned char &Pos, double Angle, double &x, double &y) +{ + if ((pAtom != m_Atom) || (m_Atom->GetZ() == 0)) + return 0; + double width, height; + Document* pDoc = (Document*) GetDocument (); + Theme *pTheme = pDoc->GetTheme (); + if (!pDoc) + return 0; + GtkWidget* pWidget = pDoc->GetView ()->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (pWidget), "data"); + GnomeCanvasGroup *item = pData->Items[this]; + if (!item) + return 0; + GnomeCanvasPango* text = (GnomeCanvasPango*) g_object_get_data (G_OBJECT (item), "fragment"); + if (!GNOME_IS_CANVAS_PANGO (text)) + return 0; + struct FilterStruct s; + s.start = 0; + s.end = m_buf.length (); + if (m_AttrList == NULL) + m_AttrList = pango_layout_get_attributes (m_Layout); + pango_attr_list_filter (m_AttrList, (PangoAttrFilterFunc) filter_func, &s); + if (s.pal.size () > 0) + return 0; //localized charges are prohibited if a global charge already exists + // Get atom bounds + int result = 0xff; + PangoRectangle rect; + pango_layout_index_to_pos (m_Layout, m_BeginAtom, &rect); + x = rect.x / PANGO_SCALE; + if (m_BeginAtom != 0) + result &= 0x6d; + pango_layout_index_to_pos (m_Layout, m_EndAtom, &rect); + width = rect.x / PANGO_SCALE - x; + if (m_EndAtom < m_buf.length ()) + result &= 0xb6; + width /= pTheme->GetZoomFactor (); + height = m_height / pTheme->GetZoomFactor (); + if (m_Atom->GetBondsNumber()) + { + map::iterator i; + Bond* pBond = (Bond*)m_Atom->GetFirstBond(i); + double angle = pBond->GetAngle2D(m_Atom) + 180.0; + if ((result & POSITION_NE) && (angle >= 180.0) && (angle <= 270.0)) result -= POSITION_NE; + if ((result & POSITION_NW) && (((angle >= 270.0) && (angle <= 360.0)) || (fabs(angle) < 0.1))) result -= POSITION_NW; + if ((result & POSITION_N) && (angle >= 225.0) && (angle <= 315.0)) result -= POSITION_N; + if ((result & POSITION_SE) && (angle >= 90.0) && (angle <= 180.0)) result -= POSITION_SE; + if ((result & POSITION_SW) && (((angle >= 0.0) && (angle <= 90.0)) || (fabs(angle - 360.0) < 0.1))) result -= POSITION_SW; + if ((result & POSITION_S) && (angle >= 45.0) && (angle <= 135.0)) result -= POSITION_S; + if ((result & POSITION_E) && ((angle <= 225.0) && (angle >= 135.0))) result -= POSITION_E; + if ((result & POSITION_W) && ((angle >= 315.0) || (angle <= 45.0))) result -= POSITION_W; + } + if (Pos == 0xff) { + if (result) { + if (result & POSITION_NE) + Pos = POSITION_NE; + else if (result & POSITION_NW) + Pos = POSITION_NW; + else if (result & POSITION_N) + Pos = POSITION_N; + else if (result & POSITION_SE) + Pos = POSITION_SE; + else if (result & POSITION_SW) + Pos = POSITION_SW; + else if (result & POSITION_S) + Pos = POSITION_S; + else if (result & POSITION_E) + Pos = POSITION_E; + else if (result & POSITION_W) + Pos = POSITION_W; + } else + return 0; + } else if (Pos) { + if (!(Pos & result)) + return 0; + } else + return 0; + + switch (Pos) { + case POSITION_NE: + x = m_x + width / 2.0; + y = m_y - height / 2.0; + return 1; + case POSITION_NW: + x = m_x - width / 2.0; + y = m_y - height / 2.0; + return -1; + case POSITION_N: + x = m_x; + y = m_y - height / 2.0; + return 2; + case POSITION_SE: + x = m_x + width / 2.0; + y = m_y + height / 2.0; + return 1; + case POSITION_SW: + x = m_x - width / 2.0; + y = m_y + height / 2.0; + return -1; + case POSITION_S: + x = m_x; + y = m_y + height / 2.0; + return -2; + case POSITION_E: + x = m_x + width / 2.0; + y = m_y; + return 1; + case POSITION_W: + x = m_x - width / 2.0; + y = m_y; + return -1; + } + return 0; +} + +bool Fragment::Validate () +{ + char const *charge; + char *err; + if ((m_buf.length () == 0) + && m_Atom->GetBondsNumber () == 0) + return true; + if (m_Atom->GetZ() == 0 || (dynamic_cast (m_Atom) && !((FragmentResidue*) m_Atom)->GetResidue ())) { + Document *pDoc = dynamic_cast (GetDocument ()); + GtkWidget* pWidget = pDoc->GetView ()->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (pWidget), "data"); + GnomeCanvasGroup *item = pData->Items[this]; + GnomeCanvasPango* text = GNOME_CANVAS_PANGO (g_object_get_data (G_OBJECT (item), "fragment")); + gnome_canvas_pango_set_selection_bounds (text, m_BeginAtom, (m_EndAtom == m_BeginAtom)? m_EndAtom + 1: m_EndAtom); + GtkWidget* w = gtk_message_dialog_new ( + GTK_WINDOW (pDoc->GetWindow ()->GetWindow ()), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + _("Invalid symbol.")); + gtk_dialog_run (GTK_DIALOG (w)); + gtk_widget_destroy (w); + return false; + } + //now scan for charges and validate + struct FilterStruct s; + s.start = 0; + s.end = m_buf.length (); + if (m_AttrList == NULL) + m_AttrList = pango_layout_get_attributes (m_Layout); + pango_attr_list_filter (m_AttrList, (PangoAttrFilterFunc) filter_func, &s); + list::iterator i, iend = s.pal.end (); + for (i = s.pal.begin (); i != iend; i++) { + charge = m_buf.c_str () + (*i)->start_index; + strtol (charge, &err, 10); + if (*err != '+' && *err != '-' && err - m_buf.c_str () != (int) (*i)->end_index) { + Document *pDoc = dynamic_cast (GetDocument ()); + GtkWidget* pWidget = pDoc->GetView ()->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (pWidget), "data"); + GnomeCanvasGroup *item = pData->Items[this]; + GnomeCanvasPango* text = GNOME_CANVAS_PANGO (g_object_get_data (G_OBJECT (item), "fragment")); + gnome_canvas_pango_set_selection_bounds (text, (*i)->start_index, (*i)->end_index); + GtkWidget* w = gtk_message_dialog_new ( + GTK_WINDOW (pDoc->GetWindow ()->GetWindow ()), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + _("Invalid charge.")); + gtk_dialog_run(GTK_DIALOG(w)); + gtk_widget_destroy(w); + return false; + } + } + return true; +} + +void Fragment::Transform2D (Matrix2D& m, double x, double y) +{ + m_x -= x; + m_y -= y; + m.Transform (m_x, m_y); + m_x += x; + m_y += y; + m_Atom->SetCoords (m_x, m_y); +} + +double Fragment::GetYAlign () +{ + return m_y; +} + +int Fragment::GetAvailablePosition (double& x, double& y) +{ + return 0; +} + +bool Fragment::GetPosition (double angle, double& x, double& y) +{ + return false; +} + +bool Fragment::SetProperty (unsigned property, char const *value) +{ + m_bLoading = true; + switch (property) { + case GCU_PROP_POS2D: { + sscanf (value, "%lg %lg", &m_x, &m_y); + gcu::Document *doc = GetDocument (); + if (doc) { + m_x *= doc->GetScale (); + m_y *= doc->GetScale (); + } + m_Atom->SetCoords (m_x, m_y); + break; + } + case GCU_PROP_TEXT_TEXT: { + m_buf = value; + if (m_EndAtom > m_BeginAtom) { + Residue *r = NULL; + char sy[Residue::MaxSymbolLength + 1]; + strncpy (sy, m_buf.c_str () + m_BeginAtom, Residue::MaxSymbolLength); + int i = Residue::MaxSymbolLength; + while (i > 0) { + sy[i] = 0; + r = (Residue *) Residue::GetResidue (sy, NULL); + if (r) + break; + i--; + } + if (r) { + m_EndAtom = m_BeginAtom + + strlen (sy); + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + pOldAtom->SetParent (NULL); + m_Atom = new FragmentResidue (this, sy); + AddChild (m_Atom); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + m_Atom->SetCoords (m_x, m_y); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + delete pOldAtom; + } else { + int Z = GetElementAtPos (m_BeginAtom, m_EndAtom); + if (Z) + m_Atom->SetZ (Z); + } + Analyze (); + } + break; + } + case GCU_PROP_FRAGMENT_ATOM_START: + m_BeginAtom = atoi (value); + m_EndAtom = m_BeginAtom + Residue::MaxSymbolLength; + if (m_buf.length ()) { + Residue *r = NULL; + char sy[Residue::MaxSymbolLength + 1]; + strncpy (sy, m_buf.c_str () + m_BeginAtom, Residue::MaxSymbolLength); + int i = Residue::MaxSymbolLength; + while (i > 0) { + sy[i] = 0; + r = (Residue *) Residue::GetResidue (sy, NULL); + if (r) + break; + i--; + } + if (r) { + m_EndAtom = m_BeginAtom + strlen (sy); + map::iterator i; + Bond *pBond = (gcp::Bond*) m_Atom->GetFirstBond (i); + Atom *pOldAtom = m_Atom; + pOldAtom->SetParent (NULL); + m_Atom = new FragmentResidue (this, sy); + AddChild (m_Atom); + m_Atom->SetId ((gchar*) pOldAtom->GetId ()); + m_Atom->SetCoords (m_x, m_y); + if (pBond) { + pBond->ReplaceAtom (pOldAtom, m_Atom); + m_Atom->AddBond (pBond); + } + delete pOldAtom; + } else { + int Z = GetElementAtPos (m_BeginAtom, m_EndAtom); + if (Z) + m_Atom->SetZ (Z); + } + Analyze (); + } + break; + case GCU_PROP_FRAGMENT_ATOM_ID: + m_Atom->SetId (value); + if (!m_Atom->GetParent ()) + AddChild (m_Atom); + break; + default: + break; + } + m_bLoading = false; + return true; +} + +bool Fragment::Analyze () { + // search if main atom is at start or at end + if ((m_BeginAtom == 0 || m_EndAtom == m_buf.size ()) && ((m_EndAtom - m_BeginAtom) < m_buf.length ()) ){ + m_Inversable = true; + } +// int valence = m_Atom->GetValence (); + if (m_AttrList != NULL) + pango_attr_list_unref (m_AttrList); + m_AttrList = pango_attr_list_new (); + AnalContent (); + return true; +} + +void Fragment::Update () { + if (m_Atom->GetBondsNumber () > 0 && m_Inversable) { + map::iterator i; + Bond *bond = reinterpret_cast (m_Atom->GetFirstBond (i)); + double angle = bond->GetAngle2D (m_Atom); + if (m_BeginAtom == 0 && (angle < 89. && angle > -89.)) { + // build the formula, then write elements in reverse order might be unsecure in some cases (if linked atom has a stoichiometric coefficient) + Formula *formula = new Formula (m_buf, GCU_FORMULA_PARSE_RESIDUE); + std::list const &elts = formula->GetElements (); + m_buf.clear (); + std::list::const_reverse_iterator i, end = elts.rend (); + for (i = elts.rbegin (); i!= end; i++) { + m_buf += (*i)->Text (); + } + delete formula; + m_EndAtom = m_buf.length (); + m_BeginAtom = m_EndAtom - strlen (m_Atom->GetSymbol ()); + if (m_AttrList != NULL) + pango_attr_list_unref (m_AttrList); + m_AttrList = pango_attr_list_new (); + AnalContent (); + } else if (angle > 91. || angle < -91.) { + } + } +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fragment.h gnome-chemistry-utils-0.10.9/libs/gcp/fragment.h --- gnome-chemistry-utils-0.8.6/libs/gcp/fragment.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fragment.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,250 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * fragment.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_FRAGMENT_H +#define GCHEMPAINT_FRAGMENT_H + +#include "text-object.h" +#include "libgnomecanvas/gnome-canvas.h" + +/*!\file*/ +namespace gcp { + +class FragmentAtom; +class Atom; + +/*!\class Fragment gcp/fragment.h +\brief Atoms groups. + +Represents atoms groups displayed as a string. Currntly, the string is not +fully parsed, so that some non sense strings might be accepted. Anyway, this +will not always be the case in the future. +*/ +class Fragment: public TextObject +{ +public: +/*! +The default constructor. +*/ + Fragment (); +/*! +@param x the x position of the new fragment. +@param y the y position of the new fragment. + +Constructs a new fragment and position it. x and y are the position of the +main atom or residue in the fragment. +*/ + Fragment (double x, double y); +/*! +The destructor. +*/ + virtual ~Fragment (); + +/*! +@param w the GtkWidget inside which the fragment is displayed. +@param state the selection state of the fragment. + +Used to set the selection state of the fragment inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. +*/ + void SetSelected (GtkWidget *w, int state); +/*! +@param w a GtkWidget. + +Adds the representation of the fragment to the canvas widget. +*/ + void Add (GtkWidget *w) const; +/*! +@param w a GtkWidget. + +Updates the representation of the fragment in the canvas widget. +*/ + void Update (GtkWidget *w) const; +/*! +@param xml the xmlDoc used to save the document. + +Used to save the fragment to the xmlDoc. +@return the xmlNode containing the serialized fragment. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param xml the xmlDoc used for clipboard operations. + +Saves the currently selected text inside the fragment. This method is used by +the framework when editing the fragment. +@return the xmlNode containing the serialized selection. +*/ + xmlNodePtr SaveSelection (xmlDocPtr xml) const; +/*! +@param node a pointer to the xmlNode containing the serialized fragment. + +Used to load a frafment in memory. The Fragment must already exist. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param save whether the text should be saved for undo/redo operations. + +Called after any change in the text. +*/ + bool OnChanged (bool save); +/*! +Analyses the whole contents. +*/ + void AnalContent (); +/*! +@param start the start fo the substring to parse, in bytes. +@param end the end fo the substring to parse, in bytes. + +Analyses a substring. +*/ + void AnalContent (unsigned start, unsigned &end); +/*! +@param x the x coordinate +@param y the y coordinate +@param z the z coordinate (unused) + +@return a pointer to the Atom correpoding to the symbol at or near the position +defined by the coordinates passed as parameters, if any. +*/ + Object* GetAtomAt (double x, double y, double z = 0.); +/*! +@param x the x component of the transation vector. +@param y the y component of the transation vector. +@param z the z component of the transation vector. + +Moves the fragment. +*/ + void Move (double x, double y, double z = 0); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Moves and/or transform an object. +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +Called by the framework when the user changes the nature of an atom using the +element tool. +*/ + void OnChangeAtom (); +/*! +@return the main atom, which might have a bond. +*/ + Atom* GetAtom () {return (Atom*) m_Atom;} +/*! +@param start the start position of the atomic symbol. +@param end the end position of the atomic symbol. + +@return the atomic number corresponding to the symbol starting at \a start, if any, or 0. +\a end is updated accordingly. +*/ + int GetElementAtPos (unsigned start, unsigned &end); +/*! +@param pAtom the main atom which will get the local charge. +@param Pos the approximate position of the charge. +@param Angle the angle from horizontal left. +@param x the x position of the charge symbol. +@param y the y position of the charge symbol. + +If \a pAtom is not the main atom of the fragment, 0 is returned and \a Pos +is not updated. +On input \a Pos can be one of POSITION_E, POSITION_N,... or 0xff, in which case, +it will be given a default value. \a x and \a y are set to the position where the charge +sign should be displayed usding the alignment code returned by this method. +@return a number to set how the charge symbol should be aligned relative to its +position. Possible values are: +- −2: center top. +- −1: right. +- 0: center. +- 1: left. +- 2: center bottom. +*/ + int GetChargePosition (FragmentAtom *pAtom, unsigned char &Pos, double Angle, double &x, double &y); +/*! +@param x the x position. +@param y the y position. + +This method finds an available position for drawing a charge sign or electrons and returns +it as a symbolic value (see POSITION_E, POSITION_N,...). The \a x and \a y are updated so +that they give the absolute position. +@return an available position. +*/ + int GetAvailablePosition (double &x, double &y); +/*! +@param angle the angle at which a charge sign should be displayed. +@param x the x position. +@param y the y position. + +@return false and do not update the coordinates. +*/ + bool GetPosition (double angle, double &x, double &y); +/*! +Validates the contents of the fragment text, and display error messages when necessary. +*/ + bool Validate (); +/*! +@return the y coordinate at half height of a carbon atom symbol if any was present. +*/ + double GetYAlign (); + +/*! +@param property the property id as defined in objprops.h +@param value the property value as a string + +Used when loading to set properties for the fragment. This method supports +GCU_PROP_POS2D, GCU_PROP_TEXT_TEXT, GCU_PROP_FRAGMENT_ATOM_START, +and GCU_PROP_FRAGMENT_ATOM_ID. +@return true if the property could be set, or if the property is not relevant, false otherwise. +*/ + bool SetProperty (unsigned property, char const *value); + +/*! +Analyses the text in the fragment. This calls gcp::Fragment::AnalContent() +and updates the attribute list. +*/ + bool Analyze (); + +/*! +Changes the order of the symbols if necessary when a bond is at an extremity +of the fragment. +*/ + void Update (); + +private: + bool SavePortion (xmlDocPtr xml, xmlNodePtr node, unsigned start, unsigned end) const; + +private: + FragmentAtom *m_Atom; + unsigned m_BeginAtom, m_EndAtom; + int m_lbearing; + double m_CHeight; + bool m_Inversable; +}; + +} // namespace gcp + +#endif //GCHEMPAINT_FRAGMENT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fragment-residue.cc gnome-chemistry-utils-0.10.9/libs/gcp/fragment-residue.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/fragment-residue.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fragment-residue.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,117 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * fragment-residue.cc + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "fragment-residue.h" +#include "document.h" +#include "fragment.h" +#include + +using namespace gcu; + +namespace gcp { + +FragmentResidue::FragmentResidue (): FragmentAtom (), m_Residue (NULL) +{ + SetZ (-1); +} + +FragmentResidue::FragmentResidue (Fragment *fragment, char const *symbol): FragmentAtom (fragment, -1) +{ + if (symbol) { + m_Abbrev = symbol; + m_Residue = dynamic_cast (Residue::GetResidue (symbol, NULL)); + const_cast (m_Residue)->Ref (); + } +} + +FragmentResidue::~FragmentResidue () +{ + if (m_Residue) + const_cast (m_Residue)->Unref (); +} + +void FragmentResidue::SetResidue (Residue const *res) +{ + if (m_Residue) + const_cast (m_Residue)->Unref (); + m_Residue = res; + const_cast (m_Residue)->Ref (); +} + +const gchar* FragmentResidue::GetSymbol () const +{ + return m_Abbrev.c_str (); +} + +xmlNodePtr FragmentResidue::Save (xmlDocPtr xml) const +{ + xmlNodePtr node = FragmentAtom::Save (xml); + if (node) { + xmlNodeSetName (node, (xmlChar const *) "residue"); + static_cast (GetFragment ()->GetDocument ())->SaveResidue (m_Residue, node); + } + return node; +} + +bool FragmentResidue::Load (xmlNodePtr node) +{ + bool result = FragmentAtom::Load (node); + if (!result) + return false; + m_Z = -1; // FragmentAtom::Load will have set it to 0. + xmlNodePtr child = node->children; + if (!child) + return false; + char *buf = NULL; + if (!strcmp ((const char*) child->name, "text")) + buf = (char*) xmlNodeGetContent (child); + if (!buf || !strlen (buf)) + return false; + Residue *residue = (Residue*) Residue::GetResidue (buf, NULL); + if (residue) { + if (child->next) { + Residue *res0 = new Residue (NULL, NULL, NULL, static_cast (GetDocument ())); + res0->Load (node, false); + if (*residue == *(res0->GetMolecule ())) + delete res0; // OK, same molecule + else { + // TODO: append residue to the document + } + } + } else if (child->next) { + residue = new Residue (); + residue->Load (node, false); + residue->Register (); + // TODO: append residue to the local residues ( or to the document?) + } else + return false; + m_Abbrev = buf; + m_Residue = residue; + const_cast (m_Residue)->Ref (); + xmlFree ((xmlChar*) buf); + return true; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/fragment-residue.h gnome-chemistry-utils-0.10.9/libs/gcp/fragment-residue.h --- gnome-chemistry-utils-0.8.6/libs/gcp/fragment-residue.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/fragment-residue.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,94 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * fragment-residue.h + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_FRAGMENT_RESIDUE_H +#define GCHEMPAINT_FRAGMENT_RESIDUE_H + +#include "fragment-atom.h" +#include "residue.h" +#include + +/*!\file*/ +namespace gcp { + +/*!\class FragmentResidue gcp/fragment-residue.h +Represents a residue inside a atoms group (see gcp::Fragment class). +*/ +class FragmentResidue: public FragmentAtom +{ +public: +/*! +The default constructor. +*/ + FragmentResidue (); +/*! +@param fragment the fragment containing the residue symbol. +@param symbol the residue symbol. + +Constructs a FragmentResidue as a child of \a fragment. +*/ + FragmentResidue (Fragment *fragment, char const *symbol); +/*! +The destructor. +*/ + virtual ~FragmentResidue (); + +/*! +@param xml the xmlDoc used to save the document. + +Builds an XML node representing this instance. +@return the new XML node or NULL on error. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node an XML node. + +Loads the symbol and associated resdue from \a node. +@return true on success, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param res the residue correspondig to the symbol. + +Sets the associated residue. +*/ + void SetResidue (Residue const *res); +/*! +@return the symbol of this Residue. +*/ + const gchar* GetSymbol () const; + +/*!\fn GetResidue() +@return the associated residue. +*/ +GCU_RO_PROP (Residue const *, Residue) +/*!\fn GetAbbrev() +@return the used symbol for the residue. +*/ +GCU_RO_PROP (std::string, Abbrev) +}; + +} // namespace gcp + +#endif // GCHEMPAINT_FRAGMENT_RESIDUE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/Hposdlg.cc gnome-chemistry-utils-0.10.9/libs/gcp/Hposdlg.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/Hposdlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/Hposdlg.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,75 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * Hposdlg.cc + * + * Copyright (C) 2005-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "Hposdlg.h" +#include "application.h" +#include "atom.h" +#include "document.h" +#include "view.h" + +using namespace gcu; + +namespace gcp { + +static void on_pos_changed (HPosDlg *dlg) +{ + dlg->OnPosChanged (); +} + +HPosDlg::HPosDlg (Document *pDoc, Atom *pAtom): + Dialog (pDoc->GetApplication (), GLADEDIR"/H-pos.glade", "Hposdlg", pAtom), + m_Atom (pAtom) +{ + if (!xml) { + delete this; + return; + } + box = (GtkComboBox*) glade_xml_get_widget (xml, "H-pos"); + gtk_combo_box_set_active (box, (int) m_Atom->GetHPosStyle ()); + g_signal_connect_swapped (G_OBJECT (box), "changed", G_CALLBACK (on_pos_changed), this); + m_View = pDoc->GetView (); + gtk_widget_show_all (GTK_WIDGET (dialog)); +} + +HPosDlg::~HPosDlg () +{ +} + +void HPosDlg::OnPosChanged () +{ + Document *Doc = m_View->GetDoc (); + Operation *Op = Doc->GetNewOperation (GCP_MODIFY_OPERATION); + Object *Obj = m_Atom->GetGroup (); + Op->AddObject (Obj, 0); + m_Atom->SetHPosStyle ((HPos) gtk_combo_box_get_active (box)); + m_Atom->Update (); + m_Atom->ForceChanged (); + m_View->Update (m_Atom); + m_Atom->EmitSignal (OnChangedSignal); + Op->AddObject (Obj, 1); + Doc->FinishOperation (); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/Hposdlg.h gnome-chemistry-utils-0.10.9/libs/gcp/Hposdlg.h --- gnome-chemistry-utils-0.8.6/libs/gcp/Hposdlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/Hposdlg.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,71 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * H-pos.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_H_POS_DLG_H +#define GCHEMPAINT_H_POS_DLG_H + +#include +#include + +/*!\file*/ +namespace gcp { + +class Atom; +class Document; +class View; + +/*!\class HPosDlg gcp/Hposdlg.h +The dialog used to set the position of the symbols of hydrogen atoms attached +to heteroatoms or explicit carbon atoms. +*/ +class HPosDlg: public gcu::Dialog +{ +public: +/*! +@param pDoc the document containing the atom. +@param pAtom the atom with attached hydrogens + +Creates and open a dialog used to set the position of the symbols of hydrogen +atoms attached to the specified atom. +*/ + HPosDlg (Document *pDoc, Atom* pAtom); +/*! +The destructor. +*/ + virtual ~HPosDlg (); + +/*! +Called by the framework when the selected position has changed. +*/ + void OnPosChanged (); + +private: + GtkComboBox *box; + Atom *m_Atom; + View *m_View; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_H_POS_DLG_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/Makefile.am gnome-chemistry-utils-0.10.9/libs/gcp/Makefile.am --- gnome-chemistry-utils-0.8.6/libs/gcp/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/Makefile.am 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,120 @@ +MAINTAINERCLEANFILES = Makefile.in + +lib_LTLIBRARIES= libgchempaint-@GCU_API_VER@.la + +libgchempaint_@GCU_API_VER@_la_SOURCES = \ + application.cc \ + plugin.cc \ + settings.cc \ + document.cc \ + target.cc \ + window.cc \ + operation.cc \ + arrow.cc \ + atom.cc \ + electron.cc \ + bond.cc \ + residue.cc \ + fragment-atom.cc \ + fragment-residue.cc \ + fragment.cc \ + molecule.cc \ + reaction.cc \ + reactant.cc \ + reaction-step.cc \ + reaction-arrow.cc \ + reaction-operator.cc \ + reaction-prop.cc \ + reaction-prop-dlg.cc \ + mesomery.cc \ + mesomer.cc \ + mesomery-arrow.cc \ + text.cc \ + text-object.cc \ + docprop.cc \ + fontsel.cc \ + newfiledlg.cc \ + preferences.cc \ + stringdlg.cc \ + about.cc \ + tool.cc \ + tools.cc \ + view.cc \ + widgetdata.cc \ + zoomdlg.cc \ + theme.cc \ + Hposdlg.cc + +noinst_HEADERS = \ + application.h \ + plugin.h \ + settings.h \ + document.h \ + target.h \ + window.h \ + operation.h \ + arrow.h \ + atom.h \ + electron.h \ + bond.h \ + residue.h \ + fragment-atom.h \ + fragment-residue.h \ + fragment.h \ + molecule.h \ + reaction.h \ + reactant.h \ + reaction-step.h \ + reaction-arrow.h \ + reaction-operator.h \ + reaction-prop.h \ + reaction-prop-dlg.h \ + mesomery.h \ + mesomer.h \ + mesomery-arrow.h \ + text.h \ + text-object.h \ + docprop.h \ + fontsel.h \ + newfiledlg.h \ + preferences.h \ + stringdlg.h \ + about.h \ + tool.h \ + tools.h \ + view.h \ + widgetdata.h \ + zoomdlg.h \ + theme.h \ + Hposdlg.h + +libgchempaint_@GCU_API_VER@_la_LDFLAGS = \ + -version-info @GCU_VERSION_INFO@ +libgchempaint_@GCU_API_VER@_la_LIBADD = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la \ + $(top_builddir)/libs/canvas/libgcpcanvas-@GCU_API_VER@.la +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/paint\" \ + -DPLUGINSDIR=\"$(libdir)/gchemutils/@GCU_API_VER@/plugins/paint\" \ + -DPIXMAPSDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/pixmaps\" \ + -DLOCALEDIR=\"$(localedir)\" + diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/Makefile.in gnome-chemistry-utils-0.10.9/libs/gcp/Makefile.in --- gnome-chemistry-utils-0.8.6/libs/gcp/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -0,0 +1,782 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libs/gcp +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libgchempaint_@GCU_API_VER@_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la \ + $(top_builddir)/libs/canvas/libgcpcanvas-@GCU_API_VER@.la +am_libgchempaint_@GCU_API_VER@_la_OBJECTS = application.lo plugin.lo \ + settings.lo document.lo target.lo window.lo operation.lo \ + arrow.lo atom.lo electron.lo bond.lo residue.lo \ + fragment-atom.lo fragment-residue.lo fragment.lo molecule.lo \ + reaction.lo reactant.lo reaction-step.lo reaction-arrow.lo \ + reaction-operator.lo reaction-prop.lo reaction-prop-dlg.lo \ + mesomery.lo mesomer.lo mesomery-arrow.lo text.lo \ + text-object.lo docprop.lo fontsel.lo newfiledlg.lo \ + preferences.lo stringdlg.lo about.lo tool.lo tools.lo view.lo \ + widgetdata.lo zoomdlg.lo theme.lo Hposdlg.lo +libgchempaint_@GCU_API_VER@_la_OBJECTS = \ + $(am_libgchempaint_@GCU_API_VER@_la_OBJECTS) +libgchempaint_@GCU_API_VER@_la_LINK = $(LIBTOOL) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(libgchempaint_@GCU_API_VER@_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgchempaint_@GCU_API_VER@_la_SOURCES) +DIST_SOURCES = $(libgchempaint_@GCU_API_VER@_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/paint\" \ + -DPLUGINSDIR=\"$(libdir)/gchemutils/@GCU_API_VER@/plugins/paint\" \ + -DPIXMAPSDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/pixmaps\" \ + -DLOCALEDIR=\"$(localedir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in +lib_LTLIBRARIES = libgchempaint-@GCU_API_VER@.la +libgchempaint_@GCU_API_VER@_la_SOURCES = \ + application.cc \ + plugin.cc \ + settings.cc \ + document.cc \ + target.cc \ + window.cc \ + operation.cc \ + arrow.cc \ + atom.cc \ + electron.cc \ + bond.cc \ + residue.cc \ + fragment-atom.cc \ + fragment-residue.cc \ + fragment.cc \ + molecule.cc \ + reaction.cc \ + reactant.cc \ + reaction-step.cc \ + reaction-arrow.cc \ + reaction-operator.cc \ + reaction-prop.cc \ + reaction-prop-dlg.cc \ + mesomery.cc \ + mesomer.cc \ + mesomery-arrow.cc \ + text.cc \ + text-object.cc \ + docprop.cc \ + fontsel.cc \ + newfiledlg.cc \ + preferences.cc \ + stringdlg.cc \ + about.cc \ + tool.cc \ + tools.cc \ + view.cc \ + widgetdata.cc \ + zoomdlg.cc \ + theme.cc \ + Hposdlg.cc + +noinst_HEADERS = \ + application.h \ + plugin.h \ + settings.h \ + document.h \ + target.h \ + window.h \ + operation.h \ + arrow.h \ + atom.h \ + electron.h \ + bond.h \ + residue.h \ + fragment-atom.h \ + fragment-residue.h \ + fragment.h \ + molecule.h \ + reaction.h \ + reactant.h \ + reaction-step.h \ + reaction-arrow.h \ + reaction-operator.h \ + reaction-prop.h \ + reaction-prop-dlg.h \ + mesomery.h \ + mesomer.h \ + mesomery-arrow.h \ + text.h \ + text-object.h \ + docprop.h \ + fontsel.h \ + newfiledlg.h \ + preferences.h \ + stringdlg.h \ + about.h \ + tool.h \ + tools.h \ + view.h \ + widgetdata.h \ + zoomdlg.h \ + theme.h \ + Hposdlg.h + +libgchempaint_@GCU_API_VER@_la_LDFLAGS = \ + -version-info @GCU_VERSION_INFO@ + +libgchempaint_@GCU_API_VER@_la_LIBADD = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la \ + $(top_builddir)/libs/canvas/libgcpcanvas-@GCU_API_VER@.la + +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libs/gcp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu libs/gcp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgchempaint-@GCU_API_VER@.la: $(libgchempaint_@GCU_API_VER@_la_OBJECTS) $(libgchempaint_@GCU_API_VER@_la_DEPENDENCIES) + $(libgchempaint_@GCU_API_VER@_la_LINK) -rpath $(libdir) $(libgchempaint_@GCU_API_VER@_la_OBJECTS) $(libgchempaint_@GCU_API_VER@_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Hposdlg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/about.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bond.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/docprop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/electron.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontsel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fragment-atom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fragment-residue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fragment.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesomer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesomery-arrow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesomery.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/molecule.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfiledlg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/operation.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preferences.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reactant.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reaction-arrow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reaction-operator.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reaction-prop-dlg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reaction-prop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reaction-step.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reaction.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/residue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringdlg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/target.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text-object.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theme.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tools.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widgetdata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomdlg.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/mesomer.cc gnome-chemistry-utils-0.10.9/libs/gcp/mesomer.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/mesomer.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/mesomer.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,111 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * mesomer.cc + * + * Copyright (C) 2005-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "mesomer.h" +#include "mesomery.h" +#include "molecule.h" +#include "document.h" +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +TypeId MesomerType; + +Mesomer::Mesomer (): Object (MesomerType) +{ +} + +Mesomer::~Mesomer () +{ + if (IsLocked ()) + return; + Document *pDoc = reinterpret_cast (GetDocument ()); + Operation *pOp = pDoc->GetCurrentOperation (); + Mesomery *ms = reinterpret_cast (GetParent ()); + if (!ms) + return; + map::iterator i; + Object *Child, *Group = ms->GetGroup (); + while (HasChildren ()) { + Child = GetFirstChild (i); + GetParent ()->GetParent ()->AddChild (Child); + if (pOp && !Group) + pOp->AddObject (Child, 1); + } +} + +Mesomer::Mesomer (Mesomery* mesomery, Molecule* molecule) throw (std::invalid_argument): Object (MesomerType) +{ + if (!mesomery || !molecule) + throw invalid_argument ("NULL argument to Mesomer constructor!"); + SetId ("ms1"); + mesomery->AddChild (this); + GetDocument ()->EmptyTranslationTable(); + AddChild (molecule); + m_Molecule = molecule; +} + +void Mesomer::AddArrow (MesomeryArrow *arrow, Mesomer *mesomer) throw (std::invalid_argument) +{ + if (m_Arrows[mesomer]) + throw invalid_argument (_("Only one arrow can link two given mesomers.")); + m_Arrows[mesomer] = arrow; +} + +void Mesomer::RemoveArrow (MesomeryArrow *arrow, Mesomer *mesomer) +{ + m_Arrows.erase (mesomer); +} + +double Mesomer::GetYAlign () +{ + return (m_Molecule)? m_Molecule->GetYAlign (): 0.; +} + +bool Mesomer::OnSignal (SignalId Signal, Object *Child) +{ + if (GetChildrenNumber () != 1) { + delete GetParent (); + return false; + } + return true; +} + +bool Mesomer::Load (xmlNodePtr node) +{ + if (Object::Load (node)) { + if (GetChildrenNumber () != 1) + return false; + map::iterator i; + m_Molecule = reinterpret_cast (GetFirstChild (i)); + return true; + } + return false; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/mesomer.h gnome-chemistry-utils-0.10.9/libs/gcp/mesomer.h --- gnome-chemistry-utils-0.8.6/libs/gcp/mesomer.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/mesomer.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,123 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * mesomer.h + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_MESOMER_H +#define GCHEMPAINT_MESOMER_H + +#include +#include + +/*!\file*/ +namespace gcp { + +extern gcu::TypeId MesomerType; + +class Mesomery; +class MesomeryArrow; +class Molecule; + +/*!\class Mesomer gcp/mesomer.h +Represents one esomeric form in a mesomery relationship. +*/ +class Mesomer: public gcu::Object +{ +public: +/*! +The default constructor. +*/ + Mesomer (); +/*! +The destructor. +*/ + virtual ~Mesomer (); + +/*! +@param mesomery the parent Mesomery. +@param molecule the molecule of the mesomeric form. + +Constructs a Mesomer from its parent Mesomery and a molecule. If one of them is +invalid, it throws an std::invalid_argument exception and should be destroyed +since it is invalid. +*/ + Mesomer (Mesomery *mesomery, Molecule *molecule) throw (std::invalid_argument); +/*! +@param node a pointer to the xmlNode containing the serialized object. + +Used to load a mesomer in memory. The mesomer must already exist. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework when a signal has been emitted for the mesomer. +It should not be called by a program; call Object::EmitSignal instead. + +@return true if the signal should be propagated to the parent, false otherwise. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); +/*! +Used to retrieve the y coordinate for alignment. Calls gcp::Molecule::GetYAlign +for the embedded molecule and returns the result. +@return y coordinate used for alignment. +*/ + double GetYAlign (); +/*! +@param arrow a mesomery arrow +@param mesomer the mesomer at the other end of the arrow. + +Adds the arrow to the arrows map. See Mesomer::GetArrows(). +*/ + void AddArrow (MesomeryArrow *arrow, Mesomer *mesomer) throw (std::invalid_argument); +/*! +@param arrow a mesomery arrow +@param mesomer the mesomer at the other end of the arrow. + +Removes the arrow from the arrows map. See Mesomer::GetArrows(). +*/ + void RemoveArrow (MesomeryArrow *arrow, Mesomer *mesomer); +/*! +@return true if the mesomer is associated with at least one mesomery arrow, false +otherwise. See gp::Mesomery::Validtae() for more information. +*/ + bool Validate () {return m_Arrows.size () > 0;} +/*! +@return the map of all arrows pointing to this mesomer indexed by the +mesomer at the other end of the arrow. +*/ + std::map *GetArrows () {return &m_Arrows;} +/*! +@return th molecule associated with this mesomer. +*/ + Molecule *GetMolecule () {return m_Molecule;} + +private: + Molecule *m_Molecule; + std::map m_Arrows; +}; + +} // namespace gcp + +#endif //GCHEMPAINT_MESOMER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/mesomery-arrow.cc gnome-chemistry-utils-0.10.9/libs/gcp/mesomery-arrow.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/mesomery-arrow.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/mesomery-arrow.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,184 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * mesomery-arrow.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "mesomery-arrow.h" +#include "mesomery.h" +#include "mesomer.h" +#include "document.h" +#include "settings.h" +#include "theme.h" +#include "view.h" +#include "widgetdata.h" +#include +#include + +using namespace gcu; + +namespace gcp { + +MesomeryArrow::MesomeryArrow (Mesomery* mesomery): Arrow (MesomeryArrowType) +{ + SetId ("ma1"); + if (mesomery) + mesomery->AddChild( this); + m_Start = m_End = NULL; +} + +MesomeryArrow::~MesomeryArrow () +{ + if (IsLocked ()) + return; + if (m_Start && m_End) { + m_Start->RemoveArrow (this, m_End); + m_End->RemoveArrow (this, m_Start); + } +} + +xmlNodePtr MesomeryArrow::Save (xmlDocPtr xml) const +{ + xmlNodePtr parent, node; + node = xmlNewDocNode (xml, NULL, (xmlChar*) "mesomery-arrow", NULL); + if (!node) + return NULL; + if (!Arrow::Save (xml, node)) { + xmlFreeNode (node); + return NULL; + } + if (m_Start) + xmlNewProp (node, (xmlChar*) "start", (xmlChar*) m_Start->GetId ()); + if (m_End) + xmlNewProp (node, (xmlChar*) "end", (xmlChar*) m_End->GetId ()); + Mesomery* m = (Mesomery*) GetParentOfType (MesomeryType); + if (!m) + { + //save the arrow as an object + parent = xmlNewDocNode (xml, NULL, (xmlChar*) "object", NULL); + if (node && parent) + xmlAddChild (parent, node); + else { + xmlFreeNode (node); + return NULL; + } + } + else parent = node; + return parent; +} + +bool MesomeryArrow::Load (xmlNodePtr node) +{ + char *buf; + Object *parent; + if (Arrow::Load (node)) { + parent = GetParent (); + if (!parent) + return true; + buf = (char*) xmlGetProp (node, (xmlChar*) "start"); + if (buf) { + m_Start = reinterpret_cast (parent->GetDescendant (buf)); + xmlFree (buf); + if (!m_Start) + return false; + } + buf = (char*) xmlGetProp (node, (xmlChar*) "end"); + if (buf) { + m_End = reinterpret_cast (parent->GetDescendant (buf)); + xmlFree (buf); + if (!m_End) + return false; + m_End->AddArrow (this, m_Start); + } + if (m_Start) + m_Start->AddArrow (this, m_End); + return true; + } + return false; +} + +void MesomeryArrow::Add (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasPoints *points = gnome_canvas_points_new (2); + GnomeCanvasGroup* group = GNOME_CANVAS_GROUP(gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL)); + GnomeCanvasItem* item; + points->coords[0] = m_x * pTheme->GetZoomFactor (); + points->coords[1] = m_y * pTheme->GetZoomFactor (); + points->coords[2] = (m_x + m_width) * pTheme->GetZoomFactor (); + points->coords[3] = (m_y + m_height) * pTheme->GetZoomFactor (); + item = gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", pTheme->GetArrowWidth (), + "first_arrowhead", true, + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "first_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + g_object_set_data (G_OBJECT(item), "object", (void *) this); + g_object_set_data (G_OBJECT(group), "arrow", item); + g_signal_connect(G_OBJECT (item), "event", G_CALLBACK (on_event), w); + pData->Items[this] = group; + gnome_canvas_points_free (points); +} + +void MesomeryArrow::Update (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup* group = pData->Items[this]; + GnomeCanvasPoints *points = gnome_canvas_points_new( 2); + points->coords[0] = m_x * pTheme->GetZoomFactor (); + points->coords[1] = m_y * pTheme->GetZoomFactor (); + points->coords[2] = (m_x + m_width) * pTheme->GetZoomFactor (); + points->coords[3] = (m_y + m_height) * pTheme->GetZoomFactor (); + g_object_set (G_OBJECT(g_object_get_data (G_OBJECT (group), "arrow")), + "points", points, + "width_units", pTheme->GetArrowWidth (), + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + NULL); + gnome_canvas_points_free (points); +} + +void MesomeryArrow::Reverse () +{ + Mesomer *mesomer = m_Start; + m_Start= m_End; + m_End = mesomer; + m_x = m_x + m_width; + m_y = m_y + m_height; + m_width = - m_width; + m_height = - m_height; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/mesomery-arrow.h gnome-chemistry-utils-0.10.9/libs/gcp/mesomery-arrow.h --- gnome-chemistry-utils-0.8.6/libs/gcp/mesomery-arrow.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/mesomery-arrow.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,112 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * mesomery-arrow.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_MESOMERY_ARROW_H +#define GCHEMPAINT_MESOMERY_ARROW_H + +/*!file*/ +#include "arrow.h" + +namespace gcp { + +class Mesomery; +class Mesomer; + +/*!\class MesomeryArrow gcp/mesomery-arrow.h +Arrow class for double headed arrows used in mesomery relationships.*/ +class MesomeryArrow: public Arrow +{ +public: +/*! +@param mesomery the parent mesomery relationship if any. + +Constructs a mesomery arrow. If \a mesomery is not NULL, the arrow becomes is +added to its children list. +*/ + MesomeryArrow (Mesomery* mesomery); +/*! +The destructor. +*/ + virtual ~MesomeryArrow (); + +/*! +@param xml the xmlDoc used to save the document. + +Used to save the arrow to the xmlDoc. +@return the xmlNode containing the serialized arrow. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node: a pointer to the xmlNode containing the serialized arrow. + +Used to load an arrow in memory. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param w the GtkWidget inside which the arrow will be displayed. + +Used to add a representation of the arrow in the widget. +*/ + void Add (GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the arrow is displayed. + +Used to update the representation of the arrow in the widget. +*/ + void Update (GtkWidget* w) const; +/*! +@param mesomer a mesomer + +Sets \a mesomer at first end of the arrow. This does not affect coordinates, +alignment is dealt with elsewhere. +*/ + void SetStartMesomer (Mesomer *mesomer) {m_Start = mesomer;} +/*! +@return the mesomer at first end of the arrow. +*/ + Mesomer* GetStartMesomer () {return m_Start;} +/*! +@param mesomer a mesomer + +Sets \a mesomer at last end of the arrow. This does not affect coordinates, +alignment is dealt with elsewhere. +*/ + void SetEndMesomer (Mesomer *mesomer) {m_End = mesomer;} +/*! +@return the mesomer at last end of the arrow. +*/ + Mesomer* GetEndMesomer () {return m_End;} +/*! +Exchange both ends or the arrow and their associated mesomers. +*/ + void Reverse (); + +private: + Mesomer *m_Start, *m_End; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_MESOMERY_ARROW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/mesomery.cc gnome-chemistry-utils-0.10.9/libs/gcp/mesomery.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/mesomery.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/mesomery.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,792 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * mesomery.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "document.h" +#include "mesomer.h" +#include "mesomery.h" +#include "mesomery-arrow.h" +#include "molecule.h" +#include "theme.h" +#include "view.h" +#include "widgetdata.h" +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +Mesomery::Mesomery (): Object (MesomeryType) +{ + SetId ("msy1"); +} + +Mesomery::~Mesomery () +{ + if (IsLocked ()) + return; + map::iterator i; + Object *pObj; + MesomeryArrow *arrow; + Document *pDoc = reinterpret_cast (GetDocument ()); + Operation *pOp = pDoc->GetCurrentOperation (); + while ((pObj = GetFirstChild (i))) { + if (pObj->GetType () == MesomeryArrowType) { + arrow = reinterpret_cast (pObj); + arrow->SetStartMesomer (NULL); + arrow->SetEndMesomer (NULL); + arrow->SetParent (GetParent ()); + if (pOp) + pOp->AddObject (arrow, 1); + + } else + delete pObj; + } +} + +bool Mesomery::Load (xmlNodePtr node) +{ + xmlChar* tmp; + xmlNodePtr child; + Object* pObject; + list arrows; + + Lock (); + tmp = xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId ((char*) tmp); + xmlFree (tmp); + } + child = node->children; + while (child) { + if (!strcmp ((const char*) child->name, "mesomery-arrow")) + arrows.push_front (child); + else { + pObject = CreateObject ((const char*) child->name, this); + if (pObject) { + if (!pObject->Load (child)) + delete pObject; + } else { + Lock (false); + return false; + } + } + child = child->next; + } + while (!arrows.empty ()) { + child = arrows.back (); + pObject = CreateObject ("mesomery-arrow", this); + if (pObject) { + if (!pObject->Load (child)) + delete pObject; + } else { + Lock (false); + return false; + } + arrows.pop_back (); + } + Lock (false); + return true; +} + +typedef struct +{ + double x, y; + ArtDRect r; + Mesomer *mes; +} ObjectData; + +bool Mesomery::Build (list& Children) throw (invalid_argument) +{ + Document *pDoc = dynamic_cast (GetDocument ()); + Theme *pTheme = pDoc->GetTheme (); + WidgetData *pData= reinterpret_cast (g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data")); + list::iterator i, iend = Children.end (); + map Objects; + list Arrows; + double minright, minleft, x, y, x0, y0, x1, y1, l, d, ps; + Object *Left, *Right; + ObjectData od; + MesomeryArrow *arrow; + unsigned narrows = 0, nmol = 0; + for (i = Children.begin (); i != iend; i++) { + pData->GetObjectBounds (*i, &od.r); + od.x = (od.r.x0 + od.r.x1) / 2.; + od.y = (*i)->GetYAlign () * pTheme->GetZoomFactor (); + switch ((*i)->GetType ()) { + case MoleculeType: + od.mes = new Mesomer (this, dynamic_cast(*i)); + Objects[*i] = od; + nmol++; + break; + case MesomeryArrowType: + narrows++; + Arrows.push_back (*i); + AddChild (*i); + break; + default: + throw invalid_argument (_("Something wrong happened, please file a bug report.")); + } + } + // now, for each arrow, search closiest object on both sides and verify it's a molecule + list::iterator j, jend = Arrows.end (); + map::iterator k, kend = Objects.end (); + for (j = Arrows.begin (); j != jend; j++) { + arrow = reinterpret_cast(*j); + arrow->GetCoords (&x0, &y0, &x1, &y1); + //x0 and y0 should be the center of the arrow, not the beginning, so we must transform them + x0 = (x0 + x1) / 2; + y0 = (y0 + y1) / 2; + // x1, y1 will now be the coordinates of a normalized vector: + x1 -= x0; + y1 -= y0; + x0 *= pTheme->GetZoomFactor (); + y0 *= pTheme->GetZoomFactor (); + l = sqrt (x1 * x1 + y1 * y1); + x1 /= l; + y1 /= l; + l *= pTheme->GetZoomFactor (); // half length of the arrow on the screen + // No molecule should be nearer than that + minright = minleft = DBL_MAX; + Left = Right = NULL; + for (k = Objects.begin (); k != kend; k++) { + od = (*k).second; + x = od.x - x0; + y = od.y - y0; + d = sqrt (x * x + y * y); + ps = (x * x1 + y * y1) / d; + if (ps >= -.71 && ps <= .71) + continue; + if (d < l) { + Left = (*k).first; + Right = *j; + pData->UnselectAll (); + pData->SetSelected (Left); + pData->SetSelected (Right); + throw invalid_argument (_("No space left between molecule and arrow!")); + } + if (ps < 0) { + if (d < minleft) { + Left = od.mes; + minleft = d; + } + } else { + if (d < minright) { + Right = od.mes; + minright = d; + } + } + } + if (!Left || !Right) { // Do not accept arrows with only one mesomer (?) + Left = *j; + pData->UnselectAll (); + pData->SetSelected (Left); + throw invalid_argument (_("Isolated arrows are not allowed!")); + } + reinterpret_cast (*j)->SetStartMesomer (reinterpret_cast (Left)); + reinterpret_cast (*j)->SetEndMesomer (reinterpret_cast (Right)); + reinterpret_cast (Left)->AddArrow (reinterpret_cast (*j), reinterpret_cast (Right)); + reinterpret_cast (Right)->AddArrow (reinterpret_cast (*j), reinterpret_cast (Left)); + } + // now, check if each mesomer has at least one arrow, may be we should add missing arrows? + for (k = Objects.begin (); k != kend; k++) { + od = (*k).second; + if (!od.mes->Validate ()) { + Left = (*k).first; + pData->UnselectAll (); + pData->SetSelected (Left); + throw invalid_argument (_("Isolated molecule!\n Please add missing arrows.")); + } + } + // Check if all mesomers are related (only connectivity is checked for now) + if (!Validate (false)) + throw invalid_argument (_("Please add missing arrows.")); + // Align the children + Align (); + return true; +} + +static void BuildConnectivity ( set &Objects, Mesomer* pMesomer) +{ + map *Arrows = pMesomer->GetArrows (); + map::iterator i, end = Arrows->end (); + for (i = Arrows->begin (); i != end; i++) { + Objects.insert ((*i).second); + if (Objects.find ((*i).first) == Objects.end ()) { + Objects.insert ((*i).first); + BuildConnectivity (Objects, (*i).first); + } + } +} + +bool Mesomery::Validate (bool split) +{ + map::iterator i; + Object *pObj = GetFirstChild (i); + while (pObj && pObj->GetType () != MesomerType) + pObj = GetNextChild (i); + if (pObj == NULL) + return false; + set Objects; + Objects.insert (pObj); + BuildConnectivity (Objects, reinterpret_cast (pObj)); + while (Objects.size () < GetChildrenNumber ()) { + if (!split) + return 2; + pObj = GetFirstChild (i); + while (pObj && (pObj->GetType () != MesomerType)) + pObj = GetNextChild (i); + if (reinterpret_cast (pObj)->Validate ()) { + Mesomery *ms = new Mesomery (GetParent (), + reinterpret_cast (pObj)); + Document *pDoc = reinterpret_cast (GetDocument ()); + Operation *pOp = pDoc->GetCurrentOperation (); + pOp->AddObject (ms, 1); + } else + delete pObj; + } + return true; +} + +typedef struct MC +{ + list mesomers; + struct MC *prev; + list children; +} MesomeryChain; + +typedef struct +{ + double x, y, dx, dy; + ArtDRect r; + Mesomer *m; + MesomeryChain *chain; +} MesomerData; + +static void TerminateChain (MesomeryChain *chain, set &core, + set &terminated_chains, map &positions) +{ + if (terminated_chains.find (chain) != terminated_chains.end ()) + return; // job has already been done + list::iterator m, mend; + MesomerData md; + if (chain->prev != NULL) + TerminateChain (chain->prev, core, terminated_chains, positions); + mend = chain->mesomers.end (); + for (m = chain->mesomers.begin (), m++; m != mend; m++) { + md = positions[*m]; + md.chain = NULL; + positions[*m] = md; + core.insert (*m); + } + terminated_chains.insert (chain); + list::iterator i, iend = chain->children.end (); + for (i = chain->children.begin (); i != iend; i++) + (*i)->prev = NULL; +} + +static void DoAlign (MesomeryArrow *arrow, MesomerData &start, MesomerData &end, double ArrowPadding, double ZoomFactor) +{ + double x0, y0, x1, y1, x, y, l, dx, dy; + bool horiz; + arrow->GetCoords (&x0, &y0, &x1, &y1); + x = x1 - x0; + y = y1 - y0; + l = sqrt (x * x + y * y); + x /= l; + y /= l; + if ((fabs (x) > 1e-5) && (fabs (y) > 1e-5)) + horiz = (fabs (x) > fabs (y)); + else if (fabs (x) > 1e-5) + horiz = true; + else + horiz = false; + if (horiz) { + if (x > 0) + dx = start.r.x1 - start.x + ArrowPadding; + else + dx = start.r.x0 - start.x - ArrowPadding; + dy = dx * y / x; + } else { + if (y > 0) + dy = start.r.y1 - start.y + ArrowPadding; + else + dy = start.r.y0 - start.y - ArrowPadding; + dx = dy * x / y; + } + x1 += x0 = (dx + start.x) / ZoomFactor - x0; + y1 += y0 = (dy + start.y) / ZoomFactor - y0; + arrow->Move (x0, y0); + if (horiz) { + if (x > 0) + dx = end.x - end.r.x0 + ArrowPadding; + else + dx = end.x - end.r.x1 - ArrowPadding; + dy = dx * y / x; + } else { + if (y > 0) + dy = end.y - end.r.y0 + ArrowPadding; + else + dy = end.y - end.r.y1 - ArrowPadding; + dx = dy * x / y; + } + dx = x1 * ZoomFactor - (end.x - dx); + dy = y1 * ZoomFactor - (end.y - dy); + end.r.x0 += dx; + end.r.x1 += dx; + end.x += dx; + end.dx += dx; + end.r.y0 += dy; + end.r.y1 += dy; + end.y += dy; + end.dy += dy; +} + +static double GetProjectionRatio (MesomerData &md, MesomerData &md0, MesomerData &md1, MesomeryArrow *arrow) +{ + double x0, y0, x1, y1, d; + arrow->GetCoords (&x0, &y0, &x1, &y1); + x1 -= x0; + y1 -= y0; + x0 = md1.x - md0.x; + y0 = md1.y - md0.y; + d = (x0 * y1 - x1 * y0); + if (d == 0.) + return -1.; // everything is aligned, and this should not occur, but who knows? + return ((md.x - md0.x) * y1 - (md.y - md0.y) * x1)/ d; +} + +static void AlignArrow (MesomeryArrow *arrow, MesomerData &md0, MesomerData &md1, double ArrowPadding, double ZoomFactor) +{ + double dx, dy, x, y, x0, y0, x1, y1, l; + bool horiz; + if (arrow->GetStartMesomer () != md0.m) + arrow->Reverse (); + x = md1.x - md0.x; + y = md1.y - md0.y; + l = sqrt (x * x + y * y); + x /= l; + y /= l; + if ((fabs (x) > 1e-5) && (fabs (y) > 1e-5)) + horiz = (fabs (x) > fabs (y)); + else if (fabs (x) > 1e-5) + horiz = true; + else + horiz = false; + if (horiz) { + if (x > 0) + dx = md0.r.x1 - md0.x + ArrowPadding; + else + dx = md0.r.x0 - md0.x - ArrowPadding; + dy = dx * y / x; + } else { + if (y > 0) + dy = md0.r.y1 - md0.y + ArrowPadding; + else + dy = md0.r.y0 - md0.y - ArrowPadding; + dx = dy * x / y; + } + x0 = (dx + md0.x) / ZoomFactor; + y0 = (dy + md0.y) / ZoomFactor; + if (horiz) { + if (x > 0) + dx = md1.x - md1.r.x0 + ArrowPadding; + else + dx = md1.x - md1.r.x1 - ArrowPadding; + dy = dx * y / x; + } else { + if (y > 0) + dy = md1.y - md1.r.y0 + ArrowPadding; + else + dy = md1.y - md1.r.y1 - ArrowPadding; + dx = dy * x / y; + } + x1 = (md1.x - dx) / ZoomFactor; + y1 = (md1.y - dy) / ZoomFactor; + arrow->SetCoords (x0, y0, x1, y1); +} + +static void ChainMove (MesomeryChain *chain, double dx, double dy, map &positions) +{ + list::iterator i, iend; + list::iterator c, cend; + MesomerData md; + iend = chain->mesomers.end (); + for (i = chain->mesomers.begin (), i++; i!= iend; i++) { + md = positions [*i]; + md.r.x0 += dx; + md.r.x1 += dx; + md.x += dx; + md.dx += dx; + md.r.y0 += dy; + md.r.y1 += dy; + md.y += dy; + md.dy += dy; + positions[*i] = md; + } + cend = chain->children.end (); + for (c = chain->children.begin (); c != cend; c++) + ChainMove (*c, dx, dy, positions); +} + +static void ChainAdjust (MesomerData &md0, MesomerData &md1, double ratio, map &positions) +{ + MesomeryChain *chain = md0.chain, *parent; + MesomerData md; + double x = 0., y = 0.; + ratio -= 1.; + list::reverse_iterator m, mend; + list::iterator c, cend; + while (chain) { + for (m = chain->mesomers.rbegin (); m != mend; m++) { + if (*m == md1.m) + return; + md = positions[*m]; + x = (md.x - md1.x) * ratio; + y = (md.y - md1.y) * ratio; + md.r.x0 += x; + md.r.x1 += x; + md.x += x; + md.dx += x; + md.r.y0 += y; + md.r.y1 += y; + md.y += y; + md.dy += y; + positions[md.m] = md; + } + parent = chain->prev; + if (parent == NULL) + return; // This should not occur, may be we should fire an exception there. + cend = parent->children.end (); + for (c = parent->children.begin (); c != cend; c++) { + if (*c == chain) + continue; + ChainMove (*c, x, y, positions); + } + parent = chain; + } +} + +// The following value is quite arbitrary, it is there to avoid getting very large images +#define CUTOFF 4.0 + +void Mesomery::Align () +{ + Document *pDoc = dynamic_cast (GetDocument ()); + View *pView = pDoc->GetView (); + Theme *pTheme = pDoc->GetTheme (); + WidgetData *pData = reinterpret_cast (g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data")); + /* Update the canvas if necessary */ + GnomeCanvas* w = GNOME_CANVAS (((Document*) GetDocument ())->GetWidget ()); + while (w->idle_id) + gtk_main_iteration(); + gnome_canvas_update_now (w); + map::iterator i; + Object *pObj = GetFirstChild (i); + Mesomer *pStart = NULL, *mes0, *mes; + map positions; + MesomerData md, md0, md1, md2; + double d; + md.dx = md.dy = 0.; + MesomeryChain *ch; + while (pObj) { + if (pObj->GetType () == MesomerType) { + pData->GetObjectBounds (pObj, &md.r); + md.x = (md.r.x0 + md.r.x1) / 2.; + md.y = pObj->GetYAlign () * pTheme->GetZoomFactor (); + md.chain = NULL; + md.m = dynamic_cast (pObj); + positions[pObj] = md; + if (!pStart) + pStart = md.m; + } + pObj = GetNextChild (i); + } + if (pStart == NULL) + throw invalid_argument (_("Something wrong happened, please file a bug report.")); + set Core; + Core.insert (pStart); + // initialize chains starting from pStart + list chains; + set terminated_chains; + list::iterator c, cend; + list::iterator m, mend; + list::reverse_iterator mr; + MesomeryChain *chain; + map *arrows = pStart->GetArrows (); + map::iterator j, jend = arrows->end (); + md0 = positions[pStart]; + for (j = arrows->begin (); j != jend; j++) { + // At this point we don't need to check anything, just create the chains + chain = new MesomeryChain; + chain->prev = NULL; + chain->mesomers.push_front (pStart); + chain->mesomers.push_back ((*j).first); + md = positions[(*j).first]; + md.chain = chain; + chains.push_back (chain); + // align the molecule + if ((*j).second->GetStartMesomer () != pStart) + (*j).second->Reverse (); + DoAlign ((*j).second, md0, md, pTheme->GetArrowPadding (), pTheme->GetZoomFactor ()); + positions[(*j).first] = md; + } + /* now add one mesomer to each growing chain and terminate chains when the end is + reached or when a cycle is found */ + while (!chains.empty ()) { + cend = chains.end (); + for (c = chains.begin (); c != cend; c++) { + // here we need the end of the chain and the previous mesomer + mr = (*c)->mesomers.rbegin (); + mes0 = *mr; + mr++; + mes = *mr; + arrows = mes0->GetArrows (); + switch (arrows->size ()) { + case 1: + // this is the end of the chain + TerminateChain (*c, Core, terminated_chains, positions); + break; + case 2: + arrows = mes0->GetArrows (); + j = arrows->begin (); + if ((*j).first == mes) + j++; + if ((*j).second->GetStartMesomer () != mes0) + (*j).second->Reverse (); + md0 = positions[mes0]; + md = positions[(*j).first]; + if (Core.find ((*j).first) != Core.end ()) { + // we reach a mesomer already in the core: cycle + if (Core.find (mes0) == Core.end ()) { + // find start atom for the chain + ch = *c; + while (ch->prev) + ch = ch->prev; + md1 = positions[ch->mesomers.front ()]; + d = GetProjectionRatio (md, md1, md0, (*j).second); + if (d > 0.999999 && d < CUTOFF) + ChainAdjust (md0, md1, d, positions); + } + TerminateChain (*c, Core, terminated_chains, positions); + } else if (md.chain != NULL) { + // we have just found a new cycle + // find start atom for both chains + ch = *c; + while (ch->prev) + ch = ch->prev; + md1 = positions[ch->mesomers.front ()]; + ch = md.chain; + while (ch->prev) + ch = ch->prev; + md2 = positions[ch->mesomers.front ()]; + // Check if mes0 are in core or not (this might happen) + if (Core.find (mes0) != Core.end ()) { + /* we are already in core, try to align the other chain + and change the arrow if not possible */ + d = GetProjectionRatio (md0, md2, md, (*j).second); + if (d > 0.999999) + ChainAdjust (md, md2, d, positions); + } else { + d = GetProjectionRatio (md, md1, md0, (*j).second); + if (d > 0.999999 && d < CUTOFF) + ChainAdjust (md0, md1, d, positions); + else { + d = GetProjectionRatio (md0, md2, md, (*j).second); + if (d > 0.999999 && d < CUTOFF) + ChainAdjust (md, md2, d, positions); + } + } + TerminateChain (md.chain, Core, terminated_chains, positions); + TerminateChain (*c, Core, terminated_chains, positions); + } else { + md.chain = md0.chain; + md.chain->mesomers.push_back ((*j).first); + DoAlign ((*j).second, md0, md, pTheme->GetArrowPadding (), pTheme->GetZoomFactor ()); + positions[(*j).first] = md; + } + break; + default: + arrows = mes0->GetArrows (); + jend = arrows->end (); + for (j = arrows->begin (); j != jend; j++) { + if ((*j).first == mes) + continue; + if ((*j).second->GetStartMesomer () != mes0) + (*j).second->Reverse (); + md0 = positions[mes0]; + md = positions[(*j).first]; + if (Core.find ((*j).first) != Core.end ()) { + // we reach a mesomer already in the core: cycle + if (Core.find (mes0) == Core.end ()) { + // find start atom for the chain + ch = *c; + while (ch->prev) + ch = ch->prev; + md1 = positions[ch->mesomers.front ()]; + d = GetProjectionRatio (md, md1, md0, (*j).second); + if (d > 0.999999 && d < CUTOFF) + ChainAdjust (md0, md1, d, positions); + } + TerminateChain (*c, Core, terminated_chains, positions); + } else if (md.chain != NULL) { + // we have just found a new cycle + // we have just found a new cycle + // find start atom for both chains + ch = *c; + while (ch->prev) + ch = ch->prev; + md1 = positions[ch->mesomers.front ()]; + ch = md.chain; + while (ch->prev) + ch = ch->prev; + md2 = positions[ch->mesomers.front ()]; + // Check if mes0 are in core or not (this might happen) + if (Core.find (mes0) != Core.end ()) { + /* we are already in core, try to align the other chain + and change the arrow if not possible */ + d = GetProjectionRatio (md0, md2, md, (*j).second); + if (d > 0.999999 && d < CUTOFF) + ChainAdjust (md, md2, d, positions); + } else { + d = GetProjectionRatio (md, md1, md0, (*j).second); + if (d > 0.999999 && d < CUTOFF) + ChainAdjust (md0, md1, d, positions); + else { + d = GetProjectionRatio (md0, md2, md, (*j).second); + if (d > 0.999999) + ChainAdjust (md, md2, d, positions); + } + } + TerminateChain (md.chain, Core, terminated_chains, positions); + TerminateChain (*c, Core, terminated_chains, positions); + } else { + md.chain = md0.chain; + md.chain->mesomers.push_back ((*j).first); + DoAlign ((*j).second, md0, md, pTheme->GetArrowPadding (), pTheme->GetZoomFactor ()); + positions[(*j).first] = md; + } + } + break; + } + } + set::iterator d, dend = terminated_chains.end (); + for (d = terminated_chains.begin (); d != dend; d++) { + chains.remove (*d); + delete *d; + } + terminated_chains.clear (); + } + // really move mesomers + map::iterator p, pend= positions.end (); + for (p = positions.begin (); p != pend; p++) + (*p).first->Move ((*p).second.dx / pTheme->GetZoomFactor (), (*p).second.dy / pTheme->GetZoomFactor ()); + MesomeryArrow *arrow; + for (pObj = GetFirstChild (i); pObj; pObj = GetNextChild (i)) + if (pObj->GetType () == MesomeryArrowType) { + arrow = static_cast (pObj); + md = positions[arrow->GetStartMesomer ()]; + md0 = positions[arrow->GetEndMesomer ()]; + AlignArrow (arrow, md, md0, pTheme->GetArrowPadding (), pTheme->GetZoomFactor ()); + } + pView->Update (this); +} + +/* Transform2D is just here to inhibit rotation of retrosynthesis while we do not have +real 2D alignment (only vertical at the moment */ +void Mesomery::Transform2D (Matrix2D& m, double x, double y) +{ +} + +bool Mesomery::OnSignal (SignalId Signal, Object *Child) +{ + Validate (true); + if (GetChildrenNumber () < 3) + delete this; + else + Align (); + return true; +} + +static void do_destroy_mesomery (void *data) +{ + Mesomery *ms = reinterpret_cast (data); + Document *pDoc = reinterpret_cast (ms->GetDocument ()); + WidgetData *pData = reinterpret_cast (g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data")); + pData->Unselect (ms); + Operation *pOp = pDoc->GetNewOperation (GCP_MODIFY_OPERATION); + pOp->AddObject (ms, 0); + delete ms; + pDoc->FinishOperation (); +} + +bool Mesomery::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + GtkActionGroup *group = gtk_action_group_new ("mesomery"); + GtkAction *action = gtk_action_new ("destroy-ms", _("Destroy the mesomery relationship"), NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + char buf[] = ""; + gtk_ui_manager_add_ui_from_string (UIManager, buf, -1, NULL); + GtkWidget *w = gtk_ui_manager_get_widget (UIManager, "/popup/destroy-ms"); + g_signal_connect_swapped (w, "activate", G_CALLBACK (do_destroy_mesomery), this); + GetParent ()->BuildContextualMenu (UIManager, object, x, y); + return true; +} + +Mesomery::Mesomery (Object* parent, Mesomer *mesomer): Object (MesomeryType) +{ + SetId ("msy1"); + SetParent (parent); + AddChild (mesomer); + set Objects; + BuildConnectivity (Objects, mesomer); + set::iterator i, end = Objects.end (); + for (i = Objects.begin (); i != end; i++) + AddChild (*i); + Align (); +} + +double Mesomery::GetYAlign () +{ + map::iterator i; + Object *pObj; + pObj = GetFirstChild (i); + double y = DBL_MAX, new_y; + while (pObj) { + if (pObj->GetType () == MesomerType) + if ((new_y = pObj->GetYAlign ()) < y) + y = new_y; + pObj = GetNextChild (i); + } + return y; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/mesomery.h gnome-chemistry-utils-0.10.9/libs/gcp/mesomery.h --- gnome-chemistry-utils-0.8.6/libs/gcp/mesomery.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/mesomery.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,116 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * mesomery.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_MESOMERY_H +#define GCHEMPAINT_MESOMERY_H + +#include + +namespace gcp { + +class Mesomer; + +/*!\file*/ +/*!\class Mesomery gcp/mesomery.h +Represents mesomery relationships.*/ +class Mesomery: public gcu::Object +{ +public: +/*! +The default constructor. Builds a new empty mesomery relationship. +*/ + Mesomery (); + virtual ~Mesomery (); + +/*! +@param node: a pointer to the xmlNode containing the serialized arrow. + +Used to load an arrow in memory. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param Children the molecules and arrow involved in the mesomery. + +Tries to associate mesomers and arrows so that the relationship is clearly +established and aligns the objects. On failure, it throws an std::invalid_argument +exception. +@return true on success. +*/ + bool Build (std::list& Children) throw (std::invalid_argument); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Mesomeries can't be currently rotated. This method don't do anything. It is +just there to inhibit the default behavior. +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +@param UIManager the GtkUIManager to populate. +@param object the Object on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +Builds the contextual menu for the mesomery. +@return true (failure would be a bug). +*/ + bool BuildContextualMenu (GtkUIManager *UIManager, gcu::Object *object, double x, double y); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework one of the molecules or arrows has changed. +Realigns if the mesomery is still valid or destroys it. + +@return true to propagate the signal to the parent. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); +/*! +@param split whether to split the mesomery when arrows are missing. + +Checks the validity of the mesomery, at least that each arrow is associated with +two mesomers and all mesomers are related by arrows. Currently it does not check +that the molecules are really mesomeric, but this might be implemented in the +future. +@return true if the mesomery is valid or could be splitted, false otherwise. +*/ + bool Validate (bool split); +/*! +Aligns the children. +*/ + void Align (); +/*! +@return the alignment ordinate of the top mesomer. +*/ + double GetYAlign (); + +private: + Mesomery (gcu::Object* parent, Mesomer *mesomer); +}; + +} // namespace gcp + +#endif //GCHEMPAINT_MESOMERY_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/molecule.cc gnome-chemistry-utils-0.10.9/libs/gcp/molecule.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/molecule.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/molecule.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,883 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * molecule.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "molecule.h" +#include "document.h" +#include "view.h" +#include "application.h" +#include "tool.h" +#include "stringdlg.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace OpenBabel; +using namespace std; + +namespace gcp { + +static void do_export_to_ghemical (Molecule* pMol) +{ + pMol->ExportToGhemical (); +} + +static void do_select_alignment (GObject *action, Molecule* pMol) +{ + Object *object = (Object*) g_object_get_data (action, "item"); + pMol->SelectAlignmentItem (object); +} + +static void do_build_inchi (Molecule* pMol) +{ + pMol->ShowInChI (); +} + +static void do_build_smiles (Molecule* pMol) +{ + pMol->BuildSMILES (); +} + +static void do_show_webbook (Molecule* pMol) +{ + pMol->ShowWebBase ("http://webbook.nist.gov/cgi/cbook.cgi?Name=", "&Units=SI"); +} + +static void do_show_pubchem (Molecule* pMol) +{ + pMol->ShowWebBase ("http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=search&DB=pccompound&term=\"", "\""); +} + +static void do_open_in_calc (Molecule* pMol) +{ + pMol->OpenCalc (); +} + +Molecule::Molecule (TypeId Type): gcu::Molecule (Type) +{ + m_Alignment = NULL; + m_Changed = true; + m_IsResidue = false; +} + +Molecule::Molecule (Atom* pAtom): gcu::Molecule (pAtom) +{ + m_Alignment = NULL; + m_Changed = true; + m_IsResidue = false; +} + +Molecule::~Molecule () +{ +} + +void Molecule::Add (GtkWidget* w) const +{ + std::list::const_iterator i, iend = m_Atoms.end (); + for (i = m_Atoms.begin (); i != iend; i++) + (*i)->Add (w); + std::list::const_iterator j, jend = m_Fragments.end (); + for (j = m_Fragments.begin (); j != jend; j++) + (*j)->Add (w); + std::list::const_iterator k, kend = m_Bonds.end (); + for (k = m_Bonds.begin (); k != kend; k++) + (*k)->Add (w); +} + +void Molecule::AddChild (Object* object) +{ + switch (object->GetType ()) { + case FragmentType: { + Fragment *fragment = reinterpret_cast (object); + m_Fragments.remove (fragment); + AddFragment (fragment); + break; + } + default: + gcu::Molecule::AddChild (object); + break; + } +} + +void Molecule::AddAtom (gcu::Atom* pAtom) +{ + gcu::Molecule::AddAtom (pAtom); + if (!pAtom->GetZ ()) + m_IsResidue = true; +} + +void Molecule::AddFragment (Fragment* pFragment) +{ + m_Fragments.remove (pFragment); // just in case + m_Fragments.push_back (pFragment); + Object::AddChild (pFragment); +} + +void Molecule::AddBond (gcu::Bond* pBond) +{ + if (pBond->GetAtom (0) && pBond->GetAtom (1)) + CheckCrossings (reinterpret_cast (pBond)); + gcu::Molecule::AddBond (pBond); + EmitSignal (OnChangedSignal); +} + +void Molecule::Remove (Object* pObject) +{ + if (pObject == m_Alignment) + m_Alignment = NULL; + switch (pObject->GetType ()) { + case FragmentType: + m_Fragments.remove ((Fragment*) pObject); + break; + default: + gcu::Molecule::Remove (pObject); + break; + } + pObject->SetParent (GetParent ()); +} + +typedef struct { + Atom *pAtom; + int sb; // number of shared bonds + int so0, so1; // total bond order of shared bonds for each atom +} MergedAtom; + +bool Molecule::Merge (Molecule* pMolecule, bool RemoveDuplicates) +{ + Atom* pAtom; + Fragment* pFragment; + Bond* pBond; + Chain* pChain; + Cycle* pCycle; + if (RemoveDuplicates) { + std::list::iterator i = m_Atoms.begin (), end = m_Atoms.end (); + double x, y, x0, y0, x1, y1; + MergedAtom *ma; + Bond *b0, *b1; + bool DoMerge; + int n; + map AtomMap; + map::iterator j, endj; + map BondMap; + map::iterator b, endb; + for (; i != end; i++) { + (*i)->GetCoords (&x, &y); + pAtom = (Atom*) pMolecule->GetAtomAt (x, y); + if (pAtom) { + if ((*i)->GetZ()!= pAtom->GetZ()) + { + // Cannot merge atoms which are not of the same element. + endj = AtomMap.end (); + for (j = AtomMap.begin (); j != endj; j++) + delete (*j).second; + return false; + } + ma = new MergedAtom; + ma->sb = ma->so0 = ma->so1 = 0; + ma->pAtom = pAtom; + endj = AtomMap.end (); + for (j = AtomMap.begin (); j != endj; j++) { + if ((b1 = (Bond*) pAtom->GetBond ((*j).second->pAtom))) { + b0 = (Bond*) (*i)->GetBond ((*j).first); + if (b0) { + ma->sb++; + ma->so0 += b0->GetOrder (); + ma->so1 += b1->GetOrder (); + (*j).second->sb++; + (*j).second->so0 += b0->GetOrder (); + (*j).second->so1 += b1->GetOrder (); + BondMap[b0] = b1; + } + } + } + AtomMap[reinterpret_cast (*i)] = ma; + } + } + // Now check if merging is possible for each shared atom. + DoMerge = AtomMap.size () != 0; + if (DoMerge) { + x = y = 0.; + endj = AtomMap.end (); + for (j = AtomMap.begin (); j != endj; j++) { + ma = (*j).second; + n = ma->pAtom->GetTotalBondsNumber () - ma->so0 - ma->so1 + ma->sb; + if (!(*j).first->AcceptNewBonds (n)) { + DoMerge = false; + break; + } + n = (*j).first->GetTotalBondsNumber () - ma->so0 - ma->so1 + ma->sb; + if (!ma->pAtom->AcceptNewBonds (n)) { + DoMerge = false; + break; + } + (*j).first->GetCoords (&x0, &y0); + ma->pAtom->GetCoords (&x1, &y1); + x += x1 - x0; + y += y1 - y0; + } + } + if (DoMerge) { + //First align molecules + x /= 2.* AtomMap.size (); + y /= 2.* AtomMap.size (); + Move (x, y); + pMolecule->Move (-x, -y); + + //Then align each atom individually + endj = AtomMap.end (); + for (j = AtomMap.begin (); j != endj; j++) { + (*j).first->GetCoords (&x0, &y0); + (*j).second->pAtom->GetCoords (&x1, &y1); + (*j).first->Move ((x1 - x0) / 2.,(y1 - y0) / 2.); + } + View *pView = ((Document*) GetDocument ())->GetView (); + + /* Treat shared bonds (set order to 1, store max order in b1 and remove the bond + * from pMolecule. */ + endb = BondMap.end (); + for (b = BondMap.begin (); b != endb; b++) { + b1 = (*b).second; + n = (*b).first->GetOrder (); + pView->Remove (b1); + pMolecule->Remove (b1); + (*b).first->SetOrder (1); + pAtom = (Atom*) b1->GetAtom (0); + pAtom->RemoveBond (b1); + b1->ReplaceAtom (pAtom, NULL); + pAtom = (Atom*) b1->GetAtom (1); + pAtom->RemoveBond (b1); + b1->ReplaceAtom (pAtom, NULL); + if (n > b1->GetOrder ()) + b1->SetOrder (n); + } + + // Treat shared atoms and delete from pMolecule + map< gcu::Atom *, gcu::Bond * >::iterator ai; + endj = AtomMap.end (); + for (j = AtomMap.begin (); j != endj; j++) { + b0 = (Bond*) (*j).second->pAtom->GetFirstBond (ai); + while (b0) { + b0->ReplaceAtom ((*j).second->pAtom, (*j).first); + (*j).first->AddBond (b0); + b0 = (Bond*) (*j).second->pAtom->GetNextBond (ai); + } + pMolecule->Remove ((*j).second->pAtom); + pView->Remove ((*j).second->pAtom); + delete (*j).second->pAtom; + } + + // Try to restore max bond order for shared bonds and destroy old bonds + endb = BondMap.end (); + for (b = BondMap.begin (); b != endb; b++) { + n = (*b).second->GetOrder () - 1; + b0 = (*b).first; + while ((n > 0) && + (!((Atom*) b0->GetAtom (0))->AcceptNewBonds (n) || + !((Atom*) b0->GetAtom(1))->AcceptNewBonds (n))) + n--; + if (n > 0) + b0->SetOrder (n + 1); + delete (*b).second; + } + } + + // Clean memory + endj = AtomMap.end (); + for (j = AtomMap.begin (); j != endj; j++) + delete (*j).second; + //return if merging is not possible + if (!DoMerge) return false; + } + while (!pMolecule->m_Atoms.empty ()) { + pAtom = reinterpret_cast (pMolecule->m_Atoms.front ()); + AddAtom (pAtom); + pMolecule->m_Atoms.pop_front (); + } + while (!pMolecule->m_Fragments.empty ()) { + pFragment = pMolecule->m_Fragments.front (); + AddFragment (pFragment); + pMolecule->m_Fragments.pop_front (); + } + while (!pMolecule->m_Bonds.empty ()) { + pBond = reinterpret_cast (pMolecule->m_Bonds.front ()); + AddBond (pBond); + pMolecule->m_Bonds.pop_front (); + } + while (!pMolecule->m_Chains.empty ()) { + //FIXME: Chains should change + pChain = pMolecule->m_Chains.front (); + m_Chains.push_back (pChain); + pMolecule->m_Chains.pop_front (); + } + while (!pMolecule->m_Cycles.empty()) { + pCycle = pMolecule->m_Cycles.front (); + m_Cycles.push_back (pCycle); + pMolecule->m_Cycles.pop_front (); + } + Object* pObj = pMolecule->GetParent (); + delete pMolecule; + pObj->EmitSignal (OnChangedSignal); + if (RemoveDuplicates) + UpdateCycles (); + EmitSignal (OnChangedSignal); + return true; +} + +bool Molecule::Load (xmlNodePtr node) +{ + char* buf; + xmlNodePtr child; + Object* pObject; + Document* pDoc = (Document*) GetDocument (); + + buf = (char*) xmlGetProp (node, (xmlChar*) "id"); + if (buf) { + SetId (buf); + xmlFree (buf); + } + child = GetNodeByName (node, "atom"); + while (child) { + pObject = new Atom (); + if (pDoc) + AddChild (pObject); + if (!pObject->Load (child)) { + delete pObject; + return false; + } + if (pDoc) + pDoc->AddAtom ((Atom*) pObject); + AddAtom ((Atom*) pObject); + child = GetNextNodeByName (child->next, "atom"); + } + // FIXME, the following looks like a kludge + child = GetNodeByName (node, "pseudo-atom"); + while (child) { + pObject = CreateObject ("pseudo-atom", pDoc); + if (pDoc) + AddChild (pObject); + if (!pObject->Load (child)) { + delete pObject; + return false; + } + if (pDoc) + pDoc->AddAtom ((Atom*) pObject); + AddAtom ((Atom*) pObject); + child = GetNextNodeByName (child->next, "pseudo-atom"); + } + + child = GetNodeByName (node, "fragment"); + while (child) { + pObject = new Fragment (); + if (pDoc) + AddChild (pObject); + if (!pObject->Load (child)) { + delete pObject; + return false; + } + if (pDoc) + pDoc->AddFragment ((Fragment*) pObject); + child = GetNextNodeByName (child->next, "fragment"); + } + + child = GetNodeByName (node, "bond"); + while (child) { + pObject = new Bond (); + AddBond ((Bond*) pObject); + if (!pObject->Load (child)) { + delete pObject; + m_Bonds.remove ((Bond*) pObject); + return false; + } + if (pDoc) + pDoc->AddBond ((Bond*) pObject); + child = GetNextNodeByName (child->next, "bond"); + CheckCrossings ((Bond*) pObject); + } + if (!m_Atoms.empty ()) { + Atom* pAtom = reinterpret_cast (m_Atoms.front ()); + list::iterator i = m_Atoms.begin (); + i++; + for (; i != m_Atoms.end (); i++) + (*i)->SetParent (NULL); + // erase cycles + list::iterator j, jend = m_Bonds.end (); + for (j = m_Bonds.begin (); j != jend; j++) + (*j)->RemoveAllCycles (); + Chain* pChain = new Chain (this, pAtom); //will find the cycles + delete pChain; + } + buf = (char*) xmlGetProp (node, (const xmlChar*) "valign"); + if (buf) { + m_Alignment = GetDescendant (buf); + xmlFree (buf); + if (!m_Alignment) + return false; + } + m_Changed = true; + return true; +} + +void Molecule::Clear () +{ + m_Bonds.clear (); + m_Atoms.clear (); + m_Fragments.clear (); +} + +void Molecule::Transform2D (Matrix2D& m, double x, double y) +{ + Object::Transform2D (m, x, y); + std::list::iterator i = m_Atoms.begin (); + for (; i != m_Atoms.end (); i++) + if (((*i)->GetZ () != 6) && reinterpret_cast (*i)->GetAttachedHydrogens () && + (*i)->GetBondsNumber ()) reinterpret_cast (*i)->Update (); +} + +Object* Molecule::GetAtomAt (double x, double y, double z) +{ + // Make use of Bond::GetAtomAt + std::list::iterator n, end = m_Bonds.end (); + Object* pObj = NULL; + for (n = m_Bonds.begin(); n != end; n++) + if ((pObj = (*n)->GetAtomAt (x, y))) + break; + return pObj; +} + +double Molecule::GetYAlign () +{ + if (m_Alignment) + return m_Alignment->GetYAlign (); + double y, maxy = - DBL_MAX, miny = DBL_MAX; + std::list::iterator i = m_Atoms.begin (), end = m_Atoms.end (); + for (; i != end; i++) { + y = reinterpret_cast (*i)->GetYAlign (); + if (y < miny) + miny = y; + if (y > maxy) + maxy = y; + } + std::list::iterator ig = m_Fragments.begin (), endg = m_Fragments.end (); + for (; ig != endg; ig++) { + y = (*ig)->GetYAlign (); + if (y < miny) + miny = y; + if (y > maxy) + maxy = y; + } + return (miny + maxy) / 2.0; +} + +bool Molecule::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + if (m_IsResidue) + return false; + GtkActionGroup *group = gtk_action_group_new ("molecule"); + GtkAction *action; + action = gtk_action_new ("Molecule", _("Molecule"), NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + bool result = false; + if (!m_Fragments.size ()) { + if (((Document*) GetDocument ())->GetApplication ()->HaveGhemical ()) { + action = gtk_action_new ("ghemical", _("Export molecule to Ghemical"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_export_to_ghemical), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + } + if (((Document*) GetDocument ())->GetApplication ()->HaveInChI ()) { + action = gtk_action_new ("inchi", _("Generate InChI"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_build_inchi), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + action = gtk_action_new ("webbook", _("NIST WebBook page for this molecule"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_show_webbook), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + action = gtk_action_new ("pubchem", _("PubChem page for this molecule"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_show_pubchem), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + } + action = gtk_action_new ("smiles", _("Generate SMILES"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_build_smiles), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + action = gtk_action_new ("calc", _("Open in Calculator"), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_open_in_calc), this); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + result = true; + } + if (m_Bonds.size ()) { + action = gtk_action_new ("select-align", _("Select alignment item"), NULL, NULL); + g_signal_connect (action, "activate", G_CALLBACK (do_select_alignment), this); + g_object_set_data (G_OBJECT (action), "item", object); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + result = true; + } + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + return result | Object::BuildContextualMenu (UIManager, object, x, y); +} + +void Molecule::ExportToGhemical () +{ + OBMol Mol; + OBConversion Conv; + OBFormat* pOutFormat = Conv.FindFormat ("gpr"); + Conv.SetInAndOutFormats (pOutFormat, pOutFormat); + BuildOBMol (Mol); + char *tmpname = g_strdup ("/tmp/2gprXXXXXX"); + int f = g_mkstemp (tmpname); + gchar *old_num_locale; + close (f); + ofstream ofs; + ofs.open(tmpname); + if (!ofs) throw (int) 1; + old_num_locale = g_strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + Conv.Write (&Mol, &ofs); + setlocale(LC_NUMERIC, old_num_locale); + g_free(old_num_locale); + ofs.close(); + char *command_line = g_strconcat ("ghemical -f ", tmpname, NULL); + g_free (tmpname); + g_spawn_command_line_async (command_line, NULL); + g_free (command_line); +} + +void Molecule::SelectAlignmentItem (Object *child) +{ + m_Alignment = (m_Alignment != child)? child: NULL; + EmitSignal (OnChangedSignal); +} + +xmlNodePtr Molecule::Save (xmlDocPtr xml) const +{ + xmlNodePtr node = Object::Save (xml); + if (!node) + return NULL; + if (m_Alignment) + xmlNewProp (node, (const xmlChar*) "valign", (const xmlChar*) m_Alignment->GetId ()); + return node; +} + +void Molecule::BuildOBMol (OBMol &Mol) +{ + double xav = 0., yav = 0., zf; + unsigned n = m_Atoms.size (); + map AtomTable; + list::iterator ia, enda = m_Atoms.end (); + list BondList; + double x, y, z; + for (ia = m_Atoms.begin (); ia != enda; ia++) { + (*ia)->GetCoords(&x, &y, &z); + xav += x; + yav += y; + } + xav /= n; + yav /= n; + Atom* pgAtom; + OBAtom obAtom; + unsigned index = 1; + map::iterator i; + Bond *pBond; + Mol.BeginModify (); + Mol.ReserveAtoms (n); + for (ia = m_Atoms.begin (); ia != enda; ia++) { + pgAtom = reinterpret_cast (*ia); + AtomTable [pgAtom->GetId ()] = index; + obAtom.SetIdx (index++); + obAtom.SetAtomicNum (pgAtom->GetZ()); + pgAtom->GetCoords (&x, &y, &z); + // Scans the atom bonds and change z to try conservation of stereochemistry + pBond = (Bond*) pgAtom->GetFirstBond (i); + while (pBond) { + zf = (pBond->GetAtom (0) == pgAtom)? 1.: -1.; + switch (pBond->GetType ()) { + case UpBondType: + z += zf * 50.; + break; + case DownBondType: + z -= zf * 50.; + break; + default: + break; + } + pBond = (Bond*) pgAtom->GetNextBond (i); + } + obAtom.SetVector ((xav - x) / 100, (yav - y) / 100, z / 100); + Mol.AddAtom (obAtom); + obAtom.Clear (); + } + list::iterator j, endb = m_Bonds.end (); + int start, end, order; + for (j = m_Bonds.begin (); j != endb; j++) + { + order = (*j)->GetOrder (); + start = AtomTable[(*j)->GetAtom (0)->GetId ()]; + end = AtomTable[(*j)->GetAtom (1)->GetId ()]; + Mol.AddBond(start, end, order, 0); + } + Mol.EndModify (); +} + +void Molecule::BuildOBMol2D (OBMol &Mol) +{ + double xav = 0., yav = 0.; + unsigned n = m_Atoms.size (); + map AtomTable; + list::iterator ia, enda = m_Atoms.end (); + list BondList; + double x, y, z; + for (ia = m_Atoms.begin (); ia != enda; ia++) { + (*ia)->GetCoords (&x, &y, &z); + xav += x; + yav += y; + } + xav /= n; + yav /= n; + Atom* pgAtom; + OBAtom obAtom; + unsigned index = 1; + map::iterator i; + Mol.BeginModify (); + Mol.ReserveAtoms (n); + Mol.SetDimension (2); + for (ia = m_Atoms.begin (); ia != enda; ia++) { + pgAtom = reinterpret_cast (*ia); + AtomTable [pgAtom->GetId ()] = index; + obAtom.SetIdx (index++); + obAtom.SetAtomicNum (pgAtom->GetZ()); + pgAtom->GetCoords (&x, &y, &z); + // Scans the atom bonds and change z to try conservation of stereochemistry + obAtom.SetVector ((x - xav)/ 100, (yav - y) / 100, 0.); + Mol.AddAtom (obAtom); + obAtom.Clear (); + } + list::iterator j, endb = m_Bonds.end (); + int start, end, order, flag; + for (j = m_Bonds.begin (); j != endb; j++) { + order = (*j)->GetOrder (); + start = AtomTable[(*j)->GetAtom (0)->GetId ()]; + end = AtomTable[(*j)->GetAtom (1)->GetId ()]; + switch (reinterpret_cast (*j)->GetType ()) { + case UpBondType: + flag = OB_WEDGE_BOND; + break; + case DownBondType: + flag = OB_HASH_BOND; + break; + default: + flag = 0; + } + Mol.AddBond (start, end, order, flag); + } + Mol.EndModify (); +} + +void Molecule::BuildInChI () +{ + OBMol Mol; + OBConversion Conv; + BuildOBMol2D (Mol); + OBFormat *pInChIFormat = Conv.FindFormat ("inchi"), *pMolFormat = Conv.FindFormat ("mol"); + if (pInChIFormat) { + Conv.SetInAndOutFormats (pMolFormat, pInChIFormat); + Conv.SetOptions ("xt", OpenBabel::OBConversion::OUTOPTIONS); + ostringstream ofs; + char *old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + Conv.Write (&Mol, &ofs); + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + // remove "INCHI=" and the new line char at the end + m_InChI = ofs.str ().substr (0, ofs.str ().length () - 2); + } else { + Conv.SetInAndOutFormats (pMolFormat, pMolFormat); + char *tmpname = g_strdup ("/tmp/inchiXXXXXX"); + int f = g_mkstemp (tmpname); + close (f); + ofstream ofs; + ofs.open (tmpname); + char *old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + Conv.Write (&Mol, &ofs); + setlocale (LC_NUMERIC, old_num_locale); + ofs.close (); + // calling main_inchi -STDIO -AuxNone -NoLabels + char *command = g_strdup_printf ("main_inchi %s -STDIO -AuxNone -NoLabels", tmpname); + char *output, *errors; + g_spawn_command_line_sync (command, &output, &errors, NULL, NULL); + if (output) { + // remove the new line char at the end + output[strlen (output) - 1] = 0; + m_InChI = output + 6; + g_free (output); + } + if (errors) + g_free (errors); + g_free (command); + g_free (old_num_locale); + remove (tmpname); + g_free (tmpname); + } + m_Changed = false; +} + +void Molecule::BuildSMILES () +{ + OBMol Mol; + OBConversion Conv; + OBFormat* pOutFormat = Conv.FindFormat ("smi"); + Conv.SetInAndOutFormats (pOutFormat, pOutFormat); + BuildOBMol2D (Mol); + ostringstream ofs; + char *old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + Conv.Write (&Mol, &ofs); + setlocale (LC_NUMERIC, old_num_locale); + //TODO: do something with the string + g_free (old_num_locale); + string str = ofs.str ().substr (0, ofs.str ().length () - 2); + new StringDlg (reinterpret_cast(GetDocument ()), str, StringDlg::SMILES); +} + +void Molecule::ShowInChI () +{ + if (m_Changed) + BuildInChI (); + new StringDlg (reinterpret_cast(GetDocument ()), m_InChI, StringDlg::INCHI); +} + +void Molecule::ShowWebBase (char const* uri_start, char const *uri_end) +{ + if (m_Changed) + BuildInChI (); + if (m_InChI.length () == 0) + return; //should emit at least a warning + string::size_type t; + while ((t = m_InChI.find ('+')) != string::npos) + m_InChI.replace (t, 1, "%2b"); + string uri = string (uri_start) + m_InChI + uri_end; + ((Document*) GetDocument ())->GetApplication ()->ShowURI (uri); +} + +bool Molecule::OnSignal (SignalId Signal, Object *Child) +{ + m_Changed = true; + return true; +} + +void Molecule::OpenCalc () +{ + list::iterator ia, enda = m_Atoms.end (); + ostringstream ofs; + int nH; + ofs << "gchemcalc-"API_VERSION" "; + for (ia = m_Atoms.begin(); ia != enda; ia++) { + ofs << (*ia)->GetSymbol(); + nH = reinterpret_cast (*ia)->GetAttachedHydrogens (); + if (nH > 0) { + ofs << "H" << nH; + } + } + g_spawn_command_line_async (ofs.str ().c_str (), NULL); +} + +void Molecule::CheckCrossings (Bond *pBond) +{ + View *pView = reinterpret_cast (GetDocument ())->GetView (); + list::iterator i, iend = m_Bonds.end (); + for (i = m_Bonds.begin (); i != iend; i++) + if (((*i) != pBond) && reinterpret_cast (*i)->IsCrossing (pBond)) { + pView->Update (pBond); + pView->Update (*i); + } +} + +char const *Molecule::GetInChI () +{ + if (m_Changed) + BuildInChI (); + return m_InChI.c_str (); +} + +std::string Molecule::GetRawFormula () const +{ + ostringstream ofs; + + if (!m_Fragments.size ()) { + // we do not support fragments at the moment + map elts; + list::const_iterator ia, enda = m_Atoms.end (); + for (ia = m_Atoms.begin(); ia != enda; ia++) { + if ((*ia)->GetZ () == 0) + continue; + elts[(*ia)->GetSymbol ()]++; + elts["H"] += reinterpret_cast (*ia)->GetAttachedHydrogens (); + } + if (elts["C"] > 0) { + ofs << "C" << elts["C"]; + elts.erase ("C"); + } + if (elts["H"] > 0) { + ofs << "H" << elts["H"]; + elts.erase ("H"); + } + map::iterator is, isend = elts.end (); + for (is = elts.begin (); is != isend; is++) + ofs << (*is).first << (*is).second; + } + + return ofs.str (); +} + +void Molecule::OnLoaded () +{ + UpdateCycles (); +} + +unsigned Molecule::GetAtomsNumber () const +{ + return m_Atoms.size () + m_Fragments.size (); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/molecule.h gnome-chemistry-utils-0.10.9/libs/gcp/molecule.h --- gnome-chemistry-utils-0.8.6/libs/gcp/molecule.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/molecule.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,263 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * molecule.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_MOLECULE_H +#define GCHEMPAINT_MOLECULE_H + +#include "fragment.h" +#include +#include +#include + +/*!\file*/ +namespace gcp { + +class Bond; + +/*!\class Molecule gcp/molecule.h +\brief GChemPaint molecule class. +*/ +class Molecule: public gcu::Molecule +{ +public: +/*! +The default constructor. Builds a new empty molecule. +*/ + Molecule (gcu::TypeId Type = gcu::MoleculeType); +/*! +@param pAtom an atom. + +Constructs a new molecule containing \a pAtom and all atoms which might be +bonded to it, and the corresponding bonds. +*/ + Molecule (Atom* pAtom); +/*! +The destructor. +*/ + virtual ~Molecule (); +/*! +@param object the object to add to the molecule. + +Adds an object (atom, bond, or fragment) to the molecule. +*/ + void AddChild (gcu::Object* object); +/*! +@param pAtom an atom. + +Adds an atom to the molecule. +*/ + void AddAtom (gcu::Atom* pAtom); +/*! +@param pFragment an atoms group. + +Adds a fragment to the molecule. +*/ + void AddFragment (Fragment* pFragment); +/*! +@param pBond a bond. + +Adds a bond to the molecule. +*/ + void AddBond (gcu::Bond* pBond); +/*! +@param w the GtkWidget inside which the molecule will be displayed. + +Used to add a representation of the molecule in the widget. It just calls +the method for all its children. +*/ + void Add (GtkWidget* w) const; +/*! +@param pObject an atom, a bond, or a fragment in the molecule. + +Removes an atom, a bond, or a fragment from a molecule. +*/ + void Remove (gcu::Object* pObject); +/*! +@param pMolecule a molecule. +@param RemoveDuplicates whether duplicate atoms should be unififed or not. + +Adds all children from \a pMolecule in this instance, and removes one of the +atoms for each pair of duplicates (atoms with same atomic number and position) +if \a RemoveDuplicates is true. This might fail when it would end with +hypervalent atoms. On success \a pMolecule is deleted. +@return true on success, false otherwise. +*/ + bool Merge (Molecule* pMolecule, bool RemoveDuplicates = false); +/*! +@param node a pointer to the xmlNode containing the serialized molecule. + +Used to load a molecule in memory. The Mlecule instance must already exist. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param xml the xmlDoc used to save the document. + +Used to save the molecule to the xmlDoc. +@return the xmlNode containing the serialized molecule. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +Removes all children from the molecule, resulting in a empty molecule. +*/ + void Clear (); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Used to move and/or transform the molecule taking care of hydrogen atoms +positions around heteroatoms. +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +@param x the x coordinate +@param y the y coordinate +@param z the z coordinate (not used) + +@return a pointer to n atom at or near position defined by the coordinates +passed as parameters or NULL if none is found in the molecule. +*/ + Object* GetAtomAt (double x, double y, double z = 0.); +/*! +Used to retrieve the y coordinate for alignment. +@return y coordinate used for the molecule alignment. +*/ + double GetYAlign (); +/*! +@param UIManager the GtkUIManager to populate. +@param object the Object on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +This method is called to build the contextual menu for the molecule. +@return true if something is added to the UIManager, false otherwise. +*/ + bool BuildContextualMenu (GtkUIManager *UIManager, gcu::Object *object, double x, double y); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +Signals the molecule that at least one of its children changed. + +@return true to propagate the signal to the parent. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); +/*! +Opens a Ghemical window with a copy of the molecule trying to preserve the +stereochemistry as far as possible. +*/ + void ExportToGhemical (); +/*! +@param child the child used for alignment. + +Selects the child used for alignment, which might be an atom or group of atoms, +or a bond. For bonds, the center of the bonds is used, a while for the others +a call to their gcu::Object::GetYAlign() method will be used. +*/ + void SelectAlignmentItem (gcu::Object *child); +/*! +@return the id string of the child used for alignment if any, or an empty string. +*/ + std::string GetAlignmentId () {return (m_Alignment)? m_Alignment->GetId (): "";} +/*! +@param Mol the OpenBabel molecule used for export. + +Builds an OpenBabel molecule from this instance. +The new molecule is built trying to guess appropriate z coordinates so that +stereochemistry is preserved. +*/ + void BuildOBMol (OpenBabel::OBMol &Mol); +/*! +@param Mol the OpenBabel molecule used for export. + +Builds a 2D OpenBabel molecule from this instance. + +*/ + void BuildOBMol2D (OpenBabel::OBMol &Mol); +/*! +Builds the InChI for the molecule if necessary and opens a new StringDlg instance +displaying it. +*/ + void ShowInChI (); +/*! +Builds the InChI for the molecule. +*/ + void BuildInChI (); +/*! +Builds the SMILES representation for the molecule and opens a new StringDlg +instance displaying it. +*/ + void BuildSMILES (); +/*! +@param uri_start the first part of the URI to open. +@param uri_end the last part of the URI to open. + +Opens a web browser with an URI constructed from both arguments and the InChI +for the molecule ntercalated between \a uri_start and \a uri_end. +*/ + void ShowWebBase (char const *uri_start, char const *uri_end); +/*! +Opens GChemCalc with the formula for the molecule. Molecules with fragments +are not currently supported. +*/ + void OpenCalc (); +/*! +@param pBond a bond in the molecule. + +Checks if any other bond in the molecule crosses \a pBond, and notify both bonds +that they are crossing. +*/ + void CheckCrossings (Bond *pBond); +/*! +@return the InChI. The returned string should not be freed (it's a const char*). +Molecules with fragments are not currently supported. +*/ + char const *GetInChI (); +/*! +@return the raw formula as a string. Molecules with fragments +are not currently supported. +*/ + std::string GetRawFormula () const; +/*! +Updates all cycles after loading. +*/ + void OnLoaded (); +/*! +@return the number of atoms in the molecule. Atoms groups are counted for one +only, whatever their real atomic composition. +*/ + unsigned GetAtomsNumber () const; + +private: + std::list m_Fragments; + gcu::Object *m_Alignment; + std::string m_InChI; + bool m_Changed; + bool m_IsResidue; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_MOLECULE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/newfiledlg.cc gnome-chemistry-utils-0.10.9/libs/gcp/newfiledlg.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/newfiledlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/newfiledlg.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,103 @@ +// -*- C++ -*- + +/* + * GChemPaint libray + * newfiledlg.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "newfiledlg.h" +#include "application.h" +#include "theme.h" + +using namespace gcu; +using namespace std; + +namespace gcp { + +static void on_theme_changed (GtkComboBox *box, NewFileDlg *dlg) +{ + dlg->SetTheme (TheThemeManager.GetTheme (gtk_combo_box_get_active_text (box))); +} + +NewFileDlg::NewFileDlg (Application *App): + Dialog (App, GLADEDIR"/newfiledlg.glade", "newfile", App), + Object () +{ + if (!xml) { + delete this; + return; + } + list names = TheThemeManager.GetThemesNames (); + list ::iterator i = names.begin (), end = names.end (); + GtkWidget *w = glade_xml_get_widget (xml, "themes-box"); + m_Box = GTK_COMBO_BOX (gtk_combo_box_new_text ()); + gtk_box_pack_start (GTK_BOX (w), GTK_WIDGET (m_Box), true, true, 0); + Theme *theme; + m_Theme = TheThemeManager.GetTheme (*i); + m_Lines = names.size (); + for (; i != end; i++) { + gtk_combo_box_append_text (m_Box, (*i).c_str ()); + theme = TheThemeManager.GetTheme (*i); + if (theme) + theme->AddClient (this); + } + gtk_combo_box_set_active (m_Box, 0); + m_ChangedSignal = g_signal_connect (G_OBJECT (m_Box), "changed", G_CALLBACK (on_theme_changed), this); + gtk_widget_show_all (GTK_WIDGET (dialog)); +} + +NewFileDlg::~NewFileDlg () +{ + list names = TheThemeManager.GetThemesNames (); + list ::iterator i, end = names.end (); + Theme *theme; + for (i = names.begin (); i != end; i++) { + theme = TheThemeManager.GetTheme (*i); + if (theme) + theme->RemoveClient (this); + } +} + +bool NewFileDlg::Apply () +{ + dynamic_cast (m_App)->OnFileNew (gtk_combo_box_get_active_text (m_Box)); + return true; +} + +void NewFileDlg::OnThemeNamesChanged () +{ + list names = TheThemeManager.GetThemesNames (); + list ::iterator i, end = names.end (); + int n, nb = gtk_combo_box_get_active (m_Box); + g_signal_handler_block (m_Box, m_ChangedSignal); + while (m_Lines--) + gtk_combo_box_remove_text (m_Box, 0); + for (i = names.begin (), n = 0; i != end; i++, n++) { + gtk_combo_box_append_text (m_Box, (*i).c_str ()); + if (m_Theme == TheThemeManager.GetTheme (*i)) + nb = n; + } + m_Lines = names.size (); + gtk_combo_box_set_active (m_Box, nb); + g_signal_handler_unblock (m_Box, m_ChangedSignal); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/newfiledlg.h gnome-chemistry-utils-0.10.9/libs/gcp/newfiledlg.h --- gnome-chemistry-utils-0.8.6/libs/gcp/newfiledlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/newfiledlg.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,85 @@ +// -*- C++ -*- + +/* + * GChemPaint libray + * newfiledlg.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_NEW_FILE_DLG_H +#define GCHEMPAINT_NEW_FILE_DLG_H + +#include +#include +#include + +/*!file*/ +namespace gcp { + +class Application; +class Theme; + +/*!\class NewFileDlg gcp/newfiledlg.h +The dialog class for creating new files with a given theme.*/ +class NewFileDlg: public gcu::Dialog, gcu::Object +{ +public: +/*! +@param App the application which will own the new file. +*/ + NewFileDlg (Application *App); +/*! +The destructor. +*/ + virtual ~NewFileDlg (); + +/*! +Called by the framework when the user validates its choice, and creates +the new file. +*/ + bool Apply (); +/*! +Called by the framework when the theme names have changed, which might +happen if the user edits the preference when this dialog is opened. +*/ + void OnThemeNamesChanged (); + +private: + GtkComboBox *m_Box; + unsigned m_Lines; + gulong m_ChangedSignal; + +/*!\fn SetTheme(Theme* theme) +@param theme the newly selected theme. + +Sets the selected theme when the selection in the list has changed. This +method should not be called from elsewhere. +*/ +/*!\fn GetTheme() +@return the currently selected theme. +*/ +/*!\fn GetRefTheme() +@return the currently selected theme as a reference. +*/ +GCU_PROP (Theme*, Theme) +}; + +} // namespace gcp + +#endif // GCHEMPAINT_NEW_FILE_DLG_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/operation.cc gnome-chemistry-utils-0.10.9/libs/gcp/operation.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/operation.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/operation.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,152 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * operation.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "operation.h" +#include "document.h" +#include + +using namespace gcu; + +namespace gcp { + +xmlDocPtr pXmlDoc = xmlNewDoc ((const xmlChar*) "1.0"); // Needed to create xmlNodes + +Operation::Operation (gcp::Document* pDoc, unsigned long ID): + m_pDoc (pDoc), + m_ID (ID) +{ +} + +Operation::~Operation () +{ + if (m_Nodes) + delete[] m_Nodes; +} + +void Operation::Add (unsigned type) +{ + m_pDoc->LoadObjects (m_Nodes[type]); +} + +void Operation::Delete (unsigned type) +{ + xmlNodePtr node = m_Nodes[type]->children; + char* Id; + while (node) { + Id = (strcmp ((const char*) node->name, "object"))? + (char*) xmlGetProp (node, (xmlChar*) "id"): + (char*) xmlGetProp (node->children, (xmlChar*) "id"); + m_pDoc->Remove (Id); + xmlFree (Id); + node = node->next; + } +} + +void Operation::AddObject (Object* pObject, unsigned type) +{ + xmlNodePtr node = pObject->Save (pXmlDoc); + if (node) + xmlAddChild (m_Nodes[type], node); +} + +void Operation::AddNode (xmlNodePtr node, unsigned type) +{ + if (node) xmlAddChild(m_Nodes[type], node); +} + + AddOperation:: AddOperation (gcp::Document* pDoc, unsigned long ID): Operation(pDoc, ID) +{ + m_Nodes = new xmlNodePtr[1]; + *m_Nodes = xmlNewDocNode (pXmlDoc, NULL, (const xmlChar*) "add", NULL); +} + + AddOperation::~ AddOperation () +{ + if (*m_Nodes) + xmlFreeNode (*m_Nodes); +} + +void AddOperation::Undo () +{ + Delete (); +} + +void AddOperation::Redo () +{ + Add (); +} + +DeleteOperation::DeleteOperation (gcp::Document* pDoc, unsigned long ID): Operation (pDoc, ID) +{ + m_Nodes = new xmlNodePtr[1]; + *m_Nodes = xmlNewDocNode (pXmlDoc, NULL, (const xmlChar*) "delete", NULL); +} + +DeleteOperation::~DeleteOperation () +{ + if (*m_Nodes) + xmlFreeNode (*m_Nodes); +} + +void DeleteOperation::Undo () +{ + Add (); +} + +void DeleteOperation::Redo () +{ + Delete (); +} + +ModifyOperation::ModifyOperation (gcp::Document* pDoc, unsigned long ID): Operation (pDoc, ID) +{ + m_Nodes = new xmlNodePtr[2]; + m_Nodes[0] = xmlNewDocNode (pXmlDoc, NULL, (const xmlChar*) "before", NULL); + m_Nodes[1] = xmlNewDocNode (pXmlDoc, NULL, (const xmlChar*) "after", NULL); +} + +ModifyOperation::~ModifyOperation () +{ + if (!m_Nodes) + return; + if (m_Nodes[0]) + xmlFreeNode (m_Nodes[0]); + if (m_Nodes[1]) + xmlFreeNode (m_Nodes[1]); +} + +void ModifyOperation::Undo () +{ + Delete (1); + Add (0); +} + +void ModifyOperation::Redo () +{ + Delete (0); + Add (1); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/operation.h gnome-chemistry-utils-0.10.9/libs/gcp/operation.h --- gnome-chemistry-utils-0.8.6/libs/gcp/operation.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/operation.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,233 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * operation.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +/*!\file*/ +#ifndef GCHEMPAINT_OPERATION_H +#define GCHEMPAINT_OPERATION_H + +#include +#include + +/*!\file*/ +namespace gcp { + +class Document; + +/*!\enum OperationType gcp/operation.h +Enumeration of the different operation types See gcp::Document::GetNewOeration() +for its use. +*/ +typedef enum +{ +/*! +Object addition operation, see the AddOperation class. +*/ + GCP_ADD_OPERATION, +/*! +Object deletion operation, see the DeleteOperation class. +*/ + GCP_DELETE_OPERATION, +/*! +Object modification operation, see the ModifyOperation class. +*/ + GCP_MODIFY_OPERATION, +} OperationType; + +/*!\class Operation gcp/operation.h +Base operation class for the Undo/Redo framework. +This class is virtual since some methods are pure virtual. +*/ +class Operation +{ +public: +/*! +@param pDoc a document. +@param ID a unique operation ID for the document and the session. + +Creates a new operation. Operations should always created by calls to +Document::GetNewOperation(). +*/ + Operation (Document *pDoc, unsigned long ID); + virtual ~Operation (); + +/*! +Undo the changes represented by this operation. +*/ + virtual void Undo () = 0; +/*! +Redo the changes represented by this operation. +*/ + virtual void Redo () = 0; +/*! +@param pObject an Object affected by the changes. +@param type a number indicationg the role of the stored objects. + +The \a type argument is only significant for the gcp::ModifyOperation class +where 0 represent the state of the objects before the operation, and 1 the +state of the objects after the operation. + +Adds an object to the operation. +Typically, modifying an object whould need code like: +\code + Object *obj; + // Initialize the object pointer so that it points to a valid object + ... + Document *doc = obj->GetDocument (); + Operation *op = doc->GetNewOperation (GCP_MODIFY_OPERATION); + op->AddObject (obj, 0); + // Modify the object + ... + op->AddObject (obj, 1); + doc->FinishOperation (); +\endcode +*/ + virtual void AddObject (gcu::Object* pObject, unsigned type = 0); +/*! +@param node an xml node related to the changes. +@param type a number indicationg the role of the stored objects. + +The \a type argument is only significant for the gcp::ModifyOperation class +where 0 represent the state of the objects before the operation, and 1 the +state of the objects after the operation. + +Adds the node to the document owning the operation. This might be used when +Objects are not available such as when editing text. +*/ + virtual void AddNode (xmlNodePtr node, unsigned type = 0); + +protected: +/*! +@param type a number indicationg the role of the stored objects. + +The \a type argument is only significant for the gcp::ModifyOperation class +where 0 represent the state of the objects before the operation, and 1 the +state of the objects after the operation. + +Adds the stored objects to the document owning the operation. +*/ + void Add (unsigned type = 0); +/*! +@param type a number indicationg the role of the stored objects. + +The \a type argument is only significant for the gcp::ModifyOperation class +where 0 represent the state of the objects before the operation, and 1 the +state of the objects after the operation. + +Deletes the stored objects to the document owning the operation. +*/ + void Delete (unsigned type = 0); + +protected: +/*! +The xml nodes storing the changes. +*/ + xmlNodePtr* m_Nodes; + +private: + gcp::Document* m_pDoc; + +GCU_RO_PROP (unsigned long, ID); +}; + +/*!\class AddOperation gcp/operation.h +Operation class representing objects additions. +*/ +class AddOperation: public Operation +{ +public: +/*! +@param pDoc a document. +@param ID a unique operation ID for the document and the session. + +Creates a new AddOperation. Operations should always created by calls to +Document::GetNewOperation(). +*/ + AddOperation (gcp::Document *pDoc, unsigned long ID); + virtual ~AddOperation (); + +/*! +Undo the additions represented by this operation. +*/ + void Undo (); +/*! +Redo the additions represented by this operation. +*/ + void Redo (); +}; + +/*!\class DeleteOperation gcp/operation.h +Operation class representing objects deletions. +*/ +class DeleteOperation: public Operation +{ +public: +/*! +@param pDoc a document. +@param ID a unique operation ID for the document and the session. + +Creates a new DeleteOperation. Operations should always created by calls to +Document::GetNewOperation(). +*/ + DeleteOperation (gcp::Document *pDoc, unsigned long ID); + virtual ~DeleteOperation (); + +/*! +Undo the deletions represented by this operation. +*/ + void Undo (); +/*! +Redo the deletions represented by this operation. +*/ + void Redo (); +}; + +/*!\class ModifyOperation gcp/operation.h +Operation class representing objects modifications. +*/ +class ModifyOperation: public Operation +{ +public: +/*! +@param pDoc a document. +@param ID a unique operation ID for the document and the session. + +Creates a new ModifyOperation. Operations should always created by calls to +Document::GetNewOperation(). +*/ + ModifyOperation (gcp::Document *pDoc, unsigned long ID); + virtual ~ModifyOperation (); + +/*! +Undo the modifications represented by this operation. +*/ + void Undo (); +/*! +Redo the modifications represented by this operation. +*/ + void Redo (); +}; + +} // namespace gcp + +#endif //GCHEMPAINT_OPERATION_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/plugin.cc gnome-chemistry-utils-0.10.9/libs/gcp/plugin.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/plugin.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,69 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * plugin.cc + * + * Copyright (C) 2004 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include "application.h" +#include +#include +#include + +using namespace std; + +namespace gcp { + +set Plugins; + +Plugin::Plugin () +{ + Plugins.insert (this); +} + +Plugin::~Plugin () +{ +} + +void Plugin::LoadPlugins () +{ + GDir* dir = g_dir_open (PLUGINSDIR, 0, NULL); + if (dir == NULL) + return; + const char* name; + while ((name = g_dir_read_name (dir))) { + if ((strcmp (name + strlen (name) - 3, ".so"))) + continue; + name = g_strconcat (PLUGINSDIR"/", name, NULL); + if (!dlopen (name, RTLD_NOW)) + puts (dlerror()); + g_free ((void*) name); + } + g_dir_close (dir); + set::iterator i = Plugins.begin (), end = Plugins.end (); +} + +void Plugin::Populate (Application* App) +{ +} + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/plugin.h gnome-chemistry-utils-0.10.9/libs/gcp/plugin.h --- gnome-chemistry-utils-0.8.6/libs/gcp/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/plugin.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,77 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_PLUGIN +#define GCHEMPAINT_PLUGIN + +#include + +/*!\file*/ + +namespace gcp { + +class Application; + +/*!\class Plugin gcp/plugin.h +\brief Class for GChemPaint plugins. + +Every plugin should implement a new Plugin class derived from this one and +create a unique static instance of the new class. The base class constructor +will register the plugin. +Such plugins are loaded on program startup. +*/ +class Plugin +{ +public: +/*! +The default constructor. Adds the new plugin to gcp::Plugins. +*/ + Plugin (); +/*! +The destructor. +*/ + virtual ~Plugin (); + +/*! +Loads plugins from the GChemPaint plugin directory stored in the PLUGINSDIR +variable. +*/ + static void LoadPlugins (); +/*! +@param App the GChemPaint application. + +Called by the framework so that the plugin can add new UI elements to the +application. +*/ + virtual void Populate (Application* App); +}; + +/*!\var Plugins +The set of registered plugins. +*/ +extern std::set Plugins; + +} // namespace gcp + +#endif //GCHEMPAINT_PLUGIN diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/preferences.cc gnome-chemistry-utils-0.10.9/libs/gcp/preferences.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/preferences.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/preferences.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1735 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * preferences.cc + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "preferences.h" +#include "application.h" +#include "document.h" +#include "fontsel.h" +#include "settings.h" +#include "theme.h" +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +// PrefsDlgPrivate hides private PrefsDlg API +class PrefsDlgPrivate { +public: + static void OnNewTheme (PrefsDlg *dlg); + static void OnSelectTheme (PrefsDlg *dlg, GtkTreeSelection *selection) {dlg->OnSelectTheme (selection);} + static void OnBondLength (PrefsDlg *dlg, double length) {dlg->OnBondLength (length);} + static void OnBondAngle (PrefsDlg *dlg, double angle) {dlg->OnBondAngle (angle);} + static void OnBondWidth (PrefsDlg *dlg, double width) {dlg->OnBondWidth (width);} + static void OnBondDist (PrefsDlg *dlg, double dist) {dlg->OnBondDist (dist);} + static void OnStereoBondWidth (PrefsDlg *dlg, double width) {dlg->OnStereoBondWidth (width);} + static void OnHashWidth (PrefsDlg *dlg, double width) {dlg->OnHashWidth (width);} + static void OnHashDist (PrefsDlg *dlg, double dist) {dlg->OnHashDist (dist);} + static void OnFont (PrefsDlg *dlg, GcpFontSel *fs) {dlg->OnFont (fs);} + static void OnTextFont (PrefsDlg *dlg, GcpFontSel *fs) {dlg->OnTextFont (fs);} + static void OnArrowLength (PrefsDlg *dlg, double length) {dlg->OnArrowLength (length);} + static void OnArrowWidth (PrefsDlg *dlg, double width) {dlg->OnArrowWidth (width);} + static void OnArrowDist (PrefsDlg *dlg, double dist) {dlg->OnArrowDist (dist);} + static void OnArrowPadding (PrefsDlg *dlg, double padding) {dlg->OnArrowPadding (padding);} + static void OnArrowHeadA (PrefsDlg *dlg, double headA) {dlg->OnArrowHeadA (headA);} + static void OnArrowHeadB (PrefsDlg *dlg, double headB) {dlg->OnArrowHeadB (headB);} + static void OnArrowHeadC (PrefsDlg *dlg, double headC) {dlg->OnArrowHeadC (headC);} + static void OnScale (PrefsDlg *dlg, double scale) {dlg->OnScale (scale);} + static void OnPadding (PrefsDlg *dlg, double padding) {dlg->OnPadding (padding);} + static void OnObjectPadding (PrefsDlg *dlg, double padding) {dlg->OnObjectPadding (padding);} + static void OnStoichPadding (PrefsDlg *dlg, double padding) {dlg->OnStoichPadding (padding);} + static void OnSignPadding (PrefsDlg *dlg, double padding) {dlg->OnSignPadding (padding);} + static void OnChargeSize (PrefsDlg *dlg, double size) {dlg->OnChargeSize (size);} + static void OnThemeNameChanged (PrefsDlg *dlg, char const *name) {dlg->OnThemeNameChanged (name);} + static bool CheckError (PrefsDlg *dlg) {return dlg->CheckError ();} + static void SetDefaultTheme (PrefsDlg *dlg, char const *name) {dlg->SetDefaultTheme (name);} +}; + +static int get_fontstyle (PangoStyle val) +{ + switch (val) { + case PANGO_STYLE_NORMAL: return 0; + case PANGO_STYLE_OBLIQUE: return 1; + case PANGO_STYLE_ITALIC: return 2; + default: return 0; + } +} + +static int get_fontweight (PangoWeight val) +{ + switch (val) { + case PANGO_WEIGHT_ULTRALIGHT: return 2; + case PANGO_WEIGHT_LIGHT: return 3; + case PANGO_WEIGHT_NORMAL: return 4; + case PANGO_WEIGHT_SEMIBOLD: return 6; + case PANGO_WEIGHT_BOLD: return 7; + case PANGO_WEIGHT_ULTRABOLD: return 8; + case PANGO_WEIGHT_HEAVY: return 9; +#if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 24 + case PANGO_WEIGHT_THIN: return 1; + case PANGO_WEIGHT_BOOK: return 38; + case PANGO_WEIGHT_MEDIUM: return 5; + case PANGO_WEIGHT_ULTRAHEAVY: return 10; +#endif + default: return 4; + } +} + +static int get_fontvariant (PangoVariant val) +{ + switch (val) { + case PANGO_VARIANT_NORMAL: return 0; + case PANGO_VARIANT_SMALL_CAPS: return 1; + default: return 0; + } +} + +static int get_fontstretch (PangoStretch val) +{ + switch (val) { + case PANGO_STRETCH_ULTRA_CONDENSED: return 0; + case PANGO_STRETCH_EXTRA_CONDENSED: return 1; + case PANGO_STRETCH_CONDENSED: return 2; + case PANGO_STRETCH_SEMI_CONDENSED: return 3; + case PANGO_STRETCH_NORMAL: return 4; + case PANGO_STRETCH_SEMI_EXPANDED: return 5; + case PANGO_STRETCH_EXPANDED: return 6; + case PANGO_STRETCH_EXTRA_EXPANDED: return 7; + case PANGO_STRETCH_ULTRA_EXPANDED: return 8; + default: return 4; + } +} + +static double get_fontsize (double val) {return (double) val / (double) PANGO_SCALE;} + +static void on_compression_changed (GtkSpinButton *btn, Application *App) +{ + CompressionLevel = gtk_spin_button_get_value_as_int (btn); +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "compression", CompressionLevel); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"compression", CompressionLevel, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif +} + +static void on_tearable_mendeleiev_changed (GtkToggleButton *btn, Application *App) +{ + TearableMendeleiev = gtk_toggle_button_get_active (btn); +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_bool (node, "tearable-mendeleiev", TearableMendeleiev); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_bool (conf_client, ROOTDIR"tearable-mendeleiev", TearableMendeleiev, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif +} + +static void on_new_theme (PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnNewTheme (dlg); +} + +static void on_select_theme (GtkTreeSelection *selection, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnSelectTheme (dlg, selection); +} + +static void on_bond_length_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnBondLength (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_bond_angle_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnBondAngle (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_bond_width_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnBondWidth (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_bond_dist_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnBondDist (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_stereo_bond_width_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnStereoBondWidth (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_hash_width_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnHashWidth (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_hash_dist_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnHashDist (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_text_font_changed (GcpFontSel *fc, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnTextFont (dlg, fc); +} + +static void on_font_changed (GcpFontSel *fc, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnFont (dlg, fc); +} + +static void on_arrow_length_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnArrowLength (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_arrow_width_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnArrowWidth (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_arrow_dist_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnArrowDist (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_arrow_padding_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnArrowPadding (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_arrow_headA_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnArrowHeadA (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_arrow_headB_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnArrowHeadB (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_arrow_headC_changed (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnArrowHeadC (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_scale (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnScale (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_padding (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnPadding (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_object_padding (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnObjectPadding (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_stoich_padding(GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnStoichPadding (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_sign_padding (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnSignPadding (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_charge_size (GtkSpinButton *btn, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnChargeSize (dlg, gtk_spin_button_get_value (btn)); +} + +static void on_name_changed (GtkEntry *entry, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnThemeNameChanged (dlg, gtk_entry_get_text (entry)); +} + +static bool on_name_focused_out (GtkEntry *entry, GdkEventFocus *event, PrefsDlg *dlg) +{ + PrefsDlgPrivate::OnThemeNameChanged (dlg, gtk_entry_get_text (entry)); + return false; +} + +static bool on_delete_event (GtkWidget* widget, GdkEvent *event, PrefsDlg* dlg) +{ + bool res = PrefsDlgPrivate::CheckError (dlg); + if (res) { + GtkWidget* box = gtk_message_dialog_new (GTK_WINDOW (widget), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Invalid name"); + g_signal_connect (G_OBJECT (box), "response", G_CALLBACK (gtk_widget_destroy), NULL); + gtk_widget_show_all (box); + } + return res; +} + +static void on_default_theme_changed (GtkComboBox *box, PrefsDlg* dlg) +{ + PrefsDlgPrivate::SetDefaultTheme (dlg, gtk_combo_box_get_active_text (box)); +} + +PrefsDlg::PrefsDlg (Application *pApp): + Dialog (pApp, GLADEDIR"/preferences.glade", "preferences", pApp), + Object (), + m_CurTheme (NULL), + m_Path (NULL) +{ + if (!xml) { + delete this; + return; + } + g_signal_connect (G_OBJECT (dialog), "delete-event", G_CALLBACK (on_delete_event), this); + // compression level + GtkWidget *w = glade_xml_get_widget (xml, "compression"); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), CompressionLevel); + g_signal_connect (G_OBJECT (w), "value-changed", G_CALLBACK (on_compression_changed), pApp); + // tearable table of the elements + w = glade_xml_get_widget (xml, "tearable-mendeleiev-btn"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TearableMendeleiev); + g_signal_connect (G_OBJECT (w), "toggled", G_CALLBACK (on_tearable_mendeleiev_changed), pApp); + // retrieve theme widgets and set signals + m_BondLengthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-length-btn")); + g_signal_connect (G_OBJECT (m_BondLengthBtn), "value-changed", G_CALLBACK (on_bond_length_changed), this); + m_BondAngleBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-angle-btn")); + g_signal_connect (G_OBJECT (m_BondAngleBtn), "value-changed", G_CALLBACK (on_bond_angle_changed), this); + m_BondWidthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-width-btn")); + g_signal_connect (G_OBJECT (m_BondWidthBtn), "value-changed", G_CALLBACK (on_bond_width_changed), this); + m_BondDistBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-dist-btn")); + g_signal_connect (G_OBJECT (m_BondDistBtn), "value-changed", G_CALLBACK (on_bond_dist_changed), this); + m_StereoBondWidthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "stereo-width-btn")); + g_signal_connect (G_OBJECT (m_StereoBondWidthBtn), "value-changed", G_CALLBACK (on_stereo_bond_width_changed), this); + m_HashWidthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "hash-width-btn")); + g_signal_connect (G_OBJECT (m_HashWidthBtn), "value-changed", G_CALLBACK (on_hash_width_changed), this); + m_HashDistBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "hash-dist-btn")); + g_signal_connect (G_OBJECT (m_HashDistBtn), "value-changed", G_CALLBACK (on_hash_dist_changed), this); + // add font selector + m_FontSel = GCP_FONT_SEL (g_object_new (GCP_FONT_SEL_TYPE, NULL)); + w = glade_xml_get_widget (xml, "atom-font-box"); + gtk_box_pack_start_defaults (GTK_BOX (w), GTK_WIDGET (m_FontSel)); + m_FontChanged = g_signal_connect (G_OBJECT (m_FontSel), "changed", G_CALLBACK (on_font_changed), this); + // add text font selector + m_TextFontSel = GCP_FONT_SEL (g_object_new (GCP_FONT_SEL_TYPE, NULL)); + w = glade_xml_get_widget (xml, "text-box"); + gtk_box_pack_start_defaults (GTK_BOX (w), GTK_WIDGET (m_TextFontSel)); + m_TextFontChanged = g_signal_connect (G_OBJECT (m_TextFontSel), "changed", G_CALLBACK (on_text_font_changed), this); + // arrow spin buttons + m_ArrowLengthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-length-btn")); + g_signal_connect (G_OBJECT (m_ArrowLengthBtn), "value-changed", G_CALLBACK (on_arrow_length_changed), this); + m_ArrowWidthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-width-btn")); + g_signal_connect (G_OBJECT (m_ArrowWidthBtn), "value-changed", G_CALLBACK (on_arrow_width_changed), this); + m_ArrowDistBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-dist-btn")); + g_signal_connect (G_OBJECT (m_ArrowDistBtn), "value-changed", G_CALLBACK (on_arrow_dist_changed), this); + m_ArrowPaddingBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-padding-btn")); + g_signal_connect (G_OBJECT (m_ArrowPaddingBtn), "value-changed", G_CALLBACK (on_arrow_padding_changed), this); + m_ArrowHeadABtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-headA-btn")); + g_signal_connect (G_OBJECT (m_ArrowHeadABtn), "value-changed", G_CALLBACK (on_arrow_headA_changed), this); + m_ArrowHeadBBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-headB-btn")); + g_signal_connect (G_OBJECT (m_ArrowHeadBBtn), "value-changed", G_CALLBACK (on_arrow_headB_changed), this); + m_ArrowHeadCBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-headC-btn")); + g_signal_connect (G_OBJECT (m_ArrowHeadCBtn), "value-changed", G_CALLBACK (on_arrow_headC_changed), this); + m_ScaleBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "scale-btn")); + g_signal_connect (G_OBJECT (m_ScaleBtn), "value-changed", G_CALLBACK (on_scale), this); + m_PaddingBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "padding-btn")); + g_signal_connect (G_OBJECT (m_PaddingBtn), "value-changed", G_CALLBACK (on_padding), this); + m_ObjectPaddingBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "object-padding-btn")); + g_signal_connect (G_OBJECT (m_ObjectPaddingBtn), "value-changed", G_CALLBACK (on_object_padding), this); + m_StoichPaddingBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "stoich-padding-btn")); + g_signal_connect (G_OBJECT (m_StoichPaddingBtn), "value-changed", G_CALLBACK (on_stoich_padding), this); + m_SignPaddingBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "sign-padding-btn")); + g_signal_connect (G_OBJECT (m_SignPaddingBtn), "value-changed", G_CALLBACK (on_sign_padding), this); + m_ChargeSizeBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "charge-size-btn")); + g_signal_connect (G_OBJECT (m_ChargeSizeBtn), "value-changed", G_CALLBACK (on_charge_size), this); + m_NameEntry = GTK_ENTRY (glade_xml_get_widget (xml, "name")); + gtk_entry_set_text (m_NameEntry, _("Default")); + m_NameActivate = g_signal_connect (G_OBJECT (m_NameEntry), "activate", G_CALLBACK (on_name_changed), this); + m_NameFocusOut = g_signal_connect (G_OBJECT (m_NameEntry), "focus-out-event", G_CALLBACK (on_name_focused_out), this); + // get notebook + m_Book = GTK_NOTEBOOK (glade_xml_get_widget (xml, "theme-book")); + // create themes list and select active document theme + m_ThemesView = GTK_TREE_VIEW (glade_xml_get_widget (xml, "themes")); + themes = gtk_tree_store_new (1, G_TYPE_STRING); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (themes), 0, GTK_SORT_ASCENDING); + gtk_tree_view_set_model (m_ThemesView, GTK_TREE_MODEL (themes)); + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes (NULL, renderer, "text", 0, NULL); + gtk_tree_view_append_column (m_ThemesView, column); + m_ThemesSelection = gtk_tree_view_get_selection (m_ThemesView); + list theme_names = TheThemeManager.GetThemesNames (); + list::iterator i, iend = theme_names.end (); + GtkTreeIter iter, selected, child, grand_child; + string default_name = pApp->GetActiveDocument ()->GetTheme ()->GetName (); + if (default_name == "Default") + default_name = _("Default"); + Theme *theme, *default_theme = TheThemeManager.GetDefaultTheme (); + m_DefaultThemeBox = GTK_COMBO_BOX (gtk_combo_box_new_text ()); + gtk_table_attach (GTK_TABLE (glade_xml_get_widget (xml, "table1")), GTK_WIDGET (m_DefaultThemeBox), 1, 3, 2, 3, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + int n = 0; + for (i = theme_names.begin (); i != iend; i++) { + theme = TheThemeManager.GetTheme (*i); + gtk_combo_box_append_text (m_DefaultThemeBox, (*i).c_str ()); + if (theme == default_theme) + gtk_combo_box_set_active (m_DefaultThemeBox, n); + n++; + if (theme) + theme->AddClient (this); + gtk_tree_store_append (themes, &iter, NULL); + gtk_tree_store_set (themes, &iter, + 0, (*i).c_str (), + -1); + gtk_tree_store_append (themes, &child, &iter); + gtk_tree_store_set (themes, &child, + 0, _("General"), + -1); + if (*i == default_name) + selected = child; + gtk_tree_store_append (themes, &child, &iter); + gtk_tree_store_set (themes, &child, + 0, _("Atoms"), + -1); + gtk_tree_store_append (themes, &grand_child, &child); + gtk_tree_store_set (themes, &grand_child, + 0, _("Font"), + -1); + gtk_tree_store_append (themes, &grand_child, &child); + gtk_tree_store_set (themes, &grand_child, + 0, _("Other"), + -1); + gtk_tree_store_append (themes, &child, &iter); + gtk_tree_store_set (themes, &child, + 0, _("Bonds"), + -1); + gtk_tree_store_append (themes, &child, &iter); + gtk_tree_store_set (themes, &child, + 0, _("Arrows"), + -1); + gtk_tree_store_append (themes, &child, &iter); + gtk_tree_store_set (themes, &child, + 0, _("Text"), + -1); + } + g_signal_connect (m_DefaultThemeBox,"changed", G_CALLBACK (on_default_theme_changed), this); + m_Path = gtk_tree_model_get_path (GTK_TREE_MODEL (themes), &selected); + gtk_tree_selection_set_mode (m_ThemesSelection, GTK_SELECTION_BROWSE); + g_signal_connect (m_ThemesSelection, "changed", G_CALLBACK (on_select_theme), this); + if (m_Path) { + gtk_tree_view_expand_to_path (m_ThemesView, m_Path); + gtk_tree_selection_select_path (m_ThemesSelection, m_Path); + gtk_tree_view_scroll_to_cell (m_ThemesView, m_Path, column, FALSE, 0., 0.); + } + + // add event handler to new theme button + g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (xml, "new-theme")), "clicked", G_CALLBACK (on_new_theme), this); + gtk_widget_show_all (GTK_WIDGET (dialog)); +} + +PrefsDlg::~PrefsDlg () +{ + list names = TheThemeManager.GetThemesNames (); + list ::iterator i, end = names.end (); + Theme *theme; + for (i = names.begin (); i != end; i++) { + theme = TheThemeManager.GetTheme (*i); + if (theme) + theme->RemoveClient (this); + } + if (m_Path) + gtk_tree_path_free (m_Path); +} + +void PrefsDlgPrivate::OnNewTheme (PrefsDlg *dlg) +{ + Theme *pTheme = TheThemeManager.CreateNewTheme (dlg->m_CurTheme); + string &name = pTheme->GetName (); + GtkTreeIter iter, child, grand_child; + gtk_tree_store_append (dlg->themes, &iter, NULL); + gtk_tree_store_set (dlg->themes, &iter, + 0, name.c_str (), + -1); + gtk_tree_store_append (dlg->themes, &child, &iter); + gtk_tree_store_set (dlg->themes, &child, + 0, _("General"), + -1); + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (dlg->themes), &child); + if (path) { + gtk_tree_view_expand_to_path (dlg->m_ThemesView, path); + gtk_tree_selection_select_path (dlg->m_ThemesSelection, path); + gtk_tree_view_scroll_to_cell (dlg->m_ThemesView, path, 0, FALSE, 0., 0.); + gtk_tree_path_free (path); + } + gtk_tree_store_append (dlg->themes, &child, &iter); + gtk_tree_store_set (dlg->themes, &child, + 0, _("Atoms"), + -1); + gtk_tree_store_append (dlg->themes, &grand_child, &child); + gtk_tree_store_set (dlg->themes, &grand_child, + 0, _("Font"), + -1); + gtk_tree_store_append (dlg->themes, &grand_child, &child); + gtk_tree_store_set (dlg->themes, &grand_child, + 0, _("Other"), + -1); + gtk_tree_store_append (dlg->themes, &child, &iter); + gtk_tree_store_set (dlg->themes, &child, + 0, _("Bonds"), + -1); + gtk_tree_store_append (dlg->themes, &child, &iter); + gtk_tree_store_set (dlg->themes, &child, + 0, _("Arrows"), + -1); + gtk_tree_store_append (dlg->themes, &child, &iter); + gtk_tree_store_set (dlg->themes, &child, + 0, _("Text"), + -1); + dynamic_cast (dlg->m_App)->OnThemeNamesChanged (); +} + +void PrefsDlg::OnSelectTheme (GtkTreeSelection *selection) +{ + char const *Name = gtk_entry_get_text (m_NameEntry); + if (!strcmp (Name, _("Default"))) + Name = "Default"; + if (m_CurTheme && Name != m_CurTheme->m_Name) + OnThemeNameChanged (Name); + if (!*Name) { + gtk_tree_selection_select_path (selection, m_Path); + return; + } + // we must fill the theme widgets with the corresponding data + GtkTreeIter iter, parent; + char *name; + char *page; + GtkTreeModel *model; + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) { + gtk_notebook_set_current_page (m_Book, 0); + return; + } + if (m_Path) + gtk_tree_path_free (m_Path); + m_Path = gtk_tree_model_get_path (GTK_TREE_MODEL (themes), &iter); + if (gtk_tree_model_iter_parent (model, &parent, &iter)) { + gtk_tree_model_get (model, &parent, 0, &name, -1); + if (!strcmp (name, _("Atoms"))) { + GtkTreeIter grand_parent; + gtk_tree_model_iter_parent (model, &grand_parent, &parent); + gtk_tree_model_get (model, &grand_parent, 0, &name, -1); + } + gtk_tree_model_get (model, &iter, 0, &page, -1); + if (!strcmp (page, _("General"))) + gtk_notebook_set_current_page (m_Book, 1); + else if (!strcmp (page, _("Font"))) + gtk_notebook_set_current_page (m_Book, 2); + else if (!strcmp (page, _("Other"))) + gtk_notebook_set_current_page (m_Book, 6); + else if (!strcmp (page, _("Bonds"))) + gtk_notebook_set_current_page (m_Book, 3); + else if (!strcmp (page, _("Arrows"))) + gtk_notebook_set_current_page (m_Book, 4); + else if (!strcmp (page, _("Text"))) + gtk_notebook_set_current_page (m_Book, 5); + else + gtk_notebook_set_current_page (m_Book, 0); + } else { + gtk_tree_model_get (model, &iter, 0, &name, -1); + gtk_notebook_set_current_page (m_Book, 0); + } + m_CurTheme = TheThemeManager.GetTheme (name); + bool rw = m_CurTheme->m_ThemeType != GLOBAL_THEME_TYPE; + gtk_spin_button_set_value (m_BondLengthBtn, m_CurTheme->m_BondLength); + gtk_widget_set_sensitive (GTK_WIDGET (m_BondLengthBtn), rw); + gtk_spin_button_set_value (m_BondAngleBtn, m_CurTheme->m_BondAngle); + gtk_widget_set_sensitive (GTK_WIDGET (m_BondAngleBtn), rw); + gtk_spin_button_set_value (m_BondWidthBtn, m_CurTheme->m_BondWidth); + gtk_widget_set_sensitive (GTK_WIDGET (m_BondWidthBtn), rw); + gtk_spin_button_set_value (m_BondDistBtn, m_CurTheme->m_BondDist); + gtk_widget_set_sensitive (GTK_WIDGET (m_BondDistBtn), rw); + gtk_spin_button_set_value (m_StereoBondWidthBtn, m_CurTheme->m_StereoBondWidth); + gtk_widget_set_sensitive (GTK_WIDGET (m_StereoBondWidthBtn), rw); + gtk_spin_button_set_value (m_HashWidthBtn, m_CurTheme->m_HashWidth); + gtk_widget_set_sensitive (GTK_WIDGET (m_HashWidthBtn), rw); + gtk_spin_button_set_value (m_HashDistBtn, m_CurTheme->m_HashDist); + gtk_widget_set_sensitive (GTK_WIDGET (m_HashDistBtn), rw); + g_signal_handler_block (G_OBJECT (m_TextFontSel), m_TextFontChanged); + g_object_set (G_OBJECT (m_TextFontSel), + "family", m_CurTheme->m_TextFontFamily, + "style", m_CurTheme->m_TextFontStyle, + "weight", m_CurTheme->m_TextFontWeight, + "variant", m_CurTheme->m_TextFontVariant, + "stretch", m_CurTheme->m_TextFontStretch, + "size", m_CurTheme->m_TextFontSize, + NULL); + g_signal_handler_unblock (G_OBJECT (m_TextFontSel), m_TextFontChanged); + gtk_widget_set_sensitive (GTK_WIDGET (m_TextFontSel), rw); + g_signal_handler_block (G_OBJECT (m_FontSel), m_FontChanged); + g_object_set (G_OBJECT (m_FontSel), + "family", m_CurTheme->m_FontFamily, + "style", m_CurTheme->m_FontStyle, + "weight", m_CurTheme->m_FontWeight, + "variant", m_CurTheme->m_FontVariant, + "stretch", m_CurTheme->m_FontStretch, + "size", m_CurTheme->m_FontSize, + NULL); + g_signal_handler_unblock (G_OBJECT (m_FontSel), m_FontChanged); + gtk_widget_set_sensitive (GTK_WIDGET (m_FontSel), rw); + gtk_spin_button_set_value (m_ArrowLengthBtn, m_CurTheme->m_ArrowLength); + gtk_widget_set_sensitive (GTK_WIDGET (m_ArrowLengthBtn), rw); + gtk_spin_button_set_value (m_ArrowWidthBtn, m_CurTheme->m_ArrowWidth); + gtk_widget_set_sensitive (GTK_WIDGET (m_ArrowWidthBtn), rw); + gtk_spin_button_set_value (m_ArrowDistBtn, m_CurTheme->m_ArrowDist); + gtk_widget_set_sensitive (GTK_WIDGET (m_ArrowDistBtn), rw); + gtk_spin_button_set_value (m_ArrowPaddingBtn, m_CurTheme->m_ArrowPadding); + gtk_widget_set_sensitive (GTK_WIDGET (m_ArrowPaddingBtn), rw); + gtk_spin_button_set_value (m_ArrowHeadABtn, m_CurTheme->m_ArrowHeadA); + gtk_widget_set_sensitive (GTK_WIDGET (m_ArrowHeadABtn), rw); + gtk_spin_button_set_value (m_ArrowHeadBBtn, m_CurTheme->m_ArrowHeadB); + gtk_widget_set_sensitive (GTK_WIDGET (m_ArrowHeadBBtn), rw); + gtk_spin_button_set_value (m_ArrowHeadCBtn, m_CurTheme->m_ArrowHeadC); + gtk_widget_set_sensitive (GTK_WIDGET (m_ArrowHeadCBtn), rw); + gtk_spin_button_set_value (m_ScaleBtn, 1. / m_CurTheme->m_ZoomFactor); + gtk_widget_set_sensitive (GTK_WIDGET (m_ScaleBtn), rw); + gtk_spin_button_set_value (m_PaddingBtn, m_CurTheme->m_Padding); + gtk_widget_set_sensitive (GTK_WIDGET (m_PaddingBtn), rw); + gtk_spin_button_set_value (m_ObjectPaddingBtn, m_CurTheme->m_ObjectPadding); + gtk_widget_set_sensitive (GTK_WIDGET (m_ObjectPaddingBtn), rw); + gtk_spin_button_set_value (m_StoichPaddingBtn, m_CurTheme->m_StoichiometryPadding); + gtk_widget_set_sensitive (GTK_WIDGET (m_StoichPaddingBtn), rw); + gtk_spin_button_set_value (m_SignPaddingBtn, m_CurTheme->m_SignPadding); + gtk_widget_set_sensitive (GTK_WIDGET (m_SignPaddingBtn), rw); + gtk_spin_button_set_value (m_ChargeSizeBtn, m_CurTheme->m_ChargeSignSize); + gtk_widget_set_sensitive (GTK_WIDGET (m_ChargeSizeBtn), rw); + g_signal_handler_block (m_NameEntry, m_NameActivate); + g_signal_handler_block (m_NameEntry, m_NameFocusOut); + gtk_entry_set_text (m_NameEntry, _(m_CurTheme->m_Name.c_str ())); + g_signal_handler_unblock (m_NameEntry, m_NameFocusOut); + g_signal_handler_unblock (m_NameEntry, m_NameActivate); + gtk_widget_set_sensitive (GTK_WIDGET (m_NameEntry), rw && m_CurTheme->m_ThemeType != DEFAULT_THEME_TYPE); +} + +void PrefsDlg::OnBondLength (double length) +{ + if (length != m_CurTheme->m_BondLength) { + m_CurTheme->m_BondLength = length; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "bond-length", length); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"bond-length", length, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnBondAngle (double angle) +{ + if (angle != m_CurTheme->m_BondAngle) { + m_CurTheme->m_BondAngle = angle; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "bond-angle", angle); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"bond-angle", angle, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnBondWidth (double width) +{ + if (width != m_CurTheme->m_BondWidth) { + m_CurTheme->m_BondWidth = width; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "bond-width", width); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"bond-width", width, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnBondDist (double dist) +{ + if (dist != m_CurTheme->m_BondDist) { + m_CurTheme->m_BondDist = dist; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "bond-dist", dist); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"bond-dist", dist, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnStereoBondWidth (double width) +{ + if (width != m_CurTheme->m_StereoBondWidth) { + m_CurTheme->m_StereoBondWidth = width; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "stereo-width", width); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"stereo-width", width, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnHashWidth (double width) +{ + if (width != m_CurTheme->m_HashWidth) { + m_CurTheme->m_HashWidth = width; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "hash-width", width); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"hash-width", width, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnHashDist (double dist) +{ + if (dist != m_CurTheme->m_HashDist) { + m_CurTheme->m_HashDist = dist; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "hash-dist", dist); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"hash-dist", dist, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnFont (GcpFontSel *fs) +{ + char *Name; + PangoStyle Style; + PangoWeight Weight; + PangoStretch Stretch; + PangoVariant Variant; + int Size; + bool changed = false; + g_object_get (G_OBJECT (fs), "family", &Name, "style", &Style, "weight", &Weight, "stretch", &Stretch, "variant", &Variant, "size", &Size, NULL); + + if (strcmp (m_CurTheme->m_FontFamily, Name)) { + g_free (m_CurTheme->m_FontFamily); + m_CurTheme->m_FontFamily = Name; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_string (node, "font-family", Name); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_string (conf_client, ROOTDIR"font-family", Name, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_FontStyle != Style) { + m_CurTheme->m_FontStyle = Style; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "font-style", get_fontstyle (Style)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"font-style", get_fontstyle (Style), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_FontWeight != Weight) { + m_CurTheme->m_FontWeight = Weight; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "font-weight", get_fontweight (Weight)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"font-weight", get_fontweight (Weight), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_FontStretch != Stretch) { + m_CurTheme->m_FontStretch = Stretch; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "font-stretch", get_fontstretch (Stretch)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"font-stretch", get_fontstretch (Stretch), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_FontVariant != Variant) { + m_CurTheme->m_FontVariant = Variant; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "font-variant", get_fontvariant (Variant)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"font-variant", get_fontvariant (Variant), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_FontSize != Size) { + m_CurTheme->m_FontSize = Size; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "font-size", get_fontsize (Size)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"font-size", get_fontsize (Size), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (changed) + m_CurTheme->NotifyChanged (); +} + +void PrefsDlg::OnTextFont (GcpFontSel *fs) +{ + char *Name; + PangoStyle Style; + PangoWeight Weight; + PangoStretch Stretch; + PangoVariant Variant; + int Size; + bool changed = false; + g_object_get (G_OBJECT (fs), "family", &Name, "style", &Style, "weight", &Weight, "stretch", &Stretch, "variant", &Variant, "size", &Size, NULL); + + if (strcmp (m_CurTheme->m_TextFontFamily, Name)) { + g_free (m_CurTheme->m_TextFontFamily); + m_CurTheme->m_TextFontFamily = Name; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_string (node, "text-font-family", Name); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_string (conf_client, ROOTDIR"text-font-family", Name, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_TextFontStyle != Style) { + m_CurTheme->m_TextFontStyle = Style; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "text-font-style", get_fontstyle (Style)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"text-font-style", get_fontstyle (Style), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_TextFontWeight != Weight) { + m_CurTheme->m_TextFontWeight = Weight; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "text-font-weight", get_fontweight (Weight)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"text-font-weight", get_fontweight (Weight), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_TextFontStretch != Stretch) { + m_CurTheme->m_TextFontStretch = Stretch; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "text-font-stretch", get_fontstretch (Stretch)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"text-font-stretch", get_fontstretch (Stretch), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_TextFontVariant != Variant) { + m_CurTheme->m_TextFontVariant = Variant; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_int (node, "text-font-variant", get_fontvariant (Variant)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_int (conf_client, ROOTDIR"text-font-variant", get_fontvariant (Variant), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (m_CurTheme->m_TextFontSize != Size) { + m_CurTheme->m_TextFontSize = Size; + changed = true; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "text-font-size", get_fontsize (Size)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"text-font-size", get_fontsize (Size), &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } + if (changed) + m_CurTheme->NotifyChanged (); +} + +// arrows + +void PrefsDlg::OnArrowLength (double length) +{ + if (length != m_CurTheme->m_ArrowLength) { + m_CurTheme->m_ArrowLength = length; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "arrow-length", length); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"arrow-length", length, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnArrowWidth (double width) +{ + if (width != m_CurTheme->m_ArrowWidth) { + m_CurTheme->m_ArrowWidth = width; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "arrow-width", width); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"arrow-width", width, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnArrowDist (double dist) +{ + if (dist != m_CurTheme->m_ArrowDist) { + m_CurTheme->m_ArrowDist = dist; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "arrow-dist", dist); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"arrow-dist", dist, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnArrowPadding (double padding) +{ + if (padding != m_CurTheme->m_ArrowPadding) { + m_CurTheme->m_ArrowPadding = padding; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "arrow-padding", padding); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"arrow-padding", padding, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } +} + +void PrefsDlg::OnArrowHeadA (double headA) +{ + if (headA != m_CurTheme->m_ArrowHeadA) { + m_CurTheme->m_ArrowHeadA = headA; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "arrow-headA", headA); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"arrow-headA", headA, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnArrowHeadB (double headB) +{ + if (headB != m_CurTheme->m_ArrowHeadB) { + m_CurTheme->m_ArrowHeadB = headB; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "arrow-headB", headB); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"arrow-headB", headB, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnArrowHeadC (double headC) +{ + if (headC != m_CurTheme->m_ArrowHeadC) { + m_CurTheme->m_ArrowHeadC = headC; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "arrow-headC", headC); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"arrow-headC", headC, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnScale (double scale) +{ + double zoom = 1. / scale; + if (zoom != m_CurTheme->m_ZoomFactor) { + m_CurTheme->m_ZoomFactor = zoom; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "scale", scale); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"scale", scale, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } +} + +void PrefsDlg::OnPadding (double padding) +{ + if (padding != m_CurTheme->m_Padding) { + m_CurTheme->m_Padding = padding; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "padding", padding); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"padding", padding, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } +} + +void PrefsDlg::OnObjectPadding (double padding) +{ + if (padding != m_CurTheme->m_ObjectPadding) { + m_CurTheme->m_ObjectPadding = padding; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "object-padding", padding); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"object-padding", padding, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } +} + +void PrefsDlg::OnStoichPadding (double padding) +{ + if (padding != m_CurTheme->m_StoichiometryPadding) { + m_CurTheme->m_StoichiometryPadding = padding; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "stoichiometry-padding", padding); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"stoichiometry-padding", padding, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } +} + +void PrefsDlg::OnSignPadding (double padding) +{ + if (padding != m_CurTheme->m_SignPadding) { + m_CurTheme->m_SignPadding = padding; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "sign-padding", padding); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"sign-padding", padding, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + } +} + +void PrefsDlg::OnChargeSize(double size) +{ + if (size != m_CurTheme->m_ChargeSignSize) { + m_CurTheme->m_ChargeSignSize = size; + switch (m_CurTheme->m_ThemeType) { + case DEFAULT_THEME_TYPE: { +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_double (node, "charge-sign-size", size); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_float (conf_client, ROOTDIR"charge-sign-size", size, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif + break; + } + case LOCAL_THEME_TYPE: + m_CurTheme->modified = true; + break; + default: + break; + } + m_CurTheme->NotifyChanged (); + } +} + +void PrefsDlg::OnThemeNameChanged (char const *name) +{ + if (!name || !*name) { + // No valid name found + if (!gtk_window_has_toplevel_focus (GTK_WINDOW (dialog))) + return; + GtkWidget* box = gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Invalid name"); + g_signal_handler_block (m_NameEntry, m_NameFocusOut); + g_signal_connect (G_OBJECT (box), "response", G_CALLBACK (gtk_widget_destroy), NULL); + gtk_widget_show_all (box); + g_signal_handler_unblock (m_NameEntry, m_NameFocusOut); + gtk_window_set_focus (GTK_WINDOW (dialog), GTK_WIDGET (m_NameEntry)); + return; + } + GtkTreeIter iter, parent; + gtk_tree_model_get_iter (GTK_TREE_MODEL (themes), &iter, m_Path); + gtk_tree_model_iter_parent (GTK_TREE_MODEL (themes), &parent, &iter); + gtk_tree_store_set (themes, &parent, 0, name, -1); + // delete old file + if (m_CurTheme->m_ThemeType == LOCAL_THEME_TYPE) { + xmlDocPtr doc = xmlNewDoc((xmlChar*)"1.0"); + xmlDocSetRootElement (doc, xmlNewDocNode (doc, NULL, (xmlChar*) "chemistry", NULL)); + char *szhome = getenv ("HOME"); + string home, path; + if (szhome) + home = szhome; + path = home + "/.gchempaint/themes"; + GDir *dir = g_dir_open (path.c_str (), 0, NULL); + if (!dir) { + string path; + path = home + "/.gchempaint"; + dir = g_dir_open (path.c_str (), 0, NULL); + if (dir) + g_dir_close (dir); + else + mkdir (path.c_str (), 0x1ed); + mkdir (path.c_str (), 0x1ed); + } else { + path += string ("/") + m_CurTheme->GetName (); + remove (path.c_str ()); + g_dir_close (dir); + } + TheThemeManager.ChangeThemeName (m_CurTheme, name); // just set the name + if (m_CurTheme->Save (doc)) { + path = home + "/.gchempaint/themes/" + name; + xmlSaveFormatFile (path.c_str (), doc, true); + m_CurTheme->modified = false; + } + } else + m_CurTheme->m_Name = name; // just set the name + dynamic_cast (m_App)->OnThemeNamesChanged (); +} + +bool PrefsDlg::CheckError () +{ + return (!*gtk_entry_get_text (m_NameEntry)); +} + +void PrefsDlg::SetDefaultTheme (char const *name) +{ + TheThemeManager.SetDefaultTheme (name); +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (m_App->GetConfDir (), GCP_CONF_DIR_SETTINGS); + go_conf_set_string (node, "default-theme", name); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + GError *error = NULL; + gconf_client_set_string (conf_client, ROOTDIR"default-theme", name, &error); + if (error) { + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + g_object_unref (conf_client); +#endif +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/preferences.h gnome-chemistry-utils-0.10.9/libs/gcp/preferences.h --- gnome-chemistry-utils-0.8.6/libs/gcp/preferences.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/preferences.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,107 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * preferences.h + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCP_PREFERENCES_H +#define GCP_PREFERENCES_H + +#include "fontsel.h" +#include +#include +#include + +/*!file*/ +namespace gcp { + +class Application; +class Theme; + +/*!\class PrefsDlg gcp/preferences.h +\brief GChemPaint preferences dialog class +*/ + +class PrefsDlg: public gcu::Dialog, gcu::Object +{ +friend class PrefsDlgPrivate; +public: +/*! +@param pApp the application. + +Constructs the preferences dialog and displays it. +*/ + PrefsDlg (Application *pApp); +/*! +The destructor. +*/ + virtual ~PrefsDlg (); + +private: + void OnSelectTheme (GtkTreeSelection *selection); + void OnBondLength (double length); + void OnBondAngle (double angle); + void OnBondWidth (double width); + void OnBondDist (double dist); + void OnStereoBondWidth (double width); + void OnHashWidth (double width); + void OnHashDist (double dist); + void OnFont (GcpFontSel *fs); + void OnTextFont (GcpFontSel *fs); + void OnArrowLength (double length); + void OnArrowWidth (double width); + void OnArrowDist (double dist); + void OnArrowPadding (double padding); + void OnArrowHeadA (double headA); + void OnArrowHeadB (double headB); + void OnArrowHeadC (double headC); + void OnScale (double scale); + void OnPadding (double padding); + void OnObjectPadding (double padding); + void OnStoichPadding (double padding); + void OnSignPadding (double padding); + void OnChargeSize (double size); + void OnThemeNameChanged (char const *name); + bool CheckError (); + void SetDefaultTheme (char const *name); + +private: + Theme *m_CurTheme; + GtkTreeStore *themes; + GtkTreeSelection *m_ThemesSelection; + GtkTreeView *m_ThemesView; + GtkNotebook *m_Book; + GtkSpinButton *m_BondLengthBtn, *m_BondWidthBtn, *m_BondAngleBtn, *m_BondDistBtn; + GtkSpinButton *m_StereoBondWidthBtn, *m_HashDistBtn, *m_HashWidthBtn; + GtkSpinButton *m_ArrowLengthBtn, *m_ArrowWidthBtn, *m_ArrowDistBtn, *m_ArrowPaddingBtn; + GtkSpinButton *m_ArrowHeadABtn, *m_ArrowHeadBBtn, *m_ArrowHeadCBtn; + GtkSpinButton *m_ScaleBtn, *m_PaddingBtn, *m_ObjectPaddingBtn, *m_StoichPaddingBtn, *m_SignPaddingBtn; + GtkSpinButton *m_ChargeSizeBtn; + GtkEntry *m_NameEntry; + GcpFontSel *m_TextFontSel, *m_FontSel; + gulong m_NameActivate, m_NameFocusOut, m_TextFontChanged, m_FontChanged; + GtkTreePath *m_Path; + GtkComboBox *m_DefaultThemeBox; +}; + +} // namespace gcp + +#endif // GCP_PREFERENCES_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reactant.cc gnome-chemistry-utils-0.10.9/libs/gcp/reactant.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/reactant.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reactant.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,263 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reactant.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "reactant.h" +#include "reaction-step.h" +#include "application.h" +#include "document.h" +#include "text.h" +#include "theme.h" +#include "tool.h" +#include "view.h" +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +extern xmlDocPtr pXmlDoc; + +Reactant::Reactant (): Object (ReactantType) +{ + SetId ("r1"); + m_Stoich = 0; + Child = NULL; + Stoichiometry = NULL; +} + +Reactant::Reactant (ReactionStep* step, Object *object) throw (invalid_argument): Object (ReactantType) +{ + SetId ("r1"); + step->AddChild (this); + GetDocument ()->EmptyTranslationTable(); + static const set& allowed_types = Object::GetRules ("reactant", RuleMayContain); + if (allowed_types.find (object->GetType ()) == allowed_types.end ()) + throw invalid_argument ("invalid reactant"); + AddChild (object); + Child = object; + Stoichiometry = NULL; + m_Stoich = 0; +} + +Reactant::~Reactant () +{ +} + +static void do_add_stoichiometry (Reactant *reactant) +{ + reactant->AddStoichiometry (); +} + +bool Reactant::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + bool result = false; + if (m_Stoich == 0 && !Stoichiometry) { + GtkActionGroup *group = gtk_action_group_new ("reactant"); + GtkAction *action = gtk_action_new ("stoichiometry", _("Add a stoichiometry coefficient"), NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + char buf[] = ""; + gtk_ui_manager_add_ui_from_string (UIManager, buf, -1, NULL); + GtkWidget *w = gtk_ui_manager_get_widget (UIManager, "/popup/stoichiometry"); + g_signal_connect_swapped (w, "activate", G_CALLBACK (do_add_stoichiometry), this); + result = true; + } + return result | Object::BuildContextualMenu (UIManager, object, x, y); +} + +xmlNodePtr Reactant::Save (xmlDocPtr xml) const +{ + if (!Child) + return NULL; + xmlNodePtr node = xmlNewDocNode (xml, NULL, (const xmlChar*) "reactant", NULL); + SaveId (node); + xmlNodePtr child = Child->Save (xml); + xmlAddChild (node, child); + if (Stoichiometry) { + xmlNodePtr stoich = Stoichiometry->Save (xml); + xmlNodeSetName (stoich, (const xmlChar*) "stoichiometry"); + xmlAddChild (node, stoich); + } + return node; +} + +bool Reactant::Load (xmlNodePtr node) +{ + xmlChar* buf; + xmlNodePtr child; + + Lock (); + buf = xmlGetProp (node, (xmlChar*) "id"); + if (buf) { + SetId ((char*) buf); + xmlFree (buf); + } + child = node->children; + Document *pDoc = (Document*) GetDocument (); + while (child) { + if (!strcmp ((const char*) child->name, "stoichiometry")) { + if (Stoichiometry) { + Lock (false); + return false; + } + Stoichiometry = new Text (); + AddChild (Stoichiometry); + if (!Stoichiometry->Load (child)) { + delete Stoichiometry; + Lock (false); + return false; + }; + pDoc->AddObject (Stoichiometry); + } else { + if (Child) { + if (strcmp ((const char*) child->name, "text")) { + Lock (false); + return false; + } else { + child = child->next; + continue; + } + } + Child = CreateObject ((const char*) child->name, this); + if (Child) { + AddChild (Child); + if (!Child->Load (child)) { + delete Child; + Child = NULL; + } + } + } + child = child->next; + } + Lock (false); + return (Child != NULL); +} + +double Reactant::GetYAlign () +{ + return (Child)? Child->GetYAlign (): 0.; +} + +void Reactant::AddStoichiometry () +{ + Document *pDoc = dynamic_cast (GetDocument ()); + Application * pApp = pDoc->GetApplication (); + View *pView = pDoc->GetView (); + Theme *pTheme= pDoc->GetTheme (); + WidgetData *pData = (WidgetData*) g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data"); + ArtDRect rect; + pData->GetObjectBounds (this, &rect); + double x = rect.x0 / pTheme->GetZoomFactor (); + Text *text = new Text (x, GetYAlign () + pView->GetBaseLineOffset ()); + Stoichiometry = text; + AddChild (text); + pDoc->AddObject (text); + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + pData->GetObjectBounds (text, &rect); + Child->Move (rect.x1 / pTheme->GetZoomFactor () + pTheme->GetStoichiometryPadding () - x, 0.); + Tool *tool = pApp->GetTool ("Text"); + GetParent ()->EmitSignal (OnChangedSignal); + pApp->ActivateTool ("Text", true); + tool->OnClicked (pView, text, rect.x0 * pTheme->GetZoomFactor (), GetYAlign () * pTheme->GetZoomFactor (), 0); +} + +bool Reactant::OnSignal (SignalId Signal, Object *Obj) +{ + if (Signal == OnChangedSignal) { + Document *pDoc = (Document*) GetDocument (); + Theme *pTheme= pDoc->GetTheme (); + WidgetData *pData = (WidgetData*) g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data"); + ArtDRect rect; + unsigned n = GetChildrenNumber (); + map::iterator i; + Object *pObj; + if (n == 0) + delete this; + else if (n == 1) { + if (Stoichiometry) { + // Child or stoichiometry have been deleted + pObj = GetFirstChild (i); + if (pObj == Child) + Stoichiometry = NULL; + else { + pDoc->Remove (Stoichiometry); + delete this; + } + } + } else if ((n == 2) && Stoichiometry) { + // Just need to space the two children + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + pData->GetObjectBounds (Stoichiometry, &rect); + double x = rect.x1 / pTheme->GetZoomFactor () + pTheme->GetStoichiometryPadding (); + pData->GetObjectBounds (Child, &rect); + Child->Move (x - rect.x0 / pTheme->GetZoomFactor (), 0.); + PangoLayout *layout = ((TextObject*) Stoichiometry)->GetLayout (); + const char *txt = pango_layout_get_text (layout); + char *endptr; + int n = strtol (txt, &endptr, 10); + m_Stoich = (!*endptr)? n: 0; + } else { + // Most probably child has been splitted + xmlNodePtr node = NULL; + bool ChildFound = false; + ReactionStep *step = reinterpret_cast (GetParent ()); + if (Stoichiometry) + node = Stoichiometry->Save (pXmlDoc); + pObj = GetFirstChild (i); + while (pObj) { + if (pObj == Child) + ChildFound = true; + else if (pObj != Stoichiometry) { + Reactant *reactant = new Reactant (step, pObj); + if (Stoichiometry) { + reactant->Stoichiometry = new Text (); + reactant->AddChild (reactant->Stoichiometry); + pDoc->AddObject (reactant->Stoichiometry); + reactant->Stoichiometry->Load (node); + reactant->EmitSignal (OnChangedSignal); + } + pObj = GetFirstChild (i); + continue; + } + pObj = GetNextChild (i); + } + if (!ChildFound) { + if (Stoichiometry) + pDoc->Remove (Stoichiometry); + delete this; + } + if (node) + xmlFreeNode (node); + EmitSignal (OnChangedSignal); + } + } + return true; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reactant.h gnome-chemistry-utils-0.10.9/libs/gcp/reactant.h --- gnome-chemistry-utils-0.8.6/libs/gcp/reactant.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reactant.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,134 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reactant.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_REACTANT_H +#define GCHEMPAINT_REACTANT_H + +#include + +/*!\file*/ +namespace gcp { + +class ReactionStep; + +/*!\class Reactant gcp/reactant.h +\brief Class for reactants and products of a chemical reaction. + +Objects of these class embed either a molecule or a text representing a reactant +or a product for a chemical reaction. They can have a stoichiometry coefficient. +*/ +class Reactant: public gcu::Object +{ +public: +/*! +The default constructor. +*/ + Reactant (); +/*! +The destructor. +*/ + virtual ~Reactant (); + +/*! +@param step the parent reaction step. +@param object the molecule formula or text to use as reactant. +*/ + Reactant (ReactionStep* step, gcu::Object* object) throw (std::invalid_argument); + +/*! +@param xml the xmlDoc used to save the document. + +Used to save the reactant to the xmlDoc. +@return the xmlNode containing the serialized reactant. +*/ + virtual xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node a pointer to the xmlNode containing the serialized reactant. + +Used to load a reactant in memory. The Reactant instance must already exist. + +@return true on succes, false otherwise. +*/ + virtual bool Load (xmlNodePtr node); + +/*! +@return the reactants stoichiometry coefficient. +*/ + unsigned GetStoichiometry () const {return m_Stoich;} +/*! +@param coef the new stoichiometry coefficient. + +Sets the stoichiometry coefficient for the reactant. +*/ + void SetStoichiometry (unsigned coef) {m_Stoich = coef;} +/*! +Used to retrieve the y coordinate for alignment. +@return y coordinate used for reactant alignment. +*/ + virtual double GetYAlign (); +/*! +@param UIManager the GtkUIManager to populate. +@param object the Object on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +This method is called to build a contextual menu for the reactant. +@return true if something is added to the UIManager, false otherwise. +*/ + bool BuildContextualMenu (GtkUIManager *UIManager, gcu::Object *object, double x, double y); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework when a signal has been emitted for +the reactant, when the embedded text or molecule changed. +It should not be called by a program; call Object::EmitSignal instead. + +@return true to propagate the signal to the parent. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); + +/*! +Adds a text item to display the reactants stoichiometry coefficient. This +coefficient does not need to be an integer, but should always be positive. +*/ + void AddStoichiometry (); +/*! +@return the molecule or text embedded in this instance. +*/ + gcu::Object *GetChild () {return Child;} +/*! +@return the text representing the stoichiometry coefficient of this instance. +*/ + gcu::Object *GetStoichChild () {return Stoichiometry;} + +private: + unsigned m_Stoich; //always positive + gcu::Object *Stoichiometry; + gcu::Object *Child; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_REACTANT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-arrow.cc gnome-chemistry-utils-0.10.9/libs/gcp/reaction-arrow.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-arrow.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-arrow.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,518 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-arrow.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "reaction-arrow.h" +#include "reaction.h" +#include "reaction-step.h" +#include "reaction-prop.h" +#include "reaction-prop-dlg.h" +#include "document.h" +#include "settings.h" +#include "theme.h" +#include "view.h" +#include "widgetdata.h" +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +ReactionArrow::ReactionArrow (Reaction* react, unsigned Type): Arrow (ReactionArrowType) +{ + SetId ("ra1"); + m_Type = Type; + m_Start = m_End = NULL; + if (react) + react->AddChild (this); + m_TypeChanged = false; +} + + +ReactionArrow::~ReactionArrow () +{ + if (IsLocked ()) + return; + if (m_Start) + m_Start->RemoveArrow (this); + if (m_End) + m_End->RemoveArrow (this); +} + +xmlNodePtr ReactionArrow::Save (xmlDocPtr xml) const +{ + xmlNodePtr parent, node; + node = xmlNewDocNode (xml, NULL, (xmlChar*) "reaction-arrow", NULL); + if (!node) + return NULL; + if (!Arrow::Save (xml, node)) { + xmlFreeNode (node); + return NULL; + } + xmlNewProp (node, (xmlChar*) "type", (xmlChar*) ((m_Type == SimpleArrow)? "single": "double")); + if (m_Type == FullReversibleArrow) + xmlNewProp (node, (xmlChar*) "heads", (xmlChar*) "full"); + if (m_Start) + xmlNewProp (node, (xmlChar*) "start", (xmlChar*) m_Start->GetId ()); + if (m_End) + xmlNewProp (node, (xmlChar*) "end", (xmlChar*) m_End->GetId ()); + Reaction* r = (Reaction*) GetReaction(); + if (!r) { + //save the arrow as an object (this is NOT safe) + parent = xmlNewDocNode (xml, NULL, (xmlChar*) "object", NULL); + if (node && parent) + xmlAddChild (parent, node); + else { + xmlFreeNode(node); + return NULL; + } + } + else + parent = node; + SaveChildren (xml, node); + return parent; +} + +bool ReactionArrow::Load (xmlNodePtr node) +{ + char *buf; + Object *parent, *prop; + xmlNodePtr child; + if (Arrow::Load (node)) { + buf = (char*) xmlGetProp (node, (xmlChar*) "type"); + if (buf) { + if (!strcmp (buf, "double")) { + m_Type = ReversibleArrow; + char *buf0 = (char*) xmlGetProp (node, (xmlChar*) "heads"); + if (buf0) { + if (!strcmp (buf0, "full")) + m_Type = FullReversibleArrow; + xmlFree (buf0); + } + m_TypeChanged = true; + } + xmlFree (buf); + } + /* load children */ + child = GetNodeByName (node, "reaction-prop"); + while (child) { + prop = CreateObject ("reaction-prop", this); + if (prop) { + if (!prop->Load (child)) + delete prop; + } + child = GetNextNodeByName (child->next, "reaction-prop"); + } + parent = GetParent (); + if (!parent) + return true; + buf = (char*) xmlGetProp (node, (xmlChar*) "start"); + if (buf) { + m_Start = reinterpret_cast (parent->GetDescendant (buf)); + xmlFree (buf); + if (!m_Start) + return false; + m_Start->AddArrow (this); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "end"); + if (buf) { + m_End = reinterpret_cast (parent->GetDescendant (buf)); + xmlFree (buf); + if (!m_End) + return false; + m_End->AddArrow (this); + } + return true; + } + return false; +} + +void ReactionArrow::Add (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasPoints *points = gnome_canvas_points_new (2); + GnomeCanvasGroup* group = GNOME_CANVAS_GROUP(gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL)); + GnomeCanvasItem* item; + switch(m_Type) { + case SimpleArrow: + points->coords[0] = m_x * pTheme->GetZoomFactor (); + points->coords[1] = m_y * pTheme->GetZoomFactor (); + points->coords[2] = (m_x + m_width) * pTheme->GetZoomFactor (); + points->coords[3] = (m_y + m_height) * pTheme->GetZoomFactor (); + item = gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "arrow", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + break; + case ReversibleArrow: { + double dAngle = atan (- m_height / m_width); + if (m_width < 0) + dAngle += M_PI; + points->coords[0] = m_x * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[1] = m_y * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * cos (dAngle); + points->coords[2] = (m_x + m_width) * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[3] = (m_y + m_height) * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * cos (dAngle); + item = gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", (pData->IsSelected(this))? SelectColor: Color, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_LEFT, + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "direct", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + points->coords[2] = m_x * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[3] = m_y * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * cos (dAngle); + points->coords[0] = (m_x + m_width) * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * sin( dAngle); + points->coords[1] = (m_y + m_height) * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * cos (dAngle); + item = gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_LEFT, + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "reverse", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + break; + } + case FullReversibleArrow: { + double dAngle = atan (- m_height / m_width); + if (m_width < 0) + dAngle += M_PI; + points->coords[0] = m_x * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[1] = m_y * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * cos (dAngle); + points->coords[2] = (m_x + m_width) * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[3] = (m_y + m_height) * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * cos (dAngle); + item = gnome_canvas_item_new( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "direct", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + points->coords[2] = m_x * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[3] = m_y * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * cos (dAngle); + points->coords[0] = (m_x + m_width) * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[1] = (m_y + m_height) * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * cos (dAngle); + item = gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data (G_OBJECT (group), "reverse", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + break; + } + } + pData->Items[this] = group; + gnome_canvas_points_free (points); +} + +void ReactionArrow::Update (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup* group = pData->Items[this]; + if (!group) { + Add (w); + const_cast (this)->m_TypeChanged = false; + return; + } + if (m_TypeChanged) { + gtk_object_destroy (GTK_OBJECT (group)); + pData->Items[this] = NULL; + Add (w); + const_cast (this)->m_TypeChanged = false; + return; + } + GnomeCanvasPoints *points = gnome_canvas_points_new (2); + switch(m_Type) { + case SimpleArrow: + points->coords[0] = m_x * pTheme->GetZoomFactor (); + points->coords[1] = m_y * pTheme->GetZoomFactor (); + points->coords[2] = (m_x + m_width) * pTheme->GetZoomFactor (); + points->coords[3] = (m_y + m_height) * pTheme->GetZoomFactor (); + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "arrow")), + "points", points, + "width_units", pTheme->GetArrowWidth (), + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + NULL); + break; + case ReversibleArrow: + case FullReversibleArrow: + double dAngle = atan (- m_height / m_width); + if (m_width < 0) dAngle += M_PI; + points->coords[0] = m_x * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[1] = m_y * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * cos (dAngle); + points->coords[2] = (m_x + m_width) * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[3] = (m_y + m_height) * pTheme->GetZoomFactor () - pTheme->GetArrowDist () / 2 * cos (dAngle); + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "direct")), + "points", points, + "width_units", pTheme->GetArrowWidth (), + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + NULL); + points->coords[2] = m_x * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[3] = m_y * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * cos (dAngle); + points->coords[0] = (m_x + m_width) * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * sin (dAngle); + points->coords[1] = (m_y + m_height) * pTheme->GetZoomFactor () + pTheme->GetArrowDist () / 2 * cos (dAngle); + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "reverse")), + "points", points, + "width_units", pTheme->GetArrowWidth (), + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + NULL); + break; + } + gnome_canvas_points_free (points); + // Now, update children + Object::Update (w); +} + +void ReactionArrow::RemoveStep (ReactionStep *Step) +{ + if (Step == m_Start) + m_Start = NULL; + else if (Step == m_End) + m_End = NULL; +} + +struct CallbackData { + ReactionArrow *arrow; + Object *child; +}; + +static void do_attach_object (struct CallbackData *data) +{ + data->arrow->AddProp (data->child); +} + +static void do_free_data (struct CallbackData *data) +{ + delete data; +} + +bool ReactionArrow::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + Document *Doc = dynamic_cast (GetDocument ()); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (Doc->GetWidget ()), "data"); + // Don't allow more than one child at the moment + if (pData->SelectedObjects.size () != 1 || HasChildren ()) + return Object::BuildContextualMenu (UIManager, object, x, y); + Object *obj = pData->SelectedObjects.front (); + TypeId Id = obj->GetType (); + if ((Id != MoleculeType && Id != TextType) || obj->GetGroup ()) + return Object::BuildContextualMenu (UIManager, object, x, y); + GtkActionGroup *group = gtk_action_group_new ("reaction-arrow"); + GtkAction *action = gtk_action_new ("Arrow", _("Arrow"), NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + struct CallbackData *data = new struct CallbackData (); + data->arrow = this; + data->child = obj; + action = gtk_action_new ("attach", _("Attach selection to arrow..."), NULL, NULL); + g_object_set_data_full (G_OBJECT (action), "data", data, (GDestroyNotify) do_free_data); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_attach_object), data); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + return true; +} + +void ReactionArrow::Move (double x, double y, double z) +{ + // Move the arrow + Arrow::Move (x, y, z); + // Move its children + Object::Move (x, y, z); +} + +void ReactionArrow::SetSelected (GtkWidget* w, int state) +{ + // Select the arrow + Arrow::SetSelected (w, state); + // Select its children + Object::SetSelected (w, state); +} + +void ReactionArrow::AddProp (Object *object) +{ + Document *Doc = dynamic_cast (GetDocument ()); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (Doc->GetWidget ()), "data"); + Operation *Op = Doc->GetNewOperation (GCP_MODIFY_OPERATION); + Op->AddObject (object, 0); + Object *Group = GetGroup (); + if (!Group) + Group = this; + Op->AddObject (Group, 0); + ReactionProp *prop = new ReactionProp (this, object); + // add the child in the object tree + AddChild (prop); + // position the child + PositionChild (prop); + Op->AddObject (Group, 1); + Doc->FinishOperation (); + pData->UnselectAll (); + EmitSignal (OnChangedSignal); + new ReactionPropDlg (this, prop); +} + +void ReactionArrow::PositionChild (ReactionProp *prop) +{ + // FIXME: this is experimental code + Document *Doc = dynamic_cast (GetDocument ()); + Theme *pTheme = Doc->GetTheme (); + double xmin, xspan, ymin, yspan, + length = sqrt (m_width * m_width + m_height * m_height), + x = m_width / length, y = m_height / length; + ArtDRect rect; + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (Doc->GetWidget ()), "data"); + pData->GetObjectBounds (prop, &rect); + if (m_width >=0) { + if (m_height >=0) { + xmin = (rect.x0 * x + rect.y0 * y) / pTheme->GetZoomFactor (); + xspan = (rect.x1 * x + rect.y1 * y) / pTheme->GetZoomFactor () - xmin; + ymin = (rect.x0 * y - rect.y1 * x) / pTheme->GetZoomFactor (); + yspan = (rect.x1 * y - rect.y0 * x) / pTheme->GetZoomFactor () - ymin; + } else { + xmin = (rect.x0 * x + rect.y1 * y) / pTheme->GetZoomFactor (); + xspan = (rect.x1 * x + rect.y0 * y) / pTheme->GetZoomFactor () - xmin; + ymin = (rect.x0 * y - rect.y0 * x) / pTheme->GetZoomFactor (); + yspan = (rect.x1 * y - rect.y1 * x) / pTheme->GetZoomFactor () - ymin; + } + } else { + if (m_height >=0) { + xmin = (rect.x1 * x + rect.y0 * y) / pTheme->GetZoomFactor (); + xspan = (rect.x0 * x + rect.y1 * y) / pTheme->GetZoomFactor () - xmin; + ymin = (rect.x1 * y - rect.y1 * x) / pTheme->GetZoomFactor (); + yspan = (rect.x0 * y - rect.y0 * x) / pTheme->GetZoomFactor () - ymin; + } else { + xmin = (rect.x1 * x + rect.y1 * y) / pTheme->GetZoomFactor (); + xspan = (rect.x0 * x + rect.y0 * y) / pTheme->GetZoomFactor () - xmin; + ymin = (rect.x1 * y - rect.y0 * x) / pTheme->GetZoomFactor (); + yspan = (rect.x0 * y - rect.y1 * x) / pTheme->GetZoomFactor () - ymin; + } + } + xspan = fabs (xspan); + yspan = fabs (yspan); + // xmin and ymin will now be the current center of the object + xspan += (2* pTheme->GetArrowObjectPadding () + pTheme->GetArrowHeadA ()) / pTheme->GetZoomFactor (); + // adjust the arrow length if needed + if (xspan > length) { + m_width *= xspan / length; + m_height *= xspan / length; + length = xspan; + } + // now move the child to the right place + length -= pTheme->GetArrowHeadA () / pTheme->GetZoomFactor (); + length /= 2.; + // FIXME: using GetArrowDist is a non-sense, we should have a new variable. + yspan = yspan / 2. + pTheme->GetArrowDist () / pTheme->GetZoomFactor (); + // calculate the vector of the needed move + xmin = m_x + length * x + y * yspan - (rect.x0 + rect.x1) / 2. / pTheme->GetZoomFactor (); + ymin = m_y + length * y - x * yspan - (rect.y0 + rect.y1) / 2. / pTheme->GetZoomFactor (); + prop->Move (xmin, ymin); + Doc->GetView ()->Update (this); +} + +bool ReactionArrow::OnSignal (SignalId Signal, Object *Child) +{ + if (Signal == OnChangedSignal) { + // for now we can have only one child property. + map::iterator i; + ReactionProp *prop = dynamic_cast (GetFirstChild (i)); + if (prop != NULL) + PositionChild (prop); + } + return true; +} + +bool ReactionArrow::SetProperty (unsigned property, char const *value) +{ + switch (property) { + case GCU_PROP_REACTION_ARROW_TYPE: + m_Type = (strcmp (value, "double"))? ReversibleArrow: SimpleArrow; + break; + default: + return Arrow::SetProperty (property, value); + } + return true; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-arrow.h gnome-chemistry-utils-0.10.9/libs/gcp/reaction-arrow.h --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-arrow.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-arrow.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,172 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-arrow.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_REACTION_ARROW_H +#define GCHEMPAINT_REACTION_ARROW_H + +#include "arrow.h" + +namespace gcp { + +class ReactionStep; +class Reaction; +class ReactionProp; + +/*!\class ReactionArrow gcp/reaction-arrow.h +Arrow class for arrows used in chemical reactions.*/ +class ReactionArrow: public Arrow +{ +public: +/*! +*/ + ReactionArrow (Reaction* react, unsigned Type = SimpleArrow); +/*! +The destructor. +*/ + virtual ~ReactionArrow (); + +/*! +@param xml the xmlDoc used to save the document. + +Used to save the arrow to the xmlDoc. +@return the xmlNode containing the serialized arrow. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node: a pointer to the xmlNode containing the serialized arrow. + +Used to load an arrow in memory. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param w the GtkWidget inside which the arrow will be displayed. + +Used to add a representation of the arrow in the widget. +*/ + void Add (GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the arrow is displayed. + +Used to update the representation of the arrow in the widget. +*/ + void Update (GtkWidget* w) const; +/*! +@param Step the reaction step before the reaction + +Sets the initial reaction step. +*/ + void SetStartStep (ReactionStep *Step) {m_Start = Step;} +/*! +@return the initial reaction step. +*/ + ReactionStep* GetStartStep () {return m_Start;} +/*! +@param Step the reaction step after the reaction + +Sets the final reaction step. +*/ + void SetEndStep (ReactionStep *Step) {m_End = Step;} +/*! +@return the final reaction step. +*/ + ReactionStep* GetEndStep () {return m_End;} +/*! +@param Step the reaction step to remove from the reaction + +Removes the reaction step, which might be either the initial or final step. +If it not one of these, nothing is done. +*/ + void RemoveStep (ReactionStep *Step); +/*! +@param UIManager the GtkUIManager to populate. +@param object the Object on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +This method is called to build a contextual menu for the arrow. +@return true if something is added to the UIManager, false otherwise. +*/ + bool BuildContextualMenu (GtkUIManager *UIManager, gcu::Object *object, double x, double y); +/*! +@param x the x component of the transation vector. +@param y the y component of the transation vector. +@param z the z component of the transation vector. + +Used to move a reaction arrow. It will also move the objects attached to the +arrow if any. +*/ + void Move (double x, double y, double z = 0); +/*! +@param w: the GtkWidget inside which the arrow is displayed. +@param state: the selection state of the arrow. + +Used to set the selection state of the arrow inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. Children will be selected too. +*/ + void SetSelected (GtkWidget* w, int state); +/*! +@param object the object to attach to the arrow. + +Attach an object to the arrow and pops up the reaction property dialog box. +*/ + void AddProp (gcu::Object *object); +/*! +@param prop the attached property to position. + +Position an object at the right place near the arrow. +*/ + void PositionChild (ReactionProp *prop); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework when a signal has been emitted for +the arrow, such as when an attached object size changed. +It should not be called by a program; call Object::EmitSignal instead. + +@return true if the signal should be propagated to the parent, false otherwise. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); +/*! +@param property the property id as defined in objprops.h +@param value the property value as a string + +Used when loading to set common properties to arrows. Only one property is +currently supported: gcu::GCU_PROP_REACTION_ARROW_TYPE. +@return true if the property could be set, or if the property is not relevant, +false otherwise. +*/ + bool SetProperty (unsigned property, char const *value); + +private: + unsigned m_Type; + bool m_TypeChanged; + ReactionStep *m_Start, *m_End; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_REACTION_ARROW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction.cc gnome-chemistry-utils-0.10.9/libs/gcp/reaction.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,404 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "reaction.h" +#include "reaction-arrow.h" +#include "reaction-step.h" +#include "document.h" +#include "molecule.h" +#include "theme.h" +#include "view.h" +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +Reaction::Reaction (): Object (ReactionType) +{ + SetId ("rxn1"); +} + +Reaction::~Reaction () +{ + if (IsLocked ()) + return; + map::iterator i; + Object *pObj; + ReactionArrow *arrow; + Document *pDoc = reinterpret_cast (GetDocument ()); + Operation *pOp = pDoc->GetCurrentOperation (); + while ((pObj = GetFirstChild (i))) { + if (pObj->GetType () == ReactionArrowType) { + arrow = reinterpret_cast (pObj); + arrow->SetStartStep (NULL); + arrow->SetEndStep (NULL); + arrow->SetParent (GetParent ()); + if (pOp) + pOp->AddObject (arrow, 1); + + } else + delete pObj; + } +} + +bool Reaction::Build (list& Children) throw (invalid_argument) +{ + Document *pDoc = (Document*) GetDocument (); + Theme *pTheme = pDoc->GetTheme (); + WidgetData *pData= (WidgetData*)g_object_get_data(G_OBJECT(pDoc->GetWidget ()), "data"); + map Objects; + list::iterator i, end = Children.end (); + list Arrows; + list Others; + map Left, Right; + double x0, y0, x1, y1, x, y, xpos, ypos, l; + bool horiz = true;; + ArtDRect *rect, srect; + for (i = Children.begin (); i != end; i++) { + // It might be better to use the objects coordinates there + pData->GetObjectBounds (*i, &Objects[*i]); + // Search arrows + if ((*i)->GetType() == ReactionArrowType) + Arrows.push_front ((ReactionArrow*) (*i)); + else if ((*i)->GetType() == MoleculeType) + Others.push_front ((Molecule*) (*i)); + else return false; + } + if (Arrows.size () == 1) { + // FIXME: only simple reactions schemes with one arrow are supported in this version + ReactionArrow *arrow = Arrows.front (); + AddChild (arrow); + arrow->GetCoords (&x0, &y0, &x1, &y1); + //x0 and y0 should be the center of the arrow, not the beginning, so we must transform them + x0 = (x0 + x1) / 2; + y0 = (y0 + y1) / 2; + // x1, y1 will now be the coordinates of a normalized vector: + x1 -= x0; + y1 -= y0; + x0 *= pTheme->GetZoomFactor (); + y0 *= pTheme->GetZoomFactor (); + l = sqrt (x1 * x1 + y1 * y1); + x1 /= l; + y1 /= l; + // Now, group objects depending of their position relative to the arrow + // FIXME: objects above or below an arrow are not supported. + end = Others.end (); + for (i = Others.begin (); i != end; i++) { + rect = &Objects[*i]; + xpos = x = (rect->x0 + rect->x1) / 2; + y = (rect->y0 + rect->y1) / 2; + // search the direction from the center of the arrow to the center of the object + x -= x0; + y -= y0; + l = sqrt (x * x + y * y); + x /= l; + y /= l; + // scalar product: + l = x * x1 + y * y1; + if (l > 0.71) { + while (Right[xpos] != NULL) + xpos += 1e-5; + Right[xpos] = *i; + } + else if (l < -0.71) { + while (Left[xpos] != NULL) + xpos += 1e-5; + Left[xpos] = *i; + } + else //Object too far from the arrow direction + throw invalid_argument(_("Error could not build a reaction\nfrom the selected objects.")); + } + // We have one or two sets of objects. We must transform them in reaction steps + ReactionStep *step; + l= 0.; + if (Left.size ()) { + step = new ReactionStep (this, Left, Objects); + // Link fisrt step to the arrow + arrow->SetStartStep (step); + // Move the arrow to its new position + pData->GetObjectBounds (step, &srect); + x0 = (srect.x0 + srect.x1) / 2; + y0 = step->GetYAlign () * pTheme->GetZoomFactor (); + x = srect.x1 - x0; + y = srect.y1 - y0; + if ((fabs (x1) > 1e-5) && (fabs (y1) > 1e-5)) + horiz = (fabs (x1) > fabs (y1)); + else if (fabs (x1) > 1e-5) + horiz = true; + else + horiz = false; + if (horiz) { + l = x + pTheme->GetArrowPadding (); + if (x1 < 0) + l = -l; + x0 += l; + y0 += l * y1 / x1; + } else { + l = y + pTheme->GetArrowPadding (); + if (y1 < 0) + l = -l; + x0 += l * x1 / y1; + y0 += l; + } + arrow->GetCoords (&srect.x0, &srect.y0, &srect.x1, &srect.y1); + arrow->Move (x0 / pTheme->GetZoomFactor () - srect.x0, y0 / pTheme->GetZoomFactor () - srect.y0); + } + arrow->GetCoords (&srect.x0, &srect.y0, &srect.x1, &srect.y1); + xpos = srect.x1; + ypos = srect.y1; + // Create second step + if (Right.size ()) { + step = new ReactionStep (this, Right, Objects); + arrow->SetEndStep (step); + pData->GetObjectBounds (step, &srect); + x0 = (srect.x0 + srect.x1) / 2; + y0 = step->GetYAlign () * pTheme->GetZoomFactor (); + if (l == 0.) { + if ((fabs (x1) > 1e-5) && (fabs (y1) > 1e-5)) + horiz = (fabs (x1) > fabs (y1)); + else if (fabs (x1) > 1e-5) + horiz = true; + else + horiz = false; + } + if (horiz) { + x = srect.x1 - x0; + l = x + pTheme->GetArrowPadding (); + if (x1 < 0) + l = -l; + x0 -= l; + y0 -= l * y1 / x1; + } else { + y = srect.y1 - y0; + l = y + pTheme->GetArrowPadding (); + if (y1 < 0) + l = -l; + x0 -= l * x1 / y1; + y0 -= l; + } + step->Move (xpos - x0 / pTheme->GetZoomFactor (), ypos - y0 / pTheme->GetZoomFactor ()); + } + } else + throw invalid_argument (_("Error could not build a reaction\nfrom the selected objects.")); + return true; +} + +void Reaction::Transform2D (Matrix2D& m, double x, double y) +{ +} + +bool Reaction::OnSignal (SignalId Signal, Object *Obj) +{ + if (IsLocked ()) + return false; + if (Signal == OnChangedSignal) { + Document *pDoc = (Document*) GetDocument (); + View *pView = pDoc->GetView (); + Theme *pTheme = pDoc->GetTheme (); + WidgetData *pData= (WidgetData*)g_object_get_data(G_OBJECT(pDoc->GetWidget ()), "data"); + map Objects; + map Children; + list Operators; + ArtDRect rect; + map::iterator i; + Object *pObj = GetFirstChild (i); + ReactionArrow *arrow; + ReactionStep *step; + list IsolatedArrows; + double x0, y0, x1, y1, x, y, x2, y2, xpos, ypos, l; + bool horiz, has_start; + // It is assume we'll find only one arrow! + while (pObj) { + if (pObj->GetType () == ReactionArrowType) { + arrow = reinterpret_cast (pObj); + has_start = false; + arrow->GetCoords (&x0, &y0, &x1, &y1); + x = x1 - x0; + y = y1 - y0; + l = sqrt (x * x + y * y); + x /= l; + y /= l; + if ((fabs (x) > 1e-5) && (fabs (y) > 1e-5)) + horiz = (fabs (x) > fabs (y)); + else if (fabs (x) > 1e-5) + horiz = true; + else + horiz = false; + step = arrow->GetStartStep (); + if (step) { + has_start = true; + pData->GetObjectBounds (step, &rect); + x2 = (rect.x0 + rect.x1) / 2; + y2 = step->GetYAlign () * pTheme->GetZoomFactor (); + xpos = rect.x1 - x2; + ypos = rect.y1 - y2; + if (horiz) { + l = xpos + pTheme->GetArrowPadding (); + if (x < 0) + l = -l; + x2 += l; + y2 += l * y / x; + } else { + l = ypos + pTheme->GetArrowPadding (); + if (y < 0) + l = -l; + x2 += l * x / y; + y2 += l; + } + x1 += xpos = x2 / pTheme->GetZoomFactor () - x0; + y1 += ypos = y2 / pTheme->GetZoomFactor () - y0; + arrow->Move (xpos, ypos); + pView->Update (arrow); + } + step = arrow->GetEndStep (); + if (step) { + pData->GetObjectBounds (step, &rect); + x2 = (rect.x0 + rect.x1) / 2; + y2 = step->GetYAlign () * pTheme->GetZoomFactor (); + if (horiz) { + xpos = rect.x1 - x2; + l = xpos + pTheme->GetArrowPadding (); + if (x < 0) + l = -l; + x2 -= l; + y2 -= l * y / x; + } else { + ypos = rect.y1 - y2; + l = ypos + pTheme->GetArrowPadding (); + if (y < 0) + l = -l; + x2 -= l * x / y; + y2 -= l; + } + step->Move (x1 - x2 / pTheme->GetZoomFactor (), y1 - y2 / pTheme->GetZoomFactor ()); + pView->Update (step); + } else if (!has_start) + IsolatedArrows.push_front (arrow); + } + pObj = GetNextChild (i); + } + while (!IsolatedArrows.empty ()) { + IsolatedArrows.front ()->SetParent (GetParent ()); + IsolatedArrows.pop_front (); + } + if (!HasChildren ()) + delete this; + } + return true; +} + +bool Reaction::Load (xmlNodePtr node) +{ + xmlChar* tmp; + xmlNodePtr child; + Object* pObject; + list arrows; + + Lock (); + tmp = xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId ((char*) tmp); + xmlFree (tmp); + } + child = node->children; + while (child) { + if (!strcmp ((const char*) child->name, "reaction-arrow")) + arrows.push_front (child); + else { + pObject = CreateObject ((const char*) child->name, this); + if (pObject) { + if (!pObject->Load (child)) + delete pObject; + } else { + Lock (false); + return false; + } + } + child = child->next; + } + while (!arrows.empty ()) { + child = arrows.back (); + pObject = CreateObject ("reaction-arrow", this); + if (pObject) { + if (!pObject->Load (child)) + delete pObject; + } else { + Lock (false); + return false; + } + arrows.pop_back (); + } + Lock (false); + return true; +} + +static void do_destroy_reaction (void *data) +{ + Reaction *reaction = reinterpret_cast (data); + Document *pDoc = reinterpret_cast (reaction->GetDocument ()); + WidgetData *pData = reinterpret_cast (g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data")); + pData->Unselect (reaction); + Operation *pOp = pDoc->GetNewOperation (GCP_MODIFY_OPERATION); + pOp->AddObject (reaction, 0); + delete reaction; + pDoc->FinishOperation (); +} + +bool Reaction::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + GtkActionGroup *group = gtk_action_group_new ("reaction"); + GtkAction *action = gtk_action_new ("destroy", _("Destroy the reaction"), NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + char buf[] = ""; + gtk_ui_manager_add_ui_from_string (UIManager, buf, -1, NULL); + GtkWidget *w = gtk_ui_manager_get_widget (UIManager, "/popup/destroy"); + g_signal_connect_swapped (w, "activate", G_CALLBACK (do_destroy_reaction), this); + Object::BuildContextualMenu (UIManager, object, x, y); + return true; +} + +double Reaction::GetYAlign () +{ + map::iterator i; + Object *pObj; + pObj = GetFirstChild (i); + double y = DBL_MAX, new_y; + while (pObj) { + if (pObj->GetType () == ReactionStepType) + if ((new_y = pObj->GetYAlign ()) < y) + y = new_y; + pObj = GetNextChild (i); + } + return y; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction.h gnome-chemistry-utils-0.10.9/libs/gcp/reaction.h --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,104 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_REACTION_H +#define GCHEMPAINT_REACTION_H + +#include +#include + +/*!\file*/ +namespace gcp { + +/*!\class Reaction gcp/reaction.h +\brief Chemical reaction class. + +This class is used for chemical reactions in GChemPaint. It can represent a +whole reactions scheme with several steps, although only one step is currently +really supported. Acceptable children for an instance of this class are +instances of ReactionArrow and ReactionStep. +*/ +class Reaction: public gcu::Object +{ +public: +/*! +Constructs a new empty Reaction instance. +*/ + Reaction (); +/*! +The destructor. +*/ + virtual ~Reaction (); + +/*! +@param Children the list of objects used as children to build the reaction + +This method is called to build a reactiont from its children. It might fail if +reactants are not properly aligned with the reaction arrows. Accepted +children are molecules and texts to be used as reactants or products, and +reaction arrows. +@return true in case of success and false if failed. +*/ + bool Build (std::list& Children) throw (std::invalid_argument); +/*! +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +@param UIManager the GtkUIManager to populate. +@param object the Object on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +This method is called to build a contextual menu for the reaction. +@return true if something is added to the UIManager, false otherwise. +*/ + bool BuildContextualMenu (GtkUIManager *UIManager, gcu::Object *object, double x, double y); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework when a signal has been emitted for +the reaction, when one of its children changed. +It should not be called by a program; call Object::EmitSignal instead. + +@return true if the signal should be propagated to the parent, false otherwise. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); +/*! +@param node: a pointer to the xmlNode containing the serialized reaction. + +Used to load an reaction in memory. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +Used to retrieve the y coordinate for alignment. +@return y coordinate used for the reaction alignment. +*/ + double GetYAlign (); +}; + +} // namespace gcp + +#endif //GCHEMPAINT_REACTION_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-operator.cc gnome-chemistry-utils-0.10.9/libs/gcp/reaction-operator.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-operator.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-operator.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,189 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-operator.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "reaction-operator.h" +#include "settings.h" +#include "document.h" +#include "theme.h" +#include "view.h" +#include "widgetdata.h" +#include +#include +#include +#include +#include + +using namespace gcu; + +namespace gcp { + +ReactionOperator::ReactionOperator (): Object (ReactionOperatorType) +{ +} + +ReactionOperator::~ReactionOperator () +{ +} + +void ReactionOperator::Add (GtkWidget* w) const +{ + if (!w) + return; + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + double x, y; + GetCoords (&x, &y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + double dFontHeight = pData->m_View->GetFontHeight (); + GnomeCanvasItem* item; + GnomeCanvasGroup* group; + gint width, height; + PangoContext* pc = pData->m_View->GetPangoContext (); + group = GNOME_CANVAS_GROUP (gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL)); + pData->Items[this] = group; + g_signal_connect (G_OBJECT (group), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (group), "object", (void *) this); + const gchar* symbol = "+"; + const_cast (this)->m_Layout = pango_layout_new (pc); + pango_layout_set_text (m_Layout, symbol, strlen (symbol)); + PangoRectangle rect; + pango_layout_get_extents (m_Layout, &rect, NULL); + width = rect.width / PANGO_SCALE; + height = rect.height / PANGO_SCALE; + item = gnome_canvas_item_new ( + group, + gnome_canvas_rect_ext_get_type (), + "x1", x - (double) width / 2 - pTheme->GetPadding (), + "y1", y - dFontHeight / 2 - pTheme->GetPadding (), + "x2", x + (double) width / 2 + pTheme->GetPadding (), + "y2", y + dFontHeight / 2 + pTheme->GetPadding (), + "fill_color", "white", + NULL); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (group), "background",item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + item = gnome_canvas_item_new ( + group, + gnome_canvas_pango_get_type (), + "layout", m_Layout, + "x", rint (x), + "y", rint (y), + "anchor", GTK_ANCHOR_CENTER, + "fill_color", (pData->IsSelected (this))? SelectColor: Color, + NULL); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (group), "text",item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); +} + +void ReactionOperator::Update (GtkWidget* w) const +{ + if (!w) + return; + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + double x, y; + GetCoords (&x, &y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + double dFontHeight = pData->m_View->GetFontHeight (); + GnomeCanvasItem* item; + GnomeCanvasGroup* group = pData->Items[this]; + gint width, height; + PangoContext* pc = pData->m_View->GetPangoContext (); + const gchar* symbol = "+"; + PangoLayout *pl = pango_layout_new (pc); + pango_layout_set_text (pl, symbol, strlen (symbol)); + PangoRectangle rect; + pango_layout_get_extents (pl, &rect, NULL); + width = rect.width / PANGO_SCALE; + height = rect.height / PANGO_SCALE; + item = (GnomeCanvasItem*) g_object_get_data (G_OBJECT (group), "background"); + g_object_set (G_OBJECT (item), + "x1", x - (double) width / 2 - pTheme->GetPadding (), + "y1", y - dFontHeight / 2 - pTheme->GetPadding (), + "x2", x + (double) width / 2 + pTheme->GetPadding (), + "y2", y + dFontHeight / 2 + pTheme->GetPadding (), + NULL); + item = (GnomeCanvasItem*) g_object_get_data (G_OBJECT (group), "text"); + g_object_set (G_OBJECT (item), + "x", rint (x), + "y", rint (y), + NULL); +} + +void ReactionOperator::SetSelected (GtkWidget* w, int state) +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + gchar const *color; + switch (state) { + case SelStateUnselected: + color = Color; + break; + case SelStateSelected: + color = SelectColor; + break; + case SelStateUpdating: + color = AddColor; + break; + case SelStateErasing: + color = DeleteColor; + break; + default: + color = Color; + break; + } + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "text")), "fill_color", color, NULL); +} + +void ReactionOperator::Move (double x, double y, double z) +{ + m_x += x; + m_y += y; +} + +void ReactionOperator::SetCoords (double x, double y) +{ + m_x = x; + m_y = y; +} + +bool ReactionOperator::GetCoords (double* x, double* y) const +{ + *x = m_x; + *y = m_y; + return true; +} + +double ReactionOperator::GetYAlign () +{ + return m_y; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-operator.h gnome-chemistry-utils-0.10.9/libs/gcp/reaction-operator.h --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-operator.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-operator.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,108 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-operator.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_REACTION_OPERATOR_H +#define GCHEMPAINT_REACTION_OPERATOR_H + +#include + +/*!\file*/ +namespace gcp { + +/*!\class ReactionOperator gcp/reaction-operator.h +\brief Class for '+' signs in chemical reaction equations. + +Objects of this class are added when useful by the framework. There is no need +to create them manually. +*/ +class ReactionOperator: public gcu::Object +{ +public: +/*! +The constructor. Adds a '+' sign in the chemical equation. +*/ + ReactionOperator (); +/*! +The destructor. +*/ + virtual ~ReactionOperator (); + +/*! +@param w the GtkWidget inside which the operator will be displayed. + +Used to add a representation of the operator in the widget. +*/ + virtual void Add (GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the operator is displayed. + +Used to update the representation of the operator in the widget. +*/ + virtual void Update (GtkWidget* w) const; +/*! +@param x the x component of the transation vector. +@param y the y component of the transation vector. +@param z the z component of the transation vector (unused). + +Moves the reaction operator. +*/ + virtual void Move (double x, double y, double z = 0); +/*! +@param w: the GtkWidget inside which the operator is displayed. +@param state: the selection state of the operator. + +Used to set the selection state of the operator inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. Children will be selected too. +*/ + virtual void SetSelected (GtkWidget* w, int state); +/*! +@param x the new x coordinate of the operator. +@param y the new y coordinate of the operator. + +Sets the coordinates of the operator. The values are understood horizontally +as left side and vertically as base line. +*/ + void SetCoords (double x, double y); +/*! +@param x where to store the x coordinate of the operator. +@param y where to store the y coordinate of the operator. + +Retrieves the current coordinates of the operator. +*/ + bool GetCoords (double* x, double* y) const; +/*! +Used to retrieve the y coordinate for alignment. +@return y coordinate used for reaction operators alignment. +*/ + virtual double GetYAlign (); + +private: + double m_x, m_y; + PangoLayout *m_Layout; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_REACTION_OPERATOR_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop.cc gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,108 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-prop.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "document.h" +#include "reaction-prop.h" +#include "reaction-arrow.h" +#include +#include + +using namespace gcu; + +namespace gcp { + +TypeId ReactionPropType = NoType; + +char const *ReactionPropRoles[] = { + N_("Unkown"), + N_("Catalyst"), + N_("Reactant"), + N_("Product"), + N_("Solvent"), + N_("Temperature"), + N_("Pressure"), + N_("Time"), + N_("Enthalpy"), +}; + +static unsigned RoleFromString (char const *role) +{ + unsigned res = REACTION_PROP_MAX; + while (res > REACTION_PROP_UNKNOWN && + !strcmp (ReactionPropRoles[--res], role)); + return res; +} + +ReactionProp::ReactionProp (): + Object (ReactionPropType), + DialogOwner () +{ +} + +ReactionProp::ReactionProp (ReactionArrow *parent, Object *child): + Object (ReactionPropType), + DialogOwner (), + m_Object (child), + m_Role (REACTION_PROP_UNKNOWN) +{ + SetParent (parent); + AddChild (child); +} + +ReactionProp::~ReactionProp () +{ +} + +xmlNodePtr ReactionProp::Save (xmlDocPtr xml) +{ + xmlNodePtr node; + node = Object::Save (xml); + if (!node) + return NULL; + xmlNewProp (node, (xmlChar*) "role", (xmlChar*) ReactionPropRoles[m_Role]); + return node; +} + +bool ReactionProp::Load (xmlNodePtr node) +{ + bool res = Object::Load (node); + if (res) { + char *buf = (char*) xmlGetProp (node, (xmlChar*) "role"); + if (buf) { + m_Role = RoleFromString (buf); + xmlFree (buf); + } + } + return res; +} + +bool ReactionProp::OnSignal (SignalId Signal, Object *Child) +{ + if (Signal == OnChangedSignal && !HasChildren ()) + delete this; + return true; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop-dlg.cc gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop-dlg.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop-dlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop-dlg.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,59 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-prop-dlg.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "reaction-prop-dlg.h" +#include "reaction-arrow.h" +#include "reaction-prop.h" +#include + +using namespace gcu; + +namespace gcp { + +static void on_role_changed (GtkComboBox *box, ReactionProp *prop) +{ + prop->SetRole (gtk_combo_box_get_active (box)); +} + +ReactionPropDlg::ReactionPropDlg (ReactionArrow *arrow, ReactionProp *prop): + Dialog (arrow->GetDocument ()->GetApp (), GLADEDIR"/arrow-object.glade", "reaction-prop", prop), + m_Arrow (arrow), + m_Prop (prop) +{ + GtkComboBox *box = (GtkComboBox *) glade_xml_get_widget (xml, "role-combo"); + int max = (prop->GetObject ()->GetType () == MoleculeType)? + REACTION_PROP_MAX_MOL: REACTION_PROP_MAX; + for (int i = REACTION_PROP_UNKNOWN; i < max; i++) + gtk_combo_box_append_text (box, ReactionPropRoles[i]); + gtk_combo_box_set_active (box, prop->GetRole ()); + g_signal_connect (G_OBJECT (box), "changed", G_CALLBACK (on_role_changed), prop); + gtk_widget_show (GTK_WIDGET(dialog)); +} + +ReactionPropDlg::~ReactionPropDlg () +{ +} + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop-dlg.h gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop-dlg.h --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop-dlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop-dlg.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,68 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-prop-dlg.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_REACTION_PROP_DLG_H +#define GCHEMPAINT_REACTION_PROP_DLG_H + +#include +#include +#include + +/*!\file*/ +namespace gcp { + +class ReactionArrow; + +class ReactionProp; + +/*!\class ReactionPropDlg gcp/reaction-prop-dlg.h +\brief reaction properties dialog box class. + +The class for the dialog used to set the properties of objects attached to +reaction arrows. +*/ +class ReactionPropDlg: public gcu::Dialog +{ +public: +/*! +@param arrow the reaction arrow to which the object is attached. +@param prop the associated reaction property. + +Builds and shows the reaction properties dialog box for \a arrow and \a prop. +*/ + ReactionPropDlg (ReactionArrow *arrow, ReactionProp *prop); +/*! +The destructor. +*/ + virtual ~ReactionPropDlg (); + +private: + ReactionArrow *m_Arrow; + ReactionProp *m_Prop; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_REACTION_PROP_H + diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop.h gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop.h --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-prop.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-prop.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,165 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-prop.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_REACTION_PROP_H +#define GCHEMPAINT_REACTION_PROP_H + +#include +#include +#include + +/*!\file*/ +namespace gcp { + +extern gcu::TypeId ReactionPropType; +class ReactionArrow; + +/*! +This enumerates the known roles of objects attached to a reaction arrow +*/ +enum { +/*! +Unkonw role. +*/ + REACTION_PROP_UNKNOWN, +/*! +Catalyst +*/ + REACTION_PROP_CATALYST, +/*! +Reactant +*/ + REACTION_PROP_REACTANT, +/*! +Product +*/ + REACTION_PROP_PRODUCT, +/*! +Solvent +*/ + REACTION_PROP_SOLVENT, +/*! +Values allowed for molecules are lower than this one +*/ + REACTION_PROP_MAX_MOL, +/*! +Temperature +*/ + REACTION_PROP_TEMPERATURE = REACTION_PROP_MAX_MOL, +/*! +Pressure +*/ + REACTION_PROP_PRESSURE, +/*! +Reaction time. +*/ + REACTION_PROP_TIME, +/*! +Reaction enthalpy +*/ + REACTION_PROP_ENTHALPY, +/*! +The first value greater than all knwo values. +*/ + REACTION_PROP_MAX, +}; + +/*! +The names associated with the various roles knwon for objects attached to +reaction arrows. These names are used for serialization. +*/ +extern char const *ReactionPropRoles[]; + +/*!\class ReactionProp gcp/reaction-prop.h +This is a container class for objects attached to a reaction arrow. +*/ + +class ReactionProp: public gcu::Object, public gcu::DialogOwner +{ +public: +/*! +The default constructor. +*/ + ReactionProp (); +/*! +@param parent the parent reaction arrow. +@param child the molecule or text to attach to the arrow. + +Builds a new reactionproperty, and attach the child to the arrow. +*/ + ReactionProp (ReactionArrow *parent, gcu::Object *child); +/*! +The destructor. +*/ + ~ReactionProp (); + +/*! +@param xml the xmlDoc used to save the document. + +Used to save the reaction property to the xmlDoc. +@return the xmlNode containing the serialized reaction property. +*/ + xmlNodePtr Save (xmlDocPtr xml); +/*! +@param node: a pointer to the xmlNode containing the serialized reaction property. + +Used to load a reaction property in memory. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework when a signal has been emitted for +the reaction property, when one its emedded object changed. +It should not be called by a program; call Object::EmitSignal instead. + +@return true to be propagate the signal to the parent. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); + +private: +/*!\fn GetObject() +@return the embedded object. +*/ +GCU_RO_PROP (gcu::Object*, Object); +/*!\fn SetRole(unsigned Role) +@param Role the new role for the property. + +Sets the role for the property which should be less than REACTION_PROP_MAX. +*/ +/*!\fn GetRole() +@return the property role. +*/ +/*!\fn GetRefRole() +@return the property role as a reference. +*/ +GCU_PROP (unsigned, Role); +}; + +} // namespace gcp + + +#endif // GCHEMPAINT_REACTION_PROP_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-step.cc gnome-chemistry-utils-0.10.9/libs/gcp/reaction-step.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-step.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-step.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,289 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-step.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "reaction-step.h" +#include "reaction.h" +#include "reactant.h" +#include "reaction-arrow.h" +#include "reaction-operator.h" +#include "document.h" +#include "theme.h" +#include "view.h" +#include "widgetdata.h" +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +TypeId ReactionStepType = NoType; + +ReactionStep::ReactionStep (): Object (ReactionStepType) +{ + SetId ("rs1"); + m_bLoading = false; +} + +ReactionStep::ReactionStep (Reaction *reaction, map& Children, map Objects): Object (ReactionStepType) +{ + SetId ("rs1"); + reaction->AddChild (this); + GetDocument ()->EmptyTranslationTable (); + Document *pDoc = dynamic_cast (GetDocument ()); + Theme *pTheme = pDoc->GetTheme (); + WidgetData *pData= (WidgetData*) g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data"); + map::iterator im, endm; + double x, y, x0, y0, x1, y1; + ArtDRect *rect; + Object *cur; + im = Children.begin (); + new Reactant (this, (*im).second); + endm = Children.end (); + rect = &Objects[(*im).second]; + x = rect->x1; + y = (*im).second->GetYAlign (); + for (im++; im != endm; im++) { + x += pTheme->GetSignPadding (); + //Add a sign + ReactionOperator* pOp = new ReactionOperator (); + AddChild (pOp); + pOp->SetCoords (x / pTheme->GetZoomFactor (), y); + pDoc->AddObject (pOp); + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (pData->Items[pOp]), &x0, &y0, &x1, &y1); + pOp->Move ((x - x0) / pTheme->GetZoomFactor (), 0); + x += pTheme->GetSignPadding () + x1 - x0; + cur = (*im).second; + new Reactant (this, cur); + rect = &Objects[cur]; + y0 = cur->GetYAlign (); + cur->Move ((x - rect->x0) / pTheme->GetZoomFactor (), y - y0); + x+= rect->x1 - rect->x0; + } + Update (pData->Canvas); + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + m_bLoading = false; +} + +ReactionStep::~ReactionStep () +{ + if (IsLocked ()) + return; + set::iterator i, end = m_Arrows.end(); + for (i = m_Arrows.begin (); i != end; i++) + (*i)->RemoveStep (this); + /* If there are no chidren, don't care and exit */ + if (!GetChildrenNumber ()) + return; + /* Now, destroy children and add the reactant contents to the reaction parent, + not to the reaction */ + Document *pDoc = reinterpret_cast (GetDocument ()); + Operation *pOp = pDoc->GetCurrentOperation (); + Reaction *pReaction = reinterpret_cast (GetParent ()); + if (!pReaction) + return; + Object *pObj = pReaction->GetParent (), *Child, *Group = pReaction->GetGroup (); + map::iterator j; + Reactant *pReactant; + while (HasChildren ()) { + Child = GetFirstChild (j); + if (Child->GetType () == ReactionOperatorType) { + pDoc->Remove (Child); + continue; + } + pReactant = reinterpret_cast (Child); + Child = pReactant->GetStoichChild (); + if (Child) + pDoc->Remove (Child); + Child = pReactant->GetChild (); + if (Child) { + Child->SetParent (pObj); + if (pOp && !Group) + pOp->AddObject (Child, 1); + } + delete pReactant; + } +} + +xmlNodePtr ReactionStep::Save (xmlDocPtr xml) const +{ + xmlNodePtr node; + node = xmlNewDocNode (xml, NULL, (xmlChar*) "reaction-step", NULL); + if (!node) return NULL; + SaveId (node); + map::const_iterator i; + Object const *obj = GetFirstChild (i); + xmlNodePtr child; + while (obj) { + if ((*i).second->GetType () != ReactionOperatorType) { + if ((child = (*i).second->Save (xml))) + xmlAddChild (node, child); + else + return NULL; + } + obj = GetNextChild (i); + } + return node; +} + +bool ReactionStep::Load (xmlNodePtr node) +{ + m_bLoading = true; + if (!Object::Load (node)) + return false; + map Objects; + map Children; + ArtDRect rect; + map::iterator i; + Object *pObj = GetFirstChild (i); + Document *pDoc = dynamic_cast (GetDocument ()); + Theme *pTheme = pDoc->GetTheme (); + WidgetData *pData= (WidgetData*) g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data"); + map::iterator im, endm; + double x, y, x0, y0, x1, y1; + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + while (pObj) { + pData->GetObjectBounds (pObj, &rect); + x = (rect.x0 + rect.x1) / 2; + while (Children[x] != NULL) + x += 1e-5; + Children[x] = pObj; + Objects[pObj] = rect; + pObj = GetNextChild (i); + } + im = Children.begin (); + endm = Children.end (); + rect = Objects[(*im).second]; + x = rect.x1; + y = (*im).second->GetYAlign (); + for (im++; im != endm; im++) { + x += pTheme->GetSignPadding (); + //Add a sign + ReactionOperator* pOp = new ReactionOperator(); + AddChild (pOp); + pOp->SetCoords(x / pTheme->GetZoomFactor (), y); + pDoc->AddObject(pOp); + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (pData->Items[pOp]), &x0, &y0, &x1, &y1); + pOp->Move ((x - x0) / pTheme->GetZoomFactor (), 0); + x += pTheme->GetSignPadding () + x1 - x0; + pObj = (*im).second; + rect = Objects[pObj]; + x+= rect.x1 - rect.x0; + } + Update (pData->Canvas); + m_bLoading = false; + return true; +} + +double ReactionStep::GetYAlign () +{ + map::iterator i; + GetFirstChild (i); + return ((*i).second)? (*i).second->GetYAlign (): 0.; +} + +bool ReactionStep::OnSignal (SignalId Signal, Object *Child) +{ + if (Signal == OnChangedSignal) { + if (m_bLoading) + return false; + map Objects; + map Children; + list Operators; + ArtDRect rect; + map::iterator i; + Object *pObj = GetFirstChild (i); + Document *pDoc = dynamic_cast (GetDocument ()); + Theme *pTheme = pDoc->GetTheme (); + View *pView = pDoc->GetView (); + WidgetData *pData= (WidgetData*) g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data"); + map::iterator im, endm; + double x, y, x0, y0, x1, y1; +// gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + while (pObj) { + if (pObj->GetType () == ReactionOperatorType) + Operators.push_front (pObj); + else { + pData->GetObjectBounds (pObj, &rect); + x = (rect.x0 + rect.x1) / 2; + while (Children[x] != NULL) + x += 1e-5; + Children[x] = pObj; + Objects[pObj] = rect; + } + pObj = GetNextChild (i); + } + while (!Operators.empty ()) { + pObj = Operators.front (); + pView->Remove (pObj); + delete pObj; + Operators.pop_front (); + } + im = Children.begin (); + endm = Children.end (); + rect = Objects[(*im).second]; + x = rect.x1; + y = (*im).second->GetYAlign (); + for (im++; im != endm; im++) { + x += pTheme->GetSignPadding (); + //Add a sign + ReactionOperator* pOp = new ReactionOperator(); + AddChild (pOp); + pOp->SetCoords(x / pTheme->GetZoomFactor (), y); + pDoc->AddObject(pOp); + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (pData->Items[pOp]), &x0, &y0, &x1, &y1); + pOp->Move ((x - x0) / pTheme->GetZoomFactor (), 0); + x += pTheme->GetSignPadding () + x1 - x0; + pObj = (*im).second; + rect = Objects[pObj]; + pObj->Move ((x - rect.x0) / pTheme->GetZoomFactor (), y - pObj->GetYAlign ()); + x+= rect.x1 - rect.x0; + } + Update (pData->Canvas); + return true; + } else + return true; +} + +void ReactionStep::RemoveArrow (ReactionArrow *arrow) { + m_Arrows.erase (arrow); + if (m_Arrows.empty ()) { + // if there is no more arrows this is no more a reaction step + delete this; + } +} + +void ReactionStep::Add (GtkWidget* w) const +{ + /* Now that Object::Add adds children, we need to override this method + because a molecule children (atoms, bonds, and fragments) are added to + the widget by the document. FIXME! FIXME! FIXME! CHANGE THIS OLD WEIRD CODE! + */ +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/reaction-step.h gnome-chemistry-utils-0.10.9/libs/gcp/reaction-step.h --- gnome-chemistry-utils-0.8.6/libs/gcp/reaction-step.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/reaction-step.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,130 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * reaction-step.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_REACTION_STEP_H +#define GCHEMPAINT_REACTION_STEP_H + +#include +#include +#include + +/*!\file*/ +namespace gcp { + +class Reaction; +class ReactionArrow; + +extern gcu::TypeId ReactionStepType; + +/*!\class ReactionStep gcp/reaction-step.h +\brief the list of reactants before or after a reaction arrow. + +The ReactionStep class is a group class which owns a list of reactants and +the operators betwwen them. This class is misnamed, since the step is more +generally associated with the arrow. It might be renamed ReactionStage in the +future if it is possible without making old files unreadable. +*/ +class ReactionStep: public gcu::Object +{ +public: +/*! +The default constructor. +*/ + ReactionStep (); +/*! +The destructor. +*/ + virtual ~ReactionStep (); + +/*! +@param reaction the parent reaction. +@param Children the reactants from which to build the new instance. +@param Objects the rectangles bounding the reactants. + +Buils a new reaction step from the children and adds as many eaction operators +as necessary. All children will be horizontally aligned. +*/ + ReactionStep (Reaction *reaction, std::map& Children, std::map Objects); + +/*! +@param w the GtkWidget inside which the step will be displayed. + +Calledto add a representation of the step in the widget. This is done for all +objects but in the case of reaction steps, it does nothing. Just there to override +the default. +*/ + void Add (GtkWidget* w) const; +/*! +@param xml the xmlDoc used to save the document. + +Used to save the reaction step to the xmlDoc. +@return the xmlNode containing the serialized step. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node: a pointer to the xmlNode containing the serialized step. + +Used to load a reaction step in memory. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); +/*! +Used to retrieve the y coordinate for alignment. +@return y coordinate used for the reaction step alignment. +*/ + double GetYAlign (); +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework when a signal has been emitted for +the reaction step, when one of its children changed. +It should not be called by a program; call Object::EmitSignal instead. + +@return true if the signal should be propagated to the parent, false otherwise. +*/ + bool OnSignal (gcu::SignalId Signal, gcu::Object *Child); + +/*! +@param arrow an arrow related to this instance. + +Adds an arrow to the list of arrows related to this instance. +*/ + void AddArrow (ReactionArrow *arrow) {m_Arrows.insert (arrow);} +/*! +@param arrow an arrow related to this instance. + +Removes an arrow from the list of arrows related to this instance when it +not anymore relevant. +*/ + void RemoveArrow (ReactionArrow *arrow); + +private: + bool m_bLoading; + std::set m_Arrows; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_REACTION_STEP_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/residue.cc gnome-chemistry-utils-0.10.9/libs/gcp/residue.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/residue.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/residue.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,124 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * residue.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "residue.h" +#include "document.h" +#include "molecule.h" +#include +#include + +xmlDocPtr user_residues = NULL; + +using namespace std; + +namespace gcp +{ + +void (*Residue::m_AddCb) (Residue *res) = NULL; + +Residue::Residue (): gcu::Residue () +{ + m_Document = new Document (NULL, true, NULL); + m_Node = m_MolNode = NULL; + m_Refs = 0; +} + +Residue::Residue (char const *name): gcu::Residue (name) +{ + m_Document = new Document (NULL, true, NULL); + m_Node = m_MolNode = NULL; + m_Refs = 0; +} + +Residue::Residue (char const *name, char const *symbol, Molecule *mol, Document *doc): gcu::Residue (name, doc) +{ + m_Document = new Document (NULL, true, NULL); + if (mol) + mol->SetParent (m_Document); + m_Molecule = mol; + if (symbol) + AddSymbol (symbol); + m_Node = m_MolNode = NULL; + if (m_AddCb && !doc && mol) + m_AddCb (this); + m_Refs = 0; +} + +Residue::~Residue () +{ +} + +void Residue::Load (xmlNodePtr node, bool ro) +{ + m_ReadOnly = ro; + m_Node = node; + m_MolNode = node->children; + while (m_MolNode && strcmp ((char const *) m_MolNode->name, "molecule")) + m_MolNode = m_MolNode->next; + if (!m_MolNode) { + cerr << "Invalid residue" << endl; + delete this; + return; + } + if (m_Molecule) { + m_Molecule->SetParent (NULL); // force destruction of children + delete m_Molecule; + } + m_Molecule = new Molecule (); + m_Document->AddChild (m_Molecule); + static_cast (m_Document)->SetLoading (true); + m_Molecule->Load (m_MolNode); + static_cast (m_Document)->SetLoading (false); + gcu::Residue::Load (node); +} + +bool Residue::operator== (gcu::Molecule const &mol) const +{ + return *m_Molecule == mol; +} + +void Residue::Register () +{ + m_MolNode = m_Node = NULL; // forces a new node + if (m_AddCb) + m_AddCb (this); +} + +void Residue::Ref () +{ + m_Refs++; + if (m_AddCb && !m_ReadOnly) + m_AddCb (NULL); +} + +void Residue::Unref () +{ + if (m_Refs) + m_Refs--; + if (m_AddCb && !m_ReadOnly) + m_AddCb (NULL); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/residue.h gnome-chemistry-utils-0.10.9/libs/gcp/residue.h --- gnome-chemistry-utils-0.8.6/libs/gcp/residue.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/residue.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,133 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * residue.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCP_RESIDUE_H +#define GCP_RESIDUE_H + +#include +#include + +/*!\file*/ +namespace gcp +{ + +class Application; +class Document; +class Molecule; + +/*!\class Residue gcp/residue.h +\brief a GChemPaint specific Residue class. + +This class adds some GChemPaint specific features to gcu::Residue. +*/ +class Residue: public gcu::Residue +{ +public: +/*! +The default constructor. +*/ + Residue (); +/*! +@param name the name of the new residue. + +Constructs a new residue with the given name. +*/ + Residue (char const *name); +/*! +@param name the name of the new residue. +@param symbol the symbol of the new residue. +@param mol the molecule represented by the residue. +@param doc the document owning the residue when it does not have global scope. + +Constructs a new residue using the given arguments. +*/ + Residue (char const *name, char const *symbol, Molecule *mol, Document *doc); +/*! +The destructor. +*/ + virtual ~Residue (); + +/*! +@param node an XML node. +@param ro whether the residue is read-only or not. + +Loads data GChemPaint specific data from \a node, and calls +gcu::Residue::Load(). +*/ + void Load (xmlNodePtr node, bool ro); +/*! +@param mol the molecule to compare to the residue. + +@return true if \a mol is identical to the group represented by this residue, +including the pseudo atom. +*/ + bool operator== (gcu::Molecule const &mol) const; +/*! +Registers the residue in the database. +*/ + void Register (); +/*! +Increments the references number by one unit. +*/ + void Ref (); +/*! +Decreases the references number by one unit. +*/ + void Unref (); + +/*! +@param cb a callback to call when a new residue is registered. + +When a new residue is registered in the database, it might be necessary to execute +some extra code, hence this static method. Only one callback can be registered +in this version. +*/ + static void SetPostAddCallback (void (*cb) (Residue *res)) {m_AddCb = cb;} + +private: + static void (*m_AddCb) (Residue *res); + +/*!\fn GetReadOnly() +@return true if the residue is read-only or false if it can be modified. +*/ +GCU_RO_PROP (bool, ReadOnly); +/*!\fn GetNode() +@return the XML node representing the residue. +*/ +GCU_RO_PROP (xmlNodePtr, Node); +/*!\fn GetMolNode() +@return the XML node representing the molecule associated to the residue. +*/ +GCU_RO_PROP (xmlNodePtr, MolNode); +/*!\fn GetRefs() +@return the number of uses of the residue in currently opened documents. This +is used to prevent deleting an used writeable residue. +*/ +GCU_RO_PROP (unsigned , Refs); +}; + +} // namespace gcp + +#endif // GCP_RESIDUE_H + diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/settings.cc gnome-chemistry-utils-0.10.9/libs/gcp/settings.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/settings.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/settings.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,40 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * settings.cc + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "settings.h" + +namespace gcp { + +gchar const *Color = "black"; +gchar const *DeleteColor = "red"; +gchar const *AddColor = "green"; +gchar const *SelectColor = "cyan"; +unsigned MaxStackSize = 0;//infinite size authorized for undo:redo stacks +bool MergeAtoms = true; +int CompressionLevel = 0; +bool TearableMendeleiev = false; +int ClipboardFormats = GCP_CLIPBOARD_NO_TEXT; + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/settings.h gnome-chemistry-utils-0.10.9/libs/gcp/settings.h --- gnome-chemistry-utils-0.8.6/libs/gcp/settings.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/settings.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,130 @@ +// -*- C++ -*- + +/* + * GChemPaint libray + * settings.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_SETTINGS_H +#define GCHEMPAINT_SETTINGS_H + +#include +#include + +#define ROOTDIR "/apps/gchemutils/paint/settings/" +#define GCP_CONF_DIR_SETTINGS "paint/settings" + +/*!\file*/ +namespace gcp { + +/*! +The color used for normal drawing. +*/ +extern const gchar *Color; +/*! +The color used for objects that are to be deleted. +*/ +extern const gchar *DeleteColor; +/*! +The color used for new objects. +*/ +extern const gchar *AddColor; +/*! +The color used for selected objects. +*/ +extern const gchar *SelectColor; +/*! +The stack size for undo/redo operations. Default is no limit. +*/ +extern unsigned MaxStackSize; +/*! +Whether to use existing atoms or create new one at the same place when +adding bonds. +*/ +extern bool MergeAtoms; +/*! +XML file compression level. +*/ +extern int CompressionLevel; +/*! +Whether the mendeleiv table widget might be detached from the tool box or not. +*/ +extern bool TearableMendeleiev; + +/*! +Clipboard formats identifiers +*/ +enum { +/*! +GChemPaint native xml data +*/ + GCP_CLIPBOARD_NATIVE, +/*! +SVG image format. +*/ + GCP_CLIPBOARD_SVG, +/*! +SVG+XML image format (actually equivalent to GCP_CLIPBOARD_SVG). +*/ + GCP_CLIPBOARD_SVG_XML, +/*! +Encapsulated Postscript (not really used). +*/ + GCP_CLIPBOARD_EPS, +/*! +PNG image format. +*/ + GCP_CLIPBOARD_PNG, +/*! +JPEG image format. +*/ + GCP_CLIPBOARD_JPEG, +/*! +BMP image format. +*/ + GCP_CLIPBOARD_BMP, +/*! +Number of supported formats, excluding string formats which are used +only for debugging purposes. +*/ + GCP_CLIPBOARD_NO_TEXT, +/*! +UTF8 string. +*/ + GCP_CLIPBOARD_UTF8_STRING = GCP_CLIPBOARD_NO_TEXT, +/*! +ASCII string. +*/ + GCP_CLIPBOARD_STRING, +/*! +Number of supported formats, including string formats +*/ + GCP_CLIPBOARD_ALL, +}; + +/*! +Number of really used clipboard formats when copying +should be either GCP_CLIPBOARD_NO_TEXT or GCP_CLIPBOARD_ALL +*/ +extern int ClipboardFormats; + +} // namespace gcp + +#endif // GCHEMPAINT_SETTINGS_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/stringdlg.cc gnome-chemistry-utils-0.10.9/libs/gcp/stringdlg.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/stringdlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/stringdlg.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,219 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * stringdlg.cc + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "stringdlg.h" +#include "document.h" +#include "application.h" +#include "widgetdata.h" +#include "window.h" +#include +#include +#include +#include + +using namespace std; + +namespace gcp { + +static GtkTargetEntry const stargets[] = { + {(char *)"STRING", 0, 0} +}; + +static void on_copy (StringDlg *dlg) +{ + dlg->Copy (); +} + +static void on_get_data(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, StringDlg *dlg) +{ + dlg->OnGetData (clipboard, selection_data, info); +} + +static void on_string_clear_data(GtkClipboard *clipboard, StringDlg *dlg) +{ +} + +StringDlg::StringDlg (Document *pDoc, string& data, enum data_type type): + Dialog (pDoc->GetApplication(), GLADEDIR"/stringdlg.glade", "string") +{ + Data = data; + Type = type; + gtk_window_set_title (dialog, (Type == SMILES)? "SMILES": "InChI"); + View = GTK_TEXT_VIEW (glade_xml_get_widget (xml, "text")); + Buffer = gtk_text_view_get_buffer (View); + gtk_text_buffer_set_text (Buffer, data.c_str () , -1); + GtkWidget *w = glade_xml_get_widget (xml, "copy"); + g_signal_connect_swapped (w, "clicked", G_CALLBACK (on_copy), this); + gtk_window_set_transient_for (dialog, pDoc->GetWindow ()->GetWindow ()); +} + +StringDlg::~StringDlg () +{ +} + +bool StringDlg::Apply () +{ + GtkFileChooserDialog *dlg = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new ( + _("Save as"), dialog, GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, NULL); + gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_OK); + GtkFileChooser* chooser = GTK_FILE_CHOOSER (dlg); + GtkFileFilter* filter = gtk_file_filter_new (); + if (Type == SMILES) + gtk_file_filter_add_pattern (filter, "*.smi"); + else + gtk_file_filter_add_pattern (filter, "*.inchi"); + gtk_file_chooser_set_filter (chooser, filter); + // Now add network directories + gtk_file_chooser_set_local_only (chooser, false); + char const* dir = reinterpret_cast (m_App)->GetCurDir (); + if (dir) + gtk_file_chooser_set_current_folder_uri (chooser, dir); + char const *filename, *ext = (Type == SMILES)? ".smi": ".inchi"; + char *filename2; + bool err; + while (gtk_dialog_run (GTK_DIALOG (dlg)) == GTK_RESPONSE_ACCEPT) { + filename = gtk_file_chooser_get_uri (chooser); + if (!filename || !strlen (filename) || filename[strlen (filename) - 1] == '/') { + GtkWidget* message = gtk_message_dialog_new (dialog, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + _("Please enter a file name,\nnot a directory")); + gtk_window_set_icon_name (GTK_WINDOW (message), "gchempaint"); + gtk_dialog_run (GTK_DIALOG (message)); + gtk_widget_destroy (message); + continue; + } + if (strlen (ext) > strlen (filename) || + strcmp (filename + strlen (filename) - strlen (ext), ext)) + filename2 = g_strconcat (filename, ext, NULL); + else + filename2 = g_strdup (filename); + GFile *file = g_file_new_for_uri (filename2); + err = g_file_query_exists (file, NULL); + gint result = GTK_RESPONSE_YES; + if (err) { + char *unescaped = g_uri_unescape_string (filename2, NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), unescaped); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + } + if (result == GTK_RESPONSE_YES) + { + // destroy the old file + GError *error = NULL; + if (err) { + g_file_delete (file, NULL, &error); + if (error) { + char *unescaped = g_uri_unescape_string (filename2, NULL); + gchar * message = g_strdup_printf (_("Error while processing %s:\n%s"), unescaped, error->message); + g_free (unescaped); + g_error_free (error); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + g_object_unref (file); + continue; + } + } + ostringstream ofs; + GOutputStream *output = G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, NULL, &error)); + if (error) { + char *unescaped = g_uri_unescape_string (filename2, NULL); + gchar * message = g_strdup_printf (_("Could not open file %s, error was:\n%s"), unescaped, error->message); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + g_error_free (error); + g_object_unref (file); + continue; + } + ofs << Data; + ofs << endl; + gsize nb = ofs.str ().size (), n = 0; + while (n < nb) { + n += g_output_stream_write (output, ofs.str ().c_str () + n, nb - n, NULL, &error); + if (error) { + char *unescaped = g_uri_unescape_string (filename2, NULL); + gchar * message = g_strdup_printf (_("Could not write to file %s, error was:\n%s."), unescaped, error->message); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + g_error_free (error); + g_object_unref (file); + continue; + } + } + g_output_stream_close (output, NULL, &error); + g_object_unref (file); + if (error) { + char *unescaped = g_uri_unescape_string (filename2, NULL); + gchar * message = g_strdup_printf (_("Could not close file %s, error was:\n%s"), unescaped, error->message); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + g_error_free (error); + continue; + } + break; + } + g_free (filename2); + } + gtk_widget_destroy (GTK_WIDGET (dlg)); + return true; +} + +void StringDlg::Copy () +{ + GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); + gtk_clipboard_set_with_data (clipboard, stargets, 1, + (GtkClipboardGetFunc) on_get_data, + (GtkClipboardClearFunc) on_string_clear_data, this); + gtk_clipboard_request_contents (clipboard, + gdk_atom_intern ("TARGETS", FALSE), + (GtkClipboardReceivedFunc) on_receive_targets, + m_App); +} + +void StringDlg::OnGetData (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info) +{ + gtk_selection_data_set_text(selection_data, (const gchar*) Data.c_str (), Data.length ()); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/stringdlg.h gnome-chemistry-utils-0.10.9/libs/gcp/stringdlg.h --- gnome-chemistry-utils-0.8.6/libs/gcp/stringdlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/stringdlg.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,96 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * stringdlg.h + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_STRING_DLG_H +#define GCHEMPAINT_STRING_DLG_H + +#include +#include + +/*!\file*/ +namespace gcp { + +class Document; + +/*!\class StringDlg gcp/stringdlg.h +Represents the dialog used to display the InChI or canonical SMILES of a molecule. +*/ +class StringDlg: public gcu::Dialog +{ +public: +/*!\enum data_type +The string types supported by StringDlg. +*/ + enum data_type { +/*! +SMILES representation of a molecule. +*/ + SMILES, +/*! +InChI of a molecule. +*/ + INCHI + }; +/*! +@param pDoc the document owning the dialog. +@param data the string to display. +@param type the type of the data. + +Builds a dialog showing the string and display it. \a type is used to select +an appropriate title for the dialog box. +*/ + StringDlg (Document *pDoc, std::string& data, enum data_type type); +/*! +The destructor. +*/ + virtual ~StringDlg (); + +/*! +Called by the framework to save the string to a file upon user request. +*/ + bool Apply (); +/*! +Called by the framework when the user clicks the "Copy" button. +*/ + void Copy (); +/*! +@param clipboard the clipboard requesting the data. +@param selection_data the GtkSelectionData to which the string should be copied. +@param info the type of data requested. Unused since only ASCII strings are +supported. + +Called by the framework to get the actual data for the clipboard. +*/ + void OnGetData (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info); + +private: + enum data_type Type; + std::string Data; + GtkTextView *View; + GtkTextBuffer *Buffer; +}; + +} // namespace gcp + +#endif //GCHEMPAINT_STRING_DLG_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/target.cc gnome-chemistry-utils-0.10.9/libs/gcp/target.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/target.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/target.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,78 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * target.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "target.h" +#include "application.h" +#include "document.h" +#include "view.h" + +namespace gcp { + +static bool on_focus_in (GtkWidget *widget, GdkEventFocus *event, Target *target) +{ + target->GetDocument ()->GetView ()->ShowCursor (true); + gcp::Application *App = target->GetApplication (); + App->NotifyFocus (true, target); + gtk_clipboard_request_contents (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD), gdk_atom_intern ("TARGETS", FALSE), (GtkClipboardReceivedFunc) gcp::on_receive_targets, App); + return false; +} + +static bool on_focus_out (GtkWidget *widget, GdkEventFocus *event, Target *target) +{ + target->GetDocument ()->GetView ()->ShowCursor (false); + target->GetApplication ()->NotifyFocus (false); + return false; +} + +static bool on_state (GtkWidget *widget, GdkEventWindowState *event, Target *target) +{ + if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) + target->GetApplication ()->NotifyIconification (event->new_window_state & GDK_WINDOW_STATE_ICONIFIED); + return true; +} + +Target::Target (Application *App): + gcu::Window (), + m_Application (App) +{ + if (m_Application) + m_Application->AddTarget (this); +} + +Target::~Target () +{ + if (m_Application) + m_Application->DeleteTarget (this); +} + +void Target::SetWindow (GtkWindow *window) +{ + m_Window = window; + g_signal_connect (G_OBJECT (m_Window), "focus_in_event", G_CALLBACK (on_focus_in), this); + g_signal_connect (G_OBJECT (m_Window), "focus_out_event", G_CALLBACK (on_focus_out), this); + g_signal_connect (G_OBJECT (m_Window), "window-state-event", G_CALLBACK (on_state), this); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/target.h gnome-chemistry-utils-0.10.9/libs/gcp/target.h --- gnome-chemistry-utils-0.8.6/libs/gcp/target.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/target.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,89 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * target.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCP_TARGET_H +#define GCP_TARGET_H + +#include +#include +#include + +/*!\file*/ +namespace gcp { + +class Application; +class Document; + +/*!\class Target +The base class for windows able to edit GChemPaint files. When one of these +windows is active, the tools box is displayed on the same desktop. +gcp::Window is a derived class. Another one is gcpResidueDialog implemented +in the residue plugin (but not documented like everything implemented +in plugins). +*/ +class Target: public gcu::Window +{ +public: +/*! +@param App the application owning the target. + +Creates a target for the application. +*/ + Target (Application *App); +/*! +The destructor. +*/ + virtual ~Target (); + +/*! +@param window a GtkWindow. + +Sets \a window as the GtkWindow for this target. +*/ + void SetWindow (GtkWindow *window); + +/*! +virtual method called when the application ends to ensure everything is +correctly closed. This is a pure virtual class, so it must be overloaded. +*/ + virtual bool Close () = 0; +/*!\var m_Application +The gcp::Application owning this target. +*/ +/*!\fn GetApplication() +@return the gcp::Application owning this target. +*/ +GCU_PROT_PROP (Application*, Application) +/*!\var m_Document +The gcp::Document displayed in this target window. +*/ +/*!\fn GetApplication() +@return the gcp::Document displayed in this target window. +*/ +GCU_PROT_PROP (Document*, Document) +}; + +} // namespace gcp + +#endif // GCP_TARGET_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/text.cc gnome-chemistry-utils-0.10.9/libs/gcp/text.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/text.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/text.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,904 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * text.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "text.h" +#include "widgetdata.h" +#include "view.h" +#include "document.h" +#include "application.h" +#include "settings.h" +#include "theme.h" +#include "tool.h" +#include "window.h" +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +static void on_text_changed (Text *text) +{ + text->OnChanged (true); +} + +static void on_text_sel_changed (Text *text, struct GnomeCanvasPangoSelBounds *bounds) +{ + text->OnSelChanged (bounds); +} + +Text::Text (): TextObject (TextType), + m_Align (PANGO_ALIGN_LEFT), + m_Justified (false), + m_Anchor (GTK_ANCHOR_W) +{ +} + +Text::Text (double x, double y): TextObject (x, y, TextType), + m_Align (PANGO_ALIGN_LEFT), + m_Justified (false), + m_Anchor (GTK_ANCHOR_W) +{ +} + +Text::~Text () +{ +} + +void Text::GetCoords (double *x, double *y) +{ + *x = m_x; + *y = m_y; +} + +void Text::SetCoords (double x, double y) +{ + m_x = x; + m_y = y; +} + +class SaveStruct { +public: + SaveStruct (PangoAttribute *attribute); + ~SaveStruct (); + + SaveStruct *next, *children; + PangoAttribute *attr; +}; + +SaveStruct::SaveStruct (PangoAttribute *attribute) +{ + attr = pango_attribute_copy (attribute); + next = children = NULL; +} + +SaveStruct::~SaveStruct () +{ + pango_attribute_destroy (attr); + if (children) + delete children; + if (next) + delete next; +} + +static bool save_state (xmlDocPtr xml, xmlNodePtr node, char const *t, SaveStruct *s, unsigned index, int es, int ef, char const *f, int n) +{ + xmlNodePtr child = NULL; + switch (s->attr->klass->type) { + case PANGO_ATTR_FAMILY: + f = ((PangoAttrString*) s->attr)->value; + ef = s->attr->end_index; + if (es >= ef) { + char *str = g_strdup_printf ("%s %g", f, (double) n / PANGO_SCALE); + child = xmlNewDocNode (xml, NULL, (xmlChar*) "font", NULL); + xmlNewProp (child, (xmlChar*) "name", (xmlChar*) str); + g_free (str); + xmlAddChild (node, child); + } + break; + case PANGO_ATTR_STYLE: { + PangoStyle st = (PangoStyle) ((PangoAttrInt*) s->attr)->value; + if (st == PANGO_STYLE_NORMAL) + break; + child = xmlNewDocNode (xml, NULL, (xmlChar*) "i", NULL); + if (st == PANGO_STYLE_OBLIQUE) + xmlNewProp (child, (xmlChar*) "style", (xmlChar*) "oblique"); + xmlAddChild (node, child); + break; + } + case PANGO_ATTR_WEIGHT: { + PangoWeight w = (PangoWeight) ((PangoAttrInt*) s->attr)->value; + if (w == PANGO_WEIGHT_NORMAL) + break; + child = xmlNewDocNode (xml, NULL, (xmlChar*) "b", NULL); + if (w != PANGO_WEIGHT_BOLD) { + char *buf = g_strdup_printf ("%d", (int) w / 100); + xmlNewProp (child, (xmlChar*) "weight", (xmlChar*) buf); + g_free (buf); + } + xmlAddChild (node, child); + break; + } + case PANGO_ATTR_VARIANT: { + PangoVariant v = (PangoVariant) ((PangoAttrInt*) s->attr)->value; + if (v == PANGO_VARIANT_SMALL_CAPS) { + child = xmlNewDocNode (xml, NULL, (xmlChar*) "small-caps", NULL); + xmlAddChild (node, child); + } + break; + } + case PANGO_ATTR_STRETCH: { + PangoStretch st = (PangoStretch) ((PangoAttrInt*) s->attr)->value; + char const *stretch = NULL; + switch (st) { + case PANGO_STRETCH_ULTRA_CONDENSED: + stretch = "ultra-condensed"; + break; + case PANGO_STRETCH_EXTRA_CONDENSED: + stretch = "extra-condensed"; + break; + case PANGO_STRETCH_CONDENSED: + stretch = "condensed"; + break; + case PANGO_STRETCH_SEMI_CONDENSED: + stretch = "semi-condensed"; + break; + case PANGO_STRETCH_NORMAL: + break; + case PANGO_STRETCH_SEMI_EXPANDED: + stretch = "semi-expanded"; + break; + case PANGO_STRETCH_EXPANDED: + stretch = "expanded"; + break; + case PANGO_STRETCH_EXTRA_EXPANDED: + stretch = "extra-expanded"; + break; + case PANGO_STRETCH_ULTRA_EXPANDED: + stretch = "ultra-expanded"; + break; + } + if (!stretch) + break; + child = xmlNewDocNode (xml, NULL, (xmlChar*) "stretch", NULL); + xmlNewProp (child, (xmlChar*) "type", (xmlChar*) stretch); + xmlAddChild (node, child); + break; + } + case PANGO_ATTR_SIZE: + n = ((PangoAttrInt*) s->attr)->value; + es = s->attr->end_index; + if (ef >= es) { + char *str = g_strdup_printf ("%s %g", f, (double) n / PANGO_SCALE); + child = xmlNewDocNode (xml, NULL, (xmlChar*) "font", NULL); + xmlNewProp (child, (xmlChar*) "name", (xmlChar*) str); + g_free (str); + xmlAddChild (node, child); + } + break; + case PANGO_ATTR_UNDERLINE: { + PangoUnderline u = (PangoUnderline) ((PangoAttrInt*) s->attr)->value; + char const *type = NULL; + switch (u) { + case PANGO_UNDERLINE_NONE: + case PANGO_UNDERLINE_SINGLE: + break; + case PANGO_UNDERLINE_DOUBLE: + type = "double"; + break; + case PANGO_UNDERLINE_LOW: + type = "low"; + break; + case PANGO_UNDERLINE_ERROR: + type = "error"; // not really implemented + break; + } + if (u == PANGO_UNDERLINE_NONE) + break; + child = xmlNewDocNode (xml, NULL, (xmlChar*) "u", NULL); + if (u != PANGO_UNDERLINE_SINGLE) + xmlNewProp (child, (xmlChar*) "type", (xmlChar*) type); + xmlAddChild (node, child); + break; + } + case PANGO_ATTR_STRIKETHROUGH: + if (((PangoAttrInt*) s->attr)->value) { + child = xmlNewDocNode (xml, NULL, (xmlChar*) "s", NULL); + xmlAddChild (node, child); + } + break; + case PANGO_ATTR_RISE: { + int rise = ((PangoAttrInt*) s->attr)->value / PANGO_SCALE; + if (rise != 0) { + child = xmlNewDocNode (xml, NULL, (xmlChar*) ((rise > 0)? "sup": "sub"), NULL); + char *buf = g_strdup_printf ("%d", abs (rise)); + xmlNewProp (child, (xmlChar*) "height", (xmlChar*) buf); + g_free (buf); + xmlAddChild (node, child); + } + break; + } + case PANGO_ATTR_FOREGROUND: { + PangoAttrColor *c = (PangoAttrColor*) s->attr; + if (c->color.red == 0 && c->color.green == 0 && c->color.blue == 0) + break; + child = xmlNewDocNode (xml, NULL, (xmlChar*) "fore", NULL); + char *buf = g_strdup_printf ("%g", (double) c->color.red / 0xffff); + xmlNewProp (child, (xmlChar*) "red", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf ("%g", (double) c->color.green / 0xffff); + xmlNewProp (child, (xmlChar*) "green", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf ("%g", (double) c->color.blue / 0xffff); + xmlNewProp (child, (xmlChar*) "blue", (xmlChar*) buf); + g_free (buf); + xmlAddChild (node, child); + break; + } + default: + break; + } + if (!child) + child = node; + if (s->children) { + SaveStruct *s0 = s->children; + while (s0) { + if (s0->attr->start_index > index) { + xmlNodeAddContentLen (child, (xmlChar const*) (t + index), s0->attr->start_index - index); + index = s0->attr->start_index; + } + save_state (xml, child, t, s0, index, es, ef, f, n); + index = s0->attr->end_index; + s0 = s0->next; + } + if (s->attr->end_index > index) + xmlNodeAddContentLen (child, (xmlChar const*) (t + index), s->attr->end_index - index); + } else { + xmlNodeAddContentLen (child, (xmlChar const*) (t + s->attr->start_index), s->attr->end_index - s->attr->start_index); + } + return true; +} + +bool filter_func (PangoAttribute *attribute, SaveStruct **cur_state) +{ + if (!*cur_state) { + *cur_state = new SaveStruct (attribute); + return false; + } + if (attribute->start_index < (*cur_state)->attr->start_index) { + throw logic_error (_("This should not have occured, please file a bug record.")); + } else if (attribute->start_index == (*cur_state)->attr->start_index) { + if (attribute->end_index <= (*cur_state)->attr->end_index) + filter_func (attribute, &(*cur_state)->children); + else { + if ((*cur_state)->next) { + throw logic_error (_("This should not have occured, please file a bug record.")); + } else { + // in that case, just set the new attribute as parent of the old one + SaveStruct *s = *cur_state; + *cur_state = new SaveStruct (attribute); + (*cur_state)->children = s; + } + } + } else { + if (attribute->start_index >= (*cur_state)->attr->end_index) + filter_func (attribute, &(*cur_state)->next); + else if (attribute->end_index <= (*cur_state)->attr->end_index) + filter_func (attribute, &(*cur_state)->children); + else { + PangoAttribute *attr = pango_attribute_copy (attribute), + *attr1 = pango_attribute_copy (attribute); + attr->start_index = attr1->end_index = (*cur_state)->attr->end_index; + filter_func (attr1, &(*cur_state)->children); + filter_func (attr, &(*cur_state)->next); + pango_attribute_destroy (attr); + pango_attribute_destroy (attr1); + } + } + return false; +} + +xmlNodePtr Text::Save (xmlDocPtr xml) const +{ + xmlNodePtr node = xmlNewDocNode (xml, NULL, (xmlChar*) "text", NULL); + if (!node) + return NULL; + if (!TextObject::SaveNode (xml, node)) { + xmlFreeNode (node); + return NULL; + } + switch (m_Anchor) { + case GTK_ANCHOR_E: + xmlNewProp (node, (xmlChar const *) "anchor", (xmlChar const *) "right"); + break; + case GTK_ANCHOR_CENTER: + xmlNewProp (node, (xmlChar const *) "anchor", (xmlChar const *) "center"); + break; + default: + break; + } + if (m_Justified) + xmlNewProp (node, (xmlChar const *) "justification", (xmlChar const *) "justify"); + else if (m_Align != PANGO_ALIGN_LEFT) + xmlNewProp (node, (xmlChar const *) "justification", (xmlChar const *) ((m_Align == PANGO_ALIGN_RIGHT)? "right": "center")); + unsigned i = 0; + SaveStruct *head = NULL, *cur; + const char *text = pango_layout_get_text (m_Layout); + PangoAttrList *l = pango_layout_get_attributes (m_Layout); + pango_attr_list_filter (l, (PangoAttrFilterFunc) filter_func, &head); + cur = head; + while (cur) { + save_state (xml, node, text, cur, i, 0, 0, NULL, 0); + i = cur->attr->end_index; + cur = cur->next; + } + xmlNodeAddContent (node, (xmlChar*) text + i); + delete head; + return node; +} + +struct SelState { + unsigned start, end; + PangoAttrList *l; +}; + +bool selection_filter_func (PangoAttribute *attribute, struct SelState *state) +{ + if (attribute->start_index < state->end && attribute ->end_index > state->start) { + PangoAttribute *attr = pango_attribute_copy (attribute); + attr->start_index = (attribute->start_index < state->start)? 0: attribute->start_index - state->start; + attr->end_index = (attribute->end_index > state->end)? state->end - state->start: attribute->end_index - state->start; + pango_attr_list_insert (state->l, attr); + } + return false; +} + +xmlNodePtr Text::SaveSelection (xmlDocPtr xml) const +{ + xmlNodePtr node = xmlNewDocNode (xml, NULL, (xmlChar*) "text", NULL); + if (!node) + return NULL; + // get the text and attributes + const char *text = pango_layout_get_text (m_Layout); + PangoAttrList *l = pango_layout_get_attributes (m_Layout); + string selection (text + m_StartSel, m_EndSel - m_StartSel); + // make a new filtered attributes list + struct SelState state; + state.start = m_StartSel; + state.end = m_EndSel; + state.l = pango_attr_list_new (); + pango_attr_list_filter (l, (PangoAttrFilterFunc) selection_filter_func, &state); + unsigned i = 0; + SaveStruct *head = NULL, *cur; + pango_attr_list_filter (state.l, (PangoAttrFilterFunc) filter_func, &head); + cur = head; + while (cur) { + save_state (xml, node, selection.c_str (), cur, i, 0, 0, NULL, 0); + i = cur->attr->end_index; + cur = cur->next; + } + delete head; + pango_attr_list_unref (state.l); + return (TextObject::SaveNode (xml, node))? node: NULL; +} + +bool Text::Load (xmlNodePtr node) +{ + if (!TextObject::Load (node)) + return false; + xmlChar *buf = xmlGetProp (node, (xmlChar const *) "justification"); + if (buf) { + if (!strcmp ((char const *) buf, "justify")) + m_Justified = true; + else if (!strcmp ((char const *) buf, "right")) + m_Justified = PANGO_ALIGN_RIGHT; + else if (!strcmp ((char const *) buf, "center")) + m_Justified = PANGO_ALIGN_CENTER; + else + m_Justified = PANGO_ALIGN_LEFT; + xmlFree (buf); + } + buf = xmlGetProp (node, (xmlChar const *) "anchor"); + if (buf) { + if (!strcmp ((char const *) buf, "right")) + m_Anchor = GTK_ANCHOR_E; + else if (!strcmp ((char const *) buf, "center")) + m_Anchor = GTK_ANCHOR_CENTER; + else + m_Anchor = GTK_ANCHOR_W; + xmlFree (buf); + } + xmlNodePtr child; + m_bLoading = true; + child = node->children; + if (m_AttrList) + pango_attr_list_unref (m_AttrList); + m_buf.clear (); + m_AttrList = pango_attr_list_new (); + unsigned pos = 0; + while (child) { + if (!LoadNode (child, pos, 0)) + return false; + child = child->next; + } + if (m_Layout) { + pango_layout_set_text (m_Layout, m_buf.c_str (), -1); + pango_layout_set_attributes (m_Layout, m_AttrList); + pango_attr_list_unref (m_AttrList); + m_AttrList = NULL; + } + m_bLoading = false; + return true; +} + +bool Text::LoadSelection (xmlNodePtr node, unsigned pos) +{ + xmlNodePtr child; + m_bLoading = true; + m_buf = pango_layout_get_text (m_Layout); + m_AttrList = pango_layout_get_attributes (m_Layout); + child = node->children; + while (child) { + if (!LoadNode (child, pos, 1)) + return false; + child = child->next; + } + pango_layout_set_text (m_Layout, m_buf.c_str (), -1); + pango_layout_set_attributes (m_Layout, m_AttrList); + GtkWidget* pWidget = dynamic_cast (GetDocument ())->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (pWidget), "data"); + GnomeCanvasGroup *group = pData->Items[this]; + if (group) { + GnomeCanvasPango *PangoItem = GNOME_CANVAS_PANGO (g_object_get_data (G_OBJECT (group), "text")); + gnome_canvas_pango_set_selection_bounds (PangoItem, pos, pos); + } + m_bLoading = false; + OnChanged (true); + return true; +} + +struct limits { + unsigned start, length; +}; + +static bool on_insert (PangoAttribute *attr, struct limits *l) +{ + if (attr->start_index > l->start) { + attr->start_index += l->length; + attr->end_index += l->length; + } else if (attr->end_index > l->start) + attr->end_index += l->length; + return false; +} + +bool Text::LoadNode (xmlNodePtr node, unsigned &pos, int level, int cur_size) +{ + char* buf; + PangoAttribute *Attr = NULL, *Attr0 = NULL; + unsigned start = pos; + if (!strcmp ((const char*) node->name, "text")) { + if (!level) + return true; + buf = (char*) xmlNodeGetContent (node); + if (buf) { + struct limits l; + l.start = start; + pos += strlen (buf); + l.length = pos - start; + pango_attr_list_filter (m_AttrList, (PangoAttrFilterFunc) on_insert, &l); + m_buf.insert (start, buf); + xmlFree (buf); + } + } else if (!strcmp ((const char*) node->name, "br")) { + m_buf.insert (pos, "\n"); + pos++; + struct limits l; + l.start = start; + l.length = 1; + pango_attr_list_filter (m_AttrList, (PangoAttrFilterFunc) on_insert, &l); + } else if (!strcmp ((const char*) node->name, "b")) { + PangoWeight weight = PANGO_WEIGHT_BOLD; + buf = (char*) xmlGetProp(node, (xmlChar*) "weight"); + if (buf) { + weight = (PangoWeight) (strtol (buf, NULL, 10) * 100); + xmlFree (buf); + } + Attr = pango_attr_weight_new (weight); + } else if (!strcmp ((const char*) node->name, "i")) { + PangoStyle style = PANGO_STYLE_ITALIC; + buf = (char*) xmlGetProp(node, (xmlChar*) "style"); + if (buf) { + if (!strcmp (buf, "oblique")) + style = PANGO_STYLE_OBLIQUE; + xmlFree (buf); + } + Attr = pango_attr_style_new (style); + } else if (!strcmp ((const char*) node->name, "u")) { + PangoUnderline underline = PANGO_UNDERLINE_SINGLE; + buf = (char*) xmlGetProp(node, (xmlChar*) "type"); + if (buf) { + if (!strcmp (buf, "double")) + underline = PANGO_UNDERLINE_DOUBLE; + else if (!strcmp (buf, "low")) + underline = PANGO_UNDERLINE_LOW; + else if (!strcmp (buf, "error")) + underline = PANGO_UNDERLINE_ERROR; + xmlFree (buf); + } + Attr = pango_attr_underline_new (underline); + } else if (!strcmp ((const char*) node->name, "s")) + Attr = pango_attr_strikethrough_new (true); + else if (!strcmp ((const char*) node->name, "sub")) { + buf = (char*) xmlGetProp (node, (xmlChar*) "height"); + if (!buf) + return false; + int rise = -strtoul (buf, NULL, 10) * PANGO_SCALE; + xmlFree (buf); + Attr = pango_attr_rise_new (rise); + } else if (!strcmp ((const char*) node->name, "sup")) { + buf = (char*) xmlGetProp (node, (xmlChar*) "height"); + if (!buf) + return false; + int rise = strtoul (buf, NULL, 10) * PANGO_SCALE; + xmlFree (buf); + Attr = pango_attr_rise_new (rise); + } else if (!strcmp ((const char*) node->name, "font")) { + char* TagName = (char*) xmlGetProp (node, (xmlChar*) "name"); + if (!TagName) + return false; + PangoFontDescription* pfd =pango_font_description_from_string (TagName); + Attr = pango_attr_family_new (pango_font_description_get_family (pfd)); + cur_size = pango_font_description_get_size (pfd); + Attr0 = pango_attr_size_new (cur_size); + pango_font_description_free (pfd); + xmlFree (TagName); + } else if (!strcmp ((const char*) node->name, "small-caps")) + Attr = pango_attr_variant_new (PANGO_VARIANT_SMALL_CAPS); + else if (!strcmp ((const char*) node->name, "stretch")) { + buf = (char*) xmlGetProp(node, (xmlChar*) "type"); + if (!buf) + return false; + PangoStretch stretch = PANGO_STRETCH_NORMAL; + if (!strcmp (buf, "ultra-condensed")) + stretch = PANGO_STRETCH_ULTRA_CONDENSED; + else if(!strcmp (buf, "extra-condensed")) + stretch = PANGO_STRETCH_EXTRA_CONDENSED; + else if(!strcmp (buf, "condensed")) + stretch = PANGO_STRETCH_CONDENSED; + else if(!strcmp (buf, "semi-condensed")) + stretch = PANGO_STRETCH_SEMI_CONDENSED; + else if(!strcmp (buf, "semi-expanded")) + stretch = PANGO_STRETCH_SEMI_EXPANDED; + else if(!strcmp (buf, "expanded")) + stretch = PANGO_STRETCH_EXPANDED; + else if(!strcmp (buf, "extra-expanded")) + stretch = PANGO_STRETCH_EXTRA_EXPANDED; + else if(!strcmp (buf, "ultra-expanded")) + stretch = PANGO_STRETCH_ULTRA_EXPANDED; + xmlFree (buf); + Attr = pango_attr_stretch_new (stretch); + } else if (!strcmp ((const char*) node->name, "fore")) { + guint16 red, green, blue; + buf = (char*) xmlGetProp(node, (xmlChar*) "red"); + if (!buf) + return false; + red = (guint16) (strtod (buf, NULL) * 0xffff); + xmlFree (buf); + buf = (char*) xmlGetProp(node, (xmlChar*) "green"); + if (!buf) + return false; + green = (guint16) (strtod (buf, NULL) * 0xffff); + xmlFree (buf); + buf = (char*) xmlGetProp(node, (xmlChar*) "blue"); + if (!buf) + return false; + blue = (guint16) (strtod (buf, NULL) * 0xffff); + xmlFree (buf); + Attr = pango_attr_foreground_new (red, green, blue); + } else + return true; + xmlNodePtr child = node->children; + while (child) { + if (!LoadNode (child, pos, 1, cur_size)) + return false; + child = child->next; + } + if (Attr) { + Attr->start_index = start; + Attr->end_index = pos; + pango_attr_list_change (m_AttrList, Attr); + } + if (Attr0) { + Attr0->start_index = start; + Attr0->end_index = pos; + pango_attr_list_change (m_AttrList, Attr0); + } + return true; +} + +void Text::Add (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + if (m_ascent <= 0) { + PangoContext* pc = pData->m_View->GetPangoContext (); + const_cast (this)->m_Layout = pango_layout_new (pc); + PangoAttrList *l = pango_attr_list_new (); + pango_layout_set_attributes (m_Layout, l); + PangoFontDescription *desc = pango_font_description_new (); + pango_font_description_set_family (desc, pData->m_View->GetDoc ()->GetTextFontFamily ()); + pango_font_description_set_style (desc, pData->m_View->GetDoc ()->GetTextFontStyle ()); + pango_font_description_set_variant (desc, pData->m_View->GetDoc ()->GetTextFontVariant ()); + pango_font_description_set_weight (desc, pData->m_View->GetDoc ()->GetTextFontWeight ()); + pango_font_description_set_size (desc, pData->m_View->GetDoc ()->GetTextFontSize ()); + pango_layout_set_font_description (m_Layout, desc); + pango_font_description_free (desc); + pango_layout_set_text (m_Layout, "l", -1); + PangoLayoutIter* iter = pango_layout_get_iter (m_Layout); + const_cast (this)->m_ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + pango_layout_set_text (m_Layout, m_buf.c_str (), -1); + const_cast (this)->m_buf.clear (); + if (m_AttrList) { + pango_layout_set_attributes (m_Layout, m_AttrList); + pango_attr_list_unref (m_AttrList); + const_cast (this)->m_AttrList = NULL; + } + if (m_Justified) + pango_layout_set_justify (m_Layout, true); + else + pango_layout_set_alignment (m_Layout, m_Align); + PangoRectangle rect; + pango_layout_get_extents (m_Layout, NULL, &rect); + const_cast (this)->m_length = rect.width / PANGO_SCALE; + const_cast (this)->m_height = rect.height / PANGO_SCALE; + } + double x = m_x * pTheme->GetZoomFactor (); + switch (m_Anchor) { + case GTK_ANCHOR_E: + x -= m_length; + break; + case GTK_ANCHOR_CENTER: + x -= m_length / 2; + break; + default: + break; + } + GnomeCanvasGroup* group = GNOME_CANVAS_GROUP (gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type(), NULL)); + GnomeCanvasItem* item = gnome_canvas_item_new ( + group, + gnome_canvas_rect_ext_get_type (), + "x1", x - pTheme->GetPadding (), + "y1", m_y * pTheme->GetZoomFactor () - pTheme->GetPadding () - m_ascent, + "x2", x + m_length + pTheme->GetPadding (), + "y2", m_y * pTheme->GetZoomFactor () + m_height + pTheme->GetPadding () - m_ascent, + "fill_color", "white", + "outline_color", "white", + NULL); + g_object_set_data (G_OBJECT (group), "rect", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + item = gnome_canvas_item_new ( + group, + gnome_canvas_pango_get_type (), + "layout", m_Layout, + "x", x, + "y", m_y * pTheme->GetZoomFactor () - m_ascent, + "editing", false, + NULL); + g_object_set_data (G_OBJECT (group), "text", item); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (on_event), w); + g_signal_connect_swapped (G_OBJECT(item), "changed", G_CALLBACK (on_text_changed), (void *) this); + g_signal_connect_swapped (G_OBJECT (item), "sel-changed", G_CALLBACK (on_text_sel_changed), (void *) this); + pData->Items[this] = group; +} + +bool Text::OnChanged (bool save) +{ + Document* pDoc = (Document*) GetDocument (); + if (!pDoc) + return false; + View* pView = pDoc->GetView (); + GtkWidget* pWidget = pView->GetWidget (); + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (pWidget), "data"); + GnomeCanvasGroup *group = pData->Items[this]; + if (!group) { + pData->Items.erase (this); + return false; + } + if (strlen (pango_layout_get_text (m_Layout))) { + PangoLayoutIter* iter = pango_layout_get_iter (m_Layout); + m_ascent = pango_layout_iter_get_baseline (iter) / PANGO_SCALE; + pango_layout_iter_free (iter); + } + PangoRectangle rect; + pango_layout_get_extents (m_Layout, NULL, &rect); + m_length = rect.width / PANGO_SCALE; + m_height = rect.height / PANGO_SCALE; + pView->Update (this); + EmitSignal (OnChangedSignal); + GnomeCanvasPango *PangoItem = GNOME_CANVAS_PANGO (g_object_get_data (G_OBJECT (group), "text")); + unsigned CurPos = gnome_canvas_pango_get_cur_index (PangoItem); + m_StartSel = m_EndSel = CurPos; + if (save) { + Tool* TextTool = dynamic_cast (pDoc->GetApplication ())->GetTool ("Text"); + if (!TextTool) + return true; + xmlNodePtr node = SaveSelected (); + if (node) + TextTool->PushNode (node); + } + return true; +} + +void Text::Update (GtkWidget* w) const +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup* group = pData->Items[this]; + if (m_Justified) + pango_layout_set_justify (m_Layout, true); + else + pango_layout_set_alignment (m_Layout, m_Align); + double x = m_x * pTheme->GetZoomFactor (); + switch (m_Anchor) { + case GTK_ANCHOR_E: + x -= m_length; + break; + case GTK_ANCHOR_CENTER: + x -= m_length / 2; + break; + default: + break; + } + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "text")), + "x", x, + "y", m_y * pTheme->GetZoomFactor () - m_ascent, + "width", m_length, + "height", m_height, + NULL); + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "rect")), + "x1", x - pTheme->GetPadding (), + "y1", m_y * pTheme->GetZoomFactor () - pTheme->GetPadding () - m_ascent, + "x2", x + m_length + pTheme->GetPadding (), + "y2", m_y * pTheme->GetZoomFactor () + m_height + pTheme->GetPadding () - m_ascent, + NULL); +} + +void Text::SetSelected (GtkWidget* w, int state) +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + gchar const *color; + switch (state) { + case SelStateUnselected: + color = "white"; + break; + case SelStateSelected: + color = SelectColor; + break; + case SelStateUpdating: + color = AddColor; + break; + case SelStateErasing: + color = DeleteColor; + break; + default: + color = "white"; + break; + } + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "rect")), "outline_color", color, NULL); +} + +bool Text::OnEvent (GdkEvent *event) +{ + if ((event->type == GDK_BUTTON_PRESS) && (event->button.button == 2)) + return true; + else + return false; +} + +void Text::Transform2D (Matrix2D& m, double x, double y) +{ + m_x += m_length / 2 - x; + m_y += m_height / 2 - m_ascent + - y; + m.Transform (m_x, m_y); + m_x -= m_length / 2 - x; + m_y -= m_height / 2 - m_ascent - y; +} + +double Text::GetYAlign () +{ + return m_y - ((Document*) GetDocument ())->GetView ()->GetBaseLineOffset (); +} + +bool Text::SetProperty (unsigned property, char const *value) +{ + switch (property) { + case GCU_PROP_POS2D: { + double x, y; + sscanf (value, "%lg %lg", &x, &y); + gcu::Document *doc = GetDocument (); + if (doc) { + x *= doc->GetScale (); + y *= doc->GetScale (); + } + SetCoords (x, y); + break; + } + case GCU_PROP_TEXT_MARKUP: { + xmlDocPtr xml = xmlParseMemory (value, strlen (value)); + xmlNodePtr node = xml->children->children; + unsigned pos = 0; + if (m_AttrList) + pango_attr_list_unref (m_AttrList); + m_buf.clear (); + m_AttrList = pango_attr_list_new (); + m_bLoading = true; + while (node) { + if (!LoadNode (node, pos, 1)) + return false; + node = node->next; + } + m_bLoading = false; + // FIXME: implement + break; + } + case GCU_PROP_TEXT_TEXT: + m_buf = value; + break; + case GCU_PROP_TEXT_ALIGNMENT: + if (!strcmp (value, "right")) + m_Anchor = GTK_ANCHOR_E; + else if (!strcmp (value, "left")) + m_Anchor = GTK_ANCHOR_W; + else if (!strcmp (value, "center")) + m_Anchor = GTK_ANCHOR_CENTER; + break; + case GCU_PROP_TEXT_JUSTIFICATION: + if (!strcmp (value, "right")) + m_Align = PANGO_ALIGN_RIGHT; + else if (!strcmp (value, "left")) + m_Align = PANGO_ALIGN_LEFT; + else if (!strcmp (value, "center")) + m_Align = PANGO_ALIGN_CENTER; + else if (!strcmp (value, "justify")) + m_Justified = true; + break; + } + return true; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/text.h gnome-chemistry-utils-0.10.9/libs/gcp/text.h --- gnome-chemistry-utils-0.8.6/libs/gcp/text.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/text.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,229 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * text.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEXT_H +#define GCHEMPAINT_TEXT_H + +#include +#include +#include +#include +#include "text-object.h" + +/*!\file*/ +namespace gcp { + +/*!\class Text +The text objects in GChemPaint, excluding atomic symbols. Using this class to +represent chemical objects looses the chemical significance. +*/ +class Text: public TextObject +{ +public: +/*! +The default constructor for an empty and unpositioned text. +*/ + Text (); +/*! +@param x the x coordinate. +@param y the y coordinate. + +Constructs a new empty text positioned according to the given coordiantes +*/ + Text (double x, double y); +/*! +The destructor. +*/ + virtual ~Text (); + +/*! +@param x a pointer to the double value which will receive the x coordinate of the text. +@param y a pointer to the double value which will receive the y coordinate of the text. + +Retrieves the coordinates of this text. +*/ + void GetCoords (double *x, double *y); +/*! +@param x the new x coordinate of the text. +@param y the new y coordinate of the text. + +Changes the position of this text. +*/ + void SetCoords (double x, double y); +/*! +@param xml the xmlDoc used to save the document. +@return a pointer to the xmlNode representing this text or NULL if an error occured. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param xml the xmlDoc used for clipboard operations. + +Saves the currently selected text. This method is used by +the framework when editing the textual object. +@return the xmlNode containing the serialized selection. +*/ + xmlNodePtr SaveSelection (xmlDocPtr xml) const; +/*! +@param node the xml node representing the text. + +Loads the text in memory. +*/ + bool Load (xmlNodePtr node); +/*! +@param node the xml node representing the text to insert. +@param pos where to insert the new text. + +Inserts a text inside an existing instance during a paste operation. +*/ + bool LoadSelection (xmlNodePtr node, unsigned pos); +/*! +@param node the xml node representing a portion of the text. +@param pos where to insert the new text. +@param level the imbrication level used to filter out extra text nodes +added by libxml2. +@param cur_size the current size in bytes. + +Loads a portion of a text with a unique set of attributes. \a pos and +\a cur_size are updated. +*/ + bool LoadNode (xmlNodePtr node, unsigned &pos, int level = 0, int cur_size = 0); +/*! +@param w a GtkWidget. + +Adds the representation of the text to the canvas widget. +*/ + void Add (GtkWidget* w) const; +/*! +@param w a GtkWidget. + +Updates the representation of the text in the canvas widget. +*/ + void Update (GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the text is displayed. +@param state the selection state of the text. + +Used to set the selection state of text inside the widget. +The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, +gcp::SelStateUpdating, or gcp::SelStateErasing. +*/ + void SetSelected (GtkWidget* w, int state); +/*! +@param save whether the text should be saved for undo/redo operations. + +Called after any change in the text. +*/ + bool OnChanged (bool save); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Used to move and/or transform a text object. +Text rotation is not currently supported. The text which just be moved after +transformation of its coordinates. +*/ + void Transform2D (gcu::Matrix2D& m, double x, double y); +/*! +@param event a GdkEvent. + +Called by the framework during the edition of the text item. It is just called +to filter out right button clicks. +@return true for right button clicks to filetr them out, false for other events. +*/ + bool OnEvent (GdkEvent *event); +/*! +@param x where to store the width of the text. +@param y where to store the height of the text. + +The sizes are given in canvas coordinates. +*/ + void GetSize (double& x, double& y) {x = m_length; y = m_height;} +/*! +@return the y coordinate at half height of a carbon atom symbol if any was +present at default size so that all texts and chemicalk symbols will have the +same base line when aligned. +*/ + double GetYAlign (); +/*! +@param text the text to display. + +Sets the text for this instance. The text will be displayed using the default +font settings. +*/ + void SetText (char const *text) {m_buf = text;} +/*! +@param property the property id as defined in objprops.h +@param value the property value as a string + +Used when loading to set properties for the fragment. This method supports +GCU_PROP_POS2D, GCU_PROP_TEXT_MARKUP, GCU_PROP_TEXT_TEXT, GCU_PROP_TEXT_ALIGNMENT +and GCU_PROP_TEXT_JUSTIFICATION. +@return true if the property could be set, or if the property is not relevant, false otherwise. +*/ + bool SetProperty (unsigned property, char const *value); + +/*!\fn SetAlign(PangoAlignment Align) +@param Align the new PangoAlignment for the text. + +Sets the PangoAlignment for the text. Default is PANGO_ALIGN_LEFT. +*/ +/*!\fn GetAlign() +@return the current PangoAlignment for the text instance. +*/ +/*!fn GetRefAlign() +@return the current PangoAlignment for the text instance as a reference. +*/ +GCU_PROP (PangoAlignment, Align) +/*!\fn SetJustified(bool Justified) +@param Justified whether the text should be justified. + +Sets the justification for the text. Default is false. +*/ +/*!\fn GetJustified() +@return the justification for the text. +*/ +/*!fn GetRefJustified() +@return the justification for the text as a reference. +*/ +GCU_PROP (bool, Justified) +/*!\fn SetAnchor(GtkAnchorType Anchor) +@param Anchor the new GtkAnchorType for the text. + +Sets the GtkAnchorType used for this text. Default is GTK_ANCHOR_W. The vertical +alignment being based on the base line with an offset equal to the half height of +a carbon atom symbol using the current document theme. +*/ +/*!\fn GetAnchor() +@return the GtkAnchorType used for the text. +*/ +/*!fn GetRefAnchor() +@return the GtkAnchorType used for the text as a reference. +*/ +GCU_PROP (GtkAnchorType, Anchor) +}; + +} // namespace gcp + +#endif //GCHEMPAINT_TEXT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/text-object.cc gnome-chemistry-utils-0.10.9/libs/gcp/text-object.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/text-object.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/text-object.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,169 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * text-object.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "text-object.h" +#include "document.h" +#include "window.h" +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +extern xmlDocPtr pXmlDoc; + +TextObject::TextObject (TypeId Type): Object (Type) +{ + m_x = 0.; + m_y = 0.; + m_ascent = 0; + m_length = 5; + m_height = 15; + m_InsertOffset = -2; + m_bLoading = false; + m_Layout = NULL; + m_AttrList = NULL; + m_RealSave = true; + m_StartSel = m_EndSel = 0; +} + +TextObject::TextObject (double x, double y, TypeId Type): Object (Type) +{ + m_x = x; + m_y = y; + m_ascent = 0; + m_length = 5; + m_height = 15; + m_InsertOffset = -2; + m_bLoading = false; + m_Layout = NULL; + m_AttrList = NULL; + m_StartSel = m_EndSel = 0; +} + +TextObject::~TextObject () +{ + if (m_AttrList) + pango_attr_list_unref (m_AttrList);; +} + +xmlNodePtr TextObject::SaveSelected () +{ + m_RealSave = false; + xmlNodePtr node = Save (pXmlDoc); + m_RealSave = true; + if (!node) + return NULL; + gchar* buf = g_strdup_printf ("%u", m_StartSel); + xmlNewProp (node, (xmlChar*) "start-sel", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf ("%u", m_EndSel); + xmlNewProp (node, (xmlChar*) "end-sel", (xmlChar*) buf); + g_free (buf); + return node; +} + +void TextObject::LoadSelected (xmlNodePtr node) +{ + pango_layout_set_text (m_Layout, "", 0); + PangoAttrList *l = pango_attr_list_new (); + pango_layout_set_attributes (m_Layout, l); + pango_attr_list_unref (l); + Load(node); + OnChanged (false); +} + +bool TextObject::SaveNode (xmlDocPtr xml, xmlNodePtr node) const +{ + SaveId (node); + return WritePosition (xml, node, NULL, m_x, m_y); +} + +bool TextObject::Load (xmlNodePtr node) +{ + char* tmp, *endptr; + bool result; + tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId (tmp); + xmlFree (tmp); + } + if (ReadPosition (node, NULL, &m_x, &m_y)) + return true; + tmp = (char*) xmlGetProp(node, (xmlChar*) "x"); + if (!tmp) + return false; + m_x = strtod (tmp, &endptr); + result = *endptr; + xmlFree (tmp); + if (result) + return false; + tmp = (char*) xmlGetProp (node, (xmlChar*) "y"); + if (!tmp) + return false; + m_y = strtod (tmp, &endptr); + result = *endptr; + xmlFree (tmp); + if (result) + return false; + return true; +} + +void TextObject::Move (double x, double y, double z) +{ + m_x += x; + m_y += y; +} + +void TextObject::OnSelChanged (struct GnomeCanvasPangoSelBounds *bounds) +{ + if (bounds->start <= bounds->cur) { + m_StartSel = bounds->start; + m_EndSel = bounds->cur; + } else { + m_EndSel = bounds->start; + m_StartSel = bounds->cur; + } + bool activate = m_EndSel > m_StartSel; + Document* pDoc = dynamic_cast (GetDocument ()); + pDoc->GetWindow ()->ActivateActionWidget ("/MainMenu/EditMenu/Erase", activate); + pDoc->GetWindow ()->ActivateActionWidget ("/MainMenu/EditMenu/Copy", activate); + pDoc->GetWindow ()->ActivateActionWidget ("/MainMenu/EditMenu/Cut", activate); +} + +string TextObject::GetProperty (unsigned property) const +{ + switch (property) { + case GCU_PROP_TEXT_TEXT: + return m_buf; + default: + return Object::GetProperty (property); + } +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/text-object.h gnome-chemistry-utils-0.10.9/libs/gcp/text-object.h --- gnome-chemistry-utils-0.8.6/libs/gcp/text-object.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/text-object.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,217 @@ +// -*- C++ -*- + +/* + * GChemPaint libray + * text-object.h + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEXT_OBJECT_H +#define GCHEMPAINT_TEXT_OBJECT_H + +#include +#include +#include +#include +#include + +/*!\file*/ +namespace gcp { + +/*!\class TextObject gcp/text-object.h + +The base class for texts. This class is virtual with one pure virtual method +(gcp::TextObject::OnSave). +*/ +class TextObject: public gcu::Object +{ +public: +/*! +@param Type the TypeId of the derived class. + +The default constructor. +*/ + TextObject (gcu::TypeId Type); +/*! +@param Type the TypeId of the derived class. +@param x the horizontal poisition. +@param y the vertical poisition. + +Constructs and sets the position of the text object. +*/ + TextObject (double x, double y, gcu::TypeId Type); +/*! +The destructor. +*/ + virtual ~TextObject (); + +/*! +@param x the variable to be set to the width value. +@param y the variable to be set to the height value. + +Retrieves the size of the text in canvas coordinates. +*/ + void GetSize (double& x, double& y) {x = m_length; y = m_height;} +/*! +Saves the selection. +@return the xml node representing the selection. +*/ + xmlNodePtr SaveSelected (); +/*! +@param node the xml node representing the text to import. + +Replaces the contents of the text object by what is represented by the node. +*/ + void LoadSelected (xmlNodePtr node); +/*! +@param save whether the text should be saved for undo/redo operations. + +Must be called after any change in the text. This method is pure virtual and +must be overloaded in derived classes. +*/ + virtual bool OnChanged (bool save) = 0; +/*! +@param bounds the bounds of the selection. + +Called during edition when the selection has changed, that is after any change. +The signature of this method will change with the deprecation of GnomeCanvas. +*/ + void OnSelChanged (struct GnomeCanvasPangoSelBounds *bounds); +/*! +@param xml the xml document. +@param node the node representing the text. + +Saves the position and Id. Called by derived classes when saving if meaningful. +*/ + bool SaveNode (xmlDocPtr xml, xmlNodePtr node) const; +/*! +@param node the xml node representing the text. + +Loads the position and Id. +*/ + bool Load (xmlNodePtr node); +/*! +@param x the horizontal translation. +@param y the vertical translation. +@param z the depth translation. + +The z variable is not useful. +*/ + void Move (double x, double y, double z = 0); +/*! +This is used because updates are not needed while loading util the whole +text has been loaded. + +@return true while loading, false otherwise. +*/ + bool IsLocked () {return m_bLoading;} +/*! +@param start where to store the start of the selection. +@param end where to store the end of the selection. + +The values set as bounds are in bytes. +*/ + void GetSelectionBounds (unsigned &start, unsigned &end) {start = m_StartSel; end = m_EndSel;} +/*! +@return the raw text contained in the object. +*/ + std::string GetBuffer () {return m_buf;} +/*! +@param property the property id as defined in gcu/objprops.h + +Used when saving to get properties from a text object. Only on eproperty is +supported: GCU_PROP_TEXT_TEXT +*/ + virtual std::string GetProperty (unsigned property) const; + +protected: +/*! +The horizontal of the object in canvas units. +*/ + double m_x; +/*! +The vertical of the object in canvas units. +*/ + double m_y; +/*! +The width of the object in canvas units. +*/ + double m_length; +/*! +The height of the object in canvas units. +*/ + double m_height; +/*! +The ascent of the text. +*/ + int m_ascent; +/*! +The current insertionposition. +*/ + int m_InsertOffset; +/*! +The text owned byt the object. +*/ + std::string m_buf; +/*! +treu on loading, false otherwise. +*/ + bool m_bLoading; +/*! +The index in bytes of the start of the selection. +*/ + unsigned m_StartSel; +/*! +The index in bytes of the end of the selection. +*/ + unsigned m_EndSel; +/*! +Tells whether the Save method is called for the whole text or just +the selection. +*/ + bool m_RealSave; + +/*!\var m_Layout +The PangoLayout associated with the object. +*/ +/*!\fn GetLayout +@return the PangoLayout for this object. +*/ +GCU_PROT_PROP (PangoLayout*, Layout); +/*!\var m_AttrList +The PangoAttrList associated to the text. +*/ +/*!\fn GetAttrList +@return the current attributes list. +*/ +GCU_PROT_PROP (PangoAttrList*, AttrList); +/*!\var m_Anchor +The GtkAnchor used for the text object. Default is GTK_ANCHOR_W. When +GTK_ANCHOR_W, GTK_ANCHOR_CENTER, or GTK_ANCHOR_E is used, the base of the +first line is used for vertical alignment. +*/ +/*!\fn GetAnchor() +@return the current GtkAnchor. +*/ +GCU_PROT_PROP (GtkAnchorType, Anchor); +}; + +} // namespace gcp + +#endif //GCHEMPAINT_TEXT_OBJECT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/theme.cc gnome-chemistry-utils-0.10.9/libs/gcp/theme.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/theme.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/theme.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1115 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * theme.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "document.h" +#include "theme.h" +#include "settings.h" +#include +#ifdef HAVE_GO_CONF_SYNC +# include +#endif +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +double DefaultBondLength = 140.; +double DefaultBondAngle = 120.; +double DefaultBondDist = 5.; +double DefaultBondWidth = 1.0; +double DefaultArrowLength = 200; +double DefaultArrowHeadA = 6.0; +double DefaultArrowHeadB = 8.0; +double DefaultArrowHeadC = 4.0; +double DefaultArrowDist = 5.0; +double DefaultArrowWidth = 1.0; +double DefaultHashWidth = 1.0; +double DefaultHashDist = 2.0; +double DefaultStereoBondWidth = 5.0; +double DefaultZoomFactor = 0.25; +double DefaultPadding = 2.0; +double DefaultArrowPadding = 16.0; +double DefaultArrowObjectPadding = 16.0; +double DefaultStoichiometryPadding = 1.; +double DefaultObjectPadding = 16.0; +double DefaultSignPadding = 8.0; +//double DefaultChargeSignHeight = 12.; +double DefaultChargeSignSize = 9.; +//double DefaultChargeYAlign = 10.; +gchar *DefaultFontFamily = NULL; +PangoStyle DefaultFontStyle = PANGO_STYLE_NORMAL; +PangoWeight DefaultFontWeight = PANGO_WEIGHT_NORMAL; +PangoVariant DefaultFontVariant = PANGO_VARIANT_NORMAL; +PangoStretch DefaultFontStretch = PANGO_STRETCH_NORMAL; +gint DefaultFontSize = 12 * PANGO_SCALE; +gchar *DefaultTextFontFamily = NULL; +PangoStyle DefaultTextFontStyle = PANGO_STYLE_NORMAL; +PangoWeight DefaultTextFontWeight = PANGO_WEIGHT_NORMAL; +PangoVariant DefaultTextFontVariant = PANGO_VARIANT_NORMAL; +PangoStretch DefaultTextFontStretch = PANGO_STRETCH_NORMAL; +gint DefaultTextFontSize = 12 * PANGO_SCALE; + +Theme::Theme (char const *name) +{ + m_ZoomFactor = DefaultZoomFactor; + m_BondLength = DefaultBondLength; + m_BondAngle = DefaultBondAngle; + m_BondDist = DefaultBondDist; + m_BondWidth = DefaultBondWidth; + m_ArrowLength = DefaultArrowLength; + m_HashWidth = DefaultHashWidth; + m_HashDist = DefaultHashDist; + m_StereoBondWidth = DefaultStereoBondWidth; + m_Padding = DefaultPadding; + m_ArrowHeadA = DefaultArrowHeadA; + m_ArrowHeadB = DefaultArrowHeadB; + m_ArrowHeadC = DefaultArrowHeadC; + m_ArrowDist = DefaultArrowDist; + m_ArrowPadding = DefaultArrowPadding; + m_ArrowObjectPadding = DefaultArrowObjectPadding; + m_ArrowWidth = DefaultArrowWidth; + m_StoichiometryPadding = DefaultStoichiometryPadding; + m_ObjectPadding = DefaultObjectPadding; + m_SignPadding = DefaultSignPadding; + m_ChargeSignSize = DefaultChargeSignSize; + m_FontFamily = strdup (DefaultFontFamily); + m_FontStyle = DefaultFontStyle; + m_FontWeight = DefaultFontWeight; + m_FontVariant = DefaultFontVariant; + m_FontStretch = DefaultFontStretch; + m_FontSize = DefaultFontSize; + m_TextFontFamily = strdup (DefaultTextFontFamily); + m_TextFontStyle = DefaultTextFontStyle; + m_TextFontWeight = DefaultTextFontWeight; + m_TextFontVariant = DefaultTextFontVariant; + m_TextFontStretch = DefaultTextFontStretch; + m_TextFontSize = DefaultTextFontSize; + if (name) + m_Name = name; + m_ThemeType = DEFAULT_THEME_TYPE; + modified = false; +} + +Theme::~Theme () +{ + if (m_FontFamily) + g_free (m_FontFamily); + if (m_TextFontFamily) + g_free (m_TextFontFamily); + // set all remaining document client theme to NULL + // this is just a work around, but a ThemeClient class should be implemented + Document *doc; + std::set ::iterator i, end = m_Clients.end (); + for (i = m_Clients.begin (); i != end; i++) { + doc = dynamic_cast (*i); + if (doc) + doc->SetTheme (NULL); + } +} + +ThemeManager TheThemeManager; + +#ifdef HAVE_GO_CONF_SYNC +static void on_config_changed (GOConfNode *node, gchar const *key, ThemeManager *manager) +{ + manager->OnConfigChanged (node, key); +} +#else +static void on_config_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, ThemeManager *manager) +{ + manager->OnConfigChanged (client, cnxn_id, entry); +} +#endif + +// transform functions for gconf key values + +static double inv (double x) {return 1 / x;} + +static PangoStyle set_fontstyle (int val) +{ + switch (val) { + case 0: return PANGO_STYLE_NORMAL; + case 1: return PANGO_STYLE_OBLIQUE; + case 2: return PANGO_STYLE_ITALIC; + default: return PANGO_STYLE_NORMAL; + } +} + +static PangoWeight set_fontweight (int val) +{ + switch (val) { + case 2: return PANGO_WEIGHT_ULTRALIGHT; + case 3: return PANGO_WEIGHT_LIGHT; + case 4: return PANGO_WEIGHT_NORMAL; + case 6: return PANGO_WEIGHT_SEMIBOLD; + case 7: return PANGO_WEIGHT_BOLD; + case 8: return PANGO_WEIGHT_ULTRABOLD; + case 9: return PANGO_WEIGHT_HEAVY; +#if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 24 + case 1: return PANGO_WEIGHT_THIN; + case 38: return PANGO_WEIGHT_BOOK; + case 5: return PANGO_WEIGHT_MEDIUM; + case 10: return PANGO_WEIGHT_ULTRAHEAVY; +#endif + default: return PANGO_WEIGHT_NORMAL; + } +} + +static PangoVariant set_fontvariant (int val) +{ + switch (val) { + case 0: return PANGO_VARIANT_NORMAL; + case 1: return PANGO_VARIANT_SMALL_CAPS; + default: return PANGO_VARIANT_NORMAL; + } +} + +static PangoStretch set_fontstretch (int val) +{ + switch (val) { + case 0: return PANGO_STRETCH_ULTRA_CONDENSED; + case 1: return PANGO_STRETCH_EXTRA_CONDENSED; + case 2: return PANGO_STRETCH_CONDENSED; + case 3: return PANGO_STRETCH_SEMI_CONDENSED; + case 4: return PANGO_STRETCH_NORMAL; + case 5: return PANGO_STRETCH_SEMI_EXPANDED; + case 6: return PANGO_STRETCH_EXPANDED; + case 7: return PANGO_STRETCH_EXTRA_EXPANDED; + case 8: return PANGO_STRETCH_ULTRA_EXPANDED; + default: return PANGO_STRETCH_NORMAL; + } +} + +static int set_fontsize (double val) {return (int) (val * PANGO_SCALE);} + +ThemeManager::ThemeManager () +{ + bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + g_type_init (); +#ifdef HAVE_GO_CONF_SYNC + libgoffice_init (); + m_ConfNode = go_conf_get_node (gcu::Application::GetConfDir (), GCP_CONF_DIR_SETTINGS); +#else + GError *error = NULL; + m_ConfClient = gconf_client_get_default (); + gconf_client_add_dir (m_ConfClient, "/apps/gchemutils/paint/settings", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); +#endif + GCU_GCONF_GET ("bond-length", float, DefaultBondLength, 140.) + GCU_GCONF_GET ("bond-angle", float, DefaultBondAngle, 120.) + GCU_GCONF_GET ("bond-dist", float, DefaultBondDist, 5.) + GCU_GCONF_GET ("bond-width", float, DefaultBondWidth, 1.0) + GCU_GCONF_GET ("arrow-length", float, DefaultArrowLength, 200) + GCU_GCONF_GET ("arrow-headA", float, DefaultArrowHeadA, 6.0) + GCU_GCONF_GET ("arrow-headB", float, DefaultArrowHeadB, 8.0) + GCU_GCONF_GET ("arrow-headC", float, DefaultArrowHeadC, 4.0) + GCU_GCONF_GET ("arrow-dist", float, DefaultArrowDist, 5.0) + GCU_GCONF_GET ("arrow-width", float, DefaultArrowWidth, 1.0) + GCU_GCONF_GET ("hash-width", float, DefaultHashWidth, 1.0) + GCU_GCONF_GET ("hash-dist", float, DefaultHashDist, 2.0) + GCU_GCONF_GET ("stereo-width", float, DefaultStereoBondWidth, 5.0) + GCU_GCONF_GET_N_TRANSFORM ("scale", float, DefaultZoomFactor, 4., inv) + GCU_GCONF_GET ("padding", float, DefaultPadding, 2.0) + GCU_GCONF_GET ("arrow-padding", float, DefaultArrowPadding, 16.0) + GCU_GCONF_GET ("arrow-object-padding", float, DefaultArrowObjectPadding, 16.0) + GCU_GCONF_GET ("stoichiometry-padding", float, DefaultStoichiometryPadding, 1.) + GCU_GCONF_GET ("object-padding", float, DefaultObjectPadding, 16.0) + GCU_GCONF_GET ("sign-padding", float, DefaultSignPadding, 8.0) + GCU_GCONF_GET ("charge-sign-size", float, DefaultChargeSignSize, 9.) + GCU_GCONF_GET_STRING ("font-family", DefaultFontFamily, "Bitstream Vera Sans") + GCU_GCONF_GET_N_TRANSFORM ("font-style", int, DefaultFontStyle, 0, set_fontstyle) + GCU_GCONF_GET_N_TRANSFORM ("font-weight", int, DefaultFontWeight, 4, set_fontweight) + GCU_GCONF_GET_N_TRANSFORM ("font-variant", int, DefaultFontVariant, 0, set_fontvariant) + GCU_GCONF_GET_N_TRANSFORM ("font-stretch", int, DefaultFontStretch, 4, set_fontstretch) + GCU_GCONF_GET_N_TRANSFORM ("font-size", float, DefaultFontSize, 12., set_fontsize) + GCU_GCONF_GET_STRING ("text-font-family", DefaultTextFontFamily, "Bitstream Vera Serif") + GCU_GCONF_GET_N_TRANSFORM ("text-font-style", int, DefaultTextFontStyle, 0, set_fontstyle) + GCU_GCONF_GET_N_TRANSFORM ("text-font-weight", int, DefaultTextFontWeight, 4, set_fontweight) + GCU_GCONF_GET_N_TRANSFORM ("text-font-variant", int, DefaultTextFontVariant, 0, set_fontvariant) + GCU_GCONF_GET_N_TRANSFORM ("text-font-stretch", int, DefaultTextFontStretch, 4, set_fontstretch) + GCU_GCONF_GET_N_TRANSFORM ("text-font-size", float, DefaultTextFontSize, 12., set_fontsize) + // Build default theme from settings +#ifdef HAVE_GO_CONF_SYNC + m_NotificationId = go_conf_add_monitor (m_ConfNode, NULL, (GOConfMonitorFunc) on_config_changed, this); +#else + m_NotificationId = gconf_client_notify_add (m_ConfClient, "/apps/gchemutils/paint/settings", (GConfClientNotifyFunc) on_config_changed, this, NULL, NULL); +#endif + m_Themes["GChemPaint"] = new Theme ("GChemPaint"); + m_Names.push_front ("GChemPaint"); + // load global themes + string path = PKGDATADIR; + path += "/paint/themes"; + ParseDir (path, GLOBAL_THEME_TYPE); + // load local themes + char *szhome = getenv ("HOME"); + if (szhome) + path = szhome; + path += "/.gchempaint/themes"; + ParseDir (path, LOCAL_THEME_TYPE); + gchar *default_theme =NULL; + GCU_GCONF_GET_STRING ("default-theme", default_theme, "GChemPaint"); + m_DefaultTheme = m_Themes[default_theme]; + g_free (default_theme); + if (!m_DefaultTheme) + m_DefaultTheme = m_Themes["GChemPaint"]; +} + +ThemeManager::~ThemeManager () +{ + // save themes if needed, then delete + Theme *theme, *def = NULL; + map ::iterator i, iend = m_Themes.end (); + for (i = m_Themes.begin (); i != iend; i++) { + theme = (*i).second; + if (!theme || (def && theme == def)) + continue; // this theme has already been deleted + if (theme->modified && theme->m_ThemeType == LOCAL_THEME_TYPE) { + xmlDocPtr doc = xmlNewDoc((xmlChar*)"1.0"); + xmlDocSetRootElement (doc, xmlNewDocNode (doc, NULL, (xmlChar*) "chemistry", NULL)); + if (theme->Save (doc)) { + char *szhome = getenv ("HOME"); + string home, path; + if (szhome) + home = szhome; + path = home + "/.gchempaint/themes"; + GDir *dir = g_dir_open (path.c_str (), 0, NULL); + if (!dir) { + string path; + path = home + "/.gchempaint"; + dir = g_dir_open (path.c_str (), 0, NULL); + if (dir) + g_dir_close (dir); + else + mkdir (path.c_str (), 0x1ed); + mkdir (path.c_str (), 0x1ed); + } else + g_dir_close (dir); + path += string ("/") + theme->GetName (); + xmlSaveFormatFile (path.c_str (), doc, true); + } + } else if (theme->m_Name == "Default") + def = theme; + delete theme; + } + g_free (DefaultFontFamily); + g_free (DefaultTextFontFamily); +} + +void ThemeManager::Shutdown () +{ +#ifdef HAVE_GO_CONF_SYNC + go_conf_remove_monitor (m_NotificationId); + go_conf_free_node (m_ConfNode); + m_ConfNode = NULL; +#else + gconf_client_notify_remove (m_ConfClient, m_NotificationId); + gconf_client_remove_dir (m_ConfClient, "/apps/gchemutils/paint/settings", NULL); + g_object_unref (m_ConfClient); + m_ConfClient = NULL; +#endif +} + +Theme *ThemeManager::GetTheme (char const *name) +{ + if (!strcmp (_(name), _("Default"))) + return m_DefaultTheme; + return m_Themes[name]; +} + +Theme *ThemeManager::GetTheme (string &name) +{ + if (name == "Default" || name == _("Default") ) + return m_DefaultTheme; + return m_Themes[name.c_str ()]; +} + +list const &ThemeManager::GetThemesNames () +{ + return m_Names; +} + +#ifdef HAVE_GO_CONF_SYNC +void ThemeManager::OnConfigChanged (GOConfNode *node, gchar const *name) +{ +#else +void ThemeManager::OnConfigChanged (GConfClient *client, guint cnxn_id, GConfEntry *entry) +{ + if (client != m_ConfClient) + return; // we might want an error message? + if (cnxn_id != m_NotificationId) + return; // we might want an error message? + char const *name; +#endif + Theme *theme = m_Themes["GChemPaint"]; + GCU_UPDATE_KEY ("bond-length", float, DefaultBondLength, theme->m_BondLength = DefaultBondLength;) + GCU_UPDATE_KEY ("bond-angle", float, DefaultBondAngle, theme->m_BondAngle = DefaultBondAngle;) + GCU_UPDATE_KEY ("bond-dist", float, DefaultBondDist, theme->m_BondDist = DefaultBondDist;) + GCU_UPDATE_KEY ("bond-width", float, DefaultBondWidth, theme->m_BondWidth = DefaultBondWidth;) + GCU_UPDATE_KEY ("arrow-length", float, DefaultArrowLength, theme->m_ArrowLength = DefaultArrowLength;) + GCU_UPDATE_KEY ("arrow-headA", float, DefaultArrowHeadA, theme->m_ArrowHeadA = DefaultArrowHeadA;) + GCU_UPDATE_KEY ("arrow-headB", float, DefaultArrowHeadB, theme->m_ArrowHeadB = DefaultArrowHeadB;) + GCU_UPDATE_KEY ("arrow-headA", float, DefaultArrowHeadC, theme->m_ArrowHeadC = DefaultArrowHeadC;) + GCU_UPDATE_KEY ("arrow-dist", float, DefaultArrowDist, theme->m_ArrowDist = DefaultArrowDist;) + GCU_UPDATE_KEY ("arrow-width", float, DefaultArrowWidth, theme->m_ArrowWidth = DefaultArrowWidth;) + GCU_UPDATE_KEY ("hash-width", float, DefaultHashWidth, theme->m_HashWidth = DefaultHashWidth;) + GCU_UPDATE_KEY ("hash-dist", float, DefaultHashDist, theme->m_HashDist = DefaultHashDist;) + GCU_UPDATE_KEY ("stereo-width", float, DefaultStereoBondWidth, theme->m_StereoBondWidth = DefaultStereoBondWidth;) + double x; + GCU_UPDATE_KEY ("scale", float, x, + if (x > 1e-5) { + DefaultZoomFactor = 1 / x; + theme->m_ZoomFactor = DefaultZoomFactor; + } + ) + GCU_UPDATE_KEY ("padding", float, DefaultPadding, theme->m_Padding = DefaultPadding;) + GCU_UPDATE_KEY ("stoichiometry-padding", float, DefaultStoichiometryPadding, theme->m_StoichiometryPadding = DefaultStoichiometryPadding;) + GCU_UPDATE_KEY ("object-padding", float, DefaultObjectPadding, theme->m_ObjectPadding = DefaultObjectPadding;) + GCU_UPDATE_KEY ("charge-sign-padding", float, DefaultSignPadding, theme->m_SignPadding = DefaultSignPadding;) + GCU_UPDATE_KEY ("charge-sign-size", float, DefaultChargeSignSize, theme->m_ChargeSignSize = DefaultChargeSignSize;) + GCU_UPDATE_KEY ("font-family", string, name, + if (name) { + if (DefaultFontFamily != NULL) + g_free (DefaultFontFamily); + DefaultFontFamily = g_strdup (name); + theme->m_FontFamily = DefaultFontFamily; + }) + int n; + GCU_UPDATE_KEY ("font-style", int, n, { + DefaultFontStyle = set_fontstyle (n); + theme->m_FontStyle = DefaultFontStyle; + }) + GCU_UPDATE_KEY ("font-weight", int, n, { + DefaultFontWeight = set_fontweight (n); + theme->m_FontWeight = DefaultFontWeight; + }) + GCU_UPDATE_KEY ("font-variant", int, n, { + DefaultFontVariant = set_fontvariant (n); + theme->m_FontVariant = DefaultFontVariant; + }) + GCU_UPDATE_KEY ("font-stretch", int, n, { + DefaultFontStretch = set_fontstretch (n); + theme->m_FontStretch = DefaultFontStretch; + }) + GCU_UPDATE_KEY ("font-size", float, DefaultFontSize, theme->m_FontSize = DefaultFontSize;) + GCU_UPDATE_KEY ("text-font-family", string, name, + if (name) { + if (DefaultTextFontFamily != NULL) + g_free (DefaultTextFontFamily); + DefaultTextFontFamily = g_strdup (name); + theme->m_TextFontFamily = DefaultTextFontFamily; + }) + GCU_UPDATE_KEY ("text-font-style", int, n, { + DefaultTextFontStyle = set_fontstyle (n); + theme->m_TextFontStyle = DefaultTextFontStyle; + }) + GCU_UPDATE_KEY ("text-font-weight", int, n, { + DefaultTextFontWeight = set_fontweight (n); + theme->m_TextFontWeight = DefaultTextFontWeight; + }) + GCU_UPDATE_KEY ("text-font-variant", int, n, { + DefaultTextFontVariant = set_fontvariant (n); + theme->m_TextFontVariant = DefaultTextFontVariant; + }) + GCU_UPDATE_KEY ("text-font-stretch", int, n, { + DefaultTextFontStretch = set_fontstretch (n); + theme->m_TextFontStretch = DefaultTextFontStretch; + }) + GCU_UPDATE_KEY ("text-font-size", float, DefaultTextFontSize, theme->m_TextFontSize = DefaultTextFontSize;) + GCU_UPDATE_KEY ("default-theme", string, name, { + theme = m_Themes[name]; + if (theme) + m_DefaultTheme = theme; + }) +} + +Theme *ThemeManager::CreateNewTheme (Theme *theme) +{ + gchar *name = g_strdup (_("NewTheme1")); + int i = 2; + while (m_Themes[name] != NULL) { + g_free (name); + name = g_strdup_printf (_("NewTheme%d"), i++); + } + Theme *pTheme = new Theme (name); + m_Themes[name] = pTheme; + m_Names.push_back (name); + g_free (name); + if (theme) { + pTheme->m_ZoomFactor = theme->m_ZoomFactor; + pTheme->m_BondLength = theme->m_BondLength; + pTheme->m_BondAngle = theme->m_BondAngle; + pTheme->m_BondDist = theme->m_BondDist; + pTheme->m_BondWidth = theme->m_BondWidth; + pTheme->m_ArrowLength = theme->m_ArrowLength; + pTheme->m_HashWidth = theme->m_HashWidth; + pTheme->m_HashDist = theme->m_HashDist; + pTheme->m_StereoBondWidth = theme->m_StereoBondWidth; + pTheme->m_Padding = theme->m_Padding; + pTheme->m_ArrowHeadA = theme->m_ArrowHeadA; + pTheme->m_ArrowHeadB = theme->m_ArrowHeadB; + pTheme->m_ArrowHeadC = theme->m_ArrowHeadC; + pTheme->m_ArrowDist = theme->m_ArrowDist; + pTheme->m_ArrowPadding = theme->m_ArrowPadding; + pTheme->m_ArrowWidth = theme->m_ArrowWidth; + pTheme->m_StoichiometryPadding = theme->m_StoichiometryPadding; + pTheme->m_ObjectPadding = theme->m_ObjectPadding; + pTheme->m_SignPadding = theme->m_SignPadding; + pTheme->m_ChargeSignSize = theme->m_ChargeSignSize; + g_free (pTheme->m_FontFamily); + pTheme->m_FontFamily = strdup (theme->m_FontFamily); + pTheme->m_FontStyle = theme->m_FontStyle; + pTheme->m_FontWeight = theme->m_FontWeight; + pTheme->m_FontVariant = theme->m_FontVariant; + pTheme->m_FontStretch = theme->m_FontStretch; + pTheme->m_FontSize = theme->m_FontSize; + g_free (pTheme->m_TextFontFamily); + pTheme->m_TextFontFamily = strdup (theme->m_TextFontFamily); + pTheme->m_TextFontStyle = theme->m_TextFontStyle; + pTheme->m_TextFontWeight = theme->m_TextFontWeight; + pTheme->m_TextFontVariant = theme->m_TextFontVariant; + pTheme->m_TextFontStretch = theme->m_TextFontStretch; + pTheme->m_TextFontSize = theme->m_TextFontSize; + } + pTheme->m_ThemeType = LOCAL_THEME_TYPE; + pTheme->modified = true; + return pTheme; +} + +void ThemeManager::ParseDir (string &path, ThemeType type) +{ + char const *name; + xmlDocPtr doc; + xmlNodePtr node; + Theme *theme; + string filename; + GDir *dir = g_dir_open (path.c_str (), 0, NULL); + if (dir) { + string old_num_locale = setlocale (LC_NUMERIC, NULL); + setlocale (LC_NUMERIC, "C"); + path += "/"; + while ((name = g_dir_read_name (dir))) { + if (name[strlen (name) - 1] == '~') + continue; // don't read backups + filename = path + name; + doc = xmlParseFile (filename.c_str ()); + node = doc->children; + if (!strcmp ((char*)node->name, "chemistry")) { + node = node->children; + while (node && !strcmp ((char*)node->name, "text")) + node = node->next; + if (node && !strcmp ((char*)node->name, "theme")) { + theme = new Theme (""); + theme->Load (node); + if (theme->GetName () != name) { + theme->m_Name = name; + theme->modified = true; + } + if (theme->m_ThemeType == DEFAULT_THEME_TYPE || theme->m_ThemeType == GLOBAL_THEME_TYPE) + name = _(name); + if (m_Themes.find (name) != m_Themes.end ()) { + delete theme; + continue; + } + theme->m_ThemeType = type; + m_Themes[name] = theme; + m_Names.push_back (name); + } + } + xmlFree (doc); + } + g_dir_close (dir); + setlocale (LC_NUMERIC, old_num_locale.c_str ()); + } +} + +void ThemeManager::AddFileTheme (Theme *theme, char const *label) +{ + string name = theme->GetName ().c_str (); + if (name == "Default") + name = "GChemPaint"; + string theme_name = name; + if (m_Themes.find (name) != m_Themes.end ()) { + name = string ((label)? label: _("Unknown")) + ":" + name; + } + int i = 0; + while (m_Themes.find (name) != m_Themes.end ()) + name = string ((label)? label: _("Unknown")) + ((char) ('0' + i++)) + ":" + theme_name; + m_Themes[name] = theme; + m_Names.push_back (name); +} + +void ThemeManager::RemoveFileTheme (Theme *theme) +{ + char const *name = NULL; + map ::iterator i, iend = m_Themes.end (); + for (i = m_Themes.begin (); i != iend; i++) + if ((*i).second == theme) { + name = (*i).first.c_str (); + break; + } + m_Names.remove (name); + m_Themes.erase (name); +} + +void ThemeManager::ChangeThemeName (Theme *theme, char const *name) +{ + m_Themes.erase (theme->m_Name); + m_Names.remove (theme->m_Name); + theme->m_Name = name; + m_Themes[name] = theme; + m_Names.push_back (name); +} + +void ThemeManager::SetDefaultTheme (char const *name) +{ + Theme *theme = m_Themes[name]; + if (theme) { + m_DefaultTheme = theme; + } +} + +bool Theme::Save (xmlDocPtr xml) +{ + xmlNodePtr node = xmlNewDocNode (xml, NULL, (xmlChar*) "theme", NULL); + string old_num_locale = setlocale (LC_NUMERIC, NULL); + setlocale (LC_NUMERIC, "C"); + char *buf; + if (!node) + return false; + if (m_Name.length () > 0) + xmlNewProp (node, (xmlChar*) "name", (xmlChar*) m_Name.c_str ()); + buf = g_strdup_printf("%g", m_BondLength); + xmlNewProp (node, (xmlChar*) "bond-length", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_BondAngle); + xmlNewProp (node, (xmlChar*) "bond-angle", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_BondDist); + xmlNewProp (node, (xmlChar*) "bond-dist", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_BondWidth); + xmlNewProp (node, (xmlChar*) "bond-width", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ArrowLength); + xmlNewProp (node, (xmlChar*) "arrow-length", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ArrowHeadA); + xmlNewProp (node, (xmlChar*) "arrow-head-a", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ArrowHeadB); + xmlNewProp (node, (xmlChar*) "arrow-head-b", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ArrowHeadC); + xmlNewProp (node, (xmlChar*) "arrow-head-c", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ArrowDist); + xmlNewProp (node, (xmlChar*) "arrow-dist", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ArrowWidth); + xmlNewProp (node, (xmlChar*) "arrow-width", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ArrowPadding); + xmlNewProp (node, (xmlChar*) "arrow-padding", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_HashWidth); + xmlNewProp (node, (xmlChar*) "hash-width", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_HashDist); + xmlNewProp (node, (xmlChar*) "hash-dist", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_StereoBondWidth); + xmlNewProp (node, (xmlChar*) "stereo-bond-width", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", 1 / m_ZoomFactor); + xmlNewProp (node, (xmlChar*) "zoom-factor", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_Padding); + xmlNewProp (node, (xmlChar*) "padding", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_StoichiometryPadding); + xmlNewProp (node, (xmlChar*) "stoichiometry-padding", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ObjectPadding); + xmlNewProp (node, (xmlChar*) "object-padding", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_SignPadding); + xmlNewProp (node, (xmlChar*) "sign-padding", (xmlChar*) buf); + g_free (buf); + buf = g_strdup_printf("%g", m_ChargeSignSize); + xmlNewProp (node, (xmlChar*) "charge-sign-size", (xmlChar*) buf); + g_free (buf); + xmlNewProp (node, (xmlChar*) "font-family", (xmlChar*) m_FontFamily); + buf = NULL; + switch (m_FontStyle) { + case PANGO_STYLE_NORMAL: + buf = const_cast ("normal"); + break; + case PANGO_STYLE_OBLIQUE: + buf = const_cast ("oblique"); + break; + case PANGO_STYLE_ITALIC: + buf = const_cast ("italic"); + break; + } + if (buf) + xmlNewProp (node, (xmlChar*) "font-style", (xmlChar*) buf); + buf = NULL; + switch (m_FontWeight) { + case PANGO_WEIGHT_ULTRALIGHT: + buf = const_cast ("ultra-light"); + break; + case PANGO_WEIGHT_LIGHT: + buf = const_cast ("light"); + break; + case PANGO_WEIGHT_NORMAL: + buf = const_cast ("normal"); + break; + case PANGO_WEIGHT_SEMIBOLD: + buf = const_cast ("semi-bold"); + break; + case PANGO_WEIGHT_BOLD: + buf = const_cast ("bold"); + break; + case PANGO_WEIGHT_ULTRABOLD: + buf = const_cast ("ultra-bold"); + break; + case PANGO_WEIGHT_HEAVY: + buf = const_cast ("heavy"); + break; +#if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 24 + case PANGO_WEIGHT_THIN: + buf = const_cast ("thin"); + break; + case PANGO_WEIGHT_BOOK: + buf = const_cast ("book"); + break; + case PANGO_WEIGHT_MEDIUM: + buf = const_cast ("medium"); + break; + case PANGO_WEIGHT_ULTRAHEAVY: + buf = const_cast ("ultra-heavy"); + break; +#endif + } + if (buf) + xmlNewProp (node, (xmlChar*) "font-weight", (xmlChar*) buf); + xmlNewProp (node, (xmlChar*) "font-variant", (xmlChar*) ((m_FontVariant == PANGO_VARIANT_SMALL_CAPS)? "small-caps": "normal")); + buf = NULL; + switch (m_FontStretch) { + case PANGO_STRETCH_ULTRA_CONDENSED: + buf = const_cast ("ultra-condensed"); + break; + case PANGO_STRETCH_EXTRA_CONDENSED: + buf = const_cast ("extra-condensed"); + break; + case PANGO_STRETCH_CONDENSED: + buf = const_cast ("condensed"); + break; + case PANGO_STRETCH_SEMI_CONDENSED: + buf = const_cast ("semi-condensed"); + break; + case PANGO_STRETCH_NORMAL: + buf = const_cast ("normal"); + break; + case PANGO_STRETCH_SEMI_EXPANDED: + buf = const_cast ("semi-expanded"); + break; + case PANGO_STRETCH_EXPANDED: + buf = const_cast ("expanded"); + break; + case PANGO_STRETCH_EXTRA_EXPANDED: + buf = const_cast ("extra-expanded"); + break; + case PANGO_STRETCH_ULTRA_EXPANDED: + buf = const_cast ("ultra-expanded"); + break; + } + if (buf) + xmlNewProp (node, (xmlChar*) "font-stretch", (xmlChar*) buf); + buf = g_strdup_printf("%d", m_FontSize); + xmlNewProp (node, (xmlChar*) "font-size", (xmlChar*) buf); + g_free (buf); + xmlNewProp (node, (xmlChar*) "text-font-family", (xmlChar*) m_TextFontFamily); + buf = NULL; + switch (m_TextFontStyle) { + case PANGO_STYLE_NORMAL: + buf = const_cast ("normal"); + break; + case PANGO_STYLE_OBLIQUE: + buf = const_cast ("oblique"); + break; + case PANGO_STYLE_ITALIC: + buf = const_cast ("italic"); + break; + } + if (buf) + xmlNewProp (node, (xmlChar*) "text-font-style", (xmlChar*) buf); + buf = NULL; + switch (m_TextFontWeight) { + case PANGO_WEIGHT_ULTRALIGHT: + buf = const_cast ("ultra-light"); + break; + case PANGO_WEIGHT_LIGHT: + buf = const_cast ("light"); + break; + case PANGO_WEIGHT_NORMAL: + buf = const_cast ("normal"); + break; + case PANGO_WEIGHT_SEMIBOLD: + buf = const_cast ("semi-bold"); + break; + case PANGO_WEIGHT_BOLD: + buf = const_cast ("bold"); + break; + case PANGO_WEIGHT_ULTRABOLD: + buf = const_cast ("ultra-bold"); + break; + case PANGO_WEIGHT_HEAVY: + buf = const_cast ("heavy"); + break; +#if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 24 + case PANGO_WEIGHT_THIN: + buf = const_cast ("thin"); + break; + case PANGO_WEIGHT_BOOK: + buf = const_cast ("book"); + break; + case PANGO_WEIGHT_MEDIUM: + buf = const_cast ("medium"); + break; + case PANGO_WEIGHT_ULTRAHEAVY: + buf = const_cast ("ultra-heavy"); + break; +#endif + } + if (buf) + xmlNewProp (node, (xmlChar*) "text-font-weight", (xmlChar*) buf); + xmlNewProp (node, (xmlChar*) "text-font-variant", (xmlChar*) ((m_TextFontVariant == PANGO_VARIANT_SMALL_CAPS)? "small-caps": "normal")); + buf = NULL; + switch (m_TextFontStretch) { + case PANGO_STRETCH_ULTRA_CONDENSED: + buf = const_cast ("ultra-condensed"); + break; + case PANGO_STRETCH_EXTRA_CONDENSED: + buf = const_cast ("extra-condensed"); + break; + case PANGO_STRETCH_CONDENSED: + buf = const_cast ("condensed"); + break; + case PANGO_STRETCH_SEMI_CONDENSED: + buf = const_cast ("semi-condensed"); + break; + case PANGO_STRETCH_NORMAL: + buf = const_cast ("normal"); + break; + case PANGO_STRETCH_SEMI_EXPANDED: + buf = const_cast ("semi-expanded"); + break; + case PANGO_STRETCH_EXPANDED: + buf = const_cast ("expanded"); + break; + case PANGO_STRETCH_EXTRA_EXPANDED: + buf = const_cast ("extra-expanded"); + break; + case PANGO_STRETCH_ULTRA_EXPANDED: + buf = const_cast ("ultra-expanded"); + break; + } + if (buf) + xmlNewProp (node, (xmlChar*) "text-font-stretch", (xmlChar*) buf); + buf = g_strdup_printf("%d", m_TextFontSize); + xmlNewProp (node, (xmlChar*) "text-font-size", (xmlChar*) buf); + g_free (buf); + xmlAddChild (xml->children, node); + setlocale (LC_NUMERIC, old_num_locale.c_str ()); + return true; +} + +#define READ_DOUBLE(var,name) \ + buf = (char*) xmlGetProp (node, (xmlChar*) name); \ + if (buf) { \ + var = strtod (buf, NULL); \ + xmlFree (buf); \ + } +#define READ_INT(var,name) \ + buf = (char*) xmlGetProp (node, (xmlChar*) name); \ + if (buf) { \ + var = strtol (buf, NULL, 10); \ + xmlFree (buf); \ + } + +bool Theme::Load (xmlNodePtr node) +{ + char *buf = (char*) xmlGetProp (node, (xmlChar*) "name"); + if (buf) { + m_Name = buf; + xmlFree (buf); + } + READ_DOUBLE (m_BondLength, "bond-length"); + READ_DOUBLE (m_BondAngle, "bond-angle"); + READ_DOUBLE (m_BondDist, "bond-dist"); + READ_DOUBLE (m_BondWidth, "bond-width"); + READ_DOUBLE (m_ArrowLength, "arrow-length"); + READ_DOUBLE (m_ArrowHeadA, "arrow-head-a"); + READ_DOUBLE (m_ArrowHeadB, "arrow-head-b"); + READ_DOUBLE (m_ArrowHeadC, "arrow-head-c"); + READ_DOUBLE (m_ArrowDist, "arrow-dist"); + READ_DOUBLE (m_ArrowWidth, "arrow-width"); + READ_DOUBLE (m_ArrowPadding, "arrow-padding"); + READ_DOUBLE (m_HashWidth, "hash-width"); + READ_DOUBLE (m_HashDist, "hash-dist"); + READ_DOUBLE (m_StereoBondWidth, "stereo-bond-width"); + READ_DOUBLE (m_ZoomFactor, "zoom-factor"); + m_ZoomFactor = 1 / m_ZoomFactor; + READ_DOUBLE (m_Padding, "padding"); + READ_DOUBLE (m_StoichiometryPadding, "stoichiometry-padding"); + READ_DOUBLE (m_ObjectPadding, "object-padding"); + READ_DOUBLE (m_SignPadding, "sign-padding"); + READ_DOUBLE (m_ChargeSignSize, "charge-sign-size"); + buf = (char*) xmlGetProp (node, (xmlChar*) "font-family"); + if (buf) { + if (m_FontFamily) + g_free (m_FontFamily); + m_FontFamily = g_strdup (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "font-style"); + if (buf) { + if (!strcmp (buf, "normal")) + m_FontStyle = PANGO_STYLE_NORMAL; + else if (!strcmp (buf, "oblique")) + m_FontStyle = PANGO_STYLE_OBLIQUE; + else if (!strcmp (buf, "italic")) + m_FontStyle = PANGO_STYLE_ITALIC; + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "font-weight"); + if (buf) { + if (!strcmp (buf, "ultra-light")) + m_FontWeight= PANGO_WEIGHT_ULTRALIGHT; + else if (!strcmp (buf, "light")) + m_FontWeight = PANGO_WEIGHT_LIGHT; + else if (!strcmp (buf, "normal")) + m_FontWeight = PANGO_WEIGHT_NORMAL; + else if (!strcmp (buf, "semi-bold")) + m_FontWeight = PANGO_WEIGHT_SEMIBOLD; + else if (!strcmp (buf, "bold")) + m_FontWeight = PANGO_WEIGHT_BOLD; + else if (!strcmp (buf, "ultra-bold")) + m_FontWeight = PANGO_WEIGHT_ULTRABOLD; + else if (!strcmp (buf, "heavy")) + m_FontWeight = PANGO_WEIGHT_HEAVY; +#if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 24 + else if (!strcmp (buf, "thin")) + m_FontWeight = PANGO_WEIGHT_THIN; + else if (!strcmp (buf, "book")) + m_FontWeight = PANGO_WEIGHT_BOOK; + else if (!strcmp (buf, "medium")) + m_FontWeight = PANGO_WEIGHT_MEDIUM; + else if (!strcmp (buf, "ultra-heavy")) + m_FontWeight = PANGO_WEIGHT_ULTRAHEAVY; +#endif + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "font-variant"); + if (buf) { + if (!strcmp (buf, "normal")) + m_FontVariant = PANGO_VARIANT_NORMAL; + else if (!strcmp (buf, "small-caps")) + m_FontVariant = PANGO_VARIANT_SMALL_CAPS; + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "font-stretch"); + if (buf) { + if (!strcmp (buf, "ultra-condensed")) + m_FontStretch = PANGO_STRETCH_ULTRA_CONDENSED; + else if (!strcmp (buf, "extra-condensed")) + m_FontStretch = PANGO_STRETCH_EXTRA_CONDENSED; + else if (!strcmp (buf, "condensed")) + m_FontStretch = PANGO_STRETCH_CONDENSED; + else if (!strcmp (buf, "semi-condensed")) + m_FontStretch = PANGO_STRETCH_SEMI_CONDENSED; + else if (!strcmp (buf, "normal")) + m_FontStretch = PANGO_STRETCH_NORMAL; + else if (!strcmp (buf, "semi-expanded")) + m_FontStretch = PANGO_STRETCH_SEMI_EXPANDED; + else if (!strcmp (buf, "expanded")) + m_FontStretch = PANGO_STRETCH_EXPANDED; + else if (!strcmp (buf, "extra-expanded")) + m_FontStretch = PANGO_STRETCH_EXTRA_EXPANDED; + else if (!strcmp (buf, "ultra-expanded")) + m_FontStretch = PANGO_STRETCH_ULTRA_EXPANDED; + xmlFree (buf); + } + READ_INT (m_FontSize, "font-size"); + buf = (char*) xmlGetProp (node, (xmlChar*) "text-font-family"); + if (buf) { + if (m_TextFontFamily) + g_free (m_TextFontFamily); + m_TextFontFamily = g_strdup (buf); + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "text-font-style"); + if (buf) { + if (!strcmp (buf, "normal")) + m_TextFontStyle = PANGO_STYLE_NORMAL; + else if (!strcmp (buf, "oblique")) + m_TextFontStyle = PANGO_STYLE_OBLIQUE; + else if (!strcmp (buf, "italic")) + m_TextFontStyle = PANGO_STYLE_ITALIC; + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "text-font-weight"); + if (buf) { + if (!strcmp (buf, "ultra-light")) + m_TextFontWeight= PANGO_WEIGHT_ULTRALIGHT; + else if (!strcmp (buf, "light")) + m_TextFontWeight = PANGO_WEIGHT_LIGHT; + else if (!strcmp (buf, "normal")) + m_TextFontWeight = PANGO_WEIGHT_NORMAL; + else if (!strcmp (buf, "semi-bold")) + m_TextFontWeight = PANGO_WEIGHT_SEMIBOLD; + else if (!strcmp (buf, "bold")) + m_TextFontWeight = PANGO_WEIGHT_BOLD; + else if (!strcmp (buf, "ultra-bold")) + m_TextFontWeight = PANGO_WEIGHT_ULTRABOLD; + else if (!strcmp (buf, "heavy")) + m_TextFontWeight = PANGO_WEIGHT_HEAVY; +#if PANGO_VERSION_MAJOR > 1 || PANGO_VERSION_MINOR >= 24 + else if (!strcmp (buf, "thin")) + m_TextFontWeight = PANGO_WEIGHT_THIN; + else if (!strcmp (buf, "book")) + m_TextFontWeight = PANGO_WEIGHT_BOOK; + else if (!strcmp (buf, "medium")) + m_TextFontWeight = PANGO_WEIGHT_MEDIUM; + else if (!strcmp (buf, "ultra-heavy")) + m_TextFontWeight = PANGO_WEIGHT_ULTRAHEAVY; +#endif + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "text-font-variant"); + if (buf) { + if (!strcmp (buf, "normal")) + m_TextFontVariant = PANGO_VARIANT_NORMAL; + else if (!strcmp (buf, "small-caps")) + m_TextFontVariant = PANGO_VARIANT_SMALL_CAPS; + xmlFree (buf); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "text-font-stretch"); + if (buf) { + if (!strcmp (buf, "ultra-condensed")) + m_TextFontStretch = PANGO_STRETCH_ULTRA_CONDENSED; + else if (!strcmp (buf, "extra-condensed")) + m_TextFontStretch = PANGO_STRETCH_EXTRA_CONDENSED; + else if (!strcmp (buf, "condensed")) + m_TextFontStretch = PANGO_STRETCH_CONDENSED; + else if (!strcmp (buf, "semi-condensed")) + m_TextFontStretch = PANGO_STRETCH_SEMI_CONDENSED; + else if (!strcmp (buf, "normal")) + m_TextFontStretch = PANGO_STRETCH_NORMAL; + else if (!strcmp (buf, "semi-expanded")) + m_TextFontStretch = PANGO_STRETCH_SEMI_EXPANDED; + else if (!strcmp (buf, "expanded")) + m_TextFontStretch = PANGO_STRETCH_EXPANDED; + else if (!strcmp (buf, "extra-expanded")) + m_TextFontStretch = PANGO_STRETCH_EXTRA_EXPANDED; + else if (!strcmp (buf, "ultra-expanded")) + m_TextFontStretch = PANGO_STRETCH_ULTRA_EXPANDED; + xmlFree (buf); + } + READ_INT (m_TextFontSize, "text-font-size"); + m_ThemeType = FILE_THEME_TYPE; + return true; +} + +#define TEST_FIELD(field) \ + if (field != theme.field) \ + return false; +#define TEST_FLOAT_FIELD(field) \ + if (fabs (1. - field / theme.field) > 1e-7) \ + return false; + +bool Theme::operator== (const Theme &theme) +{ + TEST_FLOAT_FIELD (m_BondLength) + TEST_FLOAT_FIELD (m_BondAngle) + TEST_FLOAT_FIELD (m_BondDist) + TEST_FLOAT_FIELD (m_BondWidth) + TEST_FLOAT_FIELD (m_ArrowLength) + TEST_FLOAT_FIELD (m_ArrowWidth) + TEST_FLOAT_FIELD (m_ArrowDist) + TEST_FLOAT_FIELD (m_ArrowHeadA) + TEST_FLOAT_FIELD (m_ArrowHeadB) + TEST_FLOAT_FIELD (m_ArrowHeadC) + TEST_FLOAT_FIELD (m_ArrowPadding) + TEST_FLOAT_FIELD (m_HashWidth) + TEST_FLOAT_FIELD (m_HashDist) + TEST_FLOAT_FIELD (m_StereoBondWidth) + TEST_FLOAT_FIELD (m_ZoomFactor) + TEST_FLOAT_FIELD (m_Padding) + TEST_FLOAT_FIELD (m_StoichiometryPadding) + TEST_FLOAT_FIELD (m_ObjectPadding) + TEST_FLOAT_FIELD (m_SignPadding) + TEST_FLOAT_FIELD (m_ChargeSignSize) + if (strcmp (m_FontFamily, theme.m_FontFamily)) + return false; + TEST_FIELD (m_FontStyle) + TEST_FIELD (m_FontWeight) + TEST_FIELD (m_FontVariant) + TEST_FIELD (m_FontStretch) + TEST_FIELD (m_FontSize) + if (strcmp (m_TextFontFamily, theme.m_TextFontFamily)) + return false; + TEST_FIELD (m_TextFontStyle) + TEST_FIELD (m_TextFontWeight) + TEST_FIELD (m_TextFontVariant) + TEST_FIELD (m_TextFontStretch) + TEST_FIELD (m_TextFontSize) + return true; +} + +void Theme::RemoveClient (Object *client) +{ + set ::iterator iter = m_Clients.find (client); + if (iter != m_Clients.end ()) + m_Clients.erase (iter); + if (m_ThemeType == FILE_THEME_TYPE && m_Clients.size () == 0) { + TheThemeManager.RemoveFileTheme (this); + delete this; + } +} + +void Theme::NotifyChanged () +{ + set ::iterator iter, enditer = m_Clients.end (); + for (iter = m_Clients.begin (); iter != enditer; iter++) + (*iter)->OnSignal (OnThemeChangedSignal, NULL); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/theme.h gnome-chemistry-utils-0.10.9/libs/gcp/theme.h --- gnome-chemistry-utils-0.8.6/libs/gcp/theme.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/theme.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,401 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * theme.h + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_THEME_H +#define GCHEMPAINT_THEME_H + +#include +#include +#include +#include +#ifdef HAVE_GO_CONF_SYNC +# ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +# else +# include +# endif +#else +# include +#endif +#include +#include +#include +#include +#include + +/*!\file*/ + +namespace gcp { + +/*!\enum ThemeType gcp/theme.h +Enumerates the various storage classes for themes. +*/ +typedef enum { +/*! +The default theme. +*/ + DEFAULT_THEME_TYPE, +/*! +A user defined theme which might be modified on the fly. +*/ + LOCAL_THEME_TYPE, +/*! +A global theme which can't be edited. +*/ + GLOBAL_THEME_TYPE, +/*! +A theme loaded from a data file. Such themes can be modified. +*/ + FILE_THEME_TYPE +} ThemeType; + +/*!\class Theme gcp/theme.h +\brief themes class. + +Represent an edition settings in GChemPaint. +*/ +class Theme +{ +friend class ThemeManager; +friend class PrefsDlg; + +public: +/*! +@param name the name of the new theme. + +Constructs a new theme according to the local settings. +*/ + Theme (char const *name); +/*! +The destructor. +*/ + ~Theme (); + +/*! +@return the theme name. +*/ + std::string &GetName () {return m_Name;} +/*! +@param xml the xml document used for serialization. + +Builds an xml node containing the serialized theme. +@return the new xml node or NULL if an error occured. +*/ + bool Save (xmlDocPtr xml); +/*! +@param node the xml node containing the serialized theme. + +Loads a theme in memory, either from the theme database or from a document file. +*/ + bool Load (xmlNodePtr node); +/*! +@param theme a theme to compare. + +@return true if the two themes have identical settings. +*/ + bool operator== (const Theme &theme); +/*! +@param client the client to add. + +Adds a new client to the list of this theme clients. +*/ + void AddClient (gcu::Object *client) {m_Clients.insert (client);} +/*! +@param client the client to remove. + +Removes \a client to the list of this theme clients. +*/ + void RemoveClient (gcu::Object *client); +/*! +Notify all the theme clients that at least one setting changed. +*/ + void NotifyChanged (); + +private: + std::string m_Name; + std::set m_Clients; + bool modified; + +/*!\fn GetBondLength() +@return the theme default bond length in picometers. +*/ +GCU_RO_PROP (double, BondLength) +/*!\fn GetBondAngle() +@return the theme default angle between two consecutive bonds in a chain in degrees. +*/ +GCU_RO_PROP (double, BondAngle) +/*!\fn GetBondDist() +@return the theme default distance between two lines in pixels (at 100% zoom) in a multiple bond. +*/ +GCU_RO_PROP (double, BondDist) +/*!\fn GetBondWidth() +@return the theme default bond line width in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, BondWidth) +/*!\fn GetArrowLength() +@return the theme default arrow length in picometers. +*/ +GCU_RO_PROP (double, ArrowLength) +/*!\fn GetHashWidth() +@return the theme default line width in pixels for hash bonds (at 100% zoom). +*/ +GCU_RO_PROP (double, HashWidth) +/*!\fn GetHashDist() +@return the theme default distance between two lines in pixels for hash bonds (at 100% zoom). +*/ +GCU_RO_PROP (double, HashDist) +/*!\fn GetStereoBondWidth() +@return the theme default largest width for hash or wedge bonds (at 100% zoom). +*/ +GCU_RO_PROP (double, StereoBondWidth) +/*!\fn GetZoomFactor() +@return the theme default scale used to convert real distance to canvas distance expressed in pixel per pm (at 100% zoom). +*/ +GCU_RO_PROP (double, ZoomFactor) +/*!\fn GetPadding() +@return the theme default padding used around text objects such as atoms, texts and other typographic signs in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, Padding) +/*!\fn GetArrowHeadA() +@return the theme default distance from tip of arrowhead to center in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, ArrowHeadA) +/*!\fn GetArrowHeadB() +@return the theme default distance from tip of arrowhead to trailing point, measured along shaft, in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, ArrowHeadB) +/*!\fn GetArrowHeadC() +@return the theme default distance of arrowhead trailing points from outside edge of shaft in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, ArrowHeadC) +/*!\fn GetArrowDist() +@return the theme default distance between two lines in pixels (at 100% zoom) for double arrows or for retrosynthesis arrows. +*/ +GCU_RO_PROP (double, ArrowDist) +/*!\fn GetArrowWidth() +@return the theme default arrow line width in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, ArrowWidth) +/*!\fn GetArrowPadding() +@return the theme default padding between arrows and associated objects (reactants, mesomers,...) in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, ArrowPadding) +/*!\fn GetArrowObjectPadding() +@return the theme default padding between arrows ends and attached objects bounds in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, ArrowObjectPadding) +/*!\fn GetStoichiometryPadding() +@return the theme default extra padding between a stoichiometric coefficient and its associated molecule in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, StoichiometryPadding) +/*!\fn GetObjectPadding() +@return the theme default padding in pixels added between consecutive objects during an alignment operation (at 100% zoom). +*/ +GCU_RO_PROP (double, ObjectPadding) +/*!\fn GetSignPadding() +@return the theme default padding between a '+' sign in a reaction equation and reactants symbols in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, SignPadding) +/*!\fn GetChargeSignSize() +@return the theme default size of the charge sign in pixels (at 100% zoom). +*/ +GCU_RO_PROP (double, ChargeSignSize) +/*!\fn GetFontFamily() +@return the theme font family used for chemical formula such as atoms and fragments +*/ +GCU_RO_PROP (gchar*, FontFamily) +/*!\fn GetFontStyle() +@return the theme font style used for chemical formula such as atoms and fragments. +*/ +GCU_RO_PROP (PangoStyle, FontStyle) +/*!\fn GetFontWeight() +@return the theme font weight used for chemical formula such as atoms and fragments. +*/ +GCU_RO_PROP (PangoWeight, FontWeight) +/*!\fn GetFontVariant() +@return the theme font variant used for chemical formula such as atoms and fragments. +*/ +GCU_RO_PROP (PangoVariant, FontVariant) +/*!\fn GetFontStretch() +@return the theme font stretch used for chemical formula such as atoms and fragments. +*/ +GCU_RO_PROP (PangoStretch, FontStretch) +/*!\fn GetFontSize() +@return the theme font size used for chemical formula such as atoms and fragments. +*/ +GCU_RO_PROP (gint, FontSize) +/*!\fn GetTextFontFamily() +@return the theme default font family used for texts. +*/ +GCU_RO_PROP (gchar*, TextFontFamily) +/*!\fn GetTextFontStyle() +@return the theme default font style used for texts. +*/ +GCU_RO_PROP (PangoStyle, TextFontStyle) +/*!\fn GetTextFontWeight() +@return the theme default font weight used for texts. +*/ +GCU_RO_PROP (PangoWeight, TextFontWeight) +/*!\fn GetTextFontVariant() +@return the theme default font variant used for texts. +*/ +GCU_RO_PROP (PangoVariant, TextFontVariant) +/*!\fn GetTextFontStretch() +@return the theme default font stretch used for texts. +*/ +GCU_RO_PROP (PangoStretch, TextFontStretch) +/*!\fn GetTextFontSize() +@return the theme default text font size. +*/ +GCU_RO_PROP (gint, TextFontSize) +/*!\fn GetThemeType() +@return the type of the theme as definedby the ThemeType enumeration. +*/ +GCU_RO_PROP (ThemeType, ThemeType); +}; + +/*!\class ThemeManager gcp/theme.h +\brief themes engine class. + +Represent the themes set. Only one global object of this class exists +in GChemPaint. +*/ +class ThemeManager +{ +public: +/*! +Constructs a theme manager. +*/ + ThemeManager (); +/*! +The destructor. +*/ + ~ThemeManager (); + +/*! +@param name the name of the requested theme. + +@return the theme corresponding to \a name if any, or NULL. +*/ + Theme *GetTheme (char const *name); +/*! +@param name the name of the requested theme. + +@return the theme corresponding to \a name if any, or NULL. +*/ + Theme *GetTheme (std::string &name); +/*! +@return the list of all theme names currently in use. +*/ + std::list const &GetThemesNames (); +#ifdef HAVE_GO_CONF_SYNC +/*! +@param node the GOConfNode for which a key value changed. +@param name the key whose value changed. + +Called by the framework when the value associated with \a name changed in the +settings. +*/ + void OnConfigChanged (GOConfNode *node, gchar const *name); +#else +/*! +@param client the GConfClient which a key value changed. +@param cnxn_id the notification id. +@param entry the entry which changed. + +Called by the framework when the value associated with \a entry changed in the +settings. +*/ + void OnConfigChanged (GConfClient *client, guint cnxn_id, GConfEntry *entry); +#endif +/*! +@param theme a theme to duplicate. + +Creates a new theme based on \a theme or on the default theme if \a theme is NULL. +*/ + Theme *CreateNewTheme (Theme *theme = NULL); +/*! +@param theme a theme imported from a document file. +@param label the document label. + +Called when opening a file if the theme saved with the file has the same name +than an already registered theme, but different settings. The theme will not be +saved to the local database, and will be registered using \a label and the theme +name. +*/ + void AddFileTheme (Theme *theme, char const *label); +/*! +@param theme the themeto remove from the list. + +Called for theme registered using AddFileName() typically when the associated +document file is closed. +*/ + void RemoveFileTheme (Theme *theme); +/*! +@param theme a theme. +@param name the new name for the theme. + +Changes the name of the theme. +*/ + void ChangeThemeName (Theme *theme, char const *name); +/*! +@return the default theme. +*/ + Theme *GetDefaultTheme () {return m_DefaultTheme;} +/*! +@param name the name of the default theme. + +Sets the default theme. This theme is used when creating new documents with no +explicit theme. +*/ + void SetDefaultTheme (char const *name); +/*! +Closes configuration change notification. Should be called once before the +destructionof the theme manager. +*/ + void Shutdown (); + +private: + void ParseDir (std::string &path, ThemeType type); + +private: + std::map m_Themes; + std::list m_Names; +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *m_ConfNode; +#else + GConfClient *m_ConfClient; +#endif + guint m_NotificationId; + Theme *m_DefaultTheme; +}; + +/*! +The themes manager unique instance. +*/ +extern ThemeManager TheThemeManager; + +} // namespace gcp + +#endif // GCHEMPAINT_THEME_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/tool.cc gnome-chemistry-utils-0.10.9/libs/gcp/tool.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/tool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/tool.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,239 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * tool.cc + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "tool.h" +#include "document.h" +#include "application.h" + +using namespace gcu; +using namespace std; + +namespace gcp { + +Tool* pActiveTool = NULL; + +Tool::Tool(Application *App, string Id) +{ + name = Id; + m_pApp = App; + App->SetTool (Id, this); + m_pObject = NULL; + m_pItem = NULL; + m_bChanged = m_bPressed = false; + m_pData = NULL; +} + +Tool::~Tool() +{ + m_pApp->SetTool (name, NULL); +} + +bool Tool::OnClicked (View* pView, Object* pObject, double x, double y, unsigned int state) +{ + m_x0 = m_x1 = lastx = x; + m_y0 = m_y1 = lasty = y; + m_nState = state; + m_bPressed = true; + m_pObject = pObject; + if (pObject) + m_pObjectGroup = pObject->GetGroup (); + m_pView = pView; + m_pWidget = m_pView->GetWidget (); + m_pData = (WidgetData*) g_object_get_data (G_OBJECT(m_pWidget), "data"); + m_pGroup = gnome_canvas_root (GNOME_CANVAS (m_pWidget)); + m_pBackground = m_pView->GetBackground (); + m_dZoomFactor = m_pView->GetZoomFactor (); +/* Object* pAtom; + if (m_pObject && ((pAtom = m_pObject->GetAtomAt (m_x0 / m_dZoomFactor, m_y0 / m_dZoomFactor)))) + m_pObject = pAtom;*/ + m_bAllowed = true; + return OnClicked (); +} + +void Tool::OnDrag(double x, double y, unsigned int state) +{ + m_x = lastx = x; + m_y = lasty = y; + m_nState = state; + OnDrag(); +} + +void Tool::OnRelease(double x, double y, unsigned int state) +{ + m_x = lastx = x; + m_y = lasty = y; + m_nState = state; + m_bPressed = false; + OnRelease(); + if (m_pItem) + { + gtk_object_destroy(GTK_OBJECT(GNOME_CANVAS_ITEM(m_pItem))); + m_pItem = NULL; + } + m_pView->GetDoc()->FinishOperation(); + m_pObject = NULL; + m_bChanged = false; + g_signal_emit_by_name(m_pWidget, "update_bounds"); +} + +bool Tool::OnRightButtonClicked (View* pView, Object* pObject, double x, double y, GtkUIManager *UIManager) +{ + m_pObject = pObject; + m_pView = pView; + m_pWidget = m_pView->GetWidget(); + m_pData = (WidgetData*)g_object_get_data(G_OBJECT(m_pWidget), "data"); + m_pGroup = gnome_canvas_root(GNOME_CANVAS(m_pWidget)); + m_pBackground = m_pView->GetBackground(); + m_dZoomFactor = m_pView->GetZoomFactor(); + m_x = x; + m_y = y; + bool res = OnRightButtonClicked (UIManager); + m_pObject = NULL; + return res; +} + +bool Tool::Activate(bool bState) +{ + if (bState) + { + m_pGroup = NULL; + m_pBackground = NULL; + m_pObject = NULL; + m_pWidget = NULL; + m_pView = NULL; + Activate(); + return true; + } + else + { + if (Deactivate()) + { + m_pGroup = NULL; + m_pBackground = NULL; + m_pObject = NULL; + m_pWidget = NULL; + m_pView = NULL; + return true; + } + return false; + } +} + +bool Tool::OnClicked() +{ + return false; +} + +void Tool::OnDrag() +{ +} + +void Tool::OnRelease() +{ +} + +bool Tool::OnRightButtonClicked(GtkUIManager *UIManager) +{ + return false; +} + +void Tool::OnChangeState() +{ + if (m_bPressed) + { + m_x = lastx; + m_y = lasty; + OnDrag(); + } +} + +void Tool::Activate() +{ +} + +bool Tool::Deactivate() +{ + return true; +} + +bool Tool::OnEvent(GdkEvent* event) +{ + return false; +} + +bool Tool::NotifyViewChange() +{ + return true; +} + +bool Tool::DeleteSelection() +{ + return false; +} + +bool Tool::CopySelection(GtkClipboard *clipboard) +{ + return false; +} + +bool Tool::CutSelection(GtkClipboard *clipboard) +{ + return false; +} + +bool Tool::PasteSelection(GtkClipboard *clipboard) +{ + return false; +} + +bool Tool::OnReceive(GtkClipboard *clipboard, GtkSelectionData *data, int type) +{ + return false; +} + +bool Tool::OnUndo() +{ + return false; +} + +bool Tool::OnRedo() +{ + return false; +} + +void Tool::PushNode(xmlNodePtr node) +{ +} + +void Tool::AddSelection(WidgetData* data) +{ +} + +GtkWidget *Tool::GetPropertyPage () +{ + return NULL; +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/tool.h gnome-chemistry-utils-0.10.9/libs/gcp/tool.h --- gnome-chemistry-utils-0.8.6/libs/gcp/tool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/tool.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,368 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * tool.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TOOL_H +#define GCHEMPAINT_TOOL_H + +#include +#include +#include "widgetdata.h" +#include "view.h" +#include "operation.h" +#include + +/*!\file*/ +namespace gcp { + +class Application; + +/*!\class Tool +Base clas for GChemPaint tools. +*/ +class Tool +{ +public: +/*! +@param App the GChemPaint application. +@param Id the name of the tool. + +Constructs a new tool. +*/ + Tool (gcp::Application *App, std::string Id); +/*! +The destructor. +*/ + virtual ~Tool (); + +/*! +@param pView the view instance owning the event. +@param pObject the Object on which the click occured. +@param x the horizontal position of the mouse when the click occured. +@param y the vertical position of the mouse when the click occured. +@param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See GdkModifierType in GDK documentation. + +This method is called by the framework when the tool is active and a click occurs. It initialize +some members and then calls the virtual OnClicked() method. +It might be called to simulate a click in some instances (e.g. from a contextual menu handler). + +@return true if the mouse drag and button release evens are significative for this tool +in the current context, false otherwise. If true, a mouse move will fire the OnDrag method, +and a button release will result in an OnRelease call. If false, nothing happens for these +events. +*/ + bool OnClicked (View* pView, gcu::Object* pObject, double x, double y, unsigned int state); + +/*! +@param x the horizontal position of the mouse when the event occured. +@param y the vertical position of the mouse when the event occured. +@param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See GdkModifierType in GDK documentation. + +This method is called by the framework when the tool is active, the first mouse button +is pressed and the mouse is moved. +*/ + void OnDrag (double x, double y, unsigned int state); +/*! +@param x the horizontal position of the mouse when the event occured. +@param y the vertical position of the mouse when the event occured. +@param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See GdkModifierType in GDK documentation. + +This method is called by the framework when the tool is active and the first mouse button +is released. +*/ + void OnRelease (double x, double y, unsigned int state); +/*! +@param pView the view where the event occured. +@param pObject the object on which the event occured. +@param x the horizontal position of the mouse when the event occured. +@param y the vertical position of the mouse when the event occured. +@param UIManager the GtkUIManager in use. + +This method is called by the framework when the tool is active and the right mouse button +is pressed. It is used to add tool specific menu items to the contextual menu. +It calls OnRightButtonClicked(GtkUIManager*). + +@return true if at least one menu item was added, false otherwise. +*/ + bool OnRightButtonClicked (View* pView, gcu::Object* pObject, double x, double y, GtkUIManager *UIManager); +/*! +@param bState whether to activate or deactivate the tool. + +When \a bState is true, the tool is activated, otherwise it is deactivated. +Activate() or Deactivate() is called for this instance. +@return true on success, and false otherwise. Activation always succeeds. +*/ + bool Activate (bool bState); +/*! +@return the tool name. +*/ + std::string& GetName () {return name;} +/*! +@param UIManager the GtkUIManager in use. + +Adds menu items to the contextual menu. +Default implementation do not add any menu item and returns false. Derived classes +for which menu items exist must override this method. +@return true if at least one menu item was added, false otherwise. +*/ + virtual bool OnRightButtonClicked (GtkUIManager *UIManager); +/*! +Virtual method called when the tool is activated. +This method should be overriden for all tools which need some initialization +when activated. Default does nothing. +*/ + virtual void Activate (); +/*! +Virtual method called when the tool is deactivated. +This method should be overriden for all tools which need some cleaning +when deactivated. Default does nothing. +@return true on success, false otherwise. +*/ + virtual bool Deactivate (); +/*! +@param code the state of the mofifier keys as given inthe state field or +some GdkEvent derived structures. + +Called by the framework when a modifier key has been pressed, updates +m_nState, and calls Tool::OnChangeState (). +*/ + void OnKeyPressed (unsigned int code) {m_nState |= code; OnChangeState ();} +/*! +@param code the state of the mofifier keys as given inthe state field or +some GdkEvent derived structures. + +Called by the framework when a modifier key has been released, updates +m_nState, and calls Tool::OnChangeState (). +*/ + void OnKeyReleased (unsigned int code) {if (m_nState & code) m_nState -= code; OnChangeState ();} +/*! +Called by the framework for the active tool when an event occurs. Default +just returns \a false. + +@return true to stop any further propagation of the event, false otherwise. +*/ + virtual bool OnEvent (GdkEvent* event); +/*! +Virtual method called by the framework whenthe active view, and hence the active +document has changed, so that the tool can finish its current operation in the +previously active document and update its options box according to +the new active document settings. +@return true to accept the document change, false if something went wrong and the +active document should not change, as in the case of the fragment tool when +the symbols entered can't be interpreted. +*/ + virtual bool NotifyViewChange (); +/*! +Called by the framework to delete the selection. Tools for which it is meaningful +must have an overriden version of this method. +*/ + virtual bool DeleteSelection (); +/*! +Called by the framework to delete the selection. Tools for which it is meaningful +must have an overriden version of this method. +*/ + virtual bool CopySelection (GtkClipboard *clipboard); +/*! +Called by the framework to copy the selection. Tools for which it is meaningful +must have an oveeriden version of this method. +*/ + virtual bool CutSelection (GtkClipboard *clipboard); +/*! +Called by the framework to cut the selection. Tools for which it is meaningful +must have an overriden version of this method. +*/ + virtual bool PasteSelection (GtkClipboard *clipboard); +/*! +Called by the framework to paste data. Tools for which it is meaningful +must have an overriden version of this method. +*/ + virtual void AddSelection (WidgetData* data); +/*! +Called by the framework when clipboard data are available. Tools for which this +is meaningful must have an overriden version of this method. +*/ + virtual bool OnReceive (GtkClipboard *clipboard, GtkSelectionData *data, int type); +/*! +Called by the framework when the user requests to undo the last change. Tools +such as text editing tools for which this +is meaningful must have an overriden version of this method. +*/ + virtual bool OnUndo (); +/*! +Called by the framework when the user requests to redo the last undone change. +Tools such as text editing tools for which this +is meaningful must have an overriden version of this method. +*/ + virtual bool OnRedo (); +/*! +@param node an xml node to push on the tools private undo stack. + +Used to store a node after a change while editing a text object by text tools. +*/ + virtual void PushNode (xmlNodePtr node); +/*! +Gets the property page for the tool. Called the first time the tool becomes +active. +@return the new tool property page. +*/ + virtual GtkWidget *GetPropertyPage (); +/*! +Gets the tag used to display the appropriate help topic when the user presses +the help button in the tools box. The framework will prefix the result with +the application name. The text tool in GChemPaint returns "text" which becomes +"gchempaint-text". +@return the help tag for the tool. +*/ + virtual char const *GetHelpTag () {return "";} +/*! +Gets the Application instance owning the tool. +@return the Application instance. +*/ + Application * GetApplication () {return m_pApp;} + +protected: +/*! +Called from OnClicked(View*,gcu::Object*,double,doubl,unsigned int) when a +click occured. This method must be overriden in +derived classes, and return true if the drag and release events are meaningful +for the tool in the current context. Default implementation does nothing and +returns false. + +@return true if drag and release events are needed, false otherwise. +*/ + virtual bool OnClicked (); +/*! +Called from OnDrag(double,double,unsigned int) when a drag event occured +occured. This method must be overriden in +derived classes if drag events are meaningful for the tool. +Default implementation does nothing. +*/ + virtual void OnDrag (); +/*! +Called from OnRelease(double,double,unsigned int) when a button release +event occured. This method must be overriden in +derived classes if button release events are meaningful for the tool. +Default implementation does nothing. +*/ + virtual void OnRelease (); +/*! +Called when a modifier key has been pressed or released, and fires a drag +event so that the tool can update things if necessary. +*/ + virtual void OnChangeState (); + +protected: +/*! +x coordinate for the last mouse click (unless the tool modified it). +*/ + double m_x0; +/*! +y coordinate for the last mouse click (unless the tool modified it). +*/ + double m_y0; +/*! +x coordinate for the last mouse click (unless the tool modified it). It might +be used by tools necessitating to pairs of coordinates. +*/ + double m_x1; +/*! +y coordinate for the last mouse click (unless the tool modified it). It might +be used by tools necessitating to pairs of coordinates. +*/ + double m_y1; +/*! +The current x position of the mouse cursor. +*/ + double m_x; +/*! +The current y position of the mouse cursor. +*/ + double m_y; +/*! +The object on which the last click occured or NULL. +*/ + gcu::Object *m_pObject; +/*! +The group to which m_pObject belongs if any. +*/ + gcu::Object *m_pObjectGroup; +/*! +The active gcp::View. +*/ + View *m_pView; +/*! +The widget data for the current active canvas. +*/ + WidgetData *m_pData; +/*! +The active canvas widget. +*/ + GtkWidget *m_pWidget; +/*! +The root group in the active canvas. +*/ + GnomeCanvasGroup *m_pGroup; +/*! +The item on which the last click occured if any. +*/ + GnomeCanvasItem *m_pItem; +/*! +The canvas background. +*/ + GnomeCanvasItem *m_pBackground; +/*! +The zoom factor when the click occured. +*/ + double m_dZoomFactor; +/*! +Flag that might be used by tools to store whether they changed something +since the last click (and before releasing the button). +*/ + bool m_bChanged; +/*! +The state of modifier keys as a GdkModifierType values combination. +*/ + unsigned int m_nState; +/*! +The application owning the tool. +*/ + gcp::Application *m_pApp; +/*! +A set of modified objects tools might use to track what they did modify. +*/ + std::set ModifiedObjects; +/*! +if true, the intended operation is allowed. Default value is true, each tool must set +this flag to false if necessary. +*/ + bool m_bAllowed; + +private: + double lastx, lasty; + std::string name; + bool m_bPressed; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_TOOL_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/tools.cc gnome-chemistry-utils-0.10.9/libs/gcp/tools.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/tools.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/tools.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,185 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * tools.cc + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "settings.h" +#include "tool.h" +#include "tools.h" +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +#endif +#include + +using namespace gcu; +using namespace std; + +namespace gcp { + +static void element_changed_cb (Tools *box, unsigned newZ) +{ + box->OnElementChanged (newZ); +} + +static bool on_delete_event (GtkWidget* widget, GdkEvent *event, gpointer data) +{ + return true; +} + +static void help_cb (Tools *box) +{ + box->OnHelp (); +} + +Tools::Tools (Application *App): + Dialog (App, GLADEDIR"/tools.glade", "tools", App), + m_UIManager (NULL) +{ + if (!xml) { + delete this; + return; + } + g_signal_connect (G_OBJECT (dialog), "delete-event", G_CALLBACK (on_delete_event), NULL); + Application *pApp = dynamic_cast (App); + m_UIManager = NULL; + m_ButtonsBox = GTK_BOX (glade_xml_get_widget (xml, "tools-buttons")); + m_Book = GTK_NOTEBOOK (glade_xml_get_widget (xml, "tools-book")); + GtkWidget *w = glade_xml_get_widget (xml, "mendeleiev"); + gtk_combo_periodic_set_element (GTK_COMBO_PERIODIC (w), pApp->GetCurZ ()); + go_combo_box_set_tearable (GO_COMBO_BOX (w), TearableMendeleiev); + g_signal_connect_swapped (G_OBJECT (w), "changed", G_CALLBACK (element_changed_cb), this); + w = glade_xml_get_widget (xml, "help-btn"); + g_signal_connect_swapped (G_OBJECT (w), "clicked", G_CALLBACK (help_cb), this); +} + +Tools::~Tools () +{ + if (m_UIManager) { + g_object_unref (m_UIManager); + m_UIManager = NULL; + } +} + +void Tools::Show (bool visible) +{ + if (visible) { + gtk_widget_show (GTK_WIDGET (dialog)); + GtkWindow *w = reinterpret_cast (m_App)->GetWindow (); + if (w) + gtk_window_present (w); + } else + gtk_widget_hide (GTK_WIDGET (dialog)); +} + +void register_item_cb (GtkWidget *w, Tools *Dlg) +{ + Dlg->RegisterTool (w); +} + +void Tools::AddToolbar (string &name) +{ + if (m_UIManager) { + GtkWidget *w = gtk_ui_manager_get_widget (m_UIManager, name.c_str ()), + *h = gtk_handle_box_new (); + gtk_container_foreach (GTK_CONTAINER (w), (GtkCallback) register_item_cb, this); + gtk_toolbar_set_style (GTK_TOOLBAR (w), GTK_TOOLBAR_ICONS); + gtk_toolbar_set_show_arrow (GTK_TOOLBAR (w), false); + gtk_toolbar_set_tooltips (GTK_TOOLBAR (w), true); + gtk_container_add (GTK_CONTAINER (h), w); + gtk_box_pack_start_defaults (m_ButtonsBox, h); + gtk_widget_show_all (h); + } +} + +void Tools::SetUIManager (GtkUIManager *manager) +{ + m_UIManager = manager; + g_object_ref (m_UIManager); +} + +void Tools::SetPage (Tool *tool, int i) +{ + m_Pages[tool] = i; +} + +void Tools::OnSelectTool (Tool *tool) +{ + if (m_Pages[tool] < 0) { + GtkWidget *w = tool->GetPropertyPage (); + if (w) + m_Pages[tool] = gtk_notebook_append_page (m_Book, w, NULL); + else + m_Pages[tool] = 0; + } + gtk_notebook_set_current_page (m_Book, m_Pages[tool]); + m_Tool = tool; +} + +void Tools::RegisterTool (GtkWidget *w) +{ + char const *name = gtk_widget_get_name (w); + Application *App = dynamic_cast (m_App); + if (strncmp (name, "Gtk", 3)) + App->SetToolItem (name, w); + Tool *tool = App->GetTool (name); + m_Pages[tool] = -1; +} + +void Tools::OnElementChanged (int Z) +{ + dynamic_cast (m_App)->SetCurZ (Z); + // Hmm, we should find a better way to do the following, the path might change. + GtkWidget *w = gtk_ui_manager_get_widget (m_UIManager, "ui/AtomsToolbar/Atom1/Element"); + if (!w) + return; + GtkWidget* icon = gtk_tool_button_get_icon_widget (GTK_TOOL_BUTTON (w)); + if (!GTK_IS_LABEL (icon)) { + icon = gtk_label_new (Element::Symbol (Z)); + gtk_widget_show (icon); + gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (w), icon); + gtk_widget_show_all (w); + } else + gtk_label_set_text (GTK_LABEL (icon), Element::Symbol (Z)); +} + +void Tools::Update (void) +{ + GtkWidget *w = glade_xml_get_widget (xml, "mendeleiev"); + go_combo_box_set_tearable (GO_COMBO_BOX (w), TearableMendeleiev); +} + +void Tools::OnHelp () +{ + m_App->OnHelp (m_Tool->GetHelpTag ()); +} + +void Tools::SetElement (int Z) +{ + GtkComboPeriodic *w = reinterpret_cast (glade_xml_get_widget (xml, "mendeleiev")); + gtk_combo_periodic_set_element (w, Z); + OnElementChanged (Z); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/tools.h gnome-chemistry-utils-0.10.9/libs/gcp/tools.h --- gnome-chemistry-utils-0.8.6/libs/gcp/tools.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/tools.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,124 @@ +// -*- C++ -*- + +/* + * GChemPaint + * tools.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TOOLS_H +#define GCHEMPAINT_TOOLS_H + +#include +#include + +/*!\file*/ +namespace gcp { + +/*!class Tools gcp/tools.h +The GChemPaint tools box. Only one instance should be created. +*/ +class Tools: public gcu::Dialog +{ +public: +/*! +@param App the GChemPaint Application. + +Builds the tools box for the application. +*/ + Tools (Application *App); +/*! +The destructor. +*/ + virtual ~Tools (); + +/*! +@param visible whether the tools box should be visible. + +Shows or hides the tools box. +*/ + void Show (bool visible); +/*! +@param name the new toolbar name. + +Addsa new toolbar. +*/ + void AddToolbar (std::string &name); +/*! +@param manager a GtkUIManager. + +Sets the GtkUIManager associated to the user interface of the tools box. +*/ + void SetUIManager (GtkUIManager *manager); +/*! +@param tool the Tool for which an options page has been added. +@param i the rank of the page in the notebook. + +Registers the new option box for the tool, so that the widget is created only +once when the tool is first selected. +*/ + void SetPage (Tool *tool, int i); +/*! +@param tool a Tool. + +Called by the framwork when the Tool is selected. If the Tool has an option box, +it becomes the active notebook page after being created if necessary. +*/ + void OnSelectTool (Tool *tool); +/*! +@param w the tool widget, generally a button. + +Registers the Tool corresponding to the widget. The widget name is used to +retrieve the Tool from the application using gcp::Application::GetTool(). +*/ + void RegisterTool (GtkWidget *w); +/*! +@param Z the new current atomic number. + +Called by the framework when the current atomic number has changed. +*/ + void OnElementChanged (int Z); +/*! +@param Z the new current atomic number. + +Called by the framework when the user choose a new current atomic number +using the Mendeleiev table widget. +*/ + void SetElement (int Z); +/*! +Called by the framework when the tearable property of the Mendeleiev table +widget changed. +*/ + void Update (void); +/*! +Called by the framework when the Help button is clicked. +*/ + void OnHelp (); + +private: + GtkUIManager *m_UIManager; + GtkBox *m_ButtonsBox; + std::map m_Pages; + GtkNotebook *m_Book; + Tool *m_Tool; +}; + +} // namespace gcp + +#endif // GCHEMPAINT_TOOLS_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/view.cc gnome-chemistry-utils-0.10.9/libs/gcp/view.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/view.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/view.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,1224 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * view.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "widgetdata.h" +#include "view.h" +#include "settings.h" +#include "document.h" +#include "application.h" +#include "tool.h" +#include "tools.h" +#include "text.h" +#include "theme.h" +#include "window.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +Derivation of a new widget from gnome_canvas with an event for updating canvas size +*/ + +typedef struct _GnomeCanvasGCP GnomeCanvasGCP; +typedef struct _GnomeCanvasGCPClass GnomeCanvasGCPClass; + +#define GNOME_TYPE_CANVAS_GCP (gnome_canvas_gcp_get_type ()) +#define GNOME_CANVAS_GCP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_GCP, GnomeCanvasGCP)) +#define GNOME_CANVAS_CLASS_GCP(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_GCP, GnomeCanvasGCPClass)) +#define GNOME_IS_CANVAS_GCP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_GCP)) +#define GNOME_IS_CANVAS_GCP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_GCP)) +#define GNOME_CANVAS_GCP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_GCP, GnomeCanvasGCPClass)) + +enum { + UPDATE_BOUNDS, + LAST_SIGNAL +}; + +struct _GnomeCanvasGCP { + GnomeCanvas canvas; +}; + +struct _GnomeCanvasGCPClass { + GnomeCanvasClass parent_class; + + void (* update_bounds) (GnomeCanvasGCP *canvas); +}; + +GType gnome_canvas_gcp_get_type (void) G_GNUC_CONST; +static void gnome_canvas_gcp_class_init (GnomeCanvasGCPClass *Class); +static void gnome_canvas_gcp_init (GnomeCanvasGCP *canvas); +static void gnome_canvas_gcp_update_bounds (GnomeCanvasGCP *canvas); +static GtkWidget *gnome_canvas_gcp_new (void); + +static guint gnome_canvas_gcp_signals[LAST_SIGNAL] = { 0 }; + +GType +gnome_canvas_gcp_get_type (void) +{ + static GType canvas_gcp_type; + + if (!canvas_gcp_type) { + static const GTypeInfo object_info = { + sizeof (GnomeCanvasGCPClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gnome_canvas_gcp_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GnomeCanvasGCP), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnome_canvas_gcp_init, + NULL /* value_table */ + }; + + canvas_gcp_type = g_type_register_static (GNOME_TYPE_CANVAS, "GnomeCanvasGCP", + &object_info, (GTypeFlags) 0); + } + + return canvas_gcp_type; +} + +GtkWidget *gnome_canvas_gcp_new (void) +{ + return GTK_WIDGET (g_object_new (GNOME_TYPE_CANVAS_GCP, "aa", TRUE, NULL)); +} + +void gnome_canvas_gcp_class_init (GnomeCanvasGCPClass *Class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (Class); + gnome_canvas_gcp_signals[UPDATE_BOUNDS] = + g_signal_new ("update_bounds", + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GnomeCanvasGCPClass, update_bounds), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0 + ); + Class->update_bounds = gnome_canvas_gcp_update_bounds; +} + +void gnome_canvas_gcp_init (GnomeCanvasGCP *canvas) +{ +} + +void gnome_canvas_gcp_update_bounds (GnomeCanvasGCP *canvas) +{ + GnomeCanvas* w = GNOME_CANVAS (canvas); + while (w->idle_id) + gtk_main_iteration(); + gnome_canvas_update_now (w); + gcp::WidgetData* pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (canvas), "data"); + double x1, y1, x2, y2; + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (pData->Group), &x1, &y1, &x2, &y2); + if (x1 > x2) + x1 = x2 = 0.; + if (y1 > y2) + y1 = y2 = 0.; + gcp::View *pView = (gcp::View*) g_object_get_data (G_OBJECT (canvas), "view"); + pView->UpdateSize (x1, y1, x2, y2); +} + +using namespace gcu; +using namespace std; + +namespace gcp { + +bool on_event (GnomeCanvasItem *item, GdkEvent *event, GtkWidget* widget) +{ + View* pView = (View*) g_object_get_data(G_OBJECT(widget), "view"); + return pView->OnEvent(item, event, widget); +} + +static bool on_destroy (GtkWidget *widget, View * pView) +{ + pView->OnDestroy (widget); + return true; +} + +static bool on_size (GtkWidget *widget, GtkAllocation *alloc, View * pView) +{ + pView->OnSize (widget, alloc->width, alloc->height); + return true; +} + +void on_receive (GtkClipboard *clipboard, GtkSelectionData *selection_data, View * pView) +{ + pView->OnReceive (clipboard, selection_data); +} + +View::View (Document *pDoc, bool Embedded) +{ + m_pDoc = pDoc; + Theme *pTheme = pDoc->GetTheme (); + m_PangoFontDesc = pango_font_description_new (); + pango_font_description_set_family (m_PangoFontDesc, pTheme->GetFontFamily ()); + pango_font_description_set_style (m_PangoFontDesc, pTheme->GetFontStyle ()); + pango_font_description_set_weight (m_PangoFontDesc, pTheme->GetFontWeight ()); + pango_font_description_set_variant (m_PangoFontDesc, pTheme->GetFontVariant ()); + pango_font_description_set_stretch (m_PangoFontDesc, pTheme->GetFontStretch ()); + pango_font_description_set_size (m_PangoFontDesc, pTheme->GetFontSize ()); + m_sFontName = pango_font_description_to_string (m_PangoFontDesc); + m_PangoSmallFontDesc = pango_font_description_new (); + pango_font_description_set_family (m_PangoSmallFontDesc, pTheme->GetFontFamily ()); + pango_font_description_set_style (m_PangoSmallFontDesc, pTheme->GetFontStyle ()); + pango_font_description_set_weight (m_PangoSmallFontDesc, pTheme->GetFontWeight ()); + pango_font_description_set_variant (m_PangoSmallFontDesc, pTheme->GetFontVariant ()); + pango_font_description_set_stretch (m_PangoSmallFontDesc, pTheme->GetFontStretch ()); + pango_font_description_set_size (m_PangoSmallFontDesc, pTheme->GetFontSize () * 2 / 3); + m_sSmallFontName = pango_font_description_to_string (m_PangoSmallFontDesc); + m_width = 400; + m_height = 300; + m_ActiveRichText = NULL; + m_bEmbedded = Embedded; + m_UIManager = gtk_ui_manager_new (); + m_Dragging = false; + m_pWidget = NULL; + m_PangoContext = NULL; + m_CurObject = NULL; +} + +View::~View () +{ + if (m_PangoContext) + g_object_unref (G_OBJECT (m_PangoContext)); + if (m_sFontName) + g_free (m_sFontName); + if (m_sSmallFontName) + g_free (m_sSmallFontName); + pango_font_description_free (m_PangoFontDesc); + pango_font_description_free (m_PangoSmallFontDesc); + g_object_unref (m_UIManager); +} + +bool View::OnEvent (GnomeCanvasItem *item, GdkEvent *event, GtkWidget* widget) +{ + Application *App = m_pDoc->GetApplication (); + Theme *pTheme = m_pDoc->GetTheme (); + Tool* pActiveTool = App? App->GetActiveTool (): NULL; + if ((!m_pDoc->GetEditable ()) || (!pActiveTool)) + return true; + m_CurObject = (item) ? (Object*) g_object_get_data (G_OBJECT (item), "object") : NULL; + if (item == (GnomeCanvasItem*) m_ActiveRichText) { + GnomeCanvasItemClass* klass = GNOME_CANVAS_ITEM_CLASS (((GTypeInstance*) item)->g_class); + return klass->event (item, event); + } else if (pActiveTool->OnEvent (event)) + return true; + m_pData = (WidgetData*) g_object_get_data (G_OBJECT (widget), "data"); + m_pWidget = widget; + double x, y; + x = event->button.x; + y = event->button.y; + gnome_canvas_item_w2i (GNOME_CANVAS_ITEM (m_pData->Group), &x, &y); +// if (event->type == GDK_BUTTON_PRESS) { + if (item == m_pData->Background) { + item = NULL; + std::map::iterator i = m_pData->Items.begin (), + end = m_pData->Items.end (); + Bond* pBond; + while (i != end) { + if ((*i).first->GetType () == gcu::BondType) { + pBond = (Bond*) (*i).first; + if (pBond->GetDist(x / pTheme->GetZoomFactor (), y / pTheme->GetZoomFactor ()) < (pTheme->GetPadding () + pTheme->GetBondWidth () / 2) / pTheme->GetZoomFactor ()) { + item = GNOME_CANVAS_ITEM ((*i).second); + m_CurObject = pBond; + break; + } else { + // may be one of the atoms might work + gcu::Atom *pAtom = pBond->GetAtom (0); + double xa, ya; + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pTheme->GetZoomFactor (); + ya *= pTheme->GetZoomFactor (); + xa -= x; + ya -= y; + if (sqrt (xa * xa + ya * ya) < 3.5) { + //3.5 is arbitrary + m_CurObject = pAtom; + break; + } + pAtom = pBond->GetAtom (1); + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pTheme->GetZoomFactor (); + ya *= pTheme->GetZoomFactor (); + xa -= x; + ya -= y; + if (sqrt (xa * xa + ya * ya) < 3.5) { + m_CurObject = pAtom; + break; + } + } + } else if ((*i).first->GetType () == gcu::AtomType) { + double xa, ya; + gcu::Atom *pAtom = (gcu::Atom*) (*i).first; + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pTheme->GetZoomFactor (); + ya *= pTheme->GetZoomFactor (); + xa -= x; + ya -= y; + if (sqrt (xa * xa + ya * ya) < 3.5) { + //3.5 is arbitrary + m_CurObject = pAtom; + break; + } + } + i++; + } + } +// } + Object *pAtom; + if (m_CurObject && ((pAtom = m_CurObject->GetAtomAt (x / pTheme->GetZoomFactor (), y / pTheme->GetZoomFactor ())))) + m_CurObject = pAtom; + switch (event->type) { + case GDK_BUTTON_PRESS: + switch (event->button.button) { + case 1: { + if (m_Dragging) break; + bool result = pActiveTool->OnClicked(this, m_CurObject, x, y, event->button.state); + if (item && (item == (GnomeCanvasItem*)m_ActiveRichText)) { + GnomeCanvasItemClass* klass = GNOME_CANVAS_ITEM_CLASS (((GTypeInstance*) item)->g_class); + return klass->event (item, event); + } + m_Dragging = result; + return true; + } + case 2: { + m_lastx = x; + m_lasty = y; + GtkClipboard *clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY); + OnPasteSelection (m_pWidget, clipboard); + return true; + } + case 3: { + bool result; + g_object_unref (m_UIManager); + m_UIManager = gtk_ui_manager_new (); + result = pActiveTool->OnRightButtonClicked (this, m_CurObject, event->button.x, event->button.y, m_UIManager); + if (m_CurObject) + result |= m_CurObject->BuildContextualMenu (m_UIManager, m_CurObject, x / GetZoomFactor (), y / GetZoomFactor ()); + if (result) { + GtkWidget *w = gtk_ui_manager_get_widget (m_UIManager, "/popup"); + gtk_menu_popup (GTK_MENU (w), NULL, NULL, NULL, NULL, 3, gtk_get_current_event_time ()); + return true; + } + } + } + break; + case GDK_MOTION_NOTIFY: + if (!m_Dragging) + break; + pActiveTool->OnDrag (x, y, event->button.state); + return true; + case GDK_BUTTON_RELEASE: + switch (event->button.button) + { + case 1: + if (!m_Dragging) + break; + m_Dragging = false; + pActiveTool->OnRelease (x, y, event->button.state); + m_pDoc->GetApplication ()->ClearStatus (); + return true; + } + break; + default: + break; + } + return false; +} + +void View::AddObject (Object const *pObject) +{ + std::list::iterator i, end = m_Widgets.end (); + for (i = m_Widgets.begin (); i != end; i++) + pObject->Add (*i); +} + +GtkWidget* View::CreateNewWidget () +{ + gtk_widget_push_colormap (gdk_rgb_get_colormap ()); + m_pWidget = gnome_canvas_gcp_new(); + gtk_widget_pop_colormap (); + GtkWidget* pWidget = (m_Widgets.size() > 0) ? m_Widgets.front () : NULL; + if (m_pWidget) { + g_object_set_data (G_OBJECT (m_pWidget), "view", this); + g_object_set_data (G_OBJECT (m_pWidget), "doc", m_pDoc); + m_pData = new WidgetData (); + m_pData->Canvas = m_pWidget; + g_object_set_data (G_OBJECT (m_pWidget), "data", m_pData); + m_pData->m_View = this; + gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (m_pWidget), 1); + gnome_canvas_set_scroll_region (GNOME_CANVAS (m_pWidget), 0, 0, m_width, m_height); + m_pData->Zoom = 1.0; + m_pData->Background = gnome_canvas_item_new ( + gnome_canvas_root (GNOME_CANVAS (m_pWidget)), + gnome_canvas_rect_ext_get_type (), + "x1", 0.0, + "y1", 0.0, + "x2", (double) m_width, + "y2", (double) m_height, + "fill_color", "white", + NULL); + m_pData->Group = GNOME_CANVAS_GROUP (gnome_canvas_item_new ( + gnome_canvas_root (GNOME_CANVAS (m_pWidget)), + gnome_canvas_group_ext_get_type (), + NULL)); + if (m_pDoc->GetEditable ()) + g_signal_connect (G_OBJECT (m_pData->Background), "event", G_CALLBACK (on_event), m_pWidget); + g_signal_connect (G_OBJECT (m_pWidget), "destroy", G_CALLBACK (on_destroy), this); + g_signal_connect (G_OBJECT (m_pWidget), "size_allocate", G_CALLBACK (on_size), this); + g_signal_connect (G_OBJECT (m_pWidget), "realize", G_CALLBACK (gnome_canvas_gcp_update_bounds), this); + gtk_widget_show (m_pWidget); + m_Widgets.push_back (m_pWidget); + if (pWidget) { + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (pWidget), "data"); + std::map::iterator i, iend = pData->Items.end (); + for (i = pData->Items.begin (); i != iend; i++) + if ((*i).first->GetType () != gcu::BondType) + (*i).first->Add (m_pWidget); + for (i = pData->Items.begin (); i != iend; i++) + if ((*i).first->GetType () == gcu::BondType) + (*i).first->Add (m_pWidget); + } else { + m_PangoContext = gtk_widget_create_pango_context (m_pWidget); + g_object_ref (G_OBJECT (m_PangoContext)); + UpdateFont (); + } + } + return m_pWidget; +} + +void View::OnDestroy (GtkWidget* widget) +{ + if (m_bEmbedded) { + delete (WidgetData*) g_object_get_data (G_OBJECT (widget), "data"); + m_Widgets.remove (widget); + } else + delete m_pDoc; +} + +GnomeCanvasItem* View::GetCanvasItem (GtkWidget* widget, Object* Object) +{ + WidgetData* pData = reinterpret_cast (g_object_get_data (G_OBJECT (widget), "data")); + if ((!pData) || (pData->m_View != this)) + return NULL; + GnomeCanvasItem *result = reinterpret_cast (pData->Items[Object]); + if (!result) + pData->Items.erase (Object); + return result; +} + +void View::Update (Object const *pObject) +{ + std::list::iterator i; + for (i = m_Widgets.begin (); i != m_Widgets.end (); i++) + pObject->Update(*i); +} + +GnomeCanvasItem* View::GetBackground () +{ + return m_pData->Background; +} + +double View::GetZoomFactor () +{ + return m_pDoc->GetTheme ()->GetZoomFactor (); +} + +void View::UpdateFont () +{ + pango_context_set_font_description (m_PangoContext, m_PangoFontDesc); + PangoLayout* pl = pango_layout_new (m_PangoContext); + PangoRectangle rect; + pango_layout_set_text (pl, "lj", 2); + pango_layout_get_extents (pl, &rect, NULL); + m_dFontHeight = rect.height / PANGO_SCALE; + g_object_unref (G_OBJECT (pl)); + pl = pango_layout_new (m_PangoContext); + pango_layout_set_text (pl, "C", 1); + pango_layout_get_extents (pl, &rect, NULL); + m_BaseLineOffset = (double (rect.height / PANGO_SCALE) / 2.0) / m_pDoc->GetTheme ()->GetZoomFactor (); + g_object_unref (G_OBJECT (pl)); +} + +void View::Remove (Object* pObject) +{ + std::list::iterator i, end = m_Widgets.end (); + for (i = m_Widgets.begin (); i != end; i++) { + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (*i), "data"); + Object* pObj = pObject->GetMolecule (); + if (pObj) + pData->SelectedObjects.remove (pObj); + else + pData->SelectedObjects.remove (pObject); + if (pData->Items[pObject]) + gtk_object_destroy (GTK_OBJECT (pData->Items[pObject])); + pData->Items.erase (pObject); + } +} + +void View::OnDeleteSelection (GtkWidget* w) +{ + m_pWidget = w; + Application *pApp = m_pDoc->GetApplication (); + Tool *pActiveTool = pApp->GetActiveTool (); + Object *parent; + if (!pActiveTool->DeleteSelection ()) { + m_pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + WidgetData *pData; + std::list::iterator j, jend = m_Widgets.end (); + for (j = m_Widgets.begin (); j != jend; j++) { + if (*j == m_pWidget) + continue; + pData = (WidgetData*) g_object_get_data (G_OBJECT (*j), "data"); + pData->UnselectAll (); + } + Object *pObject, *Group; + set ModifiedObjects; + bool modify = false; + list::iterator i, iend = m_pData->SelectedObjects.end (); + // first search if we are deleting top objects or not + for (i = m_pData->SelectedObjects.begin (); i != iend; i++) + if ((*i)->GetGroup ()) { + modify = true; + break; + } + Operation *Op = m_pDoc->GetNewOperation (((modify)? + GCP_MODIFY_OPERATION: GCP_DELETE_OPERATION)); + while (!m_pData->SelectedObjects.empty ()) { + pObject = m_pData->SelectedObjects.front (); + Group = pObject->GetGroup (); + if (Group && + (ModifiedObjects.find (Group->GetId ()) == ModifiedObjects.end ())) { + Op->AddObject (Group); + ModifiedObjects.insert (Group->GetId ()); + } else + Op->AddObject (pObject); + pObject->Lock (); + parent = pObject->GetParent (); + m_pDoc->Remove (pObject); + if (parent) + parent->EmitSignal (OnChangedSignal); + } + m_pData->ClearSelection (); + set::iterator k, kend = ModifiedObjects.end(); + for (k = ModifiedObjects.begin(); k != kend; k++) { + pObject = m_pDoc->GetDescendant ((*k).c_str ()); + if (pObject) + Op->AddObject (pObject, 1); + } + } + m_pDoc->FinishOperation (); + Window *Win = m_pDoc->GetWindow (); + if (Win) { + Win->ActivateActionWidget ("/MainMenu/EditMenu/Copy", false); + Win->ActivateActionWidget ("/MainMenu/EditMenu/Cut", false); + Win->ActivateActionWidget ("/MainMenu/EditMenu/Erase", false); + } +} + +GtkTargetEntry const targets[] = { + {(char *) GCHEMPAINT_ATOM_NAME, 0, GCP_CLIPBOARD_NATIVE}, + {(char *) "image/svg", 0, GCP_CLIPBOARD_SVG}, + {(char *) "image/svg+xml", 0, GCP_CLIPBOARD_SVG_XML}, + {(char *) "image/x-eps", 0, GCP_CLIPBOARD_EPS}, + {(char *) "image/png", 0, GCP_CLIPBOARD_PNG}, + {(char *) "image/jpeg", 0, GCP_CLIPBOARD_JPEG}, + {(char *) "image/bmp", 0, GCP_CLIPBOARD_BMP}, + {(char *) "UTF8_STRING", 0, GCP_CLIPBOARD_UTF8_STRING}, + {(char *) "STRING", 0, GCP_CLIPBOARD_STRING} +}; + +void View::OnCopySelection (GtkWidget* w, GtkClipboard* clipboard) +{ + if (m_pDoc->GetAllowClipboard ()) { + Application * pApp = m_pDoc->GetApplication (); + Tool* pActiveTool = pApp->GetActiveTool (); + m_pWidget = w; + m_pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (!pActiveTool->CopySelection (clipboard)) + m_pData->Copy (clipboard); + } +} + +void View::OnReceive (GtkClipboard* clipboard, GtkSelectionData* selection_data) +{ + if ((selection_data->length <= 0) || !selection_data->data) + return; + Application *pApp = m_pDoc->GetApplication (); + Tool *pActiveTool = pApp->GetActiveTool (); + guint *DataType = (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))? &ClipboardDataType: &ClipboardDataType1; + g_return_if_fail ((selection_data->target == gdk_atom_intern (targets[*DataType].target, FALSE))); + if (pActiveTool->OnReceive (clipboard, selection_data, *DataType)) + return; + else if (pActiveTool) { + pApp->ActivateTool ("Select", true); + pActiveTool = pApp->GetActiveTool (); + } + if (!pActiveTool || (pActiveTool != pApp->GetTool ("Select"))) + return; + xmlDocPtr xml; + m_pData->UnselectAll (); + switch (*DataType) { + case GCP_CLIPBOARD_NATIVE: + xml = xmlParseMemory ((const char*) selection_data->data, selection_data->length); + m_pDoc->AddData (xml->children->children); + xmlFreeDoc (xml); + break; + case GCP_CLIPBOARD_UTF8_STRING: { + Text* text = new Text (); + text->SetText ((char const*) selection_data->data); + text->OnChanged (true); + m_pDoc->AddObject (text); + m_pData->SetSelected (text); + } + break; + case GCP_CLIPBOARD_STRING: { + Text* text = new Text (); + if (!g_utf8_validate ((const char*) selection_data->data, selection_data->length, NULL)) { + gsize r, w; + gchar* newstr = g_locale_to_utf8 ((const char*) selection_data->data, selection_data->length, &r, &w, NULL); + text->SetText (newstr); + g_free (newstr); + } else + text->SetText ((char const*) selection_data->data); + text->OnChanged (true); + m_pDoc->AddObject (text); + m_pData->SetSelected (text); + } + break; + } + ArtDRect rect; + double dx, dy; + while (gtk_events_pending ()) + gtk_main_iteration (); + m_pDoc->AbortOperation (); + m_pData->GetSelectionBounds (rect); + if (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)) { + //center the pasted data at the center of the visible area + if (m_bEmbedded) { + dx = m_pWidget->allocation.width / 2. - (rect.x0 + rect.x1) / 2.; + dy = m_pWidget->allocation.height / 2. - (rect.y0 + rect.y1) / 2.; + } else { + GtkAdjustment *horiz, *vert; + GtkWidget* parent = gtk_widget_get_parent (m_pWidget); + horiz = gtk_viewport_get_hadjustment (GTK_VIEWPORT (parent)); + vert = gtk_viewport_get_vadjustment (GTK_VIEWPORT (parent)); + dx = horiz->value + horiz->page_size / 2. - (rect.x0 + rect.x1) / 2.; + dy = vert->value + vert->page_size / 2. - (rect.y0 + rect.y1) / 2.; + } + } else { + //center the pasted data at the mouse click position + dx = m_lastx - (rect.x0 + rect.x1) / 2.; + dy = m_lasty - (rect.y0 + rect.y1) / 2.; + } + m_pData->MoveSelection (dx, dy); + Tool *pTool = pApp->GetTool ("Select"); + if (pTool) + pTool->AddSelection (m_pData); + m_pDoc->PopOperation (); + Operation* pOp = m_pDoc->GetNewOperation (GCP_ADD_OPERATION); + std::list::iterator i, end = m_pData->SelectedObjects.end(); + for (i = m_pData->SelectedObjects.begin(); i != end; i++) + pOp->AddObject (*i); + m_pDoc->FinishOperation (); + gnome_canvas_gcp_update_bounds (GNOME_CANVAS_GCP(m_pData->Canvas)); +} + +void View::OnPasteSelection (GtkWidget* w, GtkClipboard* clipboard) +{ + Application *pApp = m_pDoc->GetApplication (); + Tool *pActiveTool = pApp->GetActiveTool (); + if (pActiveTool->PasteSelection (clipboard)) + return; + m_pWidget = w; + m_pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + guint *DataType = (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))? &ClipboardDataType: &ClipboardDataType1; + GdkAtom targets_atom = gdk_atom_intern (targets[*DataType].target, FALSE); + gtk_clipboard_request_contents (clipboard, targets_atom, (GtkClipboardReceivedFunc) on_receive, this); +} + +void View::OnCutSelection (GtkWidget* w, GtkClipboard* clipboard) +{ + Application *pApp = m_pDoc->GetApplication (); + Tool *pActiveTool = pApp->GetActiveTool (); + if (!pActiveTool->CutSelection(clipboard)) { + OnCopySelection (w, clipboard); + OnDeleteSelection (w); + } + Window *Win = m_pDoc->GetWindow (); + if (Win) { + Win->ActivateActionWidget ("/MainMenu/EditMenu/Copy", false); + Win->ActivateActionWidget ("/MainMenu/EditMenu/Cut", false); + Win->ActivateActionWidget ("/MainMenu/EditMenu/Erase", false); + } +} + +static void do_set_symbol (GtkAction *action, Object *obj) +{ + Document* pDoc = static_cast (obj->GetDocument ()); + Application *App = static_cast (pDoc->GetApplication ()); + Tools *tools = static_cast (App->GetDialog ("tools")); + int Z = Element::Z (gtk_action_get_name(action)); + tools->SetElement (Z); + if (obj->GetType () == AtomType) { + Atom *atom = static_cast (obj); + if (atom->GetZ () == Z || atom->GetZ () == 0) + return; + Object *group = obj->GetGroup (); + Operation *op = pDoc->GetNewOperation (GCP_MODIFY_OPERATION); + op->AddObject (group); + atom->SetZ (Z); + // set all bonds as dirty + map::iterator i; + Bond *bond = reinterpret_cast (atom->GetFirstBond (i)); + while (bond) { + bond->SetDirty (); + bond = reinterpret_cast (atom->GetNextBond (i)); + } + pDoc->GetView ()->Update (obj); + op->AddObject (group, 1); + pDoc->FinishOperation (); + } +} + +bool View::OnKeyPress (GtkWidget* w, GdkEventKey* event) +{ + Application *pApp = m_pDoc->GetApplication (); + Tool *pActiveTool = pApp->GetActiveTool (); + if (pActiveTool->OnEvent ((GdkEvent*) event)) + return true; + switch (event->keyval) { + case GDK_Delete: + case GDK_Clear: + case GDK_BackSpace: + OnDeleteSelection(w); + return true; + case GDK_Shift_L: + case GDK_Shift_R: + if (pActiveTool) + pActiveTool->OnKeyPressed (GDK_SHIFT_MASK); + return true; + case GDK_Control_L: + case GDK_Control_R: + if (pActiveTool) + pActiveTool->OnKeyPressed (GDK_CONTROL_MASK); + return true; + case GDK_Alt_L: + case GDK_Alt_R: + if (pActiveTool) + pActiveTool->OnKeyPressed (GDK_MOD1_MASK);//FIXME: might be not portable + return true; + case GDK_ISO_Level3_Shift: + if (pActiveTool) + pActiveTool->OnKeyPressed (GDK_MOD5_MASK);//FIXME: might be not portable + return true; + case GDK_Caps_Lock: + if (pActiveTool) { + if (event->state & GDK_LOCK_MASK) + pActiveTool->OnKeyReleased (GDK_LOCK_MASK); + else + pActiveTool->OnKeyPressed (GDK_LOCK_MASK); + } + return true; + default: { + if ((event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) != 0 || event->keyval > 127) + break; + // Now try to get the atom at the cursor + Atom *atom = dynamic_cast (m_CurObject); + unsigned min_bonds = (atom)? atom->GetTotalBondsNumber (): 0; + int Z = 0; + switch (event->keyval) { + case GDK_a: + Z = 13; + break; + case GDK_b: + Z = 5; + break; + case GDK_c: + Z = 6; + break; + case GDK_d: + Z = 11; + break; + case GDK_e: + Z = 34; + break; + case GDK_f: + Z = 9; + break; + case GDK_g: + Z = 32; + break; + case GDK_h: + Z = 1; + break; + case GDK_i: + Z = 53; + break; + case GDK_j: + Z = 22; + break; + case GDK_k: + Z = 19; + break; + case GDK_l: + Z = 3; + break; + case GDK_m: + Z = 12; + break; + case GDK_n: + Z = 7; + break; + case GDK_o: + Z = 8; + break; + case GDK_p: + Z = 15; + break; + case GDK_q: + Z = 14; + break; + case GDK_r: + Z = 35; + break; + case GDK_s: + Z = 16; + break; + case GDK_t: + Z = 78; + break; + case GDK_u: + Z = 29; + break; + case GDK_v: + Z = 23; + break; + case GDK_w: + Z = 74; + break; + case GDK_x: + Z = 17; + break; + case GDK_y: + Z = 39; + break; + case GDK_z: + Z = 40; + break; + } + if (Z) { + if (!atom) { + Tools *tools = static_cast (pApp->GetDialog ("tools")); + tools->SetElement (Z); + } else if (atom->GetZ () != Z && Element::GetElement (Z)->GetMaxBonds () >= min_bonds) { + Object *group = atom->GetGroup (); + Operation *op = m_pDoc->GetNewOperation (GCP_MODIFY_OPERATION); + op->AddObject (group); + atom->SetZ (Z); + Update (atom); + // set all bonds as dirty + map::iterator i; + Bond *bond = reinterpret_cast (atom->GetFirstBond (i)); + while (bond) { + bond->SetDirty (); + bond = reinterpret_cast (atom->GetNextBond (i)); + } + op->AddObject (group, 1); + m_pDoc->FinishOperation (); + } + return true; + } + // build a contextual menu of all known symbols starting with the pressed key. + map entries; + string symbol; + unsigned key = gdk_keyval_to_upper (event->keyval); + for (int i = 1; i <= 128; i++) { + Element *elt = Element::GetElement (i); + if (!elt || elt->GetMaxBonds () < min_bonds) + continue; + symbol = elt->GetSymbol (); + if ((unsigned char) symbol[0] == key) { + entries[symbol] = elt; + } + } + if (entries.empty ()) + break; + map::iterator i, end = entries.end (); + g_object_unref (m_UIManager); + m_UIManager = gtk_ui_manager_new (); + GtkActionGroup *group = gtk_action_group_new ("element");; + GtkAction *action; + string ui; + for (i = entries.begin (); i != end; i++) { + symbol = (*i).first; + symbol.insert (((symbol.length () > 1)? 1: 0), "_"); + action = GTK_ACTION (gtk_action_new ((*i).second->GetSymbol (), symbol.c_str (), (*i).second->GetName (), NULL)); + g_signal_connect (action, "activate", G_CALLBACK (do_set_symbol), (atom)? static_cast (atom): static_cast (m_pDoc)); + gtk_action_group_add_action (group, action); + g_object_unref (action); + ui = string (""; + gtk_ui_manager_add_ui_from_string (m_UIManager, ui.c_str (), -1, NULL); + } + gtk_ui_manager_insert_action_group (m_UIManager, group, 0); + g_object_unref (group); + GtkWidget *w = gtk_ui_manager_get_widget (m_UIManager, "/popup"); + gtk_menu_popup (GTK_MENU (w), NULL, NULL, NULL, NULL, 3, gtk_get_current_event_time ()); + break; + } + } + return false; +} + +bool View::OnKeyRelease (GtkWidget* w, GdkEventKey* event) +{ + Application *pApp = m_pDoc->GetApplication (); + Tool *pActiveTool = pApp->GetActiveTool (); + switch(event->keyval) { + case GDK_Shift_L: + case GDK_Shift_R: + if (pActiveTool) + pActiveTool->OnKeyReleased (GDK_SHIFT_MASK); + return true; + case GDK_Control_L: + case GDK_Control_R: + if (pActiveTool) + pActiveTool->OnKeyReleased (GDK_CONTROL_MASK); + return true; + case GDK_Alt_L: + case GDK_Alt_R: + if (pActiveTool) + pActiveTool->OnKeyReleased (GDK_MOD1_MASK);//FIXME: might be not portable + return true; + case 0: + // Seems that when releasing the AltGr key, the keyval is 0 !!! + if (!(event->state & GDK_MOD5_MASK)) + break; + case GDK_ISO_Level3_Shift: + if (pActiveTool) + pActiveTool->OnKeyReleased (GDK_MOD5_MASK);//FIXME: might be not portable + return true; + default: + break; + } + return false; +} + +bool View::OnSize (GtkWidget *w, int width, int height) +{ + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + gnome_canvas_set_scroll_region (GNOME_CANVAS (w), 0, 0, (double) width / pData->Zoom, (double) height / pData->Zoom); + if (pData->Background) + g_object_set (G_OBJECT (pData->Background), "x2", (double) width / pData->Zoom, "y2", (double) height / pData->Zoom, NULL); + return true; +} + +void View::UpdateSize (double x1, double y1, double x2, double y2) +{ + if (x1 < 0.0) x2 -= x1; + if (y1 < 0.0) y2 -= y1; + list::iterator i, end = m_Widgets.end (); + if ((x2 != m_width) || (y2 != m_height)) + for (i = m_Widgets.begin(); i != end; i++) { + WidgetData* pData = (WidgetData*) g_object_get_data (G_OBJECT (*i), "data"); + gtk_widget_set_size_request (*i, (int) ceil (x2 * pData->Zoom), (int) ceil (y2 * pData->Zoom)); + } + if ((x1 < 0.0) || (y1 < 0.0)) + { + x1 = - x1; + y1 = - y1; + Theme* pTheme = m_pDoc->GetTheme (); + m_pDoc->Move(x1 / pTheme->GetZoomFactor (), y1 / pTheme->GetZoomFactor ()); + Update (m_pDoc); + } +} + +void View::SetGnomeCanvasPangoActive (GnomeCanvasPango* item) +{ + m_ActiveRichText = item; + m_Dragging = false; +} + +bool View::PrepareUnselect () +{ + Application *pApp = m_pDoc->GetApplication (); + Tool *pActiveTool = pApp->GetActiveTool (); + return (pActiveTool)? pActiveTool->NotifyViewChange (): true; +} + +void View::OnSelectAll () +{ + Application *pApp = m_pDoc->GetApplication(); + Tool *pActiveTool = pApp->GetTool ("Select"); + if (pActiveTool) + pApp->ActivateTool ("Select", true); + m_pData->SelectAll (); + if (pActiveTool) + pActiveTool->AddSelection (m_pData); +} + +static gboolean do_save_image (const gchar *buf, gsize count, GError **error, gpointer data) +{ + GOutputStream *output = (GOutputStream *) data; + while (count) { + count -= g_output_stream_write (output, buf, count, NULL, error); + if (*error) + return false; + } + return true; +} + +static cairo_status_t cairo_write_func (void *closure, const unsigned char *data, unsigned int length) +{ + gboolean result; + GsfOutput *output = GSF_OUTPUT (closure); + + result = gsf_output_write (output, length, data); + + return result ? CAIRO_STATUS_SUCCESS : CAIRO_STATUS_WRITE_ERROR; +} + +void View::ExportImage (string const &filename, const char* type, int resolution) +{ + ArtDRect rect; + m_pData->GetObjectBounds (m_pDoc, &rect); + m_pData->ShowSelection (false); + int w = (int) (ceil (rect.x1) - floor (rect.x0)), h = (int) (ceil (rect.y1) - floor (rect.y0)); + if (!strcmp (type, "eps") || !strcmp (type, "ps") || !strcmp (type, "pdf")) { + GError *error = NULL; + GsfOutput *output = gsf_output_gio_new_for_uri (filename.c_str (), &error); + if (error) { + gchar * mess = g_strdup_printf (_("Could not create stream!\n%s"), error->message); + GtkWidget* message = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (m_pWidget)), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, mess); + g_free (mess); + gtk_dialog_run (GTK_DIALOG (message)); + gtk_widget_destroy (message); + g_error_free (error); + } + ArtDRect rect; + m_pData->GetObjectBounds (m_pDoc, &rect); + cairo_surface_t *surface = NULL; + if (!strcmp (type, "pdf")) + surface = cairo_pdf_surface_create_for_stream (cairo_write_func, output, w * .75, h * .75); + else { + surface = cairo_ps_surface_create_for_stream (cairo_write_func, output, w * .75, h * .75); + if (!strcmp (type, "eps")) + cairo_ps_surface_set_eps (surface, TRUE); + } + cairo_t *cr = cairo_create (surface); + cairo_scale (cr, .75, .75); + cairo_translate (cr, -rect.x0, -rect.y0); + cairo_surface_destroy (surface); + Render (cr); + cairo_destroy (cr); + } else if (!strcmp (type, "svg")) { + xmlDocPtr doc = BuildSVG (); + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + xmlSaveFormatFile (filename.c_str (), doc, true); + xmlFreeDoc (doc); + } else { + GdkPixbuf *pixbuf = BuildPixbuf (resolution); + GFile *file = g_vfs_get_file_for_uri (g_vfs_get_default (), filename.c_str ()); + GError *error = NULL; + GFileOutputStream *output = g_file_create (file, G_FILE_CREATE_NONE, NULL, &error); + if (!error) + gdk_pixbuf_save_to_callbackv (pixbuf, do_save_image, output, type, NULL, NULL, &error); + if (error) { + fprintf (stderr, _("Unable to save image file: %s\n"), error->message); + g_error_free (error); + } + g_object_unref (file); + g_object_unref (pixbuf); + } + m_pData->ShowSelection (true); +} + +xmlDocPtr View::BuildSVG () +{ + ArtDRect rect; + m_pData->GetObjectBounds (m_pDoc, &rect); + xmlDocPtr doc = xmlNewDoc ((const xmlChar*)"1.0"); + char *old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + char *buf; + setlocale (LC_NUMERIC, "C"); + xmlNewDtd (doc, + (const xmlChar*)"svg", (const xmlChar*)"-//W3C//DTD SVG 1.1//EN", + (const xmlChar*)"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"); + xmlDocSetRootElement (doc, xmlNewDocNode (doc, NULL, (const xmlChar*)"svg", NULL)); + xmlNsPtr ns = xmlNewNs (doc->children, (const xmlChar*)"http://www.w3.org/2000/svg", NULL); + xmlSetNs (doc->children, ns); + xmlNewProp (doc->children, (const xmlChar*)"version", (const xmlChar*)"1.1"); + rect.x0 = floor (rect.x0); + rect.y0 = floor (rect.y0); + rect.x1 = ceil (rect.x1); + rect.y1 = ceil (rect.y1); + buf = g_strdup_printf ("%g", rect.x1 - rect.x0); + xmlNewProp (doc->children, (const xmlChar*)"width", (const xmlChar*)buf); + g_free (buf); + buf = g_strdup_printf ("%g", rect.y1 - rect.y0); + xmlNewProp (doc->children, (const xmlChar*)"height", (const xmlChar*)buf); + g_free (buf); + xmlNodePtr node; + node = xmlNewDocNode (doc, NULL, (const xmlChar*)"rect", NULL); + xmlAddChild (doc->children, node); + buf = g_strdup_printf ("%g", rect.x1 - rect.x0); + xmlNewProp (node, (const xmlChar*)"width", (const xmlChar*)buf); + g_free (buf); + buf = g_strdup_printf ("%g", rect.y1 - rect.y0); + xmlNewProp (node, (const xmlChar*)"height", (const xmlChar*)buf); + g_free (buf); + xmlNewProp (node, (const xmlChar*)"stroke", (const xmlChar*)"none"); + xmlNewProp (node, (const xmlChar*)"fill", (const xmlChar*)"white"); + if (rect.x0 != 0. || rect.y0 != 0) { + node = xmlNewDocNode (doc, NULL, (const xmlChar*)"g", NULL); + xmlAddChild (doc->children, node); + buf = g_strdup_printf ("translate(%g,%g)", - rect.x0, - rect.y0); + xmlNewProp (node, (const xmlChar*)"transform", (const xmlChar*)buf); + g_free (buf); + } else + node = doc->children; + g_printable_export_svg (G_PRINTABLE (m_pData->Group), doc, node); + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + return doc; +} + +GdkPixbuf *View::BuildPixbuf (int resolution) +{ + ArtDRect rect; + m_pData->GetObjectBounds (m_pDoc, &rect); + m_pData->ShowSelection (false); + int w = (int) (ceil (rect.x1) - floor (rect.x0)), h = (int) (ceil (rect.y1) - floor (rect.y0)); + double zoom; + if (resolution > 0) { + int screenres = m_pDoc->GetApp ()->GetScreenResolution (); + zoom = (double) resolution / screenres; + w = (int) rint ((double) w * zoom); + h = (int) rint ((double) h * zoom); + } else + zoom = 1.; + gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (m_pWidget), zoom); + gnome_canvas_update_now (GNOME_CANVAS (m_pWidget)); + GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, w, h); + gdk_pixbuf_fill (pixbuf, 0xffffffff); + GnomeCanvasBuf buf; + buf.buf = gdk_pixbuf_get_pixels (pixbuf); + buf.rect.x0 = (int) floor (rect.x0 * zoom); + buf.rect.x1 = (int) ceil (rect.x1 * zoom); + buf.rect.y0 = (int) floor (rect.y0 * zoom); + buf.rect.y1 = (int) ceil (rect.y1 * zoom); + buf.buf_rowstride = gdk_pixbuf_get_rowstride (pixbuf); + buf.bg_color = 0xffffff; + buf.is_buf = 1; + (* GNOME_CANVAS_ITEM_GET_CLASS (m_pData->Group)->render) (GNOME_CANVAS_ITEM (m_pData->Group), &buf); + // restore zoom level + gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (m_pWidget), m_pData->Zoom); + return pixbuf; +} + +void View::EnsureSize () +{ + GnomeCanvas *canvas = GNOME_CANVAS (m_pWidget); + gnome_canvas_update_now (canvas); + if (GTK_WIDGET_REALIZED (m_pWidget)) + g_signal_emit_by_name (m_pWidget, "update_bounds"); +} + +void View::Zoom (double zoom) +{ + m_pData->Zoom = zoom; + gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (m_pWidget), zoom); + EnsureSize (); + // Call OnSize to be certain that the canvas scroll region will be correct + OnSize (m_pWidget, m_width, m_height); +} + +void View::ShowCursor (bool show) +{ + if (m_ActiveRichText) + g_object_set (G_OBJECT (m_ActiveRichText), "editing", show, NULL); +} + +void View::UpdateTheme () +{ + if (m_sFontName) + g_free (m_sFontName); + if (m_sSmallFontName) + g_free (m_sSmallFontName); + pango_font_description_free (m_PangoFontDesc); + pango_font_description_free (m_PangoSmallFontDesc); + Theme *pTheme = m_pDoc->GetTheme (); + m_PangoFontDesc = pango_font_description_new (); + pango_font_description_set_family (m_PangoFontDesc, pTheme->GetFontFamily ()); + pango_font_description_set_style (m_PangoFontDesc, pTheme->GetFontStyle ()); + pango_font_description_set_weight (m_PangoFontDesc, pTheme->GetFontWeight ()); + pango_font_description_set_variant (m_PangoFontDesc, pTheme->GetFontVariant ()); + pango_font_description_set_stretch (m_PangoFontDesc, pTheme->GetFontStretch ()); + pango_font_description_set_size (m_PangoFontDesc, pTheme->GetFontSize ()); + m_sFontName = pango_font_description_to_string (m_PangoFontDesc); + m_PangoSmallFontDesc = pango_font_description_new (); + pango_font_description_set_family (m_PangoSmallFontDesc, pTheme->GetFontFamily ()); + pango_font_description_set_style (m_PangoSmallFontDesc, pTheme->GetFontStyle ()); + pango_font_description_set_weight (m_PangoSmallFontDesc, pTheme->GetFontWeight ()); + pango_font_description_set_variant (m_PangoSmallFontDesc, pTheme->GetFontVariant ()); + pango_font_description_set_stretch (m_PangoSmallFontDesc, pTheme->GetFontStretch ()); + pango_font_description_set_size (m_PangoSmallFontDesc, pTheme->GetFontSize () * 2 / 3); + m_sSmallFontName = pango_font_description_to_string (m_PangoSmallFontDesc); + Update (m_pDoc); +} + +void View::Render (cairo_t *cr) +{ + m_pData->ShowSelection(false); + Object* pObj = NULL; + if (m_ActiveRichText) { + pObj = (Object*) g_object_get_data (G_OBJECT (m_ActiveRichText), "object"); + if (pObj) pObj->SetSelected (m_pWidget, SelStateUnselected); + } + GnomeCanvas *canvas = GNOME_CANVAS (m_pWidget); + gnome_canvas_update_now (canvas); + g_printable_draw_cairo (G_PRINTABLE (m_pData->Group), cr); + m_pData->ShowSelection (true); + if (pObj) + pObj->SetSelected (m_pWidget, SelStateUpdating); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/view.h gnome-chemistry-utils-0.10.9/libs/gcp/view.h --- gnome-chemistry-utils-0.8.6/libs/gcp/view.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/view.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,350 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * view.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_VIEW_H +#define GCHEMPAINT_VIEW_H + +#include +#include +#include +#include +#include +#include "atom.h" +#include "bond.h" + +namespace gcp { + +class Document; +class WidgetData; + +#define GCHEMPAINT_ATOM_NAME "application/x-gchempaint" +extern GtkTargetEntry const targets[]; + +/*!\class View gcp/view.h +The GChempaint document view. +*/ +class View +{ +public: + //Constructor and destructor +/*! +@param pDoc the GchemPaint document for the new view. +@param Embedded whether the document is embedded in another application +or is standalone. + +Constructs the document view. +*/ + View (Document *pDoc, bool Embedded); +/*! +The destructor. +*/ + virtual ~View (); + + //Interface +public: +/*! +@return the canvas widget used for the view. +*/ + GtkWidget* GetWidget () {return m_pWidget;} +/*! +@return the document associated with the view. +*/ + Document* GetDoc () {return m_pDoc;} +/*! +@param item the canvas item at the positionof the event. +@param event the GdkEvent. +@param widget the canvas widget. + +Called by the framework when an event occured in the canvas. +@return false if the event should be processed further, true otherwise. +*/ + bool OnEvent (GnomeCanvasItem *item, GdkEvent *event, GtkWidget* widget); +/*! +@param pObject the object to add. + +Adds the object to the canvas. +*/ + void AddObject (gcu::Object const *pObject); +/*! +@param pObject the object to update. + +Updates the object in the canvas. +*/ + void Update (gcu::Object const *pObject); +/*! +Creates a new canvas widget for the view. + +@return the new widget. +*/ + GtkWidget* CreateNewWidget (); +/*! +@param widget the destroyed widget. + +Called by the framework when a widget is destroyed. +*/ + void OnDestroy (GtkWidget* widget); +/*! +@param widget the canvas in which an item is searched. +@param object the object represented by the item. + +Searches the item representing \a object in the canvas widget. +@return the found item if any, or NULL. +*/ + GnomeCanvasItem* GetCanvasItem (GtkWidget* widget, gcu::Object* object); +/*! +@return the canvas background. +*/ + GnomeCanvasItem* GetBackground (); +/*! +@return the current zoom factor. +*/ + double GetZoomFactor (); +/*! +Updates fonts descriptions after a theme change. +*/ + void UpdateFont (); +/*! +@param pObject the object to remove. + +Removes the object from the view and destroys the items representing it. +*/ + void Remove (gcu::Object* pObject); +/*! +@return the pango context associated to the view. +*/ + PangoContext* GetPangoContext () {return m_PangoContext;} +/*! +@return the height of the font used to display atomic symbols. +*/ + double GetFontHeight () {return m_dFontHeight;} +/*! +@return the name of the font used to display atomic symbols. +*/ + gchar* GetFontName () {return m_sFontName;} +/*! +@return the name of the font used to display stoichiometry indices and charges. +*/ + gchar* GetSmallFontName () {return m_sSmallFontName;} +/*! +@return the description of the font used to display atomic symbols. +*/ + PangoFontDescription* GetPangoFontDesc () {return m_PangoFontDesc;} +/*! +@return the description of the font used to display stoichiometry indices and charges. +*/ + PangoFontDescription* GetPangoSmallFontDesc () {return m_PangoSmallFontDesc;} +/*! +@param w the active document widget. + +Removes all objects in the widget. +*/ + void OnDeleteSelection (GtkWidget* w); +/*! +@param w the active document widget. +@param clipboard a GtkClipboard. + +Called by the framework to copy the selection. +*/ + void OnCopySelection (GtkWidget* w, GtkClipboard* clipboard); +/*! +@param w the active document widget. +@param clipboard a GtkClipboard. + +Called by the framework to paste clipboard contents. +*/ + void OnPasteSelection (GtkWidget* w, GtkClipboard* clipboard); +/*! +@param w the active document widget. +@param clipboard a GtkClipboard. + +Called by the framework to copy and delete the selection. +*/ + void OnCutSelection (GtkWidget* w, GtkClipboard* clipboard); +/*! +@param w the widget which received the event. +@param event the current event. + +Called by the framework when a key has been pressed on the keyboard. +@return true if the key was significant, false otherwise. +*/ + bool OnKeyPress (GtkWidget* w, GdkEventKey* event); +/*! +@param w the widget which received the event. +@param event the current event. + +Called by the framework when a key has been released on the keyboard. +@return true if the key was significant, false otherwise. +*/ + bool OnKeyRelease (GtkWidget* w, GdkEventKey* event); +/*! +@param w the widget which received the event. +@param width the ne widget width. +@param height the new widget height. + +Called by the framework when the widget size changed. +@return true (always). +*/ + bool OnSize (GtkWidget *w, int width, int height); +/*! +@param x1 the left coordinate of the bounding rectangle of the used canvas area. +@param y1 the top coordinate of the bounding rectangle of the used canvas area. +@param x2 the right coordinate of the bounding rectangle of the used canvas area. +@param y2 the bottom coordinate of the bounding rectangle of the used canvas area. + +Ensures the canvas is large enough to display everything and, if x1 or y1 is +negative moves all the items so that they are visible. +*/ + void UpdateSize (double x1, double y1, double x2, double y2); +/*! +@param item a text item or NULL. + +Sets the currently edited text item. \a item should be NULL to tell the view +that no text edition is currently taking place. +*/ + void SetGnomeCanvasPangoActive (GnomeCanvasPango* item); +/*! +Called by the framework when the active window changes to stop current edition +and inhibit timer events. + +@return true if the change is possible, false to abort it. +*/ + bool PrepareUnselect (); +/*! +@param clipboard the clipboard used. +@param selection_data the data to paste. + +Called by the framework to effectively paste data in the document. +*/ + void OnReceive (GtkClipboard* clipboard, GtkSelectionData* selection_data); +/*! +Called by the framework to select everything in the document. +*/ + void OnSelectAll (); +/*! +@return true if the view is embedded in another document view. +*/ + bool IsEmbedded () {return m_bEmbedded;} +/*! +@return the number of existing canvases for this view. +*/ + int GetNbWidgets () {return m_Widgets.size ();} +/*! +@param filename the file name to use for the export. +@param type a string representing the image type as used by the GdkPixbuf +library. Other types supported are "svg", "ps", "pdf", and "eps". +@param resolution the image resolution to use for bitmaps. + +Exports the current document to an image. The \a resolution parameter is +significative only for bitmap images; if it is not given, of if negative, 1 +will be used which will result as a one to one pixel export. +*/ + void ExportImage (std::string const &filename, const char* type, int resolution = -1); +/*! +@return the xml document containig the svg output. +*/ + xmlDocPtr BuildSVG (); +/*! +@param resolution the resolution for the new image. + +Builds a new image with the given resolution in ppi. The size is evaluated +using the guessed screen resolution. +@return the new pixbuf. +*/ + GdkPixbuf *BuildPixbuf (int resolution); +/*! +Called by the framework to ensure that the view size is enough large to +contain all objects. +*/ + void EnsureSize (); +/*! +@param zoom the new zoom level. + +Sets the zoom level. +*/ + void Zoom (double zoom); +/*! +@param show whether to show the cursor or not. + +Shows or hides the cursor in the currently edited text item if any. +*/ + void ShowCursor (bool show); +/*! +Called by the framework to update the default font size after a theme change. +*/ + void UpdateTheme (); +/*! +@param cr the cairo_t to which render. + +Renders the document using cairo. +*/ + void Render (cairo_t *cr); + + //Implementation +private: + WidgetData* m_pData; + Document* m_pDoc; + GtkWidget* m_pWidget; + std::list m_Widgets; + PangoContext* m_PangoContext; + PangoFontDescription* m_PangoFontDesc, *m_PangoSmallFontDesc; + double m_dFontHeight; + gchar* m_sFontName, *m_sSmallFontName; + int m_width, m_height; + double m_lastx, m_lasty; + bool m_bEmbedded; + GtkUIManager *m_UIManager; + bool m_Dragging; + gcu::Object *m_CurObject; + +/*!\fn GetBaseLineOffset() +@return the vertical offset for algnment of an atomic symbol. This value is half the height of the "C" character. +*/ +GCU_RO_PROP (double, BaseLineOffset) +/*!\fn GetActiveRichText() +@return the currently edited text item if any, or NULL. +*/ +GCU_RO_PROP (GnomeCanvasPango*, ActiveRichText) +}; + +/*! +@param item the item for which the event occured. +@param event the current GdkEvent. +@param widget the canvas owning the item. + +A callback for events occuring in the canvas. Calls View::OnEvent() for the +view owning \a widget. +*/ +bool on_event (GnomeCanvasItem *item, GdkEvent *event, GtkWidget* widget); +/*! +@param clipboard a GtkClipboard. +@param selection_data the data to paste. +@param pView the view of the active document. + +A callback to use for receiving data from a clipboard. Calls View::OnReceive(). +*/ +void on_receive (GtkClipboard *clipboard, GtkSelectionData *selection_data, View * pView); + +} // namespace gcp + +#endif // GCHEMPAINT_VIEW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/widgetdata.cc gnome-chemistry-utils-0.10.9/libs/gcp/widgetdata.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/widgetdata.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/widgetdata.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,397 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * widgetdata.cc + * + * Copyright (C) 2002-20067 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "widgetdata.h" +#include "view.h" +#include "settings.h" +#include "document.h" +#include "application.h" +#include "operation.h" +#include "theme.h" +#include "tool.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +#endif +#include + +using namespace gcu; + +namespace gcp { + +static xmlDocPtr pXmlDoc = NULL, pXmlDoc1 = NULL; +xmlChar* ClipboardData = NULL; +char *ClipboardTextData = NULL; +guint ClipboardDataType, ClipboardDataType1; +bool cleared = true; + +GtkTargetEntry const export_targets[] = { + {(char *) GCHEMPAINT_ATOM_NAME, 0, GCP_CLIPBOARD_NATIVE}, + {(char *) "image/svg", 0, GCP_CLIPBOARD_SVG}, + {(char *) "image/svg+xml", 0, GCP_CLIPBOARD_SVG_XML}, + {(char *) "image/x-eps", 0, GCP_CLIPBOARD_EPS}, + {(char *) "image/png", 0, GCP_CLIPBOARD_PNG}, + {(char *) "image/jpeg", 0, GCP_CLIPBOARD_JPEG}, + {(char *) "image/bmp", 0, GCP_CLIPBOARD_BMP}, + {(char *) "UTF8_STRING", 0, GCP_CLIPBOARD_UTF8_STRING}, + {(char *) "STRING", 0, GCP_CLIPBOARD_STRING} +}; + +void on_receive_targets (GtkClipboard *clipboard, GtkSelectionData *selection_data, Application *App) +{ + GtkClipboard* sel_clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + guint *DataType = (clipboard == sel_clipboard)? &ClipboardDataType: &ClipboardDataType1; + if (selection_data->target == gdk_atom_intern ("TARGETS", FALSE)) { + static char const *formats [] = + { + GCHEMPAINT_ATOM_NAME, + "image/svg", + "image/svg+xml", + "image/x-eps", + "image/png", + "image/jpeg", + "image/bmp", + "UTF8_STRING", + "STRING", + NULL + }; + + GdkAtom const *targets = (GdkAtom *) selection_data->data; + unsigned const atom_count = (selection_data->length / sizeof (GdkAtom)); + unsigned i, j; + /* Nothing on clipboard? */ + if (selection_data->length < 0) { + if (clipboard == sel_clipboard) + App->ActivateWindowsActionWidget ("/MainMenu/EditMenu/Paste", false); + return; + } + + gchar* name; + *DataType = GCP_CLIPBOARD_ALL; + for ( j = 0; j < atom_count ; j++) { + name = gdk_atom_name (targets [j]); + for (i = 0; i < *DataType; i++) + if (!strcmp (name, formats[i])) { + *DataType = i; + break; + } + g_free (name); + } + } + if (clipboard == sel_clipboard && App != NULL) + App->ActivateWindowsActionWidget ("/MainMenu/EditMenu/Paste", + ClipboardDataType == GCP_CLIPBOARD_NATIVE || ClipboardDataType == GCP_CLIPBOARD_UTF8_STRING || ClipboardDataType == GCP_CLIPBOARD_STRING); +} + +static void on_get_data (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, Application *App) +{ + xmlDocPtr pDoc = (clipboard == gtk_clipboard_get(GDK_SELECTION_CLIPBOARD))? pXmlDoc: pXmlDoc1; + guint *DataType = (clipboard == gtk_clipboard_get(GDK_SELECTION_CLIPBOARD))? &ClipboardDataType: &ClipboardDataType1; + g_return_if_fail (pDoc); + if (ClipboardData) + xmlFree (ClipboardData); + ClipboardData = NULL; + g_free (ClipboardTextData); + ClipboardTextData = NULL; + *DataType = info; + int size; + switch (info) { + case GCP_CLIPBOARD_NATIVE: + xmlDocDumpFormatMemory (pDoc, &ClipboardData, &size, info); + gtk_selection_data_set(selection_data, gdk_atom_intern (GCHEMPAINT_ATOM_NAME, FALSE), 8, (const guchar*) ClipboardData, size); + break; + case GCP_CLIPBOARD_SVG: + case GCP_CLIPBOARD_SVG_XML: { + Document *Doc = new Document (NULL, true); + View *pView = Doc->GetView (); + pView->CreateNewWidget (); // force canvas creation + Doc->ParseXMLTree (pDoc); + xmlDocPtr doc = pView->BuildSVG (); + xmlDocDumpFormatMemory (doc, &ClipboardData, &size, info); + gtk_selection_data_set (selection_data, gdk_atom_intern (export_targets[info].target, FALSE), 8, (const guchar*) ClipboardData, size); + xmlFreeDoc (doc); + delete Doc; + break; + } + case GCP_CLIPBOARD_EPS: { + break; + } + case GCP_CLIPBOARD_PNG: { + Document *Doc = new Document (NULL, true); + View *pView = Doc->GetView (); + gsize size; + pView->CreateNewWidget (); // force canvas creation + Doc->ParseXMLTree (pDoc); + GdkPixbuf *pixbuf = pView->BuildPixbuf (-1); // copy with zoom == 1 + gdk_pixbuf_save_to_buffer (pixbuf, &ClipboardTextData, &size, "png", NULL, NULL); + gtk_selection_data_set (selection_data, gdk_atom_intern (export_targets[info].target, FALSE), 8, (const guchar*) ClipboardTextData, size); + g_object_unref (pixbuf); + delete Doc; + break; + } + case GCP_CLIPBOARD_JPEG: { + Document *Doc = new Document (NULL, true); + View *pView = Doc->GetView (); + gsize size; + pView->CreateNewWidget (); // force canvas creation + Doc->ParseXMLTree (pDoc); + GdkPixbuf *pixbuf = pView->BuildPixbuf (-1); // copy with zoom == 1 + gdk_pixbuf_save_to_buffer (pixbuf, &ClipboardTextData, &size, "jpg", NULL, NULL); + gtk_selection_data_set (selection_data, gdk_atom_intern (export_targets[info].target, FALSE), 8, (const guchar*) ClipboardTextData, size); + g_object_unref (pixbuf); + delete Doc; + break; + } + case GCP_CLIPBOARD_BMP: { + Document *Doc = new Document (NULL, true); + View *pView = Doc->GetView (); + gsize size; + pView->CreateNewWidget (); // force canvas creation + Doc->ParseXMLTree (pDoc); + GdkPixbuf *pixbuf = pView->BuildPixbuf (-1); // copy with zoom == 1 + gdk_pixbuf_save_to_buffer (pixbuf, &ClipboardTextData, &size, "bmp", NULL, NULL); + gtk_selection_data_set (selection_data, gdk_atom_intern (export_targets[info].target, FALSE), 8, (const guchar*) ClipboardTextData, size); + g_object_unref (pixbuf); + delete Doc; + break; + } + default: + xmlDocDumpFormatMemory (pDoc, &ClipboardData, &size, info); + gtk_selection_data_set_text (selection_data, (const gchar*) ClipboardData, size); + break; + } + cleared = false; + if (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)) + App->ActivateWindowsActionWidget ("/MainMenu/EditMenu/Paste", true); +} + +void on_clear_data (GtkClipboard *clipboard, Object *obj) +{ + if (ClipboardData) { + xmlFree (ClipboardData); + ClipboardData = NULL; + } + g_free (ClipboardTextData); + ClipboardTextData = NULL; + cleared =true; + Application *app = dynamic_cast (obj); + if (!app) { + // the object might be a tool + Tool *tool = dynamic_cast (obj); + if (tool) + app = tool->GetApplication (); + } + if (app) + gtk_clipboard_request_contents (clipboard, gdk_atom_intern ("TARGETS", FALSE), (GtkClipboardReceivedFunc) on_receive_targets, app); +} + +bool WidgetData::IsSelected (Object const *obj) const +{ + std::list::const_iterator i, end = SelectedObjects.end (); + Object* pGroup = obj->GetGroup (); + for (i = SelectedObjects.begin (); i != end; i++) + if ((*i == obj) || (*i == pGroup)) + return true; + return false; +} + +void WidgetData::Unselect (Object *obj) +{ + SelectedObjects.remove (obj); + obj->SetSelected (Canvas, SelStateUnselected); + m_View->Update (obj); +} + +void WidgetData::UnselectAll () +{ + Object* obj; + while (!SelectedObjects.empty ()) { + obj = SelectedObjects.front (); + SelectedObjects.pop_front (); + obj->SetSelected (Canvas, SelStateUnselected); + m_View->Update (obj); //FIXME: is it really useful + } +} + +void WidgetData::SetSelected (Object *obj) +{ + if (!IsSelected (obj)) { + SelectedObjects.push_front (obj); + obj->SetSelected (Canvas, SelStateSelected); + } +} + +void WidgetData::MoveSelectedItems (double dx, double dy) +{ + std::list::iterator i, end = SelectedObjects.end (); + for (i = SelectedObjects.begin (); i != end; i++) + MoveItems (*i, dx, dy); +} + +void WidgetData::MoveItems (Object* obj, double dx, double dy) +{ + Object* pObject; + GnomeCanvasGroup* group; + if ((group = Items[obj])) + gnome_canvas_item_move ((GnomeCanvasItem*) group, dx, dy); + else + Items.erase (obj); + std::map::iterator i; + pObject = obj->GetFirstChild (i); + while (pObject) { + MoveItems (pObject, dx, dy); + pObject = obj->GetNextChild (i); + } +} + +void WidgetData::MoveSelection (double dx, double dy) +{ + if (!SelectedObjects.size ()) + return; + std::list::iterator i, end = SelectedObjects.end (); + Document* pDoc = m_View->GetDoc (); + Operation* pOp = pDoc-> GetNewOperation (GCP_MODIFY_OPERATION); + Theme *pTheme = pDoc->GetTheme (); + for (i = SelectedObjects.begin (); i != end; i++) { + pOp->AddObject (*i,0); + (*i)->Move (dx / pTheme->GetZoomFactor (), dy / pTheme->GetZoomFactor ()); + m_View->Update (*i); + pOp->AddObject (*i,1); + } + pDoc->FinishOperation (); +} + +void WidgetData::RotateSelection (double dx, double dy, double angle) +{ + Theme *pTheme = m_View->GetDoc ()->GetTheme (); + std::list::iterator i, end = SelectedObjects.end (); + Matrix2D m (angle); + for (i = SelectedObjects.begin (); i != end; i++) { + (*i)->Transform2D (m, dx / pTheme->GetZoomFactor (), dy / pTheme->GetZoomFactor ()); + m_View->Update(*i); + } +} + +void WidgetData::Copy (GtkClipboard* clipboard) +{ + /*First build the XML tree from current selection*/ + xmlDocPtr *pDoc = (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))? &pXmlDoc: &pXmlDoc1; + if (*pDoc) + xmlFreeDoc (*pDoc); + *pDoc = xmlNewDoc ((xmlChar*) "1.0"); + if (!*pDoc) + return; + if (SelectedObjects.empty ()) + return; + xmlDocSetRootElement (*pDoc, xmlNewDocNode(*pDoc, NULL, (xmlChar*)"chemistry", NULL)); + xmlNsPtr ns = xmlNewNs ((*pDoc)->children, (xmlChar*) "http://www.nongnu.org/gchempaint", (xmlChar*) "gcp"); + xmlSetNs ((*pDoc)->children, ns); +//FIXME: implement exception handling + std::list::iterator i, end= SelectedObjects.end (); + xmlNodePtr child; + for (i = SelectedObjects.begin(); i != end; i++) + if ((child = (*i)->Save (pXmlDoc))) + xmlAddChild ((*pDoc)->children, child); + Application* App = m_View->GetDoc ()->GetApplication (); + gtk_clipboard_set_with_data (clipboard, export_targets, ClipboardFormats, (GtkClipboardGetFunc) on_get_data, (GtkClipboardClearFunc) on_clear_data, App); + gtk_clipboard_request_contents (clipboard, gdk_atom_intern ("TARGETS", FALSE), (GtkClipboardReceivedFunc) on_receive_targets, App); +} + +void WidgetData::GetObjectBounds (Object const *obj, ArtDRect &rect) const +{ + Object const *pObject; + GnomeCanvasGroup const *group; + std::map::const_iterator g; + double x1, y1, x2, y2; + if ((g = Items.find (obj)) != Items.end ()) { + group = (*g).second; + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (group), &x1, &y1, &x2, &y2); + if (x2 > 0.) { + if (!go_finite (rect.x0)) { + rect.x0 = x1; + rect.y0 = y1; + rect.x1 = x2; + rect.y1 = y2; + } else { + if (rect.x0 > x1) rect.x0 = x1; + if (rect.y0 > y1) rect.y0 = y1; + if (rect.x1 < x2) rect.x1 = x2; + if (rect.y1 < y2) rect.y1 = y2; + } + } + } + std::map::const_iterator i; + pObject = obj->GetFirstChild (i); + while (pObject) { + GetObjectBounds (pObject, rect); + pObject = obj->GetNextChild (i); + } +} + +void WidgetData::GetSelectionBounds (ArtDRect &rect) const +{ + std::list::const_iterator i, end = SelectedObjects.end (); + rect.x0 = go_nan; + for (i = SelectedObjects.begin (); i != end; i++) + GetObjectBounds (*i, rect); + if (!go_finite (rect.x0)) + rect.x0 = rect.y0 = rect.x1 = rect.y1 = 0.; +} + +void WidgetData::GetObjectBounds (Object const *obj, ArtDRect *rect) const +{ + rect->x0 = go_nan; + GetObjectBounds (obj, *rect); + if (!go_finite (rect->x0)) + rect->x0 = rect->y0 = rect->x1 = rect->y1 = 0.; +} + +void WidgetData::SelectAll () +{ + std::map::iterator i, end = Items.end (); + Object *pObject; + for (i = Items.begin (); i != end; i++) { + pObject = (*i).first->GetGroup (); + if (pObject) { + if (!IsSelected (pObject)) + SetSelected (pObject); + } + else if (!IsSelected ((*i).first)) + SetSelected (const_cast ((*i).first)); + } +} + +xmlDocPtr WidgetData::GetXmlDoc (GtkClipboard* clipboard) +{ + return (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))? pXmlDoc: pXmlDoc1; +} + +void WidgetData::ShowSelection (bool state) +{ + std::list::iterator i, end = SelectedObjects.end (); + for (i = SelectedObjects.begin (); i != end; i++) + (*i)->SetSelected (Canvas, (state)? SelStateSelected: SelStateUnselected); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/widgetdata.h gnome-chemistry-utils-0.10.9/libs/gcp/widgetdata.h --- gnome-chemistry-utils-0.8.6/libs/gcp/widgetdata.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/widgetdata.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,203 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * widgetdata.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_WIDGET_DATA_H +#define GCHEMPAINT_WIDGET_DATA_H + +#include +#include +#include +#include + +/*!\file*/ +namespace gcp { + +class Application; +class View; + +extern guint ClipboardDataType, ClipboardDataType1; +extern xmlChar* ClipboardData; +extern char* ClipboardTextData; +extern bool cleared; +void on_receive_targets (GtkClipboard *clipboard, GtkSelectionData *selection_data, Application *App); +void on_clear_data (GtkClipboard *clipboard, gcu::Object *obj); + +/*!\enum SelectionState +Enumeration of the selection states used in GChemPaint in the gcu::Object::SetSelected method. +*/ +enum SelectionState +{ +/*! +Unselected object. +*/ + SelStateUnselected = 0, +/*! +Unselected object. +*/ + SelStateSelected, +/*! +Edited or new object. +*/ + SelStateUpdating, +/*! +The object is marked for deletion. +*/ + SelStateErasing +}; + +/*!\class WidgetData +This class contains all data associated with a widget displaying a document. It +might be deprecated in future versions since it was mostly useful for the Bonobo +version which is not anymore supported. +*/ +class WidgetData +{ +public: +/*! +The document view. +*/ + View* m_View; +/*! +The canvas widget to which this instance is associated. +*/ + GtkWidget *Canvas; +/*! +The root group containing all other items, except the background. +*/ + GnomeCanvasGroup *Group; +/*! +The white rectangle used as background (to be deprecated). +*/ + GnomeCanvasItem* Background; +/*! +The current zoom factor. +*/ + double Zoom; +/*! +Maps the document objects to the canvas items which represent them. +*/ + std::mapItems; +/*! +The list of selected objects. +*/ + std::listSelectedObjects; + +/*! +@param obj an object. +@return true if the object is selected, false otherwise. +*/ + bool IsSelected (gcu::Object const *obj) const; +/*! +@param obj the object to select. + +Selects the specified object. +*/ + void SetSelected (gcu::Object *obj); +/*! +@param obj the object to unselect. + +Unselects a specified object. +*/ + void Unselect (gcu::Object *obj); +/*! +Unselects everything. +*/ + void UnselectAll (); +/*! +@param dx the x coordinate of the translation vector. +@param dy the y coordinate of the translation vector. + +Moves the items representing the selection, but don't move the objects +themselves and don't modify the document. This is used by the selection tool +but might be deprecated in the future. +*/ + void MoveSelectedItems (double dx, double dy); +/*! +@param dx the x coordinate of the translation vector. +@param dy the y coordinate of the translation vector. + +Moves the selection. This method creates an Operation instance for the +Undo/Redo framework. +*/ + void MoveSelection (double dx, double dy); +/*! +@param x the x coordinate of the rotation center. +@param y the y coordinate of the rotation center. +@param angle the rotation angle. + +Rotates the selection. This method does not create an Operation instance. +*/ + void RotateSelection (double x, double y, double angle); +/*! +Empties the list of selected objects. Called after objects have been deleted. +*/ + void ClearSelection () {SelectedObjects.clear();} +/*! +@param clipboard a GtkClipboard. + +Copies the current selection to the clipboard. +*/ + void Copy (GtkClipboard* clipboard); +/*! +@param rect an ArtDRect which will receive the selection bounds. + +Gets the selection bounds in canvas coordinates. +*/ + void GetSelectionBounds (ArtDRect &rect) const; +/*! +@return true if at least one object is selected, false otherwise. +*/ + bool HasSelection () {return !(SelectedObjects.empty());} +/*! +Selects the whole document. +*/ + void SelectAll (); +/*! +@param clipboard a GtkClipboard. +@return the xmlDocPtr associtated with the clipboard. +*/ + static xmlDocPtr GetXmlDoc (GtkClipboard* clipboard); +/*! +@param state whether to show or not the selection. + +If \a state is true, the selection is highlighted, otherwise, it is displayed +normally. This is used when printing or exporting an image. +*/ + void ShowSelection (bool state); +/*! +@param obj a gcu::Object. +@param rect an ArtDRect which will receive the object bounds. + +Gets the object bounds in canvas coordinates. +*/ + void GetObjectBounds (gcu::Object const *obj, ArtDRect *rect) const; + +private: + void MoveItems (gcu::Object *obj, double dx, double dy); + void GetObjectBounds (gcu::Object const* obj, ArtDRect &rect) const; +}; + +} // namespace gcp + +#endif //GCHEMPAINT_WIDGET_DATA_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/window.cc gnome-chemistry-utils-0.10.9/libs/gcp/window.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/window.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/window.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,730 @@ +/* + * GChemPaint library + * window.cc + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "document.h" +#include "newfiledlg.h" +#include "window.h" +#include "about.h" +#include "preferences.h" +#include "theme.h" +#include "view.h" +#include "zoomdlg.h" +#include +#include +#include +#include + +static void on_destroy (GtkWidget* widget, gcp::Window* Win) +{ + Win->GetDocument ()->GetView ()->PrepareUnselect (); + delete Win; +} + +static bool on_delete_event (GtkWidget* widget, GdkEvent *event, gcp::Window* Win) +{ + return !Win->VerifySaved (); +} + +static void on_file_new(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnFileNew (); +} + +static void on_themed_file_new(GtkWidget* widget, gcp::Window* Win) +{ + new gcp::NewFileDlg (Win->GetApplication ()); +} + +static void on_file_open(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnFileOpen (); +} + +void on_file_save_as(GtkWidget* widget, gcp::Window* Win) +{ + Win->GetApplication ()->OnSaveAs(); +} + +static void on_file_save(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnSave (); +} + +static void on_file_save_as_image(GtkWidget* widget, gcp::Window* Win) +{ + Win->GetApplication ()->OnSaveAsImage (); +} + +static void on_properties(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnProperties (); +} + +static void on_page_setup (GtkWidget *widget, gcp::Window* Win) +{ + Win->OnPageSetup (); +} + +static void on_print_preview (GtkWidget *widget, gcp::Window* Win) +{ + Win->GetDocument ()->Print (true); +} + +static void on_file_print (GtkWidget *widget, gcp::Window* Win) +{ + Win->GetDocument ()->Print (false); +} + +static void on_file_close (GtkWidget* widget, gcp::Window *Win) +{ + Win->Close (); +} + +static void on_quit (GtkWidget* widget, gcp::Window *Win) +{ + Win->GetApplication ()->CloseAll (); +} + +static void on_cut_selection(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnCutSelection (); +} + +static void on_copy_selection(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnCopySelection (); +} + +static void on_undo(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnUndo (); +} + +static void on_redo(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnRedo (); +} + +static void on_select_all(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnSelectAll (); +} + +static void on_paste_selection(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnPasteSelection (); +} + +static void on_delete_selection(GtkWidget* widget, gcp::Window* Win) +{ + Win->OnDeleteSelection (); +} + +static void on_preferences (GtkWidget* widget, gcp::Window* Win) +{ + Win->OnPreferences (); +} + +static void on_zoom_400 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (4.); +} + +static void on_zoom_300 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (3.); +} + +static void on_zoom_200 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (2.); +} + +static void on_zoom_150 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (1.5); +} + +static void on_zoom_100 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (1.); +} + +static void on_zoom_75 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (.75); +} + +static void on_zoom_50 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (.5); +} + +static void on_zoom_25 (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (.3); +} + +static void on_zoom (GtkWidget* widget, gcp::Window* Win) +{ + Win->Zoom (0.); +} + +static void on_help (GtkWidget *widget, gcp::Window* Win) +{ + Win->GetApplication ()->OnHelp (); +} + +static void on_web (GtkWidget *widget, gcp::Window* Win) +{ + Win->GetApplication ()->OnWeb ("gchempaint.nongnu.org"); +} + +static void on_mail (GtkWidget *widget, gcp::Window* Win) +{ + Win->GetApplication ()->OnMail ("mailto:gchempaint-main@nongnu.org"); +} + +static void on_live_assistance (GtkWidget *widget, gcp::Window *Win) +{ + Win->GetApplication ()->OnLiveAssistance (); +} + +static void on_bug (GtkWidget *widget, gcp::Window* Win) +{ + Win->GetApplication ()->OnBug (); +} + +static void on_show_menu_tip (GtkWidget *proxy, gcp::Window* Win) +{ + GtkAction *action = (GtkAction*) g_object_get_data (G_OBJECT (proxy), "action"); + char *tip; + g_object_get (action, "tooltip", &tip, NULL); + if (tip != NULL){ + Win->SetStatusText (tip); + g_free (tip); + } +} + +static void on_clear_menu_tip (gcp::Window* Win) +{ + Win->ClearStatus (); +} + +static void on_connect_proxy (GtkUIManager *ui, GtkAction *action, GtkWidget *proxy, gcp::Window* Win) +{ + /* connect whether there is a tip or not it may change later */ + if (GTK_IS_MENU_ITEM (proxy)) { + g_object_set_data (G_OBJECT (proxy), "action", action); + g_object_connect (proxy, + "signal::select", G_CALLBACK (on_show_menu_tip), Win, + "swapped_signal::deselect", G_CALLBACK (on_clear_menu_tip), Win, + NULL); + } +} + +static void on_disconnect_proxy (GtkUIManager *ui, GtkAction *action, GtkWidget *proxy, gcp::Window* Win) +{ + if (GTK_IS_MENU_ITEM (proxy)) { + g_object_set_data (G_OBJECT (proxy), "action", NULL); + g_object_disconnect (proxy, + "any_signal::select", G_CALLBACK (on_show_menu_tip), Win, + "any_signal::deselect", G_CALLBACK (on_clear_menu_tip), Win, + NULL); + } +} + +static bool on_key_release(GtkWidget* widget, GdkEventKey* ev, gcp::Window* Win) +{ + return Win->OnKeyReleased(widget, ev); +} + +static bool on_key_press(GtkWidget* widget, GdkEventKey* ev, gcp::Window* Win) +{ + return Win->OnKeyPressed(widget, ev); +} + +static void on_recent (GtkRecentChooser *widget, gcp::Window *Win) +{ + gcp::Application *App = Win->GetApplication (); + GtkRecentInfo *info = gtk_recent_chooser_get_current_item (widget); + gcp::Document *pDoc = Win->GetDocument (); + App->FileProcess (gtk_recent_info_get_uri (info), gtk_recent_info_get_mime_type (info), false, NULL, (!pDoc->HasChildren () && !pDoc->GetDirty ())? pDoc: NULL); + gtk_recent_info_unref (info); +} + +/********* + * Menus * + *********/ +static GtkActionEntry entries[] = { + { "FileMenu", NULL, N_("_File") }, + { "New", GTK_STOCK_NEW, N_("_New File"), NULL, + N_("Create a new file"), G_CALLBACK (on_file_new) }, + { "NewThemed", GTK_STOCK_NEW, N_("Ne_w File with Theme..."), "N", + N_("Create a new file using a theme"), G_CALLBACK (on_themed_file_new) }, + { "Open", GTK_STOCK_OPEN, N_("_Open..."), "O", + N_("Open a file"), G_CALLBACK (on_file_open) }, + { "Save", GTK_STOCK_SAVE, N_("_Save"), "S", + N_("Save the current file"), G_CALLBACK (on_file_save) }, + { "SaveAs", GTK_STOCK_SAVE_AS, N_("Save _As..."), "S", + N_("Save the current file with a different name"), G_CALLBACK (on_file_save_as) }, + { "SaveAsImage", GTK_STOCK_SAVE_AS, N_("Save As _Image..."), "I", + N_("Save the current file as an image"), G_CALLBACK (on_file_save_as_image) }, + { "PageSetup", NULL, N_("Page Set_up..."), NULL, + N_("Setup the page settings for your current printer"), G_CALLBACK (on_page_setup) }, + { "PrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), NULL, + N_("Print preview"), G_CALLBACK (on_print_preview) }, + { "Print", GTK_STOCK_PRINT, N_("_Print..."), "P", + N_("Print the current file"), G_CALLBACK (on_file_print) }, + { "Properties", GTK_STOCK_PROPERTIES, N_("Prope_rties..."), NULL, + N_("Modify the file's properties"), G_CALLBACK (on_properties) }, + { "Close", GTK_STOCK_CLOSE, N_("_Close"), "W", + N_("Close the current file"), G_CALLBACK (on_file_close) }, + { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", + N_("Quit GChemPaint"), G_CALLBACK (on_quit) }, + { "EditMenu", NULL, N_("_Edit") }, + { "Undo", GTK_STOCK_UNDO, N_("_Undo"), "Z", + N_("Undo the last action"), G_CALLBACK (on_undo) }, + { "Redo", GTK_STOCK_REDO, N_("_Redo"), "Z", + N_("Redo the undone action"), G_CALLBACK (on_redo) }, + { "Cut", GTK_STOCK_CUT, N_("Cu_t"), "X", + N_("Cut the selection"), G_CALLBACK (on_cut_selection) }, + { "Copy", GTK_STOCK_COPY, N_("_Copy"), "C", + N_("Copy the selection"), G_CALLBACK (on_copy_selection) }, + { "Paste", GTK_STOCK_PASTE, N_("_Paste"), "V", + N_("Paste the clipboard"), G_CALLBACK (on_paste_selection) }, + { "Erase", GTK_STOCK_CLEAR, N_("C_lear"), NULL, + N_("Clear the selection"), G_CALLBACK (on_delete_selection) }, + { "SelectAll", NULL, N_("Select _All"), "A", + N_("Select everything"), G_CALLBACK (on_select_all) }, + { "Preferences", GTK_STOCK_PREFERENCES, N_("Pr_eferences..."), NULL, + N_("Configure the application"), G_CALLBACK (on_preferences) }, + { "ViewMenu", NULL, N_("_View") }, + { "ZoomMenu", NULL, N_("_Zoom") }, + { "400%", NULL, N_("_400%"), "4", + N_("Zoom to 400%"), G_CALLBACK (on_zoom_400) }, + { "300%", NULL, N_("_300%"), "3", + N_("Zoom to 300%"), G_CALLBACK (on_zoom_300) }, + { "200%", NULL, N_("_200%"), "2", + N_("Zoom to 200%"), G_CALLBACK (on_zoom_200) }, + { "150%", NULL, N_("150%"), "6", + N_("Zoom to 150%"), G_CALLBACK (on_zoom_150) }, + { "100%", NULL, N_("_100%"), "1", + N_("Zoom to 100%"), G_CALLBACK (on_zoom_100) }, + { "75%", NULL, N_("_75%"), "7", + N_("Zoom to 75%"), G_CALLBACK (on_zoom_75) }, + { "50%", NULL, N_("_50%"), "5", + N_("Zoom to 50%"), G_CALLBACK (on_zoom_50) }, + { "25%", NULL, N_("25%"), "8", + N_("Zoom to 25%"), G_CALLBACK (on_zoom_25) }, + { "Zoom", NULL, N_("_Zoom to...%"), "M", + N_("Open Zoom Dialog Box"), G_CALLBACK (on_zoom) }, + { "ToolsMenu", NULL, N_("_Tools") }, + { "WindowsMenu", NULL, N_("_Windows") }, + { "HelpMenu", NULL, N_("_Help") }, + { "Help", GTK_STOCK_HELP, N_("_Contents"), "F1", + N_("View help for GChemPaint"), G_CALLBACK (on_help) }, + { "Web", NULL, N_("GChemPaint on the _web"), NULL, + N_("Browse GChemPaint's web site"), G_CALLBACK (on_web) }, + { "LiveAssistance", NULL, N_("Live assistance"), NULL, + N_("Open the Gnome Chemistry Utils IRC channel"), G_CALLBACK (on_live_assistance) }, + { "Mail", NULL, N_("_Ask a question"), NULL, + N_("Ask a question about GChemPaint"), G_CALLBACK (on_mail) }, + { "Bug", NULL, N_("Report _Bugs"), NULL, + N_("Submit a bug report for GChemPaint"), G_CALLBACK (on_bug) }, + { "About", NULL, N_("_About"), NULL, + N_("About GChemPaint"), G_CALLBACK (on_about) } +}; + +/* Toggle items */ +static GtkToggleActionEntry toggle_entries[] = { +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +""; + +using namespace gcu; + +namespace gcp { + +Window::Window (gcp::Application *App, char const *Theme, char const *extra_ui) throw (std::runtime_error): + Target (App) +{ + GtkWidget *vbox; + GtkWidget *bar; + GtkWindow *window; + GtkActionGroup *action_group; + GtkAccelGroup *accel_group; + GError *error; + + SetWindow (window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL))); + g_object_set (G_OBJECT (window), "urgency-hint", false, NULL); + g_object_set_data (G_OBJECT (window), "gcp-role", (void*) 1); + g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (on_destroy), this); + g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (on_delete_event), this); + vbox = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (window), vbox); + action_group = gtk_action_group_new ("MenuActions"); + gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); + gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), this); + gtk_action_group_add_toggle_actions (action_group, toggle_entries, G_N_ELEMENTS (toggle_entries), this); + + m_UIManager = gtk_ui_manager_new (); + g_object_connect (m_UIManager, + "signal::connect_proxy", G_CALLBACK (on_connect_proxy), this, + "signal::disconnect_proxy", G_CALLBACK (on_disconnect_proxy), this, + NULL); + gtk_ui_manager_insert_action_group (m_UIManager, action_group, 0); + g_object_unref (action_group); + + error = NULL; + if (!gtk_ui_manager_add_ui_from_string (m_UIManager, ui_description, -1, &error)) { + std::string what = std::string ("building menus failed: ") + error->message; + g_error_free (error); + throw std::runtime_error (what); + } + if (extra_ui && !gtk_ui_manager_add_ui_from_string (m_UIManager, extra_ui, -1, &error)) { + g_message ("building menus failed: %s", error->message); + g_error_free (error); + } + + // now add entries registered by plugins. + App->BuildMenu (m_UIManager); + + accel_group = gtk_ui_manager_get_accel_group (m_UIManager); + gtk_window_add_accel_group (window, accel_group); + + GtkWidget *menu = gtk_ui_manager_get_widget (m_UIManager, "/MainMenu/FileMenu/Open"); + GtkWidget *w = gtk_recent_chooser_menu_new_for_manager (App->GetRecentManager ()); + gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (w), GTK_RECENT_SORT_MRU); + GtkRecentFilter *filter = gtk_recent_filter_new (); + gtk_recent_filter_add_mime_type (filter, "application/x-gchempaint"); + gtk_recent_filter_add_mime_type (filter, "chemical/x-chemdraw"); + gtk_recent_filter_add_mime_type (filter, "chemical/x-cml"); + gtk_recent_filter_add_mime_type (filter, "chemical/x-mdl-molfile"); + gtk_recent_filter_add_mime_type (filter, "chemical/x-pdb"); + gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (w), filter); + g_signal_connect (G_OBJECT (w), "item-activated", G_CALLBACK (on_recent), this); + GtkWidget *item = gtk_menu_item_new_with_mnemonic (_("Open _recent")); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), w); + gtk_widget_show_all (item); + gtk_menu_shell_insert (GTK_MENU_SHELL (gtk_widget_get_parent (menu)), item, 3); + + bar = gtk_ui_manager_get_widget (m_UIManager, "/MainMenu"); + gtk_box_pack_start (GTK_BOX (vbox), bar, false, false, 0); + bar = gtk_ui_manager_get_widget (m_UIManager, "/MainToolbar"); + gtk_toolbar_set_tooltips (GTK_TOOLBAR(bar), true); + gtk_box_pack_start (GTK_BOX (vbox), bar, false, false, 0); + m_Document = new Document (App, true, this); + if (Theme) + m_Document->SetTheme (TheThemeManager.GetTheme (Theme)); + gtk_window_set_title (window, m_Document->GetTitle ()); + w = m_Document->GetView ()->CreateNewWidget (); + GtkScrolledWindow* scroll = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type (scroll, GTK_SHADOW_IN); + gtk_scrolled_window_add_with_viewport (scroll, w); + gtk_widget_set_size_request (GTK_WIDGET (scroll), 408, 308); + gtk_widget_show (GTK_WIDGET (scroll)); + gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (scroll), true, true, 0); + m_Bar = gtk_statusbar_new (); + m_statusId = gtk_statusbar_get_context_id (GTK_STATUSBAR (m_Bar), "status"); + gtk_statusbar_push (GTK_STATUSBAR (m_Bar), m_statusId, _("Ready")); + m_MessageId = 0; + gtk_box_pack_start (GTK_BOX (vbox), m_Bar, false, false, 0); + + g_signal_connect(GTK_OBJECT(window), "key_press_event", (GCallback)on_key_press, this); + g_signal_connect(GTK_OBJECT(window), "key_release_event", (GCallback)on_key_release, this); + + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (m_UIManager, "/MainMenu/EditMenu/Copy"), false); + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (m_UIManager, "/MainMenu/EditMenu/Cut"), false); + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (m_UIManager, "/MainMenu/EditMenu/Erase"), false); + gtk_widget_show_all (GTK_WIDGET (window)); + App->SetActiveDocument (m_Document); +} + +Window::~Window () +{ +} + +void Window::OnFileNew() +{ + m_Application->OnFileNew (); +} + +void Window::OnSave() +{ + if (m_Document->GetFileName ()) + m_Document->Save(); + else + m_Application->OnSaveAs (); +} + +void Window::OnFileOpen() +{ + FileChooser (m_Application, false, m_Application->GetSupportedMimeTypes (), (!m_Document->HasChildren () && !m_Document->GetDirty ())? m_Document: NULL); +} + +void Window::OnProperties() +{ + m_Document->OnProperties (); +} + +void Window::SetActive (gcp::Document* pDoc, GtkWidget* w) +{ +} + +void Window::OnUndo() +{ + m_Document->OnUndo(); +} + +void Window::OnRedo() +{ + m_Document->OnRedo(); +} + +void Window::OnSelectAll() +{ + if (m_Document->GetEditable ()) + m_Document->GetView ()->OnSelectAll (); +} + +void Window::OnPasteSelection() +{ + if (m_Document->GetEditable ()) { + GtkClipboard* clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + m_Document->GetView ()->OnPasteSelection (m_Document->GetWidget (), clipboard); + } +} + +void Window::OnCutSelection() +{ + if (m_Document->GetEditable ()) { + GtkClipboard* clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + m_Document->GetView ()->OnCutSelection (m_Document->GetWidget (), clipboard); + } +} + +void Window::OnCopySelection() +{ + if (m_Document->GetEditable ()) { + GtkClipboard* clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + m_Document->GetView ()->OnCopySelection (m_Document->GetWidget (), clipboard); + } +} + +void Window::OnDeleteSelection() +{ + if (m_Document->GetEditable ()) + m_Document->GetView ()->OnDeleteSelection (m_Document->GetWidget ()); +} + +void Window::OnPreferences () +{ + new PrefsDlg (GetApplication ()); +} + +void Window::Zoom (double zoom) +{ + View *pView = m_Document->GetView (); + // authorized zooms: 20% to 800% all other values will open the zoom dialog. + if (zoom >= 0.2 && zoom <= 8.) + pView->Zoom (zoom); + else { + Dialog *pDialog = m_Document->GetDialog ("Zoom"); + if (pDialog) + gtk_window_present (pDialog->GetWindow ()); + else + new ZoomDlg (m_Document); + } +} + +void Window::ClearStatus() +{ + if (m_MessageId) { + gtk_statusbar_pop (GTK_STATUSBAR (m_Bar), m_statusId); + m_MessageId = 0; + } +} + +void Window::SetStatusText(const char* text) +{ + if (m_MessageId) + gtk_statusbar_pop (GTK_STATUSBAR (m_Bar), m_statusId); + m_MessageId = gtk_statusbar_push (GTK_STATUSBAR (m_Bar), m_statusId, text); +} + +void Window::Destroy () +{ + gtk_widget_destroy (GTK_WIDGET (GetWindow ())); +} + +void Window::SetTitle (char const *title) +{ + gtk_window_set_title (GetWindow (), ((title)? title: GetDefaultTitle ())); +} + +void Window::Show () +{ + gdk_window_raise (GTK_WIDGET (GetWindow ())->window); +} + +bool Window::OnKeyPressed(GtkWidget* widget, GdkEventKey* ev) +{ + return (m_Document->GetEditable ())? + m_Document->GetView ()->OnKeyPress (m_Document->GetWidget (), ev): + false; +} + +bool Window::OnKeyReleased(GtkWidget* widget, GdkEventKey* ev) +{ + return (m_Document->GetEditable ())? + m_Document->GetView ()->OnKeyRelease (m_Document->GetWidget (), ev): + false; +} + +bool Window::Close () +{ + if (VerifySaved ()) { + m_Document->GetView ()->PrepareUnselect (); + gtk_widget_destroy (GTK_WIDGET (GetWindow ())); + return true; + } + return false; +} + + +char const *Window::GetDefaultTitle () +{ + return _("GChemPaint"); +} + +void Window::ActivateActionWidget (char const *path, bool activate) +{ + GtkWidget *w = gtk_ui_manager_get_widget (m_UIManager, path); + if (w) + gtk_widget_set_sensitive (w, activate); +} + +bool Window::VerifySaved () +{ + if (!m_Document->GetDirty ()) + return true; + int res; + GtkWidget* mbox; + do { + gchar* str = g_strdup_printf (_("\"%s\" has been modified. Do you wish to save it?"), m_Document->GetTitle ()); + mbox = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, str); + g_free (str); + gtk_dialog_add_button (GTK_DIALOG (mbox), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + res = gtk_dialog_run (GTK_DIALOG (mbox)); + gtk_widget_destroy (mbox); + if (res == GTK_RESPONSE_YES) + OnSave (); + while (gtk_events_pending ()) // no idea why this is needed + gtk_main_iteration (); + } while ((res == GTK_RESPONSE_YES) && (m_Document->GetFileName () == NULL)); + if (res == GTK_RESPONSE_NO) + m_Document->SetDirty (false); + return (res != GTK_RESPONSE_CANCEL); +} + +void Window::OnPageSetup () +{ + new PrintSetupDlg (m_Application, m_Document); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/window.h gnome-chemistry-utils-0.10.9/libs/gcp/window.h --- gnome-chemistry-utils-0.8.6/libs/gcp/window.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/window.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,207 @@ +/* + * GChemPaint library + * window.h + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + + +#ifndef GCP_WINDOW_H +#define GCP_WINDOW_H + +#include "target.h" +#include +#include + +/*!\file*/ +namespace gcp { + +class Application; +class Document; + +/*!\class Window gcp/window.h +The top level window class for GChemPaint. Each document is +associated with a view which might be itself associated with a window. +*/ +class Window: public Target +{ +public: +/*! +@param app the gcp::Application instance. +@param theme the name of the theme used by the document. +@param extra_ui a string describing the menu items to add. + +Contructs the new window. Default menus do not have a File/Quit item. +\a extra_ui can be used to add it. GChemPaint uses: +\code +"" +" " +" " +" " +" " +" " +" " +" " +""; +\endcode +*/ + Window (gcp::Application *app, char const *theme = NULL, char const *extra_ui = NULL) throw (std::runtime_error); + virtual ~Window (); + +/*! +Method called by the framework when the File/New File menu command is fired. +*/ + void OnFileNew (); +/*! +Method called by the framework when the File/Open menu command is fired. +*/ + void OnFileOpen (); +/*! +Method called by the framework when the File/Properties menu command is fired. +*/ + void OnProperties (); +/*! +Method called by the framework when the File/Save menu command is fired. +*/ + void SetActive (gcp::Document* pDoc, GtkWidget* w); +/*! +Method called by the framework when the Edit/Undo menu command is fired. +*/ + void OnUndo (); +/*! +Method called by the framework when the Edit/Redo menu command is fired. +*/ + void OnRedo (); +/*! +Method called by the framework when the Edit/Select All menu command is fired. +*/ + void OnSelectAll (); +/*! +Method called by the framework when the Edit/Paste menu command is fired. +*/ + void OnPasteSelection (); +/*! +Method called by the framework when the Edit/Cut menu command is fired. +*/ + void OnCutSelection (); +/*! +Method called by the framework when the Edit/Copy menu command is fired. +*/ + void OnCopySelection (); +/*! +Method called by the framework when the Edit/Delete menu command is fired. +*/ + void OnDeleteSelection (); +/*! +Method called by the framework when the Edit/Preferences menu command is fired. +*/ + void OnPreferences (); +/*! +@param zoom the new zoom level. + +Sets the zoom level. +*/ + void Zoom (double zoom); +/*! +Clears the status bar message. +*/ + void ClearStatus (); +/*! +@param text the text to display in the status bar. + +Sets the status bar message. +*/ + void SetStatusText (const char* text); +/*! +Raises the window and makes it active. +*/ + void Show (); +/*! +Called by the framework on a "key-press-event" event. +*/ + bool OnKeyPressed (GtkWidget* widget, GdkEventKey* ev); +/*! +Called by the framework on a "key-release-event" event. + +*/ + bool OnKeyReleased (GtkWidget* widget, GdkEventKey* ev); +/*! +Checks if the document must be saved (see VerifySaved()) and safely closes the window. +*/ + bool Close (); + +/*! +Method called by the framework when the File/Save menu command is fired. +*/ + virtual void OnSave (); +/*! +@return the default window title used when the document does not have a title. +*/ + virtual char const *GetDefaultTitle (); + +/*! +Destroys the window. +*/ + void Destroy (); +/*! +@param title the new window title. + +Sets the window title. +*/ + void SetTitle (char const *title); +/*! +@param path the path to activate. +@param activate whether to activate or deactivate. + +Activates or deactivates the menu item corresponding to \a path according +to the value of \a activate. + +To deactivate the "Paste" menu item, use: +\code +ActivateActionWidget ("/MainMenu/EditMenu/Paste", false); +\endcode +*/ + void ActivateActionWidget (char const *path, bool activate); +/*! +If the document has been modified since last saving, pops-up a dialog box to +ask the user if he wants to save the document, to drop the changes or to abort +closing. + +@return true if the document can be closed, false otherwise. +*/ + bool VerifySaved (); +/*! +Method called by the framework when the File/Page setup menu command is fired. +*/ + void OnPageSetup (); + +protected: +/*! +The GtkUIManager associated with the window. +*/ + GtkUIManager* m_UIManager; + +private: + GtkWidget* m_Bar; //GtkStatusBar + unsigned m_statusId; + unsigned m_MessageId; //currently displayed message in the status bar +}; + +} // namespace gcp + +#endif // GCP_WINDOW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/zoomdlg.cc gnome-chemistry-utils-0.10.9/libs/gcp/zoomdlg.cc --- gnome-chemistry-utils-0.8.6/libs/gcp/zoomdlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/zoomdlg.cc 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,76 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * zoomdlg.cc + * + * Copyright (C) 2005-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "zoomdlg.h" +#include "view.h" +#include "document.h" +#include "application.h" + +using namespace gcu; + +namespace gcp { + +static void on_focus_in (ZoomDlg *dlg) +{ + dlg->OnFocusIn (); +} + +static void on_zoom_changed (GtkSpinButton *btn, gcp::Document *pDoc) +{ + View *pView = pDoc->GetView (); + if (pView) + pView->Zoom (gtk_spin_button_get_value (btn) / 100.); +} + +ZoomDlg::ZoomDlg (gcp::Document *pDoc): + Dialog (pDoc->GetApplication (), GLADEDIR"/zoom.glade", "zoomdlg", pDoc) +{ + if (!xml) { + delete this; + return; + } + g_signal_connect_swapped (G_OBJECT (dialog), "focus_in_event", G_CALLBACK (on_focus_in), this); + btn = (GtkSpinButton*) glade_xml_get_widget (xml, "zoom"); + m_ZoomSignal = g_signal_connect (G_OBJECT (btn), "value-changed", G_CALLBACK (on_zoom_changed), pDoc); + m_Doc = pDoc; +} + +ZoomDlg::~ZoomDlg () +{ +} + +void ZoomDlg::OnFocusIn () +{ + if (!m_Doc) + return; + WidgetData *pData = (WidgetData*) g_object_get_data (G_OBJECT (m_Doc->GetWidget ()), "data"); + if (!pData) + return; + g_signal_handler_block (btn, m_ZoomSignal); + gtk_spin_button_set_value (btn, pData->Zoom * 100.); + g_signal_handler_unblock (btn, m_ZoomSignal); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcp/zoomdlg.h gnome-chemistry-utils-0.10.9/libs/gcp/zoomdlg.h --- gnome-chemistry-utils-0.8.6/libs/gcp/zoomdlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcp/zoomdlg.h 2009-11-14 11:30:38.000000000 +0100 @@ -0,0 +1,67 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * zoomdlg.h + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ZOOM_DLG_H +#define GCHEMPAINT_ZOOM_DLG_H + +#include +#include + +/*!\file*/ +namespace gcp { + +class Document; + +/*!\class ZoomDlg gcp/zoomdlg.h +The zoom level dialog. +*/ +class ZoomDlg: public gcu::Dialog +{ +public: +/*! +@param pDoc the document to zoom. + +Constructs a dialog to change the zoom level for \a pDoc. +*/ + ZoomDlg (gcp::Document* pDoc); +/*! +The destructor. +*/ + virtual ~ZoomDlg (); + +/*! +Called by the framework when the dialog gets the focus and update the zoom level +which might have changed. +*/ + void OnFocusIn (); + +private: + GtkSpinButton *btn; + gcp::Document *m_Doc; + gulong m_ZoomSignal; +}; + +} // namespace gcp + +#endif //GCHEMPAINT_ZOOM_DLG_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/application.cc gnome-chemistry-utils-0.10.9/libs/gcu/application.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/application.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/application.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,306 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/application.cc + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "cmd-context.h" +#include "loader.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +#endif +#include +#include +#include +#ifndef HAVE_GO_CONF_SYNC +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace gcu +{ + +#ifdef HAVE_GO_CONF_SYNC +GOConfNode *Application::m_ConfDir = NULL; +#endif + +static set Apps; + +Application::Application (string name, string datadir, char const *help_name, char const *icon_name) +{ +#ifdef HAVE_GO_CONF_SYNC + if (m_ConfDir == NULL) { + libgoffice_init (); + m_ConfDir = go_conf_get_node (NULL, GCU_CONF_DIR); + } +#else + libgoffice_init (); +#endif + Apps.insert (this); + static bool first_call = true; + Name = name; + char const *szlang = getenv ("LANG"); + string lang = (szlang)? szlang: "C"; + HelpName = help_name? help_name: Name; + HelpFilename = string ("file://") + datadir + string ("/gnome/help/") + HelpName + string ("-"API_VERSION"/") + lang + string ("/") + HelpName + "-"API_VERSION".xml"; + GFile *file = g_file_new_for_uri (HelpFilename.c_str ()); + bool exists = g_file_query_exists (file, NULL); + g_object_unref (file); + if (!exists) { + HelpFilename = string ("file://") + datadir + string ("/gnome/help/") + HelpName + string ("-"API_VERSION"/C/") + HelpName + "-"API_VERSION".xml"; + } + HelpBrowser = "yelp"; // there is no more key for that + char *dir = g_get_current_dir (); + char *uri = g_filename_to_uri (dir, NULL, NULL); + g_free (dir); + CurDir = uri; + g_free (uri); + if (first_call) { // needed to create several applications in the same program instance + g_set_application_name (name.c_str ()); + first_call = false; + } + gtk_window_set_default_icon_name (icon_name? icon_name: (help_name? help_name: Name.c_str ())); + GdkScreen *screen = gdk_screen_get_default (); + m_ScreenResolution = (unsigned) rint (gdk_screen_get_width (screen) * 25.4 / gdk_screen_get_width_mm (screen)); + m_ImageResolution = m_ScreenResolution; + m_ImageHeight = m_ImageWidth = 300; + m_RecentManager = gtk_recent_manager_get_default (); + + // check supported pixbuf formats + GSList *formats = gdk_pixbuf_get_formats (); + GSList *l = formats; + GdkPixbufFormat *format; + char **mimes; + while (l) { + format = (GdkPixbufFormat*) l->data; + if (gdk_pixbuf_format_is_writable (format)) { + mimes = gdk_pixbuf_format_get_mime_types (format); + m_SupportedPixbufFormats[*mimes] = format; + g_strfreev (mimes); + } + l = l->next; + } + g_slist_free (formats); +} + +Application::~Application () +{ + Apps.erase (this); + if (Apps.empty ()) { + ClearDialogs (); // needed to cleanly stop goffice +#ifdef HAVE_GO_CONF_SYNC + go_conf_free_node (m_ConfDir); + m_ConfDir = NULL; +#endif + libgoffice_shutdown (); + } +} + +void Application::OnHelp (string tag) +{ + if (!HasHelp ()) + return; + char *argv[3] = {NULL, NULL, NULL}; + argv[0] = (char*) HelpBrowser.c_str(); + string path = HelpFilename; + if (tag.length ()) + path += string("#") + HelpName + string ("-") + tag; + argv[1] = (char*) path.c_str (); + g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, NULL); +} + +bool Application::HasHelp () +{ + if (!HelpBrowser.length () || !HelpFilename.length ()) + return false; + GFile *file = g_file_new_for_uri (HelpFilename.c_str ()); + bool exists = g_file_query_exists (file, NULL); + g_object_unref (file); + return exists; +} + +void Application::SetCurDir (char const* dir) +{ + CurDir = dir; +} + +void Application::SetCurDir (string const &dir) +{ + CurDir = dir; +} + +void Application::OnMail (char const *MailAddress) +{ + go_url_show (MailAddress); +} + +void Application::ShowURI (string& uri) +{ + go_url_show (uri.c_str ()); +} + +void Application::OnLiveAssistance () +{ + go_url_show ("irc://irc.gimp.net/gchemutils"); +} + +static void on_res_changed (GtkSpinButton *btn, Application *app) +{ + app->SetImageResolution (gtk_spin_button_get_value_as_int (btn)); +} + +static void on_width_changed (GtkSpinButton *btn, Application *app) +{ + app->SetImageWidth (gtk_spin_button_get_value_as_int (btn)); +} + +static void on_height_changed (GtkSpinButton *btn, Application *app) +{ + app->SetImageHeight (gtk_spin_button_get_value_as_int (btn)); +} + +GtkWidget *Application::GetImageResolutionWidget () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/image-resolution.glade", "res-table", NULL); + GtkWidget *w = glade_xml_get_widget (xml, "screen-lbl"); + char *buf = g_strdup_printf (_("(screen resolution is %u)"), m_ScreenResolution); + gtk_label_set_text (GTK_LABEL (w), buf); + g_free (buf); + w = glade_xml_get_widget (xml, "res-btn"); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), m_ImageResolution); + g_signal_connect (G_OBJECT (w), "value-changed", G_CALLBACK (on_res_changed), this); + w = glade_xml_get_widget (xml, "res-table"); + g_object_unref (G_OBJECT (xml)); + return w; +} + +GtkWidget *Application::GetImageSizeWidget () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/image-size.glade", "size-table", NULL); + GtkWidget *w = glade_xml_get_widget (xml, "width"); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), m_ImageWidth); + g_signal_connect (G_OBJECT (w), "value-changed", G_CALLBACK (on_width_changed), this); + w = glade_xml_get_widget (xml, "height"); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), m_ImageHeight); + g_signal_connect (G_OBJECT (w), "value-changed", G_CALLBACK (on_height_changed), this); + w = glade_xml_get_widget (xml, "size-table"); + return w; +} + +char const *Application::GetPixbufTypeName (string& filename, char const *mime_type) +{ + GdkPixbufFormat *format = m_SupportedPixbufFormats[mime_type]; + char **exts, **ext; + bool found = false; + int i; + if (!format) + return NULL; + // ensure the file name has a valid extension and add the default one if not + exts = gdk_pixbuf_format_get_extensions (format); + ext = exts; + while (*ext) { + i = filename.length() - strlen (*ext); + if ((i > 1) && (filename[i - 1] == '.') && !filename.compare (i, strlen (*ext), *ext)) { + found = true; + break; + } + ext++; + } + if (!found) + filename += string (".") + *exts; + g_strfreev (exts); + return gdk_pixbuf_format_get_name (format); +} + +void Application::RemoveDocument (Document *Doc) +{ + m_Docs.erase (Doc); + if (m_Docs.size () == 0 && gtk_main_level ()) + NoMoreDocsEvent (); +} + +bool Application::Load (std::string const &uri, const gchar *mime_type, Document* Doc) +{ + Loader *l = Loader::GetLoader (mime_type); + if (!l) + return false; + string old_num_locale = setlocale (LC_NUMERIC, NULL); + setlocale (LC_NUMERIC, "C"); + GError *error = NULL; + GsfInput *input = gsf_input_gio_new_for_uri (uri.c_str (), &error); + if (error) { + g_error_free (error); + return false; + } + IOContext *io = gnumeric_io_context_new (gcu_get_cmd_context ()); + bool ret = l->Read (Doc, input, mime_type, io); + g_object_unref (input); + g_object_unref (io); + setlocale (LC_NUMERIC, old_num_locale.c_str ()); + return ret; +} + +bool Application::Save (std::string const &uri, const gchar *mime_type, Document* Doc) +{ + Loader *l = Loader::GetSaver (mime_type); + if (!l) + return false; + string old_num_locale = setlocale (LC_NUMERIC, NULL); + setlocale (LC_NUMERIC, "C"); + GError *error = NULL; + GsfOutput *output = gsf_output_gio_new_for_uri (uri.c_str (), &error); + if (error) { + g_error_free (error); + } + IOContext*io = gnumeric_io_context_new (gcu_get_cmd_context ()); + bool ret = l->Write (Doc, output, mime_type, io); + g_object_unref (output); + g_object_unref (io); + setlocale (LC_NUMERIC, old_num_locale.c_str ()); + return ret; +} + +#ifdef HAVE_GO_CONF_SYNC +GOConfNode *Application::GetConfDir () +{ + if (m_ConfDir == NULL) { + libgoffice_init (); + m_ConfDir = go_conf_get_node (NULL, GCU_CONF_DIR); + } + return m_ConfDir; +} +#endif + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/application.h gnome-chemistry-utils-0.10.9/libs/gcu/application.h --- gnome-chemistry-utils-0.8.6/libs/gcu/application.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/application.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,321 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/application.h + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_APPLICATION_H +#define GCU_APPLICATION_H + +#include "dialog-owner.h" +#include +#include +#include +#ifdef HAVE_GO_CONF_SYNC +# ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +# else +# include +# endif +#endif +#include +#include +#include +#include + +/*!\file*/ +namespace gcu { + +class Document; +class Dialog; + +#define GCU_CONF_DIR "gchemutils" + +/*!\class Application gcu/application.h +This class is a base class for applications. It provides some basic services. +*/ +class Application: virtual public DialogOwner +{ +friend class Document; +friend class Dialog; +public: +/*! +@param name the name of the application. +@param datadir where data for the application are stored. +@param help_name the name to use for the help file (with .xml extension). +If NULL, the name parameter is used. +@param icon_name the name to use for the default icon of all windows. If NULL, +the help_name or name parameters will be used. + +The datadir variable is used to build the full path to the help file: +"file://"+datadir+"/gnome/help/"+name+"/"+LANG+"/"+name".xml". +*/ + Application (std::string name, std::string datadir = DATADIR, char const *help_name = NULL, char const *icon_name = NULL); +/*! +The destructor. +*/ + virtual ~Application (); + +/*! +@param s an optional tag in the help file. +Displays the help file using the file browser retrieved from GConf using the +"/desktop/gnome/applications/help_viewer/exec" key. If a tag is given, it will +be added to the help uri. +For an application named "myapp" and a tag "mytag", the uri will be: +helpfilename\#myapp-mytag. +*/ + void OnHelp (std::string s = ""); +/*! +@return true if both a help browser and a help file are available, false otherwise. +*/ + bool HasHelp (); +/*! +@return the name of the application. Mostly useful to set the icon name of a new window. +*/ + std::string &GetName () {return Name;} + +/*! +@return a GtkWindow if any. Should be overloaded by children classes. +*/ + virtual GtkWindow * GetWindow () {return NULL;} + +/*! +@param filename the uri of the file. +@param mime_type the mime type of the file if known. +@param bSave true if saving, and false if loading. +@param window the current top level window. +@param pDoc an optional document. + +Called by the FileChooser when a file name has been selected. This method does +nothing in the parent class and must be implemented in children classes +if they use the FileChooser. + +@return true if no error occured. +*/ + virtual bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *pDoc = NULL) + {return false;} + +/*! +@return the path to the current directory. +*/ + char const* GetCurDir () {return CurDir.c_str ();} + +/*! +@param dir the path to the new current directory. +*/ + void SetCurDir (char const* dir); + +/*! +@param dir the path to the new current directory. +*/ + void SetCurDir (std::string const &dir); + +/*! +@param uri the uri to display. + +Displays uri in the default web browser if any. +*/ + void ShowURI (std::string& uri); + +/*! +@param uri the uri to the package bugs database. Default value is PACKAGE_BUGREPORT. + +Opens the bugs web page in the default browser if any. +*/ + void OnBug (char const *uri = PACKAGE_BUGREPORT) + {std::string s (uri); ShowURI (s);} + +/*! +@param uri the uri to the main web page of the program. Default value is +"http://gchemutils.nongnu.org/". +*/ + void OnWeb (char const *uri = "http://gchemutils.nongnu.org/") + {std::string s (uri); ShowURI (s);} + +/*! +@param MailAddress the mail adress to which a message will be sent. Defaults to the + Gnome Chemistry Utils main list. + +Creates a new empty message using the default mail if any. +*/ + void OnMail (char const *MailAddress = "mailto:gchemutils-main@nongnu.org"); + +/*! +Attempts to open the \#gchemutils channel at irc.gimp.net. +*/ + void OnLiveAssistance (); + +/*! +@return a GtkWidget for managing pixmap resolution when saving as image. This widget is +intended to be added to a GtkFileChooserDialog. +*/ + GtkWidget *GetImageResolutionWidget (); + +/*! +@return a GtkWidget for managing pixmap width and height when saving as image. This +widget is intended to be added to a GtkFileChooserDialog. +*/ + GtkWidget *GetImageSizeWidget (); + +/*! +@return a std::map of the supported pixbuf formats. Keys are the mime type names. +*/ + std::map &GetSupportedPixbufFormats () {return m_SupportedPixbufFormats;} + +/*! +@param filename the file name. +@param mime_type the file mime type. + +A default extension is appended to filename if none is detected. + +@return the GdkPixbuf name associated to mime_type or NULL if the file type +is not supported by GdkPixbuf. +*/ + char const *GetPixbufTypeName (std::string& filename, char const *mime_type); + +/*! +@param uri the uri of the document to load. +@param mime_type the mime type of the document. +@param Doc the document instance which will contain the loaded data. + +This method loads a document using the appropriate gcu::Loader class +instance. +@return true if no error occurred. +*/ + bool Load (std::string const &uri, const gchar *mime_type, Document* Doc); + +/*! +@param uri the uri to which the document should be saved. +@param mime_type the mime type of the document. +@param Doc the document instance which contains the data to be saved. + +This method saves the document using the appropriate gcu::Loader class +instance. +@return true if no error occurred. +*/ + bool Save (std::string const &uri, const gchar *mime_type, Document* Doc); + +/*! +Virtual method used to create documents. Default behavior does nothing and returns NULL. +@return the newly created document or NULL. +*/ + virtual Document *CreateNewDocument () {return NULL;} + +#ifdef HAVE_GO_CONF_SYNC + +/*! +Method used to retrieve the base configuration node. +@return the base configuration node. +*/ + static GOConfNode *GetConfDir (); +#endif + +protected: + +/*! +This method is called by the framework when all the documents have been removed from +the set of opened documents. The default behavior is to call gtk_main_quit and exit +the program. Derived class might overide this method to change this. +*/ + virtual void NoMoreDocsEvent () {gtk_main_quit ();} + +private: + void AddDocument (Document *Doc) {m_Docs.insert (Doc);} + void RemoveDocument (Document *Doc); + +private: + std::string Name; + std::string HelpName; + std::string HelpBrowser; + std::string HelpFilename; + std::string CurDir; +#ifdef HAVE_GO_CONF_SYNC + static GOConfNode *m_ConfDir; +#endif + +protected: +/*! +std::map of the supported pixbuf formats. Keys are the mime type names. +*/ + std::map m_SupportedPixbufFormats; + +/*!\var m_Docs +The currently opened documents. +*/ +/*!\fn GetDocs() +@return the set of currently opened documents. +*/ +GCU_PROT_PROP (std::set , Docs) +/*!\fn GetScreenResolution() +@return the current screen resolution. +*/ +GCU_RO_PROP (unsigned, ScreenResolution) +/*!\fn SetImageResolution(unsigned ImageResolution) +@param ImageResolution the new image resolution. + +Sets the image resolution used when exporting a pixmap. +Applications can use either the image resolution or the width and height to select +an exported image size, but not both. +*/ +/*!\fn GetImageResolution() +@return the current image resolution used on export. +*/ +/*!\fn GetRefImageResolution() +@return the current image resolution used on export as a reference. +*/ +GCU_PROP (unsigned, ImageResolution) +/*!\fn SetImageWidth(unsigned Width) +@param Width the new image width. + +Sets the image width used when exporting a pixmap. +Applications can use either the image resolution or the width and height to select +an exported image size, but not both. +*/ +/*!\fn GetImageWidth() +@return the current image width used on export. +*/ +/*!\fn GetRefImageWidth() +@return the current image width used on export as a reference. +*/ +GCU_PROP (unsigned, ImageWidth) +/*!\fn SetImageHeight(unsigned Height) +@param Height the new image height. + +Sets the image height used when exporting a pixmap. +Applications can use either the image resolution or the width and height to select +an exported image size, but not both. +*/ +/*!\fn GetImageHeight() +@return the current image height used on export. +*/ +/*!\fn GetRefImageHeight() +@return the current image height used on export as a reference. +*/ +GCU_PROP (unsigned, ImageHeight) +/*!\fn GetRecentManager() +@return the GtkRecentFileManager attached to the application. +*/ +GCU_RO_PROP (GtkRecentManager*, RecentManager) +}; + +} // namespace gcu + +#endif // GCU_APPLICATION_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/atom.cc gnome-chemistry-utils-0.10.9/libs/gcu/atom.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/atom.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/atom.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,327 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * atom.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "element.h" +#include "atom.h" +#include "bond.h" +#include "document.h" +#include "objprops.h" +#include "xml-utils.h" +#include +#include +#include + +using namespace std; + +namespace gcu +{ + +Atom::Atom (): Object (AtomType) +{ + m_Z = -1; + m_x = m_y = m_z = 0.0; + m_Charge = 0; +} + +Atom::~Atom () +{ + m_Bonds.clear (); +} + +Atom::Atom (int Z, double x, double y, double z): + Object (AtomType) +{ + SetZ (Z); + m_x = x; + m_y = y; + m_z = z; + m_Charge = 0; +} + +Atom::Atom (Atom& a): + Object (AtomType) +{ + SetZ (a.m_Z); + m_x = a.m_x; + m_y = a.m_y; + m_z = a.m_z; + m_Charge = a.m_Charge; +} + +Atom& Atom::operator= (Atom& a) +{ + SetZ (a.m_Z); + m_x = a.m_x; + m_y = a.m_y; + m_z = a.m_z; + m_Charge = a.m_Charge; + return *this ; +} + +void Atom::SetZ (int Z) +{ + m_Z = Z; +} + +double Atom::Distance (Atom* pAtom) +{ + return sqrt (square (m_x - pAtom->m_x) + square (m_y - pAtom->m_y) + square (m_z - pAtom->m_z)); +} + +void Atom::zoom (double ZoomFactor) +{ + m_x *= ZoomFactor; + m_y *= ZoomFactor; + m_z *= ZoomFactor; +} + +bool Atom::GetCoords (double *x, double *y, double *z) const +{ + if (!x || !y) + return false; + *x = m_x; + *y = m_y; + if (z) + *z = m_z; + return true; +} + +const gchar* Atom::GetSymbol () const +{ + Element* Elt = Element::GetElement(m_Z); + return (Elt)? Element::Symbol(m_Z): NULL; +} + +void Atom::AddBond (Bond* pBond) +{ + m_Bonds[pBond->GetAtom (this)] = pBond; +} + +void Atom::RemoveBond (Bond* pBond) +{ + m_Bonds.erase (pBond->GetAtom (this)); +} + +Bond* Atom::GetFirstBond (map::iterator& i) +{ + i = m_Bonds.begin (); + if (i == m_Bonds.end ()) + return NULL; + return (*i).second; +} + +Bond* Atom::GetNextBond (map::iterator& i) +{ + i++; + if (i == m_Bonds.end()) + return NULL; + return (*i).second; +} + +void Atom::Move (double x, double y, double z) +{ + m_x += x; + m_y += y; + m_z += z; +} + +void Atom::Transform2D (Matrix2D& m, double x, double y) +{ + m_x -= x; + m_y -= y; + m.Transform (m_x, m_y); + m_x += x; + m_y += y; +} + +xmlNodePtr Atom::Save (xmlDocPtr xml) const +{ + xmlNodePtr parent; + gchar buf[16]; + parent = xmlNewDocNode (xml, NULL, (xmlChar*) "atom", NULL); + if (!parent) + return NULL; + SaveId (parent); + + if (m_Z) { + strncpy(buf, GetSymbol(), sizeof(buf)); + xmlNewProp(parent, (xmlChar*) "element", (xmlChar*) buf); + } + + if (m_Charge) { + snprintf (buf, sizeof (buf), "%d", m_Charge); + xmlNewProp (parent, (xmlChar*) "charge", (xmlChar*) buf); + } + if (!WritePosition (xml, parent, NULL, m_x, m_y, m_z)) { + xmlFreeNode (parent); + return NULL; + } + if (!SaveNode (xml, parent)) { + xmlFreeNode (parent); + return NULL; + } + return parent; +} + +bool Atom::Load (xmlNodePtr node) +{ + char* tmp; + tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId (tmp); + xmlFree (tmp); + } + tmp = (char*) xmlGetProp (node, (xmlChar*) "element"); + if (tmp) { + m_Z = Element::Z(tmp); //Don't check if element exists. Applications that do not accept unknown elements should check + xmlFree (tmp); + } + tmp = (char*) xmlGetProp (node, (xmlChar*) "charge"); + if (tmp) { + m_Charge = (char) atoi (tmp); + xmlFree (tmp); + } else + m_Charge = 0; + if (!ReadPosition (node, NULL, &m_x, &m_y, &m_z) || (!LoadNode (node))) + return false; + return true; +} + +bool Atom::LoadNode (xmlNodePtr node) +{ + return true; +} + +bool Atom::SaveNode (xmlDocPtr xml, xmlNodePtr node) const +{ + return true; +} + +Bond* Atom::GetBond (Atom* pAtom) const +{ + std::map::const_iterator i; + i = m_Bonds.find (pAtom); + return (i != m_Bonds.end ())? (*i).second: NULL; +} + +bool Atom::SetProperty (unsigned property, char const *value) +{ + switch (property) { + case GCU_PROP_POS2D: { + double x, y; + sscanf (value, "%lg %lg", &x, &y); + Document *doc = GetDocument (); + if (doc) { + x *= doc->GetScale (); + y *= doc->GetScale (); + } + SetCoords (x, y); + break; + } + case GCU_PROP_ID: { + char *Id = (*value == 'a')? g_strdup (value): g_strdup_printf ("a%s", value); + SetId (Id); + break; + } + case GCU_PROP_ATOM_SYMBOL: + SetZ (Element::Z (value)); + break; + case GCU_PROP_ATOM_Z: + SetZ (atoi (value)); + break; + case GCU_PROP_ATOM_CHARGE: + SetCharge (atoi (value)); + break; + } + return true; +} + +string Atom::GetProperty (unsigned property) const +{ + ostringstream res; + switch (property) { + case GCU_PROP_POS2D: { + Document *doc = const_cast (this)->GetDocument (); + if (doc) + res << m_x / doc->GetScale () << " " << m_y / doc->GetScale (); + else + res << m_x << " " << m_y; + break; + } + default: + return Object::GetProperty (property); + } + return res.str (); +} + +bool Atom::IsInCycle (Cycle* pCycle) +{ + map::iterator i, end = m_Bonds.end (); + for (i = m_Bonds.begin (); i != end; i++) + if (((Bond*) (*i).second)->IsInCycle (pCycle)) + return true; + return false; +} + +bool Atom::Match (Atom *atom, AtomMatchState &state) +{ + if (m_Z != atom->m_Z) + return false; + if (m_Bonds.size () != atom->m_Bonds.size ()) + return false; + unsigned n = state.mol1.size (); + // add the atoms to state + state.mol1[this] = n; + state.mol2[atom] = n; + state.atoms[n] = AtomPair (this, atom); + // compare bonded atoms + map::iterator i, iend = m_Bonds.end (); + map::iterator j, jend = atom->m_Bonds.end (); + for (i = m_Bonds.begin (); i != iend; i++) { + if (state.mol1.find ((*i).first) != state.mol1.end ()) + continue; /* may be not enough: we might search which atom is + associated with this one and see if it is effectively + bonded to *atom */ + for (j = atom->m_Bonds.begin (); j != jend; j++) { + if (state.mol2.find ((*j).first) != state.mol2.end ()) + continue; + if ((*i).first->Match ((*j).first, state)) + break; + } + if (j == jend) + break; // no matching atom has been fond; + } + if (i == iend) + return true; + // if we are there, something wrong happened, clean and return + unsigned max = state.mol1.size (); + for (unsigned i = n; i < max; i++) { + state.mol1.erase (state.atoms[n].atom1); + state.mol2.erase (state.atoms[n].atom2); + } + return false; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/atom.h gnome-chemistry-utils-0.10.9/libs/gcu/atom.h --- gnome-chemistry-utils-0.8.6/libs/gcu/atom.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/atom.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,338 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * atom.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_ATOM_H +#define GCU_ATOM_H + +#include "object.h" +#include +#include +#include + +/*!\file*/ +namespace gcu +{ + +class Bond; +class Cycle; +class AtomMatchState; + +/*!\class Atom gcu/atom.h +This class is used to represent atoms. + +*/ +class Atom: public Object +{ +public: +/*! +The default constructor. Creates an atom with atomic number set to 0. +*/ + Atom (); +/*! +@param Z the atomic number of the new atom. +@param x the x coordinate of the new atom. +@param y the y coordinate of the new atom. +@param z the z coordinate of the new atom. + +Creates an atom. +*/ + Atom (int Z, double x, double y, double z = 0.); +/*! +@param a the Atom to duplicate. + +Creates a new atom identical to a without any bond. +*/ + Atom (Atom& a); +/*! +@param a the Atom to copy. + +@return an Atom identical to a without any bond. +*/ + Atom& operator= (Atom& a); +/*! +The destructor of Atom. It removes bonds but do not delete the associated Bond instances. +*/ + virtual ~Atom (); + +public : +/*! +@param pAtom a pointer to an Atom. +@return the distance between the Atom at pAtom and this Atom. +*/ + double Distance (Atom* pAtom); +/*! +@param ZoomFactor the zoom factor. + +Multiplies all three coordinates of this Atom by ZoomFactor. +*/ + void zoom (double ZoomFactor); +/*! +@param x a pointer to the double value which will receive the x coordinate of the Atom. +@param y a pointer to the double value which will receive the y coordinate of the Atom. +@param z a pointer to the double value which will receive the z coordinate of the Atom or NULL for 2D representations. + +Retrieves the coordinates of this Atom. +@return true if successful and false if an error occurs (if x or y is NULL). +*/ + virtual bool GetCoords (double *x, double *y, double *z = NULL) const; +/*! +@param x the new x coordinate of the Atom. +@param y the new y coordinate of the Atom. +@param z the new z coordinate of the Atom. + +Changes the position of this Atom. +*/ + void SetCoords (double x, double y, double z = 0) {m_x = x; m_y = y; m_z = z;} +/*! +@return the atomic number of the atom. +*/ + int GetZ () const {return m_Z;} +/*! +@param Z the new atomic number of the Atom. + +This method might be overrided by derived class since changing the atomic number generally changes most properties. +The default behavior is just to change the atomic number and nothing else. +*/ + virtual void SetZ (int Z); +/*! +@param Charge the new formal charge of the Atom. + +Changes the formal charge of this Atom. +*/ + virtual void SetCharge (char Charge) {m_Charge = Charge;} +/*! +@return the formal charge of this Atom. +*/ + char GetCharge () {return m_Charge;} +/*! +@return the atomic symbol of this Atom or NULL if the element is unknown. +*/ + virtual const gchar* GetSymbol () const; +/*! +@param pBond a pointer to the new Bond to this Atom. + +Adds a Bond. +*/ + virtual void AddBond (Bond* pBond); +/*! +@param pBond a pointer to the Bond to remove from this Atom. + +Removes a Bond. +*/ + virtual void RemoveBond (Bond* pBond); +/*! +@return the x coordinate of this Atom. +*/ + double x () const {return m_x;} +/*! +@return the y coordinate of this Atom. +*/ + double y () const {return m_y;} +/*! +@return the z coordinate of this Atom. +*/ + double z () const {return m_z;} +/*! +@param i a C++ std::map iterator. + +Use this function to retrieve the first Bond of this Atom and initialize the iterator. +@return the first Bond of this Atom or NULL if the Atom has is not bonded. +*/ + Bond* GetFirstBond (std::map::iterator& i); +/*! +@param i a C++ std::map iterator initialized by Atom::GetFirstBond. + +Use this method to iterate through the list of Bond instances of this Atom. +@return the next Bond of this Atom or NULL. +*/ + Bond* GetNextBond (std::map::iterator& i); +/*! +@param pAtom a pointer to an Atom instance. +@return a pointer to the Bond shared by pAtom and this Atom if it exists or NULL. +*/ + Bond* GetBond (Atom* pAtom) const; +/*! +@return the number of Bond instances shared by this Atom. It does not take multiplicity of bonds into account. +*/ + int GetBondsNumber () const {return m_Bonds.size();} +/*! +@param xml the xmlDoc used to save the document. +@return a pointer to the xmlNode representing this Atom or NULL if an error occured. +*/ + virtual xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node a pointer to the xmlNode containing the serialized Atom. + +Loads an atom from an xmlNode. +*/ + virtual bool Load (xmlNodePtr node); +/*! +@param node a pointer to the xmlNode containing the serialized Atom. + +This virtual method is called at the end of the Atom::Load method. The default behavior is to do nothing. +It might be overrided for derived class when it is not convenient to override the Atom::Load method. +*/ + virtual bool LoadNode (xmlNodePtr node); +/*! +@param xml the xmlDoc used to save the document. +@param node a pointer to the xmlNode to which this Atom is serialized. + +This virtual method is called at the end of the Atom::Save method. The default behavior is to do nothing. +It might be overrided for derived class when it is not convenient to override the Atom::Save method. +*/ + virtual bool SaveNode (xmlDocPtr xml, xmlNodePtr node) const; +/*! +@param x the x component of the transation vector. +@param y the y component of the transation vector. +@param z the z component of the transation vector. + +Used to move an Atom. +*/ + virtual void Move (double x, double y, double z = 0.); +/*! +@param m the 2D Matrix of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Used to move and/or transform an atom. +*/ + virtual void Transform2D (Matrix2D& m, double x, double y); + +/*! +@param property the identity of the property as defined in objprops.h. +@param value the value of the property as a string. + +Used by the gcu::Loader mechanism to load properties of atoms. +@return true on success. +*/ + bool SetProperty (unsigned property, char const *value); + +/*! +@param property the identity of the property as defined in objprops.h. + +Used by the gcu::Loader mechanism to retrieve properties of atoms. +@return the value of the property as a string. +*/ + std::string GetProperty (unsigned property) const; + +/*! +@param pCycle a cycle in which the atom might be. + +@return true if the atom lies in the cycle, false otherwise. +*/ + bool IsInCycle (Cycle* pCycle); + +/*! +@param atom the atom to which the this instance is to be compared. +@param state the AtomMatchState representing the current comparison state. + +Try to match atoms from two molecules which are compared. This function calls +itself recursively until all atoms from the two molecules have been matched or +until an difference is found. Overriden methods should call this base function +and return its result. +@return true if the atoms match, false otherwise. +*/ + virtual bool Match (Atom *atom, AtomMatchState &state); + +protected: +/*! +The atomic number of the Atom. +*/ + int m_Z; +/*! +The x coordinate of the Atom. +*/ + double m_x; +/*! +The x coordinate of the Atom. +*/ + double m_y; +/*! +The x coordinate of the Atom. +*/ + double m_z; +/*! +The charge of the Atom. +*/ + char m_Charge; +/*! +The Bond instances of the Atom. The index of the map is a pointer to the other end of the Bond. +*/ + std::map m_Bonds; +}; + +/*!\class AtomPair gcu/atom.h +This class stores atoms pairs. It is used when comparing two molecules. + +*/ + +class AtomPair { +public: + +/*! +@param at1 the first atom in the pair. +@param at2 the second atom in the pair. + +Constructs the atoms pair from two atoms. +*/ + AtomPair (Atom *at1, Atom *at2) {atom1 = at1; atom2 = at2;} + +/*! +The first atom of the pair. +*/ + Atom *atom1; + +/*! +The second atom of the pair. +*/ + Atom *atom2; +}; + +/*!\class AtomMatchState gcu/atom.h +This class is used when comparing molecules to store lists of corresponding atoms. + +*/ + +class AtomMatchState +{ +public: + +/*! +This map gives the index of atoms from the first molecule in gcu::AtomMatchState::atoms. +*/ + std::map mol1; + +/*! +This map gives the index of atoms from the second molecule in gcu::AtomMatchState::atoms. +*/ + std::map mol2; + +/*! +The array of matched atoms. +*/ + std::vector atoms; +}; + +} //namespace gcu +#endif // GCU_ATOM_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/bond.cc gnome-chemistry-utils-0.10.9/libs/gcu/bond.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/bond.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/bond.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,304 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * bond.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "bond.h" +#include "atom.h" +#include "objprops.h" +#include + +namespace gcu +{ + +Bond::Bond(): Object(BondType) +{ + m_Begin = NULL; + m_End = NULL; + m_order = 0; +} + +Bond::Bond(Atom* first, Atom* last, unsigned char order): Object(BondType) +{ + m_Begin = first; + m_End = last; + m_order = order; + first->AddBond(this); + last->AddBond(this); +} + +Bond::~Bond() +{ +} + +Atom* Bond::GetAtom(int which) const +{ + switch (which) + { + case 0: return m_Begin; + case 1: return m_End; + default: return NULL; + } +} + +Atom* Bond::GetAtom(Atom* pAtom, int which) const +{ + return (pAtom == m_Begin)? m_End: (pAtom == m_End)? m_Begin: NULL; +} + +unsigned char Bond::GetOrder() const +{ + return m_order; +} + +void Bond::SetOrder(unsigned char Order) +{ + m_order = Order; +} + +xmlNodePtr Bond::Save(xmlDocPtr xml) const +{ + xmlNodePtr parent; + gchar buf[16]; + parent = xmlNewDocNode(xml, NULL, (xmlChar*)"bond", NULL); + if (!parent) return NULL; + + SaveId(parent); + + buf[0] = m_order + '0'; + buf[1] = 0; + xmlNewProp(parent, (xmlChar*)"order", (xmlChar*)buf); + + if (m_Begin) + xmlNewProp (parent, (xmlChar*) "begin", (xmlChar*) m_Begin->GetId ()); + + + if (m_End) + xmlNewProp (parent, (xmlChar*) "end", (xmlChar*) m_End->GetId ()); + + if (!SaveNode(xml, parent)) {xmlFreeNode(parent); return NULL;} + return parent; +} + +bool Bond::Load (xmlNodePtr node) +{ + char* tmp; + xmlNodePtr child; + Object* pObject; + tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId (tmp); + xmlFree (tmp); + } + tmp = (char*) xmlGetProp (node, (xmlChar*) "order"); + if (!tmp) m_order = 1; + else { + m_order = *tmp - '0'; + xmlFree (tmp); + } + if (m_order > 4) + return false; + tmp = (char*) xmlGetProp (node, (xmlChar*) "begin"); + if (!tmp) { + child = GetNodeByName(node, "begin"); + tmp = (char*) xmlNodeGetContent(child); //necessary to read version 0.1.0 files + if (!tmp) + return false; + } + pObject = GetParent ()->GetDescendant (tmp); + xmlFree (tmp); + if (!pObject || (!dynamic_cast (pObject))) + return false; + m_Begin = (Atom*)(pObject); + tmp = (char*) xmlGetProp (node, (xmlChar*) "end"); + if (!tmp) { + child = GetNodeByName (node, "end"); + tmp = (char*) xmlNodeGetContent (child); //necessary to read version 0.1.0 files + if (!tmp) + return false; + } + pObject = GetParent ()->GetDescendant (tmp); + xmlFree (tmp); + if (!pObject || (!dynamic_cast (pObject))) + return false; + m_End = (Atom*)pObject; + bool result = LoadNode (node); + m_Begin->AddBond (this); + m_End->AddBond (this); + return result; +} + +bool Bond::LoadNode(xmlNodePtr) +{ + return true; +} + +bool Bond::SaveNode(xmlDocPtr, xmlNodePtr) const +{ + return true; +} + +void Bond::IncOrder(int n) +{ + m_order += n; + if (m_order > 4) m_order %= 4; +} + +void Bond::Move(double x, double y, double z) +{ +} + +void Bond::Transform2D(Matrix2D& m, double x, double y) +{ +} + +bool Bond::SetProperty (unsigned property, char const *value) +{ + switch (property) { + case GCU_PROP_ID: { + char *Id = g_strdup_printf ("b%s", value); + SetId (Id); + break; + } + case GCU_PROP_BOND_BEGIN: { + char *tmp = g_strdup_printf ("a%s", value); + Object *pObject = GetParent ()->GetDescendant (tmp); + g_free (tmp); + if (!pObject || (!dynamic_cast (pObject))) + return false; + m_Begin = (Atom*) pObject; + if (m_End) { + m_Begin->AddBond (this); + m_End->AddBond (this); + } + break; + } + case GCU_PROP_BOND_END: { + char *tmp = g_strdup_printf ("a%s", value); + Object *pObject = GetParent ()->GetDescendant (tmp); + g_free (tmp); + if (!pObject || (!dynamic_cast (pObject))) + return false; + m_End = (Atom*) pObject; + if (m_Begin) { + m_Begin->AddBond (this); + m_End->AddBond (this); + } + break; + } + case GCU_PROP_BOND_ORDER: + m_order = atoi (value); + if (m_Begin && m_End) { + m_Begin->AddBond (this); + m_End->AddBond (this); + } + break; + } + return true; +} + +void Bond::AddCycle (Cycle* pCycle) +{ + m_Cycles.push_back (pCycle); +} + +void Bond::RemoveCycle (Cycle* pCycle) +{ + m_Cycles.remove (pCycle); +} + +void Bond::RemoveAllCycles () +{ + m_Cycles.clear (); +} + +Cycle* Bond::GetFirstCycle (std::list::iterator& i, Cycle * pCycle) +{ + i = m_Cycles.begin (); + return GetNextCycle (i, pCycle); +} + +Cycle* Bond::GetNextCycle (std::list::iterator& i, Cycle * pCycle) +{ + if (*i == pCycle) + i++; + if (i == m_Cycles.end ()) + return NULL; + pCycle = *i; + i++; + return pCycle; +} + +bool Bond::IsInCycle (Cycle* pCycle) +{ + std::list::iterator i, end = m_Cycles.end (); + for (i = m_Cycles.begin (); i != end; i++) + if ((*i) == pCycle) + return true; + return false; +} + +double Bond::Get2DLength () +{ + double x1, y1, x2, y2; + m_Begin->GetCoords (&x1, &y1); + m_End->GetCoords (&x2, &y2); + return sqrt (square (x1 - x2) + square (y1 - y2)); +} + +double Bond::GetAngle2DRad (Atom* pAtom) +{ + double x1, y1, x2, y2; + m_Begin->GetCoords (&x1, &y1); + m_End->GetCoords (&x2, &y2); + x2 -= x1; + y2 -= y1; + double length = square (x2) + square (y2); + if (length == 0.0) + return HUGE_VAL; + if (pAtom == m_Begin) + return atan2 (-y2, x2); + else if (pAtom == m_End) + return atan2 (y2, -x2); + return HUGE_VAL; +} + +bool Bond::ReplaceAtom (Atom* oldAtom, Atom* newAtom) +{ + if (oldAtom == m_Begin) { + if (m_End) + m_End->RemoveBond (this); + m_Begin = newAtom; + if (m_Begin && m_End) + m_End->AddBond (this); + } else if (oldAtom == m_End) { + if (m_Begin) + m_Begin->RemoveBond (this); + m_End = newAtom; + if (m_Begin && m_End) + m_Begin->AddBond (this); + } + return true; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/bond.h gnome-chemistry-utils-0.10.9/libs/gcu/bond.h --- gnome-chemistry-utils-0.8.6/libs/gcu/bond.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/bond.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,233 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * bond.h + * + * Copyright (C) 2002-2008 Jean Brfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_BOND_H +#define GCU_BOND_H + +#include +#include "object.h" + +/*!\file*/ +namespace gcu +{ + +class Atom; +class Cycle; + +/*!\class Bond gcu/bond.h +This class is used to represent bonds. + +*/ +class Bond: public Object +{ +public: +/*! +The default constructor. Creates a bond with order set to 0. +*/ + Bond (); +/*! +@param first a pointer to the first Atom instance of the bond. +@param last a pointer to the last Atom instance of the bond. +@param order the order of the new bond. + +The distinction between first and last is important mostly for stereobonds. The Bond instance is created +and adds itself to the two atoms calling Atom::AddBond. +*/ + Bond (Atom* first, Atom* last, unsigned char order); +/*! +The destructor of Bond. +*/ + virtual ~Bond (); + +/*! +@param which the index of the Atom instance to be returned. + +@return a pointer to the Atom instance: first Atom if which is 0, last if which is 1 or NULL. +*/ + virtual Atom* GetAtom (int which) const; //0 = first, 1 = last, others reserved (for multicentered bonds?) +/*! +@param pAtom a pointer to an Atom instance. +@param which an index which might be used for multicentered bonds (not supported); the default value should +always be used even if the implementation does not use it in this version. +@return the last atom if pAtom is the first, the first if pAtom is the last or NULL if pAtom is not concerned by this Bond. +*/ + virtual Atom* GetAtom (Atom* pAtom, int which = 0) const; //"which" is just a place holder for multicenter bonds; returns an atom different from pAtom + //i.e. the other end of the bond +/*! +@return the Bond order. +*/ + unsigned char GetOrder () const; +/*! +@param Order the new bond order. + +The value used is not checked. Should be a significant value (1 to 3, exceptionally 4). +*/ + void SetOrder (unsigned char Order); +/*! +@param xml the xmlDoc used to save the document. +@return a pointer to the xmlNode representing this Bond or NULL if an error occured. +*/ + virtual xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node a pointer to the xmlNode containing the serialized Bond. + +Loads a bond from an xmlNode. +*/ + virtual bool Load (xmlNodePtr node); +/*! +@param n the increment to add to the bond order + +If the resulting bond order is greater than 4, the remainder of the division by 4 is retained. +*/ + virtual void IncOrder (int n = 1); +/*! +@param node a pointer to the xmlNode containing the serialized Bond. + +This virtual method is called at the end of the Bond::Load method. The default behavior is to do nothing. +It might be overrided for derived class when it is not convenient to override the Bond::Load method. +*/ + virtual bool LoadNode (xmlNodePtr node); +/*! +@param xml the xmlDoc used to save the document. +@param node a pointer to the xmlNode to which this Bond is serialized. + +This virtual method is called at the end of the Bond::Save method. The default behavior is to do nothing. +It might be overrided for derived class when it is not convenient to override the Bond::Save method. +*/ + virtual bool SaveNode (xmlDocPtr xml, xmlNodePtr node) const; +/*! +@param x the x component of the transation vector. +@param y the y component of the transation vector. +@param z the z component of the transation vector. + +Does nothing. Just a slight optimization to avoid execution of Object::Move +*/ + virtual void Move (double x, double y, double z = 0.); +/*! +@param m the 2D Matrix of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Does nothing. Just a slight optimization to avoid execution of Object::Transform2D +*/ + virtual void Transform2D (Matrix2D& m, double x, double y); + +/*! +@param property the identity of the property as defined in objprops.h. +@param value the value of the property as a string. + +Used by the gcu::Loader mechanism to load properties of bonds. +@return true on success. +*/ + bool SetProperty (unsigned property, char const *value); + +/*! +@param pCycle a cycle to add to the list. +*/ + virtual void AddCycle (Cycle* pCycle); + +/*! +@param pCycle a cycle to remove from the list. +*/ + virtual void RemoveCycle (Cycle* pCycle); + +/*! +Clears the bond cycles list. +*/ + virtual void RemoveAllCycles (); + +/*! +@return the number of cycles to which the bond belongs. +*/ + unsigned IsCyclic () {return m_Cycles.size ();} + +/*! +@param i a C++ std::map iterator. +@param pCycle a cycle. + +@return the first cycle to which the bond belongs, excluding the one passed +as second argument. +*/ + Cycle* GetFirstCycle (std::list::iterator& i, Cycle * pCycle); + +/*! +@param i a C++ std::map iterator initialized by Bond::GetFirstCycle. +@param pCycle a cycle. + +@return the next cycle to which the bond belongs, excluding the one passed +as second argument. +*/ + Cycle* GetNextCycle (std::list::iterator& i, Cycle * pCycle); + +/*! +@param pCycle a cycle in which the bond might be. + +@return true if the bond is in the cycle. +*/ + bool IsInCycle (Cycle* pCycle); + +/*! +@return the length of the bond when projected to the xy plane. +*/ + double Get2DLength (); + +/*! +@param pAtom one of the atoms of the bond. + +@return the direction of the bond starting from the atom. +*/ + double GetAngle2DRad (Atom* pAtom); + +/*! +@param oldAtom the atom to replace. +@param newAtom the new atom. + +To sucess, this needs that the new atom can accpt all the bonds from the old one. +@return true on success. +*/ + bool ReplaceAtom (Atom* oldAtom, Atom* newAtom); + +protected: +/*! +The order of the bond. +*/ + unsigned char m_order; +/*! +A pointer to the first Atom instance of the Bond. +*/ + Atom *m_Begin; +/*! +A pointer to the last Atom instance of the Bond. +*/ + Atom *m_End;// only 2 centered bonds, other bonds should be covered by derived classes + +/*! +The gcu::Cycle instnces to which the bond pertains. +*/ + std::list m_Cycles; +}; + +} // namespace gcu + +#endif // GCU_BOND_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/chain.cc gnome-chemistry-utils-0.10.9/libs/gcu/chain.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/chain.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/chain.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,293 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * libs/gcu/chain.cc + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "atom.h" +#include "bond.h" +#include "chain.h" +#include "cycle.h" +#include "molecule.h" +#include "document.h" + +using namespace std; + +namespace gcu { + +Chain::Chain (Bond* pBond, Atom* pAtom, TypeId Type): Object (Type) +{ + Atom *pAtom0; + if (pAtom) + pAtom0 = (Atom*) pBond->GetAtom (pAtom); + else { + pAtom0 = (Atom*) pBond->GetAtom (1); + pAtom = (Atom*) pBond->GetAtom (0); + } + m_Bonds[pAtom].fwd = pBond; + m_Bonds[pAtom0].rev = pBond; +} + +Chain::Chain (Molecule* molecule, Atom* pAtom, TypeId Type): Object (Type) +{ + m_Molecule = molecule; + if (pAtom) { + FindCycles (pAtom); + } +} + +/* +* Add a bond in an existing molecule and update cycles +* Implementation might have to be changed +*/ +Chain::Chain (Molecule* molecule, Bond* pBond, TypeId Type): Object (Type) +{ + m_Molecule = molecule; + if (pBond) { + Atom *pAtom0, *pAtom; + pAtom0 = (Atom*) pBond->GetAtom (0); + m_Bonds[pAtom0].fwd = pBond; + pAtom = (Atom*) pBond->GetAtom (1); + m_Bonds[pAtom].rev = pBond; + map::iterator i; + Bond* pBond0 = (Bond*) pAtom->GetFirstBond (i); + while (pBond0) { + if ((pBond0 != pBond) && FindCycle (pAtom, pBond0)) + break; + pBond0 = (Bond*) pAtom->GetNextBond (i); + } + } +} + +Chain::~Chain () +{ + m_Bonds.clear (); +} + +bool Chain::FindCycle (Atom* pAtom, Bond* pBond) +{ + Atom* pAtom1 = (Atom*) pBond->GetAtom (pAtom); + if (m_Bonds[pAtom1].fwd != NULL) { + if (m_Bonds[pAtom1].rev != NULL) + return false; + Cycle* pCycle = new Cycle (m_Molecule); + pCycle->m_Bonds[pAtom1].rev = pBond; + pCycle->m_Bonds[pAtom1].fwd = m_Bonds[pAtom1].fwd; + pCycle->m_Bonds[pAtom].fwd = pBond; + pCycle->m_Bonds[pAtom].rev= m_Bonds[pAtom].rev; + m_Bonds[pAtom].rev->AddCycle (pCycle); + pBond->AddCycle (pCycle); + while (pBond = pCycle->m_Bonds[pAtom1].fwd, pAtom1 = (Atom*) pBond->GetAtom (pAtom1), pAtom != pAtom1) { + pCycle->m_Bonds[pAtom1].rev = pBond; + pCycle->m_Bonds[pAtom1].fwd = m_Bonds[pAtom1].fwd; + pBond->AddCycle (pCycle); + } + pCycle->Simplify (); //to reduce size of fused cycles + return true; + } + m_Bonds[pAtom].fwd = pBond; + m_Bonds[pAtom1].rev = pBond; + map::iterator i; + Bond* pBond1 = (Bond*) pAtom1->GetFirstBond (i); + while (pBond1) { + if ((pBond1 != pBond) && FindCycle (pAtom1, pBond1)) + return true; + pBond1 = (Bond*) pAtom1->GetNextBond (i); + } + m_Bonds[pAtom].fwd = NULL; + m_Bonds.erase (pAtom1); + return false; +} + +void Chain::FindCycles (Atom* pAtom) +{ + map::iterator i; + Bond* pBond = (Bond*) pAtom->GetFirstBond (i); + Atom* pAtom0; + while (pBond != NULL) { + m_Bonds[pAtom].fwd = pBond; + pAtom0 = (Atom*) pBond->GetAtom (pAtom); + if (pBond->GetMolecule () != m_Molecule) { + m_Molecule->AddChild (pBond); + } + if ((pAtom0)->GetMolecule () != m_Molecule) { + if (pAtom0->GetMolecule () != m_Molecule) + m_Molecule->AddChild (pAtom0); + FindCycles (pAtom0); + } else { + if (m_Bonds[pAtom0].fwd != NULL) { + Bond* pBond0 = m_Bonds[pAtom0].fwd; + if (pAtom != pBond0->GetAtom (pAtom0)) { + //Cycle found + Cycle* pCycle = new Cycle (m_Molecule); + pCycle->m_Bonds[pAtom0].rev = pBond; + pCycle->m_Bonds[pAtom0].fwd = pBond0; + pBond0->AddCycle (pCycle); + while (pAtom != pAtom0) { + pAtom0 = (Atom*) pBond0->GetAtom (pAtom0); + pCycle->m_Bonds[pAtom0].rev = pBond0; + pBond0 = m_Bonds[pAtom0].fwd; + pCycle->m_Bonds[pAtom0].fwd = pBond0; + pBond0->AddCycle (pCycle); + } + pCycle->Simplify (); //to reduce size of fused cycles + } + } + } + pBond = (Bond*) pAtom->GetNextBond (i); + } + m_Bonds.erase (pAtom); +} + +void Chain::Reverse () +{ + map::iterator i, end = m_Bonds.end (); + Bond* pBond; + for (i = m_Bonds.begin (); i != end; i++) { + pBond = (*i).second.fwd; + (*i).second.fwd = (*i).second.rev; + (*i).second.rev = pBond; + } +} + +void Chain::Erase (Atom* pAtom1, Atom* pAtom2) +{ +//This function is not safe + Atom *pAtom = (Atom*) m_Bonds[pAtom1].fwd->GetAtom (pAtom1), *pAtom0; + m_Bonds[pAtom1].fwd = NULL; + while (pAtom != pAtom2) { + pAtom = (Atom*) m_Bonds[pAtom].fwd->GetAtom (pAtom0 = pAtom); + m_Bonds.erase (pAtom0); + } + m_Bonds[pAtom2].rev = NULL; +} + +void Chain::Insert (Atom* pAtom1, Atom* pAtom2, Chain& chain) +{ +//This function is not safe + m_Bonds[pAtom1].fwd = chain.m_Bonds[pAtom1].fwd; + Atom *pAtom = (Atom*) m_Bonds[pAtom1].fwd->GetAtom (pAtom1); + while (pAtom != pAtom2) { + m_Bonds[pAtom] = chain.m_Bonds[pAtom]; + pAtom = (Atom*) m_Bonds[pAtom].fwd->GetAtom (pAtom); + } + m_Bonds[pAtom2].rev = chain.m_Bonds[pAtom2].rev; +} + +void Chain::Extract (Atom* pAtom1, Atom* pAtom2, Chain& chain) +{ + chain.m_Bonds.clear (); + if (m_Bonds[pAtom1].fwd == NULL) { + if (m_Bonds[pAtom1].rev == NULL) + m_Bonds.erase (pAtom1); //pAtom1 is not in the chain + return; + } + chain.m_Bonds[pAtom1].fwd = m_Bonds[pAtom1].fwd; + chain.m_Bonds[pAtom1].rev = NULL; + Atom *pAtom = (Atom*) chain.m_Bonds[pAtom1].fwd->GetAtom (pAtom1); + while (pAtom != pAtom2) { + chain.m_Bonds[pAtom] = m_Bonds[pAtom]; + if (m_Bonds[pAtom].fwd == NULL) + return; //Chain never reach pAtom2 + pAtom = (Atom*)m_Bonds[pAtom].fwd->GetAtom (pAtom); + } + chain.m_Bonds[pAtom2].rev = m_Bonds[pAtom2].rev; + chain.m_Bonds[pAtom2].fwd = NULL; +} + +unsigned Chain::GetUnsaturations () +{ + unsigned n = 0; + std::map::iterator i, end = m_Bonds.end (); + for (i = m_Bonds.begin (); i != end; i++) + if ((*i).second.fwd && ((*i).second.fwd->GetOrder () > 1)) + n += 1; + return n; +} + +unsigned Chain::GetHeteroatoms () +{ + unsigned n = 0; + std::map::iterator i, end = m_Bonds.end (); + for (i = m_Bonds.begin (); i != end; i++) + if ((*i).first->GetZ () != 6) + n += 1; + return n; +} + +void Chain::AddBond (Atom* start, Atom* end) +{ + Bond* pBond = (Bond*) start->GetBond (end); + m_Bonds[start].fwd = pBond; + m_Bonds[end].rev = pBond; +} + +bool Chain::Contains (Atom* pAtom) +{ + if ((m_Bonds[pAtom].fwd == NULL) && (m_Bonds[pAtom].rev == NULL)) { + m_Bonds.erase (pAtom); + return false; + } + return true; +} + +bool Chain::Contains (Bond* pBond) +{ + Atom *pAtom = (Atom*) pBond->GetAtom (0); + if ((m_Bonds[pAtom].fwd == NULL) && (m_Bonds[pAtom].rev == NULL)) { + m_Bonds.erase (pAtom); + return false; + } + if ((m_Bonds[pAtom].fwd == pBond) && (m_Bonds[pAtom].rev == pBond)) + return true; + return false; +} + +unsigned Chain::GetLength () +{ + unsigned n = 0; + std::map::iterator i, end = m_Bonds.end (); + for (i = m_Bonds.begin(); i != end; i++) + if ((*i).second.fwd) + n++; + return n; +} + +double Chain::GetMeanBondLength () +{ + unsigned n = 0; + double l = 0; + std::map::iterator i, end = m_Bonds.end (); + for (i = m_Bonds.begin (); i != end; i++) + if ((*i).second.fwd) { + n++; + l += (*i).second.fwd->Get2DLength (); + } + return l / n; +} + +Atom* Chain::GetNextAtom (Atom* pAtom) +{ + return (Atom*) m_Bonds[pAtom].fwd->GetAtom (pAtom); +} + +} // namespace gcp diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/chain.h gnome-chemistry-utils-0.10.9/libs/gcu/chain.h --- gnome-chemistry-utils-0.8.6/libs/gcu/chain.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/chain.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,194 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * libs/gcu/chain.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_CHAIN_H +#define GCU_CHAIN_H + +#include "object.h" +#include + +/*!\file*/ +namespace gcu { + +class Atom; +class Bond; +class Molecule; + +/*!\struct ChainElt gcu/chain.h +This structure stores the two bonds of sharing one atom in a chain. One +(or both) can be NULL if the atom is at start or end of the chain. + +*/ +typedef struct +{ +/*! +The bond in the forward direction +*/ + Bond *fwd; +/*! +The bond in the backward direction +*/ + Bond *rev; +} ChainElt; + +/*!\class Chain gcu/chain.h +This class is used to represent chains of atoms. + +*/ +class Chain: public Object +{ +public: +/*! +@param pBond a bond. +@param pAtom an atom. +@param Type an optional type id used when constructing a derived type +(i. e. a cycle). + +Constructs a Chain starting from a bond and an optional atom. Choosing the atom +forces the direction of the chain, otherwise, the first atom will be the +first atom of the bond. +*/ + Chain (Bond* pBond, Atom* pAtom = NULL, TypeId Type = ChainType); +/*! +@param molecule a molecule. +@param pBond a bond in the molecule or NULL. +@param Type an optional type id used when constructing a derived type + +Explores a molecule and find all cycles, starting from pBond or an empty chain +if pBond is NULL. +*/ + Chain (Molecule* molecule, Bond* pBond, TypeId Type = ChainType); +/*! +@param molecule a molecule. +@param pAtom an atom in the molecule. +@param Type an optional type id used when constructing a derived type + +Explores a molecule and find all cycles, starting from pAtom or an empty chain +if pAtom is NULL. +*/ + Chain (Molecule* molecule, Atom* pAtom, TypeId Type = ChainType); +/*! +The destructor. +*/ + virtual ~Chain(); + +/*! +@param pAtom an atom. + +Searches all cycles in a molecule starting from Atom pAtom. Found cycles are +added to the molecule cycles list. +*/ + void FindCycles (Atom* pAtom); +/*! +@param pAtom an atom. +@param pBond a bond. + +Searches for a cycle containing the atom pAtom and the bond pBond. pAtom must +be one of the ends of pBond. If a cycle is found, it is added to the molecule +cycles list. +@return true on success, false otherwise. +*/ + bool FindCycle (Atom* pAtom, Bond* pBond); +/*! +@param pAtom1 an atom in the source chain. +@param pAtom2 an atom in the source chain. + +Erases a sub-chain. One of the atoms must already be one of the chain ends. +*/ + virtual void Erase (Atom* pAtom1, Atom* pAtom2); +/*! +@param pAtom1 an atom in the source chain. +@param pAtom2 an atom in the source chain. +@param chain the source chain. + +Inserts a chain. One of the atoms must already be in the target chain. +*/ + virtual void Insert (Atom* pAtom1, Atom* pAtom2, Chain& chain); +/*! +@param pAtom1 an atom in the chain. +@param pAtom2 an atom in the chain. +@param chain the target chain. + +Extracts a sub-chain to the chain variable which should be empty before the call. +*/ + void Extract (Atom* pAtom1, Atom* pAtom2, Chain& chain); +/*! +Reverses the chain order. +*/ + void Reverse (); +/*! +@param start an atom. +@param end an atom. + +Adds the two atoms and the bond between them to the chain. The two atoms must be bonded. +*/ + void AddBond (Atom* start, Atom* end); +/*! +@return the number of multiple bonds in the chain so not really the unsaturations number. +*/ + unsigned GetUnsaturations (); +/*! +@return the number of heteroatoms in the chain. +*/ + unsigned GetHeteroatoms (); +/*! +@param pAtom an atom. + +@return true if pAtom is in the chain. +*/ + bool Contains (Atom* pAtom); +/*! +@param pBond a bond. + +@return true if pBond is in the chain. +*/ + bool Contains (Bond* pBond); +/*! +@return the number of bonds in the chain +*/ + unsigned GetLength (); +/*! +@return the mean bond length in the chain. +*/ + double GetMeanBondLength (); +/*! +@param pAtom an atom in the chain. +@return the next atom in the chain or NULL if pAtom is the last one. +*/ + Atom* GetNextAtom (Atom* pAtom); + +protected: +/*! + The gcu::ChainElt elements in the chain indexed by their common atom. +*/ + std::map m_Bonds; +/*! +The molecule which owns the chain. +*/ + Molecule* m_Molecule; +}; + +} // namespace gcu + +#endif // GCHEMPAINT_CHAIN_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/chem3ddoc.cc gnome-chemistry-utils-0.10.9/libs/gcu/chem3ddoc.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/chem3ddoc.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/chem3ddoc.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,423 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/chem3ddoc.cc + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "chem3ddoc.h" +#include "application.h" +#include "cylinder.h" +#include "glview.h" +#include "sphere.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace OpenBabel; +using namespace std; + +namespace gcu +{ + +Chem3dDoc::Chem3dDoc (): GLDocument (NULL) +{ + m_View = new GLView (this); + m_Display3D = BALL_AND_STICK; +} + +Chem3dDoc::Chem3dDoc (Application *App, GLView *View): GLDocument (App) +{ + m_View = (View)? View: new GLView (this); + m_Display3D = BALL_AND_STICK; +} + +Chem3dDoc::~Chem3dDoc () +{ +} + +void Chem3dDoc::Load (char const *uri, char const *mime_type) +{ + GVfs *vfs = g_vfs_get_default (); + GFile *file = g_vfs_get_file_for_uri (vfs, uri); + GError *error = NULL; + GFileInfo *info = g_file_query_info (file, + ((mime_type)? G_FILE_ATTRIBUTE_STANDARD_SIZE: + G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE","G_FILE_ATTRIBUTE_STANDARD_SIZE), + G_FILE_QUERY_INFO_NONE, + NULL, &error); + if (error) { + g_message ("GIO querry failed: %s", error->message); + g_error_free (error); + g_object_unref (file); + error = NULL; + return; + } + if (!mime_type) + mime_type = g_file_info_get_content_type(info); + gsize size = g_file_info_get_size (info); + g_object_unref (info); + GInputStream *input = G_INPUT_STREAM (g_file_read (file, NULL, &error)); + if (error) { + g_message ("GIO could not create the stream: %s", error->message); + g_error_free (error); + g_object_unref (file); + error = NULL; + return; + } + gchar *buf = new gchar[size + 1]; + gsize n = g_input_stream_read (input, buf, size, NULL, &error); + if (error) { + g_message ("GIO could not read the file: %s", error->message); + g_error_free (error); + delete [] buf; + g_object_unref (input); + g_object_unref (file); + error = NULL; + return; + } + buf[size] = 0; + if (n == size) { + LoadData (buf, mime_type); + if (m_App) { + char *dirname = g_path_get_dirname (uri); + m_App->SetCurDir (dirname); + g_free (dirname); + } + } + if (!strlen (m_Mol.GetTitle())) + m_Mol.SetTitle (g_path_get_basename (uri)); + delete [] buf; + g_object_unref (input); + g_object_unref (file); +} + +void Chem3dDoc::LoadData (char const *data, char const *mime_type) +{ + istringstream is (data); + m_Mol.Clear (); + char *old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + OBConversion Conv; + OBFormat* pInFormat = Conv.FormatFromMIME (mime_type); + if (pInFormat) { + Conv.SetInAndOutFormats (pInFormat, pInFormat); + Conv.Read (&m_Mol,&is); + m_Empty = m_Mol.NumAtoms () == 0; + } + setlocale (LC_NUMERIC, old_num_locale); + // center the molecule around 0,0,0 + std::vector < OBNodeBase * >::iterator i; + OBAtom* atom = m_Mol.BeginAtom (i); + gdouble x0, y0, z0; + x0 = y0 = z0 = 0.0; + while (atom) { + x0 += atom->GetX (); + y0 += atom->GetY (); + z0 += atom->GetZ (); + atom = m_Mol.NextAtom (i); + } + x0 /= m_Mol.NumAtoms (); + y0 /= m_Mol.NumAtoms (); + z0 /= m_Mol.NumAtoms (); + vector3 v(-x0, -y0, -z0); + atom = m_Mol.BeginAtom (i); + while (atom) { + atom->SetVector (atom->GetVector () + v); + atom = m_Mol.NextAtom (i); + } + m_View->Update (); + g_free (old_num_locale); +} + +struct VrmlBond { + double x, y, z; + double xrot, zrot, arot; +}; +typedef struct {int n; list l;} sAtom; +typedef struct {int n; list l;} sBond; + +void Chem3dDoc::OnExportVRML (string const &filename) +{ + char *old_num_locale; + double R, w, x, y, z, x0, y0, z0, dist; + int n = 0, Z; + const gdouble* color; + char const *symbol; + ostringstream file; + map AtomsMap; + map BondsMap; + GError *error = NULL; + GFile *stream = g_file_new_for_uri (filename.c_str ()); + GFileOutputStream *output = g_file_create (stream, G_FILE_CREATE_NONE, NULL, &error); + if (error) { + cerr << "gio error: " << error->message << endl; + g_error_free (error); + g_object_unref (stream); + return; + } + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + + file << "#VRML V2.0 utf8" << endl; + + x0 = y0 = z0 = 0.0; + std::vector < OBNodeBase * >::iterator i; + OBAtom* atom = m_Mol.BeginAtom (i); + while (atom) { + Z = atom->GetAtomicNum (); + x0 += atom->GetX (); + y0 += atom->GetY (); + z0 += atom->GetZ (); + atom = m_Mol.NextAtom (i); + } + x0 /= m_Mol.NumAtoms (); + y0 /= m_Mol.NumAtoms (); + z0 /= m_Mol.NumAtoms (); + + //Create prototypes for atoms + for (atom = m_Mol.BeginAtom (i); atom; atom = m_Mol.NextAtom (i)) { + Z = atom->GetAtomicNum (); + if (!Z) + continue; + symbol = Element::Symbol (Z); + if (AtomsMap[symbol].l.empty()) { + AtomsMap[symbol].n = n; + R = etab.GetVdwRad (Z); + if (m_Display3D == BALL_AND_STICK) + R *= 0.2; + color = gcu_element_get_default_color (Z); + file << "PROTO Atom" << n++ << " [] {Shape {" << endl << "\tgeometry Sphere {radius " << R << "}" << endl; + file << "\tappearance Appearance {" << endl << "\t\tmaterial Material {" << endl << "\t\t\tdiffuseColor " << color[0] << " " << color[1] << " " << color[2] << endl; + file << "\t\t\tspecularColor 1 1 1" << endl << "\t\t\tshininess 0.9" << endl << "\t\t}" << endl << "\t}\r\n}}" << endl; + } + AtomsMap[symbol].l.push_back(atom); + } + + //Create prototypes for bonds + double conv = M_PI / 180; + Matrix m (m_View->GetPsi () * conv, m_View->GetTheta () * conv, m_View->GetPhi () * conv, euler); + if (m_Display3D == BALL_AND_STICK) { + std::vector < OBEdgeBase * >::iterator b; + OBBond* bond = m_Mol.BeginBond (b); + double x1, y1, z1; + struct VrmlBond vb; + n = 0; + while (bond) { + atom = bond->GetBeginAtom (); + if (atom->GetAtomicNum () == 0) { + bond = m_Mol.NextBond (b); + continue; + } + vb.x = atom->GetX () - x0; + vb.y = atom->GetY () - y0; + vb.z = atom->GetZ () - z0; + atom = bond->GetEndAtom (); + if (atom->GetAtomicNum () == 0) { + bond = m_Mol.NextBond (b); + continue; + } + x1 = atom->GetX () - x0 - vb.x; + y1 = atom->GetY () - y0 - vb.y; + z1 = atom->GetZ () - z0 - vb.z; + vb.x += x1 / 2; + vb.y += y1 / 2; + vb.z += z1 / 2; + m.Transform(vb.x, vb.y, vb.z); + m.Transform(x1, y1, z1); + dist = sqrt (x1 * x1 + y1 * y1 + z1 * z1); + w = sqrt (x1 * x1 + z1 * z1); + if (w > 0) { + vb.xrot = z1 / w; + vb.zrot = -x1 / w; + vb.arot = atan2 (w, y1); + } else { + vb.zrot = 0.; + vb.xrot = 0.; + vb.arot = 0.0; + } + char *buf = g_strdup_printf ("%g", dist); + if (BondsMap[buf].l.empty()) { + BondsMap[buf].n = n; + file << "PROTO Bond" << n++ << " [] {Shape {" << endl << "\tgeometry Cylinder {radius " << 0.12 << "\theight " << dist << "}" << endl; + file << "\tappearance Appearance {" << endl << "\t\tmaterial Material {" << endl << "\t\t\tdiffuseColor " << .75 << " " << .75 << " " << .75 << endl; + file << "\t\t\tspecularColor 1 1 1" << endl << "\t\t\tshininess 0.9" << endl << "\t\t}" << endl << "\t}\r\n}}" << endl; + } + BondsMap[buf].l.push_back (vb); + bond = m_Mol.NextBond (b); + } + } + + //world begin + file << "Background{skyColor " << m_View->GetRed () << " " << m_View->GetBlue () << " " << m_View->GetGreen () << "}" << endl; + file << "Viewpoint {fieldOfView " << m_View->GetAngle () / 90*1.570796326794897 << "\tposition 0 0 " << m_View->GetRadius () << "}" << endl; + file << "Transform {" << endl << "\tchildren [" << endl; + + map::iterator k, kend = AtomsMap.end (); + list::iterator j, jend; + for (k = AtomsMap.begin (); k != kend; k++) { + jend = (*k).second.l.end (); + for (j = (*k).second.l.begin (); j != jend; j++) { + x = (*j)->GetX (); + y = (*j)->GetY (); + z = (*j)->GetZ (); + m.Transform(x, y, z); + file << "\t\tTransform {translation " << x << " " << y << " " << z << " children [Atom" << (*k).second.n << " {}]}" << endl; + } + (*k).second.l.clear(); + } + AtomsMap.clear(); + + map::iterator l, lend = BondsMap.end (); + list::iterator mc, mend; + for (l = BondsMap.begin (); l != lend; l++) { + mend = (*l).second.l.end (); + for (mc = (*l).second.l.begin (); mc != mend; mc++) { + file << "\t\tTransform {" << endl << "\t\t\trotation " << (*mc).xrot << " " << 0. << " " << (*mc).zrot << " " << (*mc).arot << endl; + file << "\t\t\ttranslation " << (*mc).x << " " << (*mc).y << " " << (*mc).z << endl\ + << "\t\t\tchildren [Bond" << (*l).second.n << " {}]}" << endl; + } + } + + //end of the world + file << "\t]" << endl << "}" << endl; + + setlocale(LC_NUMERIC, old_num_locale); + g_free(old_num_locale); + g_output_stream_write (reinterpret_cast (output), file.str ().c_str (), file.str ().size (), NULL, &error); + if (error) { + cerr << "gio error: " << error->message << endl; + g_error_free (error); + } + g_object_unref (stream); +} + +void Chem3dDoc::Draw (Matrix const &m) const +{ + std::vector < OBNodeBase * >::iterator i; + OBAtom* atom = (const_cast (&m_Mol))->BeginAtom (i); + unsigned int Z; + gdouble R, w, x, y, z, dist; + dist = 0.; + map atomPos; + const gdouble* color; + vector3 v, normal (0., 0., 1.); + Sphere sp (10); + if (m_Display3D == WIREFRAME) { + float light_ambient[] = {1.0, 1.0, 1.0, 1.0}; + glLightfv (GL_LIGHT0, GL_AMBIENT, light_ambient); + } else { + glEnable (GL_RESCALE_NORMAL); + float light_ambient[] = {.0, .0, .0, 1.0}; + glLightfv (GL_LIGHT0, GL_AMBIENT, light_ambient); + } + while (atom) { + atomPos[atom] = v = m * atom->GetVector (); + Z = atom->GetAtomicNum (); + if (Z > 0) { + if (m_Display3D == CYLINDERS) { + R = .12; + } else if (m_Display3D == WIREFRAME) { + R = 0.; + } else { + R = etab.GetVdwRad (Z); + if (m_Display3D == BALL_AND_STICK) + R *= 0.2; + } + x = v.x (); + y = v.y (); + z = v.z (); + color = gcu_element_get_default_color (Z); + if ((w = sqrt (x * x + y * y + z * z)) > dist - R) + dist = w + R; + if (m_Display3D != WIREFRAME) { + glColor3d (color[0], color[1], color[2]); + sp.draw (v, R); + } + } + atom = (const_cast (&m_Mol))->NextAtom (i); + } + const_cast (this)->m_MaxDist = dist * 1.05; + if (m_Display3D != SPACEFILL) { + Cylinder cyl (10); + std::vector < OBEdgeBase * >::iterator j; + OBBond* bond = (const_cast (&m_Mol))->BeginBond (j); + vector3 v0, v1; + double R1; + unsigned int Z1; + if (m_Display3D == WIREFRAME) + sp.draw (v, 0.); // weird, this initializes something needed to see colors but what? + else + glEnable (GL_NORMALIZE); + while (bond) { + atom = bond->GetBeginAtom (); + v = m * atom->GetVector (); + Z = atom->GetAtomicNum (); + if (Z == 0) { + bond = (const_cast (&m_Mol))->NextBond (j); + continue; + } + atom = bond->GetEndAtom (); + R = etab.GetVdwRad (Z); + Z1 = atom->GetAtomicNum (); + if (Z1 == 0) { + bond = (const_cast (&m_Mol))->NextBond (j); + continue; + } + R1 = etab.GetVdwRad (Z1); + v1 = m * atom->GetVector (); + v0 = v + (v1 - v) * (R / (R + R1)); + color = gcu_element_get_default_color (Z); + glColor3d (color[0], color[1], color[2]); + if (m_Display3D == WIREFRAME) { + glBegin (GL_LINES); + glVertex3d (v.x (), v.y (), v.z()); + glVertex3d (v0.x (), v0.y (), v0.z()); + glEnd (); + } else if (m_Display3D == BALL_AND_STICK && bond->GetBondOrder () > 1) + cyl.drawMulti (v, v0, ((bond->GetBondOrder () > 2)? .07: 0.10), bond->GetBondOrder (), 0.15, normal); + else + cyl.draw (v, v0, .12); + color = gcu_element_get_default_color (Z1); + glColor3d (color[0], color[1], color[2]); + if (m_Display3D == WIREFRAME) { + glBegin (GL_LINES); + glVertex3d (v0.x (), v0.y (), v0.z()); + glVertex3d (v1.x (), v1.y (), v1.z()); + glEnd (); + } else if (m_Display3D == BALL_AND_STICK && bond->GetBondOrder () > 1) + cyl.drawMulti (v0, v1, ((bond->GetBondOrder () > 2)? .07: 0.10), bond->GetBondOrder (), 0.15, normal); + else + cyl.draw (v0, v1, .12); + bond = (const_cast (&m_Mol))->NextBond (j); + } + } +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/chem3ddoc.h gnome-chemistry-utils-0.10.9/libs/gcu/chem3ddoc.h --- gnome-chemistry-utils-0.8.6/libs/gcu/chem3ddoc.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/chem3ddoc.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,137 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/chem3ddoc.h + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_CHEM3D_DOCUMENT_H +#define GCU_CHEM3D_DOCUMENT_H + +#include +#include +#include + +/*!\file*/ +namespace gcu { + +/*! \enum Display3DMode + 3D display mode. + Possible values are: + - BALL_AND_STICK: use ball and stick representation; atoms are represented by spheres with a radius equal to 20% of + their van der Waals radius and bonds are displayed as cylinders Multiple bonds are displayed as multiple cylinders. + - SPACEFILL: use space filling representation; atoms are represented by spheres with a radius equal + their van der Waals radius; bonds are not displayed. + - CYLINDERS: only bonds are represented as cylinders, atoms just end the cylinders. + - WIREFRAME: bonds are represented as narrow lines, atoms just end the lines. +*/ +typedef enum +{ + BALL_AND_STICK, + SPACEFILL, + CYLINDERS, + WIREFRAME +} Display3DMode; + +class Application; +class Matrix; + +/*! +\class Chem3dDoc gcu/chem3ddoc.h + +Document class for a molecule. Embeds an OpenBabel::OBMol object. +*/ +class Chem3dDoc: public GLDocument +{ +public: +/*! +Default constructor +*/ + Chem3dDoc (); +/*! +@param App the application. +@param View: an optional already existing GLView instance. +*/ + Chem3dDoc (Application *App, GLView *View); +/*! +Default destructor +*/ + virtual ~Chem3dDoc (); + +/*! +@param m the Matrix giving the current model orientation + +Displays the molecule using OpenGL. +*/ + void Draw (Matrix const &m) const; + +/*! +@return true if the molecule have no atom, false otherwise. +*/ + bool IsEmpty () {return m_Mol.NumAtoms () == 0;} + +/*! +@param uri the uri of the molecule file. +@param mime_type the mime type of the molecule file. + +Loads a molecule from the provided uri using OpenBabel. +*/ + void Load (char const *uri, char const *mime_type); + +/*! +@param data the inline data. +@param mime_type the mime type of the data. + +Loads a molecule from the provided data using OpenBabel. +*/ + void LoadData (char const *data, char const *mime_type); + +/*! +@return the title of the molecule if any. +*/ + const char *GetTitle () {return m_Mol.GetTitle ();} + +/*! +@param filename the name of the vrml file to which the data should be written. + +Exports the embedded molecule as a vrml scene. +*/ + void OnExportVRML (std::string const &filename); + +private: + OpenBabel::OBMol m_Mol; + +/*!\fn SetDisplay3D(Display3DMode mode) +@param mode: the new mode. + +Sets the display mode to one of the available Display3DMode values. +*/ +/*!\fn GetDisplay3D() +@return the current mode. +*/ +/*!\fn GetRefDisplay3D() +@return the current mode as a reference. +*/ +GCU_PROP (Display3DMode, Display3D); +}; + +} // namespace gcu + +#endif // GCU_CHEM3D_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/chemistry.cc gnome-chemistry-utils-0.10.9/libs/gcu/chemistry.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/chemistry.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/chemistry.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,140 @@ +// -*- C -*- + +/* + * Gnome Chemisty Utils + * chemistry.cc + * + * Copyright (C) 2003-2005 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "chemistry.h" +#include "element.h" +#include + +extern "C" +{ + +using namespace gcu; +const gdouble* gcu_element_get_default_color(gint Z) +{ + return Element::GetElement(Z)->GetDefaultColor(); +} + +const gchar* gcu_element_get_symbol(gint Z) +{ + return Element::Symbol(Z); +} + +const gchar* gcu_element_get_name(gint Z) +{ + return Element::GetElement(Z)->GetName(); +} + +gint gcu_element_get_Z(gchar* symbol) +{ + return Element::Z(symbol); +} + +gboolean gcu_element_get_radius(GcuAtomicRadius* radius) +{ + return Element::GetRadius(radius); +} + +gboolean gcu_element_get_electronegativity(GcuElectronegativity* en) +{ + return Element::GetElectronegativity(en); +} + +const GcuAtomicRadius** gcu_element_get_radii(gint Z) +{ + return Element::GetElement(Z)->GetRadii(); +} + +const GcuElectronegativity** gcu_element_get_electronegativities(gint Z) +{ + return Element::GetElement(Z)->GetElectronegativities(); +} + +void gcu_element_load_databases (char const *name, ...) +{ + va_list l; + char const *base = name; + va_start (l, name); + while (base != NULL) { + if (!strcmp (base, "radii")) + Element::LoadRadii (); + else if (!strcmp (base, "elecprops")) + Element::LoadElectronicProps (); + else if (!strcmp (base, "isotopes")) + Element::LoadIsotopes (); + base = va_arg (l, char const*); + } + va_end (l); +} + +gchar* gcu_value_get_string (GcuValue const *value) +{ + gchar *format, *str; + if (value->delta > 0) { + int delta = value->delta, prec = value->prec; + while (delta >= 100) { + delta /= 10; + prec--; + } + format = g_strdup_printf ("%%.%df(%%d)", prec); + str = g_strdup_printf (format, value->value, delta); + } else { + format = g_strdup_printf ("%%.%df", value->prec); + str = g_strdup_printf (format, value->value); + } + g_free (format); + return str; +} + +gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value) +{ + gchar *format, *str; + if (value->delta > 0) { + int delta = value->delta, prec = value->prec; + while (delta >= 100) { + delta /= 10; + prec--; + } + // FIXME: what to do if we have a negative precision? + format = (prec > 0)? g_strdup_printf ("%%.%df(%%d) %%s", prec): g_strdup ("%.0f %s"); + str = g_strdup_printf (format, value->value, delta, value->unit); + } else { + format = g_strdup_printf ("%%.%df %%s", value->prec); + str = g_strdup_printf (format, value->value, value->unit); + } + g_free (format); + return str; +} + +GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int rank) +{ + return Element::GetElement(Z)->GetIonizationEnergy (rank); +} + +GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int rank) +{ + return Element::GetElement(Z)->GetElectronAffinity (rank); +} + +} //extern "C" diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/chemistry.h gnome-chemistry-utils-0.10.9/libs/gcu/chemistry.h --- gnome-chemistry-utils-0.8.6/libs/gcu/chemistry.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/chemistry.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,303 @@ +// -*- C -*- + +/* + * Gnome Chemisty Utils + * chemistry.h + * + * Copyright (C) 2003-2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + + +/*! \mainpage + \section intro Introduction +The Gnome Chemistry Utils Library provides some widgets and C++ classes related to chemistry. + +Available widgets are: +- GcpFontSel: a font selector. +- GtkPeriodic: a periodic table of the elements. +- GtkComboPeriodic: a combo box witha dropdown periodic table widget. +- GtkCrystalViewer: a crystal structure viewer. +- GtkChem3DViewer: a 3D molecular structure viewer. +- GtkSpectrumViewer: a spectrum viewer. + +The C++ classes are grouped in the gcu and gcp namespaces. A C interface exists to use some of the +functionalities offered in these classes; the corresponding documentation is available in the +chemistry.h file. +*/ + +#ifndef GCU_CHEMISTRY_H +#define GCU_CHEMISTRY_H + +#include + +/** \file +* C interface to the chemistry library. + +To use this file, add the following line to your source file: +\code +#include +\endcode +*/ + +G_BEGIN_DECLS + +/** +The greatest atomic number known in this version of the Gnome Chemictry Utils +*/ +#define MAX_ELT 116 + +/** gcu_spin_state +* gcu_spin_state describes the spin state of a central atom in a complex. +* Possible values are: +* - GCU_N_A_SPIN: unknown, +* - GCU_LOW_SPIN: low spin, +* - GCU_HIGH_SPIN: high spin. +* +* This enumeration is used in the GcuAtomicRadius structure. +*/ +enum gcu_spin_state +{ + GCU_N_A_SPIN, + GCU_LOW_SPIN, + GCU_HIGH_SPIN +}; + +/** gcu_radius_type +* gcu_radius_type describes the type of the atomic radius +* Possible values are: +* - GCU_RADIUS_UNKNOWN: unknown,. +* - GCU_ATOMIC: atomic radius, +* - GCU_IONIC: ionic radius, +* - GCU_METALLIC: metallic radius, +* - GCU_COVALENT: covalent radius, +* - GCU_VAN_DER_WAALS: van der Waals radius, +* +* This enumeration is used in the GcuAtomicRadius structure. +*/ +enum gcu_radius_type +{ + GCU_RADIUS_UNKNOWN, + GCU_ATOMIC, + GCU_IONIC, + GCU_METALLIC, + GCU_COVALENT, + GCU_VAN_DER_WAALS +}; + +/** GcuValue +Structure used to store a numerical value. +*/ +typedef struct +{ + /** The value. */ + double value; + /** The precision (number of significative decimal figures). */ + int prec; + /** The standard error (* 10^prec). */ + int delta; +} GcuValue; + +/** GcuDimensionalValue +Structure used to store a dimensional value. +*/ +typedef struct +{ + /** The value.*/ + double value; + /** The precision (number of significative decimal figures).*/ + int prec; + /** The standard error (* 10^prec). */ + int delta; + /** The unit symbol.*/ + const char *unit; +} GcuDimensionalValue; + +/** GcuAtomicRadius +* Structure used to describe an atomic radius. +*/ +typedef struct +{ + /** The atomic number. */ + unsigned char Z; + /** The radius type (unknown, ionic, metallic, covalent, or van der Waals).*/ + enum gcu_radius_type type; + /** The radius value (the unit should always be pm). */ + GcuDimensionalValue value; + /** The charge of the atom (or ion). */ + char charge; + /** The scale name, e.g. "Pauling" or "Shannon". */ + char const* scale; + /** the coordination number of the atom or -1 if unknown. */ + char cn; //coordination number: -1: unspecified + /** The spin state (unknown, low or high).*/ + enum gcu_spin_state spin; +} GcuAtomicRadius; + +/*! GcuElectronegativity +Structure used to describe an electronegativity value. +*/ +typedef struct +{ + /** The atomic number. */ + unsigned char Z; + /*! The electronegativity value.*/ + GcuValue value; + /** The scale name, e.g. "Pauling" or "Mulliken". */ + char const *scale; +} GcuElectronegativity; + +/*! GcuIsotope +Structure used to describe an isotope +*/ +typedef struct +{ + /** The nucleon number. */ + unsigned char A; + /** The name of the isotope if any.*/ + char *name; + /*! The terrestrial percent abundance.*/ + GcuValue abundance; + /*! The mass of an atom in atomic units.*/ + GcuValue mass; + /*! The spin of an atom multipiled by 2.*/ + char spin; + /*! The decay modes as a comma separated list.*/ + char *decay_modes; + /*! The decay period.*/ + GcuDimensionalValue decay_period; +} GcuIsotope; + +/*! +\param Z: the atomic number of the element. + +Retrieves the default color used for the element. +\return an array of three double values for the red, green and blue components of the color. +*/ +const gdouble* gcu_element_get_default_color (gint Z); +/*! +gcu_element_get_symbol: +\param Z: the atomic number of the element. +\return the symbol of the element. +*/ +const gchar* gcu_element_get_symbol (gint Z); +/*! +\param Z: the atomic number of the element. +\return the name of the element in the current locale or in english if the current locale is not supported in the database. +*/ +const gchar* gcu_element_get_name (gint Z); +/*! +gcu_element_get_Z: +\param symbol: the symbol of the element (e.g. "C" ot "Pt"). +\return the atomic number of the element. +*/ +gint gcu_element_get_Z (gchar* symbol); +/*! +\param radius: a pointer to a GcuAtomicRadius structure. + +Before calling this function, most fields in the GcuAtomicRadius structure must be filled: +- Z: the atomic number, mandatory +- type: the type of the radius searched +- charge: the charge of the atom. 0 for all radii except ionic radii. +- cn: the coordination number or -1 if not significant +- spin: the spin state or GCU_N_A_SPIN if not significant +- scale: the name of the scale (e.g. "Pauling") or NULL + +The programs searches a value corresponding to the fields having a non default value. If one is found +the other fields are given the corresponding values f the first match before returning. + +\return TRUE if a radius has been found and FALSE if not. + +*/ +gboolean gcu_element_get_radius (GcuAtomicRadius* radius); +/*! +\param en: a pointer to a GcuElectronegativity structure. + +Before calling this function, the following fields in the GcuElectronegativity structure must be filled: +- Z: the atomic number, mandatory +- scale: the name of the scale (e.g. "Pauling") or NULL + +The programs searches an electronegativity value for the element in the scale if given. If one is found +the value and the scale (if NULL on calling) are given the corresponding values of the first match before returning. + +\return TRUE if a match has been found and FALSE if not. +*/ +gboolean gcu_element_get_electronegativity (GcuElectronegativity* en); +/*! +\param Z: the atomic number. +\param N: the rank of the ionization. + +The program searches for the Nth ionization energy value for the element and returns +it if found. + +\return the ionization energy as a GcuDimensionalValue if known or NULL. +*/ +GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int N); +/*! +\param Z: the atomic number. +\param N: the rank of the extra electron. + +For some elements, second and even third electron affinities have been estimated. +The program searches the Nth electron affinity value for the element and returns +it if found. +A value of 0 means that the anion is unstable in the gaseous phase and that no better +etimation is available. + +\return the electronic affinity as a GcuDimensionalValue if known or NULL. +*/ +GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int N); +/*! +\param Z: the atomic number of the element. + +\return a pointer to the array of pointers to GcuAtomicRadius structures for all known radii for the element. +Last value in the array is NULL. +*/ +const GcuAtomicRadius** gcu_element_get_radii (gint Z); +/*! +\param Z: the atomic number of the element. + +\return a pointer to the array of pointers to GcuElectronegativity structures for all known electronegativities for the element. +Last value in the array is NULL. +*/ +const GcuElectronegativity** gcu_element_get_electronegativities (gint Z); +/*! +\param name: name of a database to load such as "radii", "elecprops", "isotopes", +the first name is followed by a list of other database terminated by NULL. + +Loads the listed databases. +*/ +void gcu_element_load_databases (char const *name, ...); + +/*! +\param value: the GcuValue to represent as a string. + +\return the GcuValue as a string taking into account the precision and +incertitude +*/ +gchar* gcu_value_get_string (GcuValue const *value); + +/*! +\param value: the GcuDimensionalValue to represent as a string. + +\return the GcuDimensionalValue as a string taking into account the precision and +incertitude +*/ +gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value); + +G_END_DECLS + +#endif //GCU_CHEMISTRY_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/cmd-context.cc gnome-chemistry-utils-0.10.9/libs/gcu/cmd-context.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/cmd-context.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/cmd-context.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,98 @@ +/* + * Gnome Chemistry Utils + * cmd-context.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "cmd-context.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +#endif +#include +#include +#include + +#ifndef GO_TYPE_CMD_CONTEXT +# define GO_TYPE_CMD_CONTEXT GO_CMD_CONTEXT_TYPE +#endif + +typedef GObject GcuCmdContext; +typedef GObjectClass GcuCmdContextClass; + +static void +gcu_cc_error_error (GOCmdContext *cc, GError *error) +{ + fprintf (stderr, "Error: %s\n", error->message); +} + +static void +gcu_cc_error_info (GOCmdContext *cc, ErrorInfo *error) +{ + error_info_print (error); +} + +static char * +gcu_cc_get_password (G_GNUC_UNUSED GOCmdContext *cc, + G_GNUC_UNUSED char const* filename) +{ + return NULL; +} + +static void +gcu_cc_set_sensitive (G_GNUC_UNUSED GOCmdContext *cc, + G_GNUC_UNUSED gboolean sensitive) +{ +} + +static void +gcu_cc_progress_set (GOCmdContext *cc, gfloat val) +{ +} + +static void +gcu_cc_progress_message_set (GOCmdContext *cc, gchar const *msg) +{ +} + +static void +gcu_cc_cmd_context_init (GOCmdContextClass *iface) +{ + iface->get_password = gcu_cc_get_password; + iface->set_sensitive = gcu_cc_set_sensitive; + iface->error.error = gcu_cc_error_error; + iface->error.error_info = gcu_cc_error_info; + iface->progress_set = gcu_cc_progress_set; + iface->progress_message_set = gcu_cc_progress_message_set; +} + +GSF_CLASS_FULL (GcuCmdContext, gcu_cmd_context, + NULL, NULL, NULL, NULL, + NULL, G_TYPE_OBJECT, 0, + GSF_INTERFACE (gcu_cc_cmd_context_init, GO_TYPE_CMD_CONTEXT)) + +static GOCmdContext *cc = NULL; + +GOCmdContext * +gcu_get_cmd_context (void) +{ + if (!cc) + cc = GO_CMD_CONTEXT (g_object_new (GCU_CMD_CONTEXT_TYPE, NULL)); + return cc; +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/cmd-context.h gnome-chemistry-utils-0.10.9/libs/gcu/cmd-context.h --- gnome-chemistry-utils-0.8.6/libs/gcu/cmd-context.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/cmd-context.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,54 @@ +/* + * Gnome Chemistry Utils + * cmd-context.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_CMD_CONTEXT_H +#define GCU_CMD_CONTEXT_H + +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include + +G_BEGIN_DECLS + +/*!\file +Declaration of the GcuCmdContext structure, a GObject implementing the +GOCmdContext interface from goffice. This is mandatory to be able to edit +charts. +*/ + +/*! +@return the GType associated to GcuCmdContext. +*/ +#define GCU_CMD_CONTEXT_TYPE (gcu_cmd_context_get_type ()) +GType gcu_cmd_context_get_type (void); + +/*! +@return a static global GcuCmdContext instance. +*/ +GOCmdContext *gcu_get_cmd_context (void); + +G_END_DECLS + +#endif /* GCU_CMD_CONTEXT_H */ diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalatom.cc gnome-chemistry-utils-0.10.9/libs/gcu/crystalatom.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalatom.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalatom.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,218 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * crystalatom.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "element.h" +#include "crystalatom.h" +#include "element.h" +#include "xml-utils.h" +#include +#include +#include + +namespace gcu +{ + +CrystalAtom::CrystalAtom(): Atom() +{ + m_Radius.Z = (unsigned char) GetZ(); + m_Radius.type = GCU_RADIUS_UNKNOWN; + m_Radius.scale = NULL; + m_Radius.spin = GCU_N_A_SPIN, + m_Radius.charge = 0; + m_Radius.value.value = 0.0; + m_Radius.value.prec = 0; + m_Radius.cn = -1; + m_bCustomColor = false; + m_fRed = m_fBlue = m_fGreen = 0; + m_fAlpha = 1; + m_nCleave = 0; + m_EffectiveRadiusRatio = 1.; +} + +CrystalAtom::~CrystalAtom() +{ +} + +CrystalAtom::CrystalAtom(int Z, double x, double y, double z): Atom(Z, x, y, z) +{ + m_Radius.Z = (unsigned char) GetZ(); + m_Radius.type = GCU_RADIUS_UNKNOWN; + m_Radius.scale = NULL; + m_Radius.spin = GCU_N_A_SPIN, + m_Radius.charge = 0; + m_Radius.value.value = 0.0; + m_Radius.value.prec = 0; + m_Radius.cn = -1; + m_fAlpha = 1.; + if (Z) SetDefaultColor(); + m_nCleave = 0; + m_EffectiveRadiusRatio = 1.; +} + +CrystalAtom::CrystalAtom(CrystalAtom& caAtom): Atom(caAtom) +{ + m_Radius.scale = NULL; + SetRadius(caAtom.m_Radius); + m_bCustomColor = caAtom.m_bCustomColor; + m_fRed = caAtom.m_fRed; + m_fGreen = caAtom.m_fGreen; + m_fBlue = caAtom.m_fBlue; + m_fAlpha = caAtom.m_fAlpha; + m_EffectiveRadiusRatio = caAtom.m_EffectiveRadiusRatio; + m_nCleave = 0; +} + +CrystalAtom& CrystalAtom::operator=(CrystalAtom& caAtom) +{ + SetZ(caAtom.GetZ()); + double x, y, z; + caAtom.GetCoords(&x, &y, &z); + SetCoords(x, y, z); + SetRadius(caAtom.m_Radius); + m_bCustomColor = caAtom.m_bCustomColor; + m_fRed = caAtom.m_fRed ; + m_fGreen = caAtom.m_fGreen ; + m_fBlue = caAtom.m_fBlue ; + m_fAlpha = caAtom.m_fAlpha ; + m_EffectiveRadiusRatio = caAtom.m_EffectiveRadiusRatio; + m_nCleave = 0 ; + return *this ; +} + +void CrystalAtom::SetColor(float red, float green, float blue, float alpha) +{ + m_bCustomColor = true; + m_fRed = red ; + m_fGreen = green ; + m_fBlue = blue ; + m_fAlpha = alpha ; +} + +void CrystalAtom::SetDefaultColor() +{ + m_bCustomColor = false; + double *Colors = Element::GetElement(GetZ())->GetDefaultColor(); + m_fRed = (float) Colors[0]; + m_fGreen = (float) Colors[1]; + m_fBlue = (float) Colors[2]; +} + +void CrystalAtom::GetColor(double *red, double *green, double *blue, double *alpha) +{ + *red = m_fRed ; + *green = m_fGreen ; + *blue = m_fBlue ; + *alpha = m_fAlpha ; +} + +void CrystalAtom::SetSize(double r) +{ + m_Radius.Z = (unsigned char) GetZ(); + m_Radius.type = GCU_RADIUS_UNKNOWN; + m_Radius.scale = NULL; + m_Radius.spin = GCU_N_A_SPIN, + m_Radius.charge = 0; + m_Radius.value.value = 0.0; + m_Radius.value.prec = 0; + m_Radius.cn = -1; + m_Radius.value.value = 0.0; + m_Radius.value.prec = 0; +} + + +double CrystalAtom::GetSize() +{ + return m_Radius.value.value; +} + +bool CrystalAtom::operator==(CrystalAtom& caAtom) +{ + return (x() == caAtom.x()) && + (y() == caAtom.y()) && + (z() == caAtom.z()) ; +} + +double CrystalAtom::ScalProd(int h, int k, int l) +{ + return x() * h + y() * k + z() * l ; +} + +double CrystalAtom::Distance(double dx, double dy, double dz, bool bFixed) +{ + if ((m_nCleave > 0) && ! bFixed) return 0. ; + dx -= x() ; + dy -= y() ; + dz -= z() ; + return sqrt(dx * dx + dy * dy + dz * dz) + m_Radius.value.value ; +} + +void CrystalAtom::NetToCartesian(double a, double b, double c, double alpha, double beta, double gamma) +{ + double dx = x() * a ; + double dy = y() * b ; + double dz = z() * c ; + SetCoords(dx * sqrt(1-square(cos(beta)) - square((cos(gamma) - cos(beta)*cos(alpha))/sin(alpha))), + dx * (cos(gamma) - cos(beta)*cos(alpha))/sin(alpha) + dy * sin(alpha), + (dx * cos(beta) + dy * cos(alpha) + dz)); +} + +bool CrystalAtom::SaveNode (xmlDocPtr xml, xmlNodePtr node) const +{ + if (!WriteRadius (xml, node, m_Radius)) + return false; + + if (m_bCustomColor && !WriteColor (xml, node, NULL, m_fRed, m_fGreen, m_fBlue, m_fAlpha)) + return false; + + return true; +} + +bool CrystalAtom::LoadNode(xmlNodePtr node) +{ + xmlNodePtr child = FindNodeByNameAndId(node, "color"); + if (!child) SetDefaultColor(); + else + { + if (!ReadColor(node, NULL, &m_fRed, &m_fGreen, &m_fBlue, &m_fAlpha)) return false; + m_bCustomColor = true; + } + child = FindNodeByNameAndId(node, "radius"); + if (!child) return false; + m_Radius.Z = GetZ(); + bool result = ReadRadius(child, m_Radius); + return result; +} + +void CrystalAtom::SetRadius(const GcuAtomicRadius& r) +{ + m_Radius.type = r.type; + m_Radius.value = r.value; + m_Radius.charge = r.charge; + m_Radius.scale = r.scale; + m_Radius.cn = r.cn; //coordination number: -1: unspecified + m_Radius.spin = r.spin; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalatom.h gnome-chemistry-utils-0.10.9/libs/gcu/crystalatom.h --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalatom.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalatom.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,231 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * crystalatom.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef CRYSTAL_ATOM_H +#define CRYSTAL_ATOM_H + +#include "atom.h" +#include "chemistry.h" +#include "macros.h" +#include +#include +#include +#include + +/*!\file*/ +namespace gcu +{ + +/*! \class CrystalAtom gcu/crystalatom.h +Used to represent atoms in a crystal. +*/ +class CrystalAtom : public Atom +{ +public: +/* +The default constructor. +*/ + CrystalAtom (); +/* +The destructor of CrystalAtom. +*/ + virtual ~CrystalAtom (); + +public : +/* +@param Z: the atomic number of the new atom. +@param x: the x coordinate of the new atom. +@param y: the y coordinate of the new atom. +@param z: the z coordinate of the new atom. + +Creates an atom. +*/ + CrystalAtom (int Z, double x, double y, double z); +/*! +@param caAtom: the CrystalAtom to duplicate. + +Creates a new CrystalAtom identical to caAtom. +*/ + CrystalAtom (CrystalAtom& caAtom); +/* +@param caAtom: the Atom to copy. + +@return a CrystalAtom identical to caAtom. +*/ + CrystalAtom& operator= (CrystalAtom& caAtom); + +/*! +@param red: the red component of the color. +@param green: the green component of the color. +@param blue: the blue component of the color. +@param alpha: the alpha component of the color. + +Sets a custom color to the atom. +*/ + void SetColor (float red, float green, float blue, float alpha); +/*! +Gives the atom the default color. +*/ + void SetDefaultColor (); +/*! +@return: true if the color is user defined and false if it is the default color. +*/ + bool HasCustomColor () {return m_bCustomColor;} +/*! +@param red: a pointer to the red component. +@param green: a pointer to the green component. +@param blue: a pointer to the blue component. +@param alpha: a pointer to the alpha component. + +Used to retrieve the color used in the representation of the atom. Mainly useful for user defined +colors. +*/ + void GetColor (double *red, double *green, double *blue, double *alpha); +/*! +@param r: the new value of the atomic radius. + +Sets the value of the radius (in pm). +*/ + void SetSize (double r); +/*! +@return the value of the radius (in pm). +*/ + double GetSize (); +/*! +@param caAtom: a CrystalAtom instance. +@return true if the atoms are at the same position and false if their positions are different. +*/ + bool operator== (CrystalAtom& caAtom); +/*! +Method used to cleave an atom. The inverse operation does not exist since the whole crystal must be recalculated +after a change in the definition. +*/ + void Cleave () {m_nCleave++;} +/*! +@param h: the h Miller index of a plane. +@param k: the k Miller index of a plane. +@param l: the l Miller index of a plane. + +@return the product hx+ky+lz where x, y and z are the coordinates of the atom. This makes sense only if coordinates +are related to the net and are not the cartesian coordinates. This method should not be called after NetToCartesian(). +*/ + double ScalProd (int h, int k, int l); +/*! +@param a: the a parameter of the unit cell. +@param b: the b parameter of the unit cell. +@param c: the c parameter of the unit cell. +@param alpha: the alpha angle of the unit cell. +@param beta: the beta angle of the unit cell. +@param gamma: the gamma angle of the unit cell. + +Converts the coordinates of the atom from net related ones to cartesian. Initially, atoms are defined by their +position relative to the unit cell and the coordinates must be transformed to the cartesian ones before +displaying the atom. +*/ + void NetToCartesian (double a, double b, double c, double alpha, double beta, double gamma); +/*! +@param x: the x coordinate of the center. +@param y: the y coordinate of the center. +@param z: the z coordinate of the center. +@param bFixed: tells if cleaved atoms are taken into account. + +This helper method is called when searching for the size of the crystal. When some cleavages are defined, +the procedure cn take into account atoms cleaved to get the same position in the view for the cleaved crystal +than for the whole crystal. If bFixed is true, all atoms are taken into account. + +@return the distance of the atom to the center of the view or 0 if bFixed is false and the atom cleaved. +*/ + double Distance (double x, double y, double z, bool bFixed); +/*! +@return the value of the radius (in pm). +*/ + double r () {return m_Radius.value.value;} +/*! +@return the GcuAtomicRadius containing the caracteristics of the atom radius. +*/ + const GcuAtomicRadius& GetRadius () {return m_Radius;} +/*! +@param r: a GcuAtomicRadius with the caracteristics of the atom radius. +*/ + void SetRadius (const GcuAtomicRadius& r); +/*! +@return true if the atom is cleaved by at least one cleavage or false if the atom is not cleaved at all. +*/ + bool IsCleaved () {return m_nCleave != 0;} +/*! +@param xml: the xmlDoc used to save the document. +@param node: a pointer to the xmlNode to which this Atom is serialized. + +Saves the color and the radius of the atom. +*/ + virtual bool SaveNode (xmlDocPtr xml, xmlNodePtr node) const; +/*! +@param node: a pointer to the xmlNode containing the serialized Atom. + +Loads the color and the radius of the atom. +*/ + virtual bool LoadNode (xmlNodePtr node); + +protected: +/*! +The blue component of the color of the sphere representing the atom. +*/ + float m_fBlue; +/*! +The red component of the color of the sphere representing the atom. +*/ + float m_fRed; +/*! +The green component of the color of the sphere representing the atom. +*/ + float m_fGreen; +/*! +The alpha component of the color of the sphere representing the atom. +*/ + float m_fAlpha; +/*! +False if the color used is the default color and true if it is a user defined color. +*/ + bool m_bCustomColor; +/*! +The GcuAtomicRadius containing the radius caracteristics of the atom. +*/ + GcuAtomicRadius m_Radius; +/*! +When cleavages (see CrystalCleavage class documentation) are defined, the atom might be cleaved. m_nCleave is +the number of CrystalCleavage instances which remove the atom. If this member is not 0, the atom will +not be displayed. +*/ + int m_nCleave; //0 if not cleaved + +GCU_PROP (double, EffectiveRadiusRatio); +}; + +/*! +a list of pointers to CrystalAtom instances derived from std::list. +*/ +typedef std::list CrystalAtomList; +}// namespace gcu + +#endif // CRYSTAL_ATOM_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalbond.cc gnome-chemistry-utils-0.10.9/libs/gcu/crystalbond.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalbond.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalbond.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,28 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * crystalbond.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "crystalbond.h" + +using namespace gcu; diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalbond.h gnome-chemistry-utils-0.10.9/libs/gcu/crystalbond.h --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalbond.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalbond.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,90 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * crystalbond.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef CRYSTAL_BOND_H +#define CRYSTAL_BOND_H + +#include +#include +#include "bond.h" + +namespace gcu +{ + +/*!\class CrystalBond gcu/crystalbond.h +This class will be used to represent bonds inside crystals. It is not implemented yet. +*/ +class CrystalBond: public Bond +{ +public: + CrystalBond (); + virtual ~CrystalBond (); + +public : + CrystalBond (double X1, double Y1, double Z1, double X2, double Y2, double Z2, double r, float red, float green, float blue, float alpha); + CrystalBond (CrystalBond& cbBond); + CrystalBond& operator= (CrystalBond&); + + void Draw (); + double X1 (void) {return m_dx;} + double Y1 (void) {return m_dy;} + double Z1 (void) {return m_dz;} + double X2 (void) {return m_dx2;} + double Y2 (void) {return m_dy2;} + double Z2 (void) {return m_dz2;} + double Xmax (); + double Ymax (); + double Zmax (); + double Xmin (); + double Ymin (); + double Zmin (); + double Long () {return m_dl;} + void SetPosition (double x, double y, double z, double x1, double y1, double z1); + void SetColor (float red, float green, float blue, float alpha); + void GetColor (double *red, double *green, double *blue, double *alpha); + void SetRadius (double r); + double GetRadius () {return m_dr;}; + bool operator== (CrystalBond&); + virtual void Move (double x, double y, double z); + double ScalProd (int h, int k, int l); + void Cleave () {m_nCleave++;} + void NetToCartesian (double a, double b, double c, double alpha, double beta, double gamma); + double Distance (double x, double y, double z, bool bFixed); + bool IsCleaved () {return m_nCleave != 0;} + void GetRotation (double& x, double& y, double& z, double& th); + virtual xmlNodePtr Save (xmlDocPtr xml); + virtual bool Load (xmlNodePtr node); + +private : + float m_fBlue, m_fRed, m_fGreen, m_fAlpha; + double m_dx, m_dy, m_dz, m_dx2, m_dy2, m_dz2, m_dr, m_dl; + double m_dxrot, m_dyrot, m_darot;//rotation axis coordinates (z = 0) and angle + int m_nCleave; //0 if not cleaved +}; + +typedef std::list CrystalBondList; + +}// namespace gcu + +#endif // CRYSTAL_BOND_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalcleavage.cc gnome-chemistry-utils-0.10.9/libs/gcu/crystalcleavage.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalcleavage.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalcleavage.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,126 @@ +// -*- C++ -*- + +/* + * Gnome Chemisty Utils + * crystalcleavage.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "crystalcleavage.h" +#include + +namespace gcu +{ + +CrystalCleavage::CrystalCleavage() +{ +} + +CrystalCleavage::~CrystalCleavage() +{ +} + +CrystalCleavage::CrystalCleavage(CrystalCleavage& ccClivage) +{ + m_nh = ccClivage.m_nh ; + m_nk = ccClivage.m_nk ; + m_nl = ccClivage.m_nl ; + m_nPlanes = ccClivage.m_nPlanes ; +} + +CrystalCleavage& CrystalCleavage::operator=(CrystalCleavage& ccClivage) +{ + m_nh = ccClivage.m_nh ; + m_nk = ccClivage.m_nk ; + m_nl = ccClivage.m_nl ; + m_nPlanes = ccClivage.m_nPlanes ; + return *this ; +} + +bool CrystalCleavage::operator==(CrystalCleavage& ccClivage) +{ + return ((m_nh == ccClivage.m_nh) && (m_nk == ccClivage.m_nk) && (m_nl == ccClivage.m_nl)); +} + +xmlNodePtr CrystalCleavage::Save(xmlDocPtr xml) const +{ + xmlNodePtr node; + gchar buf[256]; + node = xmlNewDocNode(xml, NULL, (xmlChar*)"cleavage", NULL); + if (!node) return NULL; + + snprintf(buf, sizeof(buf), "%d", m_nh); + xmlSetProp(node, (xmlChar*)"h", (xmlChar*)buf); + + snprintf(buf, sizeof(buf), "%d", m_nk); + xmlSetProp(node, (xmlChar*)"k", (xmlChar*)buf); + + snprintf(buf, sizeof(buf), "%d", m_nl); + xmlSetProp(node, (xmlChar*)"l", (xmlChar*)buf); + + snprintf(buf, sizeof(buf), "%d", m_nPlanes); + xmlSetProp(node, (xmlChar*)"planes", (xmlChar*)buf); + + return node; +} + +bool CrystalCleavage::Load (xmlNodePtr node) +{ + char *txt; + txt = (char*) xmlGetProp (node, (xmlChar*) "h"); + if (txt) { + if (sscanf (txt, "%d", &m_nh) != 1) { + xmlFree (txt); + return false; + } + xmlFree (txt); + } else + return false; + txt = (char*) xmlGetProp (node, (xmlChar*) "k"); + if (txt) { + if (sscanf(txt, "%d", &m_nk) != 1) { + xmlFree (txt); + return false; + } + xmlFree (txt); + } else + return false; + txt = (char*) xmlGetProp (node, (xmlChar*) "l"); + if (txt) { + if (sscanf(txt, "%d", &m_nl) != 1) { + xmlFree (txt); + return false; + } + xmlFree (txt); + } else + return false; + txt = (char*) xmlGetProp (node, (xmlChar*) "planes"); + if (txt) { + if (sscanf(txt, "%d", &m_nPlanes)!= 1) { + xmlFree (txt); + return false; + } + xmlFree (txt); + } else + return false; + return true; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalcleavage.h gnome-chemistry-utils-0.10.9/libs/gcu/crystalcleavage.h --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalcleavage.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalcleavage.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,126 @@ +// -*- C++ -*- + +/* + * Gnome Chemisty Utils + * crystalcleavage.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef CRYSTAL_CLEAVAGE_H +#define CRYSTAL_CLEAVAGE_H + +#include +#include + +/*!\file*/ +namespace gcu +{ + +/*! \class CrystalCleavage gcu/crystalcleavage.h +Represents cleavages of a cystal along a plane defined by its Miller indices. A defined number +of planes are removed by each cleavage. These are those for which the value hx + ky + lz are the greatest. To +remove planes frome the other side of the crystal, change the sign of the three Miller indices. +*/ +class CrystalCleavage +{ +public: +/* +The default constructor. +*/ + CrystalCleavage (); +/*! +@param ccCleavage: the cleavage instance to copy. + +The copy constructor. +*/ + CrystalCleavage (CrystalCleavage& ccCleavage) ; +/* +The destructor of CrystalAtom. +*/ + virtual ~CrystalCleavage (); + +/*! +@return the number of planes cleaved. +*/ + int& Planes () {return m_nPlanes ;} +/*! +@return the Miller's h index of the cleavage plane. +*/ + int& h () {return m_nh ;} +/*! +@return the Miller's k index of the cleavage plane. +*/ + int& k () {return m_nk ;} +/*! +@return the Miller's l index of the cleavage plane. +*/ + int & l () {return m_nl ;} +/*! +@param ccCleavage: the cleavage to copy. + +@return a CrystalCleavage identical to ccCleavage. +*/ + CrystalCleavage& operator= (CrystalCleavage& ccCleavage) ; +/*! +@param ccCleavage: a CrystalCleavage instance. +@return true if the two cleavages have the same Miller indices and false otherwise. +*/ + bool operator== (CrystalCleavage& ccCleavage) ; +/*! + @param xml: the xmlDoc used to save the document. + + Used to save the cleavage to the xmlDoc. Each serializable Object should implement this virtual method. + @return the xmlNode containing the serialized cleavage. +*/ + xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node: a pointer to the xmlNode containing the serialized cleavage. + +Used to load an CrystalCleavage instance in memory. The CrystalCleavage must already exist. +@return true on succes, false otherwise. +*/ + bool Load (xmlNodePtr node); + +protected: +/*! +Miller's h index. +*/ + int m_nh; +/*! +Miller's k index. +*/ + int m_nk; +/*! +Miller's l index. +*/ + int m_nl; +/*! +Number of planes cleaved. +*/ + int m_nPlanes ; +}; + +/*! +a list of pointers to CrystalCleavage instances derived from std::list. +*/ +typedef std::list CrystalCleavageList; + +} //namespace gcu + +#endif //CRYSTAL_CLEAVAGE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystaldoc.cc gnome-chemistry-utils-0.10.9/libs/gcu/crystaldoc.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/crystaldoc.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystaldoc.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,877 @@ +// -*- C++ -*- + +/* + * Gnome Chemisty Utils + * crystaldoc.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include +#include "crystaldoc.h" +#include "crystalview.h" +#include "cylinder.h" +#include "matrix.h" +#include "sphere.h" +#include "xml-utils.h" +#include +#include +#include +#include +#include +#include +#ifdef HAVE_OPENBABEL_2_2 +# include +#else +# include +#endif +#include +#include + +#define __max(x,y) ((x) > (y)) ? (x) : (y) +#define __min(x,y) ((x) < (y)) ? (x) : (y) +#define PREC 1e-3 + +using namespace OpenBabel; +using namespace std; + +namespace gcu +{ + +gchar const *LatticeName[] = { + "simple cubic", + "body-centered cubic", + "face-centered cubic", + "hexagonal", + "tetragonal", + "body-centered tetragonal", + "orthorhombic", + "base-centered orthorhombic", + "body-centered orthorhombic", + "face-centered orthorhombic", + "rhombohedral", + "monoclinic", + "base-centered monoclinic", + "triclinic" +}; + +#ifdef HAVE_OPENBABEL_2_2 +CrystalDoc::CrystalDoc (Application *App): GLDocument (App), + m_SpaceGroup (NULL) +#else +CrystalDoc::CrystalDoc (Application *App): GLDocument (App) +#endif +{ +} + + +CrystalDoc::~CrystalDoc() +{ + while (!AtomDef.empty ()) { + delete AtomDef.front (); + AtomDef.pop_front (); + } + while (!Atoms.empty ()) { + delete Atoms.front (); + Atoms.pop_front (); + } + while (!LineDef.empty ()) { + delete LineDef.front (); + LineDef.pop_front (); + } + while (!Lines.empty ()) { + delete Lines.front (); + Lines.pop_front (); + } + while (!Cleavages.empty ()) { + delete Cleavages.front (); + Cleavages.pop_front (); + } + while (!m_Views.empty ()) { + m_Views.pop_back (); + } +} + +void CrystalDoc::Reinit() +{ + //destruction of lists + while (!AtomDef.empty ()) { + delete AtomDef.front (); + AtomDef.pop_front (); + } + while (!Atoms.empty ()) { + delete Atoms.front (); + Atoms.pop_front (); + } + while (!LineDef.empty ()) { + delete LineDef.front (); + LineDef.pop_front (); + } + while (!Lines.empty ()) { + delete Lines.front (); + Lines.pop_front (); + } + while (!Cleavages.empty ()) { + delete Cleavages.front (); + Cleavages.pop_front (); + } + Init (); +} + +void CrystalDoc::Init() +{ + m_a = m_b = m_c = 100; + m_alpha = m_beta = m_gamma = 90; + m_lattice = cubic; + m_xmin = m_ymin = m_zmin = 0; + m_xmax = m_ymax = m_zmax = 1; + m_bFixedSize = false; + m_MaxDist = 0; + if (m_Views.size() == 0) + { + CrystalView* pView = CreateNewView(); + m_Views.push_back(pView); + } +} + +void CrystalDoc::ParseXMLTree (xmlNode* xml) +{ + char *old_num_locale, *txt; + xmlNodePtr node; + bool bViewLoaded = false; + + Reinit (); + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + //look for generator node + unsigned version = 0xffffff , major, minor, micro; + node = xml->children; + while (node) { + if (!strcmp ((const char*)(node->name), "generator")) + break; + node = node->next; + } + if (node) { + txt = (char*) xmlNodeGetContent (node); + if (sscanf(txt, "Gnome Crystal %d.%d.%d", &major, &minor, µ) == 3) + version = micro + minor * 0x100 + major * 0x10000; + xmlFree (txt); + } + node = xml->children; + while(node) { + if (!strcmp ((gchar*) node->name, "text")); + else if (!strcmp ((gchar*) node->name, "lattice")) { + txt = (char*) xmlNodeGetContent (node); + int i = 0; + while (strcmp (txt, LatticeName[i]) && (i < 14)) + i++; + if (i < 14) + m_lattice = (gcLattices)i; + xmlFree (txt); +#ifdef HAVE_OPENBABEL_2_2 + } else if (!strcmp ((gchar*) node->name, "group")) { + SpaceGroup *group = new SpaceGroup (); + txt = (char*) xmlGetProp (node, (xmlChar*) "Hall"); + if (txt) { + group->SetHallName (txt); + xmlFree (txt); + } else { + txt = (char*) xmlGetProp (node, (xmlChar*) "HM"); + if (txt) { + group->SetHMName (txt); + xmlFree (txt); + } + } + xmlNodePtr child = node->children; + while (child) { + if (!strcmp ((char const*) child->name, "transform")) { + txt = (char*) xmlNodeGetContent (child); + if (txt) { + group->AddTransform (txt); + xmlFree (txt); + } + } + child = child->next; + } + m_SpaceGroup = group; +#endif + } else if (!strcmp ((gchar*) node->name, "cell")) { + txt = (char*) xmlGetProp (node, (xmlChar*)"a"); + if (txt) { + sscanf (txt, "%lg", &m_a); + xmlFree (txt); + } + txt = (char*) xmlGetProp (node, (xmlChar*) "b"); + if (txt) { + sscanf (txt, "%lg", &m_b); + xmlFree (txt); + } + txt = (char*) xmlGetProp (node, (xmlChar*) "c"); + if (txt) { + sscanf (txt, "%lg", &m_c); + xmlFree (txt); + } + txt = (char*) xmlGetProp (node, (xmlChar*) "alpha"); + if (txt) { + sscanf (txt, "%lg", &m_alpha); + xmlFree (txt); + } + txt = (char*) xmlGetProp (node, (xmlChar*) "beta"); + if (txt) { + sscanf(txt, "%lg", &m_beta); + xmlFree (txt); + } + txt = (char*) xmlGetProp (node, (xmlChar*) "gamma"); + if (txt) { + sscanf(txt, "%lg", &m_gamma); + xmlFree (txt); + } + } else if (!strcmp ((gchar*) node->name, "size")) { + ReadPosition (node, "start", &m_xmin, &m_ymin, &m_zmin); + ReadPosition (node, "end", &m_xmax, &m_ymax, &m_zmax); + txt = (char*) xmlGetProp (node, (xmlChar*) "fixed"); + if (txt) { + if (!strcmp (txt, "true")) + m_bFixedSize = true; + xmlFree (txt); + } + } else if (!strcmp ((gchar*) node->name, "atom")) { + CrystalAtom *pAtom = CreateNewAtom (); + if (pAtom->Load (node)) + AtomDef.push_back (pAtom); + else + delete pAtom; + } else if (!strcmp ((gchar*) node->name, "line")) { + CrystalLine *pLine = CreateNewLine (); + if (pLine->Load (node)) + LineDef.push_back (pLine); + else + delete pLine; + } else if (!strcmp ((gchar*) node->name, "cleavage")) { + CrystalCleavage *pCleavage = CreateNewCleavage (); + if (pCleavage->Load (node)) + Cleavages.push_back (pCleavage); + else + delete pCleavage; + } else if (!strcmp ((gchar*) node->name, "view")) { + if (!bViewLoaded) { + m_Views.front ()->Load (node); //the first view is created with the document + bViewLoaded = true; + } else + LoadNewView (node); + } + node = node->next; + } + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + SetDirty (false); + Update (); +} + +bool CrystalDoc::LoadNewView(xmlNodePtr node) +{ + return true; +} + +CrystalView *CrystalDoc::GetView() +{ + if (m_Views.size() == 0) + { + CrystalView* pView = CreateNewView(); + m_Views.push_back(pView); + } + return m_Views.front(); +} + +void CrystalDoc::Update() +{ + m_Empty = (AtomDef.empty() && LineDef.empty()) ? true : false; + CrystalAtom Atom; + CrystalLine Line; + gdouble alpha = m_alpha * M_PI / 180; + gdouble beta = m_beta * M_PI / 180; + gdouble gamma = m_gamma * M_PI / 180; + // Remove all atoms + while (!Atoms.empty()) + { + delete Atoms.front(); + Atoms.pop_front(); + } + // Remove all bonds + while (!Lines.empty()) + { + delete Lines.front(); + Lines.pop_front(); + } + + //////////////////////////////////////////////////////////// + //Establish list of atoms + CrystalAtomList::iterator i, iend = AtomDef.end (); + +#ifdef HAVE_OPENBABEL_2_2 + if (m_SpaceGroup) { + vector3 v; + list d; + for (i = AtomDef.begin(); i != iend; i++) { + v.x () = (*i)->x (); + v.y () = (*i)->y (); + v.z () = (*i)->z (); + d = m_SpaceGroup->Transform (v); + list::iterator vi, viend = d.end(); + CrystalAtom atom (**i); + for (vi=d.begin (); vi!= viend; vi++) { + atom.SetCoords ((*vi).x(), (*vi).y(), (*vi).z()); + Duplicate (atom); + } + } + } else +#endif + for (i = AtomDef.begin(); i != iend; i++) { + Duplicate(**i); + switch (m_lattice) { + case body_centered_cubic: + case body_centered_tetragonal: + case body_centered_orthorhombic: + Atom = **i; + Atom.Move(0.5, 0.5, 0.5); + Duplicate(Atom); + break; + case face_centered_cubic: + case face_centered_orthorhombic: + Atom = **i; + Atom.Move(0.5, 0, 0.5); + Duplicate(Atom); + Atom = **i; + Atom.Move(0, 0.5, 0.5); + Duplicate(Atom); + case base_centered_orthorhombic: + case base_centered_monoclinic: + Atom = **i; + Atom.Move(0.5, 0.5, 0); + Duplicate(Atom); + break; + default: + break; + } + } + + //////////////////////////////////////////////////////////// + //Establish list of lines + CrystalLineList::iterator j, jend = LineDef.end(); + for (j = LineDef.begin() ; j != jend ; j++) + { + switch ((*j)->Type()) + { + case edges: + Line = **j; + Line.SetPosition(0 ,0, 0, 1, 0, 0); + Duplicate(Line); + Line.SetPosition(0 ,0, 0, 0, 1, 0); + Duplicate(Line); + Line.SetPosition(0 ,0, 0, 0, 0, 1); + Duplicate(Line); + break ; + case diagonals: + Line = **j; + Line.SetPosition(0 ,0, 0, 1, 1, 1); + Duplicate(Line); + Line.SetPosition(1 ,0, 0, 0, 1, 1); + Duplicate(Line); + Line.SetPosition(0 ,1, 0, 1, 0, 1); + Duplicate(Line); + Line.SetPosition(1 ,1, 0, 0, 0, 1); + Duplicate(Line); + break ; + case medians: + Line = **j; + Line.SetPosition(.5, .5, 0, .5, .5, 1); + Duplicate(Line); + Line.SetPosition(0, .5, .5, 1, .5, .5); + Duplicate(Line); + Line.SetPosition(.5, 0, .5, .5, 1, .5); + Duplicate(Line); + break ; + case normal: + Duplicate(**j) ; + switch (m_lattice) + { + case body_centered_cubic: + case body_centered_tetragonal: + case body_centered_orthorhombic: + Line = **j; + Line.Move(0.5, 0.5, 0.5); + Duplicate(Line); + break; + case face_centered_cubic: + case face_centered_orthorhombic: + Line = **j; + Line.Move(0.5, 0, 0.5); + Duplicate(Line); + Line = **j; + Line.Move(0, 0.5, 0.5); + Duplicate(Line); + case base_centered_orthorhombic: + case base_centered_monoclinic: + Line = **j; + Line.Move(0.5, 0.5, 0); + Duplicate(Line); + break; + default: + break; + } + break ; + case unique: + if (((*j)->Xmin() >= m_xmin) && ((*j)->Xmax() <= m_xmax) + && ((*j)->Ymin() >= m_ymin) && ((*j)->Ymax() <= m_ymax) + && ((*j)->Zmin() >= m_zmin) && ((*j)->Zmax() <= m_zmax)) + Lines.push_back(new CrystalLine(**j)) ; + } + } + + //Manage cleavages + CrystalCleavageList::iterator k; + for (k = Cleavages.begin(); k != Cleavages.end(); k++) + { + double x; + std::vector ScalarProducts; + std::vector::iterator m; + unsigned n; + + //scalar products calculus and storing + for (i = Atoms.begin(); i != Atoms.end(); i++) + { + x = (*i)->ScalProd((*k)->h(), (*k)->k(), (*k)->l()); + for (m = ScalarProducts.begin(); m != (ScalarProducts.end()) && ((*m) > (x + PREC)); m++) ; + if ((m == ScalarProducts.end()) || (fabs(*m - x) > PREC)) ScalarProducts.insert(m, x); + } + + //cleave atoms and bonds + if ((n = (*k)->Planes()) >= ScalarProducts.size()) + { + GtkWidget* message = gtk_message_dialog_new(NULL, (GtkDialogFlags) 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, _("Everything has been cleaved")); + g_signal_connect (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), NULL); + gtk_widget_show(message); + for (i = Atoms.begin(); i != Atoms.end(); i++) (*i)->Cleave(); + for (j = Lines.begin(); j != Lines.end(); j++) (*j)->Cleave(); + } + else + { + x = ScalarProducts[n - 1]; + for (i = Atoms.begin(); i != Atoms.end(); i++) + if (x < (*i)->ScalProd((*k)->h(), (*k)->k(), (*k)->l())+ PREC) + (*i)->Cleave() ; + + //bonds cleavage + for (j = Lines.begin(); j != Lines.end(); j++) + if (x < (*j)->ScalProd((*k)->h(), (*k)->k(), (*k)->l())+ PREC) + (*j)->Cleave(); + } + + ScalarProducts.clear() ; + } + + //Transform coordinates to Cartesians and find center of visible view + gdouble x, y, z, d, + xmin = G_MAXDOUBLE, ymin = G_MAXDOUBLE, zmin = G_MAXDOUBLE, + xmax = -G_MAXDOUBLE, ymax = -G_MAXDOUBLE, zmax = -G_MAXDOUBLE; + iend = Atoms.end (); + for (i = Atoms.begin(); i != iend; i++) { + (*i)->NetToCartesian(m_a, m_b, m_c, alpha, beta, gamma); + if ((*i)->IsCleaved ()) + continue; + (*i)->GetCoords (&x, &y, &z); + if (x < xmin) + xmin = x; + if (y < ymin) + ymin = y; + if (z < zmin) + zmin = z; + if (x > xmax) + xmax = x; + if (y > ymax) + ymax = y; + if (z > zmax) + zmax = z; + } + jend = Lines.end (); + for (j = Lines.begin (); j != jend; j++) { + (*j)->NetToCartesian (m_a, m_b, m_c, alpha, beta, gamma); + if ((*j)->IsCleaved ()) + continue; + x = (*j)->Xmin (); + y = (*j)->Ymin (); + z = (*j)->Zmin (); + if (x < xmin) + xmin = x; + if (y < ymin) + ymin = y; + if (z < zmin) + zmin = z; + x = (*j)->Xmax (); + y = (*j)->Ymax (); + z = (*j)->Zmax (); + if (x > xmax) + xmax = x; + if (y > ymax) + ymax = y; + if (z > zmax) + zmax = z; + } + + //Searching the center of the crystal and find maximum distance from center + x = (xmin + xmax) / 2.; + y = (ymin + ymax) / 2.; + z = (zmin + zmax) / 2.; + m_MaxDist = 0; + for (i = Atoms.begin(); i != iend; i++) { + d = (*i)->Distance (x, y, z, m_bFixedSize); + m_MaxDist = __max (m_MaxDist, d); + (*i)->Move (- x, - y, - z); + } + + for (j = Lines.begin(); j != Lines.end(); j++) { + d = (*j)->Distance (x, y, z, m_bFixedSize); + m_MaxDist = __max (m_MaxDist, d); + (*j)->Move (- x, - y, - z); + } +} + +void CrystalDoc::Duplicate (CrystalAtom& Atom) +{ + CrystalAtom AtomX, AtomY, AtomZ ; + AtomX = Atom ; + AtomX.Move (- floor (AtomX.x ()-m_xmin + 1e-7), - floor (AtomX.y ()-m_ymin + 1e-7), - floor (AtomX.z ()-m_zmin + 1e-7)) ; + while (AtomX.x () <= m_xmax + 1e-7) { + AtomY = AtomX ; + while (AtomY.y () <= m_ymax + 1e-7) { + AtomZ = AtomY ; + while (AtomZ.z () <= m_zmax + 1e-7) { + Atoms.push_back (new CrystalAtom (AtomZ)) ; + AtomZ.Move (0,0,1) ; + } + AtomY.Move (0,1,0) ; + } + AtomX.Move (1,0,0) ; + } +} + +void CrystalDoc::Duplicate (CrystalLine& Line) +{ + CrystalLine LineX, LineY, LineZ ; + LineX = Line ; + LineX.Move (- floor (LineX.Xmin ()-m_xmin + 1e-7), - floor (LineX.Ymin ()-m_ymin + 1e-7), - floor (LineX.Zmin ()-m_zmin + 1e-7)) ; + while (LineX.Xmax () <= m_xmax + 1e-7) { + LineY = LineX ; + while (LineY.Ymax () <= m_ymax + 1e-7) { + LineZ = LineY ; + while (LineZ.Zmax () <= m_zmax + 1e-7) { + Lines.push_back (new CrystalLine (LineZ)) ; + LineZ.Move (0,0,1) ; + } + LineY.Move (0,1,0) ; + } + LineX.Move (1,0,0) ; + } +} + +void CrystalDoc::Draw (Matrix const &m) const +{ + vector3 v, v1; + Sphere sp (10); + glEnable (GL_RESCALE_NORMAL); + CrystalAtomList::const_iterator i, iend = Atoms.end (); + double red, green, blue, alpha; + for (i = Atoms.begin (); i != iend; i++) + if (!(*i)->IsCleaved ()) { + (*i)->GetCoords (&v.z (), &v.x (), &v.y ()); + v = m * v; + (*i)->GetColor (&red, &green, &blue, &alpha); + glColor4d (red, green, blue, alpha) ; + sp.draw (v, (*i)->r () * (*i)->GetEffectiveRadiusRatio ()); + } + glEnable (GL_NORMALIZE); + CrystalLineList::const_iterator j, jend = Lines.end (); + Cylinder cyl (10); + for (j = Lines.begin (); j != jend; j++) + if (!(*j)->IsCleaved ()) { + v.z () = (*j)->X1 (); + v.x () = (*j)->Y1 (); + v.y () = (*j)->Z1 (); + v = m * v; + v1.z () = (*j)->X2 (); + v1.x () = (*j)->Y2 (); + v1.y () = (*j)->Z2 (); + v1 = m * v1; + (*j)->GetColor (&red, &green, &blue, &alpha); + glColor4d (red, green, blue, alpha) ; + cyl.draw (v, v1, (*j)->GetRadius ()); + } +} + +CrystalView* CrystalDoc::CreateNewView() +{ + return new CrystalView(this); +} + +CrystalAtom* CrystalDoc::CreateNewAtom() +{ + return new CrystalAtom(); +} + +CrystalLine* CrystalDoc::CreateNewLine() +{ + return new CrystalLine(); +} + +CrystalCleavage* CrystalDoc::CreateNewCleavage() +{ + return new CrystalCleavage(); +} + +const char* CrystalDoc::GetProgramId() const +{ + return NULL; +} + +xmlDocPtr CrystalDoc::BuildXMLTree () const +{ + gchar buf[256]; + xmlDocPtr xml; + xmlNodePtr node; + xmlNsPtr ns; + char *old_num_locale; + + xml = xmlNewDoc((xmlChar*)"1.0"); + if (xml == NULL) {throw(1);} + + old_num_locale = g_strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + xmlDocSetRootElement (xml, xmlNewDocNode(xml, NULL, (xmlChar*)"crystal", NULL)); + ns = xmlNewNs (xml->children, (xmlChar*) "http://www.nongnu.org/gcrystal", (xmlChar*) "gcry"); + xmlSetNs (xml->children, ns); + + try + { + node = xmlNewDocNode(xml, NULL, (xmlChar*)"generator", (xmlChar*)GetProgramId()); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; + + node = xmlNewDocNode(xml, NULL, (xmlChar*)"lattice", (xmlChar*)LatticeName[m_lattice]); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; +#ifdef HAVE_OPENBABEL_2_2 + if (m_SpaceGroup) { + node = xmlNewDocNode (xml, NULL, (xmlChar*) "group", NULL); + if (node) + xmlAddChild (xml->children, node); + else + throw (int) 0; + string name = m_SpaceGroup->GetHallName (); + if (name.length () != 0) + xmlNewProp (node, (xmlChar*) "Hall", (xmlChar*) name.c_str ()); + else { + name = m_SpaceGroup->GetHMName (); + if (name.length () != 0) + xmlNewProp (node, (xmlChar*) "HM", (xmlChar*) name.c_str ()); + } + xmlNodePtr child; + transform3dIterator i; + transform3d const *t = m_SpaceGroup->BeginTransform (i); + while (t) { + child = xmlNewDocNode (xml, NULL, (xmlChar*) "transform", (xmlChar const*) t->DescribeAsString ().c_str ()); + if (child) + xmlAddChild (node, child); + else + throw (int) 0; + t = m_SpaceGroup->NextTransform (i); + } + } +#endif + node = xmlNewDocNode(xml, NULL, (xmlChar*)"cell", NULL); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; + snprintf(buf, sizeof(buf), "%g", m_a); + xmlNewProp(node, (xmlChar*)"a", (xmlChar*)buf); + snprintf(buf, sizeof(buf), "%g", m_b); + xmlNewProp(node, (xmlChar*)"b", (xmlChar*)buf); + snprintf(buf, sizeof(buf), "%g", m_c); + xmlNewProp(node, (xmlChar*)"c", (xmlChar*)buf); + snprintf(buf, sizeof(buf), "%g", m_alpha); + xmlNewProp(node, (xmlChar*)"alpha", (xmlChar*)buf); + snprintf(buf, sizeof(buf), "%g", m_beta); + xmlNewProp(node, (xmlChar*)"beta", (xmlChar*)buf); + snprintf(buf, sizeof(buf), "%g", m_gamma); + xmlNewProp(node, (xmlChar*)"gamma", (xmlChar*)buf); + + node = xmlNewDocNode(xml, NULL, (xmlChar*)"size", NULL); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; + WritePosition(xml, node, "start", m_xmin, m_ymin, m_zmin); + WritePosition(xml, node, "end", m_xmax, m_ymax, m_zmax); + if (m_bFixedSize) + xmlNewProp (node, (xmlChar *) "fixed", (xmlChar *) "true"); + + CrystalAtomList::const_iterator i; + for (i = AtomDef.begin(); i != AtomDef.end(); i++) + { + node = (*i)->Save(xml); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; + } + + CrystalLineList::const_iterator j; + for (j = LineDef.begin(); j != LineDef.end(); j++) + { + node = (*j)->Save(xml); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; + } + + CrystalCleavageList::const_iterator k; + for (k = Cleavages.begin(); k != Cleavages.end(); k++) + { + node = (*k)->Save(xml); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; + } + + list::const_iterator view; + for (view = m_Views.begin(); view != m_Views.end(); view++) + { + node = (*view)->Save(xml); + if (node) xmlAddChild(xml->children, node); else throw (int) 0; + } + + setlocale(LC_NUMERIC, old_num_locale); + g_free(old_num_locale); + + return xml; + } + catch (int num) + { + xmlFreeDoc(xml); + setlocale(LC_NUMERIC, old_num_locale); + g_free(old_num_locale); + return NULL; + } +} + +#ifdef HAVE_OPENBABEL_2_2 +bool CrystalDoc::ImportOB (OBMol &mol) +{ + OBUnitCell *cell = dynamic_cast (mol.GetData (OBGenericDataType::UnitCell)); + if (cell == NULL) + return false; + m_a = cell->GetA () * 100; + m_b = cell->GetB () * 100; + m_c = cell->GetC () * 100; + m_alpha = cell ->GetAlpha (); + m_beta = cell->GetBeta (); + m_gamma = cell->GetGamma (); + string const group_name = cell->GetSpaceGroupName (); + m_SpaceGroup = cell->GetSpaceGroup (); + if (!m_SpaceGroup) + return false; + int lattice = cell->GetLatticeType (); + switch (lattice) { + case OBUnitCell::Triclinic: + m_lattice = triclinic; + break; + case OBUnitCell::Monoclinic: + switch (group_name[0]) { + case 'C': + m_lattice = base_centered_monoclinic; + break; + default: + m_lattice = monoclinic; + break; + } + break; + case OBUnitCell::Orthorhombic: + switch (group_name[0]) { + case 'C': + m_lattice = base_centered_orthorhombic; + break; + case 'I': + m_lattice = body_centered_orthorhombic; + break; + case 'F': + m_lattice = face_centered_orthorhombic; + break; + default: + m_lattice = orthorhombic; + break; + } + break; + case OBUnitCell::Tetragonal: + switch (group_name[0]) { + case 'I': + m_lattice = body_centered_tetragonal; + break; + default: + m_lattice = tetragonal; + break; + } + break; + case OBUnitCell::Rhombohedral: + m_lattice = rhombohedral; + break; + case OBUnitCell::Hexagonal: + m_lattice = hexagonal; + break; + case OBUnitCell::Cubic: + switch (group_name[0]) { + case 'I': + m_lattice = body_centered_cubic; + break; + case 'F': + m_lattice = face_centered_cubic; + break; + default: + m_lattice = cubic; + break; + } + break; + } + matrix3x3 m = cell->GetFractionalMatrix (); + vector3 v; + // now get the atoms + OBAtomIterator it; + OBAtom *atom = mol.BeginAtom (it); + CrystalAtom *catom; + GcuAtomicRadius radius; + radius.type = GCU_VAN_DER_WAALS; + radius.charge = 0; + radius.cn = -1; + radius.spin = GCU_N_A_SPIN; + radius.scale = NULL; + while (atom) { + v.x () = atom->GetX(); + v.y () = atom->GetY(); + v.z () = atom->GetZ(); + v *= m; + radius.Z = atom->GetAtomicNum (); + catom = new CrystalAtom (radius.Z, v.x (), v.y (), v.z ()); + if (gcu_element_get_radius (&radius)) { + catom->SetRadius (radius); + catom->SetEffectiveRadiusRatio (.4); + } + AtomDef.push_back (catom); + atom = mol.NextAtom (it); + } + LineDef.push_back (new CrystalLine (edges, 0., 0., 0., 0., 0., 0., 10., .25 , .25, .25 , 1.)); + Update (); + return true; +} +#endif + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystaldoc.h gnome-chemistry-utils-0.10.9/libs/gcu/crystaldoc.h --- gnome-chemistry-utils-0.8.6/libs/gcu/crystaldoc.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystaldoc.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,284 @@ +// -*- C++ -*- + +/* + * Gnome Chemisty Utils + * crystaldoc.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef CRYSTAL_DOC_H +#define CRYSTAL_DOC_H + +#include +#include +#include "chemistry.h" +#include "crystalatom.h" +#include "crystalbond.h" +#include "crystalline.h" +#include "crystalcleavage.h" +#include "document.h" +#include +#ifdef HAVE_OPENBABEL_2_2 +# include +# include +#endif + +/*!\file*/ +namespace gcu +{ + +class CrystalView; +class Matrix; + +/*!\enum gcLattices crystalviewer/crystaldoc.h +This enumeration gives sympolic names to the fourteen Bravais lattices. + +Possible values are: +- cubic +- body_centered_cubic +- face_centered_cubic +- hexagonal +- tetragonal +- body_centered_tetragonal +- orthorhombic +- base_centered_orthorhombic +- body_centered_orthorhombic +- face_centered_orthorhombic +- rhombohedral +- monoclinic +- base_centered_monoclinic +- triclinic +*/ +enum gcLattices {cubic=0, + body_centered_cubic, + face_centered_cubic, + hexagonal, + tetragonal, + body_centered_tetragonal, + orthorhombic, + base_centered_orthorhombic, + body_centered_orthorhombic, + face_centered_orthorhombic, + rhombohedral, + monoclinic, + base_centered_monoclinic, + triclinic +}; + +/*!\class CrystalDoc gcu/crystaldoc.h +The document containing the crystal structure. +*/ +class CrystalDoc: public GLDocument +{ +public: +/*! +The constructor of CrystalDoc +*/ + CrystalDoc (Application *App); +/*! +The destructor of CrystalDoc +*/ + virtual ~CrystalDoc (); + +/*! +@param xml: a pointer to the root xmlNode of the xmlDoc containing the definition of the crystal. + +Analyses the contents of the XML document and builds the cryatl structure from the data. Typical usage is: +\code +CrystalDoc* crystal = new CrystalDoc(); +xmlDocPtr doc = xmlParseFile(filename); +crystal->ParseXMLTree(doc->children); +\endcode +*/ + void ParseXMLTree (xmlNode* xml); +/*! +This method must be called when a new document is loaded or when the definition of the crystal is changed. It recalculates +everything and updates all the views. +*/ + void Update (); +/*! +@return a pointer to the first CrystalView of the document. The view will be created if it does not already exist. +*/ + CrystalView* GetView (); + +/*! +@param m the Matrix giving the current model orientation + +Displays the molecule using OpenGL. +*/ + void Draw (Matrix const &m) const; + +/*! +Creates a view of the document. This method should be overrided by programs deriving a new view class from +CrystalView. + +@return a pointer to the new CrystalView instance. +*/ + virtual CrystalView* CreateNewView (); +/*! +Creates a new atom. This method should be overrided by programs deriving a new view class from +CrystalAtom. + +@return a pointer to the new CrystalAtom instance. +*/ + virtual CrystalAtom* CreateNewAtom (); +/*! +Creates a new line. This method should be overrided by programs deriving a new view class from +CrystalLine. + +@return a pointer to the new CrystalLine instance. +*/ + virtual CrystalLine* CreateNewLine (); +/*! +Creates a new cleavage. This method should be overrided by programs deriving a new line class from +CrystalCleavage +@return a pointer to the new CrystalCleavage instance. +*/ + virtual CrystalCleavage* CreateNewCleavage (); +/*! +Builds the xmlDoc corresponding to the crystal structure. +@return a pointer to the XML document. +*/ + xmlDocPtr BuildXMLTree () const; +/*! +@return the identity of the program as saved in files in the generator tag. This method should be overrided +by programs able to save crystal structures in XML files conforming to gcrystal.dtd. It is used mainly to ensure +compatiblity with files created by older versions of the program. +*/ + virtual const char* GetProgramId () const; + +#ifdef HAVE_OPENBABEL_2_2 + bool ImportOB (OpenBabel::OBMol &mol); +#endif + +protected: +/*! +Initialize a new CrystalDoc instance. +*/ + void Init (); +/*! +Reinitialize a CrystalDoc instance. Used when loading a file in an already existing document. +*/ + void Reinit (); +/*! +@param node: the xmlNode containing the serialized view. + +Loads a view from a XML document. This methd must be overrided by applications supporting multiple views. +*/ + virtual bool LoadNewView (xmlNodePtr node); + +private: + void Duplicate (CrystalAtom& Atom); + void Duplicate (CrystalLine& Line); + +protected: +/*! +The Bravais lattice of the crystal. +*/ + gcLattices m_lattice; +/*! +The a parameter of the unit cell. +*/ + gdouble m_a; +/*! +The b parameter of the unit cell. +*/ + gdouble m_b; +/*! +The c parameter of the unit cell. +*/ + gdouble m_c; +/*! +The alpha angle of the unit cell. +*/ + gdouble m_alpha; +/*! +The beta angle of the unit cell. +*/ + gdouble m_beta; +/*! +The gamma angle of the unit cell. +*/ + gdouble m_gamma; +/*! +The minimum x coordinate in the representation of the crystal structure. +*/ + gdouble m_xmin; +/*! +The minimum y coordinate in the representation of the crystal structure. +*/ + gdouble m_ymin; +/*! +The minimum z coordinate in the representation of the crystal structure. +*/ + gdouble m_zmin; +/*! +The maximum x coordinate in the representation of the crystal structure. +*/ + gdouble m_xmax; +/*! +The maximum y coordinate in the representation of the crystal structure. +*/ + gdouble m_ymax; +/*! +The maximum z coordinate in the representation of the crystal structure. +*/ + gdouble m_zmax; +/*! +true if cleavages must not change positions in the view. +*/ + gboolean m_bFixedSize; //true if cleavages must not change positions in the view +/*! +List of the atoms in the definition of the crystal +*/ + CrystalAtomList AtomDef; +/*! +List of the atoms displayed. +*/ + CrystalAtomList Atoms; +/*! +List of the lines in the definition of the crystal +*/ + CrystalLineList LineDef; +/*! +List of the lines displayed. +*/ + CrystalLineList Lines; +/*! +List of the cleavages defined. +*/ + CrystalCleavageList Cleavages; +/*! +List of the views of the document. +*/ + std::list m_Views; + +#ifdef HAVE_OPENBABEL_2_2 +/*! +The space group associated with the lattice. +*/ + OpenBabel::SpaceGroup const *m_SpaceGroup; +#endif +}; + +extern gchar const *LatticeName[]; + +} //namespace gcu + +#endif //CRYSTAL_DOC_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalline.cc gnome-chemistry-utils-0.10.9/libs/gcu/crystalline.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalline.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalline.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,324 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * crystalline.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "crystalline.h" +#include "xml-utils.h" +#include +#include +#include +#include +#include + +#define __max(x,y) ((x) > (y)) ? (x) : (y) +#define __min(x,y) ((x) < (y)) ? (x) : (y) +#define square(x) ((x)*(x)) + +namespace gcu +{ + +char const *LineTypeName[] = { + "edges", + "diagonals", + "medians", + "normal", + "unique" +}; + +CrystalLine::CrystalLine() +{ + m_dx = m_dy = m_dz = m_dx2 = m_dy2 = m_dz2 = m_dl = m_dr = 0.0; + m_fRed = m_fBlue = m_fGreen = 0.0; + m_fAlpha = 1.0; + m_dxrot = m_dyrot = m_darot = 0; + m_nType = edges; + m_nCleave = 0; +} + +CrystalLine::~CrystalLine() +{ +} + + +CrystalLine::CrystalLine(CrystalLineType Type, double X1, double Y1, double Z1, double X2, double Y2, double Z2, double r, float red, float green, float blue, float alpha) +{ + m_nCleave = 0 ; + m_nType = Type; + SetPosition(X1, Y1, Z1, X2, Y2, Z2) ; + m_dr = r ; + SetColor(red, green, blue, alpha) ; +} + +CrystalLine::CrystalLine(CrystalLine& clLine) +{ + m_nCleave = 0 ; + m_dx = clLine.m_dx ; + m_dy = clLine.m_dy ; + m_dz = clLine.m_dz ; + m_dx2 = clLine.m_dx2 ; + m_dy2 = clLine.m_dy2 ; + m_dz2 = clLine.m_dz2 ; + m_dxrot = clLine.m_dxrot ; + m_dyrot = clLine.m_dyrot ; + m_darot = clLine.m_darot ; + m_dr = clLine.m_dr ; + m_dl = clLine.m_dl ; + m_fRed = clLine.m_fRed ; + m_fGreen = clLine.m_fGreen ; + m_fBlue = clLine.m_fBlue ; + m_fAlpha = clLine.m_fAlpha ; + m_nType = clLine.m_nType ; +} + +CrystalLine& CrystalLine::operator=(CrystalLine& clLine) +{ + m_dx = clLine.m_dx ; + m_dy = clLine.m_dy ; + m_dz = clLine.m_dz ; + m_dx2 = clLine.m_dx2 ; + m_dy2 = clLine.m_dy2 ; + m_dz2 = clLine.m_dz2 ; + m_dxrot = clLine.m_dxrot ; + m_dyrot = clLine.m_dyrot ; + m_darot = clLine.m_darot ; + m_dr = clLine.m_dr ; + m_dl = clLine.m_dl ; + m_fRed = clLine.m_fRed ; + m_fGreen = clLine.m_fGreen ; + m_fBlue = clLine.m_fBlue ; + m_fAlpha = clLine.m_fAlpha ; + m_nType = clLine.m_nType ; + return *this ; +} + +void CrystalLine::SetPosition(double x, double y, double z, double x1, double y1, double z1) +{ + m_dx = x ; + m_dy = y ; + m_dz = z ; + m_dx2 = x1 ; + m_dy2 = y1 ; + m_dz2 = z1 ; + //vector coordinates + x1 -= x ; + y1 -= y ; + z1 -= z ; + m_dl = sqrt(square(x1) + square(y1) + square(z1)) ; + //normalization + x = sqrt(square(y1) + square(z1)) ; + //vectorial product + if (x > 0) + { + m_dxrot = - z1 / x ; + m_dyrot = y1 / x ; + m_darot = atan2(x, x1) * 90 / 1.570796326794897 ; + } + else + { + m_dxrot = 0; + if (x1 > 0) m_dyrot = m_darot = 0.0; + else + { + m_dyrot = 1.0; + m_darot = 180.0; + } + } +} + +void CrystalLine::SetColor(float red, float green, float blue, float alpha) +{ + m_fRed = red ; + m_fGreen = green ; + m_fBlue = blue ; + m_fAlpha = alpha ; +} + +void CrystalLine::GetColor(double *red, double *green, double *blue, double *alpha) +{ + *red = m_fRed ; + *green = m_fGreen ; + *blue = m_fBlue ; + *alpha = m_fAlpha ; +} + +void CrystalLine::SetRadius(double r) +{ + m_dr = r ; +} + +bool CrystalLine::operator==(CrystalLine& clLine) +{ + if (m_nType <= 2) return m_nType == clLine.m_nType ; + return (m_dx == clLine.m_dx) && + (m_dy == clLine.m_dy) && + (m_dz == clLine.m_dz) && + (m_dx2 == clLine.m_dx2) && + (m_dy2 == clLine.m_dy2) && + (m_dz2 == clLine.m_dz2) && + (m_nType == clLine.m_nType) ; +} + +void CrystalLine::Move(double x, double y, double z) +{ + m_dx += x ; + m_dy += y ; + m_dz += z ; + m_dx2 += x ; + m_dy2 += y ; + m_dz2 += z ; +} + +double CrystalLine::ScalProd(int h, int k, int l) +{ + return __max(m_dx * h + m_dy * k + m_dz * l, X2() * h + Y2() * k + Z2() * l) ; +} + + +double CrystalLine::Distance(double x, double y, double z, bool bFixe) +{ + if ((m_nCleave > 0) && !bFixe) return 0 ; + return __max( sqrt(square(m_dx - x) + square(m_dy - y) + square(m_dz - z)), + sqrt(square(X2() - x) + square(Y2() - y) + square(Z2() - z))) ; +} + +void CrystalLine::NetToCartesian(double a, double b, double c, double alpha, double beta, double gamma) +{ + double x = m_dx * a ; + double y = m_dy * b ; + double z = m_dz * c ; + double x2 = X2() * a ; + double y2 = Y2() * b ; + double z2 = Z2() * c ; + SetPosition(x * sqrt(1-square(cos(beta)) - square((cos(gamma) - cos(beta)*cos(alpha))/sin(alpha))), + x * (cos(gamma) - cos(beta)*cos(alpha))/sin(alpha) + y * sin(alpha), + (x * cos(beta) + y * cos(alpha) + z), + x2 * sqrt(1-square(cos(beta)) - square((cos(gamma) - cos(beta)*cos(alpha))/sin(alpha))), + x2 * (cos(gamma) - cos(beta)*cos(alpha))/sin(alpha) + y2 * sin(alpha), + (x2 * cos(beta) + y2 * cos(alpha) + z2)) ; +} + +double CrystalLine::Xmax() +{ + return __max(m_dx, m_dx2) ; +} + +double CrystalLine::Ymax() +{ + return __max(m_dy, m_dy2) ; +} + +double CrystalLine::Zmax() +{ + return __max(m_dz, m_dz2) ; +} + +double CrystalLine::Xmin() +{ + return __min(m_dx, m_dx2) ; +} + +double CrystalLine::Ymin() +{ + return __min(m_dy, m_dy2) ; +} + +double CrystalLine::Zmin() +{ + return __min(m_dz, m_dz2) ; +} + +void CrystalLine::GetRotation(double & x, double & y, double & z, double & theta) +{ + x = m_dy - m_dy2; + y = m_dx2 - m_dx; + double d = sqrt(square(x) + square(y)); + if (d > 1e-3) + { + theta = atan2(d, m_dz2 - m_dz); + x /= d; + y /= d; + z = 0; + } + else + { + z = 1.0; + theta = 0; + } +} + +xmlNodePtr CrystalLine::Save(xmlDocPtr xml) const +{ + xmlNodePtr parent, child; + gchar buf[256]; + parent = xmlNewDocNode(xml, NULL, (xmlChar*)"line", NULL); + if (!parent) return NULL; + + xmlSetProp (parent, (xmlChar*) "type", (xmlChar*) LineTypeName[m_nType]); + + g_snprintf(buf, sizeof(buf) - 1, "%g", m_dr); + child = xmlNewDocNode(xml, NULL, (xmlChar*)"radius", (xmlChar*)buf); + if (child) xmlAddChild(parent, child); + else {xmlFreeNode(parent); return NULL;} + + if (((m_nType > 2) && (((!WritePosition(xml, parent, "start", m_dx, m_dy, m_dz))) || + (!WritePosition(xml, parent, "end", m_dx2, m_dy2, m_dz2)))) || + (!WriteColor(xml, parent, NULL, m_fRed, m_fGreen, m_fBlue, m_fAlpha))) + {xmlFreeNode(parent); return NULL;} + + return parent; +} + +bool CrystalLine::Load (xmlNodePtr node) +{ + char *txt; + txt = (char*) xmlGetProp (node, (xmlChar*) "type"); + if (!txt) + return false; + int i = 0; + while (strcmp (txt, LineTypeName[i]) && (i < 5)) + i++; + xmlFree (txt); + if (i < 5) + m_nType = (CrystalLineType) i; + else + return false; + if (((m_nType > 2) && ((!ReadPosition (node, "start", &m_dx, &m_dy, &m_dz)) || + (!ReadPosition (node, "end", &m_dx2, &m_dy2, &m_dz2)))) || + (!ReadColor (node, NULL, &m_fRed, &m_fGreen, &m_fBlue, &m_fAlpha))) + return false; + xmlNodePtr child = node->children; + while (child) { + if (!strcmp ((gchar*) child->name, "radius")) { + txt = (char*) xmlNodeGetContent (child); + sscanf (txt, "%lg", &m_dr); + xmlFree (txt); + break; + } + child = child->next; + } + if (m_dr == 0) + return false; + return true; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalline.h gnome-chemistry-utils-0.10.9/libs/gcu/crystalline.h --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalline.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalline.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,357 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * crystalline.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef CRYSTAL_LINE_H +#define CRYSTAL_LINE_H + +#include +#include + +/*!\file*/ +namespace gcu +{ + +/*!\enum CrystalLineType crystalviewer/crystalline.h +The type of a CrystalLine instance. Possible values are: +- edges: all the cell edges. +- diagonals: the lines joining opposite vertices of a cell. +- medians: the lines joining the centers of opposite faces of a cell. +- normal: a line with defined ends, repeated in each displayes cell. +- unique: a line with defined ends, not repeated. +*/ +enum CrystalLineType +{ + edges = 0, + diagonals, + medians, + normal, + unique +}; + +/*!\class CrystalLine gcu/crystalline.h +Describes lines represented as cylinders in the view. Thes cylinders are not capped. +*/ +class CrystalLine +{ +public: +/*! +The default constructor of CrystalLine. +*/ + CrystalLine (); +/*! +The destructior of CrystaLine +*/ + virtual ~CrystalLine (); + +public : +/*! +@param Type: the type (CrystalLineType) of the new line. +@param X1: the x coordinate of the first end of the new line. +@param Y1: the y coordinate of the first end of the new line. +@param Z1: the z coordinate of the first end of the new line. +@param X2: the x coordinate of the second end of the new line. +@param Y2: the y coordinate of the second end of the new line. +@param Z2: the z coordinate of the second end of the new line. +@param r: the radius of the cylinder which will represent the new line. +@param red: the red component of the cylinder which will represent the new line. +@param green: the green component of the cylinder which will represent the new line. +@param blue: the blue component of the cylinder which will represent the new line. +@param alpha: the alpha component of the cylinder which will represent the new line. + +Constructs a new line from its characterisitics. +*/ + CrystalLine (CrystalLineType Type, double X1, double Y1, double Z1, double X2, double Y2, double Z2, double r, float red, float green, float blue, float alpha); +/*! +@param clLine: the line to duplicate. + +Creates a new line with the same characteristics as clLine. +*/ + CrystalLine (CrystalLine& clLine); +/*! +@param clLine: the line to copy. + +Copies a line. +@return the copied line. +*/ + CrystalLine& operator= (CrystalLine& clLine); + +/*! +@return the x coordinate of the first end of the line. +*/ + double X1 (void) {return m_dx;} +/*! +@return the y coordinate of the first end of the line. +*/ + double Y1 (void) {return m_dy;} +/*! +@return the z coordinate of the first end of the line. +*/ + double Z1 (void) {return m_dz;} +/*! +@return the x coordinate of the second end of the line. +*/ + double X2 (void) {return m_dx2;} +/*! +@return the y coordinate of the second end of the line. +*/ + double Y2 (void) {return m_dy2;} +/*! +@return the z coordinate of the second end of the line. +*/ + double Z2 (void) {return m_dz2;} +/*! +@return the greatest x coordinate of the line. +*/ + double Xmax (); +/*! +@return the greatest y coordinate of the line. +*/ + double Ymax (); +/*! +@return the greatest z coordinate of the line. +*/ + double Zmax (); +/*! +@return the lowest x coordinate of the line. +*/ + double Xmin (); +/*! +@return the lowest y coordinate of the line. +*/ + double Ymin (); +/*! +@return the lowest z coordinate of the line. +*/ + double Zmin (); +/*! +@return the length of the line. +*/ + double Long () {return m_dl;} +/*! +@return the type of the line (see CrystalLineType). +*/ + CrystalLineType Type () {return m_nType;} +/*! +@param x: the new x coordinate of the first end of the new line. +@param y: the new y coordinate of the first end of the new line. +@param z: the new z coordinate of the first end of the new line. +@param x1: the new x coordinate of the second end of the new line. +@param y1: the new y coordinate of the second end of the new line. +@param z1: the new z coordinate of the second end of the new line. + +Moves a line to a new position. +*/ + void SetPosition (double x, double y, double z, double x1, double y1, double z1); +/*! +@param red: the red component of the new color of the line. +@param green: the green component of the new color of the line. +@param blue: the blue component of the new color of the line. +@param alpha: the alpha component of the new color of the line. + +Changes the color used to display the line. +*/ + void SetColor (float red, float green, float blue, float alpha); +/*! +@param red: a pointer to the location to which the red component of the color of the line will be copied. +@param green: a pointer to the location to which the green component of the new color of the line will be copied. +@param blue: a pointer to the location to which the blue component of the new color of the line will be copied. +@param alpha: a pointer to the location to which the alpha component of the new color of the line will be copied. + +Gets the components of the color used to display the line. +*/ + void GetColor (double *red, double *green, double *blue, double *alpha); +/*! +@param r: the new radius of the cylinder representing the line. + +Changes the radius of the cylinder used to represent the line. +*/ + void SetRadius (double r); +/*! +@return the radius of the cylinder used to represent the line. +*/ + double GetRadius () {return m_dr;}; +/*! +@param clLine: a CrystalLine instance. +@return true if the two lines have the same type and the same position. +*/ + bool operator== (CrystalLine& clLine); +/*! +@param x: the x component of the transation vector. +@param y: the y component of the transation vector. +@param z: the z component of the transation vector. + +Used to move a line. +*/ + virtual void Move (double x, double y, double z); +/*! +@param h: the h Miller index of a plane. +@param k: the k Miller index of a plane. +@param l: the l Miller index of a plane. + +@return the product hx+ky+lz where x, y and z are the coordinates of one of the ends the line. +The end giving the largest value is retained for the calculus. +This makes sense only if coordinates are related to the net and are not the cartesian coordinates. +This method should not be called after NetToCartesian(). +*/ + double ScalProd (int h, int k, int l); +/*! +Method used to cleave a line. The inverse operation does not exist since the whole crystal must be recalculated +after a change in the definition. +*/ + void Cleave () {m_nCleave++;} +/*! +@param a: the a parameter of the unit cell. +@param b: the b parameter of the unit cell. +@param c: the c parameter of the unit cell. +@param alpha: the alpha angle of the unit cell. +@param beta: the beta angle of the unit cell. +@param gamma: the gamma angle of the unit cell. + +Converts the coordinates of the line from net related ones to cartesian. Initially, lines are defined by their +position relative to the unit cell and the coordinates must be transformed to the cartesian ones before +displaying the line. +*/ + void NetToCartesian (double a, double b, double c, double alpha, double beta, double gamma); +/*! +@param x: the x coordinate of the center. +@param y: the y coordinate of the center. +@param z: the z coordinate of the center. +@param bFixed: tells if cleaved lines are taken into account. + +This helper method is called when searching for the size of the crystal. When some cleavages are defined, +the procedure cn take into account lines cleaved to get the same position in the view for the cleaved crystal +than for the whole crystal. If bFixed is true, all lines are taken into account. + +@return the largest distance of the line to the center of the view or 0 if bFixed is false and the line cleaved. +*/ + double Distance (double x, double y, double z, bool bFixed); +/*! +@return true if the line is cleaved by at least one cleavage or false if the line is not cleaved at all. +*/ + bool IsCleaved () {return m_nCleave != 0;} +/*! +@param x: the x component of the vector of the rotation axis. +@param y: the y component of the vector of the rotation axis. +@param z: the z component of the vector of the rotation axis. +@param th: the angle of the rotation. + +This helper method is used to get the orientation of the line relative to the z axis. It is used when exporting to the +VRML format. +*/ + void GetRotation (double& x, double& y, double& z, double& th); +/*! +@param xml: the xmlDoc used to save the document. + +Saves the line. +@return the xmlnode containing the description of the line. +*/ + virtual xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node: a pointer to the xmlNode containing the serialized line. + +Loads a line from the XML document. +*/ + virtual bool Load (xmlNodePtr node); + +protected : +/*! +The blue component of the color of the cylinder representing the line. +*/ + float m_fBlue; +/*! +The red component of the color of the cylinder representing the line. +*/ + float m_fRed; +/*! +The green component of the color of the cylinder representing the line. +*/ + float m_fGreen; +/*! +The alpha component of the color of the cylinder representing the line. +*/ + float m_fAlpha; +/*! +The x coordinate of the first end of the line. +*/ + double m_dx; +/*! +The y coordinate of the first end of the line. +*/ + double m_dy; +/*! +The z coordinate of the first end of the line. +*/ + double m_dz; +/*! +The x coordinate of the second end of the line. +*/ + double m_dx2; +/*! +The x coordinate of the second end of the line. +*/ + double m_dy2; +/*! +The x coordinate of the second end of the line. +*/ + double m_dz2; +/*! +The radius of the cylinder representing the line. +*/ + double m_dr; +/*! +When cleavages (see CrystalCleavage class documentation) are defined, the line might be cleaved. m_nCleave is +the number of CrystalCleavage instances which remove the line. If this member is not 0, the line will +not be displayed. +*/ + int m_nCleave; //0 if not cleaved +/*! +The type of the CrystalLine instance. Possible values are: +- edges: all the cell edges. +- diagonals: the lines joining opposite vertices of a cell. +- medians: the lines joining the centers of opposite faces of a cell. +- normal: a line with defined ends, repeated in each displayes cell. +- unique: a line with defined ends, not repeated. +*/ + CrystalLineType m_nType; + +private: + double m_dl; + double m_dxrot; + double m_dyrot; + double m_darot;//rotation axis coordinates (z = 0) and angle +}; + +/*! +a list of pointers to CrystalLine instances derived from std::list. +*/ +typedef std::list CrystalLineList; + +/*! +an array of the line types names used for serialization. +*/ +extern char const *LineTypeName[]; + +}// namespace gcu + +#endif // CRYSTAL_BOND_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalview.cc gnome-chemistry-utils-0.10.9/libs/gcu/crystalview.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalview.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalview.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,120 @@ +/* + * Gnome Chemisty Utils + * crystalview.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "crystalview.h" +#include "crystaldoc.h" +#include "matrix.h" +#include "xml-utils.h" +#include +#include +#include +#include +#include +#include + +namespace gcu +{ + +CrystalView::CrystalView(CrystalDoc* pDoc): GLView (pDoc) +{ + SetRed (1.); + SetGreen (1.); + SetBlue (1.); +} + +CrystalView::~CrystalView() +{ +} + +bool CrystalView::Load (xmlNodePtr node) +{ + char *txt; + xmlNodePtr child = node->children; + double x, y, z; + while (child) { + if (!strcmp ((gchar*) child->name, "orientation")) { + txt = (char*) xmlGetProp (child, (xmlChar*) "psi"); + if (txt) { + sscanf(txt, "%lg", &x); + xmlFree (txt); + } else + return false; + txt = (char*) xmlGetProp (child, (xmlChar*) "theta"); + if (txt) { + sscanf(txt, "%lg", &y); + xmlFree (txt); + } else + return false; + txt = (char*) xmlGetProp (child, (xmlChar*) "phi"); + if (txt) { + sscanf(txt, "%lg", &z); + xmlFree (txt); + } else + return false; + SetRotation (x, y, z); + } else if (!strcmp ((gchar*) child->name, "fov")) { + txt = (char*) xmlNodeGetContent (child); + int result = sscanf (txt, "%lg", &x); + SetAngle ((result == 0)? 10.: x); + xmlFree (txt); + } + child = child->next; + } + float r, g, b, a; + if (!ReadColor (node, "background", &r, &g, &b, &a)) + return false; + SetRed (r); + SetGreen (g); + SetBlue (b); + SetAlpha (a); + return true; +} + +xmlNodePtr CrystalView::Save(xmlDocPtr xml) const +{ + xmlNodePtr parent, child; + gchar buf[256]; + parent = xmlNewDocNode(xml, NULL, (xmlChar*)"view", NULL); + if (!parent) return NULL; + + child = xmlNewDocNode(xml, NULL, (xmlChar*)"orientation", NULL); + if (child) xmlAddChild(parent, child); + else {xmlFreeNode(parent); return NULL;} + snprintf(buf, sizeof(buf), "%g", GetPsi ()); + xmlNewProp(child, (xmlChar*)"psi", (xmlChar*)buf); + snprintf(buf, sizeof(buf), "%g", GetTheta ()); + xmlNewProp(child, (xmlChar*)"theta", (xmlChar*)buf); + snprintf(buf, sizeof(buf), "%g", GetPhi ()); + xmlNewProp(child, (xmlChar*)"phi", (xmlChar*)buf); + + g_snprintf(buf, sizeof(buf) - 1, "%g", GetAngle ()); + child = xmlNewDocNode(xml, NULL, (xmlChar*)"fov", (xmlChar*)buf); + if (child) xmlAddChild(parent, child); + else {xmlFreeNode(parent); return NULL;} + + if (!WriteColor(xml, parent, "background", GetRed (), GetGreen (), GetBlue (), GetAlpha ())) {xmlFreeNode(parent); return NULL;} + + return parent; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/crystalview.h gnome-chemistry-utils-0.10.9/libs/gcu/crystalview.h --- gnome-chemistry-utils-0.8.6/libs/gcu/crystalview.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/crystalview.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,86 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * crystalview.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef CRYSTAL_VIEW_H +#define CRYSTAL_VIEW_H + +#include +#include +#include +#include +#include +#include + +/*!\file*/ +namespace gcu +{ +class CrystalDoc; + +/*!\class CrystalView gcu/crystalview.h +The class representing a view of the model. Each document +might have several views. +Most methods are automatically called by the framework and should not be explicitely used in programs. +*/ +class CrystalView: public GLView +{ +public: +//!Constructor. +/*! +@param pDoc: a pointer to the CrystalDoc instance. + +Creates a new view for the document. +*/ + CrystalView (CrystalDoc* pDoc); +//!Destructor. +/*! +The destructor of CrystalView. +*/ + virtual ~CrystalView (); + +/*! +@param node: a pointer to the xmlNode containing the serialized view. + +Loads the parameters of the view from an xmlNode. +*/ + virtual bool Load (xmlNodePtr node); +/*! +@param xml: the xmlDoc used to save the document. +@return a pointer to the xmlNode containig the view parameters or NULL if an error occured. +*/ + virtual xmlNodePtr Save (xmlDocPtr xml) const; + +protected: +/*! +The height of the widget. +*/ + gdouble m_height; +/*! +The width of the widget. +*/ + gdouble m_width; +}; + +} //namespace gcu + +#endif //CRYSTAL_VIEW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/cycle.cc gnome-chemistry-utils-0.10.9/libs/gcu/cycle.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/cycle.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/cycle.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,219 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * libs/gcu/cycle.cc + * + * Copyright (C) 2001-2004 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "cycle.h" +#include "atom.h" +#include "bond.h" +#include "molecule.h" + +namespace gcu { + +Cycle::Cycle (Molecule* molecule): Chain (molecule, (Atom*) NULL, CycleType) +{ +} + +Cycle::~Cycle () +{ +} + +void Cycle::Simplify () +{ + std::map::iterator i, end = m_Bonds.end (), k; + for (i = m_Bonds.begin (); i != end; i++) { + if ((*i).second.fwd->IsCyclic() > 1) { + std::list::iterator j; + Cycle* pCycle = (*i).second.fwd->GetFirstCycle (j, this); + while (pCycle) { + for (k = pCycle->m_Bonds.begin (); (*k).second.fwd != (*i).second.fwd; k++); + Atom *pAtom0 = (*i).first, *pAtom1, *pAtom2; + bool bReverse = (pAtom0 != (*k).first); + Bond *pBond0 = (*i).second.fwd, *pBond; + Cycle Common (NULL); + Common.m_Bonds[pAtom0].fwd = pBond0; + pAtom1 = pAtom2 = pAtom0; + pBond = pBond0; + pAtom2 = (Atom*) pBond0->GetAtom (pAtom2); + Common.m_Bonds[pAtom2].rev = pBond; + if (bReverse) { + //explore forward + while ((pBond = m_Bonds[pAtom2].fwd) == pCycle->m_Bonds[pAtom2].rev) { + Common.m_Bonds[pAtom2].fwd = pBond; + pAtom2 = (Atom*) pBond->GetAtom (pAtom2); + Common.m_Bonds[pAtom2].rev = pBond; + } + //explore reverse + while ((pBond0 = m_Bonds[pAtom1].rev) == pCycle->m_Bonds[pAtom1].fwd) { + Common.m_Bonds[pAtom1].rev = pBond0; + pAtom1 = (Atom*) pBond0->GetAtom (pAtom1); + Common.m_Bonds[pAtom1].rev = pBond0; + } + } else { + //explore forward + while ((pBond = m_Bonds[pAtom2].fwd) == pCycle->m_Bonds[pAtom2].fwd) { + Common.m_Bonds[pAtom2].fwd = pBond; + pAtom2 = (Atom*) pBond->GetAtom (pAtom2); + Common.m_Bonds[pAtom2].rev = pBond; + } + //explore reverse + while ((pBond0 = m_Bonds[pAtom1].rev) == pCycle->m_Bonds[pAtom1].rev) { + Common.m_Bonds[pAtom1].rev = pBond0; + pAtom1 = (Atom*) pBond0->GetAtom (pAtom1); + Common.m_Bonds[pAtom1].rev = pBond0; + } + } + //Search if another portion is common to the two cycles + Atom* pAtom = (Atom*) m_Bonds[pAtom2].fwd->GetAtom (pAtom2); + while (pAtom != pAtom1) { + if (pAtom->IsInCycle (pCycle)) + break; + pAtom = (Atom*) m_Bonds[pAtom].fwd->GetAtom (pAtom); + } + if (pAtom != pAtom1) { + pCycle = (*i).second.fwd->GetNextCycle (j, this); + continue; + } + //Test for possible simplification + bool bLargest = (m_Bonds.size () > pCycle->m_Bonds.size ()); + unsigned n = (bLargest) ? pCycle->m_Bonds.size () : m_Bonds.size (); + if (2 * (Common.m_Bonds.size () - 1) > n) { + if (bLargest) { + Erase (pAtom1, pAtom2); + if (bReverse) { + pCycle->Extract (pAtom1, pAtom2, Common); + } else { + pCycle->Extract (pAtom2, pAtom1, Common); + Common.Reverse (); + } + Insert (pAtom1, pAtom2, Common); + } else { + Extract (pAtom2, pAtom1, Common); + if (bReverse) { + pCycle->Erase (pAtom2, pAtom1); + pCycle->Insert (pAtom2, pAtom1, Common); + } else { + Common.Reverse (); + pCycle->Erase (pAtom1, pAtom2); + pCycle->Insert (pAtom1, pAtom2, Common); + } + } + Simplify (); + return; + } + pCycle = (*i).second.fwd->GetNextCycle (j, this); + } + } + } +} + +void Cycle::Erase (Atom* pAtom1, Atom* pAtom2) +{ +//This function is not safe + Atom *pAtom = (Atom*) m_Bonds[pAtom1].fwd->GetAtom (pAtom1), *pAtom0; + m_Bonds[pAtom1].fwd->RemoveCycle (this); + m_Bonds[pAtom1].fwd = NULL; + if (m_Bonds[pAtom1].rev->GetOrder () == 2) + m_Bonds[pAtom1].rev->SetDirty (true); + while (pAtom != pAtom2) { + m_Bonds[pAtom].fwd->RemoveCycle (this); + pAtom = (Atom*)m_Bonds[pAtom].fwd->GetAtom (pAtom0 = pAtom); + m_Bonds.erase (pAtom0); + } + m_Bonds[pAtom2].rev = NULL; + if (m_Bonds[pAtom2].fwd->GetOrder () == 2) + m_Bonds[pAtom2].fwd->SetDirty (true); +} + +void Cycle::Insert (Atom* pAtom1, Atom* pAtom2, Chain& chain) +{ +//This function is not safe + if (m_Bonds[pAtom1].rev->GetOrder () == 2) + m_Bonds[pAtom1].rev->SetDirty (true); + m_Bonds[pAtom1].fwd = ((Cycle&) chain).m_Bonds[pAtom1].fwd; + m_Bonds[pAtom1].fwd->AddCycle (this); + Atom *pAtom = (Atom*) m_Bonds[pAtom1].fwd->GetAtom (pAtom1); + while (pAtom != pAtom2) { + m_Bonds[pAtom] = ((Cycle&) chain).m_Bonds[pAtom]; + m_Bonds[pAtom].fwd->AddCycle (this); + pAtom = (Atom*) m_Bonds[pAtom].fwd->GetAtom (pAtom); + } + m_Bonds[pAtom2].rev = ((Cycle&) chain).m_Bonds[pAtom2].rev; + if (m_Bonds[pAtom2].fwd->GetOrder () == 2) m_Bonds[pAtom2].fwd->SetDirty (true); +} + +bool Cycle::IsBetterForBonds (Cycle* pCycle) +{ + //Returns true if pCycle is better + //Prefered cycle should have a maximum unsaturation number + unsigned n1 = GetUnsaturations (), n2 = pCycle->GetUnsaturations (); + if (n1 < n2) + return true; + else if (n1 > n2) + return false; + //Prefered cycle should be smallest + n1 = m_Bonds.size (); + n2 = pCycle->m_Bonds.size (); + if (n1 > n2) + return true; + else if (n1 < n2) + return false; + //Prefered Cycle should have a maximum heteroatoms + n1 = GetHeteroatoms (); + n2 = pCycle->GetHeteroatoms (); + if (n1 < n2) + return true; + else if (n1 > n2) + return false; + //Prefered cycle should have the least common bonds + n1 = GetFusedBonds (); + n2 = pCycle->GetFusedBonds (); + if (n1 > n2) + return true; + else + return false; + //if every thing is the same return false (this will be prefered) +} + +void Cycle::GetAngles2D (Bond *pBond, double* a1, double* a2) +{ + Atom *pAtom1 = (Atom*) pBond->GetAtom (0), *pAtom2 = (Atom*) pBond->GetAtom (1); + if (m_Bonds[pAtom1].fwd == pBond) { + *a1 = m_Bonds[pAtom1].rev->GetAngle2DRad (pAtom1); + *a2 = m_Bonds[pAtom2].fwd->GetAngle2DRad (pAtom2); + } else { + *a1 = m_Bonds[pAtom1].fwd->GetAngle2DRad (pAtom1); + *a2 = m_Bonds[pAtom2].rev->GetAngle2DRad (pAtom2); + } +} + +int Cycle::GetFusedBonds () +{ + int n = 0; + std::map::iterator i, end = m_Bonds.end (); + for (i = m_Bonds.begin (); i != end; i++) + if ((*i).second.fwd->IsCyclic() > 1) n++; + return n; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/cycle.h gnome-chemistry-utils-0.10.9/libs/gcu/cycle.h --- gnome-chemistry-utils-0.8.6/libs/gcu/cycle.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/cycle.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,96 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * libs/gcu/cycle.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_CYCLE_H +#define GCU_CYCLE_H +#include "chain.h" + +/*!\file*/ +namespace gcu { + +/*! \class Cycle gcu/cycle.h + +Represents a cycle. +*/ +class Cycle: public Chain +{ +public: +/*! +@param molecule a molecule. + +Constructs an initially empty cycle for the molecule. +*/ + Cycle (Molecule* molecule); +/*! +The destructor. +*/ + virtual ~Cycle (); + +/*! +Finds the smallest cycles collection in a polycyclic system. +*/ + void Simplify (); //Reduce size of fused cycles +/*! +@param pAtom1 an atom in the source chain. +@param pAtom2 an atom in the source chain. + +Erases a sub-chain. The result is not a cycle. This should be followed by +the insertion of a new chain to close the cycle again. +*/ + virtual void Erase (Atom* pAtom1, Atom* pAtom2); +/*! +@param pAtom1 an atom in the source chain. +@param pAtom2 an atom in the source chain. +@param chain the source chain. + +Inserts a chain. Bothe atoms must already be in the target cycle and the +insertion should close the cycle. +*/ + virtual void Insert (Atom* pAtom1, Atom* pAtom2, Chain& chain); +/*! +@param pCycle another cycle sharing a bond. + +Compares two cycles in competition to know which is the best to contain the +second line of a shared double bond. + +@return true if the this instance is to be preferred, false otherwise. +*/ + bool IsBetterForBonds (Cycle* pCycle); +/*! +@param pBond a bond of the cycle. +@param a1 where to put the result for the first angle. +@param a2 where to put the result for the first angle. + +Evaluates the angles between the bond and its two adjacent bonds in the cycle. +*/ + void GetAngles2D (Bond *pBond, double* a1, double* a2); +/*! +@return the number of bonds shared with other cycles. +*/ + int GetFusedBonds (); +}; + +} // namespace gcu + +#endif // GCU_CYCLE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/cylinder.cc gnome-chemistry-utils-0.10.9/libs/gcu/cylinder.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/cylinder.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/cylinder.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,269 @@ +/********************************************************************** + Cylinder - OpenGL Cylinder drawing class. + + Copyright (C) 2007 Jean Brefort + Copyright (C) 2006,2007 Benoit Jacob + + This file is part of the Avogadro molecular editor project. + For more information, see + + Avogadro is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Avogadro is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + **********************************************************************/ + +#include "config.h" +#include "cylinder.h" +#include "matrix.h" +#include +#include +#include + +using namespace OpenBabel; + +namespace gcu { + +class CylinderPrivate { +public: + CylinderPrivate () : vertexBuffer (0), normalBuffer (0), displayList (0), isValid (false) {} + + /** Pointer to the buffer storing the vertex array */ + Vector3f *vertexBuffer; + /** Pointer to the buffer storing the normal array */ + Vector3f *normalBuffer; + /** The id of the OpenGL display list */ + GLuint displayList; + /** Equals true if the vertex array has been correctly initialized */ + bool isValid; + + /** the number of faces of the cylinder. This only + * includes the lateral faces, as the base and top faces (the + * two discs) are not rendered. */ + int faces; +}; + +Cylinder::Cylinder (int faces) : d (new CylinderPrivate) +{ + setup (faces); +} + +Cylinder::~Cylinder () +{ + freeBuffers (); + if (d->displayList) { + glDeleteLists( d->displayList, 1 ); + } + delete d; +} + +void Cylinder::freeBuffers () +{ + if(d->normalBuffer) { + delete[] d->normalBuffer; + d->normalBuffer = 0; + } + if (d->vertexBuffer) { + delete[] d->vertexBuffer; + d->vertexBuffer = 0; + } +} + +void Cylinder::setup (int faces) +{ + if (d->isValid && faces == d->faces) + return; + d->faces = faces; + initialize (); +} + +void Cylinder::initialize() +{ + d->isValid = false; + if (d->faces < 0) + return; + + // compile display list and free buffers + if (!d->displayList) + d->displayList = glGenLists (1); + if (!d->displayList) + return; + + if (d->faces < 3) { + glNewList (d->displayList, GL_COMPILE); + glLineWidth (1.0); + glBegin (GL_LINES); + glVertex3f (0, 0, 0); + glVertex3f (0, 0, 1); + glEnd (); + glEndList (); + } else { + // compute number of vertices + int vertexCount = 2 * d->faces + 2; + + // deallocate any previously allocated buffer + freeBuffers (); + + // allocate memory for buffers + d->vertexBuffer = new Vector3f[vertexCount]; + if (!d->vertexBuffer) + return; + d->normalBuffer = new Vector3f[vertexCount]; + if (!d->normalBuffer) + return; + + float baseAngle = 2 * M_PI / d->faces; + // build vertex and normal buffers + for (int i = 0; i <= d->faces; i++) { + float angle = baseAngle * i; + Vector3f v (cosf (angle), sinf (angle), 0.0f); + d->normalBuffer[2 * i] = v; + d->normalBuffer[2 * i + 1] = v; + d->vertexBuffer[2 * i] = v; + d->vertexBuffer[2 * i + 1] = v; + d->vertexBuffer[2 * i].GetRefz () = 1.0f; + } + glEnableClientState (GL_VERTEX_ARRAY); + glEnableClientState (GL_NORMAL_ARRAY); + glNewList (d->displayList, GL_COMPILE); + glVertexPointer (3, GL_FLOAT, 0, d->vertexBuffer); + glNormalPointer (GL_FLOAT, 0, d->normalBuffer); + glDrawArrays (GL_QUAD_STRIP, 0, vertexCount); + glEndList (); + glDisableClientState (GL_VERTEX_ARRAY); + glDisableClientState (GL_NORMAL_ARRAY); + } + freeBuffers (); + d->isValid = true; +} + +void Cylinder::draw (const vector3 &end1, const vector3 &end2, double radius) const +{ + // the "axis vector" of the cylinder + vector3 axis = end2 - end1; + + // construct an orthogonal basis whose first vector is axis, and whose other vectors + // have norm equal to 'radius'. + vector3 axisNormalized = axis / axis.length (); + vector3 ortho1, ortho2; + axisNormalized.createOrthoVector (ortho1); + ortho1 *= radius; + ortho2 = cross (axisNormalized, ortho1); + + // construct the 4D transformation matrix + GLMatrix matrix; + + matrix (0, 0) = ortho1.x (); + matrix (0, 1) = ortho1.y (); + matrix (0, 2) = ortho1.z (); + matrix (0, 3) = 0.0; + + matrix (1, 0) = ortho2.x (); + matrix (1, 1) = ortho2.y (); + matrix (1, 2) = ortho2.z (); + matrix (1, 3) = 0.0; + + matrix (2, 0) = axis.x (); + matrix (2, 1) = axis.y (); + matrix (2, 2) = axis.z (); + matrix (2, 3) = 0.0; + + matrix (3, 0) = end1.x (); + matrix (3, 1) = end1.y (); + matrix (3, 2) = end1.z (); + matrix (3, 3) = 1.0; + + //now we can do the actual drawing ! + glPushMatrix (); + glMultMatrixd (matrix.array ()); + glCallList (d->displayList); + glPopMatrix (); +} + +void Cylinder::drawMulti( const vector3 &end1, const vector3 &end2, +double radius, int order, double shift, +const vector3 &planeNormalVector ) const +{ + // the "axis vector" of the cylinder + vector3 axis = end2 - end1; + + // now we want to construct an orthonormal basis whose first + // vector is axis.normalized(). We don't use Eigen's loadOrthoBasis() + // for that, because we want one more thing. The second vector in this + // basis, which we call ortho1, should be approximately lying in the + // z=0 plane if possible. This is to ensure double bonds don't look + // like single bonds from the default point of view. + double axisNorm = axis.length (); + if (axisNorm == 0.0) + return; + vector3 axisNormalized = axis / axisNorm; + + vector3 ortho1 = cross (axisNormalized, planeNormalVector); + double ortho1Norm = ortho1.length (); + if (ortho1Norm > 0.001) + ortho1 /= ortho1Norm; + else + ortho1.createOrthoVector (axisNormalized); + ortho1 *= radius; + + vector3 ortho2 = cross (axisNormalized, ortho1 ); + + // construct the 4D transformation matrix + GLMatrix matrix; + + matrix (0, 0) = ortho1.x (); + matrix (0, 1) = ortho1.y (); + matrix (0, 2) = ortho1.z (); + matrix (0, 3) = 0.0; + + matrix (1, 0) = ortho2.x (); + matrix (1, 1) = ortho2.y (); + matrix (1, 2) = ortho2.z (); + matrix (1, 3) = 0.0; + + matrix (2, 0) = axis.x (); + matrix (2, 1) = axis.y (); + matrix (2, 2) = axis.z (); + matrix (2, 3) = 0.0; + + matrix (3, 0) = end1.x (); + matrix (3, 1) = end1.y (); + matrix (3, 2) = end1.z (); + matrix (3, 3) = 1.0; + + //now we can do the actual drawing ! + glPushMatrix (); + glMultMatrixd (matrix.array ()); + if (order == 1) + glCallList (d->displayList); + else { + double angleOffset = 0.0; + if (order >= 3) { + if (order == 3) + angleOffset = 90.0; + else angleOffset = 22.5; + } + + double displacementFactor = shift / radius; + for (int i = 0; i < order; i++) { + glPushMatrix (); + glRotated (angleOffset + 360.0 * i / order, 0.0, 0.0, 1.0); + glTranslated (displacementFactor, 0.0, 0.0); + glCallList (d->displayList); + glPopMatrix (); + } + } + glPopMatrix (); +} + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/cylinder.h gnome-chemistry-utils-0.10.9/libs/gcu/cylinder.h --- gnome-chemistry-utils-0.8.6/libs/gcu/cylinder.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/cylinder.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,104 @@ +/********************************************************************** + Cylinder - Class for drawing cylinders in OpenGL + + Copyright (C) 2007-2008 Jean Brefort + Copyright (C) 2006,2007 Benoit Jacob + + This file is part of the Avogadro molecular editor project. + For more information, see + + Avogadro is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Avogadro is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + **********************************************************************/ + +#ifndef GCU_CYLINDER_H +#define GCU_CYLINDER_H + +#include "vector.h" + +/*!\file*/ +namespace OpenBabel { + class vector3; +} + +namespace gcu { + + /** + * \class Cylinder gcu/cylinder.h + * @internal + * @brief This class represents and draws a cylinder + * @author Benoit Jacob + */ + class CylinderPrivate; + class Cylinder + { + protected: + void initialize (); + void freeBuffers (); + + public: + Cylinder (int faces=0); + ~Cylinder (); + /** initializes the cylinder with given number of faces. If the + * cylinder was already initialized, any pre-allocated buffers + * are freed and then re-allocated */ + void setup (int faces); + /** + * draws the cylinder at specified position, with specified + * radius. + @param end1 the position of the first end of the cylinder. + that is, the center of the first disc-shaped face. + @param end2 the position of the second end of the cylinder. + that is, the center of the second disc-shaped face. + @param radius the radius of the cylinder + */ + void draw (const OpenBabel::vector3 &end1, const OpenBabel::vector3 &end2, + double radius) const; + /** + * draws the cylinder at specified position, with specified + * radius. the order and shift arguments allow to render + * multiple cylinders at once, which is useful in libavogadro. + * for multiple bonds between atoms. If you only want to render one + * cylinder, leave order and shift at their default values. + @param end1 the position of the first end of the cylinder. + that is, the center of the first disc-shaped face. + @param end2 the position of the second end of the cylinder. + that is, the center of the second disc-shaped face. + @param radius the radius of the cylinder + @param order to render only one cylinder, leave this set to + the default value, which is 1. If order>1, then order + parallel cylinders are drawn around the axis + (end1 - end2). + @param shift this is only meaningful of order>1, otherwise + just let this set to the default value. When order>1, + this is interpreted as the displacement of the axis + of the drawn cylinders from the axis (end1 - end2). + @param planeNormalVector the unit normal vector of the plane + in which we will try to fit the cylinders. This is useful + to draw double bonds in a molecule in such a way that they + avoid looking like single bonds. To achieve that, just pass + the molecule's fitting plane's unit normal vector here. + */ + void drawMulti (const OpenBabel::vector3 &end1, const OpenBabel::vector3 &end2, + double radius, int order, double shift, + const OpenBabel::vector3 &planeNormalVector) const; + + private: + CylinderPrivate * const d; + }; + +} + +#endif // GCU_CYLINDER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/dialog.cc gnome-chemistry-utils-0.10.9/libs/gcu/dialog.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/dialog.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/dialog.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,228 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/dialog.cc + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "dialog.h" +#include "application.h" +#include +#include +#include + +namespace gcu +{ + +static void on_OK (GtkWidget *widget, Dialog* pBox) +{ + if (pBox->Apply ()) + pBox->Destroy (); +} + +static void on_apply (GtkWidget *widget, Dialog* pBox) +{ + pBox->Apply (); +} + +static void on_cancel (GtkWidget *widget, Dialog* pBox) +{ + pBox->Destroy (); +} + +static void on_help(GtkWidget *widget, Dialog* pBox) +{ + pBox->Help(); +} + +static bool on_destroy (GtkWidget *widget, Dialog* pBox) +{ + delete pBox; + return true; +} + +Dialog::Dialog (Application* App, const char* filename, const char* windowname, DialogOwner *owner, void (*extra_destroy)(gpointer), gpointer data) +{ + m_App = App; + m_Owner = owner; + if (owner && !owner->AddDialog (windowname, this)) { + xml = NULL; + dialog = NULL; + m_extra_destroy = NULL; + return; + } + m_Owner = owner; + if (filename) { + xml = glade_xml_new (filename, windowname, NULL); + m_extra_destroy = extra_destroy; + m_windowname = windowname; + m_data = data; + if (xml) glade_xml_signal_autoconnect (xml); + dialog = GTK_WINDOW (glade_xml_get_widget(xml, windowname)); + gtk_window_set_icon_name (dialog, App->GetName ().c_str ()); + g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK (on_destroy), this); + GtkWidget* button = glade_xml_get_widget (xml, "OK"); + if (button) g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_OK), this); + button = glade_xml_get_widget (xml, "apply"); + if (button) g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_apply), this); + button = glade_xml_get_widget (xml, "cancel"); + if (button) g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_cancel), this); + button = glade_xml_get_widget(xml, "help"); + if (button) { + if (App->HasHelp ()) + g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_help), this); + else + gtk_widget_hide (button); + } + } else { + xml = NULL; + dialog = NULL; + m_extra_destroy = NULL; + m_windowname = ""; + } +} + +Dialog::~Dialog() +{ + if (xml) + g_object_unref (G_OBJECT (xml)); + if (m_Owner) + m_Owner->RemoveDialog (m_windowname); +} + +void Dialog::Destroy() +{ + if (m_extra_destroy) m_extra_destroy (m_data); + gtk_widget_destroy (GTK_WIDGET (dialog)); +} + +bool Dialog::Apply () +{ + return true; +} + +void Dialog::Help () +{ + m_App->OnHelp (m_windowname); +} + +bool Dialog::GetNumber (GtkEntry *Entry, double *x, CheckType c, double min, double max) +{ + const gchar* text = gtk_entry_get_text (Entry); + char *end; + *x = strtod (text, &end); + if (end != text + strlen (text)) { + gtk_window_set_focus (GTK_WINDOW (dialog), GTK_WIDGET (Entry)); + GtkDialog* box = GTK_DIALOG(gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Type a number"))); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + switch (c) { + case MinEqMax: + if ((*x < min) || (*x >= max)) { + snprintf (m_buf, sizeof (m_buf), _("Type a number greater than or equal %g and lower than to %g"), min, max); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + case MinMaxEq: + if ((*x <= min) || (*x > max)) { + snprintf (m_buf, sizeof (m_buf), _("Type a number greater than %g and lower than or equal to %g"), min, max); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + case MinEqMaxEq: + if ((*x < min) || (*x > max)) { + snprintf (m_buf, sizeof (m_buf), _("Type a number between %g and %g, the limits are valid."), min, max); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + case MinMax: + if ((*x <= min) || (*x >= max)) { + snprintf (m_buf, sizeof (m_buf), _("Type a number greater than %g and lower than %g"), min, max); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + case Max: + if (*x >= max) { + snprintf (m_buf, sizeof (m_buf), _("Type a number lower than %g"), max); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + case Min: + if (*x <= min) { + snprintf (m_buf, sizeof (m_buf), _("Type a number greater than %g"), min); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + case MaxEq: + if (*x > max) { + snprintf (m_buf, sizeof (m_buf), _("Type a number lower than or equal to %g"), max); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + case MinEq: + if (*x < min) { + snprintf (m_buf, sizeof (m_buf), _("Type a number greater than or equal to %g"), min); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, m_buf)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return false; + } + break; + default: + break; + } + return true; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/dialog.h gnome-chemistry-utils-0.10.9/libs/gcu/dialog.h --- gnome-chemistry-utils-0.8.6/libs/gcu/dialog.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/dialog.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,167 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/dialog.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_DIALOG_H +#define GCU_DIALOG_H +#include +#include +#include + +/*!\file*/ +namespace gcu { + +/** CheckType +* CheckType describes how numbers entered in entries might be checked. +* Possible values are: +* - NoCheck: no check is performed. +* - Min: value > min. +* - Max: value < max. +* - MinMax: min < value < max. +* - MinEq: value >= min. +* - MaxEq: value <= max. +* - MinEqMax: min <= value < max. +* - MinMaxEq: min < value <= max. +* - MinEqMaxEq: min <= value <= max. +* +* This enumeration is used in Dialog::GetNumber. +*/ +enum CheckType +{ + NoCheck, + Min, + Max, + MinMax, + MinEq, + MaxEq, + MinEqMax, + MinMaxEq, + MinEqMaxEq +}; + +class Application; +class DialogOwner; + +/*!\class Dialog gcu/dialog.h +This class is base class for dialog boxes. It provides some basic services. +*/ +class Dialog +{ +public: +/*! +@param App: the Application which owns the dialog. +@param filename: the glade file name which contains the description of +the dialog. +@param windowname: the name of the top level GtkWidget of the dialog box in +the glade file. This name should be unique for the application. It is used to access +the contextual help and to ensure the uniqueness of the dialog (in some cases). +@param owner: the address of an owner object, might be App or a document +or NULL (the default). when owner is not NULL, the dialog will be unique for it. +@param extra_destroy: a callback to be called when the dialog is detroyed +by calling Dialog::Destroy. Useful to perform non standard cleaning operations +before calling gtk_widget_destroy. The destructor being called afterwards, it +cannot access the widget. +@param data: the data to be passed to extra_destroy. + +If the glade file declares buttons with names "OK", "apply", "cancel" and "help", +default actions will be associated with these buttons. +If the Application does not provide help support, the Help button will be hidden. +*/ + Dialog (Application* App, const char* filename, const char* windowname, DialogOwner *owner = NULL, void (*extra_destroy)(gpointer) = NULL, gpointer data = NULL); + virtual ~Dialog (); + +/*! + Called when closing the dialog box after a click on the OK or Cancel buttons. + If a child class implements this method, it should call Dialog::Destroy after + performing its task or it must destroy the window. + The defaut implementation calls extra_destroy and gtk_widget_destroy. +*/ + virtual void Destroy (); + +/*! + Called after a click on the OK or Apply buttons. After clicking the OK button + and if the method returns true, Destroy will be called to close the dialog box. + A derived class should implement this method, as the default just returns true. + +@return true if everything worked, false if something when wrong and the dialog +should not be closed. +*/ + virtual bool Apply (); + +/*! + Displays the help corresponding to the dialog. This function is called when + a click occurs on the Help button. It calls Application::OnHelp (windowname); +*/ + void Help (); + +/*! +/return the top level window of the dialog box. +*/ + GtkWindow* GetWindow () {return dialog;} + +/*! + Brings the dialog to top of the windows stack. +*/ + void Present () {gtk_window_present (dialog);} + +protected: +/*! +@param Entry: the GtkEntry from which the number should be retrieved. +@param x: a pointer to the value which will be replaced by the result. +@param c: the type of check to perform on the value. +@param min: the minimum accepted value, if needed. +@param max: the maximum accepted value, if needed. + +This method retrieves the text displayed in Entry, converts it to a number +and perform bounds tests if needed. If an error occurs, a message box is +displayed which let the user know why the value is not correct. +@return true if the value is valid, false if something went wrong. +*/ + bool GetNumber (GtkEntry *Entry, double *x, CheckType c = NoCheck, double min = 0, double max = 0); + +protected: +/*! +The GladeXML structure used to build the dialog. If NULL, an error +occured and the dialog should be deleted. +*/ + GladeXML* xml; +/*! +The associated GtkWindow instance. +*/ + GtkWindow *dialog; +/*! +The Application instance owning the dialog. +*/ + Application *m_App; + +private: + void (*m_extra_destroy) (gpointer); + gpointer m_data; + char m_buf[64]; + std::string m_windowname; + DialogOwner *m_Owner; +}; + +} // namespace gcu + +#endif // GCU_DIALOG_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/dialog-owner.cc gnome-chemistry-utils-0.10.9/libs/gcu/dialog-owner.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/dialog-owner.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/dialog-owner.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,71 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/dialog-owner.h + * + * Copyright (C) 2005-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "dialog-owner.h" +#include "dialog.h" + +using namespace std; + +namespace gcu +{ + +DialogOwner::DialogOwner () +{ +} + +DialogOwner::~DialogOwner () +{ + ClearDialogs (); +} + +Dialog *DialogOwner::GetDialog (string name) +{ + map ::iterator i = Dialogs.find (name); + return (i != Dialogs.end ())? (*i).second: NULL; +} + +bool DialogOwner::AddDialog (string name, Dialog *dialog) +{ + if (Dialogs[name]) { + Dialogs[name]->Present (); + return false; + } + Dialogs[name] = dialog; + return true; +} + +void DialogOwner::ClearDialogs () +{ + map ::iterator i; + while (!Dialogs.empty ()) { + i = Dialogs.begin (); + if ((*i).second) + (*i).second->Destroy (); + else + Dialogs.erase (i); + } +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/dialog-owner.h gnome-chemistry-utils-0.10.9/libs/gcu/dialog-owner.h --- gnome-chemistry-utils-0.8.6/libs/gcu/dialog-owner.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/dialog-owner.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,77 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/dialog-owner.h + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_DIALOG_OWNER_H +#define GCU_DIALOG_OWNER_H + +#include +#include + +/*!\file*/ +namespace gcu { + +class Dialog; + +/*!\class DialogOwner gcu/dialog-owner.h +This class is the base class for objects owning dialogs. It is aimed at ensuring +that each dialog is unique and that when the owner is destroyed, its dialogs +are closed. +*/ + +class DialogOwner +{ +friend class Dialog; +public: +/*! +The constructor. +*/ + DialogOwner (); +/*! +The destructor. +*/ + virtual ~DialogOwner (); + +/*! +@param name the name associated to the Dialog. + +@return the Dialog instance associated with name or NULL if there is none. +*/ + Dialog *GetDialog (std::string name); + +/*! + Destroys all dialogs associated with this instance. +*/ + void ClearDialogs (); + +private: + bool AddDialog (std::string name, Dialog *dialog) ; + void RemoveDialog (std::string name) {Dialogs.erase (name);} + +private: + std::map Dialogs; +}; + +} // namespace gcu + +#endif // GCU_DIALOG_OWNER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/document.cc gnome-chemistry-utils-0.10.9/libs/gcu/document.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/document.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/document.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,87 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * libs/gcu/document.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "document.h" +#include "application.h" +#include "residue.h" +#include "dialog.h" +#include + +using namespace std; + +namespace gcu +{ + +Document::Document (Application *App): Object (DocumentType), +m_Empty (true) +{ + m_App = App; + if (m_App) + m_App->AddDocument (this); +} + +Document::~Document () +{ + if (m_App) + m_App->RemoveDocument (this); +} + +gchar* Document::GetNewId (gchar* id, bool Cache) +{ + gchar *Id = g_strdup (id); + int i = 0; + while ((Id[i] < '0') || (Id[i] > '9')) + i++; + gchar *buf = new gchar[i + 16]; + strncpy (buf, Id, i); + buf[i] = 0; + g_free (Id); + int j = 1; + string s = m_TranslationTable[buf]; + if (s.size ()) + j = atoi (s.c_str ()); + char* key = g_strdup (buf); + while (snprintf (buf + i, 16, "%d", j++), GetDescendant (buf) != NULL); + Id = g_strdup_printf ("%d", j); + if (Cache) { + m_TranslationTable[key] = Id; + m_TranslationTable[id] = buf; + } + g_free (Id); + g_free (key); + return buf; +} + +Residue *Document::CreateResidue (char const *name, char const *symbol, Molecule *molecule) +{ + return NULL; +} + +Residue const *Document::GetResidue (char const *symbol, bool *ambiguous) +{ + return Residue::GetResidue (symbol, ambiguous); +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/document.h gnome-chemistry-utils-0.10.9/libs/gcu/document.h --- gnome-chemistry-utils-0.8.6/libs/gcu/document.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/document.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,190 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * chemistry/document.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + + +#ifndef GCU_DOCUMENT_H +#define GCU_DOCUMENT_H + +#include +#include +#include +#include +#include + +/*!\file*/ +namespace gcu +{ + +class Application; +class Dialog; +class Molecule; +class Residue; + +/*!\class Document gcu/document.h +This class is the base document class. +*/ +class Document: public Object, virtual public DialogOwner +{ +friend class Object; +friend class Dialog; +public: +/*! +@param App the Appllcation which owns the new document. + +The default constructor. Creates an empty document. +*/ + Document (Application *App = NULL); +/*! +The destructor of Document. +*/ + virtual ~Document (); + +public: + +/*! +@param id the original id to tranlate + +When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document +maintains a table to update links using Ids as identifiers. GetTranslatedId returns +the translated id corresponding to the parameter id. +*/ + std::string& GetTranslatedId (const char* id) {return m_TranslationTable[id];} + +/*! +@param Id the entry to remove + +When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document +maintains a table to update links using Ids as identifiers. The EraseTranslationTable method removes thenentry correspondig to id. +*/ + void EraseTranslationId (const char* Id) {m_TranslationTable.erase (Id);} + +/*! +When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document +maintains a table to update links using Ids as identifiers. The EmptyTranslationTable method should be called after pasting to reinitialize the table +to avoid errors on the next paste event. +*/ + void EmptyTranslationTable() {m_TranslationTable.clear();} + +/*! +@param title the new document title. +*/ + void SetTitle (std::string& title) {m_Title = title;} +/*! +@param title the new document title. +*/ + void SetTitle (char const *title) {m_Title = title;} +/*! +@return the current document title. +*/ + std::string &GetTitle () {return m_Title;} + +/*! +@param pObject an object needing some update. + +The gcu::Document class just stores dirty objects, but don't do anything with them. Derived classes +need to implement that, if meaningful. +*/ + void NotifyDirty (Object* pObject) {m_DirtyObjects.insert (pObject);} +/*! +Saves the document. Need to be overloaded by derived class if meaningful. Default +implementation doesn't do anything. +*/ + virtual void Save () const {;} +/*! +@param name the name of the new residue. +@param symbol the symbol of the new residue. +@param molecule a molecule with a pseudo atom which describes the structure +of the residue. + +This methodshould be overloaded by derived classes necessitating it. Default +implementation just returns NULL. +@return the new Residue on success or NULL. +*/ + virtual Residue *CreateResidue (char const *name, char const *symbol, Molecule *molecule); +/*! +@param symbol the symbol for which a Residue* is searched. +@param ambiguous where to store the boolean telling if the symbol is ambiguous +or NULL. + +Documents might own not global residues with the samesymbol or name +but a different meaning from the standard residue. +@return the Residue* found or NULL. +*/ + virtual Residue const *GetResidue (char const *symbol, bool *ambiguous = NULL); + +private: + +/*! +@param id: the original id +@param Cache: + +When pasting, objects added to the document might have the same Id as objects already existing. In such cases, the document +maintains a table to update links using Ids as identifiers. If Cache is set to true GetId adds a new entry in +the table. +GetNewId returns the translated id +*/ + gchar* GetNewId (gchar* id, bool Cache = true); + +private: + std::map m_TranslationTable;//used when Ids translations are necessary (on pasting...) + +protected: +/*! +The document title. +*/ + std::string m_Title; + +/*! + The set of dirty objects, see gcu::Document::NotifyDirty. +*/ + std::set m_DirtyObjects; + +/*!\var m_App +The Application instance owning the document. +*/ +/*!\fn GetApp() +@return a pointer to the Appication instance owning the ocument or NULL for +an orphan document. +*/ +GCU_PROT_PROP (Application *, App) +/*!\var m_Empty +Tells if the document is empty or not. +*/ +/*!\fn GetEmpty() +@return true if the document does not contain anything, false otherwise. +*/ +GCU_PROT_PROP (bool, Empty); +/*!\var m_Scale +The scale factor to be used in IO operations. all coordinates should be multiplied by this factor +when loading and divided when saving. Default value is 1. +*/ +/*!\fn GetScale() +@return the current scale factor. +*/ +GCU_PROT_PROP (double, Scale); +}; + + +} +#endif //GCU_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/element.cc gnome-chemistry-utils-0.10.9/libs/gcu/element.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/element.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/element.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,1041 @@ +/* + * Gnome Chemistry Utils + * element.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "element.h" +#include "xml-utils.h" +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +static setunits; + +static void ReadValue (char const *source, GcuValue &value) +{ + const char *buf, *dot; + value.value = strtod (source, const_cast (&buf)); + dot = strchr (source, '.'); + value.prec = (dot)? buf - dot - 1: 0; + value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0; +} + +static void ReadDimensionalValue (char const *source, GcuDimensionalValue &value) +{ + const char *buf, *dot; + value.value = strtod (source, const_cast (&buf)); + dot = strchr (source, '.'); + value.prec = (dot)? buf - dot - 1: 0; + value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0; +} + +namespace gcu +{ + +class EltTable +{ +public: + EltTable(); + virtual ~EltTable(); + + Element* operator [] (int Z); + Element* operator [] (string Symbol); + + void AddElement(Element* Elt); + +private: + vector Elements; + map EltsMap; +}; + +EltTable Table; + +EltTable::EltTable() +{ + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + xmlDocPtr xml; + char* DefaultName; + char *lang = getenv ("LANG"); + setlocale (LC_ALL, lang); + char *old_num_locale, *buf, *num; + unsigned char Z; + map Langs; + Langs["de"] = _("German"); + Langs["fr"] = _("French"); + Langs["it"] = _("Italian"); + Langs["pl"] = _("Polish"); + Langs["pt_BR"] = _("Brazilian"); + Langs["ru"] = _("Russian"); + if (!(xml = xmlParseFile (PKGDATADIR"/elements.xml"))) { + g_error (_("Can't find and read elements.xml")); + } + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + xmlNode* node = xml->children, *child; + if (strcmp ((const char*) node->name, "gpdata")) { + g_error (_("Incorrect file format: elements.xml")); + } + node = node->children; + Element* Elt; + while (node) + { + if (strcmp ((const char*) node->name, "text")) + { + if (strcmp ((const char*) node->name, "element")) { + g_error (_("Incorrect file format: elements.xml")); + } + buf = (char*) xmlGetProp (node, (xmlChar*) "symbol"); + num = (char*) xmlGetProp (node, (xmlChar*) "Z"); + Elt = new Element (Z = atoi (num), buf); + xmlFree (num); + xmlFree (buf); + num = (char*) xmlGetProp (node, (xmlChar*) "max_bonds"); + Elt->m_MaxBonds = atoi (num); + xmlFree (num); + num = (char*) xmlGetProp (node, (xmlChar*) "valence"); + if (num) { + Elt->m_DefaultValence = atoi (num); + xmlFree (num); + } else + Elt->m_DefaultValence = -1; + child = node->children; + DefaultName = NULL; + while (child) + { + if (!strcmp ((const char*) child->name, "text")) { + child = child->next; + continue; + } + if (!strcmp((const char*)child->name, "name")) { + buf = (char*) xmlNodeGetLang (child); + if ((buf) && (lang)){ + string Lang = Langs[buf]; + char *Name = (char*) xmlNodeGetContent (child); + if (Lang.length ()) + Elt->names[Lang] = Name; + if (!strncmp (lang, buf, 2)) + Elt->name = Name; + xmlFree (Name); + } else if (!buf) { + DefaultName = (char*) xmlNodeGetContent (child); + Elt->names[_("English")] = DefaultName; + } + xmlFree (buf); + } else if (!strcmp ((const char*) child->name, "color")) { + buf = (char*) xmlGetProp (child, (xmlChar*) "red"); + if (buf) { + Elt->m_DefaultColor[0] = strtod (buf, NULL); + xmlFree (buf); + } + buf = (char*) xmlGetProp (child, (xmlChar*) "green"); + if (buf) { + Elt->m_DefaultColor[1] = strtod (buf, NULL); + xmlFree (buf); + } + buf = (char*) xmlGetProp (child, (xmlChar*) "blue"); + if (buf) { + Elt->m_DefaultColor[2] = strtod (buf, NULL); + xmlFree (buf); + } + } child = child->next; + } + if ((Elt->name.length () == 0) && DefaultName) Elt->name = DefaultName; + if (DefaultName) + xmlFree (DefaultName); + AddElement (Elt); + } + node = node->next; + } + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + xmlFreeDoc (xml); +} + +EltTable::~EltTable() +{ + map::iterator i; + for (i = EltsMap.begin(); i != EltsMap.end(); i++) + if ((*i).second) delete (*i).second; + EltsMap.clear(); + Elements.clear(); +} + +Element* EltTable::operator[](int Z) +{ + return ((unsigned) Z < Elements.size ())? Elements[Z]: NULL; +} + +Element* EltTable::operator[](string Symbol) +{ + return EltsMap[Symbol]; +} + +void EltTable::AddElement(Element* Elt) +{ + if ((unsigned) Elt->GetZ () >= Elements.size ()) { + unsigned old_size = Elements.size (); + Elements.resize (old_size + 10); + for (unsigned i = old_size; i < old_size + 10; i++) + Elements[i] = NULL; + } + Elements[Elt->GetZ ()] = Elt; + EltsMap[Elt->GetSymbol ()] = Elt; +} + +Element::Element(int Z, const char* Symbol): + m_AtomicWeight (NULL), + m_MetallicCached (false) +{ + m_Z = Z; + strncpy(m_Symbol, Symbol, 3); + m_Symbol[3] = 0; + m_MaxBonds = 0; + m_BestSide = true; + switch (m_Z) + { + case 8: + case 16: + case 34: + case 52: + case 9: + case 17: + case 35: + case 53: + m_BestSide = false; + } + m_DefaultColor[0] = m_DefaultColor[1] = m_DefaultColor[2] = 0.0; + if (m_Z <= 2) { + m_nve = m_tve = m_Z; + m_maxve = 2; + } else if (m_Z <= 10) { + m_nve = m_tve = m_Z - 2; + m_maxve = 8; + } else if (m_Z <= 18) { + m_nve = m_tve = m_Z - 10; + m_maxve = 8; + } else if (m_Z <= 29) { + m_nve = m_tve = m_Z - 18; + m_maxve = 18; + } else if (m_Z <= 36) { + m_tve = m_Z - 18; + m_nve = m_tve - 10; + m_maxve = 18; + } else if (m_Z <= 47) { + m_nve = m_tve = m_Z - 36; + m_maxve = 18; + } else if (m_Z <= 54) { + m_tve = m_Z - 36; + m_nve = m_tve - 10; + m_maxve = 18; + } else if (m_Z <= 70) { + m_nve = m_tve = m_Z - 54; + m_maxve = 32; + } else if (m_Z <= 79) { + m_tve = m_Z - 54; + m_nve = m_tve - 14; + m_maxve = 32; + } else if (m_Z <= 86) { + m_tve = m_Z - 54; + m_nve = m_tve - 24; + m_maxve = 32; + } else if (m_Z <= 102) { + m_nve = m_tve = m_Z - 86; + m_maxve = 32; + } else if (m_Z <= 111) { + m_tve = m_Z - 86; + m_nve = m_tve - 14; + m_maxve = 32; + } else { // Assume m_Z <= 118 + m_tve = m_Z - 86; + m_nve = m_tve - 24; + m_maxve = 32; + } +} + +Element::~Element() +{ + while (!m_radii.empty()) { + delete m_radii.back(); + m_radii.pop_back(); + } + while (!m_en.empty()) { + delete m_en.back(); + m_en.pop_back(); + } + while (!m_isotopes.empty ()) { + delete (m_isotopes.back ()); + m_isotopes.pop_back (); + } + map::iterator i, iend = props.end (); + for (i = props.begin (); i != iend; i++) + delete (*i).second; + props.clear (); +} + +const gchar* Element::Symbol(gint Z) +{ + Element* Elt = Table[Z]; + return (Elt)? Elt->GetSymbol(): NULL; +} + +bool Element::BestSide(gint Z) +{ + Element* Elt = Table[Z]; + return (Elt)? Elt->GetBestSide(): true; +} + +gint Element::Z(const gchar* symbol) +{ + Element* Elt = Table[symbol]; + return (Elt)? Elt->GetZ(): 0; +} + +Element* Element::GetElement(gint Z) +{ + return Table[Z]; +} + +Element* Element::GetElement(const gchar* symbol) +{ + return Table[symbol]; +} + +unsigned Element::GetMaxBonds(gint Z) +{ + Element* Elt = Table[Z]; + return (Elt)? Elt->GetMaxBonds(): 0; +} + +bool Element::GetRadius (GcuAtomicRadius* radius) +{ + Element* Elt = Table[radius->Z]; + if (!Elt || !Elt->m_radii.size ()) + return false; + for (int i = 0; Elt->m_radii[i]; i++) { + if (radius->type != Elt->m_radii[i]->type) + continue; + if (radius->charge != Elt->m_radii[i]->charge) + continue; + if ((radius->cn >= 0) &&(radius->cn != Elt->m_radii[i]->cn)) + continue; + if ((radius->spin != GCU_N_A_SPIN) &&(radius->spin != Elt->m_radii[i]->spin)) + continue; + if (!radius->scale) { + *radius = *Elt->m_radii[i]; + return true; + } else if (Elt->m_radii[i]->scale && !strcmp(radius->scale, Elt->m_radii[i]->scale)) { + radius->value = Elt->m_radii[i]->value; + return true; + } + } + return false; +} + +bool Element::GetElectronegativity(GcuElectronegativity* en) +{ + Element* Elt = Table[en->Z]; + if (!Elt) return false; + if (!en->scale) + { + *en = *Elt->m_en[0]; + return true; + } + for (int i = 0; Elt->m_en[i]; i++) + if (!strcmp(en->scale, Elt->m_en[i]->scale)) + { + en->value = Elt->m_en[i]->value; + return true; + } + + return false; +} + +const GcuAtomicRadius** Element::GetRadii() +{ + return (const GcuAtomicRadius**) &m_radii.front(); +} + +const GcuElectronegativity** Element::GetElectronegativities() +{ + return (const GcuElectronegativity**) &m_en.front(); +} + +void Element::LoadRadii () +{ + xmlDocPtr xml; + char *old_num_locale, *buf, *num; + unsigned char Z; + static bool loaded = false; + if (loaded) + return; + LoadBODR (); + if (!(xml = xmlParseFile (PKGDATADIR"/radii.xml"))) { + g_error (_("Can't find and read radii.xml")); + } + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + xmlNode* node = xml->children, *child; + if (strcmp ((const char*) node->name, "gpdata")) { + g_error (_("Incorrect file format: radii.xml")); + } + node = node->children; + Element* Elt; + set::iterator it = units.find ("pm"); + if (it == units.end ()) { + units.insert ("pm"); + it = units.find ("pm"); + } + while (node) { + if (strcmp ((const char*) node->name, "text")) + { + if (strcmp ((const char*) node->name, "element")) { + g_error (_("Incorrect file format: radii.xml")); + } + num = (char*) xmlGetProp (node, (xmlChar*) "Z"); + Elt = Table[Z = atoi (num)]; + if (!Elt) { + node = node->next; + continue; + } + child = node->children; + while (child) + { + if (!strcmp ((const char*) child->name, "text")) { + child = child->next; + continue; + } + if (!strcmp ((const char*) child->name, "radius")) { + GcuAtomicRadius* radius = new GcuAtomicRadius; + radius->Z = Z; //FIXME: is it really useful there? + buf = (char*) xmlGetProp (child, (xmlChar*) "type"); + if (!buf || + ((!((!strcmp (buf, "ionic")) && (radius->type = GCU_IONIC))) && + (!((!strcmp (buf, "metallic")) && (radius->type = GCU_METALLIC))) && + (!((!strcmp (buf, "atomic")) && ((radius->type = GCU_ATOMIC) || true))))) { + //invalid radius + delete radius; + if (buf) + xmlFree (buf); + child = child->next; + continue; + } + buf = (char*) xmlGetProp (child, (xmlChar*) "scale"); + if (buf) { + radius->scale = g_strdup (buf); + xmlFree (buf); + } else + radius->scale = NULL; + buf = (char*) xmlGetProp (child, (xmlChar*) "charge"); + if (buf) { + radius->charge = strtol (buf, NULL, 10); + xmlFree (buf); + } else + radius->charge = 0; + buf = (char*) xmlGetProp (child, (xmlChar*) "cn"); + if (buf) { + radius->cn = strtol (buf, NULL, 10); + xmlFree (buf); + } else + radius->cn = -1; + buf = (char*) xmlGetProp (child, (xmlChar*)"spin"); + if ((!buf) || + ((!((!strcmp (buf, "low")) && (radius->spin = GCU_LOW_SPIN))) && + (!((!strcmp (buf, "high")) && (radius->spin = GCU_HIGH_SPIN))))) + radius->spin = GCU_N_A_SPIN; + if (buf) + xmlFree (buf); + buf = (char*) xmlGetProp (child, (xmlChar*) "value"); + if (buf) { + ReadDimensionalValue (buf, radius->value) ; + radius->value.unit = (*it).c_str (); + Elt->m_radii.push_back (radius); + xmlFree (buf); + } else + delete radius; + } else { + g_error ("Invalid radius node"); + } + child = child->next; + } + Elt->m_radii.push_back (NULL); + } + node = node->next; + } + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + xmlFreeDoc (xml); + loaded = true; +} + +void Element::LoadElectronicProps () +{ + xmlDocPtr xml; + char *old_num_locale, *buf, *num, *dot, *end; + unsigned char Z; + unsigned i; + static bool loaded = false; + if (loaded) + return; + if (!(xml = xmlParseFile (PKGDATADIR"/elecprops.xml"))) { + g_error (_("Can't find and read elecprops.xml")); + } + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + xmlNode* node = xml->children, *child; + if (strcmp ((const char*) node->name, "gpdata")) { + g_error (_("Incorrect file format: elecprops.xml")); + } + node = node->children; + Element* Elt; + while (node) { + if (strcmp ((const char*) node->name, "text")) { + if (strcmp ((const char*) node->name, "element")) { + g_error (_("Incorrect file format: elecprops.xml")); + } + num = (char*) xmlGetProp (node, (xmlChar*) "Z"); + Elt = Table[Z = atoi (num)]; + child = node->children; + while (child) { + if (!strcmp ((const char*) child->name, "text")) { + child = child->next; + continue; + } + if (!strcmp ((const char*) child->name, "en")) { + GcuElectronegativity* en = new GcuElectronegativity; + en->Z = Z; //FIXME: is it really useful there? + buf = (char*) xmlGetProp (child, (xmlChar*) "scale"); + if (buf) { + en->scale = GetStaticScale (buf); + xmlFree (buf); + } else + en->scale = NULL; + buf = (char*) xmlGetProp (child, (xmlChar*) "value"); + if (buf) { + en->value.value = strtod (buf, &end); + dot = strchr (buf, '.'); + en->value.prec = (dot)? end - dot - 1: 0; + en->value.delta = 0; // we should use a generic parser + Elt->m_en.push_back (en); + xmlFree (buf); + } else + delete en; //without a value, the structure is useless and is discarded + } else if (!strcmp ((const char*) child->name, "config")) { + buf = (char*) xmlNodeGetContent (child); + char *cur = buf; + bool nonvoid = false; + if (buf[0] == '[') { + Elt->ElecConfig.append (buf, 4); + cur += 4; + nonvoid = true; + } + while (cur && *cur) { + if (nonvoid) { + cur++; + Elt->ElecConfig.append (" "); + } + Elt->ElecConfig.append (cur, 2); + cur += 2; + i = 1; + while (cur[i] > ' ') + i++; + Elt->ElecConfig.append (""); + Elt->ElecConfig.append (cur, i); + Elt->ElecConfig.append (""); + cur += i; + } + Elt->ElecConfig.append (" "); + xmlFree (buf); + } else if (!strcmp ((const char*) child->name, "ei")) { + unsigned rank; + buf = (char*) xmlGetProp (child, (xmlChar*) "rank"); + if (buf) { + rank = strtol (buf, NULL, 10); + xmlFree (buf); + } else + rank = 1; + if ((i = Elt->m_ei.size ()) < rank) { + Elt->m_ei.resize (rank); + for (; i < rank; i++) + Elt->m_ei[i].value = go_nan; + } + rank--; + buf = (char*) xmlGetProp (child, (xmlChar*) "value"); + if (buf) { + ReadValue (buf, (GcuValue&)Elt->m_ei[rank]) ; + xmlFree (buf); + } else { + //no need to read the unit + Elt->m_ei[rank].value = go_nan; + break; + } + buf = (char*) xmlGetProp (child, (xmlChar*) "unit"); + if (buf) { + string str(buf); + set::iterator it = units.find (str); + if (it == units.end ()) { + units.insert (str); + it = units.find (str); + } + Elt->m_ei[rank].unit = (*it).c_str (); + xmlFree (buf); + } else + Elt->m_ei[rank].unit = "MJ.mol-1"; + } else if (!strcmp ((const char*) child->name, "ae")) { + unsigned rank; + buf = (char*) xmlGetProp (child, (xmlChar*) "rank"); + if (buf) { + rank = strtol (buf, NULL, 10); + xmlFree (buf); + } else + rank = 1; + if ((i = Elt->m_ae.size ()) < rank) { + Elt->m_ae.resize (rank); + for (; i < rank; i++) + Elt->m_ae[i].value = go_nan; + } + rank--; + buf = (char*) xmlGetProp (child, (xmlChar*) "value"); + if (buf) { + ReadValue (buf, (GcuValue&)Elt->m_ae[rank]) ; + xmlFree (buf); + } else { + //no need to read the unit + Elt->m_ae[rank].value = go_nan; + break; + } + buf = (char*) xmlGetProp (child, (xmlChar*) "unit"); + if (buf) { + string str(buf); + set::iterator it = units.find (str); + if (it == units.end ()) { + units.insert (str); + it = units.find (str); + } + Elt->m_ae[rank].unit = (*it).c_str (); + xmlFree (buf); + } else + Elt->m_ae[rank].unit = "kJ.mol-1"; + } else { + g_error ("Invalid property node"); + } + child = child->next; + } + Elt->m_en.push_back (NULL); + } + node = node->next; + } + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + xmlFreeDoc (xml); + loaded = true; +} + +void Element::LoadIsotopes () +{ + xmlDocPtr xml; + char *old_num_locale, *num; + unsigned char Z; + static bool loaded = false; + if (loaded) + return; + if (!(xml = xmlParseFile (PKGDATADIR"/isotopes.xml"))) { + g_error (_("Can't find and read isotopes.xml")); + } + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + xmlNode* node = xml->children, *child; + if (strcmp ((const char*) node->name, "gpdata")) { + g_error (_("Incorrect file format: isotopes.xml")); + } + node = node->children; + Element *Elt; + Isotope *Is; + int minA, maxA, niso; + while (node) { + if (strcmp ((const char*) node->name, "text")) { + if (strcmp ((const char*) node->name, "element")) { + g_error (_("Incorrect file format: isotopes.xml")); + } + minA = maxA = niso = 0; + num = (char*) xmlGetProp (node, (xmlChar*) "Z"); + Elt = Table[Z = atoi (num)]; + xmlFree (num); + if (Elt == NULL) // This should not occur + continue; + child = node->children; + while (child) { + if (!strcmp ((const char*) child->name, "text")) { + child = child->next; + continue; + } + if (!strcmp ((const char*) child->name, "isotope")) { + Is = new Isotope (); + num = (char*) xmlGetProp (child, (xmlChar*) "A"); + if (num) { + Is->A = strtol (num, NULL, 10); + xmlFree (num); + } + num = (char*) xmlGetProp (child, (xmlChar*) "weight"); + if (num) { + ReadValue (num, Is->mass); + xmlFree (num); + } + num = (char*) xmlGetProp (child, (xmlChar*) "abundance"); + if (num) { + ReadValue (num, Is->abundance); + xmlFree (num); + niso++; + if (minA == 0) + minA = maxA = Is->A; + else { + if (minA > Is->A) + minA = Is->A; + else if (maxA < Is->A) + maxA = Is->A; + } + } + Elt->m_isotopes.push_back (Is); + } + child = child->next; + } + if (minA > 0) { + IsotopicPattern *pattern = new IsotopicPattern (minA, maxA); + vector::iterator i, iend = Elt->m_isotopes.end (); + for (i = Elt->m_isotopes.begin (); i != iend; i++) { + if ((*i)->abundance.value != 0.) + pattern->SetValue ((*i)->A, (*i)->abundance.value); + } + pattern->Normalize (); + niso = pattern->GetMonoNuclNb (); + i = Elt->m_isotopes.begin (); + while ((*i)->A != niso) + i++; + pattern->SetMonoMass (SimpleValue ((*i)->mass)); + Elt->m_patterns.push_back (pattern); + } + } + node = node->next; + } + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + xmlFreeDoc (xml); + loaded = true; +} + +void Element::LoadAllData () +{ + LoadRadii (); + LoadElectronicProps (); + LoadIsotopes (); + LoadBODR (); +} + +IsotopicPattern *Element::GetIsotopicPattern (unsigned natoms) +{ + if (m_patterns.size () == 0) + return NULL; + IsotopicPattern *pat, *pattern, *result = NULL; + if (natoms == 0) + return NULL; + unsigned i = 1; + while ((natoms & 1) == 0) { + natoms >>= 1; + i++; + } + while (natoms) { + if (i == 1) { + result = m_patterns[0]; + result->Ref (); + } else if (natoms & 1) { + while (m_patterns.size () < i) { + pat = m_patterns[m_patterns.size () - 1]->Square (); + pattern = pat->Simplify (); + pat->Unref (); + m_patterns.push_back (pattern); + } + pattern = m_patterns[i - 1]; + if (result) { + pat = result->Multiply (*pattern); + result->Unref (); + result = pat->Simplify (); + pat->Unref (); + } else { + result = pattern; + result->Ref (); + } + } + natoms >>= 1; + i++; + } + return result; +} + +GcuDimensionalValue const *Element::GetIonizationEnergy (unsigned rank) +{ + return (rank <= m_ei.size ())? &m_ei[rank - 1]: NULL; +} + +GcuDimensionalValue const *Element::GetElectronAffinity (unsigned rank) +{ + return (rank <= m_ae.size ())? &m_ae[rank - 1]: NULL; +} + +void Element::LoadBODR () +{ + static bool loaded = false; + if (loaded) + return; + loaded = true; + char *old_num_locale; + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + xmlDocPtr xml = xmlParseFile (BODR_PKGDATADIR"/elements.xml"); + if (!xml) + return; + set::iterator it = units.find ("pm"); + if (it == units.end ()) { + units.insert ("pm"); + it = units.find ("pm"); + } + xmlNodePtr node = xml->children, child; + char *buf = NULL, *unit; + Element *elt; + map props; + if (!strcmp ((char const*) node->name, "list")) { + node = node->children; + while (node) { + if (!strcmp ((char const*) node->name, "atom")) { + elt = NULL; + child = node->children; + while (child) { + if (!strcmp ((char const*) child->name, "scalar")) { + Value *val; + buf = (char*) xmlGetProp (child, (xmlChar const*) "dataType"); + if (!strcmp (buf, "xsd:float")) { + char *end, *dot; + xmlFree (buf); + buf = (char*) xmlNodeGetContent (child); + double x = strtod (buf, &end); + dot = strchr (buf, '.'); + int prec = (dot)? end - dot - 1: 0; + unit = (char*) xmlGetProp (child, (xmlChar const*) "units"); + xmlFree (buf); + buf = (char*) xmlGetProp (child, (xmlChar const*) "errorValue"); + int delta; + if (buf) + delta = strtol (buf, NULL, 10); + else + delta = 0; + xmlFree (buf); + if (unit) { + DimensionalValue *v = new DimensionalValue (); + if (!strcmp (unit, "units:atmass")) + v->val.unit = "g.mol−1"; + else if (!strcmp (unit, "units:ev")) + v->val.unit = "eV"; + else if (!strcmp (unit, "units:ang")) + v->val.unit = "Å"; + else if (!strcmp (unit, "siUnits:kelvin")) + v->val.unit = "K"; +// else if (!strcmp (unit, "")) +// v->val.unit = ""; + else + v->val.unit = ""; + xmlFree (unit); + v->val.value = x; + v->val.prec = prec; + v->val.delta = delta; + val = v; + } else { + SimpleValue *v = new SimpleValue (); + v->val.value = x; + v->val.prec = prec; + v->val.delta = delta; + val = v; + } + buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); + if (elt) + elt->props[(strncmp (buf, "bo:", 3))? buf: buf + 3] = val; + xmlFree (buf); + } else if (!strcmp (buf, "xsd:String") || !strcmp (buf, "xsd:string")) { + buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); + char *val = (char*) xmlNodeGetContent (child); + if (elt) + elt->sprops[(strncmp (buf, "bo:", 3))? buf: buf + 3] = val; + xmlFree (buf); + xmlFree (val); + } else if (!strcmp (buf, "xsd:int") || !strcmp (buf, "xsd:Integer")) { + xmlFree (buf); + buf = (char*) xmlNodeGetContent (child); + int val = strtol (buf, NULL, 10); + xmlFree (buf); + buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); + if (!strcmp (buf, "bo:atomicNumber")) + elt = Table[val]; + else if (elt) + elt->iprops[(strncmp (buf, "bo:", 3))? buf: buf + 3] = val; + xmlFree (buf); + } else if (!strcmp (buf, "xsd:date")) { + // assumeing only the discovery year is useful for us + xmlFree (buf); + buf = (char*) xmlNodeGetContent (child); + int val = strtol (buf, NULL, 10); + xmlFree (buf); + buf = (char*) xmlGetProp (child, (xmlChar const*) "dictRef"); + if (elt && !strcmp (buf, "bo:discoveryDate")) + elt->iprops["discoveryDate"] = val; + xmlFree (buf); + } + } + if (props.size () > 0) { + if (elt) { + map :: iterator i, iend = props.end (); + for (i = props.begin (); i != iend; i++) + elt->props[(*i).first] = (*i).second; + } + props.clear (); + } + child = child->next; + } + if (elt) { + DimensionalValue const *v = dynamic_cast (elt->GetProperty ("radiusVDW")); + double r; + if (v) { + r = v->GetAsDouble (); + GcuDimensionalValue const val = v->GetValue (); + int prec = val.prec; + if (!strcmp (val.unit, "Å")) { + r *= 100.; + prec = (prec > 2)? prec - 2: 0; + } else if (!strcmp (val.unit, "pm")) + r = -1.; // FIXME: allow other units if needed + if (r > 0.) { + GcuAtomicRadius* radius = new GcuAtomicRadius; + radius->value.value = r; + radius->value.prec = prec; + radius->value.delta = val.delta; + radius->value.unit = "pm"; + radius->Z = elt->GetZ (); + radius->type = GCU_VAN_DER_WAALS; + radius->charge = 0; + radius->scale = NULL; + radius->cn = -1; + radius->spin = GCU_N_A_SPIN; + elt->m_radii.push_back (radius); + } + } + v = dynamic_cast (elt->GetProperty ("radiusCovalent")); + if (v) { + r = v->GetAsDouble (); + GcuDimensionalValue const val = v->GetValue (); + int prec = val.prec; + if (!strcmp (val.unit, "Å")) { + r *= 100.; + prec = (prec > 2)? prec - 2: 0; + } else if (!strcmp (val.unit, "pm")) + r = -1.; // FIXME: allow other units if needed + if (r > 0.) { + GcuAtomicRadius* radius = new GcuAtomicRadius; + radius->value.value = r; + radius->value.prec = prec; + radius->value.delta = val.delta; + radius->value.unit = "pm"; + radius->Z = elt->GetZ (); + radius->type = GCU_COVALENT; + radius->charge = 0; + radius->scale = NULL; + radius->cn = -1; + radius->spin = GCU_N_A_SPIN; + elt->m_radii.push_back (radius); + } + } + } + } + node = node->next; + } + } + xmlFreeDoc (xml); + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); +} + +Value const *Element::GetProperty (char const *property_name) +{ + map::iterator i = props.find (property_name); + return (i == props.end ())? NULL: (*i).second; +} + +int Element::GetIntegerProperty (char const *property_name) +{ + map::iterator i = iprops.find (property_name); + return (i == iprops.end ())? GCU_ERROR: (*i).second; +} + +string &Element::GetStringProperty (char const *property_name) +{ + static string empty_string; + map::iterator i = sprops.find (property_name); + return (i == sprops.end ())? empty_string: (*i).second; +} + +DimensionalValue const *Element::GetWeight () +{ + if (m_AtomicWeight == NULL) + m_AtomicWeight = dynamic_cast (props["mass"]); + return m_AtomicWeight; +} + +bool Element::IsMetallic () +{ + if (!m_MetallicCached) { + LoadRadii (); + GcuAtomicRadius r; + r.Z = m_Z; + r.type = GCU_METALLIC; + r.charge = 0; + r.spin = GCU_N_A_SPIN; + r.cn = -1; + r.scale = NULL; + m_Metallic = GetRadius (&r) || (m_Z > 99 && m_Z < 118); + m_MetallicCached = true; + } + return m_Metallic; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/element.h gnome-chemistry-utils-0.10.9/libs/gcu/element.h --- gnome-chemistry-utils-0.8.6/libs/gcu/element.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/element.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,305 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * element.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_ELEMENT_H +#define GCU_ELEMENT_H + +#include +#include +#include +#include +#include "chemistry.h" +#include "isotope.h" +#include "value.h" + +/*!\file */ +/*!\def GCU_ERROR +Defines a standard error value. +*/ +#define GCU_ERROR (1 << (sizeof(int) - 1)) + +/*!\namespace gcu +\brief The Gnome Chemistry Utils C++ classes + +The namespace used for all C++ classes provided by the Gnome Chemistry Utils base library. +*/ +namespace gcu +{ + +class EltTable; + +/*!\class Element gcu/element.h + Represents a chemical element. + This class has no public constructor or destructor. The instances are created by the framework + from data in the elements.xml file and + a user cannot create a new element. +*/ +class Element +{ +friend class EltTable; +private: + /*! + \param Z: the atomic number corresponding to the element + \param Symbol: the atomic symbol of the element + + This constructor is private and cannot be used ouside of this class. + */ + Element (int Z, const char* Symbol); + virtual ~Element (); + +public: + /*! + @param Z: the atomic number of a chemical element. + @return The chemical symbol of the element whose atomic number is Z or NULL if the element is unknown. + */ + static const gchar* Symbol (gint Z); + /*! + @param Z: the atomic number of a chemical element. + + This static method is used to know on what side of the symbol of the element whose atomic number is Z + attached hydrogens should be written. + @return true if hydrogens should be written on the right and false when it should be written on the left side. + */ + static bool BestSide (gint Z); + /*! + @param symbol: the symbol of a chemical element. + @return The atomic number of the element whose chemical symbol is used as parameter or 0 if the element is unknown. + */ + static gint Z (const gchar* symbol); + /*! + @param Z: the atomic number of a chemical element. + @return a pointer to the Element whose atomic number is Z or NULL if the element is unknown. + */ + static Element* GetElement (gint Z); + /*! + @param symbol: the symbol of a chemical element. + @return a pointer to the Element whose symbol is used as parameter or NULL if the element is unknown. + */ + static Element* GetElement (const gchar* symbol); + /*! + @param radius: a pointer to a GcuAtomicRadius structure. + + Before calling this function, most fields in the GcuAtomicRadius structure must be filled: + - Z: the atomic number, mandatory + - type: the type of the radius searched + - charge: the charge of the atom. 0 for all radii except ionic radii. + - cn: the coordination number or -1 if not significant + - spin: the spin state or GCU_N_A_SPIN if not significant + - scale: the name of the scale (e.g. "Pauling") or NULL + + The programs searches a value corresponding to the fields having a non default value. If one is found + the other fields are given the corresponding values f the first match before returning. + + @return true if a radius has been found and false if not. + */ + static bool GetRadius (GcuAtomicRadius* radius); + /*! + @param en: a pointer to a GcuElectronegativity structure. + + Before calling this function, the following fields in the GcuElectronegativity structure must be filled: + - Z: the atomic number, mandatory + - type: the gcu_radius_type, mandatory + - charge: the charge of the atom, mandatory; must be 0 for non ionic radii + and non null for ionic radii. + - scale: the name of the scale (e.g. "Pauling") or NULL + + The programs searches an electronegativity value for the element in the scale if given. If one is found + the value and the scale (if NULL on calling) are given the corresponding values of the first match before returning. + + @return true if a match has been found and false if not. + */ + static bool GetElectronegativity (GcuElectronegativity* en); + /*! + @param Z: the atomic number of a chemical element. + + The value returned by this method might be too low in some cases and is only indicative. Instances of the Atom class + accept any number of bonds. This behavior might change in future versions. + @return the maximum number of bonds an atom of the element can be involved in. + */ + static unsigned GetMaxBonds (gint Z); + /*! + Loads the atomic radii database. + */ + static void LoadRadii (); + /*! + Loads the atomic electronic properties database. + */ + static void LoadElectronicProps (); + /*! + Loads the isotopes database. + */ + static void LoadIsotopes (); + /*! + Loads the Blue Obelisk Database. + */ + static void LoadBODR (); + /*! + Loads all databases. + */ + static void LoadAllData (); + + /*! + \return The atomic number of the chemical element. + */ + int GetZ () {return m_Z;} + /*! + \return The chemical symbol of the element. + */ + const char* GetSymbol () {return m_Symbol;} + /*! + \return The default valence of the element for some elements, mainly non metals. For others, the returned value is -1 + and should not be taken into account. + */ + char GetDefaultValence () {return m_DefaultValence;} + /*! + The value returned by this method might be too low in some cases and is only indicative. Instances of the Atom class + accept any number of bonds. This behavior might change in future versions. + @return the maximum number of bonds an atom of the element can be involved in. + */ + unsigned GetMaxBonds () {return m_MaxBonds;} + /*! + This static method is used to know on what side of the symbol of the element + attached hydrogens should be written. + @return true if hydrogens should be written on the right and false when it should be written on the left side. + */ + bool GetBestSide () {return m_BestSide;} + /*! + Retrieves the default color used for the element. + @return an array of three double values for the red, green and blue components of the color. + */ + double* GetDefaultColor () {return m_DefaultColor;} + /*! + @return the name of the element in the current locale or in english if the current locale is not supported in the database. + */ + const char* GetName () {return name.c_str();} + /*! + @return a pointer to the array of pointers to GcuAtomicRadius structures for all known radii for the element. + Last value in the array is NULL. + */ + const GcuAtomicRadius** GetRadii (); + /*! + @return a pointer to the array of pointers to GcuElectronegativity structures for all known electronegativities for the element. + Last value in the array is NULL. + */ + const GcuElectronegativity** GetElectronegativities (); + /*! + @return the number of valence electrons of the neutral atom. + */ + unsigned GetValenceElectrons () {return m_nve;} + /*! + @return the number of valence electrons of the neutral atom, + including d and f electrons. + */ + unsigned GetTotalValenceElectrons () {return m_tve;} + /*! + @return the maximume number of valence electrons of the neutral atom, + including d and f electrons. + */ + unsigned GetMaxValenceElectrons () {return m_maxve;} + /*! + @return the atomic molar mass of the element. + */ + DimensionalValue const *GetWeight (); + /*! + @param natoms: atoms count. + + @return the isotopic pattern correponding to a fragment containing n atoms of the + element. + */ + IsotopicPattern *GetIsotopicPattern (unsigned natoms); + /*! + @return the fundamental electronic configuration for the element. The + returned string is formated as a pango markup, with electron numbers + for each sublevel as superscript. + */ + std::string const& GetElectronicConfiguration () {return ElecConfig;} + /*! + @return the map of known names for the element indexed by language. + */ + std::map const& GetNames () {return names;} + /*! + @param rank: the rank of the ionization. + + @return the requested ionization energy as a &GcuDimensionalValue. + */ + GcuDimensionalValue const *GetIonizationEnergy (unsigned rank = 1); + /*! + @param rank: the rank of the electron affinity. + + @return the requested electron affinity as a &GcuDimensionalValue. + For most elements, only the first is known. + */ + GcuDimensionalValue const *GetElectronAffinity (unsigned rank = 1); + /*! + @param property_name: the name of the property as used in the Blue + Obelisk Data Repository (without the "bo:" prefix). + + @return the requested property if known, or NULL. + */ + Value const *GetProperty (char const *property_name); + /*! + @param property_name: the name of the property as used in the Blue + Obelisk Data Repository (without the "bo:" prefix). + + @return the requested string property if known as a reference or an empty string. + */ + std::string &GetStringProperty (char const *property_name); + /*! + @param property_name: the name of the property as used in the Blue + Obelisk Data Repository (without the "bo:" prefix). + + @return the requested integer property if known, or G_MININT32. + */ + int GetIntegerProperty (char const *property_name); + + /*! + @return true if the element is a metal, false otherwise. + */ + bool IsMetallic (); + +private: + unsigned char m_Z, m_nve, m_tve, m_maxve; + char m_Symbol[4]; + DimensionalValue const *m_AtomicWeight; + char m_DefaultValence; + unsigned char m_MaxBonds; + bool m_BestSide, m_Metallic, m_MetallicCached; + double m_DefaultColor[3]; + std::string name; + std::vector m_radii; + std::vector m_en; + std::vector m_isotopes; + std::vector m_patterns; + std::vector m_ei; + std::vector m_ae; + std::map names; + std::map props; + std::map sprops; + std::map iprops; + std::string ElecConfig; +}; + +} // namespace gcu + +#endif // GCU_ELEMENT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/filechooser.cc gnome-chemistry-utils-0.10.9/libs/gcu/filechooser.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/filechooser.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/filechooser.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,158 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * filechooser.cc + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include "filechooser.h" +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +#endif +#include + +using namespace std; + +namespace gcu +{ + +FileChooser::FileChooser (Application *App, bool Save, list mime_types, Document *pDoc, char const *title, GtkWidget *extra_widget) +{ + char* filename = NULL; + m_pDoc = pDoc; + dialog = (GtkFileChooser*) gtk_file_chooser_dialog_new ( + (title != NULL)? title: ((Save)? _("Save as"): _("Open")), + App->GetWindow(), + (Save)? GTK_FILE_CHOOSER_ACTION_SAVE: GTK_FILE_CHOOSER_ACTION_OPEN, + (Save)? GTK_STOCK_SAVE: GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + NULL); + if (extra_widget) + gtk_file_chooser_set_extra_widget (dialog, extra_widget); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + GtkFileChooser* chooser = GTK_FILE_CHOOSER (dialog); + GtkFileFilter* filter = gtk_file_filter_new (); + list::iterator i, iend = mime_types.end (); + for (i = mime_types.begin (); i != iend; i++) + gtk_file_filter_add_mime_type (filter, (*i).c_str ()); + GtkComboBox *format_combo = NULL; + if (!Save) + gtk_file_chooser_set_select_multiple (chooser, true); + if (mime_types.size () > 1) { + GtkWidget *box = gtk_hbox_new (FALSE, 2); + GtkWidget *label = gtk_label_new_with_mnemonic (_("File _type:")); + format_combo = GTK_COMBO_BOX (gtk_combo_box_new_text ()); + gtk_combo_box_append_text (format_combo, _("Automatic")); + for (i = mime_types.begin (); i != iend; i++) { + char const *type = go_mime_type_get_description ((*i).c_str ()); + if (type) + gtk_combo_box_append_text (format_combo, type); + else + gtk_combo_box_append_text (format_combo, (*i).c_str ()); + } + gtk_combo_box_set_active (format_combo, 0); + + gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (format_combo), FALSE, TRUE, 12); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (format_combo)); + + if (extra_widget) { + if (GTK_IS_TABLE (extra_widget)) { + GtkTable *t = GTK_TABLE (extra_widget); + guint rows, cols; + g_object_get (G_OBJECT (t), "n-rows", &rows, "n-columns", &cols, NULL); + gtk_table_resize (t, rows + 1, cols); + gtk_box_pack_start (GTK_BOX (box), gtk_label_new (""), TRUE, TRUE, 0); + gtk_table_attach (t, box, 0, cols, rows, rows + 1, GTK_FILL, static_cast (0), 0, 0); + } else + g_warning ("not implemented, please file a bug report"); + } else + gtk_file_chooser_set_extra_widget (dialog, box); + gtk_widget_show_all (box); + } + gtk_file_chooser_set_filter (chooser, filter); + // Now add network directories + gtk_file_chooser_set_local_only (chooser, false); + char const* dir = App->GetCurDir (); + if (dir) + gtk_file_chooser_set_current_folder_uri (chooser, dir); + while (gtk_widget_show_all (GTK_WIDGET (dialog)), gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { + // find the mime_type + char const *mime_type = NULL; + if (mime_types.size () == 1) + mime_type = mime_types.front ().c_str (); + else if (mime_types.size () > 0) { + int j = gtk_combo_box_get_active (format_combo); + if (j > 0) { + i = mime_types.begin (); + while (--j > 0) + i++; + mime_type = (*i).c_str (); + } + } + if (Save) { + filename = gtk_file_chooser_get_uri (chooser); + if (!mime_type) { + mime_type = go_get_mime_type (filename); +#ifdef GOFFICE_IS_0_6 + if (!mime_type) + mime_type = g_content_type_guess (filename, NULL, 0, NULL); +#endif + // ensure the found mime type is in the list + bool found = false; + if (mime_type) { + list::iterator it, itend = mime_types.end (); + for (it = mime_types.begin (); it != itend; it++) + if (*it == mime_type) { + found = true; + break; + } + } + if (!found) + mime_type = mime_types.front ().c_str (); + } + gtk_widget_hide (GTK_WIDGET (dialog)); + if (!App->FileProcess (filename, mime_type, Save, GTK_WINDOW (dialog), m_pDoc)) { + g_free (filename); + break; + } + g_free (filename); + } else { + GSList* files = gtk_file_chooser_get_uris (chooser); + GSList* iter = files; + gtk_widget_hide (GTK_WIDGET (dialog)); + while (iter) { + filename = (char*) iter->data; + App->FileProcess(filename, (mime_type)? mime_type: go_get_mime_type (filename), Save, GTK_WINDOW (dialog), m_pDoc); + g_free (filename); + iter = iter->next; + } + g_slist_free (files); + break; + } + } + gtk_widget_destroy (GTK_WIDGET (dialog)); +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/filechooser.h gnome-chemistry-utils-0.10.9/libs/gcu/filechooser.h --- gnome-chemistry-utils-0.8.6/libs/gcu/filechooser.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/filechooser.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,72 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * filechooser.h + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_FILECHOOSER_H +#define GCU_FILECHOOSER_H + +#include +#include +#include +#include + +/*!\file*/ +namespace gcu +{ + +class Application; +class Document; + +/*!\class FileChooser gcu/filechooser.h +This class is used each time a file name must be choosen. It embeds a GtkFileChooserDialog +window. +*/ +class FileChooser +{ +public: +/*! +@param App the Application instance owning the dialog. +@param Save tells if the requested file is to be saved or loaded. +@param mime_types a std::list of supported mime types. +@param pDoc the document to save, the parameter is optional when loading. +Default value is NULL. +@param title an optional title for the dialog box. Default value is NULL. +@param extra_widget an optional widget to add to the GtkFileChooserDialog +window. Default value is NULL. + +The constructor shows the GtkFileChooserDialog window, retrieve it's response and calls +Application::FileProcess if needed. The dialog is modal (nothing else can be done while +it is opened). +*/ + FileChooser (Application *App, bool Save, std::list mime_types, Document *pDoc = NULL, char const *title = NULL, GtkWidget *extra_widget = NULL); + +private: + GtkFileChooser* dialog; + bool m_bSave; + Application* m_pApp; + Document* m_pDoc; +}; + +} + +#endif // GCU_FILECHOOSER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/formula.cc gnome-chemistry-utils-0.10.9/libs/gcu/formula.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/formula.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/formula.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,687 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * formula.cc + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "formula.h" +#include "element.h" +#include "residue.h" +#include "document.h" +#include "molecule.h" +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace gcu +{ + +parse_error::parse_error(const string& __arg, int start, int length) + : exception(), m_msg(__arg) +{ + m_start = start; + m_length = length; +} + +parse_error::~parse_error() throw() { } + +const char* +parse_error::what() const throw() +{ return m_msg.c_str(); } + +const char* +parse_error::what(int &start, int &length) const throw() +{ + start = m_start; + length = m_length; + return m_msg.c_str(); +} + +FormulaElt::FormulaElt () +{ + stoich = 1; +} + +FormulaElt::~FormulaElt () +{ +} + +string FormulaElt::Markup () +{ + ostringstream oss; + if (stoich > 1) + oss << "" << stoich << ""; + return oss.str (); +} + +string FormulaElt::Text () +{ + ostringstream oss; + if (stoich > 1) + oss << stoich; + return oss.str (); +} + +FormulaAtom::FormulaAtom (int Z): FormulaElt() +{ + elt = Z; +} + +FormulaAtom::~FormulaAtom () +{ +} + +string FormulaAtom::Markup () +{ + string s = Element::Symbol (elt); + s += FormulaElt::Markup (); + return s; +} + +string FormulaAtom::Text () +{ + string s = Element::Symbol (elt); + s += FormulaElt::Text (); + return s; +} + +int FormulaAtom::GetValence () +{ + return Element::GetElement (elt)->GetDefaultValence (); +} + +void FormulaAtom::BuildRawFormula (map &raw) +{ + raw[elt] += stoich; +} + +FormulaBlock::FormulaBlock (): FormulaElt() +{ +} + +FormulaBlock::~FormulaBlock () +{ + list::iterator i, end = children.end(); + for (i = children.begin (); i != end; i++) + delete *i; +} + +string FormulaBlock::Markup () +{ + ostringstream oss; + switch (parenthesis) { + case 0: + oss << "("; + break; + case 1: + oss << "["; + break; + case 2: + oss << "{"; + break; + } + list::iterator i, end = children.end(); + for (i = children.begin (); i != end; i++) { + oss << (*i)->Markup (); + } + switch (parenthesis) { + case 0: + oss << ")"; + break; + case 1: + oss << "]"; + break; + case 2: + oss << "}"; + break; + } + oss << FormulaElt::Markup (); + return oss.str (); +} + +string FormulaBlock::Text () +{ + ostringstream oss; + switch (parenthesis) { + case 0: + oss << "("; + break; + case 1: + oss << "["; + break; + case 2: + oss << "{"; + break; + } + list::iterator i, end = children.end(); + for (i = children.begin (); i != end; i++) { + oss << (*i)->Text (); + } + switch (parenthesis) { + case 0: + oss << ")"; + break; + case 1: + oss << "]"; + break; + case 2: + oss << "}"; + break; + } + oss << FormulaElt::Text (); + return oss.str (); +} + +void FormulaBlock::BuildRawFormula (map &raw) +{ + map local; + list::iterator i, iend = children.end(); + for (i = children.begin (); i != iend; i++) + (*i)->BuildRawFormula (local); + map::iterator j, jend = local.end(); + for (j = local.begin (); j != jend; j++){ + raw[(*j).first] += stoich * (*j).second;} +} + +int FormulaBlock::GetValence () +{ + return -1; // FIXME !!! +} + +FormulaResidue::FormulaResidue (Residue const *res, char const *symbol, int Z): FormulaElt() +{ + residue = res; + Symbol = symbol; + m_Z = Z; +} + +FormulaResidue::~FormulaResidue () +{ +} + +string FormulaResidue::Markup () +{ + size_t n = Symbol.find ('-'); + string s = (n != string::npos)? string ("") + string (Symbol, 0, n) + "" + string (Symbol, n): Symbol; + s += FormulaElt::Text (); + return s; +} + +string FormulaResidue::Text () +{ + string s = Symbol; + s += FormulaElt::Text (); + return s; +} + +void FormulaResidue::BuildRawFormula (map &raw) +{ + std::map const &m = residue->GetRawFormula (); + map::const_iterator j, jend = m.end(); + for (j = m.begin (); j != jend; j++){ + raw[(*j).first] += stoich * (*j).second;} +} + +int FormulaResidue::GetValence () +{ + return 1; // residues with other valences are not currently supported +} + +bool Formula::AnalString (char *sz, list &result, bool &ambiguous, int offset) +{ + if (*sz == 0) + return true; + unsigned i = 0; + char sy[Residue::MaxSymbolLength + 1]; + Residue const *r = NULL; + bool amb = ambiguous, local_amb; + if (*sz) { + // search for any abbreviation starting sz + strncpy (sy, sz, Residue::MaxSymbolLength); + i = strlen (sz); + if (i > Residue::MaxSymbolLength) + i = Residue::MaxSymbolLength; + while (i > 0) { + sy[i] = 0; + r = Residue::GetResidue (sy, &local_amb); + if (r) + break; + i--; + } + if (r) { + FormulaResidue *fr = new FormulaResidue (r, sy, (local_amb? Element::Z (sy): 0)); + fr->start = offset; + fr->end = offset + i - 1; + result.push_back (fr); + ambiguous |= local_amb; + if (AnalString (sz + i, result, ambiguous, offset + i)) + return true; + ambiguous = amb; // restore ambiguity state + delete result.back (); + result.pop_back (); + } + if (islower (*sz)) { + /* we might have some abbreviation around there */ + } + if (!(m_ParseMode & GCU_FORMULA_PARSE_NO_CASE)) + *sz = toupper (*sz); + if (strlen (sz) == 1) { + i = Element::Z (sz); + if (i > 0) { + FormulaAtom *fa = new FormulaAtom (i); + fa->start = offset; + fa->end = offset + 1; + result.push_back (fa); + return true; + } else + return false; + } + if (isupper (sz[1])) { + sy [0] = *sz; + sy [1] = 0; + i = Element::Z (sy); + if (i > 0) { + FormulaAtom *fa = new FormulaAtom (i); + fa->start = offset; + fa->end = offset + 1; + result.push_back (fa); + if (AnalString (sz + 1, result, ambiguous, offset + 1)) + return true; + delete result.back (); + result.pop_back (); + } + if (!(m_ParseMode & GCU_FORMULA_PARSE_NO_CASE)) + sy[1] = tolower (sz[1]); + sy[2] = 0; + i = Element::Z (sy); + if (i > 0) { + FormulaAtom *fa = new FormulaAtom (i); + fa->start = offset; + fa->end = offset + 2; + result.push_back (fa); + if (AnalString (sz + 2, result, ambiguous, offset + 2)) + return true; + delete result.back (); + result.pop_back (); + } + if (*sz != 'U') + return false; + if (!(m_ParseMode & GCU_FORMULA_PARSE_NO_CASE)) + sy[2] = tolower (sz[2]); + sy[3] = 0; + i = Element::Z (sy); + if (i > 0) { + FormulaAtom *fa = new FormulaAtom (i); + fa->start = offset; + fa->end = offset + 3; + result.push_back (fa); + if (AnalString (sz + 3, result, ambiguous, offset + 3)) + return true; + } + return false; + } else { + sy[0] = sz[0]; + sy[1] = sz[1]; + if (*sz == 'U') { + // No 2 chars symbols begining with U exist, so try 3 chars symbols + if (!(m_ParseMode & GCU_FORMULA_PARSE_NO_CASE)) + sy[2] = tolower (sz[2]); + sy[3] = 0; + i = Element::Z (sy); + if (i > 0) { + FormulaAtom *fa = new FormulaAtom (i); + fa->start = offset; + fa->end = offset + 3; + result.push_back (fa); + if (AnalString (sz + 3, result, ambiguous, offset + 3)) + return true; + delete result.back (); + result.pop_back (); + } + } + sy[2] = 0; + i = Element::Z (sy); + if (i > 0) { + FormulaAtom *fa = new FormulaAtom (i); + fa->start = offset; + fa->end = offset + 2; + result.push_back (fa); + if (AnalString (sz + 2, result, ambiguous, offset + 2)) + return true; + delete result.back (); + result.pop_back (); + } + sy[1] = 0; + i = Element::Z (sy); + if (i > 0) { + FormulaAtom *fa = new FormulaAtom (i); + fa->start = offset; + fa->end = offset + 1; + result.push_back (fa); + if (AnalString (sz + 1, result, ambiguous, offset + 1)) + return true; + } + } + } + return false; +} + +Formula::Formula (string entry, FormulaParseMode mode) throw (parse_error) +{ + Entry = entry; + m_ParseMode = mode; + Parse (Entry, Details); + m_ConnectivityCached = m_WeightCached = false; +} + +Formula::~Formula () +{ + Clear (); +} + +char const *Formula::GetMarkup () +{ + return Markup.c_str (); +} + +map &Formula::GetRawFormula () +{ + return Raw; +} + +char const *Formula::GetRawMarkup () +{ + return RawMarkup.c_str (); +} + +void Formula::SetFormula (string entry) throw (parse_error) +{ + Entry = entry; + Clear (); + Parse (Entry, Details); + list::iterator i, iend = Details.end(); + // now update markups and raw formula + for (i = Details.begin (); i != iend; i++) { + Markup += (*i)->Markup (); + (*i)->BuildRawFormula (Raw); + } + ostringstream oss; + map elts; + int nC = 0, nH = 0; + map::iterator j, jend = Raw.end(); + for (j = Raw.begin (); j != jend; j++) { + switch ((*j).first) { + case 1: + nH = (*j).second; + break; + case 6: + nC = (*j).second; + break; + default: + elts[Element::Symbol((*j).first)] = (*j).second; + break; + } + } + if (nC > 0) { + oss << "C"; + if (nC > 1) + oss << "" << nC << ""; + } + if (nH > 0) { + oss << "H"; + if (nH > 1) + oss << "" << nH << ""; + } + map::iterator k, kend = elts.end (); + for (k = elts.begin (); k != kend; k++) { + nC = (*k).second; + oss << (*k).first; + if (nC > 1) + oss << "" << nC << ""; + } + RawMarkup = oss.str (); +} + +void Formula::Clear () +{ + list::iterator i, end = Details.end(); + for (i = Details.begin (); i != end; i++) + delete *i; + Details.clear (); + Markup = ""; + Raw.clear (); + RawMarkup = ""; + m_ConnectivityCached = m_WeightCached = false; +} + +void Formula::Parse (string &formula, list &result) throw (parse_error) +{ + int i = 0, npo, size = formula.size (), j, k = 0; // parsing index, number of open parenthesis, string size + char c = 0, *sz, *end; + bool ambiguous = false; + while (i < size) { + if (formula[i] == '(' || formula[i] == '[' || formula[i] == '{') { + switch (formula[i]) { + case '(': + c = ')'; + k = 0; + break; + case '[': + c = ']'; + k = 1; + break; + case '{': + c = '}'; + k = 2; + break; + } + npo = 1; + j = i + 1; + while (j < size && npo > 0) { + if (formula[j] == '(' || formula[j] == '[' || formula[j] == '{') + npo++; + else if (formula[j] == ')' || formula[j] == ']' || formula[j] == '}') + npo--; + j++; + } + if (npo || formula[j - 1] != c) + throw parse_error (_("Unmatched parenthesis"), i, 1); + string str (formula, i + 1, j - i - 2); + FormulaBlock *block = new FormulaBlock (); + block->parenthesis = k; + block->start = i; + block->end = j; + result.push_back (block); + try { + Parse (str, block->children); + } + catch (parse_error &error) { + error.add_offset (i + 1); + throw error; + } + block->stoich = strtol (formula.c_str () + j, &end, 10); + i = end - formula.c_str (); + if (i == j) + block->stoich = 1; + } else if (isalpha (formula[i]) || formula[i] == '-') { + j = i + 1; + while (isalpha (formula[j]) || formula[j] == '-') + j++; + k = j - i; + sz = new char[k + 1]; + strncpy (sz, formula.c_str () + i, k); + sz[k] = 0; + if (!AnalString (sz, result, ambiguous, i)) { + delete [] sz; + throw parse_error (_("Could not interpret the symbol list"), i, k); + } + delete [] sz; + i = j; + FormulaElt *elt = result.back (); + if (!elt) + throw runtime_error (_("Parser failed, please fill a bug report.")); + elt->stoich = strtol (formula.c_str () + j, &end, 10); + i = end - formula.c_str (); + if (i == j) + elt->stoich = 1; + } else if (formula[i] == ')' || formula[i] == ']' || formula[i] == '}') { + throw parse_error (_("Unmatched parenthesis"), i, 1); + } else + throw parse_error (_("Invalid character"), i, 1); + } + if (ambiguous) { + switch (m_ParseMode & 7) { + case GCU_FORMULA_PARSE_GUESS: { + // if it fails, nothing is replaced + if (!TryReplace (result, result.begin ())) + g_warning ("ambiguous formula"); + break; + } + case GCU_FORMULA_PARSE_ATOM: { + // replace all ambiguous residues + list::iterator it = result.begin (), end = result.end (); + FormulaResidue *res; + while (it != result.end ()) { + res = dynamic_cast (*it); + if (res && res->GetZ ()) { + FormulaAtom *elt = new FormulaAtom (res->GetZ()); + elt->stoich = res->stoich; + it = result.erase (it); + delete res; + it = result.insert (it, elt); + } else + it++; + } + break; + } + case GCU_FORMULA_PARSE_RESIDUE: + // don't do anything + break; + case GCU_FORMULA_PARSE_ASK: { + // FIXME: really ask + break; + } + } + } +} + +DimensionalValue Formula::GetMolecularWeight (bool &artificial) +{ + if (Raw.size () == 0) { + return m_Weight; + } + if (!m_WeightCached) { + DimensionalValue atom_weight; + m_Artificial = false; // most formula don't have artificial elements + map::iterator i, end = Raw.end (), begin = Raw.begin (); + for (i = begin; i != end; i++) { + atom_weight = *Element::GetElement ((*i).first)->GetWeight (); + if (atom_weight.GetValue ().prec == 0) + m_Artificial = true; + m_Weight = (i == begin)? atom_weight * (*i).second: m_Weight + atom_weight * (*i).second; + } + } + m_WeightCached = true; + artificial = m_Artificial; + return m_Weight; +} + +void Formula::CalculateIsotopicPattern (IsotopicPattern &pattern) +{ + map::iterator i, end = Raw.end (); + i = Raw.begin (); + if (i == end) // empty formula + return; + IsotopicPattern *pat = NULL, *pat0; + while (!pat && (i != end)) { + pat = Element::GetElement ((*i).first)->GetIsotopicPattern ((*i).second); + i++; + } + if (!pat) + return; + pattern.Copy (*pat); + pat->Unref (); + for (; i != end; i++) { + pat = Element::GetElement ((*i).first)->GetIsotopicPattern ((*i).second); + if (!pat) { + // no stable isotope known for the element + pattern.Clear (); + return; + } + pat0 = pattern.Multiply (*pat); + pat->Unref (); + pat = pat0->Simplify (); + pattern.Copy (*pat); + pat0->Unref (); + pat->Unref (); + } +} + +bool Formula::BuildConnectivity () +{ + Document *Doc = new Document (NULL); + Molecule *mol = Molecule::MoleculeFromFormula (Doc, *this, false); + bool result = mol; + delete Doc; + return result; +} + +bool Formula::TryReplace (list &result, list::iterator it) +{ + if (BuildConnectivity ()) + return true; + FormulaResidue *res; + while (it != result.end ()) { + res = dynamic_cast (*it); + if (res && res->GetZ ()) + break; + it++; + } + if (it == result.end ()) + return false; + list::iterator next = it; + next++; + if (TryReplace (result, next)) + return true; + FormulaAtom *elt = new FormulaAtom (res->GetZ()); + elt->stoich = res->stoich; + it = result.erase (it); + result.insert (it, elt); + next = it; + next++; + bool ret = TryReplace (result, next); + if (!ret) { + it--; + delete (*it); + it = result.erase (it); + result.insert (it, res); + } else + delete res; + return ret; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/formula.h gnome-chemistry-utils-0.10.9/libs/gcu/formula.h --- gnome-chemistry-utils-0.8.6/libs/gcu/formula.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/formula.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,373 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * formula.h + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_FORMULA_H +#define GCU_FORMULA_H + +#include +#include +#include +#include +#include "isotope.h" +#include "macros.h" +#include "value.h" + +/*!\file*/ +namespace gcu +{ + +/*!\enum FormulaParseMode gcu/formula.h +The way formula should be interpreted when they contain symbols that might +represent both an atom or a group of atoms such as Ac and Pr. Possible values +are: +- GCU_FORMULA_PARSE_GUESS: try to determine the most probable interpretation of +the symbol, +- GCU_FORMULA_PARSE_ATOM: always interpret as atoms, +- GCU_FORMULA_PARSE_RESIDUE: always interpret as groups, +- GCU_FORMULA_PARSE_ASK: ask the user for each encountered instance, +- GCU_FORMULA_PARSE_NO_CASE: this one is unrelated and can ba combined with any +of the previous values, just make the parsing stricktly case sensitive. +*/ +typedef enum { + GCU_FORMULA_PARSE_GUESS, + GCU_FORMULA_PARSE_ATOM, + GCU_FORMULA_PARSE_RESIDUE, + GCU_FORMULA_PARSE_ASK, + GCU_FORMULA_PARSE_NO_CASE=8 +} FormulaParseMode; + +/*!\class parse_error gcu/formula.h +Exception class derived from std::exception used for errors encountered +when parsing a formula. +*/ + +class parse_error: public std::exception +{ +public: +/*! Takes a character string describing the error and two integers +* indicating where the error occured. +*/ + explicit + parse_error (const std::string& __arg, int start, int length); + + virtual + ~parse_error () throw (); + +/*! Returns a C-style character string describing the general cause of + * the current error (the same string passed to the constructor). +*/ + virtual const char* + what () const throw (); +/*! Returns a C-style character string describing the general cause of + * the current error (the same string passed to the constructor). +*/ + const char* + what (int& start, int& length) const throw (); + +/*! Adds an offset to the start of the error. This is used by the Formula +class when an exception occurs while parsing a substring. +*/ + void add_offset (int offset) {m_start += offset;} + +private: + std::string m_msg; + int m_start, m_length; + +}; + +/*! class FormulaElt gcu/formula.h +Bas class for elements found in a formula. +*/ + +class FormulaElt +{ +public: +/*! +The constructor. +*/ + FormulaElt (); +/*! +The destructor. +*/ + virtual ~FormulaElt (); +/*! +@return the string representation of the element as a markup. +*/ + virtual std::string Markup (); +/*! +@return the string representation of the element as raw text. +*/ + virtual std::string Text (); +/*! +@param raw where to put the result + +Adds the number of atoms of each element to the map taking the stoichiometry +coefficient into account. +*/ + virtual void BuildRawFormula (std::map &raw) = 0; +/*! +@return the (most probable) valence of the element. +*/ + virtual int GetValence () = 0; +/*! +The stoichiometry coefficient associated with he element. +*/ + int stoich; +/*! +The start index in bytes of the element in the formula input string. +*/ + unsigned start; +/*! +The end index in bytes of the element in the formula input string. +*/ + unsigned end; +}; + +/*! class FormulaAtom gcu/formula.h +Represents an atom in a formula. +*/ + +class FormulaAtom: public FormulaElt +{ +public: +/*! +@param Z +*/ + FormulaAtom (int Z); +/*! +The destructor. +*/ + virtual ~FormulaAtom (); +/*! +@return the string representation of the element as a markup. +*/ + std::string Markup (); +/*! +@return the string representation of the element as raw text. +*/ + std::string Text (); +/*! +@param raw where to put the result + +Adds the stoichiometry coefficient to the entry correponding to the element. +*/ + void BuildRawFormula (std::map &raw); +/*! +@return the (most probable) valence of the element. +*/ + int GetValence (); +/*! +*/ + int elt; +}; + +/*! class FormulaBlock gcu/formula.h +Represents a sub formula delimited by a pair of matching brackets. +*/ + +class FormulaBlock: public FormulaElt +{ +public: +/*! +*/ + FormulaBlock (); +/*! +The destructor. +*/ + virtual ~FormulaBlock (); +/*! +@return the string representation of the element as a markup. +*/ + std::string Markup (); +/*! +@return the string representation of the element as raw text. +*/ + std::string Text (); +/*! +@param raw where to put the result + +Adds the number of atoms of each element to the map taking the stoichiometry +coefficient into account. +*/ + void BuildRawFormula (std::map &raw); +/*! +@return the (most probable) valence of the element. +*/ + int GetValence (); +/*! +The list of the formula elements delimited by the pair of brackets. +*/ + std::list children; +/*! +0 for "()", 1 for "[]" or 2 for "{}". +*/ + int parenthesis; +}; + +class Residue; + +/*! class FormulaResidue gcu/formula.h +*/ + +class FormulaResidue: public FormulaElt +{ +public: +/*! +@param res a gcu::Residue. +@param symbol the atoms group symbol +@param Z the atomic number of the element with the same symbol or 0. +*/ + FormulaResidue (Residue const *res, char const *symbol, int Z); +/*! +The destructor. +*/ + virtual ~FormulaResidue (); +/*! +@return the string representation of the element as a markup. +*/ + std::string Markup (); +/*! +@return the string representation of the element as raw text. +*/ + std::string Text (); +/*! +@param raw where to put the result + +Adds the number of atoms of each element to the map taking the stoichiometry +coefficient into account. +*/ + void BuildRawFormula (std::map &raw); +/*! +@return the (most probable) valence of the element. +*/ + int GetValence (); +/*! +The gcu::Residue correponding to the found symbol. +*/ + Residue const *residue; +/*! +The symbol of the atoms group. +*/ + std::string Symbol; +/*!\fn GetZ() +@return the atomic number of the element with the same symbol or 0. +*/ +GCU_RO_PROP (int, Z); +}; + + +/*!\class Formula gcu/formula.h +This class interprets a chemical formula provided as a string and make +some calculations using it. Currently, it is able to calculate the raw formula, +the molecular weight and the isotopic pattern. +*/ +class Formula +{ +public: +/*! +@param entry: the formula to parse as a string. +@param mode: the way ambiguous symbols shoud be interpreted. +The constructor will emit a parse_error exception. +if it cannot parse the given formula. +*/ + Formula (std::string entry, FormulaParseMode mode = GCU_FORMULA_PARSE_GUESS) throw (parse_error); + +/*! +The destructor. +*/ + virtual ~Formula (); + +/*! +@return the original formula as a pango markup. +*/ + char const *GetMarkup (); +/*! +@return the raw formula as a map of atoms numbers indexed by atomic number Z. +*/ + std::map &GetRawFormula (); +/*! +@return the raw formula as a pango markup. +*/ + char const *GetRawMarkup (); +/*! +@param entry: the formula to parse as a string. +Calls Formula::Clear before parsing the new formula. +The method will emit a parse_error exception +if it cannot parse the given formula. +*/ + void SetFormula (std::string entry) throw (parse_error); +/*! +Clears all data. +*/ + void Clear (); +/*! +@param artificial: will be true if the formula contains an artificial element (with +no natural isotope). +@returns the molecular weight corresponding to the formula. +*/ + DimensionalValue GetMolecularWeight (bool &artificial); +/*! +@param pattern: the IsotopicPattern to be filled +This method evaluates the isotopic pattern and fills the pattern parameter +with the calculated data. +*/ + void CalculateIsotopicPattern (IsotopicPattern &pattern); + +/*! +Returns the parsed formula as a list of elements. +*/ + std::list const &GetElements () const {return Details;} + +private: + bool BuildConnectivity (); + void Parse (std::string &formula, std::list&result) throw (parse_error); + bool AnalString (char *sz, std::list &result, bool &ambiguous, int offset); + bool TryReplace (std::list &result, std::list::iterator it); + +private: + std::string Entry, Markup, RawMarkup; + std::map Raw; + std::list Details; + DimensionalValue m_Weight; + bool m_WeightCached; + bool m_Artificial; + bool m_ConnectivityCached; + +/*!\fn SetParseMode(FormulaParseMode ParseMode) +@param ParseMode the new FormulaParseMode. + +Sets the way ambiguous symbols are interpreted. +*/ +/*!\fn GetParseMode() +@return the current parse mode. +*/ +/*!\fn GetRefParseMode() +@return the current parse mode as a reference. +*/ +GCU_PROP (FormulaParseMode, ParseMode); +}; + +} + +#endif // GCU_FORMULA_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gldocument.cc gnome-chemistry-utils-0.10.9/libs/gcu/gldocument.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/gldocument.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gldocument.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,39 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/gldocument.cc + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include + +namespace gcu +{ + +GLDocument::GLDocument (Application *App): Document (App) +{ +} + +GLDocument::~GLDocument () +{ +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gldocument.h gnome-chemistry-utils-0.10.9/libs/gcu/gldocument.h --- gnome-chemistry-utils-0.8.6/libs/gcu/gldocument.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gldocument.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,82 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/gldocument.h + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_GL_DOCUMENT_H +#define GCU_GL_DOCUMENT_H + +#include "document.h" +#include "macros.h" + +/*!\file*/ +namespace gcu +{ + +class GLView; +class Matrix; + +/*!\class GLDocument gcu/gldocument.h +This class is a base class for documents representing 3d objects. +*/ + +class GLDocument: public Document +{ +public: +/*! +@param App the application owning the new document. + +Default constructor. +*/ + GLDocument (Application *App); +/*! +Default destructor. +*/ + virtual ~GLDocument (); + +/*! +@param m the Matrix giving the current model orientation + +Called by GLView::Update to render the model. +*/ + virtual void Draw (Matrix const &m) const = 0; + +// Properties +/*!\var m_MaxDist +The longest distance between any object and the center of the model. +*/ +/*!\fn GetMaxDist() +@return the longest distance between any object and the center of the model. +*/ +GCU_PROT_PROP (double, MaxDist); +/*!\var m_View +The associated GLView instance. +*/ +/*!\fn GetView() +@return the associated GLView instance. +*/ +GCU_PROT_PROP (GLView*, View); +}; + +}; // namespace gcu + +#endif // GCU_GL_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/glview.cc gnome-chemistry-utils-0.10.9/libs/gcu/glview.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/glview.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/glview.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,623 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/glview.cc + * + * Copyright (C) 2006-2009 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include +#include +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +#endif +#include +#include +#include +#include +#include +#include + +#define ROOTDIR "/apps/gchemutils/gl/" + +static GdkGLConfig *glconfig = NULL; +double DefaultPsi = 70.; +double DefaultTheta = 10.; +double DefaultPhi = -90.; +bool OffScreenRendering = false; + +using namespace std; + +namespace gcu +{ +#ifdef HAVE_GO_CONF_SYNC +GOConfNode *GLView::m_ConfNode = NULL; +#else +GConfClient *GLView::m_ConfClient = NULL; +#endif +guint GLView::m_NotificationId = 0; +int GLView::nbViews = 0; + +// Callbacks +static bool on_init(GtkWidget *widget, GLView* View) +{ + View->Init (); + return true; +} + +bool on_reshape(GtkWidget *widget, GdkEventConfigure *event, GLView* View) +{ + View->Reshape (); + return true; +} + +static bool on_draw(GtkWidget *widget, GdkEventExpose *event, GLView* View) +{ + /* Draw only last expose. */ + if (event->count > 0) return TRUE; + + View->Draw (); + return true; +} + +static bool on_motion(GtkWidget *widget, GdkEventMotion *event, GLView* View) +{ + View->OnMotion (event); + return true; +} + +static bool on_pressed(GtkWidget *widget, GdkEventButton *event, GLView* View) +{ + return View->OnPressed (event); +} + +#ifdef HAVE_GO_CONF_SYNC +static void on_config_changed (GOConfNode *node, gchar const *key, gpointer data) +{ + if (!strcmp (key, ROOTDIR"off-screen-rendering")) + OffScreenRendering = go_conf_get_bool (node, key); +} +#else +static void on_config_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer data) +{ + if (!strcmp (gconf_entry_get_key (entry),ROOTDIR"off-screen-rendering")) + OffScreenRendering = gconf_value_get_bool (gconf_entry_get_value (entry)); +} +#endif + +// GLView implementation +#define GCU_CONF_DIR_GL "gl" + +GLView::GLView (GLDocument* pDoc) throw (std::runtime_error): Printable () +{ + m_bInit = false; + m_Doc = pDoc; + m_Red = m_Green = m_Blue = 0.; + m_Alpha = 1.; + m_Angle = 10.; + nbViews++; + SetRotation (DefaultPsi, DefaultTheta, DefaultPhi); +/* Create new OpenGL widget. */ + if (glconfig == NULL) + { + /* Check if OpenGL is supported. */ + if (!gdk_gl_query_extension()) + throw runtime_error ("*** OpenGL is not supported.\n"); + + /* Configure OpenGL-capable visual. */ + + /* Try double-buffered visual */ + glconfig = gdk_gl_config_new_by_mode (GdkGLConfigMode (GDK_GL_MODE_RGB | + GDK_GL_MODE_DEPTH | + GDK_GL_MODE_DOUBLE)); + if (glconfig == NULL) + throw runtime_error ("*** Cannot find the double-buffered visual.\n"); +#ifdef HAVE_GO_CONF_SYNC + m_ConfNode = go_conf_get_node (Application::GetConfDir (), GCU_CONF_DIR_GL); +#else + GError *error = NULL; + m_ConfClient = gconf_client_get_default (); + gconf_client_add_dir (m_ConfClient, "/apps/gchemutils/gl", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); +#endif + GCU_GCONF_GET_NO_CHECK ("off-screen-rendering", bool, OffScreenRendering, true) +#ifdef HAVE_GO_CONF_SYNC + m_NotificationId = go_conf_add_monitor (m_ConfNode, "off-screen-rendering", (GOConfMonitorFunc) on_config_changed, NULL); +#else + m_NotificationId = gconf_client_notify_add (m_ConfClient, "/apps/gchemutils/gl", (GConfClientNotifyFunc) on_config_changed, NULL, NULL, NULL); +#endif + } + /* create new OpenGL widget */ + m_pWidget = GTK_WIDGET(gtk_drawing_area_new()); + + /* Set OpenGL-capability to the widget. */ + gtk_widget_set_gl_capability(m_pWidget, + glconfig, + NULL, + TRUE, + GDK_GL_RGBA_TYPE); + + gtk_widget_set_events(GTK_WIDGET(m_pWidget), + GDK_EXPOSURE_MASK | + GDK_POINTER_MOTION_MASK | + GDK_POINTER_MOTION_HINT_MASK | + GDK_BUTTON_PRESS_MASK | + GDK_BUTTON_RELEASE_MASK); + + // Connect signal handlers + // Do initialization when widget has been realized. + g_signal_connect (G_OBJECT (m_pWidget), "realize", + G_CALLBACK (on_init), this); + // When window is resized viewport needs to be resized also. + g_signal_connect (G_OBJECT (m_pWidget), "configure_event", + G_CALLBACK (on_reshape), this); + // Redraw image when exposed. + g_signal_connect (G_OBJECT (m_pWidget), "expose_event", + G_CALLBACK (on_draw), this); + // When moving mouse + g_signal_connect (G_OBJECT (m_pWidget), "motion_notify_event", + G_CALLBACK (on_motion), this); + // When a mouse button is pressed + g_signal_connect (G_OBJECT (m_pWidget), "button_press_event", + G_CALLBACK (on_pressed), this); + + gtk_widget_show (GTK_WIDGET (m_pWidget)); +} + +GLView::~GLView () +{ + nbViews--; + if (!nbViews) { +#ifdef HAVE_GO_CONF_SYNC + go_conf_remove_monitor (m_NotificationId); + go_conf_free_node (m_ConfNode); + m_ConfNode = NULL; +#else + gconf_client_notify_remove (m_ConfClient, m_NotificationId); + gconf_client_remove_dir (m_ConfClient, "/apps/gchemutils/gl", NULL); + g_object_unref (m_ConfClient); + m_ConfClient = NULL; +#endif + m_NotificationId = 0; + } +} + +void GLView::Init () +{ + GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); + GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); + if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { + glEnable (GL_LIGHTING); + glEnable (GL_LIGHT0); + glEnable (GL_DEPTH_TEST); + glEnable (GL_CULL_FACE); + glEnable (GL_COLOR_MATERIAL); + float shiny = 25.0, spec[4] = {1.0, 1.0, 1.0, 1.0}; + glMaterialfv (GL_FRONT_AND_BACK, GL_SHININESS, &shiny); + glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, spec); + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glShadeModel (GL_SMOOTH); + glPolygonMode (GL_FRONT, GL_FILL); + glEnable(GL_BLEND); + m_bInit = true; + gdk_gl_drawable_gl_end (gldrawable); + Update (); + } +} + +void GLView::Reshape () +{ + if (!m_bInit) + return; + float fAspect; + GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); + GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); + if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { + if (m_pWidget->allocation.height) { + fAspect = (GLfloat) m_pWidget->allocation.width / (GLfloat) m_pWidget->allocation.height; + if (fAspect == 0.0) + fAspect = 1.0; + } else // don't divide by zero, not that we should ever run into that... + fAspect = 1.0f; + double x = m_Doc->GetMaxDist (); + if (x == 0) + x = 1; + glViewport (0,0, m_pWidget->allocation.width, m_pWidget->allocation.height); + if (fAspect > 1.0) { + m_Height = x * (1 - tan (m_Angle / 360 * M_PI)); + m_Width = m_Height * fAspect; + } else { + m_Width = x * (1 - tan (m_Angle / 360 * M_PI)); + m_Height = m_Width / fAspect; + } + glMatrixMode (GL_PROJECTION); + glLoadIdentity(); + if (m_Angle > 0.) { + m_Radius = (float) (x / sin (m_Angle / 360 * M_PI)) ; + m_Near = m_Radius - x; + m_Far = m_Radius + x; + glFrustum (- m_Width, m_Width, - m_Height, m_Height, m_Near, m_Far); + } else { + m_Radius = 2 * x; + m_Near = m_Radius - x; + m_Far = m_Radius + x; + glOrtho (- m_Width, m_Width, - m_Height, m_Height, m_Near, m_Far); + } + glMatrixMode (GL_MODELVIEW); + glLoadIdentity (); + glTranslatef (0, 0, -m_Radius); + gdk_gl_drawable_gl_end (gldrawable); + } +} + +void GLView::Draw () +{ + if (!m_bInit) + return; + GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); + GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); + if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { + glClearColor (m_Red, m_Green, m_Blue, m_Alpha); + glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + m_Doc->Draw (m_Euler); + gdk_gl_drawable_gl_end (gldrawable); + /* Swap backbuffer to front */ + gdk_gl_drawable_swap_buffers (gldrawable); + } +} + +void GLView::Update() +{ + if (!m_bInit) + return; + GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); + GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); + if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { + m_Doc->Draw (m_Euler); + gdk_gl_drawable_gl_end (gldrawable); + } + Reshape (); + Draw (); +} + +void GLView::SetRotation(double psi, double theta, double phi) +{ + m_Psi = psi; + m_Theta = theta; + m_Phi = phi; + Matrix m (m_Psi / 180 * M_PI, m_Theta / 180 * M_PI, m_Phi / 180 * M_PI, euler); + m_Euler = m; +} + +bool GLView::OnPressed (GdkEventButton *event) +{ + if (event->button == 1) { + // beginning of drag, reset mouse position + m_Lastx = event->x; + m_Lasty = event->y; + return true; + } + return false; +} + +bool GLView::OnMotion(GdkEventMotion *event) +{ + gint x, y; + GdkModifierType state; + + if (event->is_hint) + gdk_window_get_pointer (event->window, &x, &y, &state); + else { + x = (gint) event->x; + y = (gint) event->y; + state = (GdkModifierType) event->state; + } + if (state & GDK_BUTTON1_MASK) { + if ((x == m_Lastx) && (y == m_Lasty)) + return false; + m_Doc->SetDirty (true); + Rotate (x - m_Lastx, y - m_Lasty); + m_Lastx = x; + m_Lasty = y; + gtk_widget_queue_draw_area(m_pWidget, 0, 0, m_pWidget->allocation.width, m_pWidget->allocation.height); + } + return true; +} + +void GLView::Rotate (gdouble x, gdouble y) +{ + gdouble z = sqrt (x*x + y*y); + Matrix Mat (0, (y > 0) ? - acos (x/z) : acos (x/z), z * M_PI / 900., rotation); + m_Euler = Mat * m_Euler; + m_Euler.Euler (m_Psi, m_Theta, m_Phi); + m_Psi /= M_PI / 180.; + m_Theta /= M_PI / 180.; + m_Phi /= M_PI / 180.; +} + +static gboolean do_save_image (const gchar *buf, gsize count, GError **error, gpointer data) +{ + GOutputStream *output = (GOutputStream *) data; + while (count) { + count -= g_output_stream_write (output, buf, count, NULL, error); + if (*error) + return false; + } + return true; +} + +void GLView::SaveAsImage (string const &filename, char const *type, map& options, unsigned width, unsigned height) const +{ + if (width == 0 || height == 0) + return; + + GdkPixbuf *pixbuf = BuildPixbuf (width, height); + + if (pixbuf != NULL) { + char const **keys = g_new0 (char const*, options.size () + 1); + char const **values = g_new0 (char const*, options.size ()); + GError *error = NULL; + map::iterator i, iend = options.end (); + int j = 0; + for (i = options.begin (); i != iend; i++) { + keys[j] = (*i).first.c_str (); + values[j++] = (*i).second.c_str (); + } + GFile *file = g_vfs_get_file_for_uri (g_vfs_get_default (), filename.c_str ()); + GFileOutputStream *output = g_file_create (file, G_FILE_CREATE_NONE, NULL, &error); + if (!error) + gdk_pixbuf_save_to_callbackv (pixbuf, do_save_image, output, type, (char**) keys, (char**) values, &error); + if (error) { + fprintf (stderr, _("Unable to save image file: %s\n"), error->message); + g_error_free (error); + } + g_object_unref (file); + g_free (keys); + g_free (values); + g_object_unref (pixbuf); + } +} + +GdkPixbuf *GLView::BuildPixbuf (unsigned width, unsigned height) const +{ + GdkGLConfig *glconfig = gdk_gl_config_new_by_mode ( + GdkGLConfigMode (GDK_GL_MODE_RGBA | GDK_GL_MODE_DEPTH)); + GdkPixmap *pixmap = gdk_pixmap_new (NULL, width, height, 24); + GdkGLPixmap *gl_pixmap = gdk_pixmap_set_gl_capability (pixmap, + glconfig, + NULL ); + GdkGLDrawable *drawable = NULL; + GdkGLContext *context = NULL; + if (gl_pixmap != NULL) { + drawable = gdk_pixmap_get_gl_drawable (pixmap); + context = gdk_gl_context_new (drawable, + NULL, + TRUE, + GDK_GL_RGBA_TYPE); + } + double aspect = (GLfloat) width / height; + double x = m_Doc->GetMaxDist (), w, h; + if (x == 0) + x = 1; + if (aspect > 1.0) { + h = x * (1 - tan (m_Angle / 360 * M_PI)); + w = h * aspect; + } else { + w = x * (1 - tan (m_Angle / 360 * M_PI)); + h = w / aspect; + } + GdkPixbuf *pixbuf = NULL; + gdk_error_trap_push (); + bool result = OffScreenRendering && gl_pixmap && gdk_gl_drawable_gl_begin (drawable, context); + gdk_flush (); + if (gdk_error_trap_pop ()) + result = false; + + if (result) { + glEnable (GL_LIGHTING); + glEnable (GL_LIGHT0); + glEnable (GL_DEPTH_TEST); + glEnable (GL_CULL_FACE); + glEnable (GL_COLOR_MATERIAL); + float shiny = 25.0, spec[4] = {1.0, 1.0, 1.0, 1.0}; + glMaterialfv (GL_FRONT_AND_BACK, GL_SHININESS, &shiny); + glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, spec); + glViewport (0, 0, width, height); + glMatrixMode (GL_PROJECTION); + glLoadIdentity (); + GLfloat radius, near, far; + if (m_Angle > 0.) { + radius = (float) (x / sin (m_Angle / 360 * M_PI)) ; + near = radius - x; + far = radius + x; + glFrustum (- w, w, - h, h, near, far); + } else { + radius = 2 * x; + near = radius - x; + far = radius + x; + glOrtho (- w, w, - h, h, near, far); + } + glMatrixMode (GL_MODELVIEW); + glLoadIdentity (); + glTranslatef (0, 0, -m_Radius); + glClearColor (m_Red, m_Green, m_Blue, m_Alpha); + glClearDepth (1.0); + glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glEnable (GL_BLEND); + GetDoc ()->Draw(m_Euler); + glDisable (GL_BLEND); + glFlush (); + gdk_gl_drawable_gl_end (drawable); + pixbuf = gdk_pixbuf_get_from_drawable (NULL, + (GdkDrawable*) pixmap, NULL, 0, 0, 0, 0, -1, -1); + } else if (m_bInit) { + unsigned hstep, vstep; + double dxStep, dyStep; + unsigned char *tmp, *dest, *src, *dst; + unsigned LineWidth, s = sizeof(int); + gtk_window_present (GTK_WINDOW (gtk_widget_get_toplevel (m_pWidget))); + while (gtk_events_pending ()) + gtk_main_iteration (); + if (m_pWidget->allocation.width & (s - 1)) + LineWidth = ((~(s - 1)) & (m_pWidget->allocation.width * 3)) + s; + else + LineWidth = m_pWidget->allocation.width * 3; + unsigned size = LineWidth * m_pWidget->allocation.height; + int i, j; + hstep = m_pWidget->allocation.width; + vstep = m_pWidget->allocation.height; + tmp = new unsigned char[size]; + if (!tmp) + goto osmesa; + pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, false, 8, (int) width, (int) height); + dest = gdk_pixbuf_get_pixels (pixbuf); + int n, m, imax, jmax, rowstride = gdk_pixbuf_get_rowstride (pixbuf); + imax = width / hstep; + jmax = height / vstep; + dxStep = ((double) hstep) / width * 2; + dyStep = ((double) vstep) / height * 2; + for (j = 0; j <= jmax; j++) + { + for (i = 0; i <= imax; i++) + { + GdkGLContext *glcontext = gtk_widget_get_gl_context (m_pWidget); + GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (m_pWidget); + if (gdk_gl_drawable_gl_begin (gldrawable, glcontext)) + { + glMatrixMode (GL_PROJECTION); + glLoadIdentity (); + if (m_Angle > 0.) + glFrustum (w * ( -1 + i * dxStep), w * ( -1 + (i + 1)* dxStep), + h * ( 1 - (j + 1)* dyStep), h * ( 1 - j* dyStep), m_Near , m_Far); + else + glOrtho (w * ( -1 + i * dxStep), w * ( -1 + (i + 1)* dxStep), + h * ( 1 - (j + 1)* dyStep), h * ( 1 - j* dyStep), m_Near , m_Far); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0, 0, - m_Radius); + glClearColor (m_Red, m_Green, m_Blue, m_Alpha); + glClearDepth (1.0); + glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + m_Doc->Draw (m_Euler); + glFlush (); + gdk_gl_drawable_gl_end (gldrawable); + glPixelStorei (GL_PACK_ALIGNMENT, s); + glReadBuffer (GL_BACK_LEFT); + glReadPixels (0, 0, m_pWidget->allocation.width, m_pWidget->allocation.height, GL_RGB, + GL_UNSIGNED_BYTE, tmp); + // copy the data to the pixbuf. + // linesize + m = (i < imax)? hstep * 3: (width - imax * hstep) * 3; + src = tmp + (vstep - 1) * LineWidth; + dst = dest + j * vstep * rowstride + i * hstep * 3; + for (n = 0; n < (int) ((j < jmax)? vstep: height - jmax * vstep); n++) { + memcpy (dst, src, m); + src -= LineWidth; + dst += rowstride; + } + } else { + g_object_unref (pixbuf); + pixbuf = NULL; + goto osmesa; + } + } + } + delete [] tmp; + } else { +osmesa: + g_warning ("Off-screen rendering not supported in this context"); + // TODO: implement rendering using an external program and osmesa + } + if (context) + gdk_gl_context_destroy (context); + if (gl_pixmap) + gdk_gl_pixmap_destroy (gl_pixmap); + // destroying pixmap gives a CRITICAL and destroying glconfig leeds to a crash. + const_cast (this)->Update (); + return pixbuf; +} + +void GLView::DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const +{ + cairo_t *cr; + gdouble width, height; + + cr = gtk_print_context_get_cairo_context (context); + width = gtk_print_context_get_width (context); + height = gtk_print_context_get_height (context); + int w, h; // size in points + w = m_pWidget->allocation.width; + h = m_pWidget->allocation.height; + switch (GetScaleType ()) { + case GCU_PRINT_SCALE_NONE: + break; + case GCU_PRINT_SCALE_FIXED: + w *= GetScale (); + h *= GetScale (); + break; + case GCU_PRINT_SCALE_AUTO: + if (GetHorizFit ()) + w = width; + if (GetVertFit ()) + h = height; + break; + } + double scale = 300. / 72.; + GdkPixbuf *pixbuf = BuildPixbuf (w * scale, h * scale); + GOImage *img = go_image_new_from_pixbuf (pixbuf); + cairo_pattern_t *cr_pattern = go_image_create_cairo_pattern (img); + cairo_matrix_t cr_matrix; + double x = 0., y = 0.; + if (GetHorizCentered ()) + x = (width - w) / 2.; + if (GetVertCentered ()) + y = (height - h) / 2.; + cairo_matrix_init_scale (&cr_matrix, scale, scale); + cairo_matrix_translate (&cr_matrix, -x, -y); + cairo_pattern_set_matrix (cr_pattern, &cr_matrix); + cairo_rectangle (cr, x, y, w, h); + cairo_set_source (cr, cr_pattern); + cairo_fill (cr); + cairo_pattern_destroy (cr_pattern); + g_object_unref (img); + g_object_unref (pixbuf); +} + +void GLView::RenderToCairo (cairo_t *cr, unsigned width, unsigned height) const +{ + double scale = 300. / 72.; + GdkPixbuf *pixbuf = BuildPixbuf (width * scale, height * scale); + GOImage *img = go_image_new_from_pixbuf (pixbuf); + cairo_pattern_t *cr_pattern = go_image_create_cairo_pattern (img); + cairo_matrix_t cr_matrix; + cairo_matrix_init_scale (&cr_matrix, scale, scale); + cairo_pattern_set_matrix (cr_pattern, &cr_matrix); + cairo_rectangle (cr, 0., 0., width, height); + cairo_set_source (cr, cr_pattern); + cairo_fill (cr); + cairo_pattern_destroy (cr_pattern); + g_object_unref (img); + g_object_unref (pixbuf); +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/glview.h gnome-chemistry-utils-0.10.9/libs/gcu/glview.h --- gnome-chemistry-utils-0.8.6/libs/gcu/glview.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/glview.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,289 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/glview.h + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_GL_VIEW_H +#define GCU_GL_VIEW_H + +#include "macros.h" +#include "matrix.h" +#include "printable.h" +#ifdef HAVE_GO_CONF_SYNC +# ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +# else +# include +# endif +#else +# include +#endif +#include +#include +#include +#include + +extern double DefaultPsi, DefaultTheta, DefaultPhi; + +/*!\file*/ +namespace gcu { + +class GLDocument; + +/*! +\class GLView gcu/glview.h +View class based on OpenGL for rendering. Used to display 3d chemical structures +such as molecules or crystals cells. +*/ +class GLView: public Printable +{ +public: +//!Constructor. +/*! +@param pDoc: a pointer to the GLDocument instance. + +Creates a view for the document. +*/ + GLView (GLDocument* pDoc) throw (std::runtime_error); +//!Destructor. +/*! +The destructor of GLView. +*/ + virtual ~GLView (); + +/*! +@return the associated GtkWidget. +*/ + GtkWidget *GetWidget () {return m_pWidget;} +/*! +Initialize the associated widget. Automatically called by the framework. +*/ + void Init (); +/*! +Automatically called by the framework when the associated widget size changes. +*/ + void Reshape (); +/*! +Draws the contents of the associated widget. Automatically called by the framework. +*/ + void Draw (); +/*! +@param event: a pointer to a GdkEvent. + +Automatically called by the framework when a left button click occurs in the +associated widget drawing area. +*/ + bool OnPressed (GdkEventButton *event); +/*! +@param event: a pointer to a GdkEvent. + +Automatically called by the framework when the mouse cursor moves over the +associated widget drawing area. + +@return true if a motion really occured, false otherwise. +*/ + bool OnMotion (GdkEventMotion *event); +/*! +Update the contents of the associated widget. This method must be called +each time the document or the view are modified. +*/ + void Update (); +/*! +@param psi the first Euler's angle. +@param theta the second Euler's angle. +@param phi the third Euler's angle. + +Sets the orientation of the model, using the Euler's angles. +*/ + void SetRotation (double psi, double theta, double phi); +/*! +@param filename the name of the file. +@param type the type as supported by GdkPixbuf (e.g. "png" or "jpeg"). +@param options the pairs of keys/values to pass GdkPixbuf. +@param width the width of the generated image. +@param height the height of the generated image. + +Export the view contents as an image. The size of the new image is defined by the width +and height parameters. +*/ + void SaveAsImage (std::string const &filename, char const *type, std::map& options, unsigned width, unsigned height) const; +/*! +@param width the width of the generated image. +@param height the height of the generated image. + +Generates a pixbuf from the current view. + +@return the pixbuf containing the generated image +*/ + GdkPixbuf *BuildPixbuf (unsigned width, unsigned height) const; +/*! +@param print a GtkPrintOperation. +@param context a GtkPrintContext. + +Prints the current view at 300 dpi. +*/ + void DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const; +/*! +@return the top level GtkWindow containing the view. +*/ + GtkWindow *GetGtkWindow () {return GTK_WINDOW (gtk_widget_get_toplevel (m_pWidget));} +/*! +@param cr a cairo_t. +@param width the width used for rendering. +@param height the height used for rendering. + +Outputs a bitmap to cairo. Used internally for printing and various image formats exports. +*/ + void RenderToCairo (cairo_t *cr, unsigned width, unsigned height) const; + +private: +/*! +@param x the x component of the rotation. +@param y the y component of the rotation. +std:: +Called by OnMotion(). x and y are the displacement coordinates of the mouse. +*/ + void Rotate (gdouble x, gdouble y); + +protected: +/*! +The associated widget. +*/ + GtkWidget *m_pWidget; + +private: + bool m_bInit; + Matrix m_Euler; + double m_Height, m_Width, m_Near, m_Far; + double m_Lastx, m_Lasty; +#ifdef HAVE_GO_CONF_SYNC + static GOConfNode *m_ConfNode; +#else + static GConfClient *m_ConfClient; +#endif + static guint m_NotificationId; + static int nbViews; + +// Properties +/*!\fn SetAngle(double angle) +@param angle the new half field of view. +*/ +/*!\fn GetAngle() +@return the current half field of view. +*/ +/*!\fn GetRefAngle() +@return the current half field of view as a reference. +*/ +GCU_PROP (double, Angle) +/*!\fn SetPsi(double psi) +@param psi the new psi Euler's angle. +*/ +/*!\fn GetPsi() +@return the current psi Euler's angle. +*/ +/*!\fn GetRefPsi() +@return the current psi Euler's angle as a reference. +*/ +GCU_PROP (double, Psi) +/*!\fn SetPhi(double phi) +@param phi the new phi Euler's angle. +*/ +/*!\fn GetPhi() +@return the current phi Euler's angle. +*/ +/*!\fn GetRefPhi() +@return the current psh Euler's angle as a reference. +*/ +GCU_PROP (double, Phi) +/*!\fn SetTheta(double theta) +@param theta the new theta Euler's angle. +*/ +/*!\fn GetTheta() +@return the current theta Euler's angle. +*/ +/*!\fn GetRefTheta() +@return the current theta Euler's angle as a reference. +*/ +GCU_PROP (double, Theta) +/*!\fn SetRed(float red) +@param red the new red component for the background color. +*/ +/*!\fn GetRed() +@return the current red component of the background color. +*/ +/*!\fn GetRefRed() +@return the current red component of the background color as a reference. +*/ +GCU_PROP (float, Red) +/*!\fn SetGreen(float green) +@param green the new green component for the background color. +*/ +/*!\fn GetGreen() +@return the current green component of the background color. +*/ +/*!\fn GetRefGreen() +@return the current green component of the background color as a reference. +*/ +GCU_PROP (float, Green) +/*!\fn SetBlue(float blue) +@param blue the new blue component for the background color. +*/ +/*!\fn GetBlue() +@return the current blue component of the background color. +*/ +/*!\fn GetRefBlue() +@return the current blue component of the background color as a reference. +*/ +GCU_PROP (float, Blue) +/*!\fn SetAlpha(float alpha) +@param alpha the new alpha value for the background. + +The alpha value for the background is not supported in this version and this is only +a place holder. +*/ +/*!\fn GetAlpha() +The alpha value for the background is not supported in this version and this is only +a place holder. +@return the current alpha value of the background color. +*/ +/*!\fn GetRefAlpha() +The alpha value for the background is not supported in this version and this is only +a place holder. +@return the current alpha value of the background color as a reference. +*/ +GCU_PROP (float, Alpha) +/*!\fn GetDoc() +@return the associated document. +*/ +GCU_PROT_POINTER_PROP (GLDocument, Doc) +/*!\var m_Radius +The distance between the center of the model and the point of view. +*/ +/*!\fn GetRadius() +@return the distance between the center of the model and the point of view. +*/ +GCU_PROT_PROP (double, Radius); +}; + +} // namespace gcu + +#endif // GCU_GL_VIEW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/goffice-compat.h gnome-chemistry-utils-0.10.9/libs/gcu/goffice-compat.h --- gnome-chemistry-utils-0.8.6/libs/gcu/goffice-compat.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/goffice-compat.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,67 @@ +/* + * Gnome Chemistry Utils + * gcu/goffice-compat.h + * definitions helping with goffice API changes + * + * Copyright (C) 2009 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifdef HAVE_GO_ERROR_INFO_FREE +# define IOContext GOIOContext +# define gnumeric_io_context_new go_io_context_new +# define ErrorInfo GOErrorInfo +# define error_info_new_printf go_error_info_new_printf +# define error_info_peek_message go_error_info_peek_message +# define error_info_print go_error_info_print +# define gnm_io_warning go_io_warning +# define PluginServiceSimple GOPluginServiceSimple +# define PluginServiceSimpleClass GOPluginServiceSimpleClass +# define plugin_service_define go_plugin_service_define +# define plugin_service_load go_plugin_service_load +#endif + +#ifdef GO_RGBA_TO_UINT +# define RGBA_TO_UINT GO_RGBA_TO_UINT +# define RGBA_BLACK GO_RGBA_BLACK +# define RGBA_RED GO_RGBA_RED +# define UINT_RGBA_R GO_UINT_RGBA_R +# define UINT_RGBA_G GO_UINT_RGBA_G +# define UINT_RGBA_B GO_UINT_RGBA_B +# define UINT_RGBA_A GO_UINT_RGBA_A +# define DOUBLE_RGBA_R GO_DOUBLE_RGBA_R +# define DOUBLE_RGBA_G GO_DOUBLE_RGBA_G +# define DOUBLE_RGBA_B GO_DOUBLE_RGBA_B +# define DOUBLE_RGBA_A GO_DOUBLE_RGBA_A +#endif +#ifdef GO_COLOR_FROM_RGBA +# define RGBA_TO_UINT GO_COLOR_FROM_RGBA +# define RGBA_BLACK GO_COLOR_BLACK +# define RGBA_RED GO_COLOR_RED +# define UINT_RGBA_R GO_COLOR_UINT_R +# define UINT_RGBA_G GO_COLOR_UINT_G +# define UINT_RGBA_B GO_COLOR_UINT_B +# define UINT_RGBA_A GO_COLOR_UINT_A +# define DOUBLE_RGBA_R GO_COLOR_DOUBLE_R +# define DOUBLE_RGBA_G GO_COLOR_DOUBLE_G +# define DOUBLE_RGBA_B GO_COLOR_DOUBLE_B +# define DOUBLE_RGBA_A GO_COLOR_DOUBLE_A +#endif + +#ifdef GO_PLUGIN_SERVICE_CLASS +# define GPS_CLASS GO_PLUGIN_SERVICE_CLASS +#endif diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkchem3dviewer.cc gnome-chemistry-utils-0.10.9/libs/gcu/gtkchem3dviewer.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkchem3dviewer.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkchem3dviewer.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,275 @@ +/* + * Gnome Chemisty Utils + * gtkchem3dviewer.c + * + * Copyright (C) 2003-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gtkchem3dviewer.h" +#include "chem3ddoc.h" +#include "glview.h" +#include +#include +#include + +using namespace std; +using namespace OpenBabel; +using namespace gcu; + +struct _GtkChem3DViewer +{ + GtkBin bin; + + Chem3dDoc *Doc; + GtkWidget *widget; +}; + +struct _GtkChem3DViewerClass +{ + GtkBinClass parent_class; +}; + +enum { + PROP_0, + PROP_DISPLAY3D, + PROP_BGCOLOR +}; +GType +gtk_display3d_get_type (void) +{ + static GType etype = 0; + if (etype == 0) { + static const GEnumValue values[] = { + { BALL_AND_STICK, "BALL_AND_STICK", "ball&stick" }, + { SPACEFILL, "SPACEFILL", "spacefill" }, + { CYLINDERS, "CYLINDERS", "cylinders" }, + { WIREFRAME, "WIREFRAME", "wireframe" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("Dispay3D", values); + } + return etype; +} + +static GtkBinClass *parent_class = NULL; + +static void gtk_chem3d_viewer_class_init (GtkChem3DViewerClass *klass); +static void gtk_chem3d_viewer_init(GtkChem3DViewer *viewer); +static void gtk_chem3d_viewer_update(GtkChem3DViewer *viewer); +static void gtk_chem3d_viewer_set_property(GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec); +static void gtk_chem3d_viewer_get_property(GObject *object, guint property_id, + GValue *value, GParamSpec *pspec); + +extern "C" +{ + +GType +gtk_chem3d_viewer_get_type (void) +{ + static GType chem3d_viewer_type = 0; + + if (!chem3d_viewer_type) + { + static const GTypeInfo chem3d_viewer_info = + { + sizeof (GtkChem3DViewerClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_chem3d_viewer_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkChem3DViewer), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_chem3d_viewer_init, + }; + + chem3d_viewer_type = g_type_register_static (GTK_TYPE_BIN, "GtkChem3DViewer", &chem3d_viewer_info, (GTypeFlags)0); + } + + return chem3d_viewer_type; +} + +GtkWidget* gtk_chem3d_viewer_new (const gchar *uri) +{ + GtkChem3DViewer* viewer = (GtkChem3DViewer*) g_object_new (GTK_TYPE_CHEM3D_VIEWER, NULL); + if (uri) + gtk_chem3d_viewer_set_uri (viewer, uri); + return GTK_WIDGET (viewer); +} + +} //extern "C" + +static void on_size(GtkWidget *w, GtkAllocation *allocation, gpointer data) +{ + if (GTK_BIN (w)->child && GTK_WIDGET_VISIBLE (GTK_BIN (w)->child)) + gtk_widget_size_allocate (GTK_BIN (w)->child, allocation); +} + +static void gtk_chem3d_viewer_finalize (GObject *obj) +{ + GtkChem3DViewer *viewer = GTK_CHEM3D_VIEWER (obj); + if (viewer->Doc) { + delete viewer->Doc->GetView (); + delete viewer->Doc; + } + G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +void gtk_chem3d_viewer_class_init (GtkChem3DViewerClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + parent_class = (GtkBinClass*) g_type_class_peek_parent (klass); + + gobject_class->set_property = gtk_chem3d_viewer_set_property; + gobject_class->get_property = gtk_chem3d_viewer_get_property; + gobject_class->finalize = gtk_chem3d_viewer_finalize; + + g_object_class_install_property ( + gobject_class, + PROP_DISPLAY3D, + g_param_spec_enum("display3d", + "3D display mode", + "Mode used to display the model", + GTK_DISPLAY_3D, + BALL_AND_STICK, + (GParamFlags)G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, + PROP_BGCOLOR, + g_param_spec_string ("bgcolor", + _("Background Color"), + _("Color used to paint the background"), + "black", + (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE))); +} + +void gtk_chem3d_viewer_init (GtkChem3DViewer *viewer) +{ + g_return_if_fail (GTK_IS_CHEM3D_VIEWER (viewer)); + viewer->Doc = new Chem3dDoc (); + viewer->widget = viewer->Doc->GetView ()->GetWidget (); + gtk_widget_show (GTK_WIDGET (viewer->widget)); + gtk_container_add (GTK_CONTAINER (viewer), viewer->widget); + gtk_widget_show_all (GTK_WIDGET (viewer)); + g_signal_connect (G_OBJECT (viewer), "size_allocate", G_CALLBACK (on_size), NULL); +} + +void gtk_chem3d_viewer_set_uri (GtkChem3DViewer * viewer, const gchar *uri) +{ + gtk_chem3d_viewer_set_uri_with_mime_type (viewer, uri, NULL); +} + +void gtk_chem3d_viewer_set_uri_with_mime_type (GtkChem3DViewer * viewer, const gchar * uri, const gchar* mime_type) +{ + g_return_if_fail (GTK_IS_CHEM3D_VIEWER (viewer)); + g_return_if_fail (uri); + viewer->Doc->Load (uri, mime_type); +} + +void gtk_chem3d_viewer_set_data (GtkChem3DViewer * viewer, const gchar *data, const gchar* mime_type) +{ + viewer->Doc->LoadData (data, mime_type); +} + +void gtk_chem3d_viewer_update (GtkChem3DViewer *viewer) +{ + viewer->Doc->GetView ()->Update (); +} + +static void gtk_chem3d_viewer_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + GtkChem3DViewer *viewer = GTK_CHEM3D_VIEWER(object); + + switch (property_id) { + case PROP_DISPLAY3D: + g_value_set_enum (value, viewer->Doc->GetDisplay3D ()); + break; + case PROP_BGCOLOR: + { + int r = (int) (viewer->Doc->GetView ()->GetRed () * 255.), + g = (int) (viewer->Doc->GetView ()->GetGreen () * 255.), + b = (int) (viewer->Doc->GetView ()->GetBlue () * 255.); + if ((r ==0) && (g == 0) && (b == 0)) + g_value_set_string (value, "black"); + else if ((r ==255) && (g == 255) && (b == 255)) + g_value_set_string (value, "white"); + else + { + char buf[10]; + g_snprintf(buf, sizeof(buf), "#%2x%2x%2x", r, g, b); + g_value_set_string(value, buf); + } + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void gtk_chem3d_viewer_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + GtkChem3DViewer *viewer = GTK_CHEM3D_VIEWER(object); + + switch (property_id) { + case PROP_DISPLAY3D: + viewer->Doc->SetDisplay3D ((Display3DMode) g_value_get_enum (value)); + break; + case PROP_BGCOLOR: + { + const gchar* str = g_value_get_string (value); + if (!strcmp (str, "black")) { + viewer->Doc->GetView ()->SetRed (0.); + viewer->Doc->GetView ()->SetGreen (0.); + viewer->Doc->GetView ()->SetBlue (0.); + } else if (!strcmp (str, "white")) { + viewer->Doc->GetView ()->SetRed (1.); + viewer->Doc->GetView ()->SetGreen (1.); + viewer->Doc->GetView ()->SetBlue (1.); + } else { + if ((strlen (str) != 7) || (*str != '#')) { + g_warning ("Unrecognized color: %s\n", str); + break; + } + int r, g, b; + r = strtoul (str + 1, NULL, 16); + b = r & 0xff; + viewer->Doc->GetView ()->SetBlue ((float) b / 255.); + r >>= 8; + g = r & 0xff; + viewer->Doc->GetView ()->SetGreen ((float) g / 255.); + r >>=8; + viewer->Doc->GetView ()->SetRed ((float) r / 255.); + } + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } + gtk_chem3d_viewer_update(viewer); +} + +GdkPixbuf *gtk_chem3d_viewer_new_pixbuf (GtkChem3DViewer * viewer, guint width, guint height) +{ + return viewer->Doc->GetView ()->BuildPixbuf (width, height); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkchem3dviewer.h gnome-chemistry-utils-0.10.9/libs/gcu/gtkchem3dviewer.h --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkchem3dviewer.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkchem3dviewer.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,142 @@ +/* + * Gnome Chemisty Utils + * gtkchem3dviewer.h + * + * Copyright (C) 2003-2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + + +#ifndef GTK_CHEM3D_VIEWER_H +#define GTK_CHEM3D_VIEWER_H + +#include + +G_BEGIN_DECLS + +/*!\file +Declaration of the GtkChem3DViewer widget. +*/ + +GType gtk_display3d_get_type (void); +/*! +\return the GType associated to the Display3D enum. +*/ +#define GTK_DISPLAY_3D (gtk_display3d_get_type ()) + +/*!\return the GType associated to GtkChem3DViewer */ +#define GTK_TYPE_CHEM3D_VIEWER (gtk_chem3d_viewer_get_type ()) +/*! +Casts \a obj to a GtkChem3DViewer * pointer. +\return a pointer to the GtkChem3DViewer * or NULL if \a obj does not point to +a GtkChem3DViewer widget. +*/ +#define GTK_CHEM3D_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CHEM3D_VIEWER, GtkChem3DViewer)) +/*! +Casts \a klass to a GtkChem3DViewerClass * pointer. +\return a pointer to the GtkChem3DViewerClass * or NULL if \a obj not point to a GtkChem3DViewerClass. +*/ +#define GTK_CHEM3D_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHEM3D_VIEWER, GtkChem3DViewerClass)) +/*! +\return TRUE if \a obj points to a GtkChem3DViewer widget, FALSE otherwise. +*/ +#define GTK_IS_CHEM3D_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CHEM3D_VIEWER)) +/*! +\return TRUE if \a klass points to a GtkChem3DViewerClass, FALSE otherwise. +*/ +#define GTK_IS_CHEM3D_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHEM3D_VIEWER)) +/*! +\return the GtkChem3DViewerClass * associated to \a obj if obj points to a GtkChem3DViewer widget, +NULL otherwise. +*/ +#define GTK_CHEM3D_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CHEM3D_VIEWER, GtkChem3DViewerClass)) + +/*! \struct GtkChem3DViewer gcu/gtkchem3dviewer.h + The GtkChem3DViewer displays 3D models of molecules using an OpenGL window. + A test program is available in the tests directory of the Gnome Chemistry Utils source archive (sources in testgtkchem3dviewer.c). +
+

Properties

+There are two properties: +- "display3d": Display3DMode (Read / Write). +
This property is used to set the display mode. When using the Bonobo control, a string is used instead the enumeration. + Possible values are: + - BALL_AND_STICK: use ball and stick representation; atoms are represented by spheres with a radius equal to 20% of + their van der Waals radius and bonds are displayed as cylinders. String version is "ball&stick". + - SPACEFILL: use space filling representation; atoms are represented by spheres with a radius equal + their van der Waals radius; bonds are not displayed. String version is "spacefill". + . + +- "bgcolor": gchar* (Read / Write). +
The background color for the display, for example "black" or "#ffffe6". Only "black", + "white" and "#rrggbb" are accepted in this version of the Gnome Chemistry Utils. +

Functions

+ +Functions related to the GtkChem3DViewer Widget are described in the gtkchem3dviewer.h page. +*/ +/*! The GtkChem3DViewer widget.*/ +typedef struct _GtkChem3DViewer GtkChem3DViewer; +/*! The GtkChem3DViewer widget object class.*/ +typedef struct _GtkChem3DViewerClass GtkChem3DViewerClass; + +GType gtk_chem3d_viewer_get_type (void) G_GNUC_CONST; +/*! +@param uri: the URI of the file containing the molecular structure to display. Any file supported by +OpenBabel may be used. + +Creates a GtkChem3DViewer widget and fills it with the data from uri. If uri is NULL, the widget will be empty. +*/ +GtkWidget* gtk_chem3d_viewer_new (const gchar* uri); +/*! +@param viewer a pointer to GtkChem3DViewer widget. +@param uri the URI of the file containing the molecular structure to display. Any file supported by +@param mime_type: the mime_type of the data. Any type supported by +OpenBabel may be used. + +Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL. +*/ +void gtk_chem3d_viewer_set_uri_with_mime_type (GtkChem3DViewer * viewer, const gchar * uri, const gchar* mime_type); +/*! +@param viewer a pointer to GtkChem3DViewer widget. +@param uri the URI of the file containing the molecular structure to display. +OpenBabel may be used. + +Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL. +*/ +void gtk_chem3d_viewer_set_uri (GtkChem3DViewer * viewer, const gchar * uri); +/*! +@param viewer a pointer to GtkChem3DViewer widget. +@param data a pointer to the raw data representing a serialized version of molecule to display +@param mime_type the mime_type of the data. Any type supported by +OpenBabel may be used. + +Changes the molecule displayed by the one described in the data. Nothing happens if data or mime-type is NULL. +*/ +void gtk_chem3d_viewer_set_data (GtkChem3DViewer * viewer, const gchar * data, const gchar* mime_type); + +/*! +@param viewer a pointer to a GtkChem3DViewer widget. +@param width the width of the new pixbuf. +@param height the height of the new pixbuf. + +Renders the scene to a newly allocated pixbuf. +\return the new GdkPixbuf*. +*/ +GdkPixbuf *gtk_chem3d_viewer_new_pixbuf (GtkChem3DViewer * viewer, guint width, guint height); + +G_END_DECLS + +#endif //GTK_CHEM3D_VIEWER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkcomboperiodic.c gnome-chemistry-utils-0.10.9/libs/gcu/gtkcomboperiodic.c --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkcomboperiodic.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkcomboperiodic.c 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,141 @@ +/* + * Gnome Chemisty Utils + * gtkcomboperiodic.c + * + * Copyright (C) 2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gtkperiodic.h" +#include "gtkcomboperiodic.h" +#include "chemistry.h" +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include +#include +#include + +#ifndef GO_TYPE_COMBO_BOX +# define GO_TYPE_COMBO_BOX GO_COMBO_BOX_TYPE +#endif + +struct _GtkComboPeriodic { + GOComboBox base; + + GtkWidget *periodic, *preview_button, *label; + gulong handler_id; +}; + +typedef struct { + GOComboBoxClass base; + void (* changed) (GtkComboPeriodic *combo, int id); +} GtkComboPeriodicClass; + +enum { + CHANGED, + LAST_SIGNAL +}; + +static guint go_combo_pixmaps_signals [LAST_SIGNAL] = { 0, }; + +static void +cb_screen_changed (GtkComboPeriodic *combo, GdkScreen *previous_screen) +{ + GtkWidget *w = GTK_WIDGET (combo); + GdkScreen *screen = gtk_widget_has_screen (w) + ? gtk_widget_get_screen (w) + : NULL; + + if (screen) { + GtkWidget *toplevel = gtk_widget_get_toplevel (combo->periodic); + gtk_window_set_screen (GTK_WINDOW (toplevel), screen); + } +} + +static void +element_changed_cb (GtkComboPeriodic *combo) +{ + int newZ = gtk_periodic_get_element (GTK_PERIODIC (combo->periodic)); + gtk_label_set_text (GTK_LABEL (combo->label), gcu_element_get_symbol (newZ)); + if (_go_combo_is_updating (GO_COMBO_BOX (combo))) + return; + g_signal_emit (combo, go_combo_pixmaps_signals [CHANGED], 0, newZ); + go_combo_box_popup_hide (GO_COMBO_BOX (combo)); +} + +static void +gtk_combo_periodic_init (GtkComboPeriodic *combo) +{ + combo->preview_button = gtk_toggle_button_new (); + combo->label = gtk_label_new (""); + gtk_widget_show (combo->label); + gtk_container_add (GTK_CONTAINER (combo->preview_button), + GTK_WIDGET (combo->label)); + + g_signal_connect (G_OBJECT (combo), + "screen-changed", + G_CALLBACK (cb_screen_changed), NULL); + + gtk_widget_show_all (combo->preview_button); + combo->periodic = gtk_periodic_new (); + combo->handler_id = g_signal_connect_swapped (combo->periodic, + "element_changed", G_CALLBACK (element_changed_cb), combo); + gtk_widget_show_all (combo->periodic); + go_combo_box_construct (GO_COMBO_BOX (combo), + combo->preview_button, combo->periodic, combo->periodic); + go_combo_box_set_title(GO_COMBO_BOX (combo), _("Periodic table of the elements")); + gtk_widget_show_all (GTK_WIDGET (combo)); +} + +static void +gtk_combo_periodic_class_init (GObjectClass *gobject_class) +{ + go_combo_pixmaps_signals [CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GtkComboPeriodicClass, changed), + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); +} + +GSF_CLASS (GtkComboPeriodic, gtk_combo_periodic, + gtk_combo_periodic_class_init, gtk_combo_periodic_init, + GO_TYPE_COMBO_BOX) + +GtkWidget *gtk_combo_periodic_new (void) +{ + return GTK_WIDGET (g_object_new (GTK_COMBO_PERIODIC_TYPE, NULL)); +} + +guint gtk_combo_periodic_get_element (GtkComboPeriodic* combo) +{ + return gtk_periodic_get_element (GTK_PERIODIC (combo->periodic)); +} + +void gtk_combo_periodic_set_element (GtkComboPeriodic* combo, guint element) +{ + g_signal_handler_block (combo->periodic, combo->handler_id); + gtk_periodic_set_element (GTK_PERIODIC (combo->periodic), element); + g_signal_handler_unblock (combo->periodic, combo->handler_id); + gtk_label_set_text (GTK_LABEL (combo->label), gcu_element_get_symbol (element)); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkcomboperiodic.h gnome-chemistry-utils-0.10.9/libs/gcu/gtkcomboperiodic.h --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkcomboperiodic.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkcomboperiodic.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,90 @@ +/* + * Gnome Chemisty Utils + * gtkcomboperiodic.h + * + * Copyright (C) 2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GTK_COMBO_PERIODIC_H +#define GTK_COMBO_PERIODIC_H + +#include + +G_BEGIN_DECLS + +/*!\return the GType associated to GtkComboPeriodic */ +#define GTK_COMBO_PERIODIC_TYPE (gtk_combo_periodic_get_type ()) +/*! +Casts \a obj to a GtkComboPeriodic * pointer. +\return a pointer to the GtkComboPeriodic * or NULL if \a obj does not point to +a GtkComboPeriodic widget. +*/ +#define GTK_COMBO_PERIODIC(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GTK_COMBO_PERIODIC_TYPE, GtkComboPeriodic)) +/*! +\return TRUE if \a obj points to a GtkComboPeriodic widget, FALSE otherwise. +*/ +#define GTK_IS_COMBO_PERIODIC(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GTK_COMBO_PERIODIC_TYPE)) + +/*!\file +Declaration of the GtkComboPeriodic widget. +*/ + +/*! \struct GtkComboPeriodic gcu/gtkcomboperiodic.h + The GtkComboPeriodic is a combo box with a dropdown periodic table widget. +
+

Signals

+ + This widget has one signal: +- "changed": void user_function (GtkWidget* periodic, guint Z, gpointer data). +\param periodic: the object which received the signal. +\param Z: the atomic number of the newly selected element or %0 if none is selected. +\param data: user data set when the signal handler was connected. + + This signal is raised when the selected element changes in the widget. + +
+

Functions

+ +Functions related to the GtkComboPeriodic Widget are described in the gtkcomboperiodic.h page. +*/ +/*! The GtkComboPeriodic widget.*/ +typedef struct _GtkComboPeriodic GtkComboPeriodic; + +GType gtk_combo_periodic_get_type (void); +/*! +@return a pointer to a newly created GtkComboPeriodic widget. +*/ +GtkWidget *gtk_combo_periodic_new (void); + +/*! +@param combo a GtkComboPeriodic widget +Used to get the currently selected element in the periodic table. +@return the atomic number of the currently selected element or %0 if none is selected. + */ +guint gtk_combo_periodic_get_element (GtkComboPeriodic *combo); + +/*! +@param combo a GtkComboPeriodic widget +@param element the atomic number of the element to select or 0 +Sets the selected element in the periodic table. +*/ +void gtk_combo_periodic_set_element (GtkComboPeriodic *combo, guint element); + +G_END_DECLS + +#endif /* GTK_COMBO_PERIODIC_H */ diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkcrystalviewer.cc gnome-chemistry-utils-0.10.9/libs/gcu/gtkcrystalviewer.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkcrystalviewer.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkcrystalviewer.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,131 @@ +/* + * Gnome Chemisty Utils + * gtkcrystalviewer.cc + * + * Copyright (C) 2002-2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gtkcrystalviewer.h" +#include "crystalview.h" +#include "crystaldoc.h" + +extern "C" +{ + +struct _GtkCrystalViewer +{ + GtkBin bin; + + gcu::CrystalView *pView; + gcu::CrystalDoc *pDoc; + guint glList; +}; + +struct _GtkCrystalViewerClass +{ + GtkBinClass parent_class; +}; + + +static void on_size (GtkCrystalViewer* w, GtkAllocation *allocation, gpointer user_data) +{ + if (GTK_BIN (w)->child && GTK_WIDGET_VISIBLE (GTK_BIN (w)->child)) + gtk_widget_size_allocate (GTK_BIN (w)->child, allocation); +} + +static GtkBinClass *parent_class = NULL; + +static void gtk_crystal_viewer_class_init (GtkCrystalViewerClass *klass); +static void gtk_crystal_viewer_init (GtkCrystalViewer *viewer); +static void gtk_crystal_viewer_finalize (GObject* object); + +GType +gtk_crystal_viewer_get_type (void) +{ + static GType crystal_viewer_type = 0; + + if (!crystal_viewer_type) + { + static const GTypeInfo crystal_viewer_info = + { + sizeof (GtkCrystalViewerClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_crystal_viewer_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkCrystalViewer), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_crystal_viewer_init, + }; + + crystal_viewer_type = g_type_register_static (GTK_TYPE_BIN, "GtkCrystalViewer", &crystal_viewer_info, (GTypeFlags)0); + } + + return crystal_viewer_type; +} + +void gtk_crystal_viewer_class_init (GtkCrystalViewerClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + parent_class = (GtkBinClass*) g_type_class_peek_parent (klass); + + gobject_class->finalize = gtk_crystal_viewer_finalize; +} + +void gtk_crystal_viewer_init (GtkCrystalViewer *viewer) +{ +} + +GtkWidget* gtk_crystal_viewer_new (xmlNodePtr node) +{ + GtkCrystalViewer* viewer = (GtkCrystalViewer*) g_object_new (GTK_TYPE_CRYSTAL_VIEWER, NULL); + viewer->pDoc = new gcu::CrystalDoc (NULL); + viewer->pView = viewer->pDoc->GetView(); + GtkWidget* w = viewer->pView->GetWidget (); + gtk_container_add (GTK_CONTAINER (viewer), w); + if (node) + viewer->pDoc->ParseXMLTree (node); + g_signal_connect (G_OBJECT (viewer), "size_allocate", G_CALLBACK (on_size), NULL); + gtk_widget_show (w); + return GTK_WIDGET (viewer); +} + +void gtk_crystal_viewer_finalize (GObject* object) +{ + ((GObjectClass*) parent_class)->finalize (object); + GtkCrystalViewer* viewer = GTK_CRYSTAL_VIEWER (object); + delete viewer->pView; + delete viewer->pDoc; +} + +void gtk_crystal_viewer_set_data (GtkCrystalViewer * viewer, xmlNodePtr node) +{ + g_return_if_fail (GTK_IS_CRYSTAL_VIEWER (viewer)); + g_return_if_fail (node); + viewer->pDoc->ParseXMLTree (node); + viewer->pView->Update (); +} + +GdkPixbuf *gtk_crystal_viewer_new_pixbuf (GtkCrystalViewer * viewer, guint width, guint height) +{ + return viewer->pDoc->GetView ()->BuildPixbuf (width, height); +} + +} //extern "C" diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkcrystalviewer.h gnome-chemistry-utils-0.10.9/libs/gcu/gtkcrystalviewer.h --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkcrystalviewer.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkcrystalviewer.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,106 @@ +/* + * Gnome Chemisty Utils + * gtkcrystalviewer.h + * + * Copyright (C) 2002-2004 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +/*!\file +Declaration of the GtkCrystalViewer widget. +*/ + +#ifndef GTK_CRYSTAL_VIEWER_H +#define GTK_CRYSTAL_VIEWER_H + +#include +#include + +G_BEGIN_DECLS + +/*!\return the GType associated to GtkCrystalViewer */ +#define GTK_TYPE_CRYSTAL_VIEWER (gtk_crystal_viewer_get_type ()) +/*! +Casts \a obj to a GtkCrystalViewer * pointer. +\return a pointer to the GtkCrystalViewer * or NULL if \a obj does not point to +a GtkCrystalViewer widget. +*/ +#define GTK_CRYSTAL_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CRYSTAL_VIEWER, GtkCrystalViewer)) +/*! +Casts \a klass to a GtkCrystalViewerClass * pointer. +\return a pointer to the GtkCrystalViewerClass * or NULL if \a obj not point to a GtkCrystalViewerClass. +*/ +#define GTK_CRYSTAL_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CRYSTAL_VIEWER, GtkCrystalViewerClass)) +/*! +\return TRUE if \a obj points to a GtkCrystalViewer widget, FALSE otherwise. +*/ +#define GTK_IS_CRYSTAL_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CRYSTAL_VIEWER)) +/*! +\return TRUE if \a klass points to a GtkCrystalViewerClass, FALSE otherwise. +*/ +#define GTK_IS_CRYSTAL_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CRYSTAL_VIEWER)) +/*! +\return the GtkCrystalViewerClass * associated to \a obj if obj points to a GtkCrystalViewer widget, +NULL otherwise. +*/ +#define GTK_CRYSTAL_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CRYSTAL_VIEWER, GtkCrystalViewerClass)) + +/*! The GtkCrystalViewer widget.*/ +typedef struct _GtkCrystalViewer GtkCrystalViewer; +/*! The GtkCrystalViewer widget object class.*/ +typedef struct _GtkCrystalViewerClass GtkCrystalViewerClass; + +/*!\struct GtkCrystalViewer +The GtkCrystalViewer widget displays a crystal structure using an OpenGL window. A test program is available in the tests +directory of the Gnome Chemistry Utils source archive (source in testgtkcrystalviewer.c). +
+

Functions

+ +Functions related to the GtkCrystalViewer Widget are described in the gtkcrystalviewer.h page. +*/ + +GType gtk_crystal_viewer_get_type (void) G_GNUC_CONST; +/*! +@param node: a pointer to an xlNode (from libxml) containing the serialized version of the crystal to display as saved by +Gnome Crystal or NULL. + +Builds a new GtkCrystalViewer widget and, if node is not NULL, fills it with the Crystal structure described in node. +@return a pointer to the new viewer. +*/ +GtkWidget* gtk_crystal_viewer_new (xmlNodePtr node); +/*! +@param viewer: a pointer to a GtkCrystalViewer widget. +@param node: a pointer to an xlNode (from libxml) containing the serialized version of the crystal to display as saved by +Gnome Crystal. + +Replaces the content of viewer by the Crystal structure described in node. +*/ +void gtk_crystal_viewer_set_data (GtkCrystalViewer * viewer, xmlNodePtr node); + +/*! +@param viewer a pointer to a GtkCrystalViewer widget. +@param width the width of the new pixbuf. +@param height the height of the new pixbuf. + +Renders the scene to a newly allocated pixbuf. +\return the new GdkPixbuf*. +*/ +GdkPixbuf *gtk_crystal_viewer_new_pixbuf (GtkCrystalViewer * viewer, guint width, guint height); + +G_END_DECLS + +#endif //GTK_CRYSTAL_VIEWER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkperiodic.c gnome-chemistry-utils-0.10.9/libs/gcu/gtkperiodic.c --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkperiodic.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkperiodic.c 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,456 @@ +/* + * Gnome Chemisty Utils + * gtkperiodic.c + * + * Copyright (C) 2002-2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gtkperiodic.h" +#include "chemistry.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct _GtkPeriodic +{ + GtkBin bin; + + GtkVBox* vbox; + GtkToggleButton* buttons[119]; + GtkLabel* labels[119]; + GtkNotebook *book; + guint Z; + gboolean can_unselect; + unsigned colorstyle; + GArray *colorschemes; + unsigned nbschemes; +}; + +struct _GtkPeriodicClass +{ + GtkBinClass parent_class; + + void (* element_changed_event)(GtkPeriodic *periodic); +}; + +static unsigned DefaultRed[4], DefaultGreen[4], DefaultBlue[4]; + +GType +gtk_periodic_color_style_get_type (void) +{ + static GType etype = 0; + if (etype == 0) { + static const GEnumValue values[] = { + { GTK_PERIODIC_COLOR_NONE, "GTK_PERIODIC_COLOR_NONE", "none" }, + { GTK_PERIODIC_COLOR_DEFAULT, "GTK_PERIODIC_COLOR_DEFAULT", "default" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("GtkPeriodicColorStyle", values); + } + return etype; +} +#define GTK_TYPE_PERIODIC_COLOR_STYLE_TYPE (gtk_periodic_color_style_get_type()) + +static GtkBinClass *parent_class = NULL; + +struct ColorScheme { + GtkPeriodicColorFunc f; + int page; + gpointer data; +}; + +enum { + ELEMENT_CHANGED, + LAST_SIGNAL +}; + +enum { + PROP_0, + PROP_CAN_UNSELECT, + PROP_COLOR_STYLE +}; + +static guint gtk_periodic_signals[LAST_SIGNAL] = { 0 }; + +static void gtk_periodic_class_init (GtkPeriodicClass *klass); +static void gtk_periodic_init(GtkPeriodic *periodic); +static void gtk_periodic_finalize(GObject *object); +static void gtk_periodic_size_allocate(GtkPeriodic* w, GtkAllocation *allocation); +static void gtk_periodic_size_request(GtkPeriodic* w, GtkRequisition *requisition); +static void gtk_periodic_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void gtk_periodic_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); +static void on_clicked(GtkToggleButton *button, GtkPeriodic* periodic); + +GType +gtk_periodic_get_type (void) +{ + static GType periodic_type = 0; + + if (!periodic_type) + { + static const GTypeInfo periodic_info = + { + sizeof (GtkPeriodicClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_periodic_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkPeriodic), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_periodic_init, + }; + + periodic_type = g_type_register_static (GTK_TYPE_BIN, "GtkPeriodic", &periodic_info, 0); + } + + return periodic_type; +} + +void gtk_periodic_class_init (GtkPeriodicClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GtkWidgetClass * widget_class = GTK_WIDGET_CLASS (klass); + parent_class = (GtkBinClass*) g_type_class_peek_parent (klass); + + gobject_class->set_property = gtk_periodic_set_property; + gobject_class->get_property = gtk_periodic_get_property; + klass->element_changed_event = NULL; + gtk_periodic_signals[ELEMENT_CHANGED] = + g_signal_new ("element_changed", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(GtkPeriodicClass, element_changed_event), + NULL, NULL, + g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, 1, + G_TYPE_UINT + ); + g_object_class_install_property + (gobject_class, + PROP_CAN_UNSELECT, + g_param_spec_boolean ("can_unselect", NULL, NULL, + FALSE, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + g_object_class_install_property + (gobject_class, + PROP_COLOR_STYLE, + g_param_spec_uint ("color-style", NULL, NULL, + GTK_PERIODIC_COLOR_NONE, G_MAXUINT, + GTK_PERIODIC_COLOR_NONE, + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + gobject_class->finalize = gtk_periodic_finalize; + widget_class->size_request = (void(*)(GtkWidget*, GtkRequisition*)) gtk_periodic_size_request; + widget_class->size_allocate = (void(*)(GtkWidget*, GtkAllocation*)) gtk_periodic_size_allocate; +} + +void gtk_periodic_init (GtkPeriodic *periodic) +{ + GladeXML* xml; + GtkStyle* style; + char name[8] = "elt"; + GtkToggleButton* button; + int i; + char* domain = g_strdup(textdomain(NULL)); + textdomain(GETTEXT_PACKAGE); + xml = glade_xml_new(GLADEDIR"/gtkperiodic.glade", "vbox1", NULL); + g_return_if_fail (xml); + g_object_set_data(G_OBJECT(periodic), "xml", xml); + glade_xml_signal_autoconnect (xml); + periodic->vbox = GTK_VBOX(glade_xml_get_widget(xml, "vbox1")); + periodic->book = GTK_NOTEBOOK (glade_xml_get_widget (xml, "book")); + periodic->colorstyle = GTK_PERIODIC_COLOR_NONE; + memset(periodic->buttons, 0, sizeof(GtkToggleButton*) * 119); + for (i = 1; i <= 118; i++) + { + sprintf(name + 3, "%d", i); + button = (GtkToggleButton*)glade_xml_get_widget(xml, name); + if (GTK_IS_TOGGLE_BUTTON(button)) + { + gtk_widget_set_tooltip_text (GTK_WIDGET(button), gcu_element_get_name(i)); + periodic->buttons[i] = button; + periodic->labels[i] = GTK_LABEL (gtk_bin_get_child (GTK_BIN (button))); + g_signal_connect(G_OBJECT(button), "toggled", (GCallback)on_clicked, periodic); + } + } + style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(periodic->buttons[1]))); + DefaultRed[0] = style->bg[0].red; + DefaultGreen[0] = style->bg[0].green; + DefaultBlue[0] = style->bg[0].blue; + DefaultRed[1] = style->bg[1].red; + DefaultGreen[1] = style->bg[1].green; + DefaultBlue[1] = style->bg[1].blue; + DefaultRed[2] = style->bg[2].red; + DefaultGreen[2] = style->bg[2].green; + DefaultBlue[2] = style->bg[2].blue; + DefaultRed[3] = style->bg[3].red; + DefaultGreen[3] = style->bg[3].green; + DefaultBlue[3] = style->bg[3].blue; + g_object_unref(style); + periodic->Z = 0; + gtk_container_add(GTK_CONTAINER(periodic), GTK_WIDGET(periodic->vbox)); + gtk_widget_show_all(GTK_WIDGET(periodic)); + textdomain(domain); + g_free(domain); + periodic->colorschemes = g_array_new (FALSE, FALSE, sizeof (struct ColorScheme)); +} + +static void gtk_periodic_finalize (GObject *object) +{ + GtkPeriodic *periodic = (GtkPeriodic*) object; + GObject *obj = (GObject*) g_object_get_data (object, "xml"); + + g_array_free (periodic->colorschemes, FALSE); + if (obj) g_object_unref (obj); + + if (G_OBJECT_CLASS (parent_class)->finalize) + (* G_OBJECT_CLASS (parent_class)->finalize) (object); +} + +GtkWidget* gtk_periodic_new() +{ + GtkBin* bin = GTK_BIN(g_object_new(GTK_TYPE_PERIODIC, NULL)); + return GTK_WIDGET(bin); +} + +void on_clicked(GtkToggleButton *button, GtkPeriodic* periodic) +{ + static gboolean change = FALSE; + if (button != periodic->buttons[0]) + { + const gchar* name; + change = TRUE; + if (periodic->buttons[0]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(periodic->buttons[0]), FALSE); + periodic->buttons[0] = button; + name = gtk_widget_get_name(GTK_WIDGET(periodic->buttons[0])); + periodic->Z = atoi(name + 3); + g_signal_emit(periodic, gtk_periodic_signals[ELEMENT_CHANGED], 0, periodic->Z); + change = FALSE; + } + else if (!change) + { + if (periodic->can_unselect) + { + periodic->buttons[0] = NULL; + periodic->Z = 0; + g_signal_emit(periodic, gtk_periodic_signals[ELEMENT_CHANGED], 0, 0); + } + else if (periodic->buttons[0]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(periodic->buttons[0]), TRUE); + } +} + +void gtk_periodic_size_allocate(GtkPeriodic* w, GtkAllocation *allocation) +{ + if (GTK_BIN(w)->child && GTK_WIDGET_VISIBLE (GTK_BIN(w)->child)) + gtk_widget_size_allocate (GTK_BIN(w)->child, allocation); + (GTK_WIDGET_CLASS(parent_class))->size_allocate(GTK_WIDGET(w), allocation); +} + +void gtk_periodic_size_request(GtkPeriodic* w, GtkRequisition *requisition) +{ + gtk_widget_size_request ((GTK_BIN(w))->child, requisition); +} + +guint gtk_periodic_get_element(GtkPeriodic* periodic) +{ + g_return_val_if_fail(GTK_IS_PERIODIC(periodic), 0); + return periodic->Z; +} + +void gtk_periodic_set_element (GtkPeriodic* periodic, guint element) +{ + g_return_if_fail(GTK_IS_PERIODIC(periodic)); + if (periodic->can_unselect && periodic->buttons[0]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(periodic->buttons[0]), FALSE); + if (element) + { + gtk_toggle_button_set_active(periodic->buttons[element], TRUE); + periodic->buttons[0] = periodic->buttons[element]; + periodic->Z = element; + } + else if (periodic->can_unselect) + { + periodic->buttons[0] = NULL; + periodic->Z = 0; + } +} + +static void +gtk_periodic_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + GtkPeriodic *periodic; + g_return_if_fail (object != NULL); + g_return_if_fail (GTK_IS_PERIODIC (object)); + + periodic = GTK_PERIODIC (object); + + switch (param_id) { + case PROP_CAN_UNSELECT: + periodic->can_unselect = g_value_get_boolean (value); + break; + + case PROP_COLOR_STYLE: { + int style = g_value_get_uint (value); + if (style < GTK_PERIODIC_COLOR_MAX + periodic->nbschemes) { + periodic->colorstyle = style; + int page = (style >= GTK_PERIODIC_COLOR_MAX)? + g_array_index (periodic->colorschemes, struct ColorScheme, style - GTK_PERIODIC_COLOR_MAX).page: 0; + gtk_notebook_set_current_page (periodic->book, page); + gtk_periodic_set_colors (periodic); + } else + g_warning (_("Out of range value %d for property \"color-style\" for GtkPeriodic instance %p\n"), style, periodic); + break; + } + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +static void +gtk_periodic_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + GtkPeriodic *periodic; + + g_return_if_fail (object != NULL); + g_return_if_fail (GTK_IS_PERIODIC (object)); + + periodic = GTK_PERIODIC (object); + + switch (param_id) { + case PROP_CAN_UNSELECT: + g_value_set_boolean (value, periodic->can_unselect); + break; + + case PROP_COLOR_STYLE: + g_value_set_uint (value, periodic->colorstyle); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + +void gtk_periodic_set_colors(GtkPeriodic *periodic) +{ + GtkStyle* style; + const double *colors; + PangoAttribute *attr; + PangoAttrList *l; + int i; + GdkColor color; + GtkPeriodicColorFunc func = NULL; + gpointer data = NULL; + if (periodic->colorstyle >= GTK_PERIODIC_COLOR_MAX) { + func = g_array_index (periodic->colorschemes, struct ColorScheme, periodic->colorstyle - GTK_PERIODIC_COLOR_MAX).f; + data = g_array_index (periodic->colorschemes, struct ColorScheme, periodic->colorstyle - GTK_PERIODIC_COLOR_MAX).data; + } + for (i = 1; i <= 118; i++) + { + if (!periodic->buttons[i]) continue; + style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(periodic->buttons[i]))); + switch (periodic->colorstyle) + { + case GTK_PERIODIC_COLOR_NONE: + style->bg[0].red = DefaultRed[0]; + style->bg[0].green = DefaultGreen[0]; + style->bg[0].blue = DefaultBlue[0]; + style->bg[1].red = DefaultRed[0]; + style->bg[1].green = DefaultGreen[1]; + style->bg[1].blue = DefaultBlue[1]; + style->bg[2].red = DefaultRed[1]; + style->bg[2].green = DefaultGreen[2]; + style->bg[2].blue = DefaultBlue[2]; + style->bg[3].red = DefaultRed[3]; + style->bg[3].green = DefaultGreen[3]; + style->bg[3].blue = DefaultBlue[3]; + attr = pango_attr_foreground_new (0, 0, 0); + attr->start_index = 0; + attr->end_index = 100; + l = pango_attr_list_new (); + pango_attr_list_insert (l, attr); + gtk_label_set_attributes (periodic->labels[i], l); + break; + case GTK_PERIODIC_COLOR_DEFAULT: + colors = gcu_element_get_default_color(i); + style->bg[0].red = style->bg[1].red = style->bg[2].red = style->bg[3].red = (guint16) (colors[0] * 65535.0); + style->bg[0].green = style->bg[1].green = style->bg[2].green = style->bg[3].green = (guint16) (colors[1] * 65535.0); + style->bg[0].blue = style->bg[1].blue = style->bg[2].blue = style->bg[3].blue = (guint16) (colors[2] * 65535.0); + if (colors[0] > 0.6 || colors[1] > 0.6 || colors[2] > 0.6) + attr = pango_attr_foreground_new (0, 0, 0); + else + attr = pango_attr_foreground_new (65535, 65535, 65535); + attr->start_index = 0; + attr->end_index = 100; + l = pango_attr_list_new (); + pango_attr_list_insert (l, attr); + gtk_label_set_attributes (periodic->labels[i], l); + break; + default: { + func (i, &color, data); + style->bg[0] = style->bg[1] = style->bg[2] = style->bg[3] = color; + if (color.red > 39321 || color.green > 39321 || color.blue > 39321) + attr = pango_attr_foreground_new (0, 0, 0); + else + attr = pango_attr_foreground_new (65535, 65535, 65535); + attr->start_index = 0; + attr->end_index = 100; + l = pango_attr_list_new (); + pango_attr_list_insert (l, attr); + gtk_label_set_attributes (periodic->labels[i], l); + break; + } + } + gtk_widget_set_style(GTK_WIDGET(periodic->buttons[i]), style); + g_object_unref(style); + } +} + +int gtk_periodic_add_color_scheme (GtkPeriodic *periodic, + GtkPeriodicColorFunc func, GtkWidget *extra_widget, gpointer user_data) +{ + struct ColorScheme s; + s.f = func; + if (extra_widget) + s.page = gtk_notebook_append_page (periodic->book, extra_widget, NULL); + else + s.page = 0; + s.data = user_data; + g_array_append_val (periodic->colorschemes, s); + return GTK_PERIODIC_COLOR_MAX + periodic->nbschemes++; +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkperiodic.h gnome-chemistry-utils-0.10.9/libs/gcu/gtkperiodic.h --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkperiodic.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkperiodic.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,176 @@ +// -*- C -*- + +/* + * Gnome Chemisty Utils + * gtkperiodic.h + * + * Copyright (C) 2002-2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GTK_PERIODIC_H +#define GTK_PERIODIC_H + +#include +#include +#include +#include + +G_BEGIN_DECLS + +/*!\file +Declaration of the GtkPeriodic widget. +*/ +/*! \enum GtkPeriodicColorSchemes + Predefined coloring scheme used for the buttons when displaying the periodic table of the GtkPeriodic widget. + Possible values are: + - GTK_PERIODIC_COLOR_NONE: the default Gtk theme is used. + - GTK_PERIODIC_COLOR_DEFAULT: the default color for each element is used as returned by gcu_element_get_default_color. + Other values can be added using gtk_periodic_add_color_scheme. +*/ +enum GtkPeriodicColorSchemes +{ + GTK_PERIODIC_COLOR_NONE, + GTK_PERIODIC_COLOR_DEFAULT, + GTK_PERIODIC_COLOR_MAX, +}; + +/*!\return the GType associated to GtkPeriodic */ +#define GTK_TYPE_PERIODIC (gtk_periodic_get_type ()) +/*! +Casts \a obj to a GtkPeriodic * pointer. +\return a pointer to the GtkPeriodic * or NULL if \a obj does not point to +a GtkPeriodic widget. +*/ +#define GTK_PERIODIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PERIODIC, GtkPeriodic)) +/*! +Casts \a klass to a GtkPeriodicClass * pointer. +\return a pointer to the GtkPeriodicClass * or NULL if \a obj not point to a GtkPeriodicClass. +*/ +#define GTK_PERIODIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PERIODIC, GtkPeriodicClass)) +/*! +\return TRUE if \a obj points to a GtkPeriodic widget, FALSE otherwise. +*/ +#define GTK_IS_PERIODIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PERIODIC)) +/*! +\return TRUE if \a klass points to a GtkPeriodicClass, FALSE otherwise. +*/ +#define GTK_IS_PERIODIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PERIODIC)) +/*! +\return the GtkPeriodicClass * associated to \a obj if obj points to a GtkPeriodic widget, +NULL otherwise. +*/ +#define GTK_PERIODIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PERIODIC, GtkPeriodicClass)) + +/*! The GtkPeriodic widget.*/ +typedef struct _GtkPeriodic GtkPeriodic; +/*! The GtkPeriodic widget object class.*/ +typedef struct _GtkPeriodicClass GtkPeriodicClass; + +/*! \struct GtkPeriodic gcu/gtkperiodic.h + The GtkPeriodic Widget displays a Periodic table of the elements, each element being represented in a toggle button. + A test program is available in the tests directory of the Gnome Chemistry Utils source archive +(source in testgtkperiodic.c). +
+

Signals

+ + This widget has one signal: +- "element-changed": void user_function (GtkWidget* periodic, guint Z, gpointer data). +\param periodic: the object which received the signal. +\param Z: the atomic number of the newly selected element or 0 if no element is selected. +\param data: user data set when the signal handler was connected. + + This signal is raised when the selected element changes in the widget. + +
+

Properties

+There are two properties: +- "can_unselect": gboolean (Read / Write). +
When this property is set to TRUE, you can unselect the selected element by clicking on the active button, otherwise an element will always be selected. + Default value is FALSE. + +- "color-style": GtkPeriodicColorStyle (Read / Write). +
This property is used to set the coloring scheme used for the buttons when displaying the periodic table. + There are two predefined values: + - GTK_PERIODIC_COLOR_NONE: the default Gtk theme is used. + - GTK_PERIODIC_COLOR_DEFAULT: the default color for each element is used as returned by gcu_element_get_default_color. + Other values can be added using gtk_periodic_add_color_scheme(). + Default value is GTK_PERIODIC_COLOR_NONE. +. +
+

Functions

+ +Functions related to the GtkPeriodic Widget are described in the gtkperiodic.h page. +*/ + +/*! +The callback used for color schemes. It takes three arguments: +\li the atomic number Z. +\li a pointer to the GdkColor structure to be filled by the callback +\li a pointer to user's data. +*/ +typedef void (*GtkPeriodicColorFunc) (int, GdkColor*, gpointer); + +/*!\return the GType associated to GtkPeriodic */ +GType gtk_periodic_get_type (void) G_GNUC_CONST; +/*!\return a new GtkPeriodic */ +GtkWidget* gtk_periodic_new (void); + +/** + * gtk_periodic_get_element: + * \param periodic a GtkPeriodic widget + * + * Description: used to get the currently selected element in the periodic table. + * + * Returns: the atomic number of the currently selected element or %0 if none is selected. + */ +guint gtk_periodic_get_element (GtkPeriodic* periodic); +/** + * gtk_periodic_set_element: + * \param periodic a GtkPeriodic widget + * \param element the atomic number of the element to select or 0 + * + * Description: sets the selected element in the periodic table. + */ + +void gtk_periodic_set_element (GtkPeriodic* periodic, guint element); + +/*! +\param periodic a GtkPeriodic widget. +\param func the callback used to get the color for an element in the new color scheme. +\param extra_widget a widget to be added as a child of \a periodic. +\param user_data data to be passed to the \a func callback. + +Using this function and the appropriate callback, the color used for the elements buttons +can be changed to depend on any property of the elements. +\return the identifier of the new color scheme. +*/ +int gtk_periodic_add_color_scheme (GtkPeriodic *periodic, + GtkPeriodicColorFunc func, + GtkWidget *extra_widget, + gpointer user_data); + +/*! +\param periodic a GtkPeriodic widget. + +Forces the update of the current color scheme. This is useful when the color scheme depends +upon a parameter which has changed. +*/ +void gtk_periodic_set_colors(GtkPeriodic *periodic); +G_END_DECLS + +#endif //GTK_PERIODIC_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkspectrumviewer.cc gnome-chemistry-utils-0.10.9/libs/gcu/gtkspectrumviewer.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkspectrumviewer.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkspectrumviewer.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,100 @@ +/* + * Gnome Chemisty Utils + * gtkspectrumviewer.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gtkspectrumviewer.h" +#include "spectrumdoc.h" +#include "spectrumview.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +#endif +#include + +struct _GtkSpectrumViewer +{ + GtkBin base; + + gcu::SpectrumDocument *doc; + GogGraph *graph; +}; + +struct _GtkSpectrumViewerClass +{ + GtkBinClass base; +}; + +static void +on_size (GtkSpectrumViewer* w, GtkAllocation *allocation, gpointer user_data) +{ + if (GTK_BIN (w)->child && GTK_WIDGET_VISIBLE (GTK_BIN (w)->child)) + gtk_widget_size_allocate (GTK_BIN (w)->child, allocation); +} + +GtkWidget* +gtk_spectrum_viewer_new (const gchar* uri) +{ + GtkSpectrumViewer *viewer = GTK_SPECTRUM_VIEWER (g_object_new (GTK_TYPE_SPECTRUM_VIEWER, NULL)); + viewer->doc = new gcu::SpectrumDocument (); + gcu::SpectrumView *View = viewer->doc->GetView(); + GtkWidget* w = View->GetWidget (); + viewer->graph = go_graph_widget_get_graph (GO_GRAPH_WIDGET (w)); + gtk_container_add (GTK_CONTAINER (viewer), w); + g_signal_connect (G_OBJECT (viewer), "size_allocate", G_CALLBACK (on_size), NULL); + gtk_widget_show (w); + gtk_spectrum_viewer_set_uri (viewer, uri); + return reinterpret_cast (viewer); +} + +void +gtk_spectrum_viewer_set_uri (GtkSpectrumViewer * viewer, const gchar * uri) +{ + if (!uri) + return; + char *old_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + viewer->doc->Load (uri, "chemical/x-jcamp-dx"); + setlocale (LC_NUMERIC, old_locale); + g_free (old_locale); + g_return_if_fail (GTK_IS_SPECTRUM_VIEWER (viewer)); +} + +GogGraph * +gtk_spectrum_viewer_get_graph (GtkSpectrumViewer * viewer) +{ + g_return_val_if_fail (GTK_IS_SPECTRUM_VIEWER (viewer), NULL); + return viewer->graph; +} + +void +gtk_spectrum_viewer_init (GtkSpectrumViewer * viewer) +{ +} + +void +gtk_spectrum_viewer_class_init (GtkSpectrumViewerClass *klass) +{ +} + +GSF_CLASS (GtkSpectrumViewer, gtk_spectrum_viewer, + gtk_spectrum_viewer_class_init, gtk_spectrum_viewer_init, + GTK_TYPE_BIN) diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/gtkspectrumviewer.h gnome-chemistry-utils-0.10.9/libs/gcu/gtkspectrumviewer.h --- gnome-chemistry-utils-0.8.6/libs/gcu/gtkspectrumviewer.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/gtkspectrumviewer.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,103 @@ +/* + * Gnome Chemisty Utils + * gtkspectrumviewer.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GTK_SPECTRUM_VIEWER_H +#define GTK_SPECTRUM_VIEWER_H + +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include + +G_BEGIN_DECLS + +/*!\file +Declaration of the GtkSpectrumViewer widget. +*/ + +/*!\return the GType associated to GtkSpectrumViewer */ +#define GTK_TYPE_SPECTRUM_VIEWER (gtk_spectrum_viewer_get_type ()) +/*! +Casts \a obj to a GtkSpectrumViewer * pointer. +\return a pointer to the GtkSpectrumViewer * or NULL if \a obj does not point to +a GtkSpectrumViewer widget. +*/ +#define GTK_SPECTRUM_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewer)) +/*! +Casts \a klass to a GtkSpectrumViewerClass * pointer. +\return a pointer to the GtkSpectrumViewerClass * or NULL if \a obj not point to a GtkSpectrumViewerClass +*/ +#define GTK_SPECTRUM_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewerClass +/*! +\return TRUE if \a obj points to a GtkSpectrumViewer widget, FALSE otherwise. +*/ +#define GTK_IS_SPECTRUM_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SPECTRUM_VIEWER)) +/*! +\return TRUE if \a klass points to a GtkSpectrumViewerClass, FALSE otherwise. +*/ +#define GTK_IS_SPECTRUM_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SPECTRUM_VIEWER)) +/*! +\return the GtkSpectrumViewerClass * associated to \a obj if obj points to a GtkSpectrumViewer widget, +NULL otherwise. +*/ +#define GTK_SPECTRUM_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewerClass)) + +/*! \struct GtkSpectrumViewer gcu/gtkspectrumviewer.h + The GtkSpectrumViewer displays using the goffice library. Only spectra in the JCAMP-DX format are supported in this +version. + +The available functions related to the GtkSpectrumViewer Widget are described in the gtkspectrumviewer.h page. +*/ + +/*! The GtkSpectrumViewer widget.*/ +typedef struct _GtkSpectrumViewer GtkSpectrumViewer; +/*! The GtkSpectrumViewer widget object class.*/ +typedef struct _GtkSpectrumViewerClass GtkSpectrumViewerClass; + +GType gtk_spectrum_viewer_get_type (void) G_GNUC_CONST; +/*! +@param uri the URI of the file containing the spectrum to display + +Creates a GtkSpectrumViewer widget and fills it with the data from uri. +If uri is NULL, the widget will display an empty chart. +*/ +GtkWidget* gtk_spectrum_viewer_new (const gchar* uri); +/*! +@param viewer a pointer to GtkSectrumViewer widget. +@param uri the URI of the file containing the spectrum to display. + +Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL. +*/ +void gtk_spectrum_viewer_set_uri (GtkSpectrumViewer * viewer, const gchar * uri); + +/*! +@param viewer a pointer to GtkSectrumViewer widget. + +@return the graph displayed by the widget. +*/ +GogGraph *gtk_spectrum_viewer_get_graph (GtkSpectrumViewer * viewer); + +G_END_DECLS + +#endif // GTK_SPECTRUM_VIEWER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/isotope.cc gnome-chemistry-utils-0.10.9/libs/gcu/isotope.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/isotope.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/isotope.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,204 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * isotope.cc + * + * Copyright (C) 2005-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "isotope.h" + +using namespace std; + +namespace gcu +{ + +Isotope::Isotope () +{ + A = 0; + name = NULL; + abundance.value = 0.; + abundance.prec = 0; + abundance.delta = 0; + mass.value = 0.; + mass.prec = 0; + mass.delta = 0; + spin = 0; + decay_modes = NULL; + decay_period.value = 0.; + decay_period.prec = 0; + decay_period.unit = NULL; +} + +Isotope::~Isotope () +{ + if (name != NULL) + g_free (name); + if (decay_modes != NULL) + g_free (decay_modes); +} + +IsotopicPattern::IsotopicPattern () +{ + m_min = m_max = m_mono = 0; + ref_count = 1; +} + +IsotopicPattern::IsotopicPattern (int min, int max) +{ + if (max >= min) { + m_min = min; + m_max = max; + } else { + m_max = min; + m_min = max; + } + m_mono = 0; + m_values.resize (max - min + 1); + ref_count = 1; +} + +IsotopicPattern::~IsotopicPattern () +{ +} + +double IsotopicPattern::epsilon = 1e-6; + +IsotopicPattern *IsotopicPattern::Simplify () +{ + int min = 0, max = m_max - m_min; + int i, j, imax = max + 1; + double vmax = m_values[0], minval; + for (i = 1; i < imax; i++) + if (m_values[i] > vmax) { + vmax = m_values[i]; + } + minval = epsilon * vmax; + while (m_values[min] < minval) + min++; + while (m_values[max] < minval) + max--; + IsotopicPattern *pat = new IsotopicPattern (min + m_min, max + m_min); + pat->m_mono = m_mono; + pat->m_mono_mass = m_mono_mass; + vmax /= 100.; + for (i = min, j = 0; i <= max; i++, j++) + pat->m_values[j] = m_values[i] / vmax; + return pat; +} + +IsotopicPattern *IsotopicPattern::Multiply (IsotopicPattern &pattern) +{ + IsotopicPattern *pat = new IsotopicPattern (m_min + pattern.m_min, m_max + pattern.m_max); + pat->m_mono = m_mono + pattern.m_mono; + pat->m_mono_mass = m_mono_mass + pattern.m_mono_mass; + int i, j, k, imax = pat->m_max - pat->m_min + 1, jmax = m_values.size () - 1, kmax = pattern.m_values.size (); + for (i = 0; i < imax; i++) { + pat->m_values[i] = 0.; + for (j = min (i, jmax), k = i - j; (k < kmax) && (j >= 0); j--, k++) { + pat->m_values[i] += pattern.m_values[k] * m_values[j]; + } + } + return pat; +} + +IsotopicPattern *IsotopicPattern::Square () +{ + IsotopicPattern *pat = new IsotopicPattern (2 * m_min, 2 * m_max); + pat->m_mono = 2 * m_mono; + pat->m_mono_mass = m_mono_mass * 2; + int i, j, k, imax = pat->m_max - pat->m_min + 1, jmax = m_values.size () - 1; + for (i = 0; i < imax; i++) { + pat->m_values[i] = 0.; + for (j = max (0, i - jmax), k = i - j; k > j; k--, j++) { + pat->m_values[i] += 2. * m_values[k] * m_values[j]; + } + if (j == k) + pat->m_values[i] += m_values[j] * m_values[j]; + } + return pat; +} + +void IsotopicPattern::SetValue (int A, double percent) +{ + if (A >= m_min && A <= m_max) { + A -= m_min; + m_values[A] = percent; + } +} + +void IsotopicPattern::Normalize () +{ + double max = m_values[0]; + int i, maxi = m_max - m_min + 1; + m_mono = 0; + for (i = 1; i < maxi; i++) + if (m_values[i] > max) { + m_mono = i; + max = m_values[i]; + } + m_mono += m_min; + max /= 100.; + for (i = 0; i < maxi; i++) + m_values[i] /= max; +} + +void IsotopicPattern::Unref () +{ + ref_count--; + if (!ref_count) + delete this; +} + +int IsotopicPattern::GetValues (double **values) +{ + int i, result = m_values.size (); + *values = g_new (double, result); + for (i = 0; i < result; i++) + (*values)[i] = m_values[i]; + return result; +} + +void IsotopicPattern::Copy (IsotopicPattern& pattern) +{ + m_min = pattern.m_min; + m_max = pattern.m_max; + m_mono = pattern.m_mono; + m_mono_mass = pattern.m_mono_mass; + int i, max = pattern.m_values.size(); + m_values.resize (max); + for (i = 0; i < max; i++) { + m_values[i] = pattern.m_values[i]; + } +} + +void IsotopicPattern::Clear () +{ + m_min = m_max = m_mono = 0; + m_mono_mass = SimpleValue (); +} + +void IsotopicPattern::SetMonoMass (SimpleValue mass) +{ + if (m_mono_mass.GetAsDouble () == 0.) + m_mono_mass = mass; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/isotope.h gnome-chemistry-utils-0.10.9/libs/gcu/isotope.h --- gnome-chemistry-utils-0.8.6/libs/gcu/isotope.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/isotope.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,170 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * isotope.h + * + * Copyright (C) 2005-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_ISOTOPE_H +#define GCU_ISOTOPE_H + +#include +#include +#include + +/*!\file*/ +namespace gcu +{ + +/*!\class Isotope gcu/isotope.h +This class just wrap a GcuIsotope structure. +*/ +class Isotope: public GcuIsotope +{ +public: +/*! +The constructor initialize the member of the GcuIsotope structure with +nul values. +*/ + Isotope (); +/*! +The denstructor. +*/ + ~Isotope (); +}; + +/*!\class IsotopicPattern gcu/isotope.h +Objects of this class represent the isotopic pattern corresponding to a +chemical formula. +
+The formalism used is similar to polynoms algebra, since calculate the +isotopic pattern of the reunion of two fragments is equivalent to a +polynomial multiplication. +*/ +class IsotopicPattern +{ +public: +/*! +Default constructor. Initialize members to nul values. The IsotopicPattern +is given an initial reference count of 1. +*/ + IsotopicPattern (); +/*! +Sets the minimum and maximum mass numbers of the pattern, and reserves memory to +store the abundances of the mass fragments. The IsotopicPattern +is given an initial reference count of 1. +*/ + IsotopicPattern (int min, int max); + ~IsotopicPattern (); + +/*! +This method creates a copy of the original object with abundances normalized +as a percentage of the largest value, and removes very small values to save time +in subsequent calculations. +@return the resulting object. +*/ + IsotopicPattern *Simplify (void); +/*! +Effects a polynomial multiplication to calculate the pattern correponding to +the reunion of the two fragments. +@return the result of the multiplication. +*/ + IsotopicPattern *Multiply (IsotopicPattern& pattern); +/*! +Squares the original pattern to get the pattern corresponding to twice the +original formula. +@return the result of the multiplication. +*/ + IsotopicPattern *Square (void); +/*! +@param pattern: the isotopic pattern to be copied. +Set the values of the isotopic pattern so that it becomes identical to pattern. +*/ + void Copy (IsotopicPattern& pattern); + +/*! +@param A: the mass number of the isotope. +@param percent: the abundance of the isotope. + +This method is used when building an Isotopic Pattern from raw data. +IsotopicPattern::SetMonoMass should be called when data for each isotope have been entered. +*/ + void SetValue (int A, double percent); +/*! +Effects the same multiplication on all abundances so that the largest becomes +100. +*/ + void Normalize (); +/*! +Clears the contents of an isotopic pattern for reuse. +*/ + void Clear (); +/*! +Increments the reference count of the pattern. +*/ + void Ref () {ref_count++;} +/*! +Decrements the reference count of the pattern. If the reference count becomes 0, +the object is destroyed. +*/ + void Unref (); +/*! +@return the mass (actually the nucleons number) of the fragment with the +lowest mass. This might not be the real minimu, since fragments with very low +abundance are discarded during the evaluation. +*/ + int GetMinMass () {return m_min;} +/*! +@return the nucleons number of the fragment made with most abundant +isotopes of each element. +*/ + int GetMonoNuclNb () {return m_mono;} +/*! +@return the mass of the fragment made with most abundant +isotopes of each element. +*/ + SimpleValue const &GetMonoMass () {return m_mono_mass;} +/*! +@param mass: the mass of the most abundant isotope. + +This method is used when building an Isotopic Pattern from raw data. +To enter the data for each isotope, use IsotopicPattern::SetValue. It +has no effect if the current monoisotopic mass is not nul. +*/ + void SetMonoMass (SimpleValue mass); +/*! +@param values: where to store the pointer to the abundances of the various +mass fragments as a percentage of the most abundant one. The pointer should be +freed with g_free when not anymore nedded. + +@return the number of values in the array. +*/ + int GetValues (double **values); + +private: + int m_min, m_max, m_mono; + int ref_count; + std::vector m_values; + SimpleValue m_mono_mass; + static double epsilon; +}; + +} +#endif // GCU_ISOTOPE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/loader.cc gnome-chemistry-utils-0.10.9/libs/gcu/loader.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/loader.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/loader.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,231 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/loader.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "cmd-context.h" +#include "document.h" +#include "loader.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +#endif +#include +#include +#include + +#ifndef GO_TYPE_PLUGIN_SERVICE_SIMPLE +# define GO_TYPE_PLUGIN_SERVICE_SIMPLE GO_PLUGIN_SERVICE_SIMPLE_TYPE +# define GO_TYPE_PLUGIN_LOADER_MODULE GO_PLUGIN_LOADER_MODULE_TYPE +#endif + +using namespace std; + +namespace gcu { + +static map loaders; +static map services; + +#define GCU_PLUGIN_SERVICE_CHEMICAL_LOADER_TYPE (plugin_service_chemical_loader_get_type ()) +#define GCU_PLUGIN_SERVICE_CHEMICAL_LOADER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GCU_PLUGIN_SERVICE_CHEMICAL_LOADER_TYPE, PluginServiceChemicalLoader)) +#define IS_GCU_PLUGIN_SERVICE_CHEMICAL_LOADER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GCU_PLUGIN_SERVICE_CHEMICAL_LOADER_TYPE)) + +GType plugin_service_chemical_loader_get_type (void); +typedef struct { + PluginServiceSimple base; + +} PluginServiceChemicalLoader; +typedef PluginServiceSimpleClass PluginServiceChemicalLoaderClass; + +static void +plugin_service_chemical_loader_read_xml (GOPluginService * service, xmlNode * tree, + ErrorInfo ** ret_error) +{ + xmlNode *ptr; + + g_return_if_fail (service->id != NULL); + + for (ptr = tree->xmlChildrenNode; ptr != NULL; ptr = ptr->next) + if (0 == xmlStrcmp (ptr->name, (xmlChar const *) "mime_type")) + { + char *name = (char *) xmlGetProp (ptr, (xmlChar const *) "name"); + if (name) { + if (loaders.find (name) != loaders.end ()) { + *ret_error = error_info_new_printf ("Duplicate loader for mime type %s", name); + xmlFree (name); + return; + } + LoaderStruct l; + l.read = l.write = l.supports2D = l.supports3D = l.supportsCrystals = false; + l.loader = NULL; + char *prop = (char *) xmlGetProp (ptr, (xmlChar const *) "capabilities"); + if (prop) { + if (strchr (prop, 'r') != NULL) + l.read = true; + if (strchr (prop, 'w') != NULL) + l.write = true; + xmlFree (prop); + } + prop = (char *) xmlGetProp (ptr, (xmlChar const *) "scope"); + if (prop) { + if (strchr (prop, '2') != NULL) + l.supports2D = true; + if (strchr (prop, '3') != NULL) + l.supports3D = true; + if (strchr (prop, 'c') != NULL || strchr (prop, 'C')) + l.supportsCrystals = true; + if (strchr (prop, 's') != NULL || strchr (prop, 'C')) + l.supportsSpectra = true; + xmlFree (prop); + } + loaders[name] = l; + services[name] = service; + xmlFree (name); + } + } +} + +static char * +plugin_service_chemical_loader_get_description (GOPluginService * service) +{ + return g_strdup (_("Chemical file loader type.")); +} + +static void +plugin_service_chemical_loader_class_init (GObjectClass *gobject_class) +{ + GOPluginServiceClass *plugin_service_class = GPS_CLASS (gobject_class); + + plugin_service_class->read_xml = plugin_service_chemical_loader_read_xml; + plugin_service_class->get_description = plugin_service_chemical_loader_get_description; +} + +static void +plugin_service_chemical_loader_init (PluginServiceChemicalLoader *s) +{ +} + +GSF_CLASS (PluginServiceChemicalLoader, plugin_service_chemical_loader, + plugin_service_chemical_loader_class_init, plugin_service_chemical_loader_init, + GO_TYPE_PLUGIN_SERVICE_SIMPLE) + +Loader::Loader () +{ +} + +Loader::~Loader () +{ +} + +bool Loader::Inited = false; + +void Loader::Init () +{ + if (Inited) + return; + plugin_service_define ("chemical_loader", + &plugin_service_chemical_loader_get_type); + go_plugin_loader_module_register_version ("gchemutils", VERSION); + char *plugins_dir = g_strdup (GCU_PLUGINS_DIR); + GSList *dirs = g_slist_prepend (NULL, plugins_dir); + go_plugins_init (gcu_get_cmd_context (), NULL, NULL, dirs, true, GO_TYPE_PLUGIN_LOADER_MODULE); + g_slist_free (dirs); + g_free (plugins_dir); + Inited = true; +} + +bool Loader::GetFirstLoader (std::map::iterator &it) +{ + it = loaders.begin (); + return it != loaders.end (); +} + +bool Loader::GetNextLoader (std::map::iterator &it) +{ + it++; + return it != loaders.end (); +} + +Loader *Loader::GetLoader (char const *mime_type) +{ + map::iterator it = loaders.find (mime_type); + if (it != loaders.end () && (*it).second.read) { + if ((*it).second.loader == NULL) { + ErrorInfo *error = NULL; + plugin_service_load (services[mime_type], &error); + if (error) { + g_warning (error_info_peek_message (error)); + g_free (error); + } + } + return (*it).second.loader; + } else + return NULL; +} + +Loader *Loader::GetSaver (char const *mime_type) +{ + map::iterator it = loaders.find (mime_type); + if (it != loaders.end () && (*it).second.write) { + if ((*it).second.loader == NULL) { + ErrorInfo *error = NULL; + plugin_service_load (services[mime_type], &error); + if (error) { + g_warning (error_info_peek_message (error)); + g_free (error); + } + } + return (*it).second.loader; + } else + return NULL; +} + +void Loader::AddMimeType (const char *mime_type) +{ + MimeTypes.push_front (mime_type); + map::iterator it = loaders.find (mime_type); + if (it != loaders.end ()) + (*it).second.loader = this; +} + +void Loader::RemoveMimeType (const char *mime_type) +{ + MimeTypes.remove (mime_type); + map::iterator it = loaders.find (mime_type); + if (it != loaders.end ()) + (*it).second.loader = NULL; +} + +bool Loader::Read (Document *doc, GsfInput *in, char const *mime_type, IOContext *io) +{ + return false; +} + +bool Loader::Write (Document *doc, GsfOutput *out, char const *mime_type, IOContext *io) +{ + return false; +} + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/loader.h gnome-chemistry-utils-0.10.9/libs/gcu/loader.h --- gnome-chemistry-utils-0.8.6/libs/gcu/loader.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/loader.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,246 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/loader.h + * + * Copyright (C) 2007-2009 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_LOADER_H +#define GCU_LOADER_H + +#include +#include +#include +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include +#include +#include + +/*!\file*/ +namespace gcu { + +class Document; +class Loader; + +/*!\struct LoaderStruct gcu/loader.h + Stores data for loaders. They are created when Loader::Init is called for + the first time. Using Loader::GetFirstLoader and Loader::GetNextLoader is + the way used to access the list of available loaders and what they provide. +*/ +typedef struct { +/*! +The loader instance associated to a mime type. Might be NULL if not in use. +*/ + Loader *loader; +/*! +If true, the loader can read files of the mime type. +*/ + bool read; +/*! +If true, the loader can write files of the mime type. +*/ + bool write; +/*! +If true, the mime type is able to store 2D chemical structures. +*/ + bool supports2D; +/*! +If true, the mime type is able to store 3D chemical structures. +*/ + bool supports3D; +/*! +If true, the mime type is able to store crystal structures. +*/ + bool supportsCrystals; +/*! +If true, the mime type is able to store spectral data. +*/ + bool supportsSpectra; +} LoaderStruct; + +/*!\class Loader gcu/loader.h +\brief class used to implement serialization engines. + +This class is used to load and save files of various types, using the +gcu::Object framework. Derived classes should be implemented in plugins, using +the goffice plugins API. When Loader::Init is called, the framework collects +informations about the services exposed by each plugin in XML files. For the CDX +file loader plugin, the corresponding plugin.xml.in file content is: + +\code + + + + <_name>Loader : cdxml + <_description>Chemdraw XML files loader. + + + + + + + + + <_description>Chemdraw XML files loader + + + + +\endcode + +In the present context, the important node is the mime type related one. Its +attributes are: + - name: the mime type. + - capabilities: what is supported: r for reading, w for writing. Both "rw" and + "wr" are valid. + - scope: 2 and 3 mean 2D and 3D structures, repectively, c means crystal + structure, and s, spectra . Any combination might be used. + +Other fields are standard in the goffice world. The plugin is loaded +only when needed. + +Each plugin should implement at least one derived class and a static instance +of this class. The CDX loader has: + +\code + +class CDXLoader: public gcu::Loader +{ +public: + CDXLoader (); + virtual ~CDXLoader (); + + bool Read (Document *doc, GsfInput *in, char const *mime_type, IOContext *io); + bool Write (Document *doc, GsfOutput *out, char const *mime_type, IOContext *io); + +private: + ... +}; + +... +static CDXLoader loader; + +\endcode + +*/ +class Loader +{ +public: +/*! +The constructor. Derived class need to call Loader::AddMimeType for each +mime type they support. +*/ + Loader (); +/*! +The destructor Derived class should call Loader::RemoveMimeType for each +mime type they support. +*/ + virtual ~Loader (); + + // static methods +/*! +Initializes the load/save engines system. This must be called before trying to use +any loader (no one will be available before, anyway). +*/ + static void Init (); +/*! +@param it a std::map iterator. + +Must be called to access the first LoaderStruct instance. When successful +the iterator can be used to retrieve both the mime type ((*it).first), and the +corresponding LoaderStruct ((*it).second) +@return true if successful, false otherwise. +*/ + static bool GetFirstLoader (std::map::iterator &it); +/*! +@param it a std::map iterator initialized by Loader::GetFirstLoader + +Gets the next LoderStruct and its associated mime type. +@return true if successful, false otherwise. +*/ + static bool GetNextLoader (std::map::iterator &it); +/*! +@param mime_type a mime type. +@return the Loader instance able to read the mime type if any. +*/ + static Loader *GetLoader (char const *mime_type); +/*! +@param mime_type a mime type. +@return the Loader instance able to write the mime type if any. +*/ + static Loader *GetSaver (char const *mime_type); + + // virtual methods +/*! +@param doc the gcu::Document being read. +@param in a GsfInput (see the libgsf documentation at +http://library.gnome.org/devel/gsf/stable/gsf-Input-from-unstructured-files.html#GsfInput). +@param mime_type the mime type of the data. +@param io a GOffice IOContext. + +This function must be overloaded by a derived class able to read. Default +implementation just return false. +@return true on success, false otherwise. +*/ + virtual bool Read (Document *doc, GsfInput *in, char const *mime_type, IOContext *io); +/*! +@param doc the gcu::Document being written. +@param out a GsfOutput (see the libgsf documentation at +http://library.gnome.org/devel/gsf/stable/gsf-Output-to-unstructured-files.html#GsfOutput). +@param mime_type the mime type of the data. +@param io a GOffice IOContext. + +This function must be overloaded by a derived class able to write. Default +implementation just return false. +@return true on success, false otherwise. +*/ + virtual bool Write (Document *doc, GsfOutput *out, char const *mime_type, IOContext *io); + +protected: +/*! +@param mime_type a mime type. + +Registers a mime type and stores the instance calling it as the Loader for this mime type. +*/ + void AddMimeType (const char *mime_type); +/*! +@param mime_type a mime type. + +Unregisters a mime type. +*/ + void RemoveMimeType (const char *mime_type); + +private: + static bool Inited; + +protected: +/*! +The list of supported mime types. +*/ + std::list MimeTypes; +}; + +} + +#endif // GCU_LOADER_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/macros.h gnome-chemistry-utils-0.10.9/libs/gcu/macros.h --- gnome-chemistry-utils-0.8.6/libs/gcu/macros.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/macros.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,330 @@ +// -*- C++ -*- + +/* + * Gnome Chemisty Utils + * macros.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_MACROS_H +#define GCU_MACROS_H + +#ifdef HAVE_GO_CONF_SYNC +# include +#else +# include +#endif + +/*!\file */ +/*!\def GCU_PROP() +Defines a private member with appropriate get/set methods. +GCU_PROP((Type,Foo) expands to one private member: +\code + Type m_Foo; +\endcode + +and three public methods: +\code + void SetFoo(Type val); + Type GetFoo(); + Type& GetRefFoo(); +\endcode + +The last one allows code as: +\code + obj.GetRefFoo() = val; +\endcode +*/ +#define GCU_PROP(type,member) \ +public: \ + void Set##member (type val) {m_##member = val;} \ + type Get##member (void) const {return m_##member;} \ + type &GetRef##member (void) {return m_##member;} \ +private: \ + type m_##member; + +/*!\def GCU_POINTER_PROP() +Defines a private pointer member with appropriate get/set methods. +GCU_POINTER_PROP((Type,Foo) expands to one private member: +\code + Type *m_Foo; +\endcode + +and three public methods: +\code + void SetFoo(Type *val); + Type *GetFoo(); + Type const *GetFoo() const; +\endcode +*/ +#define GCU_POINTER_PROP(type,member) \ +public: \ + void Set##member (type *val) {m_##member = val;} \ + type *Get##member (void) {return m_##member;} \ + type const *Get##member (void) const {return m_##member;} \ +private: \ + type *m_##member; + +/*!\def GCU_RO_PROP() +Defines a private member with an appropriate get method. RO stands for Read Only. The member +can't be modified from outside the class it belongs too or a friend class. +GCU_RO_PROP(Type,Foo) expands to one private member: +\code + Type m_Foo; +\endcode + +and one public method: +\code + Type GetFoo(); +\endcode +*/ +#define GCU_RO_PROP(type,member) \ +public: \ + type Get##member (void) {return m_##member;} \ +private: \ + type m_##member; + +/*!\def GCU_RO_POINTER_PROP() +Defines a private pointer member an with appropriate get method. RO stands for Read Only. The member +can't be modified from outside the class it belongs too or a friend class. +GCU_RO_POINTER_PROP((Type,Foo) expands to one private member: +\code + Type *m_Foo; +\endcode + +and one public methods: +\code + Type const *GetFoo() const; +\endcode +*/ +#define GCU_RO_POINTER_PROP(type,member) \ +public: \ + type const *Get##member (void) const {return m_##member;} \ +private: \ + type *m_##member; + +/*!\def GCU_PROT_PROP() +Defines a protected member with an appropriate get method. The member can be modified +the class it belongs too or a friend class or a derived class. +GCU_PROT_PROP(Type,Foo) expands to one protected member: +\code + Type m_Foo; +\endcode + +and one public method: +\code + Type GetFoo(); +\endcode +*/ +#define GCU_PROT_PROP(type,member) \ +public: \ + type Get##member (void) {return m_##member;} \ +protected: \ + type m_##member; + +/*!\def GCU_PROT_POINTER_PROP() +Defines a private pointer member with an appropriate get method. The member can be modified +the class it belongs too or a friend class or a derived class. The data referenced +by the pointer can be modified if the class instance is not const. +GCU_PROT_POINTER_PROP((Type,Foo) expands to one private member: +\code + Type *m_Foo; +\endcode + +and two public methods: +\code + Type *GetFoo(); + Type const *GetFoo() const; +\endcode +*/ +#define GCU_PROT_POINTER_PROP(type,member) \ +public: \ + type *Get##member (void) {return m_##member;} \ + type const *Get##member (void) const {return m_##member;} \ +protected: \ + type *m_##member; + +/*!\def GCU_GCONF_GET() +This macro gets the numerical value of type \a type associated to \a key, and +copies it to \a target. If an error occurs or if the value is 0, +\a defaultval is used instead.\n +If the GOConf mechanism is available in goffice (>= 0.7.0), calling class must +have a GOConfNode called m_ConfNode or, for older GOffice versions, a GConfClient +member called m_ConfClient, and the code must provide a GError *error initially +set to NULL (GConf version only). +The real key is obtained by appending the value of ROOTDIR to \a key. +*/ +#ifdef HAVE_GO_CONF_SYNC +#define go_conf_get_float go_conf_get_double +#define GCU_GCONF_GET(key,type,target,defaultval) \ + target = go_conf_get_##type (m_ConfNode, key); \ + if (target == (type) 0) \ + target = defaultval; +#else +#define GCU_GCONF_GET(key,type,target,defaultval) \ + target = gconf_client_get_##type (m_ConfClient, ROOTDIR key, &error); \ + if (error) { \ + target = defaultval; \ + g_message ("GConf failed: %s", error->message); \ + g_error_free (error); \ + error = NULL; \ + } \ + if (target == (type) 0) \ + target = defaultval; +#endif +/*!\def GCU_GCONF_GET_NO_CHECK() +This macro gets the numerical value of type \a type associated to \a key, and +copies it to \a target. If an error occurs, \a defaultval is used instead.\n +If the GOConf mechanism is available in goffice (>= 0.7.0), calling class must +have a GOConfNode called m_ConfNode or, for older GOffice versions, a GConfClient +member called m_ConfClient, and the code must provide a GError *error initially +set to NULL (GConf version only). +The real key is obtained by appending the value of ROOTDIR to \a key. +*/ +#ifdef HAVE_GO_CONF_SYNC +#define GCU_GCONF_GET_NO_CHECK(key,type,target,defaultval) \ + target = go_conf_get_##type (m_ConfNode, key); +#else +#define GCU_GCONF_GET_NO_CHECK(key,type,target,defaultval) \ + target = gconf_client_get_##type (m_ConfClient, ROOTDIR key, &error); \ + if (error) { \ + target = defaultval; \ + g_message ("GConf failed: %s", error->message); \ + g_error_free (error); \ + error = NULL; \ + } +#endif + +/*!\def GCU_GCONF_GET_N_TRANSFORM() +This macro gets the numerical value of type \a type associated to \a key. If an error +occurs or if the value is 0, \a defaultval is used instead.\n +The resuting value (which might be the default value) is then passed +to \a func and the result is copied to \a target. \n +If the GOConf mechanism is available in goffice (>= 0.7.0), calling class must +have a GOConfNode called m_ConfNode or, for older GOffice versions, a GConfClient +member called m_ConfClient, and the code must provide a GError *error initially +set to NULL (GConf version only). +The real key is obtained by appending the value of ROOTDIR to \a key. +*/ +#ifdef HAVE_GO_CONF_SYNC +#define GCU_GCONF_GET_N_TRANSFORM(key,type,target,defaultval,func) \ + { \ + type val = go_conf_get_##type (m_ConfNode, key); \ + if (val == (type) 0) \ + val = defaultval; \ + target = func (val); \ + } +#else +#define GCU_GCONF_GET_N_TRANSFORM(key,type,target,defaultval,func) \ + { \ + type val = gconf_client_get_##type (m_ConfClient, ROOTDIR key, &error); \ + if (error) { \ + val = defaultval; \ + g_message ("GConf failed: %s", error->message); \ + g_error_free (error); \ + error = NULL; \ + } \ + if (val == (type) 0) \ + val = defaultval; \ + target = func (val); \ + } +#endif + +/*!\def GCU_GCONF_GET_STRING() +This macro gets the string value associated to \a key, and +copies it to \a target. If an error occurs, \a defaultval is used instead.\n +If \a target is not NULL when entering the macro, it is deallocated using g_free +and set to NULL before calling gconf_client_get_string.\n +Calling class must have a GConfClient member called m_ConfClient, and the code +must provide a GError *error initially set to NULL. +The real key is obtained by appending the value of ROOTDIR to \a key. +*/ +#ifdef HAVE_GO_CONF_SYNC +#define GCU_GCONF_GET_STRING(key,target,defaultval) \ + if (target) { \ + g_free (target); \ + target = NULL; \ + } \ + target = go_conf_get_string (m_ConfNode, key); \ + if (target == NULL && defaultval) \ + target = g_strdup (defaultval); +#else +#define GCU_GCONF_GET_STRING(key,target,defaultval) \ + if (target) { \ + g_free (target); \ + target = NULL; \ + } \ + target = gconf_client_get_string (m_ConfClient, ROOTDIR key, &error); \ + if (error) { \ + if (defaultval) \ + target = g_strdup (defaultval); \ + g_message ("GConf failed: %s", error->message); \ + g_error_free (error); \ + error = NULL; \ + } else if (target == NULL && defaultval) \ + target = g_strdup (defaultval); +#endif + +/*!\def GCU_UPDATE_KEY() +This macro updates a value of type \a type associated to \a key, and +copies it to \a target. \a action is called after setting the target? +It also needs either a GOConfNode* called node or a GConfEntry alled entry, depending +on the GOffice library version. +The real key is obtained by appending the value of ROOTDIR to \a key. +*/ +#ifdef HAVE_GO_CONF_SYNC +#define GCU_UPDATE_KEY(key,type,target,action) \ + if (!strcmp (name, ROOTDIR key)) { \ + target = go_conf_get_##type (node, ((node)? key: ROOTDIR key)); \ + action \ + return; \ + } +#else +#define GCU_UPDATE_KEY(key,type,target,action) \ + if (!strcmp (gconf_entry_get_key (entry), ROOTDIR key)) { \ + target = gconf_value_get_##type (gconf_entry_get_value (entry)); \ + action \ + return; \ + } +#endif + +/*!\def GCU_UPDATE_STRING_KEY() +This macro updates a string value associated to \a key, and +copies it to \a target. \a action is called after setting the target? +It also needs either a GOConfNode* called node or a GConfEntry alled entry, depending +on the GOffice library version. +The real key is obtained by appending the value of ROOTDIR to \a key. +*/ +#ifdef HAVE_GO_CONF_SYNC +#define GCU_UPDATE_STRING_KEY(key,target,action) \ + if (!strcmp (name, ROOTDIR key)) { \ + target = go_conf_get_string (node, ((node)? key: ROOTDIR key)); \ + action \ + return; \ + } +#else +#define GCU_UPDATE_STRING_KEY(key,target,action) \ + if (!strcmp (gconf_entry_get_key (entry), ROOTDIR key)) { \ + target = g_strdup (gconf_value_get_string (gconf_entry_get_value (entry))); \ + action \ + return; \ + } +#endif + +#endif // GCU_MACROS_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/Makefile.am gnome-chemistry-utils-0.10.9/libs/gcu/Makefile.am --- gnome-chemistry-utils-0.8.6/libs/gcu/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,129 @@ +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(glade_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(glade_CFLAGS) \ + $(GCU_CFLAGS) +endif +libgcu_@GCU_API_VER@_la_LDFLAGS = \ + -version-info @GCU_VERSION_INFO@ +libgcu_@GCU_API_VER@_la_LIBADD = \ + $(glade_LIBS) \ + $(goffice_LIBS) \ + $(openbabel_LIBS) \ + $(glade_LIBS) \ + $(gtkglext_LIBS) +DEFS += -DDATADIR=\"$(datadir)\" \ + -DLOCALEDIR=\"$(localedir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade\" \ + -DGCU_PLUGINS_DIR=\"$(libdir)/gchemutils/@GCU_API_VER@/plugins\" +lib_LTLIBRARIES= libgcu-@GCU_API_VER@.la + +libgcu_@GCU_API_VER@_la_SOURCES = \ + application.cc \ + atom.cc \ + bond.cc \ + chain.cc \ + chem3ddoc.cc \ + chemistry.cc \ + cmd-context.cc \ + crystalatom.cc \ + crystalbond.cc \ + crystalcleavage.cc \ + crystaldoc.cc \ + crystalline.cc \ + crystalview.cc \ + cycle.cc \ + cylinder.cc \ + dialog.cc \ + dialog-owner.cc \ + document.cc \ + element.cc \ + filechooser.cc \ + formula.cc \ + gldocument.cc \ + glview.cc \ + gtkchem3dviewer.cc \ + gtkcomboperiodic.c \ + gtkcrystalviewer.cc \ + gtkperiodic.c \ + gtkspectrumviewer.cc \ + isotope.cc \ + loader.cc \ + matrix.cc \ + matrix2d.cc \ + molecule.cc \ + object.cc \ + printable.cc \ + print-setup-dlg.cc \ + residue.cc \ + spectrumdoc.cc \ + spectrumview.cc \ + sphere.cc \ + value.cc \ + vector.cc \ + window.cc \ + xml-utils.cc + +noinst_HEADERS = \ + application.h \ + atom.h \ + bond.h \ + chain.h \ + chem3ddoc.h \ + chemistry.h \ + cmd-context.h \ + crystalatom.h \ + crystalbond.h \ + crystalcleavage.h \ + crystaldoc.h \ + crystalline.h \ + crystalview.h \ + cycle.h \ + cylinder.h \ + dialog.h \ + dialog-owner.h \ + document.h \ + element.h \ + filechooser.h \ + formula.h \ + gldocument.h \ + glview.h \ + goffice-compat.h \ + gtkchem3dviewer.h \ + gtkcomboperiodic.h \ + gtkcrystalviewer.h \ + gtkperiodic.h \ + gtkspectrumviewer.h \ + isotope.h \ + loader.h \ + macros.h \ + matrix.h \ + matrix2d.h \ + molecule.h \ + object.h \ + objprops.h \ + printable.h \ + print-setup-dlg.h \ + residue.h \ + spectrumdoc.h \ + spectrumview.h \ + sphere.h \ + value.h \ + vector.h \ + window.h \ + xml-utils.h diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/Makefile.in gnome-chemistry-utils-0.10.9/libs/gcu/Makefile.in --- gnome-chemistry-utils-0.8.6/libs/gcu/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -0,0 +1,824 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libs/gcu +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +libgcu_@GCU_API_VER@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +am_libgcu_@GCU_API_VER@_la_OBJECTS = application.lo atom.lo bond.lo \ + chain.lo chem3ddoc.lo chemistry.lo cmd-context.lo \ + crystalatom.lo crystalbond.lo crystalcleavage.lo crystaldoc.lo \ + crystalline.lo crystalview.lo cycle.lo cylinder.lo dialog.lo \ + dialog-owner.lo document.lo element.lo filechooser.lo \ + formula.lo gldocument.lo glview.lo gtkchem3dviewer.lo \ + gtkcomboperiodic.lo gtkcrystalviewer.lo gtkperiodic.lo \ + gtkspectrumviewer.lo isotope.lo loader.lo matrix.lo \ + matrix2d.lo molecule.lo object.lo printable.lo \ + print-setup-dlg.lo residue.lo spectrumdoc.lo spectrumview.lo \ + sphere.lo value.lo vector.lo window.lo xml-utils.lo +libgcu_@GCU_API_VER@_la_OBJECTS = \ + $(am_libgcu_@GCU_API_VER@_la_OBJECTS) +libgcu_@GCU_API_VER@_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libgcu_@GCU_API_VER@_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgcu_@GCU_API_VER@_la_SOURCES) +DIST_SOURCES = $(libgcu_@GCU_API_VER@_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DLOCALEDIR=\"$(localedir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade\" \ + -DGCU_PLUGINS_DIR=\"$(libdir)/gchemutils/@GCU_API_VER@/plugins\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(glade_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(glade_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +libgcu_@GCU_API_VER@_la_LDFLAGS = \ + -version-info @GCU_VERSION_INFO@ + +libgcu_@GCU_API_VER@_la_LIBADD = \ + $(glade_LIBS) \ + $(goffice_LIBS) \ + $(openbabel_LIBS) \ + $(glade_LIBS) \ + $(gtkglext_LIBS) + +lib_LTLIBRARIES = libgcu-@GCU_API_VER@.la +libgcu_@GCU_API_VER@_la_SOURCES = \ + application.cc \ + atom.cc \ + bond.cc \ + chain.cc \ + chem3ddoc.cc \ + chemistry.cc \ + cmd-context.cc \ + crystalatom.cc \ + crystalbond.cc \ + crystalcleavage.cc \ + crystaldoc.cc \ + crystalline.cc \ + crystalview.cc \ + cycle.cc \ + cylinder.cc \ + dialog.cc \ + dialog-owner.cc \ + document.cc \ + element.cc \ + filechooser.cc \ + formula.cc \ + gldocument.cc \ + glview.cc \ + gtkchem3dviewer.cc \ + gtkcomboperiodic.c \ + gtkcrystalviewer.cc \ + gtkperiodic.c \ + gtkspectrumviewer.cc \ + isotope.cc \ + loader.cc \ + matrix.cc \ + matrix2d.cc \ + molecule.cc \ + object.cc \ + printable.cc \ + print-setup-dlg.cc \ + residue.cc \ + spectrumdoc.cc \ + spectrumview.cc \ + sphere.cc \ + value.cc \ + vector.cc \ + window.cc \ + xml-utils.cc + +noinst_HEADERS = \ + application.h \ + atom.h \ + bond.h \ + chain.h \ + chem3ddoc.h \ + chemistry.h \ + cmd-context.h \ + crystalatom.h \ + crystalbond.h \ + crystalcleavage.h \ + crystaldoc.h \ + crystalline.h \ + crystalview.h \ + cycle.h \ + cylinder.h \ + dialog.h \ + dialog-owner.h \ + document.h \ + element.h \ + filechooser.h \ + formula.h \ + gldocument.h \ + glview.h \ + goffice-compat.h \ + gtkchem3dviewer.h \ + gtkcomboperiodic.h \ + gtkcrystalviewer.h \ + gtkperiodic.h \ + gtkspectrumviewer.h \ + isotope.h \ + loader.h \ + macros.h \ + matrix.h \ + matrix2d.h \ + molecule.h \ + object.h \ + objprops.h \ + printable.h \ + print-setup-dlg.h \ + residue.h \ + spectrumdoc.h \ + spectrumview.h \ + sphere.h \ + value.h \ + vector.h \ + window.h \ + xml-utils.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libs/gcu/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu libs/gcu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgcu-@GCU_API_VER@.la: $(libgcu_@GCU_API_VER@_la_OBJECTS) $(libgcu_@GCU_API_VER@_la_DEPENDENCIES) + $(libgcu_@GCU_API_VER@_la_LINK) -rpath $(libdir) $(libgcu_@GCU_API_VER@_la_OBJECTS) $(libgcu_@GCU_API_VER@_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bond.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chem3ddoc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chemistry.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd-context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalatom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalbond.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalcleavage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystaldoc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crystalview.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cycle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cylinder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog-owner.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filechooser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gldocument.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glview.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkchem3dviewer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcomboperiodic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcrystalviewer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkperiodic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkspectrumviewer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isotope.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/molecule.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-setup-dlg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printable.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/residue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spectrumdoc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spectrumview.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sphere.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-utils.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/matrix2d.cc gnome-chemistry-utils-0.10.9/libs/gcu/matrix2d.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/matrix2d.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/matrix2d.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,83 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * matrix2d.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "matrix2d.h" +#include + +namespace gcu +{ + +Matrix2D::Matrix2D() +{ +} + +Matrix2D::~Matrix2D() +{ +} + +Matrix2D::Matrix2D(double Angle, bool Deg) +{ + if (Deg) Angle *= (M_PI / 180.); + x[0][0] = x[1][1] = cos(Angle); + x[0][1] = sin(Angle); + x[1][0] = - x[0][1]; +} + +Matrix2D::Matrix2D(double x11, double x12, double x21, double x22) +{ + x[0][0] = x11; + x[0][1] = x12; + x[1][0] = x21; + x[1][1] = x22; +} + +Matrix2D& Matrix2D::operator*(Matrix2D& cMat) +{ + static Matrix2D cMat0; + Matrix2D m( + x[0][0] * cMat.x[0][0] + x[0][1] * cMat.x[1][0], + x[0][0] * cMat.x[0][1] + x[0][1] * cMat.x[1][1], + x[1][0] * cMat.x[0][0] + x[1][1] * cMat.x[1][0], + x[1][0] * cMat.x[0][1] + x[1][1] * cMat.x[1][1] + ); + return cMat0 = m; +} + +Matrix2D& Matrix2D::operator=(Matrix2D& cMat) +{ + x[0][0] = cMat.x[0][0]; + x[0][1] = cMat.x[0][1]; + x[1][0] = cMat.x[1][0]; + x[1][1] = cMat.x[1][1]; + return *this; +} + +void Matrix2D::Transform(double &dx, double &dy) +{ + double x1 = dx * x[0][0] + dy * x[0][1]; + dy = dx * x[1][0] + dy * x[1][1]; + dx = x1; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/matrix2d.h gnome-chemistry-utils-0.10.9/libs/gcu/matrix2d.h --- gnome-chemistry-utils-0.8.6/libs/gcu/matrix2d.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/matrix2d.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,91 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * matrix2d.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_MATRIX2D_H +#define GCU_MATRIX2D_H +/*!\file*/ + +namespace gcu +{ + +/*!\class Matrix2D gcu/matrix2d.h +This class provides some operations related to transformations in a plane. The matrices are 2x2. +*/ +class Matrix2D +{ +public: + +/*! +Default constructor. Members are not initialized. This constructor is rarely used. +*/ + Matrix2D(); +/*! +The destructor of Matrix. +*/ + virtual ~Matrix2D(); +/*! +@param Angle: rotation angle. +@param Deg: if true, Angle is expressed in degrees, otherwise in radians. +Default is true. + +Constructs a Matrix2D representing a rotation. +*/ + Matrix2D(double Angle, bool Deg = true); +/*! +@param x11: value to use at first line and first column of the matrix. +@param x12: value to use at first line and second column of the matrix. +@param x21: value to use at second line and first column of the matrix. +@param x22: value to use at second line and second column of the matrix. + +Constructs a matrix from its components. +*/ + Matrix2D(double x11, double x12, double x21, double x22); +/*! +@param cMat: a Matrix2D instance to use in the multiplication. + +The matricial multiplication operator. +*/ + Matrix2D& operator*(Matrix2D& cMat); +/*! +@param cMat: the Matrix2D instance to copy. + +Copies a Matrix instance into another one. +*/ + Matrix2D& operator=(Matrix2D& cMat); +/*! +@param dx: the x coordinate. +@param dy: the y coordinate. + +Initially, dx and dy are the components of the vector to transform (multiply) by the matrix and +after execution of this method, dx, dy and dz are the components of the transformed vector. So initial values are lost. +*/ + void Transform(double &dx, double &dy); + +private : + double x[2][2]; +}; + +} //namespace gcu + +#endif //GCRYSTAL_MATRIX2D_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/matrix.cc gnome-chemistry-utils-0.10.9/libs/gcu/matrix.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/matrix.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/matrix.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,181 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/matrix.cc + * + * Copyright (C) 2000-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "matrix.h" +#include + +using namespace OpenBabel; + +namespace gcu +{ + +Matrix::Matrix() +{ +} + +Matrix::~Matrix() +{ +} + +Matrix::Matrix(double Psi, double Theta, double Phi, MatrixType Type) +{ + double sp = sin(Psi); + double cp = cos(Psi); + double st = sin(Theta); + double ct = cos(Theta); + double sf = sin(Phi); + double cf = cos(Phi); + switch(Type) + { + case euler : + x[0][0] = cf * cp - sf * sp * ct; + x[0][1] = - cp * sf - sp * cf * ct; + x[0][2] = st * sp; + x[1][0] = sp * cf + cp * sf * ct; + x[1][1] = cf * cp * ct - sf * sp; + x[1][2] = - st * cp; + x[2][0] = st * sf; + x[2][1] = st * cf; + x[2][2] = ct; + break; + case antieuler : + x[0][0] = cf * cp - sf * sp * ct; + x[0][1] = cf * sp + cp * sf * ct; + x[0][2] = st * sf; + x[1][0] = - sf * cp - cf * sp * ct; + x[1][1] = cf * cp * ct - sf * sp; + x[1][2] = st * cf; + x[2][0] = st * sp; + x[2][1] = - st * cp; + x[2][2] = ct; + break; + case rotation : + Matrix m1(Psi,Theta,Phi,euler); + Matrix m2(Psi,Theta,0,antieuler); + *this = m1 * m2; + break; + } +} + +Matrix::Matrix(double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33) +{ + x[0][0] = x11; + x[0][1] = x12; + x[0][2] = x13; + x[1][0] = x21; + x[1][1] = x22; + x[1][2] = x23; + x[2][0] = x31; + x[2][1] = x32; + x[2][2] = x33; +} + +Matrix& Matrix::operator* (Matrix const &cMat) const +{ + static Matrix cMat0; + Matrix m( + x[0][0] * cMat.x[0][0] + x[0][1] * cMat.x[1][0] + x[0][2] * cMat.x[2][0], + x[0][0] * cMat.x[0][1] + x[0][1] * cMat.x[1][1] + x[0][2] * cMat.x[2][1], + x[0][0] * cMat.x[0][2] + x[0][1] * cMat.x[1][2] + x[0][2] * cMat.x[2][2], + x[1][0] * cMat.x[0][0] + x[1][1] * cMat.x[1][0] + x[1][2] * cMat.x[2][0], + x[1][0] * cMat.x[0][1] + x[1][1] * cMat.x[1][1] + x[1][2] * cMat.x[2][1], + x[1][0] * cMat.x[0][2] + x[1][1] * cMat.x[1][2] + x[1][2] * cMat.x[2][2], + x[2][0] * cMat.x[0][0] + x[2][1] * cMat.x[1][0] + x[2][2] * cMat.x[2][0], + x[2][0] * cMat.x[0][1] + x[2][1] * cMat.x[1][1] + x[2][2] * cMat.x[2][1], + x[2][0] * cMat.x[0][2] + x[2][1] * cMat.x[1][2] + x[2][2] * cMat.x[2][2] + ); + return cMat0 = m; +} + +Matrix& Matrix::operator= (Matrix const &cMat) +{ + x[0][0] = cMat.x[0][0]; + x[0][1] = cMat.x[0][1]; + x[0][2] = cMat.x[0][2]; + x[1][0] = cMat.x[1][0]; + x[1][1] = cMat.x[1][1]; + x[1][2] = cMat.x[1][2]; + x[2][0] = cMat.x[2][0]; + x[2][1] = cMat.x[2][1]; + x[2][2] = cMat.x[2][2]; + return *this; +} + +void Matrix::Euler(double& Psi, double& Theta, double& Phi) +{ + if (fabs(x[2][2]) > .999999999) + { + Theta = (x[2][2] > 0) ? 0 : 3.1415926535897931; + Psi = 0; + if (fabs(x[0][0]) > .999999999) + Phi = (x[0][0] > 0) ? 0 : 3.1415926535897931; + else Phi = (x[1][0] > 0) ? acos(x[0][0]) : - acos(x[0][0]); + } + else + { + Theta = acos(x[2][2]); + double st = sin(Theta); + double si = x[0][2] / st; + double co = - x[1][2] / st; + if (fabs(co) > .999999999) + Psi = (co > 0) ? 0 : 3.1415926535897931; + else + Psi = (si > 0) ? acos(co) : - acos(co); + si = x[2][0] / st; + co = x[2][1] / st; + if (fabs(co) > .999999999) + Phi = (co > 0) ? 0 : 3.1415926535897931; + else + Phi = (si > 0) ? acos(co) : - acos(co); + } +} + +void Matrix::Transform (double &dx, double &dy , double &dz) const +{ + double x1 = dx * x[0][0] + dy * x[0][1] + dz * x[0][2]; + double y1 = dx * x[1][0] + dy * x[1][1] + dz * x[1][2]; + dz = dx * x[2][0] + dy * x[2][1] + dz * x[2][2]; + dx = x1; + dy = y1; +} + +vector3 Matrix::operator* (vector3 const &v) const +{ + vector3 r; + r.z () = v.z () * x[0][0] + v.x () * x[0][1] + v.y () * x[0][2]; + r.x () = v.z () * x[1][0] + v.x () * x[1][1] + v.y () * x[1][2]; + r.y () = v.z () * x[2][0] + v.x () * x[2][1] + v.y () * x[2][2]; + return r; +} + +// Implementation of GLMatrix +GLMatrix::GLMatrix () +{ +} + +GLMatrix::~GLMatrix () +{ +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/matrix.h gnome-chemistry-utils-0.10.9/libs/gcu/matrix.h --- gnome-chemistry-utils-0.8.6/libs/gcu/matrix.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/matrix.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,161 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * matrix.h + * + * Copyright (C) 2000-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_MATRIX_H +#define GCU_MATRIX_H + +#include + +/*!\file*/ +namespace gcu +{ + +/*!\enum MatrixType +This enumeration is used to determine the type a Matrix. +Possible values are: + - euler: matrix used to find absolute positions from the position inside the solid using Euler's angles. + - antieuler: the inverse of euler. + - rotation: matrix representing the rotation to apply to the solid. + . +This enumeration is used in one of the constructors (Matrix(Psi, Theta, Phi, Type)) of class Matrix. +*/ + +enum MatrixType {euler, antieuler, rotation}; + +/*!\class Matrix gcu/matrix.h +This class provides some operations related to rotation of a solid in space. The matrices are 3x3. +*/ +class Matrix +{ +public: + +/*! +Default constructor. Members are not initialized. This constructor is rarely used. +*/ + Matrix (); +/*! +The destructor of Matrix. +*/ + virtual ~Matrix (); +/*! +@param Psi: precession angle. +@param Theta: nutaton angle. +@param Phi: rotation angle. +@param Type: the type of the Matrix. + +Constructs a Matrix instance starting from three angles and the type. if Type is euler or antieuler, the angles are the +Euler's angles. If Type is rotation, the values have a somewhat different meaning: they are the angles describing +the rotation applied to a solid; the resulting matrix is then multiplied by the current "euler" matrix to give the new euler +matrix. +The code used in CrystalView::Rotate and in GtkChem3DViewer code is (when mouse has moved by x and y on the screen): +\code + gdouble z = sqrt(x*x + y*y); + Matrix Mat(0, (y > 0)? - acos(x/z) :acos(x/z), z * M_PI / 90., rotation); + m_Euler = Mat * m_Euler; +\endcode +The (M_PI / 90.) factor is arbitrary here. +*/ + Matrix (double Psi, double Theta, double Phi, MatrixType Type); +/*! +@param x11: value to use at first line and first column of the matrix. +@param x12: value to use at first line and second column of the matrix. +@param x13: value to use at first line and third column of the matrix. +@param x21: value to use at second line and first column of the matrix. +@param x22: value to use at second line and second column of the matrix. +@param x23: value to use at second line and third column of the matrix. +@param x31: value to use at third line and first column of the matrix. +@param x32: value to use at third line and second column of the matrix. +@param x33: value to use at third line and third column of the matrix. + +Constructs a matrix from its components. +*/ + Matrix (double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33); +/*! +@param cMat: a Matrix instance to use in the multiplication. + +The matricial multiplication operator. +*/ + Matrix& operator* (Matrix const &cMat) const; +/*! +@param cMat: the Matrix instance to copy. + +Copies a Matrix instance into another one. +*/ + Matrix& operator= (Matrix const &cMat); +/*! +@param Psi: precession angle. +@param Theta: nutaton angle. +@param Phi: rotation angle. + +Get the Euler's angles associated to a "euler" Matrix as defined in MatrixType. +*/ + void Euler (double& Psi, double& Theta, double& Phi); +/*! +@param dx: the x coordinate. +@param dy: the y coordinate. +@param dz: the z coordinate. + +Initially, dx, dy and dz are the components of the vector to transform (multiply) by the matrix and +after execution of this method, dx, dy and dz are the components of the transformed vector. So initial values are lost. +*/ + void Transform (double &dx, double &dy , double &dz) const; + OpenBabel::vector3 operator* (OpenBabel::vector3 const &v) const; + +private: + double x[3][3]; +}; + +/*!\class GLMatrix gcu/matrix.h +A 4x4 matrix class used by gcu::Cylinder. +*/ +class GLMatrix +{ +public: +/*! +Default constructor. Members are not initialized. This constructor is rarely used. +*/ + GLMatrix (); +/*! +The destructor of GLMatrix. +*/ + virtual ~GLMatrix (); + +/*! +@param i the row +@param j the column +@return returns the value for row \a i and column \a j. +*/ + double &operator() (int i, int j) {return x[i][j];} +/*! +@return a pointer to the array of values. +*/ + double *array () {return (double*) x;} + +private: + double x[4][4]; +}; + +} //namespace gcu + +#endif //GCRYSTAL_MATRIX_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/molecule.cc gnome-chemistry-utils-0.10.9/libs/gcu/molecule.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/molecule.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/molecule.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,338 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * molecule.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "molecule.h" +#include "atom.h" +#include "bond.h" +#include "chain.h" +#include "cycle.h" +#include "document.h" +#include "formula.h" +#include "residue.h" +#include + +using namespace std; + +namespace gcu +{ + +Molecule::Molecule (TypeId Type): Object (Type) +{ +} + +Molecule::Molecule (Atom* pAtom): Object (MoleculeType) +{ + SetParent (pAtom->GetDocument ()); + AddAtom (pAtom); + Chain* pChain = new Chain (this, pAtom); //will find the cycles + delete pChain; +} + +Molecule::~Molecule () +{ + std::list::iterator n, end = m_Bonds.end (); + for (n = m_Bonds.begin (); n != end; n++) + (*n)->RemoveAllCycles (); + while (!m_Cycles.empty ()) { + delete m_Cycles.front (); + m_Cycles.pop_front (); + } + while (!m_Chains.empty ()) { + delete m_Chains.front (); + m_Chains.pop_front (); + } +} + +void Molecule::AddChild (Object* object) +{ + switch (object->GetType ()) { + case AtomType: { + Atom *atom = reinterpret_cast (object); + AddAtom (atom); + break; + } + case gcu::BondType: { + Bond *bond = reinterpret_cast (object); + m_Bonds.remove (bond); + AddBond (bond); + break; + } + } +} + +void Molecule::AddAtom (Atom* pAtom) +{ + m_Atoms.remove (pAtom); // avoid duplicates + m_Atoms.push_back (pAtom); + Object::AddChild (pAtom); +} + +void Molecule::AddBond (Bond* pBond) +{ + m_Bonds.remove (pBond); // avoid duplicates + m_Bonds.push_back (pBond); + Object::AddChild (pBond); +} + +void Molecule::Remove (gcu::Object* pObject) +{ + switch (pObject->GetType ()) { + case AtomType: + m_Atoms.remove ((Atom*) pObject); + break; + case gcu::BondType: + m_Bonds.remove ((Bond*) pObject); + break; + } + pObject->SetParent (GetParent ()); +} + + +void Molecule::UpdateCycles (Bond* pBond) //FIXME: function not totally implemented +{ + Chain* pChain = new Chain (this, pBond); //will find the cycles + delete pChain; +} + +void Molecule::UpdateCycles () +{ + Lock (true); + std::list::iterator n, end = m_Bonds.end (); + for (n = m_Bonds.begin (); n != end; n++) + (*n)->RemoveAllCycles (); + while (!m_Cycles.empty()) { + delete m_Cycles.front (); + m_Cycles.pop_front (); + } + if (!m_Atoms.empty()) { + std::list::iterator i = m_Atoms.begin (), end = m_Atoms.end (); + i++; + for (; i != end; i++) + (*i)->SetParent(NULL); + Chain* pChain = new Chain (this, *(m_Atoms.begin ())); //will find the cycles + delete pChain; + end = m_Atoms.end (); + list orphans; + for (i = m_Atoms.begin (); i != end; i++) + if ((*i)->GetParent () == NULL) + orphans.push_back (*i); + end = orphans.end (); + for (i = orphans.begin (); i != end; i++) + (*i)->SetParent (this); + } + Lock (false); +} + +bool Molecule::operator== (Molecule const& molecule) const +{ + // first examine each atom of each molecule and sort by Z. + map > atoms1, atoms2; + list::const_iterator ia, enda = m_Atoms.end (); + for (ia = m_Atoms.begin (); ia != enda; ia++) + atoms1[(*ia)->GetZ ()].insert (*ia); + enda = molecule.m_Atoms.end (); + for (ia = molecule.m_Atoms.begin (); ia != enda; ia++){ + atoms2[(*ia)->GetZ ()].insert (*ia); + } + if (atoms1.size () != atoms2.size ()) + return false; + map >::iterator ib, endb = atoms1.end (), ic, endc = atoms2.end (); + unsigned n = m_Atoms.size (), m; + int z = 200; + for (ib = atoms1.begin (); ib != endb; ib++) { + if ((ic = atoms2.find ((*ib).first)) == endc) + return false; + if ((m = (*ib).second.size ()) != (*ib).second.size ()) + return false; + if (m < n) + n = m; + if (m == n && (*ib).first < z) + z = (*ib).first; + } + AtomMatchState state; + state.atoms.reserve (GetAtomsNumber ()); + if (z == 200) { + return false; // should do something more meaningful the molecule contains no normal atoms, only groups, probably + } + Atom *atom = *atoms1[z].begin (); // take the firts atom, and try to match it with the other molecule atoms of same Z. + set &starters = atoms2[z]; + set::iterator j, jend = starters.end (); + for (j = starters.begin (); j != jend; j++) + if (atom->Match (*j, state)) + return true; + return false; +} + +Molecule *Molecule::MoleculeFromFormula (Document *Doc, Formula const &formula, bool add_pseudo) +{ + Molecule *mol = reinterpret_cast (Object::CreateObject ("molecule", Doc)); + if (!mol) + return NULL; + stack atoms; + Atom *atom = NULL; + list const &elts = formula.GetElements (); + list::const_reverse_iterator i, iend = elts.rend (); + FormulaAtom *fatom; + FormulaResidue *fresidue; + int valence, in; + unsigned PendingHs = 0; + stack PendingAtoms; + Bond *bond; + bool done = false; + for (i = elts.rbegin (); i != iend; i++) { + if (done) { + g_warning ("Can't interpret formula"); + // destroy the molecule + mol->SetParent (NULL); + delete mol; + return NULL; + } + if ((fatom = dynamic_cast (*i))) { + valence = fatom->GetValence (); + if (valence == 1) { + if (fatom->elt == 1) + PendingHs += fatom->stoich; + else for (in = 0; in < fatom->stoich; in++) { + atom = reinterpret_cast (CreateObject ("atom", mol)); + atom->SetZ (fatom->elt); + PendingAtoms.push (atom); + } + } else { + int n = valence - PendingHs - PendingAtoms.size (); + if (n == 1) { + atom = reinterpret_cast (CreateObject ("atom", mol)); + atom->SetZ (fatom->elt); + while (!PendingAtoms.empty ()) { + // FIXME: we do not support multiple bonds !!! + bond = reinterpret_cast (CreateObject ("bond", mol)); + bond->SetOrder (1); + bond->ReplaceAtom (NULL, atom); + bond->ReplaceAtom (NULL, PendingAtoms.top ()); + PendingAtoms.top ()->AddBond (bond); + PendingAtoms.pop (); + } + PendingAtoms.push (atom); + PendingHs = 0; + } else if (n == 0) { + atom = reinterpret_cast (CreateObject ("atom", mol)); + atom->SetZ (fatom->elt); + while (!PendingAtoms.empty ()) { + // FIXME: we do not support multiple bonds !!! + bond = reinterpret_cast (CreateObject ("bond", mol)); + bond->SetOrder (1); + bond->ReplaceAtom (NULL, atom); + bond->ReplaceAtom (NULL, PendingAtoms.top ()); + PendingAtoms.top ()->AddBond (bond); + PendingAtoms.pop (); + } + done = true; + } else + ; + } + } else if ((fresidue = dynamic_cast (*i))) { + // get the residue molecule and duplicate it + map Corr; + Residue const *residue = Doc->GetResidue (fresidue->Symbol.c_str ()); + Molecule const *orig = residue->GetMolecule (); + Atom *pseudo = NULL; + std::list::const_iterator ai, aiend = orig->m_Atoms.end (); + for (in = 0; in < fresidue->stoich; in++) { + for (ai = orig->m_Atoms.begin (); ai != aiend; ai++) { + if ((*ai)->GetZ () == 0) + pseudo = atom = reinterpret_cast (CreateObject ("pseudo-atom", mol)); + else { + atom = reinterpret_cast (CreateObject ("atom", mol)); + *atom = *(*ai); + } + atom->SetId ("a1"); + Corr[*ai] = atom; + atom->SetId ("a1"); + } + std::list::const_iterator bi, biend = orig->m_Bonds.end (); + for (bi = orig->m_Bonds.begin (); bi != biend; bi++) { + // stereochemistry is lost for now + bond = reinterpret_cast (CreateObject ("bond", mol)); + bond->SetId ("b1"); + bond->SetOrder ((*bi)->GetOrder ()); + bond->ReplaceAtom (NULL, Corr[(*bi)->GetAtom (0)]); + bond->ReplaceAtom (NULL, Corr[(*bi)->GetAtom (1)]); + Corr[(*bi)->GetAtom (1)]->AddBond (bond); + } + // remove the pseudo-atom + // FIXME: we drop the orientation of the bond and the positionof the pseudo-atom + // which will make 2D autogeneration problematic + map::iterator ci; + + bond = pseudo->GetFirstBond (ci); + atom = bond->GetAtom (pseudo); + if (atom) { + PendingAtoms.push (atom); + atom->RemoveBond (bond); + } + mol->Remove (bond); + delete bond; + mol->Remove (pseudo); + delete pseudo; + } + } else { + // FIXME: need to support blocks as well + mol->SetParent (NULL); // ensure children wil be destroyed + delete mol; + return NULL; + } + } + if (add_pseudo) { + if (PendingHs + PendingAtoms.size () != 1) { + mol->SetParent (NULL); // ensure children wil be destroyed + delete mol; + return NULL; + } + atom = reinterpret_cast (Object::CreateObject ("pseudo-atom", mol)); + bond = reinterpret_cast (CreateObject ("bond", mol)); + bond->SetOrder (1); + bond->ReplaceAtom (NULL, atom); + if (PendingAtoms.size () > 0) + atom = PendingAtoms.top (); + else { + atom = reinterpret_cast (Object::CreateObject ("atom", mol)); + atom->SetZ (1); + } + bond->ReplaceAtom (NULL, atom); + atom->AddBond (bond); + PendingAtoms.pop (); + } else if (PendingHs + PendingAtoms.size () == 2) { + bond = reinterpret_cast (CreateObject ("bond", mol)); + bond->ReplaceAtom (NULL, PendingAtoms.top ()); + PendingAtoms.pop (); + bond->ReplaceAtom (NULL, PendingAtoms.top ()); + } else if (PendingHs + PendingAtoms.size () != 0) { + mol->SetParent (NULL); // ensure children wil be destroyed + delete mol; + return NULL; + } + return mol; +} + +} //namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/molecule.h gnome-chemistry-utils-0.10.9/libs/gcu/molecule.h --- gnome-chemistry-utils-0.8.6/libs/gcu/molecule.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/molecule.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,141 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * libs/gcu/molecule.h + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_MOLECULE_H +#define GCU_MOLECULE_H + +#include "object.h" + +/*!\file*/ +namespace gcu { + +class Atom; +class Bond; +class Chain; +class Cycle; +class Formula; + +/*!\class Molecule gcu/molecule.h +Represents molecules. +*/ +class Molecule: public Object +{ +public: +/*! +@param Type the type id of a derived class + +The constructor. The type id may be changed in derived classes, otherwise the +argument is not needed, since the default value is enough. +*/ + Molecule (TypeId Type = MoleculeType); +/*! +@param pAtom + +Builds a molecule from an atom. If the atom has bonds, the connectivity will +be explored and all atoms and bonds found will be added to the molecule. +*/ + Molecule (Atom* pAtom); +/*! +The destructor. +*/ + virtual ~Molecule (); + +/*! +@param object an object, generally an atom or a bond. + +Adds an object (which might be an atom or a bond) to the molecule. +*/ + void AddChild (Object* object); +/*! +@param pAtom an atom. + +Adds an atom to the molecule. +*/ + virtual void AddAtom (Atom* pAtom); +/*! +@param pBond a bond. + +Adds a bond to the molecule. +*/ + virtual void AddBond (Bond* pBond); +/*! +@param pObject an atom or a bond in the molecule. + +Removes an atom or a bond from a molecule. +*/ + virtual void Remove (gcu::Object* pObject); +/*! +@param pBond a bond in the molecule. + +Updates the cycles list after a change, starting the exploration from \a pBond. +*/ + void UpdateCycles (Bond* pBond); +/*! +Updates the cycles list after a change. +*/ + void UpdateCycles (); +/*! +@param molecule a molecule. +@return true if the molecules have identical atoms and the connection +framework between the atoms. +*/ + bool operator== (Molecule const& molecule) const; +/*! +@return the number of atoms in the molecule. +*/ + virtual unsigned GetAtomsNumber () const {return m_Atoms.size ();} +/*! +@param Doc a document. +@param formula a formula +@param add_pseudo tells if a pseudo atom (with Z = 0) has to be added (used when +building a gcu::Residue instance). + +Tries to build a molecule from a formula, adding bonds between atoms. Atoms +coordinates are not calculated. +@return a molecule on success or NULL. +*/ + static Molecule *MoleculeFromFormula (Document *Doc, Formula const &formula, bool add_pseudo = true); + +protected: +/*! +The cycles contained in the molecules. +*/ + std::list m_Cycles; +/*! +The non cyclic chains contained in the molecules (not used at the moment). +*/ + std::list m_Chains; +/*! +The atoms in the molecule. +*/ + std::list m_Atoms; +/*! +The bonds in the molecule. +*/ + std::list m_Bonds; +}; + +} // namespace gcu + +#endif // GCU_MOLECULE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/object.cc gnome-chemistry-utils-0.10.9/libs/gcu/object.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/object.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/object.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,659 @@ +/* + * Gnome Chemistry Utils + * object.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "object.h" +#include "objprops.h" +#include "document.h" +#include +#include +#include +#include + +using namespace std; + +namespace gcu +{ + +class TypeDesc +{ +public: + TypeDesc (); + + TypeId Id; + Object* (*Create) (); + set PossibleChildren; + set PossibleParents; + set RequiredChildren; + set RequiredParents; + string CreationLabel; + list MenuCbs; +}; + +static map Types; +static vector TypeNames; + +Object::Object (TypeId Id): + m_Dirty (false) +{ + m_Type = Id; + m_Id = NULL; + m_Parent = NULL; + m_Locked = 0; +} + +Object::~Object () +{ + if (m_Id) { + if (m_Parent) { + GetDocument ()->m_DirtyObjects.erase (this); + m_Parent->m_Children.erase (m_Id); + } + g_free (m_Id); + } + map::iterator i; + while (!m_Children.empty ()) { + i = m_Children.begin (); + if (m_Parent) + m_Parent->AddChild ((*i).second); + else { + (*i).second->m_Parent = NULL; + delete (*i).second; + m_Children.erase ((*i).first); + } + } +} + + +void Object::SetId (gchar const *Id) +{ + if (!Id) + return; + if (m_Id) { + if (!strcmp (Id, m_Id)) + return; + if (m_Parent) + m_Parent->m_Children.erase (m_Id); + g_free(m_Id); + } + m_Id = g_strdup (Id); + if (m_Parent) { + Object *parent = m_Parent; + m_Parent = NULL; + parent->AddChild (this); + } +} + +Object* Object::GetMolecule () const +{ + Object const *object = this; + while (object && (object->m_Type != MoleculeType)) + object = object->m_Parent; + return const_cast (object); +} + +Object* Object::GetReaction () const +{ + Object const *object = this; + while (object && (object->m_Type != ReactionType)) + object = object->m_Parent; + return const_cast (object); +} + +Object* Object::GetGroup () const +{ + if (!m_Parent || m_Parent->GetType () == DocumentType) + return NULL; + Object const *object = this; + while (object->m_Parent->GetType () != DocumentType) + object = object->m_Parent; + return const_cast (object); +} + +Document* Object::GetDocument () const +{ + Object const *object = this; + while (object && (object->m_Type != DocumentType)) + object = object->m_Parent; + return const_cast (reinterpret_cast (object)); +} + +Object* Object::GetParentOfType (TypeId Id) const +{ + Object const *object = this; + while (object && (object->m_Type != Id)) + object = object->m_Parent; + return const_cast (object); +} + +void Object::AddChild (Object* object) +{ + if (this == object->m_Parent) + return; + Document* pDoc = GetDocument (); + if (!pDoc) + cerr << "Cannot add an object outside a document" << endl; + if (object->m_Id == NULL) { + int i = 1; + char szId[16]; + while (snprintf (szId, sizeof(szId), "o%d", i++), pDoc->GetDescendant (szId) != NULL); + object->m_Id = g_strdup (szId); + } else { + Object* o = pDoc->RealGetDescendant (object->m_Id); + if (o && ((pDoc != object->GetDocument()) || (object != o))) { + gchar *buf = pDoc->GetNewId (object->m_Id); + if (object->m_Parent) { + object->m_Parent->m_Children.erase (object->m_Id); + object->m_Parent = NULL; + } + g_free (object->m_Id); + object->m_Id = g_strdup (buf); + delete [] buf; + } + } + if (object->m_Parent) { + object->m_Parent->m_Children.erase (object->m_Id); + object->m_Parent = NULL; + } + object->m_Parent = this; + m_Children[object->m_Id] = object; +} + +void Object::SetParent (Object* Parent) +{ + if (Parent) + Parent->AddChild(this); + else { + if (m_Parent) + m_Parent->m_Children.erase (m_Id); + m_Parent = NULL; + } +} + +Object* Object::GetChild (const gchar* Id) const +{ + if (Id == NULL) + return NULL; + map::const_iterator i; + i = m_Children.find (Id); + return (i != m_Children.end ())? (*i).second: NULL; +} + +Object* Object::GetDescendant (const gchar* Id) const +{ + if (Id == NULL) + return NULL; + Document* pDoc = GetDocument(); + string sId = pDoc->GetTranslatedId (Id); + if (sId.size ()) + Id = sId.c_str (); + else + pDoc->EraseTranslationId (Id); + return RealGetDescendant (Id); +} + +Object* Object::RealGetDescendant (const gchar* Id) const +{ + map::const_iterator i; + Object *object = NULL; + i = m_Children.find (Id); + if (i == m_Children.end ()) { + map::const_iterator i, end = m_Children.end (); + for (i = m_Children.begin (); i != end; i++) + if ((*i).second->HasChildren () && (object = (*i).second->RealGetDescendant (Id))) + break; + } else + object = (*i).second; + return object; +} + +Object *Object::GetFirstChild (map::iterator& i) +{ + i = m_Children.begin (); + if (i == m_Children.end ()) + return NULL; + return (*i).second; +} + +Object const *Object::GetFirstChild (map::const_iterator& i) const +{ + i = m_Children.begin (); + if (i == m_Children.end ()) + return NULL; + return (*i).second; +} + +Object *Object::GetNextChild (map::iterator& i) +{ + i++; + if (i == m_Children.end ()) + return NULL; + return (*i).second; +} + +Object const *Object::GetNextChild (map::const_iterator& i) const +{ + i++; + if (i == m_Children.end ()) + return NULL; + return (*i).second; +} + +xmlNodePtr Object::Save (xmlDocPtr xml) const +{ + xmlNodePtr node; + node = xmlNewDocNode (xml, NULL, (xmlChar*) GetTypeName (m_Type).c_str (), NULL); + if (!node) + return NULL; + SaveId (node); + + if (!SaveChildren (xml, node)) { + xmlFreeNode (node); + return NULL; + } + return node; +} + +void Object::SaveId (xmlNodePtr node) const +{ + if (m_Id && *m_Id) + xmlNewProp (node, (xmlChar*) "id", (xmlChar*) m_Id); +} + +bool Object::Load (xmlNodePtr node) +{ + xmlChar* tmp; + xmlNodePtr child; + Object* pObject; + + m_Locked++; + tmp = xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId ((char*) tmp); + xmlFree (tmp); + } + child = node->children; + while (child) { + if (!strcmp ((const char*) child->name, "text") && !child->children) { + child = child->next; + continue; + } + node = (strcmp ((const char*) child->name, "object"))? child: child->children; + pObject = CreateObject ((const char*) node->name, this); + if (pObject) { + if (!pObject->Load (node)) + delete pObject; + } else { + m_Locked--; + return false; + } + child = child->next; + } + m_Locked--; + return true; +} + +bool Object::SaveChildren (xmlDocPtr xml, xmlNodePtr node) const +{ + map::const_iterator i, end = m_Children.end (); + xmlNodePtr child; + for (i = m_Children.begin (); i != end; i++) { + if ((child = (*i).second->Save (xml))) + xmlAddChild (node, child); + else + return false; + } + return true; +} + +xmlNodePtr Object::GetNodeByProp (xmlNodePtr root, char const *Property, char const *Id) +{ + return GetNextNodeByProp (root->children, Property, Id); +} + +xmlNodePtr Object::GetNextNodeByProp (xmlNodePtr node, char const *Property, char const *Id) +{ + char *txt; + while (node) { + txt = (char*) xmlGetProp (node, (xmlChar*) Property); + if (!strcmp (txt, Id)) + break; + node = node->next; + } + return node; +} + +xmlNodePtr Object::GetNodeByName (xmlNodePtr root, char const *Name) +{ + return GetNextNodeByName (root->children, Name); +} + +xmlNodePtr Object::GetNextNodeByName (xmlNodePtr node, char const *Name) +{ + while (node) { + if (!strcmp ((char*) node->name, Name)) + break; + node = node ->next; + } + return node; +} + +void Object::Move (double x, double y, double z) +{ + map::iterator i, end = m_Children.end (); + for (i = m_Children.begin (); i != end; i++) + (*i).second->Move (x, y, z); +} + +void Object::Transform2D(Matrix2D& m, double x, double y) +{ + map::iterator i, end = m_Children.end (); + for (i = m_Children.begin (); i != end; i++) + (*i).second->Transform2D (m, x, y); +} + +bool Object::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + bool result = false; + TypeDesc& typedesc = Types[TypeNames[m_Type]]; + list::iterator i, end = typedesc.MenuCbs.end (); + for (i = typedesc.MenuCbs.begin (); i != end; i++) + result |= (*i) (this, UIManager, object, x, y); + return result | ((m_Parent)? m_Parent->BuildContextualMenu (UIManager, object, x, y): false); +} + +void Object::Add (GtkWidget* w) const +{ + map::const_iterator i; + Object const *p = GetFirstChild (i); + while (p) { + p->Add (w); + p = GetNextChild (i); + } +} + +void Object::Update (GtkWidget* w) const +{ + map::const_iterator i, end = m_Children.end (); + for (i = m_Children.begin (); i != end; i++) + (*i).second->Update (w); +} + +void Object::SetSelected (GtkWidget* w, int state) +{ + map::iterator i, end = m_Children.end (); + for (i = m_Children.begin (); i != end; i++) + (*i).second->SetSelected (w, state); +} + +Object* Object::GetAtomAt (double x, double y, double z) +{ + return NULL; +} + +bool Object::Build (list& Children) throw (invalid_argument) +{ + return false; +} + +double Object::GetYAlign () +{ + return 0.0; +} + +static TypeId NextType = OtherType; + +TypeDesc::TypeDesc () +{ + Id = NoType; + Create = NULL; +} + +TypeId Object::AddType (string TypeName, Object* (*Create) (), TypeId id) +{ + TypeDesc& typedesc = Types[TypeName]; + typedesc.Create = Create; + if (id == OtherType) { + typedesc.Id = NextType; + NextType = TypeId ((unsigned) NextType + 1); + } else + typedesc.Id = id; + if (TypeNames.size () <= typedesc.Id) { + size_t max = (((size_t) typedesc.Id / 10) + 1) * 10; + TypeNames.resize (max); + } + TypeNames.at (typedesc.Id) = TypeName; + return typedesc.Id; +} + +Object* Object::CreateObject (const string& TypeName, Object* parent) +{ + TypeDesc& typedesc = Types[TypeName]; + Object* pObj = (typedesc.Create)? typedesc.Create (): NULL; + if (parent && pObj) { + if (pObj->m_Id) { + char* newId = parent->GetDocument ()->GetNewId (pObj->m_Id, false); + pObj->SetId (newId); + delete [] newId; + } + parent->AddChild (pObj); + } + return pObj; +} + +TypeId Object::GetTypeId (const string& Name) +{ + TypeDesc& typedesc = Types[Name]; + TypeId res = typedesc.Id; + if (res == NoType) + Types.erase (Name); + return res; +} + +string Object::GetTypeName (TypeId Id) +{ + return TypeNames[Id]; +} + +void Object::AddRule (TypeId type1, RuleId rule, TypeId type2) +{ + AddRule (TypeNames[type1], rule, TypeNames[type2]); +} + +void Object::AddRule (const string& type1, RuleId rule, const string& type2) +{ + if (!type1.size() || !type2.size ()) + return; + TypeDesc& typedesc1 = Types[type1]; + if (typedesc1.Id == NoType) { + Types.erase (type1); + return; + } + TypeDesc& typedesc2 = Types[type2]; + if (typedesc2.Id == NoType) { + Types.erase (type2); + return; + } + switch (rule) { + case RuleMustContain: + typedesc1.RequiredChildren.insert (typedesc2.Id); + case RuleMayContain: + typedesc1.PossibleChildren.insert (typedesc2.Id); + typedesc2.PossibleParents.insert (typedesc1.Id); + break; + case RuleMustBeIn: + typedesc1.RequiredParents.insert (typedesc2.Id); + case RuleMayBeIn: + typedesc2.PossibleChildren.insert (typedesc1.Id); + typedesc1.PossibleParents.insert (typedesc2.Id); + break; + } +} + +const set& Object::GetRules (TypeId type, RuleId rule) +{ + return GetRules (TypeNames[type], rule); +} + +const set& Object::GetRules (const string& type, RuleId rule) +{ + static set noId; + TypeDesc& typedesc = Types[type]; + switch (rule) { + case RuleMustContain: + return typedesc.RequiredChildren; + case RuleMayContain: + return typedesc.PossibleChildren; + case RuleMustBeIn: + return typedesc.RequiredParents; + case RuleMayBeIn: + return typedesc.PossibleParents; + default: + return noId; + } + return noId; +} + +static void AddAncestorTypes (TypeId type, set& types) +{ + const set& new_types = Object::GetRules (type, RuleMayBeIn); + set::iterator i = new_types.begin (), end = new_types.end (); + for (; i != end; i++) { + types.insert (*i); + AddAncestorTypes (*i, types); + } +} + +void Object::GetPossibleAncestorTypes (set& types) const +{ + AddAncestorTypes (m_Type, types); +} + +void Object::SetCreationLabel (TypeId Id, string Label) +{ + TypeDesc& type = Types[TypeNames[Id]]; + type.CreationLabel = Label; +} + +const string& Object::GetCreationLabel (TypeId Id) +{ + return Types[TypeNames[Id]].CreationLabel; +} + +const string& Object::GetCreationLabel (const string& TypeName) +{ + return Types[TypeName].CreationLabel; +} + +static SignalId NextSignal = 0; + +SignalId Object::CreateNewSignalId () +{ + return NextSignal++; +} + +void Object::EmitSignal (SignalId Signal) +{ + Object *obj = NULL; + Object *ancestor = this; + while (ancestor && !ancestor->IsLocked () && ancestor->OnSignal (Signal, obj)) { + obj = ancestor; + ancestor = obj->m_Parent; + } +} + +bool Object::OnSignal (SignalId Signal, Object *Child) +{ + return true; +} + +Object* Object::GetFirstLink (set::iterator& i) +{ + i = m_Links.begin (); + if (i == m_Links.end ()) + return NULL; + return *i; +} + +Object* Object::GetNextLink (set::iterator& i) +{ + i++; + if (i == m_Links.end ()) + return NULL; + return *i; +} + +void Object::Unlink (Object *object) +{ + m_Links.erase (object); + OnUnlink (object); +} + +void Object::OnUnlink (Object *object) +{ +} + +void Object::Lock (bool state) +{ + if (state) + m_Locked++; + else if (m_Locked > 0) + m_Locked--; +} + +void Object::AddMenuCallback (TypeId Id, BuildMenuCb cb) +{ + TypeDesc& typedesc = Types[TypeNames[Id]]; + typedesc.MenuCbs.push_back (cb); +} + +bool Object::SetProperty (unsigned property, char const *value) +{ + return true; +} + +string Object::GetProperty (unsigned property) const +{ + switch (property) { + case GCU_PROP_ID: + return (m_Id)? m_Id: "xxx"; + default: + break; + } + return ""; +} + +void Object::OnLoaded () +{ +} + +void Object::SetDirty (bool dirty) +{ + m_Dirty = dirty; + if (dirty) { + Document *doc = GetDocument (); + if (doc) + doc->NotifyDirty (this); + } +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/object.h gnome-chemistry-utils-0.10.9/libs/gcu/object.h --- gnome-chemistry-utils-0.8.6/libs/gcu/object.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/object.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,662 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * object.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_OBJECT_H +#define GCU_OBJECT_H + +#include "macros.h" +#include "matrix2d.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#define square(x) ((x)*(x)) + +/*!\file*/ +namespace gcu +{ + +/*!\enum GcuTypeId +This enumeration is used to determine the type of an Object instance. +Possible values are: + - NoType invalid type + - AtomType an atom + - FragmentType several atoms linked and represented by a text such as COOH (only in GChemPaint). + - BondType a bond between two (or more) atoms. + - MoleculeType a molecule. + - ChainType a chain of atoms. + - CycleType a cycle. + - ReactantType a molecule involved in a reaction (only in GChemPaint). + - ReactionArrowType a reaction arrow (only in GChemPaint). + - ReactionOperatorType a + sign in a reaction (only in GChemPaint). + - ReactionType a reaction. + - MesomeryType a mesomery representation (only in GChemPaint). + - MesomeryArrowType a double headed arrow used to represent mesomery (only in GChemPaint). + - DocumentType a document, generally the top node in the objects tree. + - TextType some text (only in GChemPaint). + - OtherType if the type of an object is at least equal to OtherType, then it is a dynamically created type returned + by the static Object::AddType method. + . +Some types are not used in the Gnome Chemistry Utils, but only in GChemPaint +and might disappear from this list in future versions and replaced by dynamically created types. +*/ +enum GcuTypeId +{ + NoType, + AtomType, + FragmentType, + BondType, + MoleculeType, + ChainType, + CycleType, + ReactantType, + ReactionArrowType, + ReactionOperatorType, + ReactionType, + MesomeryType, + MesomeryArrowType, + DocumentType, + TextType, + OtherType +}; + +/*! +The type of an object instance. Either predefined types are defined in the enum above +or dynamically defined types by calls to Object::AddType. +*/ +typedef unsigned TypeId; + +class Object; + +/*! +The type of callbacks for adding new items to the contextual menu of an object. +@param target the Object whose menu is being built. +@param UIManager the GtkUI%anager to populate. +@param object the Object on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. +*/ +typedef bool (*BuildMenuCb) (Object *target, GtkUIManager *UIManager, Object *object, double x, double y); + +/*!\enum RuleId +This enumeration is used to maintain a set of rules about the possible +hierarchical of the document. They are used with two class names or ids. +Possible values are: + - RuleMayContain an instance of the first class may contain an instance of the second. +This implies that an instance of the second class may be in an instance of the first (see RuleMayBeIn); + - RuleMustContain an instance of the first class may contain an instance of the second class (implies RuleMayContain); +if no instance of the first class is present, the object is not valid. + - RuleMayBeIn an instance of the first class may be the child of an instance of the second class (see also RuleMayContain); + - RuleMustBeIn an instance of the first class must be the child of an instance of the second class, otherwise +it is not valid. +*/ +enum RuleId +{ + RuleMayContain, + RuleMustContain, + RuleMayBeIn, + RuleMustBeIn +}; + +/*! +The types of the signals used in Object::EmitSignal() and Object::OnSignal(). Each signal +must type be retrieved from a call to Object::CreateNewSignalId(). +*/ +typedef unsigned SignalId; + +class Document; + +/*!\class Object gcu/object.h +This is the base class for most other objects in the gcu namespace. +*/ +class Object +{ +public: +/*! +Used to create an object of type Id. Should only be called from the constructor of a derived class. +*/ + Object (TypeId Id = OtherType); +/*! +The standard destructor of Object instances. Automatically called when the object is destroyed. +*/ + virtual ~Object (); + +/*! +@return the type of the object. If the type is at least equal to OtherType, it is a dynamically created type returned by +the Object::AddType method. +*/ + TypeId GetType () const {return m_Type;} +/*! + @param Id the id of the Object instance. + + Every object must have an Id, since searches in the document tree uses it. +*/ + void SetId (gchar const *Id); +/*! + @return the Id of the Object instance. +*/ + gchar const *GetId () const {return m_Id;} +/*! + @param object the Object instance to add as a child. + + Each Object instance maintains a list of its children. If object has already a parent, it will be removed from its + parent children list. The new parent Object must have a Document ancestor to ensure that Ids are unique. +*/ + virtual void AddChild (Object* object); +/*! + Used to get the Molecule in the Object instances ancestors. Overloaded methods should call the + base class Object::AddChild. + + @return the first Object of type MoleculeType encountered when exploring + the Objects tree or NULL if none is found. +*/ + Object* GetMolecule () const; +/*! + Used to get the Reaction in the Object instances ancestors. + + @return the first Object of type ReactionType encountered when exploring + the Objects tree or NULL if none is found. +*/ + Object* GetReaction () const; +/*! + Used to get the highest ancestor just before the document + in the Object instances ancestors. + + @return the last Object encountered before the document when exploring + the Objects tree or NULL if the object's parent is the document itself. +*/ + Object* GetGroup () const; +/*! + Used to get the Document in the Object instances ancestors. + + @return the first Object of type DocumentType encountered when exploring + the Objects tree (only one should be found) or NULL if none is found. +*/ + Document* GetDocument () const; +/*! +@param Id the type of the ancestor searched. + + Used to get the first ancestor of type Id in the Object instances ancestors. + GetDocument, GetMolecule and GetReaction are special cases of this method. + + @return the first Object of type Id encountered when exploring + the Objects tree (only one should be found) or NULL if none is found. +*/ + Object* GetParentOfType (TypeId Id) const; +/*! +@param Id the Id of the child searched. + +To search the Object in lower shells of the tree, use the Object::GetDescendant method. +@return the Object instance of type Id if found in the children list or NULL if not found. +*/ + Object* GetChild (const gchar* Id) const; +/*! +@param i a C++ std::map iterator. + +Use this function to retrieve the first child of the object and initialize the iterator. +@return the first child of the object or NULL. +*/ + Object *GetFirstChild (std::map::iterator& i); + Object const *GetFirstChild (std::map::const_iterator& i) const; +/*! +@param i a C++ std::map iterator initialized by Object::GetFirstChild. + +Use this method to iterate through the list of the Object children. +@return the next child of the object or NULL. +*/ + Object *GetNextChild (std::map::iterator& i); + Object const *GetNextChild (std::map::const_iterator& i) const; +/*! +@param Id the Id of the descendant searched. + +This method searches the Object in its children and if not found calls the GetDescendant method for its children. +@return the Object instance of type Id if found in the decendants or NULL if not found. +*/ + Object* GetDescendant (const gchar* Id) const; +/*! +@return the parent of the Object. +*/ + Object* GetParent () const {return m_Parent;}; +/*! +@param Parent the new parent of the Object or NULL. + + When Parent is not NULL, this is equivalent to \code Parent->AddChild(this);\endcode + Otherwise, it removes the Object from the Document tree. +*/ + void SetParent (Object* Parent); +/*! + @param xml the xmlDoc used to save the document. + + Used to save the Object to the xmlDoc. Each serializable Object should implement this virtual method. + @return the xmlNode containing the serialized object. The name of the node should be the name of the + corresponding type used as first parameter to the Object::AddType method. The + default method just saves the id and children. +*/ + virtual xmlNodePtr Save (xmlDocPtr xml) const; +/*! +@param node a pointer to the xmlNode containing the serialized object. + +Used to load an Object in memory. The Object must already exist. + +Example: \code + std::string str = (const char*)node->name; + Object* pObject = Object::CreateObject(str, this); + if (pObject) { + if (!pObject->Load(node)) delete Object; + } else + cerr << "Warning: unknown object: " << str << endl; +\endcode + +@return true on succes, false otherwise. +*/ + virtual bool Load (xmlNodePtr node); +/*! +@param x the x component of the transation vector. +@param y the y component of the transation vector. +@param z the z component of the transation vector. + +Used to move an object. This virtual method should most often be overrided by Object derived classes for which it makes sense. +The base Object class has no coordinates and the default method only loads its id and children. +*/ + virtual void Move (double x, double y, double z = 0.); +/*! +@param m the Matrix2D of the transformation. +@param x the x component of the center of the transformation. +@param y the y component of the center of the transformation. + +Used to move and/or transform an object. +This virtual method must be overrided by Object derived classes for which it makes sense. +The base Object class has no coordinates and the default method calls the corresponding method +for every child. +*/ + virtual void Transform2D (Matrix2D& m, double x, double y); +/*! +@param xml the xmlDoc used to save the document. +@param node the node representing the Object. + +This method calls Object::Save fo each child of the Object instance and add the xmlNode returned to the children of node. +It might be called from the Save method of objects having serializable children. +@return true on succes, false otherwise. +*/ + bool SaveChildren (xmlDocPtr xml, xmlNodePtr node) const; +/*! +@param node the node representing the Object. + +This helper method saves the Id of the node as a property of the xmlNode. +*/ + void SaveId (xmlNodePtr node) const; +/*! +@param node the node where the search is to be done. +@param Property the name of the property used in the search. +@param Id the value to match to the property. + +Helper method used in conjunction with Object::GetNextNodeByProp to search xmlNode instances having a property Property +whose value is Id in the children of node. + +@return the node corresponding to the first match. This value is to be passed to Object::GetNextNodeByProp to iterate in the list +*/ + xmlNodePtr GetNodeByProp (xmlNodePtr node, char const *Property, char const *Id); +/*! +@param node the xmlNodePtr returned by Object::GetNodeByProp or the last call to Object::GetNextNodeByProp. +@param Property the name of the property used in the search. +@param Id the value to match to the property. + +Helper method used to iterate through a list of xmlNodePtr searching for a special value of a property. +Generally, the iteration is initialized by a call to Object::GetNodeByProp. +@return the next matching node. +*/ + xmlNodePtr GetNextNodeByProp (xmlNodePtr node, char const *Property, char const *Id); +/*! +@param node the node where the search is to be done. +@param Name the name of the xmlNode searched. + +Helper method used in conjunction with Object::GetNextNodeByProp to search xmlNode instances of name Name +in the children of node. + +@return the node corresponding to the first match. This value is to be passed to Object::GetNextNodeByName to iterate in the list. +*/ + xmlNodePtr GetNodeByName (xmlNodePtr node, char const *Name); +/*! +@param node the xmlNodePtr returned by Object::GetNodeByName or the last call to Object::GetNextNodeByName. +@param Name the name of the xmlNode searched. + +Helper method used to iterate through a list of xmlNodePtr searching for nodes whose name is Name. +Generally, the iteration is initialized by a call to Object::GetNodeByName. +@return the next matching node. +*/ + xmlNodePtr GetNextNodeByName (xmlNodePtr node, char const *Name); +/*! +@param w the GtkWidget inside which the Object will be displayed. + +Used to add a representation of the Object in the widget. This method might be overrided for displayable Object classes +unless the application uses another mechanism. +*/ + virtual void Add (GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the Object is displayed. + +Used to update the representation of the Object in the widget. This method might be overrided for displayable Object classes +unless the application uses another mechanism. +*/ + virtual void Update (GtkWidget* w) const; +/*! +@param w the GtkWidget inside which the Object is displayed. +@param state the selection state of the Object. + +Used to set the selection state of the Object inside the widget. The values of state are application dependant and have no +default value. +*/ + virtual void SetSelected (GtkWidget* w, int state); +/*! +@return true if the Object has at least a child an false if it has none. +*/ + bool HasChildren () const {return m_Children.size () != 0;} + +/*! +@return the children number of the Object. +*/ + unsigned GetChildrenNumber () const {return m_Children.size ();} + +/*! +@param x the x coordinate +@param y the y coordinate +@param z the z coordinate + +@return a pointer to a child of type Atomtype at or near position defined by the coordinates +passed as parameters. Default implementation returns NULL. +*/ + virtual Object* GetAtomAt (double x, double y, double z = 0.); + +/*! +@param Children the list of objects used as children to build the object + +This method is called to build a parent object from its children. The object must already exist. +@return true in case of success and false if failed. +*/ + virtual bool Build (std::list& Children) throw (std::invalid_argument); + +/*! +Used to retrieve the y coordinate for alignment. The default implementation returns 0.0 and +every derived class for which alignment has a meaning should implement this method. +@return y coordinate used for objects alignment. +*/ + virtual double GetYAlign (); + +/*! +@param UIManager the GtkUIManager to populate. +@param object the Object on which occured the mouse click. +@param x x coordinate of the mouse click. +@param y y coordinate of the mouse click. + +This method is called to build a contextual menu for the object. It is called by Object::ShowContextualMenu, so +it should not be necessary to call it directly. It should be overriden by derived classes when a contextual menu +is needed. Typically, each class adds a submenu and calls the same method for its parent. +Default implementation calls registered BuildMenuCb callbacks and the parent's method. +Derived classes should call Object::BuildContextualMenu before returning. +@return true if something is added to the UIManager, false otherwise. +*/ + virtual bool BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y); + +/*! +@param Signal the appropriate SignalId + +Sends a signal to the object parent. The signal may be propagated to the ancestors (see +Object::OnSignal ()). +*/ + void EmitSignal (SignalId Signal); + +/*! +@param Signal the appropriate SignalId +@param Child the child which emitted the signal or NULL + +This function is called by the framework when a signal has been emitted for the object. +It should not be called by a program; call Object::EmitSignal instead. + +@return true if the signal should be propagated to the parent, false otherwise. +*/ + virtual bool OnSignal (SignalId Signal, Object *Child); + +/*! +@param state whether to block signals or not + +Blocks signals if State is true and unblocs if state is false. + +Since 0.4.2 +*/ + void Lock (bool state = true); + +/*! + +@return true if signals are locked, false otherwise + +Since 0.4.2 +*/ + bool IsLocked () {return m_Locked > 0;} + +/*! +@param i a C++ std::set iterator. + +Use this function to retrieve the first object linked to the object and initialize the iterator. +Links can be used when the relation between the objects is not a parent to child one. +@return the first object linked to the object or NULL. +*/ + Object* GetFirstLink (std::set::iterator& i); + +/*! +@param i a C++ std::set iterator initialized by Object::GetFirstLink. + +Use this method to iterate through the list of Object instances linked to the object. +@return the next object linked to the object or NULL. +*/ + Object* GetNextLink (std::set::iterator& i); + +/*! +@param object the object to unlink. + +Unlinks object and calls Object::OnUnlink. +*/ + void Unlink (Object *object); + +/*! +@param object the object just unlinked by Object::Unlink. + +Virtual method called when an object hs been unlinked. Programs should not call it +directly, but should call Object::OnUnlink instead. +*/ + virtual void OnUnlink (Object *object); + +/*! +@param types the list of TypeId values to fill + +Fills types with all valid ancestor types for the object as defined by rules created with AddRule +*/ + void GetPossibleAncestorTypes (std::set& types) const; + +/*! +@param property the property id as defined in objprops.h +@param value the property value as a string + +Used when loading to set properties to various objects. If the method returns false, +the property should be set again later. This might happen if an atom does not exists when one +of its bonds is loaded. All classes supporting the mechanism must overload this method. +@return true if the property could be set, or if the property is not relevant, false otherwise. +*/ + virtual bool SetProperty (unsigned property, char const *value); + +/*! +@param property the property id as defined in objprops.h + +Used when saving to get properties from various objects. All classes +supporting the mechanism must overload this method. +*/ + virtual std::string GetProperty (unsigned property) const; + +/*! +This method should be called when an object has been fully loaded. The default method doesn't do anything. +*/ + virtual void OnLoaded (); + +/*! +@param dirty should be true if the object needs some update, false otherwise. For a document, +it means that the document has been changed. +*/ + void SetDirty (bool dirty = true); + +/*! +@param TypeName the name of the new type. +@param CreateFunc a pointer to a function returning a pointer to a new object of the new type. +@param id the Id of the type to create if a standard one or OtherType for a new type. In this last case, this parameter +can be omitted. + +This method is used to register a new type derived from Object. +@return the Id of the new type. +*/ + static TypeId AddType (std::string TypeName, Object* (*CreateFunc) (), TypeId id = OtherType); + +/*! +@param TypeName the name of the new type. +@param parent the parent of the newly created object or NULL. if NULL, the parameter can be omitted. + +Used to create an object of type name TypeName. The Object::AddType method must have been called with the same +TypeName parameter. if parent is given and not NULL, the new Object will be a child of parent. +It will also be given a default Id. + +@return a pointer to the newly created Object or NULL if the Object could not be created. +*/ + static Object* CreateObject (const std::string& TypeName, Object* parent = NULL); + +/*! +@param Name the name of the Object derived class + +@return the TypeId corresponding to Name +*/ + static TypeId GetTypeId (const std::string& Name); + +/*! +@param Id the TypeId of the Object derived class + +@return the name of the type. +*/ + static std::string GetTypeName (TypeId Id); + +/*! +@param Id the TypeId of the Object derived class +@param cb the BuildMenuCb callback to call when building the menu. + +adds a callback for modifying the contextual menu of objects of type Id. +*/ + static void AddMenuCallback (TypeId Id, BuildMenuCb cb); + +/*! +@param type1 the TypeId of the first class in the rule +@param rule the new rule value +@param type2 the TypeId of the second class in the rule + +Adds a rule. +*/ + static void AddRule (TypeId type1, RuleId rule, TypeId type2); + +/*! +@param type1 the name of the first class in the rule +@param rule the new rule value +@param type2 the name of the second class in the rule + +Adds a rule. +*/ + static void AddRule (const std::string& type1, RuleId rule, const std::string& type2); + +/*! +@param type the TypeId of a class +@param rule a RuleId value + +@return the set of rules correponding to the RuleId value for this class. +*/ + static const std::set& GetRules (TypeId type, RuleId rule); + +/*! +@param type the name of a class +@param rule a RuleId value + +@return the set of rules correponding to the RuleId value for this class. +*/ + static const std::set& GetRules (const std::string& type, RuleId rule); + +/*! +@param Id the TypeId of a class +@param Label the string to display in a contextual menu + +Used to give a label for contextual menus used when the creation of an instance of +the class seems possible. +*/ + static void SetCreationLabel (TypeId Id, std::string Label); + +/*! +@param Id the TypeId of a class + +@return the string defined by SetCreationLabel. +*/ + static const std::string& GetCreationLabel (TypeId Id); + +/*! +@param TypeName the name of a class + +@return the string defined by SetCreationLabel. +*/ + static const std::string& GetCreationLabel (const std::string& TypeName); + +/*! +@return a new SignalId. +*/ + static SignalId CreateNewSignalId (); + +private: + Object* RealGetDescendant (const gchar* Id) const; + +private: + gchar* m_Id; + TypeId m_Type; + Object *m_Parent; + std::map m_Children; //string is Id of object, so each object must have an Id + std::set m_Links; //objects linked to this but outside of the hierarchy + +private: +/*! +Set to true while loading to avoid signal propagation. +*/ + int m_Locked; + +/*!\fn GetDirty() +@return true if the document has changed since it was opened or last saved, +false otherwise. +*/ +GCU_RO_PROP (bool, Dirty); +}; + +} +#endif //GCU_OBJECT_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/objprops.h gnome-chemistry-utils-0.10.9/libs/gcu/objprops.h --- gnome-chemistry-utils-0.8.6/libs/gcu/objprops.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/objprops.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,155 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/loader.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_OBJ_PROPS_H +#define GCU_OBJ_PROPS_H + +/*!\file +This file contains the list of symbolic Ids for objects properties as used in +gcu::Object::GetProperty and gcu::Object::SetProperty in conjunction with + serialization using the gcu::Loader class. +*/ +enum { + // Common properties +/*! +The unique Id of the object. +*/ + GCU_PROP_ID, +/*! +The position of an object in a 2D representation. +*/ + GCU_PROP_POS2D, +/*! +The position of an object in a 2D representation. +*/ + GCU_PROP_POS3D, + // Document properties +/*! +The file name. +*/ + GCU_PROP_DOC_FILENAME, +/*! +The mime type. +*/ + GCU_PROP_DOC_MIMETYPE, +/*! +The title of the document. +*/ + GCU_PROP_DOC_TITLE, +/*! +A text added to the document as comment. +*/ + GCU_PROP_DOC_COMMENT, +/*! +Who created the file. +*/ + GCU_PROP_DOC_CREATOR, +/*! +The date of file creation. +*/ + GCU_PROP_DOC_CREATION_TIME, +/*! +The date of the last file modification. +*/ + GCU_PROP_DOC_MODIFICATION_TIME, + // Theme related properties (might be doc properties in some formats) +/*! +The default bond length. +*/ + GCU_PROP_THEME_BOND_LENGTH, + // Atom properties +/*! +The symbol of an atom. +*/ + GCU_PROP_ATOM_SYMBOL, +/*! +The atomic number of an atom. +*/ + GCU_PROP_ATOM_Z, +/*! +The charge of an atom. +*/ + GCU_PROP_ATOM_CHARGE, + // Bond properties +/*! +The Id of the atom at the first extremity of the bond. +*/ + GCU_PROP_BOND_BEGIN, +/*! +The Id of the atom at the last extremity of the bond. +*/ + GCU_PROP_BOND_END, +/*! +*/ + GCU_PROP_BOND_ORDER, +/*! +The bond order. +*/ + GCU_PROP_BOND_TYPE, //normal, hash, wedge,... + // Text properties +/*! +The text of a textual object. +*/ + GCU_PROP_TEXT_TEXT, +/*! +The markup of a textual object. +*/ + GCU_PROP_TEXT_MARKUP, +/*! +The alignment of a textual object. +*/ + GCU_PROP_TEXT_ALIGNMENT, +/*! +The justification of a textual object. +*/ + GCU_PROP_TEXT_JUSTIFICATION, +/*! +The position in bytes of the bonded atom in a group of atoms. +*/ + GCU_PROP_FRAGMENT_ATOM_START, // index of the start of the symbol of the bonded atom if any +/*! +The Id of the bonded atom in a group of atoms. +*/ + GCU_PROP_FRAGMENT_ATOM_ID, + // Arrows properties +/*! +The 2D coordinates of the start and end points of the arrow in the order xstart, ystart, +xend, yend, separated by white spaces. +*/ + GCU_PROP_ARROW_COORDS, +/*! +The Id of the object representing the reactants. +*/ + GCU_PROP_ARROW_START_ID, +/*! +The Id of the object representing the products. +*/ + GCU_PROP_ARROW_END_ID, +/*! +The type of a reaction arrow ("double" for a reversible arrow). +*/ + GCU_PROP_REACTION_ARROW_TYPE, +}; + +#endif // GCU_OBJ_PROPS_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/printable.cc gnome-chemistry-utils-0.10.9/libs/gcu/printable.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/printable.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/printable.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,268 @@ +/* + * Gnome Chemistry Utils + * printable.h + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "printable.h" +#include "application.h" +#include "macros.h" +#include +#include + +namespace gcu { + + +static char const *UnitNames[] = { + N_("pixels"), + N_("points"), + N_("inches"), + N_("mm") +}; + +GtkUnit gtk_unit_from_string (char const *name) +{ + int i = G_N_ELEMENTS (UnitNames); + while (i > 0) + if (!strcmp (name, UnitNames[--i])) + return (GtkUnit) i; + return GTK_UNIT_MM; // our default +} + +char const *gtk_unit_to_string (GtkUnit unit) +{ + return UnitNames[unit]; +} + +class PrintSettings +{ +public: + PrintSettings (); + virtual ~PrintSettings (); + void Init (); +#ifdef HAVE_GO_CONF_SYNC + void OnConfigChanged (GOConfNode *node, gchar const *name); +#else + void OnConfigChanged (GConfClient *client, guint cnxn_id, GConfEntry *entry); +#endif + GtkPrintSettings *settings; + GtkPageSetup *setup; + GtkUnit unit; + guint m_NotificationId; +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *m_ConfNode; +#else + GConfClient *m_ConfClient; +#endif +}; + +static PrintSettings DefaultSettings; + +PrintSettings::PrintSettings () +{ + settings = NULL; + setup = NULL; +} + +#ifdef HAVE_GO_CONF_SYNC +static void on_config_changed (GOConfNode *node, gchar const *key, gpointer data) +{ + DefaultSettings.OnConfigChanged (node, key); +} +#else +static void on_config_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer data) +{ + DefaultSettings.OnConfigChanged (client, cnxn_id, entry); +} +#endif + +#define ROOTDIR "/apps/gchemutils/printsetup/" + +void PrintSettings::Init () +{ + settings = gtk_print_settings_new (); + setup = gtk_page_setup_new (); +#ifdef HAVE_GO_CONF_SYNC + m_ConfNode = go_conf_get_node (Application::GetConfDir (), "printsetup"); +#else + GError *error = NULL; + m_ConfClient = gconf_client_get_default (); + gconf_client_add_dir (m_ConfClient, "/apps/gchemutils/printsetup", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); +#endif + char *name = NULL; + GtkPaperSize *size = NULL; + GCU_GCONF_GET_STRING ("paper", name, NULL) + size = gtk_paper_size_new ((name && strlen (name))? name: NULL); + gtk_page_setup_set_paper_size (setup, size); + gtk_paper_size_free (size); + g_free (name); + name = NULL; + GCU_GCONF_GET_STRING ("preferred-unit", name, "mm") + unit = gtk_unit_from_string (name); + g_free (name); + double x; + GCU_GCONF_GET_NO_CHECK ("margin-top", float, x, 72); + gtk_page_setup_set_top_margin (setup, x, GTK_UNIT_POINTS); + GCU_GCONF_GET_NO_CHECK ("margin-bottom", float, x, 72); + gtk_page_setup_set_bottom_margin (setup, x, GTK_UNIT_POINTS); + GCU_GCONF_GET_NO_CHECK ("margin-right", float, x, 72); + gtk_page_setup_set_right_margin (setup, x, GTK_UNIT_POINTS); + GCU_GCONF_GET_NO_CHECK ("margin-left", float, x, 72); + gtk_page_setup_set_left_margin (setup, x, GTK_UNIT_POINTS); + // TODO: import other default values from conf keys +#ifdef HAVE_GO_CONF_SYNC + m_NotificationId = go_conf_add_monitor (m_ConfNode, NULL, (GOConfMonitorFunc) on_config_changed, NULL); + go_conf_free_node (m_ConfNode); +#else + m_NotificationId = gconf_client_notify_add (m_ConfClient, "/apps/gchemutils/printsetup", (GConfClientNotifyFunc) on_config_changed, NULL, NULL, NULL); +#endif +} + +PrintSettings::~PrintSettings () +{ + if (setup) + g_object_unref (setup); + if (settings) + g_object_unref (settings); +#ifdef HAVE_GO_CONF_SYNC + // don't remove notification, since goffice has already been shut down +#else + if (m_NotificationId) { + gconf_client_notify_remove (m_ConfClient,m_NotificationId); + gconf_client_remove_dir (m_ConfClient, "/apps/gchemutils/printsetup", NULL); + g_object_unref (m_ConfClient); + } +#endif +} + +#ifdef HAVE_GO_CONF_SYNC +void PrintSettings::OnConfigChanged (GOConfNode *node, gchar const *name) +{ +#else +void PrintSettings::OnConfigChanged (GConfClient *client, guint cnxn_id, GConfEntry *entry) +{ + if (client != m_ConfClient) + return; // we might want an error message? + if (cnxn_id != m_NotificationId) + return; // we might want an error message? +#endif + char *val = NULL; + GCU_UPDATE_STRING_KEY ("paper", val, + { + GtkPaperSize *size = NULL; + size = gtk_paper_size_new ((val && strlen (val))? val: NULL); + gtk_page_setup_set_paper_size (setup, size); + gtk_paper_size_free (size); + g_free (val); + val = NULL; + }) + GCU_UPDATE_STRING_KEY ("preferred-unit", val, + { + unit = gtk_unit_from_string (val); + g_free (val); + }) + double x; + GCU_UPDATE_KEY ("margin-top", float, x, + { + gtk_page_setup_set_top_margin (setup, x, GTK_UNIT_POINTS); + }) + GCU_UPDATE_KEY ("margin-bottom", float, x, + { + gtk_page_setup_set_bottom_margin (setup, x, GTK_UNIT_POINTS); + }) + GCU_UPDATE_KEY ("margin-right", float, x, + { + gtk_page_setup_set_right_margin (setup, x, GTK_UNIT_POINTS); + }) + GCU_UPDATE_KEY ("margin-left", float, x, + { + gtk_page_setup_set_left_margin (setup, x, GTK_UNIT_POINTS); + }) +} + +Printable::Printable (): + DialogOwner () +{ + if (DefaultSettings.settings == NULL) + DefaultSettings.Init (); + m_PrintSettings = gtk_print_settings_copy (DefaultSettings.settings); + m_PageSetup = gtk_page_setup_copy (DefaultSettings.setup); + m_Unit = DefaultSettings.unit; + m_HorizCentered = m_VertCentered = false; + m_ScaleType = GCU_PRINT_SCALE_NONE; + m_Scale = 1.; + m_HorizFit = m_VertFit = true; + m_HPages = m_VPages = 1; +} + +Printable::~Printable () +{ + g_object_unref (m_PageSetup); + g_object_unref (m_PrintSettings); +} + +static void begin_print (GtkPrintOperation *print, GtkPrintContext *context, gpointer data) +{ + gtk_print_operation_set_n_pages (print, ((Printable *) data)->GetPagesNumber ()); +} + +static void draw_page (GtkPrintOperation *print, GtkPrintContext *context, gint page_nr,gpointer data) +{ + ((Printable *) data)->DoPrint (print, context); +} + +void Printable::Print (bool preview) +{ + GtkPrintOperation *print; + GtkPrintOperationResult res; + + print = gtk_print_operation_new (); + gtk_print_operation_set_use_full_page (print, false); + + gtk_print_operation_set_print_settings (print, GetPrintSettings ()); + gtk_print_operation_set_default_page_setup (print, GetPageSetup ()); + + g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), this); + g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), this); + + res = gtk_print_operation_run (print, + (preview)? GTK_PRINT_OPERATION_ACTION_PREVIEW: + GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, + GetGtkWindow (), NULL); + + if (res == GTK_PRINT_OPERATION_RESULT_APPLY) { + if (m_PrintSettings != NULL) + g_object_unref (m_PrintSettings); + m_PrintSettings = GTK_PRINT_SETTINGS (g_object_ref (gtk_print_operation_get_print_settings (print))); + } + + g_object_unref (print); +} + +void Printable::SetPageSetup (GtkPageSetup *PageSetup) +{ + if (PageSetup != NULL) { + if (m_PageSetup != NULL) + g_object_unref (m_PageSetup); + m_PageSetup = PageSetup; + } +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/printable.h gnome-chemistry-utils-0.10.9/libs/gcu/printable.h --- gnome-chemistry-utils-0.8.6/libs/gcu/printable.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/printable.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,269 @@ +/* + * Gnome Chemistry Utils + * printable.h + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_PRINTABLE_H +#define GCU_PRINTABLE_H + +#include "dialog-owner.h" +#include "macros.h" +#include +#include +#include +#include + +/*!\file*/ + +namespace gcu { + +/*!\enum PrintScaleType gcu/printable.h +Represents how printing is scaled +*/ +typedef enum { +/*! +No scaling is done. +*/ + GCU_PRINT_SCALE_NONE, +/*! +Explicit scaling. +*/ + GCU_PRINT_SCALE_FIXED, +/*! +Automatic scaling (will fill the print area). +*/ + GCU_PRINT_SCALE_AUTO, +} PrintScaleType; + +/*!\class Printable gcu/printable.h +A base class for everything that might be printed. +*/ +class Printable: virtual public DialogOwner +{ +public: +/*! +The constructor. +*/ + Printable (); +/*! +The destructor. +*/ + virtual ~Printable (); + +/*! +@param print a GtkPrintOperation*. +@param context a GtkPrintContext*. + +This is the method doing the real printing. It mustbe overloaded by derived classes +and take parameters defined in gcu::Printable into account. Default implementation +does not do anything. +*/ + virtual void DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const = 0; +/*! +Derived classes supporting headers and footers must overload this method. +@return true if the document headers and footers. Default implementation +returns false. +*/ + virtual bool SupportsHeaders () {return false;} +/*! +Derived classes able to print several pages must overload this method. +@return true if the document supports pagination. Default implementation +returns false. +*/ + virtual bool SupportMultiplePages () {return false;} +/*! +Derived classes need to overload this pure virtual method. +@return the top level GtkWindow containing the document. +*/ + virtual GtkWindow *GetGtkWindow () = 0; +/*! +Derived classes able to print several pages must overload this method. +@return the page number for the document. Default implementation returns 1. +*/ + virtual int GetPagesNumber () {return 1;} + +/*! +@param preview whether preview or real printing is requested. + +Prints the documennt. It initializes printing, and then calls DoPrint. +*/ + void Print (bool preview); +/*! +@param PageSetup a GtkPageSetup*. + +This methods sets the page setup for the current printable object. Note that +this does not increase the reference count of the GtkPageSetup*. The page setup +will be unrefed when the Printable is destroyed or when a new page setup is set. +*/ + void SetPageSetup (GtkPageSetup *PageSetup); + +/*!\fn GetPrintSettings() +@return the GtkPrintSettings currently associated with the Printable instance. +*/ +GCU_RO_PROP (GtkPrintSettings *, PrintSettings) +/*!\fn GetPrintSettings() +@return the GtkPageSetup currently associated with the Printable instance. +*/ +GCU_RO_PROP (GtkPageSetup *, PageSetup) +/*!\fn SetUnit(GtkUnit Unit) +@param Unit a GtkUnit. + +Sets the current unit used in settings. +*/ +/*!\fn GetUnit() +@return the current GtkUnit. +*/ +/*!\fn GetRefUnit() +@return the current GtkUnit as a reference. +*/ +GCU_PROP (GtkUnit, Unit) +/*!\fn SetHeaderHeight(double HeaderHeight) +@param HeaderHeight the height of the header. + +Sets the height of the header to be printed on top of each page. +*/ +/*!\fn GetHeaderHeight() +@return the current page header height. +*/ +/*!\fn GetRefHeaderHeight() +@return the current page header height as a reference. +*/ +GCU_PROP (double, HeaderHeight) +/*!\fn SetFooterHeight(double FooterHeight) +@param FooterHeight the height of the header. + +Sets the height of the footer to be printed at the bottom of each page. +*/ +/*!\fn GetFooterHeight() +@return the current page footer height. +*/ +/*!\fn GetRefFooterHeight() +@return the current page footer height as a reference. +*/ +GCU_PROP (double, FooterHeight) +/*!\fn SetHorizCentered(bool HorizCentered) +@param HorizCentered whether to center horizontally or not. +*/ +/*!\fn GetHorizCentered() +@return true if printing is horizontally centered. +*/ +/*!\fn GetRefHorizCentered() +@return a reference to the boolean indicating if printing is horizontally +centered or not. +*/ +GCU_PROP (bool, HorizCentered) +/*!\fn SetVertCentered(bool VertCentered) +@param VertCentered whether to center vertically or not. +*/ +/*!\fn GetVertCentered() +@return true if printing is vertically centered. +*/ +/*!\fn GetRefVertCentered() +@return a reference to the boolean indicating if printing is vertically +centered or not. +*/ +GCU_PROP (bool, VertCentered) +/*!\fn SetScaleType(PrintScaleType ScaleType) +@param ScaleType how to scale when printing. + +Sets the printing scale type. +*/ +/*!\fn GetScaleType() +@return the current printing scale type. +*/ +/*!\fn GetRefScaleType() +@return the current printing scale type as a reference. +*/ +GCU_PROP (PrintScaleType, ScaleType) +/*!\fn SetScale(double Scale) +@param Scale the scale to use. + +Sets the scale to use when the printing scale type is GCU_PRINT_SCALE_FIXED. +*/ +/*!\fn GetScale() +@return the current scale. +*/ +/*!\fn GetRefScale() +@return the current scale as a reference. +*/ +GCU_PROP (double, Scale) +/*!\fn SetHorizFit(bool HorizFit) +@param HorizFit whether to fill the page horizontally. +*/ +/*!\fn GetHorizFit() +@return true if printing fills the page horizontally. +*/ +/*!\fn GetRefHorizFit() +@return a reference to the boolean indicating if printing fills the +page horizontally. +*/ +GCU_PROP (bool, HorizFit) +/*!\fn SetVertFit(bool VertFit) +@param VertFit whether to fill the page vertically. +*/ +/*!\fn GetVertFit() +vertically*/ +/*!\fn GetRefVertFit() +@return a reference to the boolean indicating if printing fills the +page vertically. +*/ +GCU_PROP (bool, VertFit) +/*!\fn SetHPages(int HPages) +@param HPages the number of pages to which horizontally spread the print output. + +Sets the full width in pages of the printing, when printing to several pages. +*/ +/*!\fn GetHPages() +@return the current number of pages to which printing is horizontally spread. +*/ +/*!\fn GetRefHPages() +@return the current GtkUnnumber of pages to which printing is horizontally +spread as a reference. +*/ +GCU_PROP (int, HPages) +/*!\fn SetVPages(int VPages) +@param VPages the number of pages to which vertically spread the print output. + +Sets the full height in pages of the printing, when printing to several pages. +*/ +/*!\fn GetVPages() +@return the current number of pages to which printing is vertically spread. +*/ +/*!\fn GetRefVPages() +@return the current GtkUnnumber of pages to which printing is vertically +spread as a reference. +*/ +GCU_PROP (int, VPages) +}; + +/*! +@param name a string representing a GtkUnit. +@return the GtkUnit represented by the string. +*/ +GtkUnit gtk_unit_from_string (char const *name); +/*! +@param unit a GtkUnit. +@return the sring representig the GtkUnit. +*/ +char const *gtk_unit_to_string (GtkUnit unit); + +} // namespace gcu + +#endif // GCU_PRINTABLE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/print-setup-dlg.cc gnome-chemistry-utils-0.10.9/libs/gcu/print-setup-dlg.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/print-setup-dlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/print-setup-dlg.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,501 @@ +/* + * Gnome Chemistry Utils + * print-setup-dlg.cc + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * Part of this code has been copied from gnumeric/src/dialogs/dialog-printer-setup.c + * Authors: + * Wayne Schuller (k_wayne@linuxpower.org) + * Miguel de Icaza (miguel@gnu.org) + * Andreas J. Guelzow (aguelzow@pyrshep.ca) + */ + +#include "config.h" +#include "print-setup-dlg.h" +#include + +namespace gcu { + +static void +on_dialog_printer_setup_done (GtkPageSetup *page_setup, + gpointer data) +{ + ((PrintSetupDlg *) data)->UpdatePageSetup (page_setup); +} + +static void on_print (PrintSetupDlg *dlg) +{ + dlg->DoPrint (false); +} + +static void on_print_preview (PrintSetupDlg *dlg) +{ + dlg->DoPrint (true); +} + +static void on_dialog_gtk_printer_setup (PrintSetupDlg *dlg) +{ + dlg->OnPrinterSetup (); +} + +static void on_orientation_changed (GtkToggleButton *btn, PrintSetupDlg *dlg) +{ + if (gtk_toggle_button_get_active (btn)) + dlg->OnOrientation ((GtkPageOrientation) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (btn), "orientation"))); +} + +static void on_scale_type_changed (GtkToggleButton *btn, PrintSetupDlg *dlg) +{ + if (gtk_toggle_button_get_active (btn)) + dlg->OnScaleType ((PrintScaleType) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (btn), "scale-type"))); +} + +static gint unit_sort_func (GtkTreeModel *model, + GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) +{ + char *str_a; + char *str_b; + gint result; + + gtk_tree_model_get (model, a, 0, &str_a, -1); + gtk_tree_model_get (model, b, 0, &str_b, -1); + + result = g_utf8_collate (str_a, str_b); + + g_free (str_a); + g_free (str_b); + return result; +} + +static bool select_unit (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, PrintSetupDlg *dlg) +{ + return dlg->SelectUnit(iter); +} + +static void on_unit_changed (PrintSetupDlg *dlg) +{ + dlg->OnUnitChanged (); +} + +static void on_top_margin_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnTopMarginChanged (gtk_spin_button_get_value (btn)); +} + +static void on_bottom_margin_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnBottomMarginChanged (gtk_spin_button_get_value (btn)); +} + +static void on_right_margin_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnRightMarginChanged (gtk_spin_button_get_value (btn)); +} + +static void on_left_margin_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnLeftMarginChanged (gtk_spin_button_get_value (btn)); +} + +static void on_header_height_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnHeaderHeightChanged (gtk_spin_button_get_value (btn)); +} + +static void on_footer_height_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnFooterHeightChanged (gtk_spin_button_get_value (btn)); +} + +static void on_hcenter_changed (PrintSetupDlg *dlg) +{ + dlg->OnHorizCenter (); +} + +static void on_vcenter_changed (PrintSetupDlg *dlg) +{ + dlg->OnVertCenter (); +} + +static void on_scale_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnScale (gtk_spin_button_get_value (btn) / 100.); +} + +static void on_h_fit (GtkToggleButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnHFit (gtk_toggle_button_get_active (btn)); +} + +static void on_v_fit (GtkToggleButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnVFit (gtk_toggle_button_get_active (btn)); +} + +static void on_h_pages_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnHPages (gtk_spin_button_get_value_as_int (btn)); +} + +static void on_v_pages_changed (GtkSpinButton *btn, PrintSetupDlg *dlg) +{ + dlg->OnVPages (gtk_spin_button_get_value_as_int (btn)); +} + +PrintSetupDlg::PrintSetupDlg (Application* App, Printable *printable): + Dialog (App, GLADEDIR"/print-setup.glade", "print-setup", printable), + m_Printable (printable) +{ + GtkWidget *w; + w = glade_xml_get_widget (xml, "print"); + g_signal_connect_swapped (w, "clicked", G_CALLBACK (on_print), this); + w = glade_xml_get_widget (xml, "preview"); + g_signal_connect_swapped (w, "clicked", G_CALLBACK (on_print_preview), this); + w = glade_xml_get_widget (xml, "paper-btn"); + g_signal_connect_swapped (w, "clicked", G_CALLBACK (on_dialog_gtk_printer_setup), this); + // set current page size + m_PageTypeLbl = GTK_LABEL (glade_xml_get_widget (xml, "paper-type-lbl")); + m_PageSizeLbl = GTK_LABEL (glade_xml_get_widget (xml, "paper-size-lbl")); + m_PortraitBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "portrait-btn")); + g_object_set_data ((GObject*) m_PortraitBtn ,"orientation", GINT_TO_POINTER (GTK_PAGE_ORIENTATION_PORTRAIT)); + m_PortraitId = g_signal_connect ((GObject*) m_PortraitBtn, "clicked", G_CALLBACK (on_orientation_changed), this); + m_LandscapeBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "landscape-btn")); + g_object_set_data ((GObject*) m_LandscapeBtn ,"orientation", GINT_TO_POINTER (GTK_PAGE_ORIENTATION_LANDSCAPE)); + m_LandscapeId = g_signal_connect ((GObject*) m_LandscapeBtn, "clicked", G_CALLBACK (on_orientation_changed), this); + m_RPortraitBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "r-portrait-btn")); + g_object_set_data ((GObject*) m_RPortraitBtn ,"orientation", GINT_TO_POINTER (GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT)); + m_RPortraitId = g_signal_connect ((GObject*) m_RPortraitBtn, "clicked", G_CALLBACK (on_orientation_changed), this); + m_RLandscapeBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "r-landscape-btn")); + g_object_set_data ((GObject*) m_RLandscapeBtn ,"orientation", GINT_TO_POINTER (GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE)); + m_RLandscapeId = g_signal_connect ((GObject*) m_RLandscapeBtn, "clicked", G_CALLBACK (on_orientation_changed), this); + m_UnitList = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT); + GtkTreeIter iter; + for (int i = 1; i < 4; i++) { + gtk_list_store_append (m_UnitList, &iter); + gtk_list_store_set (m_UnitList, &iter, + 0, _(gtk_unit_to_string ((GtkUnit) i)), + 1, i, + -1); + } + gtk_tree_sortable_set_default_sort_func + (GTK_TREE_SORTABLE (m_UnitList), + unit_sort_func, NULL, NULL); + gtk_tree_sortable_set_sort_column_id + (GTK_TREE_SORTABLE (m_UnitList), + GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, + GTK_SORT_ASCENDING); + m_UnitBox = GTK_COMBO_BOX (gtk_combo_box_new_with_model (GTK_TREE_MODEL (m_UnitList))); + m_UnitId = g_signal_connect_swapped (m_UnitBox, "changed", G_CALLBACK (on_unit_changed), this); + GtkCellRenderer *text_renderer = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT(m_UnitBox), text_renderer, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT(m_UnitBox), text_renderer, "text", 0); + gtk_table_attach (GTK_TABLE (glade_xml_get_widget (xml, "paper-selector-tbl")), + GTK_WIDGET (m_UnitBox), 3, 4, 8, 9, GTK_FILL, (GtkAttachOptions) 0, 0, 0); + m_MarginTopBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "top-margin-btn")); + m_MarginTopId = g_signal_connect ((GObject*) m_MarginTopBtn, "value-changed", G_CALLBACK (on_top_margin_changed), this); + m_MarginBottomBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bottom-margin-btn")); + m_MarginBottomId = g_signal_connect ((GObject*) m_MarginBottomBtn, "value-changed", G_CALLBACK (on_bottom_margin_changed), this); + m_MarginRightBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "right-margin-btn")); + m_MarginRightId = g_signal_connect ((GObject*) m_MarginRightBtn, "value-changed", G_CALLBACK (on_right_margin_changed), this); + m_MarginLeftBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "left-margin-btn")); + m_MarginLeftId = g_signal_connect ((GObject*) m_MarginLeftBtn, "value-changed", G_CALLBACK (on_left_margin_changed), this); + m_HeaderHeightBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "header-height-btn")); + m_FooterHeightBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "header-height-btn")); + UpdatePageSetup (NULL); + m_HBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "hcenter-btn")); + gtk_toggle_button_set_active (m_HBtn, m_Printable->GetHorizCentered ()); + m_HId = g_signal_connect_swapped ((GObject*) m_HBtn, "toggled", G_CALLBACK (on_hcenter_changed), this); + m_VBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "vcenter-btn")); + gtk_toggle_button_set_active (m_VBtn, m_Printable->GetVertCentered ()); + m_VId = g_signal_connect_swapped ((GObject*) m_VBtn, "toggled", G_CALLBACK (on_vcenter_changed), this); + m_ScalingNoneBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "scale-no-btn")); + g_object_set_data ((GObject*) m_ScalingNoneBtn ,"scale-type", GINT_TO_POINTER (GCU_PRINT_SCALE_NONE)); + m_ScalingNoneId = g_signal_connect ((GObject*) m_ScalingNoneBtn, "clicked", G_CALLBACK (on_scale_type_changed), this); + m_ScalingFixedBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "scale-fixed-btn")); + g_object_set_data ((GObject*) m_ScalingFixedBtn ,"scale-type", GINT_TO_POINTER (GCU_PRINT_SCALE_FIXED)); + m_ScalingFixedId = g_signal_connect ((GObject*) m_ScalingFixedBtn, "clicked", G_CALLBACK (on_scale_type_changed), this); + m_ScalingAutoBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "scale-auto-btn")); + g_object_set_data ((GObject*) m_ScalingAutoBtn ,"scale-type", GINT_TO_POINTER (GCU_PRINT_SCALE_AUTO)); + m_ScalingAutoId = g_signal_connect ((GObject*) m_ScalingAutoBtn, "clicked", G_CALLBACK (on_scale_type_changed), this); + m_HFitBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "scale-fit-h-btn")); + gtk_toggle_button_set_active (m_HFitBtn, m_Printable->GetHorizFit ()); + g_signal_connect ((GObject*) m_HFitBtn, "toggled", G_CALLBACK (on_h_fit), this); + m_VFitBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "scale-fit-v-btn")); + gtk_toggle_button_set_active (m_VFitBtn, m_Printable->GetVertFit ()); + g_signal_connect ((GObject*) m_VFitBtn, "toggled", G_CALLBACK (on_v_fit), this); + m_HPagesBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "scale-h-btn")); + gtk_spin_button_set_value (m_HPagesBtn, m_Printable->GetHPages ()); + g_signal_connect ((GObject*) m_HPagesBtn, "value-changed", G_CALLBACK (on_h_pages_changed), this); + m_FitHLbl = GTK_LABEL (glade_xml_get_widget (xml, "fit-h-lbl")); + m_VPagesBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "scale-v-btn")); + gtk_spin_button_set_value (m_VPagesBtn, m_Printable->GetVPages ()); + g_signal_connect ((GObject*) m_VPagesBtn, "value-changed", G_CALLBACK (on_v_pages_changed), this); + m_FitVLbl = GTK_LABEL (glade_xml_get_widget (xml, "fit-v-lbl")); + m_ScaleBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "scale-percent-btn")); + g_signal_connect ((GObject*) m_ScaleBtn, "value-changed", G_CALLBACK (on_scale_changed), this); + m_ScaleLbl = GTK_LABEL (glade_xml_get_widget (xml, "scale-percent-lbl")); + gtk_spin_button_set_value (m_ScaleBtn, m_Printable->GetScale () * 100.); + UpdateScale (); + if (printable->SupportsHeaders ()) { + m_HeaderHeightId = g_signal_connect ((GObject*) m_HeaderHeightBtn, "value-changed", G_CALLBACK (on_header_height_changed), this); + m_FooterHeightId = g_signal_connect ((GObject*) m_FooterHeightBtn, "value-changed", G_CALLBACK (on_footer_height_changed), this); + } else { + // hide everything related to headers and footers + // first delete the notebook page + GtkNotebook *book = GTK_NOTEBOOK (glade_xml_get_widget (xml, "print-setup-book")); + gtk_notebook_remove_page (book, 2); + // now hide/disable related buttons and labels + gtk_spin_button_set_value (m_HeaderHeightBtn, 0.); + gtk_widget_set_sensitive (glade_xml_get_widget (xml, "header-height-lbl"), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_HeaderHeightBtn), false); + gtk_spin_button_set_value (m_FooterHeightBtn, 0.); + gtk_widget_set_sensitive (glade_xml_get_widget (xml, "footer-height-lbl"), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_FooterHeightBtn), false); + m_HeaderHeightId = m_FooterHeightId = 0; + } + gtk_widget_show_all (GTK_WIDGET (dialog)); +} + +PrintSetupDlg::~PrintSetupDlg () +{ +} + +void PrintSetupDlg::DoPrint (bool preview) +{ + m_Printable->Print (preview); +} + +void PrintSetupDlg::OnPrinterSetup () +{ + gtk_print_run_page_setup_dialog_async + (GetWindow (), + m_Printable->GetPageSetup (), + NULL, + on_dialog_printer_setup_done, + this); +} + +#define TOGGLE_BUTTON(name) \ + g_signal_handler_block (G_OBJECT (m_##name##Btn), m_##name##Id); \ + gtk_toggle_button_set_active (m_##name##Btn, true); \ + g_signal_handler_unblock (G_OBJECT (m_##name##Btn), m_##name##Id); \ + break; + +#define SET_SPIN_BUTTON_VALUE(name,x) \ + g_signal_handler_block (G_OBJECT (m_##name##Btn), m_##name##Id); \ + gtk_spin_button_set_value (m_##name##Btn, x); \ + g_signal_handler_unblock (G_OBJECT (m_##name##Btn), m_##name##Id); \ + switch (m_Printable->GetUnit ()) { \ + case GTK_UNIT_MM: \ + gtk_spin_button_set_digits (m_##name##Btn, 1); \ + gtk_spin_button_set_increments (m_##name##Btn, 1., 0.); \ + break; \ + case GTK_UNIT_INCH: \ + gtk_spin_button_set_digits (m_##name##Btn, 3); \ + gtk_spin_button_set_increments (m_##name##Btn, 0.125, 0.); \ + break; \ + case GTK_UNIT_POINTS: \ + gtk_spin_button_set_digits (m_##name##Btn, 1); \ + gtk_spin_button_set_increments (m_##name##Btn, 1., 0.); \ + break; \ + case GTK_UNIT_PIXEL: \ + break; \ + } + +void PrintSetupDlg::UpdatePageSetup (GtkPageSetup *page_setup) +{ + if (page_setup) + m_Printable->SetPageSetup (page_setup); + GtkPaperSize *size = gtk_page_setup_get_paper_size (m_Printable->GetPageSetup ()); + gtk_label_set_text (m_PageTypeLbl, gtk_paper_size_get_display_name (size)); + char const *unit = _(gtk_unit_to_string (m_Printable->GetUnit ())); + char *buf = g_strdup_printf (((m_Printable->GetUnit () == GTK_UNIT_INCH)? _("%.1f %s wide by %.1f %s tall"): _("%.0f %s wide by %.0f %s tall")), + gtk_paper_size_get_width (size, m_Printable->GetUnit ()), unit, + gtk_paper_size_get_height (size, m_Printable->GetUnit ()), unit); + gtk_label_set_text (m_PageSizeLbl, buf); + g_free (buf); + switch (gtk_page_setup_get_orientation (m_Printable->GetPageSetup ())) { + case GTK_PAGE_ORIENTATION_PORTRAIT: + TOGGLE_BUTTON (Portrait) + case GTK_PAGE_ORIENTATION_LANDSCAPE: + TOGGLE_BUTTON (Landscape) + case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT: + TOGGLE_BUTTON (RPortrait) + case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE: + TOGGLE_BUTTON (RLandscape) + } + g_signal_handler_block (G_OBJECT (m_UnitBox), m_UnitId); + gtk_tree_model_foreach (GTK_TREE_MODEL (m_UnitList), (GtkTreeModelForeachFunc) select_unit, this); + g_signal_handler_unblock (G_OBJECT (m_UnitBox), m_UnitId); + SET_SPIN_BUTTON_VALUE (MarginTop, gtk_page_setup_get_top_margin (m_Printable->GetPageSetup (), m_Printable->GetUnit ())); + SET_SPIN_BUTTON_VALUE (MarginBottom, gtk_page_setup_get_bottom_margin (m_Printable->GetPageSetup (), m_Printable->GetUnit ())); + SET_SPIN_BUTTON_VALUE (MarginRight, gtk_page_setup_get_right_margin (m_Printable->GetPageSetup (), m_Printable->GetUnit ())); + SET_SPIN_BUTTON_VALUE (MarginLeft, gtk_page_setup_get_left_margin (m_Printable->GetPageSetup (), m_Printable->GetUnit ())); +} + +void PrintSetupDlg::OnOrientation (GtkPageOrientation orientation) +{ + if (gtk_page_setup_get_orientation (m_Printable->GetPageSetup ()) != orientation) { + gtk_page_setup_set_orientation (m_Printable->GetPageSetup (), orientation); + switch (orientation) { + case GTK_PAGE_ORIENTATION_PORTRAIT: + TOGGLE_BUTTON (Portrait) + case GTK_PAGE_ORIENTATION_LANDSCAPE: + TOGGLE_BUTTON (Landscape) + case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT: + TOGGLE_BUTTON (RPortrait) + case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE: + TOGGLE_BUTTON (RLandscape) + } + } +} + +bool PrintSetupDlg::SelectUnit (GtkTreeIter *iter) +{ + GtkUnit unit; + gtk_tree_model_get (GTK_TREE_MODEL (m_UnitList), iter, 1, &unit, -1); + if (unit == m_Printable->GetUnit ()) { + gtk_combo_box_set_active_iter (m_UnitBox, iter); + return true; + } + return false; +} + +void PrintSetupDlg::OnUnitChanged () +{ + GtkTreeIter iter; + if (gtk_combo_box_get_active_iter (m_UnitBox, &iter)) { + GtkUnit unit; + gtk_tree_model_get (GTK_TREE_MODEL (m_UnitList), &iter, 1, &unit, -1); + m_Printable->SetUnit (unit); + UpdatePageSetup (NULL); // use the new unit for display + } +} + +void PrintSetupDlg::OnTopMarginChanged (double x) +{ + gtk_page_setup_set_top_margin (m_Printable->GetPageSetup (), x, m_Printable->GetUnit ()); +} + +void PrintSetupDlg::OnBottomMarginChanged (double x) +{ + gtk_page_setup_set_bottom_margin (m_Printable->GetPageSetup (), x, m_Printable->GetUnit ()); +} + +void PrintSetupDlg::OnRightMarginChanged (double x) +{ + gtk_page_setup_set_right_margin (m_Printable->GetPageSetup (), x, m_Printable->GetUnit ()); +} + +void PrintSetupDlg::OnLeftMarginChanged (double x) +{ + gtk_page_setup_set_left_margin (m_Printable->GetPageSetup (), x, m_Printable->GetUnit ()); +} + +void PrintSetupDlg::OnHeaderHeightChanged (double x) +{ +} + +void PrintSetupDlg::OnFooterHeightChanged (double x) +{ +} + +void PrintSetupDlg::OnHorizCenter () +{ + m_Printable->SetHorizCentered (gtk_toggle_button_get_active (m_HBtn)); +} + +void PrintSetupDlg::OnVertCenter () +{ + m_Printable->SetVertCentered (gtk_toggle_button_get_active (m_VBtn)); +} + +void PrintSetupDlg::UpdateScale () +{ + switch (m_Printable->GetScaleType ()) { + case GCU_PRINT_SCALE_NONE: + gtk_widget_set_sensitive (GTK_WIDGET (m_HFitBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_VFitBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_HPagesBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_FitHLbl), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_VPagesBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_FitVLbl), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_ScaleBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_ScaleLbl), false); + TOGGLE_BUTTON (ScalingNone) + break; + case GCU_PRINT_SCALE_FIXED: + gtk_widget_set_sensitive (GTK_WIDGET (m_HFitBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_VFitBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_HPagesBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_FitHLbl), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_VPagesBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_FitVLbl), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_ScaleBtn), true); + gtk_widget_set_sensitive (GTK_WIDGET (m_ScaleLbl), true); + TOGGLE_BUTTON (ScalingFixed) + break; + case GCU_PRINT_SCALE_AUTO: { + bool has_pages = m_Printable->SupportMultiplePages () && m_Printable->GetHorizFit (); + gtk_widget_set_sensitive (GTK_WIDGET (m_HFitBtn), true); + gtk_widget_set_sensitive (GTK_WIDGET (m_VFitBtn), true); + gtk_widget_set_sensitive (GTK_WIDGET (m_HPagesBtn), has_pages); + gtk_widget_set_sensitive (GTK_WIDGET (m_FitHLbl), has_pages); + gtk_widget_set_sensitive (GTK_WIDGET (m_VPagesBtn), has_pages); + gtk_widget_set_sensitive (GTK_WIDGET (m_FitVLbl), has_pages); + gtk_widget_set_sensitive (GTK_WIDGET (m_ScaleBtn), false); + gtk_widget_set_sensitive (GTK_WIDGET (m_ScaleLbl), false); + TOGGLE_BUTTON (ScalingAuto) + break; + } + } +} + +void PrintSetupDlg::OnScaleType (PrintScaleType type) +{ + m_Printable->SetScaleType (type); + UpdateScale (); +} + +void PrintSetupDlg::OnScale (double scale) +{ + m_Printable->SetScale (scale); +} + +void PrintSetupDlg::OnHFit (bool fit) +{ + m_Printable->SetHorizFit (fit); +} + +void PrintSetupDlg::OnVFit (bool fit) +{ + m_Printable->SetVertFit (fit); +} + +void PrintSetupDlg::OnHPages (int pages) +{ + m_Printable->SetHPages (pages); +} + +void PrintSetupDlg::OnVPages (int pages) +{ + m_Printable->SetVPages (pages); +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/print-setup-dlg.h gnome-chemistry-utils-0.10.9/libs/gcu/print-setup-dlg.h --- gnome-chemistry-utils-0.8.6/libs/gcu/print-setup-dlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/print-setup-dlg.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,90 @@ +/* + * Gnome Chemistry Utils + * print-setup-dlg.h + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_PRINT_SETUP_DLG_H +#define GCU_PRINT_SETUP_DLG_H + +#include "dialog.h" +#include "printable.h" + +/*!\file*/ +namespace gcu { + +class Application; + +/*!\class PrintSetupDlg gcu/print-setup-dlg.h +The print setup dialog. +*/ +class PrintSetupDlg: public Dialog +{ +public: +/*! +@param App the application. +@param printable the printable object. + +Builds and shows a print setup dialog for the gcu::Printable instance. +*/ + PrintSetupDlg (Application* App, Printable *printable); + virtual ~PrintSetupDlg (); + + void DoPrint (bool preview); + void OnPrinterSetup (); + void UpdatePageSetup (GtkPageSetup *page_setup); + void OnOrientation (GtkPageOrientation orientation); + bool SelectUnit (GtkTreeIter *iter); + void OnUnitChanged (); + void OnTopMarginChanged (double x); + void OnBottomMarginChanged (double x); + void OnRightMarginChanged (double x); + void OnLeftMarginChanged (double x); + void OnHeaderHeightChanged (double x); + void OnFooterHeightChanged (double x); + void OnHorizCenter (); + void OnVertCenter (); + void UpdateScale (); + void OnScaleType (PrintScaleType type); + void OnScale (double scale); + void OnHFit (bool fit); + void OnVFit (bool fit); + void OnHPages (int pages); + void OnVPages (int pages); + +private: + Printable *m_Printable; + GtkLabel *m_PageSizeLbl, *m_PageTypeLbl; + GtkToggleButton *m_PortraitBtn, *m_RPortraitBtn, *m_LandscapeBtn, *m_RLandscapeBtn; + gulong m_PortraitId, m_RPortraitId, m_LandscapeId, m_RLandscapeId; + GtkSpinButton *m_MarginTopBtn, *m_MarginBottomBtn, *m_MarginRightBtn, *m_MarginLeftBtn, *m_HeaderHeightBtn, *m_FooterHeightBtn; + gulong m_MarginTopId, m_MarginBottomId, m_MarginRightId, m_MarginLeftId, m_HeaderHeightId, m_FooterHeightId; + GtkListStore *m_UnitList; + GtkComboBox *m_UnitBox; + GtkToggleButton *m_HBtn, *m_VBtn; + gulong m_UnitId, m_HId, m_VId; + GtkToggleButton *m_ScalingNoneBtn, *m_ScalingFixedBtn, *m_ScalingAutoBtn, *m_HFitBtn, *m_VFitBtn; + gulong m_ScalingNoneId, m_ScalingFixedId, m_ScalingAutoId, m_HFitId, m_VFitId; + GtkSpinButton *m_HPagesBtn, *m_VPagesBtn, *m_ScaleBtn; + GtkLabel *m_ScaleLbl, *m_FitHLbl, *m_FitVLbl; +}; + +} // namespace gcu + +#endif // GCU_PRINT_SETUP_DLG_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/residue.cc gnome-chemistry-utils-0.10.9/libs/gcu/residue.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/residue.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/residue.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,255 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * residue.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "document.h" +#include "element.h" +#include "molecule.h" +#include "object.h" +#include "residue.h" +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace gcu { + +class ResiduesTable { +public: + ResiduesTable (); + ~ResiduesTable (); + + map rtbs; // indexed by symbols + map rtbn; // indexed by name +}; + +ResiduesTable::ResiduesTable () +{ +} + +ResiduesTable::~ResiduesTable () +{ + while (!rtbn.empty ()) + delete (*rtbn.begin ()).second; +} + +static ResiduesTable tbl; + +Residue::Residue (): + m_Name (NULL), + m_Generic (false), + m_Document (NULL), + m_Molecule (NULL), + m_Owner (NULL) +{ +} + +Residue::Residue (char const *name, Document *doc): + m_Generic (false), + m_Document (NULL), + m_Molecule (NULL), + m_Owner (doc) +{ + if (name) { + m_Name = g_strdup (name); + if (!m_Owner) + tbl.rtbn[name] = this; + } else + m_Name = NULL; +} + +Residue::~Residue () +{ + if (!m_Owner) { + if (m_Name) + tbl.rtbn.erase (m_Name); + std::map::iterator i, end = m_Symbols.end (); + for (i = m_Symbols.begin (); i != end ; i++) + tbl.rtbs.erase ((*i).first); + } + g_free (const_cast (m_Name)); + if (m_Document) + delete m_Document; +} + +unsigned Residue::MaxSymbolLength = 0; + +void Residue::SetName (char const *name) +{ + if (!m_Owner && m_Name) + tbl.rtbn.erase (m_Name); + g_free (const_cast (m_Name)); + m_Name = g_strdup (name); + if (!m_Owner) + tbl.rtbn[name] = this; +} + +void Residue::AddSymbol (char const *symbol) +{ + bool ambiguous = Element::Z (symbol) > 0; + m_Symbols[symbol] = ambiguous; + if (!m_Owner) { + tbl.rtbs[symbol].res = this; + tbl.rtbs[symbol].ambiguous = ambiguous; + } + unsigned l = strlen (symbol); + if (l > MaxSymbolLength) + MaxSymbolLength = l; +} + +void Residue::RemoveSymbol (char const *symbol) +{ + m_Symbols.erase (symbol); + if (!m_Owner) + tbl.rtbs.erase (symbol); +} + +void Residue::Load (xmlNodePtr node) +{ + static char *lang = getenv ("LANG"); + if (m_Name) + return; + char *buf = reinterpret_cast (xmlGetProp (node, reinterpret_cast ("generic"))); + if (buf) { + if (!strcmp (buf, "true")) + m_Generic = true; + xmlFree (buf); + } + buf = reinterpret_cast (xmlGetProp (node, reinterpret_cast ("raw"))); + if (buf) { + int i = 0, j = 1, n, z = strlen (buf); + char *end; + while (i < z) { + while (buf[j] > '9') + j++; + n = strtol (buf + j, &end, 10); + buf[j] = 0; + m_Raw[Element::Z (buf + i)] = n; + i = end - buf; + j = i + 1; + } + xmlFree (buf); + } + xmlNodePtr child = node->children; + char *name = NULL, *node_lang, *symbols; + bool lang_matched = false; + while (child) { + if (!strcmp (reinterpret_cast (child->name), "name")) { + node_lang = (char*) xmlNodeGetLang (child); + if (node_lang) { + if (lang) { + if (!strcmp (lang, node_lang) || (!lang_matched && !strncmp (lang, node_lang, 2))) { + if (name) + xmlFree (name); + name = reinterpret_cast (xmlNodeGetContent (child)); + lang_matched = true; + } + } + } else if (!lang_matched) { + if (name) + xmlFree (name); + name = reinterpret_cast (xmlNodeGetContent (child)); + } + m_Names[(node_lang)? node_lang: "C"] = reinterpret_cast (xmlNodeGetContent (child)); + if (node_lang) + xmlFree (node_lang); + } else if (!strcmp (reinterpret_cast (child->name), "symbols")) { + symbols = reinterpret_cast (xmlNodeGetContent (child)); + std::istringstream s(symbols); + char buf[10]; + while (!s.eof ()) { + s.getline(buf, 10, ';'); + if (strlen (buf) > 8) { + // Symbols longer than 8 chars are not currently allowed + cerr << "Symbol \"" << buf << "\" has more than eight characters and is not allowed" << endl; + delete this; + return; + } else if (!m_Owner) { + if (GetResidue (buf) != NULL) { + cerr << "A residue with symbol \"" << buf << "\" already exists" << endl; + delete this; + return; + } + AddSymbol (buf); + } + } + xmlFree (symbols); + } else if (!strcmp (reinterpret_cast (child->name), "molecule") && m_Molecule == NULL) { + m_Document = dynamic_cast (Object::CreateObject ("document")); + if (m_Document) { + m_Molecule = dynamic_cast (Object::CreateObject ("molecule", m_Document)); + if (m_Molecule) + m_Molecule->Load (child); + } + } + child = child->next; + } + if (!m_Owner) { + if (name) { + if (GetResiduebyName (name) != NULL) { + cerr << "A residue named \"" << name << "\" already exists" << endl; + delete this; + return; + } + SetName (name); + xmlFree (name); + } else + delete this; + } +} + +Residue const *Residue::GetResidue (char const *symbol, bool *ambiguous) +{ + map::iterator i = tbl.rtbs.find (symbol); + if (i != tbl.rtbs.end ()) { + if (ambiguous) + *ambiguous = (*i).second.ambiguous; + return (*i).second.res; + } else + return NULL; +} + +Residue const *Residue::GetResiduebyName (char const *name) +{ + map::iterator i = tbl.rtbn.find (name); + return (i != tbl.rtbn.end ())? (*i).second: NULL; +} + +string const *Residue::GetFirstResidueSymbol (ResidueIterator &i) +{ + i = tbl.rtbs.begin (); + return (i == tbl.rtbs.end ())? NULL: &(*i).first; +} + +string const *Residue::GetNextResidueSymbol (ResidueIterator &i) +{ + i++; + return (i == tbl.rtbs.end ())? NULL: &(*i).first; +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/residue.h gnome-chemistry-utils-0.10.9/libs/gcu/residue.h --- gnome-chemistry-utils-0.8.6/libs/gcu/residue.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/residue.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,222 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * residue.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_RESIDUE_H +#define GCU_RESIDUE_H + +#include "macros.h" +#include +#include +#include +#include + +/*!\file*/ +namespace gcu { + +class Residue; +class Molecule; +class Document; + +/*!\struct SymbolResidue gcu/residue.h +Structure used to store a collection of standard atoms groups, ndexed by symbol. +*/ +typedef struct { +/*! +The Residue* representing the atoms group. A symbol is ambiguous if it can also +represent a single atom, such as Ac, or Pr. +Two Residue instances can't share the same symbol. +*/ + Residue *res; +/*! +whether the symbol is ambiguous. +*/ + bool ambiguous; +} SymbolResidue; + +typedef std::map::iterator ResidueIterator; + +/*!\class Residue gcu/residue.h +Represents the meaning of group symbols, such as Me, Ph or Bz. They have one +or more associated symbols and a molecule which atoms and bonds are represented +by the symbol. The molecule starts from a pseudo-atom with Z = 0, which +represents the atom linked to the group. Currently only one pseudo-atom with +one single bond to the group is allowed. +*/ +class Residue +{ +public: +/*! +Creates a residue. +*/ + Residue (); +/*! +@param name the name of the residue. +@param doc the document owning the residue when it does not have global scope. + +Creates a residue and sets its name. +*/ + Residue (char const *name, Document *doc = NULL); +/*! +The destructor. +*/ + virtual ~Residue (); + +/*! +@return the raw formula of the residue as a map of integers (number of atoms +of an element) indexed by the atomic number of the element. + +The following code gives the number of carbon atoms: +\code + Residue *residue; + ... // initialize the residue + cout << "the residue has " << residue->GetRawFormula ()[6] << " carbon atoms." << endl; + +\endcode + +*/ + std::map const &GetRawFormula () const {return m_Raw;} +/*! +@return the symbols of the atoms group as a std::map. The symbols index boolean +values telling whether the symbol is ambiguous or not. + +A symbol is ambiguous if it can also represent a single atom, such as Ac, or Pr. +*/ + std::map const &GetSymbols () const {return m_Symbols;} +/*! +@return the names of the atoms group, as a std::map indexed by the +correspondig locale. +*/ + std::map const &GetNames () const {return m_Names;} +/*! +@param name the name to give to the Residue. +*/ + void SetName (char const *name); +/*! +@param symbol a chemical symbol. + +Adds \a symbol to the list of valid symbols for the atoms group. +*/ + void AddSymbol (char const *symbol); +/*! +@param symbol a chemical symbol. + +Removes \a symbol from the list of valid symbols for the atoms group. +*/ + void RemoveSymbol (char const *symbol); +/*! +@param node a XMLNode* representing the residue. + +loads the residu from an XML file. +*/ + virtual void Load (xmlNodePtr node); +/*! +@param symbol the symbol for which a Residue* is searched. +@param ambiguous where to store the boolean telling if the symbol is ambiguous +or NULL. + +@return the Residue* found or NULL. +*/ + static Residue const *GetResidue (char const *symbol, bool *ambiguous = NULL); +/*! +@param name the name for which a Residue* is searched. + +@return the Residue* found or NULL. +*/ + static Residue const *GetResiduebyName (char const *name); +/*! +@param i an iterator. + +Used to iterate through all known atoms groups and their symbols. Initializes +the iterator. +@return the first known symbol. If not NULL, the iterator gives access to +the associated Residue througn a gcu::SymbolResidue structure. +*/ + static std::string const *GetFirstResidueSymbol (ResidueIterator &i); +/*! +@param i an iterator initialized by Residue::GetFirstResidueSymbol. + +Used to iterate through all known atoms groups and their symbols. Initializes +the iterator. +@return the next known symbol. If not NULL, the iterator gives access to +the associated Residue through a gcu::SymbolResidue structure. + +*/ + static std::string const *GetNextResidueSymbol (ResidueIterator &i); +/*! +@param mol a molecule to compare to the atoms group. +@return true if the molecule is the same as the one associated with \a this. +*/ + virtual bool operator== (Molecule const &mol) const {return false;} + +public: +/*! +@return the maxium length of all known symbols. This is used by the framework +when parsing a string formula. +*/ + static unsigned MaxSymbolLength; + +private: + std::map m_Raw; + std::map m_Symbols; // boolean is true if the symbol is ambiguous + std::map m_Names; + +/*!\fn GetName() +@return the name of the Residue instance. +*/ +GCU_RO_PROP (char const *, Name) +/*!\fn SetGeneric(bool Generic) +@param Generic whether the symbol is a generic symbol or not. + +Generic symbols are such symbols as R, Ar, or X which might represent various +atoms or groups of atoms. When expanded, they will be replaced by a default +value, for example, R will expand to a methyl, and Ar to a phenyl group. +*/ +/*!\fn GetGeneric() +@return whether the symbol is a generic symbol or not. +*/ +/*!\fn GetRefGeneric() +@return whether the symbol is a generic symbol or not as a reference to a +boolean variable. +*/ +GCU_PROP (bool, Generic) +/*!\fn GetDocument() +Returns the gcu::Document* used to store the molecule associated with +the atoms group. +*/ +GCU_PROT_POINTER_PROP (Document, Document); +/*!\fn GetMolecule() +Returns the gcu::Molecule* describing the structure of the atoms group. + +*/ +GCU_PROT_POINTER_PROP (Molecule, Molecule); +/*!\fn GetOwner() +@return the Document for which the Residue is valid. If NULL, +the Residue is of global scope. +*/ +GCU_RO_PROP (Document *, Owner) +}; + +} // namespace gcu + +#endif // GCU_RESIDUE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/spectrumdoc.cc gnome-chemistry-utils-0.10.9/libs/gcu/spectrumdoc.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/spectrumdoc.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/spectrumdoc.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,2192 @@ +/* + * Gnome Chemisty Utils + * spectrumdoc.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "spectrumdoc.h" +#include "spectrumview.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +# ifndef GOG_TYPE_SERIES_LINES +# define GOG_TYPE_SERIES_LINES GOG_SERIES_LINES_TYPE +# define GOG_TYPE_AXIS GOG_AXIS_TYPE +# include +# define GOStyle GogStyle +# define go_styled_object_get_style gog_styled_object_get_style +# define GO_STYLED_OBJECT GOG_STYLED_OBJECT +# define GOStyledObject GogStyledObject +# else +# include +# include +# endif +# include +# include +# include +# include +# include +#else +# include "goffice-compat.h" +#endif +#include +#include +#include +#include +#include + +using namespace std; + +namespace gcu +{ + +SpectrumDocument::SpectrumDocument (): + Document (NULL), + Printable (), + m_XAxisInvertBtn (NULL), + m_Empty (true) +{ + m_View = new SpectrumView (this); + x = y = NULL; + X = Y = R = I = integral = Rt = It = Rp = -1; + npoints = 0; + maxx = maxy = minx = miny = go_nan; + firstx = lastx = deltax = firsty = go_nan; + freq = offset = refpoint = go_nan; + gtk_page_setup_set_orientation (GetPageSetup (), GTK_PAGE_ORIENTATION_LANDSCAPE); + SetScaleType (GCU_PRINT_SCALE_AUTO); + SetHorizFit (true); + SetVertFit (true); + m_IntegralVisible = false; +} + +SpectrumDocument::SpectrumDocument (Application *App, SpectrumView *View): + Document (App), + Printable (), + m_XAxisInvertBtn (NULL), + m_Empty (true) +{ + m_View = (View)? View: new SpectrumView (this); + x = y = NULL; + X = Y = R = I = integral = Rt = It = Rp = -1; + npoints = 0; + maxx = maxy = minx = miny = go_nan; + firstx = lastx = deltax = firsty = go_nan; + freq = offset = refpoint = go_nan; + gtk_page_setup_set_orientation (GetPageSetup (), GTK_PAGE_ORIENTATION_LANDSCAPE); + SetScaleType (GCU_PRINT_SCALE_AUTO); + SetHorizFit (true); + SetVertFit (true); + m_IntegralVisible = false; +} + +SpectrumDocument::~SpectrumDocument () +{ + if (x && X < 0) + delete[] x; + if (y && Y < 0) + delete[] y; + for (unsigned i = 0; i < variables.size (); i++) + if (variables[i].Values) + delete [] variables[i].Values; +} + +void SpectrumDocument::Load (char const *uri, char const *mime_type) +{ + // Only supporting JCAMP-DX at the moment + if (!mime_type || strcmp (mime_type, "chemical/x-jcamp-dx")) { + return; + } + GVfs *vfs = g_vfs_get_default (); + GFile *file = g_vfs_get_file_for_uri (vfs, uri); + GError *error = NULL; + GFileInfo *info = g_file_query_info (file, + G_FILE_ATTRIBUTE_STANDARD_SIZE, + G_FILE_QUERY_INFO_NONE, + NULL, &error); + if (error) { + g_message ("GIO querry failed: %s", error->message); + g_error_free (error); + g_object_unref (file); + return; + } + gsize size = g_file_info_get_size (info); + g_object_unref (info); + GInputStream *input = G_INPUT_STREAM (g_file_read (file, NULL, &error)); + if (error) { + g_message ("GIO could not create the stream: %s", error->message); + g_error_free (error); + g_object_unref (file); + return; + } + gchar *buf = new gchar[size + 1]; + gsize n = size; + while (n) { + n -= g_input_stream_read (input, buf, size, NULL, &error); + if (error) { + g_message ("GIO could not read the file: %s", error->message); + g_error_free (error); + delete [] buf; + g_object_unref (input); + g_object_unref (file); + return; + } + } + buf[size] = 0; + LoadJcampDx (buf); + if (m_App) { + char *dirname = g_path_get_dirname (uri); + m_App->SetCurDir (dirname); + g_free (dirname); + } + delete [] buf; + g_object_unref (file); + +} + +struct data_type_struct { + int n; // number of variables + bool comma_sep; // whether the separator is a comma + bool one_per_line; // whether each line has only one data set + bool explicit_indep; // whether the independent variable is explicit + char *variables; // each letter is a variable symbol, must be freed +}; + +static void parse_data_type (char const *type, struct data_type_struct &s) +{ + // initialize s + s.variables = NULL; // if still NULL when returning, an error occurred + s.n = 0; + s.one_per_line = false; + s.comma_sep = false; + s.explicit_indep = true; + string variables; + if (*type != '(') + return; + type++; + if (*type < 'A' || *type > 'Z') + return; + variables += *type; //first variable symbol + type++; + switch (*type) { + case ',': + s.comma_sep = true; + type++; + break; + case '+': + if (type[1] != '+') + return; + s.explicit_indep = false; + type += 2; + while (*type == '(' || *type == ')') + type++; + break; + default: + break; + } + // at this point *type should be the second variable symbol + if (*type < 'A' || *type > 'Z') + return; + variables += *type; //second variable symbol + type++; + // add additional variables if any + while (*type == ',' || (*type >= 'A' && *type <= 'Z')) { + if (*type != ',') + variables += *type; + type++; + } + while (*type == ' ') + type++; + s.one_per_line = !(*type == '.'); + s.n = variables.length (); + if (s.n > 0) + s.variables = g_strdup (variables.c_str ()); +} + +char const *Types[] = { + "INFRARED SPECTRUM", + "RAMAN SPECTRUM", + "INFRARED PEAK TABLE", + "INFRARED INTERFEROGRAM", + "INFRARED TRANSFORMED SPECTRUM", + "UV-VISIBLE SPECTRUM", + "NMR SPECTRUM", + "NMR FID", + "NMR PEAK TABLE", + "NMR PEAK ASSIGNMENTS", + "MASS SPECTRUM" +}; + +char const *Units[] = { + "1/CM", + "TRANSMITTANCE", + "ABSORBANCE", + "PPM", + "NANOMETERS", + "MICROMETERS", + "SECONDS", + "HZ", + "M/Z", + "RELATIVE ABUNDANCE" +}; + +char const *UnitNames[] = { + N_("Wavenumber (1/cm)"), + N_("Transmittance"), + N_("Absorbance"), + N_("Chemical shift (ppm)"), + N_("Wavelength (nm)"), + N_("Wavelength (µm)"), + N_("Time (s)"), + N_("Frequency (Hz)"), + N_("Mass/charge ratio"), + N_("Relative abundance") +}; + +char const *VarTypes[] = { + "INDEPENDENT", + "DEPENDENT", + "PAGE" +}; + +char const *Formats[] = { + "ASDF", + "AFFN", + "PAC", + "SQZ", + "DIF" +}; + +int get_spectrum_data_from_string (char const *type, char const *names[], int max) +{ + int res = 0; + char *up = g_ascii_strup (type, -1); + while (res < max) { + if (!strncmp (up, names[res], strlen (names[res]))) { + g_free (up); + return res; + } + res++; + } + g_free (up); + return res; +} + +char const *Keys[] = { + "TITLE", + "JCAMPDX", + "DATATYPE", + "DATACLASS", + "APPLICATION", + "DICTIONARY", + "BLOCKS", + "BLOCKID", + "END", + "XYDATA", + "XYPOINTS", + "XYPAIRS", + "PEAKTABLE", + "PEAKASSIGNMENTS", + "RADATA", + "XUNITS", + "YUNITS", + "XLABEL", + "YLABEL", + "XFACTOR", + "YFACTOR", + "FIRSTX", + "LASTX", + "NPOINTS", + "FIRSTY", + "MAXX", + "MINX", + "MAXY", + "MINY", + "RUNITS", + "AUNITS", + "FIRSTR", + "LASTR", + "MAXA", + "MINA", + "RFACTOR", + "AFACTOR", + "FIRSTA", + "ALIAS", + "ZPD", + "NTUPLES", + "VARNAME", + "SYMBOL", + "VARTYPE", + "VARFORM", + "VARDIM", + "UNITS", + "FIRST", + "LAST", + "MIN", + "MAX", + "FACTOR", + "PAGE", + "DATATABLE", + "DELTAX", + "CLASS", + "ORIGIN", + "OWNER", + "DATE", + "TIME", + "SOURCEREFERENCE", + "CROSSREFERENCE", + "SPECTROMETER", + "DATASYSTEM", + "INSTRUMENTPARAMETERS", + "SAMPLEDESCRIPTION", + "CASNAME", + "NAMES", + "MOLEFORM", + "CASREGISTRYNO", + "WISWESSER", + "BEILSTEINLAWSONNO", + "MP", + "BP", + "REFRACTIVEINDEX", + "DENSITY", + "MW", + "CONCENTRATIONS", + "SAMPLINGPROCEDURE", + "STATE", + "PATHLENGTH", + "PRESSURE", + "TEMPERATURE", + "DATAPROCESSING", + "SPECTROMETERTYPE", + "INLET", + "IONIZATIONMODE", + "INLETTEMPERATURE", + "SOURCETEMPERATURE", + "IONIZATIONENERGY", + "ACCELERATINGVOLTAGE", + "TOTALIONCURRENT", + "ACQUISITIONRANGE", + "DETECTOR", + "SCANNUMBER", + "RETENTIONTIME", + "BASEPEAK", + "BASEPEAKINTENSITY", + "RIC", + "NOMINALMASS", + "MONOISOTOPICMASS", + "OBSERVEFREQUENCY", + "OBSERVENUCLEUS", + "SOLVENTREFERENCE", + "DELAY", + "ACQUISITIONMODE", + "FIELD", + "DECOUPLER", + "FILTERWIDTH", + "ACQUISITIONTIME", + "ZEROFILL", + "AVERAGES", + "DIGITIZERRES", + "SPINNINGRATE", + "PHASE0", + "PHASE1", + "MININTENSITY", + "MAXINTENSITY", + "OBSERVE90", + "COUPLINGCONSTANTS", + "RELAXATIONTIMES", +/* Brücker specific data */ + "$OFFSET", + "$REFERENCEPOINT", + NULL +}; + +enum { + JCAMP_INVALID = -10, + JCAMP_UNKNOWN, + JCAMP_CONTINUE, + JCAMP_TITLE = 0, + JCAMP_JCAMP_DX, + JCAMP_DATA_TYPE, + JCAMP_DATACLASS, + JCAMP_APPLICATION, + JCAMP_DICTIONARY, + JCAMP_BLOCKS, + JCAMP_BLOCK_ID, + JCAMP_END, + JCAMP_XYDATA, + JCAMP_XYPOINTS, + JCAMP_XYPAIRS, + JCAMP_PEAK_TABLE, + JCAMP_PEAK_ASSIGNMENTS, + JCAMP_RADATA, + JCAMP_XUNITS, + JCAMP_YUNITS, + JCAMP_XLABEL, + JCAMP_YLABEL, + JCAMP_XFACTOR, + JCAMP_YFACTOR, + JCAMP_FIRSTX, + JCAMP_LASTX, + JCAMP_NPOINTS, + JCAMP_FIRSTY, + JCAMP_MAXX, + JCAMP_MINX, + JCAMP_MAXY, + JCAMP_MINY, + JCAMP_RUNITS, + JCAMP_AUNITS, + JCAMP_FIRSTR, + JCAMP_LASTR, + JCAMP_MAXA, + JCAMP_MINA, + JCAMP_RFACTOR, + JCAMP_AFACTOR, + JCAMP_FIRSTA, + JCAMP_ALIAS, + JCAMP_ZPD, + JCAMP_NTUPLES, + JCAMP_VAR_NAME, + JCAMP_SYMBOL, + JCAMP_VAR_TYPE, + JCAMP_VAR_FORM, + JCAMP_VAR_DIM, + JCAMP_UNITS, + JCAMP_FIRST, + JCAMP_LAST, + JCAMP_MIN, + JCAMP_MAX, + JCAMP_FACTOR, + JCAMP_PAGE, + JCAMP_DATA_TABLE, + JCAMP_DELTAX, + JCAMP_CLASS, + JCAMP_ORIGIN, + JCAMP_OWNER, + JCAMP_DATE, + JCAMP_TIME, + JCAMP_SOURCE_REFERENCE, + JCAMP_CROSS_REFERENCE, + JCAMP_SPECTROMETER, + JCAMP_DATASYSTEM, + JCAMP_INSTRUMENT_PARAMETERS, + JCAMP_SAMPLE_DESCRIPTION, + JCAMP_CAS_NAME, + JCAMP_NAMES, + JCAMP_MOLEFORM, + JCAMP_CAS_REGISTRY_NO, + JCAMP_WISWESSER, + JCAMP_BEILSTEIN_LAWSON_NO, + JCAMP_MP, + JCAMP_BP, + JCAMP_REFRACTIVE_INDEX, + JCAMP_DENSITY, + JCAMP_MW, + JCAMP_CONCENTRATIONS, + JCAMP_SAMPLING_PROCEDURE, + JCAMP_STATE, + JCAMP_PATH_LENGTH, + JCAMP_PRESSURE, + JCAMP_TEMPERATURE, + JCAMP_DATA_PROCESSING, + JCAMP_SPECTROMETER_TYPE, + JCAMP_INLET, + JCAMP_IONIZATION_MODE, + JCAMP_INLET_TEMPERATURE, + JCAMP_SOURCE_TEMPERATURE, + JCAMP_IONIZATION_ENERGY, + JCAMP_ACCELERATING_VOLTAGE, + JCAMP_TOTAL_ION_CURRENT, + JCAMP_ACQUISITION_RANGE, + JCAMP_DETECTOR, + JCAMP_SCAN_NUMBER, + JCAMP_RETENTION_TIME, + JCAMP_BASE_PEAK, + JCAMP_BASE_PEAK_INTENSITY, + JCAMP_RIC, + JCAMP_NOMINAL_MASS, + JCAMP_MONOISOTOPIC_MASS, + JCAMP_OBSERVE_FREQUENCY, + JCAMP_OBSERVE_NUCLEUS, + JCAMP_SOLVENT_REFERENCE, + JCAMP_DELAY, + JCAMP_ACQUISITION_MODE, + JCAMP_FIELD, + JCAMP_DECOUPLER, + JCAMP_FILTER_WIDTH, + JCAMP_ACQUISITION_TIME, + JCAMP_ZERO_FILL, + JCAMP_AVERAGES, + JCAMP_DIGITIZER_RES, + JCAMP_SPINNING_RATE, + JCAMP_PHASE_0, + JCAMP_PHASE_1, + JCAMP_MIN_INTENSITY, + JCAMP_MAX_INTENSITY, + JCAMP_OBSERVE_90, + JCAMP_COUPLING_CONSTANTS, + JCAMP_RELAXATION_TIMES, + BRUCKER_OFFSET, + VARIAN_OFFSET, + JCAMP_MAX_VALID +}; + +#define KEY_LENGTH 80 +#define VALUE_LENGTH 128 +static int ReadField (char const *s, char *key, char *buf) +{ + char const *data = s, *eq; + int i = 0; + while (*data != 0 && *data < '#') + data++; + if (*data == 0) + return JCAMP_INVALID; + if (!strncmp (data, "$$", 2)) { + // This is a comment, just skip + return JCAMP_INVALID; + } +/* if (!strncmp (data, "##$", 3)) { + // This is a vendor specific tag, just skip for now + return JCAMP_INVALID; + }*/ + if (!strncmp (data, "##", 2)) { + // found a field + data += 2; + eq = strchr (data, '='); + i = 0; + if (*data == '$' && strncmp (data, "$$", 2)) { + key[i++] = '$'; + data++; + } + while (data < eq) { + if (*data >= 'A' && *data <= 'Z') + key[i++] = *data; + else if (*data >= 'a' && *data <= 'z') + key[i++] = *data - 0x20; + data++; + } + key[i] = 0; + if (i == 0) + // This is a comment, just skip + return JCAMP_INVALID; + data = eq + 1; + while (*data != 0 && *data < '$') + data++; + eq = strstr (data, "$$"); + if (eq && *eq) { + strncpy (buf, data, MIN (eq - data, VALUE_LENGTH)); + buf[MIN (eq - data, VALUE_LENGTH - 1)] = 0; + } + else + strncpy (buf, data, VALUE_LENGTH); + // strip trailing white spaces: + i = strlen (buf); + while (buf[i] <= ' ' || buf[i] == '"') + buf[i--] = 0; + + // Now, get the key value + i = JCAMP_TITLE; + while (i < JCAMP_MAX_VALID && strcmp (key, Keys[i])) + i++; + return i; + } + return JCAMP_UNKNOWN; +} + +static void on_xunit_changed (GtkComboBox *box, SpectrumDocument *doc) +{ + doc->OnXUnitChanged (gtk_combo_box_get_active (box)); +} + +static void on_yunit_changed (GtkComboBox *box, SpectrumDocument *doc) +{ + doc->OnYUnitChanged (gtk_combo_box_get_active (box)); +} + +static void on_xaxis_invert (GtkToggleButton *btn, SpectrumDocument *doc) +{ + doc->OnXAxisInvert (gtk_toggle_button_get_active (btn)); +} + +static void on_show_integral (GtkButton *btn, SpectrumDocument *doc) +{ + gtk_button_set_label (btn, (doc->GetIntegralVisible ()? + _("Show integral"): _("Hide integral"))); + doc->OnShowIntegral (); +} + +/* +static void on_transform_fid (GtkButton *btn, SpectrumDocument *doc) +{ + doc->OnTransformFID (btn); +} +*/ + +#define JCAMP_PREC 1e-3 // fully arbitrary + +void SpectrumDocument::LoadJcampDx (char const *data) +{ + char key[KEY_LENGTH]; + char buf[VALUE_LENGTH]; + char line[300]; // should be enough + int n; + deltax = 0.; + istringstream s(data); + JdxVar var; + var.NbValues = 0; + var.Symbol = 0; + var.Type = GCU_SPECTRUM_TYPE_MAX; + var.Unit = GCU_SPECTRUM_UNIT_MAX; + var.Format = GCU_SPECTRUM_FORMAT_MAX; + var.First = var.Last = var.Min = var.Max = var.Factor = 0.; + var.Values = NULL; + while (!s.eof ()) { + s.getline (line, 300); +parse_line: + n = ReadField (line, key, buf); + switch (n) { + case JCAMP_TITLE: + SetTitle (buf); + break; + case JCAMP_JCAMP_DX: + break; + case JCAMP_DATA_TYPE: + m_SpectrumType = (SpectrumType) get_spectrum_data_from_string (buf, Types, GCU_SPECTRUM_MAX); + break; + case JCAMP_DATACLASS: + case JCAMP_APPLICATION: + case JCAMP_DICTIONARY: + case JCAMP_BLOCKS: + case JCAMP_BLOCK_ID: + break; + case JCAMP_END: + goto out; + case JCAMP_PEAK_TABLE: { + // in that case, add drop lines ans remove the normal line + GogSeries *series = m_View->GetSeries (); + gog_object_add_by_name (GOG_OBJECT (series), "Vertical drop lines", GOG_OBJECT (g_object_new (GOG_TYPE_SERIES_LINES, NULL))); + GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (series)); + style->line.dash_type = GO_LINE_NONE; + style->line.auto_dash = false; + } + case JCAMP_XYPAIRS: + case JCAMP_XYDATA: + case JCAMP_XYPOINTS: { + unsigned read = 0; + list l; + if (deltax == 0.) + deltax = (lastx - firstx) / (npoints - 1); + else { + if (firstx > lastx && deltax > 0) + deltax = -deltax; + unsigned n = (unsigned) ((lastx - firstx) / deltax + .1) + 1; + if (n && n != npoints) { + if (x) + delete[] x; + x = new double[n]; + if (y) + delete[] y; + y = new double[n]; + } + npoints = n; + } + // FIXME: we should implement a real parser for this value + if (!strncmp (buf, "(X++(Y..Y))",strlen ("(X++(Y..Y))"))) + ReadDataTable (s, x, y); + else if (!strncmp (buf, "(XY..XY)",strlen ("(XY..XY)"))) { + char *cur; + while (1) { + if (s.eof ()) + break; // this should not occur, but a corrupted or bad file is always possible + s.getline (line, 300); + if (strstr (line, "##")) { + if (read > npoints) { + g_warning (_("Found too many data!")); + // FIXME: throw an exception + } else + npoints = read; + goto parse_line; + } + cur = line; + while (*cur) { + while (*cur && (*cur < '0' || *cur > '9') && *cur != '-' && *cur !='+') + cur++; + if (*cur == 0) + break; + x[read] = strtod (cur, &cur); + while (*cur && (*cur < '0' || *cur > '9') && *cur != '-' && *cur !='+') + cur++; + y[read] = strtod (cur, &cur); + read++; + } + } + } + break; + } + case JCAMP_PEAK_ASSIGNMENTS: + case JCAMP_RADATA: + break; + case JCAMP_XUNITS: + m_XUnit = (SpectrumUnitType) get_spectrum_data_from_string (buf, Units, GCU_SPECTRUM_UNIT_MAX); + break; + case JCAMP_YUNITS: + m_YUnit = (SpectrumUnitType) get_spectrum_data_from_string (buf, Units, GCU_SPECTRUM_UNIT_MAX); + if (m_YUnit == GCU_SPECTRUM_UNIT_TRANSMITTANCE) + m_View->SetAxisBounds (GOG_AXIS_Y, 0., 1., false); + break; + case JCAMP_XLABEL: + case JCAMP_YLABEL: + break; + case JCAMP_XFACTOR: + xfactor = strtod (buf, NULL); + break; + case JCAMP_YFACTOR: + yfactor = strtod (buf, NULL); + break; + case JCAMP_FIRSTX: + firstx = strtod (buf, NULL); + break; + case JCAMP_LASTX: + lastx = strtod (buf, NULL); + break; + case JCAMP_NPOINTS: { + unsigned n = (unsigned) atoi (buf); + if (n && n != npoints) { + if (x) + delete[] x; + x = new double[n]; + if (y) + delete[] y; + y = new double[n]; + } + npoints = n; + break; + } + case JCAMP_FIRSTY: + firsty = strtod (buf, NULL); + break; + case JCAMP_MAXX: + maxx = strtod (buf, NULL); + break; + case JCAMP_MINX: + minx = strtod (buf, NULL); + break; + case JCAMP_MAXY: + maxy = strtod (buf, NULL); + break; + case JCAMP_MINY: + miny = strtod (buf, NULL); + break; + case JCAMP_RUNITS: + case JCAMP_AUNITS: + case JCAMP_FIRSTR: + case JCAMP_LASTR: + case JCAMP_MAXA: + case JCAMP_MINA: + case JCAMP_RFACTOR: + case JCAMP_AFACTOR: + case JCAMP_FIRSTA: + case JCAMP_ALIAS: + case JCAMP_ZPD: + case JCAMP_NTUPLES: + break; + case JCAMP_VAR_NAME: { + size_t i = 0; + char *cur = buf, *end; + while (*cur) { + while (*cur && *cur == ' ') + cur++; + if (!*cur) + break; + end = strchr (cur, ','); + if (end) + *end = 0; + if (i < variables.size ()) + variables[i].Name = cur; + else { + var.Name = cur; + variables.push_back (var); + var.Name.clear (); + } + cur = (end)? end + 1: cur + strlen (cur); + i++; + } + break; + } + case JCAMP_SYMBOL: { + size_t i = 0; + char *cur = buf, *end; + while (*cur) { + while (*cur && *cur == ' ') + cur++; + if (!*cur) + break; + end = strchr (cur, ','); + if (end) + *end = 0; + if (i < variables.size ()) + variables[i].Symbol = *cur; + else { + var.Symbol = *cur; + variables.push_back (var); + var.Symbol = 0; + } + switch (*cur) { + case 'I': + I = i; + break; + case 'R': + R = i; + break; + case 'X': + X = i; + break; + case 'Y': + Y = i; + break; + default: + break; + } + cur = (end)? end + 1: cur + strlen (cur); + i++; + } + break; + } + case JCAMP_VAR_TYPE: { + size_t i = 0; + char *cur = buf, *end; + SpectrumVarType Type; + while (*cur) { + while (*cur && *cur == ' ') + cur++; + if (!*cur) + break; + end = strchr (cur, ','); + if (end) + *end = 0; + Type = (SpectrumVarType) get_spectrum_data_from_string (cur, VarTypes, GCU_SPECTRUM_TYPE_MAX); + if (i < variables.size ()) + variables[i].Type = Type; + else { + var.Type = Type; + variables.push_back (var); + var.Type = GCU_SPECTRUM_TYPE_MAX; + } + cur = (end)? end + 1: cur + strlen (cur); + i++; + } + break; + break; + } + case JCAMP_VAR_FORM: { + size_t i = 0; + char *cur = buf, *end; + SpectrumFormatType Format; + while (*cur) { + while (*cur && *cur == ' ') + cur++; + if (!*cur) + break; + end = strchr (cur, ','); + if (end) + *end = 0; + Format = (SpectrumFormatType) get_spectrum_data_from_string (cur, Formats, GCU_SPECTRUM_FORMAT_MAX); + if (i < variables.size ()) + variables[i].Format = Format; + else { + var.Format = Format; + variables.push_back (var); + var.Format = GCU_SPECTRUM_FORMAT_MAX; + } + cur = (end)? end + 1: cur + strlen (cur); + i++; + } + break; + } + case JCAMP_VAR_DIM: { + size_t i = 0; + char *cur = buf; + unsigned dim; + while (*cur) { + dim = strtoul (cur, &cur, 10); + if (*cur) + cur++; + if (i < variables.size ()) + variables[i].NbValues = dim; + else { + var.NbValues = dim; + variables.push_back (var); + var.NbValues = 0; + } + i++; + } + break; + } + case JCAMP_UNITS: { + size_t i = 0; + char *cur = buf, *end; + SpectrumUnitType Unit; + while (*cur) { + while (*cur && *cur == ' ') + cur++; + if (!*cur) + break; + end = strchr (cur, ','); + if (end) + *end = 0; + Unit = (SpectrumUnitType) get_spectrum_data_from_string (cur, Units, GCU_SPECTRUM_UNIT_MAX); + if (i < variables.size ()) + variables[i].Unit = Unit; + else { + var.Unit = Unit; + variables.push_back (var); + var.Unit = GCU_SPECTRUM_UNIT_MAX; + } + cur = (end)? end + 1: cur + strlen (cur); + i++; + } + break; + } + case JCAMP_FIRST: { + size_t i = 0; + char *cur = buf; + double x; + while (*cur) { + x = strtod (cur, &cur); + if (*cur) + cur++; + if (i < variables.size ()) + variables[i].First = x; + else { + var.First = x; + variables.push_back (var); + var.First = 0.; + } + i++; + } + break; + } + case JCAMP_LAST: { + size_t i = 0; + char *cur = buf; + double x; + while (*cur) { + x = strtod (cur, &cur); + if (*cur) + cur++; + if (i < variables.size ()) + variables[i].Last = x; + else { + var.Last = x; + variables.push_back (var); + var.Last = 0.; + } + i++; + } + break; + } + case JCAMP_MIN: { + size_t i = 0; + char *cur = buf; + double x; + while (*cur) { + x = strtod (cur, &cur); + if (*cur) + cur++; + if (i < variables.size ()) + variables[i].Min = x; + else { + var.Min = x; + variables.push_back (var); + var.Min = 0.; + } + i++; + } + break; + } + case JCAMP_MAX: { + size_t i = 0; + char *cur = buf; + double x; + while (*cur) { + x = strtod (cur, &cur); + if (*cur) + cur++; + if (i < variables.size ()) + variables[i].Max = x; + else { + var.Max = x; + variables.push_back (var); + var.Max = 0.; + } + i++; + } + break; + } + case JCAMP_FACTOR: { + size_t i = 0; + char *cur = buf; + double x; + while (*cur) { + x = strtod (cur, &cur); + if (*cur) + cur++; + if (i < variables.size ()) + variables[i].Factor = x; + else { + var.Factor = x; + variables.push_back (var); + var.Factor = 0.; + } + i++; + } + break; + } + case JCAMP_PAGE: { + unsigned num = atoi (strchr (buf, '=') + 1); + if (num == 1) { + unsigned max = 0; + for (unsigned i = 0; i < variables.size (); i++) { + JdxVar &v = variables[i]; + if (v.Name == "PAGE NUMBER") + continue; + if (v.NbValues > max) + max = v.NbValues; + switch (v.Type) { + case GCU_SPECTRUM_TYPE_INDEPENDENT: + if (v.Symbol == 'X') { + firstx = v.First; + lastx = v.Last; + minx = v.Min; + maxx = v.Max; + xfactor = v.Factor; + deltax = (lastx - firstx) / (v.NbValues - 1); + } + break; + case GCU_SPECTRUM_TYPE_DEPENDENT: + break; + default: + break; + } + } + npoints = max; + } + break; + } + case JCAMP_DATA_TABLE: { + // first split fields, we might have two, but the second is optional + char *vlist = buf, *desc; + while (*vlist && *vlist == ' ') + vlist++; + if (!*vlist) + break; + desc = strchr (vlist, ','); + if (desc) + *desc = 0; + desc++; + while (*desc && *desc == ' ') + desc++; + struct data_type_struct dts; + parse_data_type (vlist, dts); + if (!strncmp (desc, "XYDATA", 6)) { + if (dts.n == 2 && !dts.one_per_line && !dts.explicit_indep) { + int first = -1, second = -1; + switch (*dts.variables) { + case 'I': + first = I; + break; + case 'R': + first = R; + break; + case 'X': + first = X; + break; + case 'Y': + first = Y; + break; + } + switch (dts.variables[1]) { + case 'I': + second = I; + break; + case 'R': + second = R; + break; + case 'X': + second = X; + break; + case 'Y': + second = Y; + break; + } + if (first >=0 && second >=0 && first != second) { + if (variables[first].Values) + delete [] variables[first].Values; + variables[first].Values = new double[variables[first].NbValues]; + if (variables[second].Values) + delete [] variables[second].Values; + variables[second].Values = new double[variables[second].NbValues]; + yfactor = variables[second].Factor; + firsty = variables[second].First; + ReadDataTable (s, variables[first].Values, variables[second].Values); + } + } + } //what should be done for PROFILE, PEAKS and COUTOUR? + g_free (dts.variables); + break; + } + case JCAMP_DELTAX: + deltax = strtod (buf, NULL); + break; + case JCAMP_CLASS: + case JCAMP_ORIGIN: + case JCAMP_OWNER: + case JCAMP_DATE: + case JCAMP_TIME: + case JCAMP_SOURCE_REFERENCE: + case JCAMP_CROSS_REFERENCE: + case JCAMP_SPECTROMETER: + case JCAMP_DATASYSTEM: + case JCAMP_INSTRUMENT_PARAMETERS: + case JCAMP_SAMPLE_DESCRIPTION: + case JCAMP_CAS_NAME: + case JCAMP_NAMES: + case JCAMP_MOLEFORM: + case JCAMP_CAS_REGISTRY_NO: + case JCAMP_WISWESSER: + case JCAMP_BEILSTEIN_LAWSON_NO: + case JCAMP_MP: + case JCAMP_BP: + case JCAMP_REFRACTIVE_INDEX: + case JCAMP_DENSITY: + case JCAMP_MW: + case JCAMP_CONCENTRATIONS: + case JCAMP_SAMPLING_PROCEDURE: + case JCAMP_STATE: + case JCAMP_PATH_LENGTH: + case JCAMP_PRESSURE: + case JCAMP_TEMPERATURE: + case JCAMP_DATA_PROCESSING: + case JCAMP_SPECTROMETER_TYPE: + case JCAMP_INLET: + case JCAMP_IONIZATION_MODE: + case JCAMP_INLET_TEMPERATURE: + case JCAMP_SOURCE_TEMPERATURE: + case JCAMP_IONIZATION_ENERGY: + case JCAMP_ACCELERATING_VOLTAGE: + case JCAMP_TOTAL_ION_CURRENT: + case JCAMP_ACQUISITION_RANGE: + case JCAMP_DETECTOR: + case JCAMP_SCAN_NUMBER: + case JCAMP_RETENTION_TIME: + case JCAMP_BASE_PEAK: + case JCAMP_BASE_PEAK_INTENSITY: + case JCAMP_RIC: + case JCAMP_NOMINAL_MASS: + case JCAMP_MONOISOTOPIC_MASS: + break; + case JCAMP_OBSERVE_FREQUENCY: + freq = strtod (buf, NULL); + break; + case JCAMP_OBSERVE_NUCLEUS: + case JCAMP_SOLVENT_REFERENCE: + case JCAMP_DELAY: + case JCAMP_ACQUISITION_MODE: + case JCAMP_FIELD: + case JCAMP_DECOUPLER: + case JCAMP_FILTER_WIDTH: + case JCAMP_ACQUISITION_TIME: + case JCAMP_ZERO_FILL: + case JCAMP_AVERAGES: + case JCAMP_DIGITIZER_RES: + case JCAMP_SPINNING_RATE: + case JCAMP_PHASE_0: + case JCAMP_PHASE_1: + case JCAMP_MIN_INTENSITY: + case JCAMP_MAX_INTENSITY: + case JCAMP_OBSERVE_90: + case JCAMP_COUPLING_CONSTANTS: + case JCAMP_RELAXATION_TIMES: + break; + case BRUCKER_OFFSET: + offset = strtod (buf, NULL); + break; + case VARIAN_OFFSET: + refpoint = strtod (buf, NULL); + break; + default: + break; + } + } + +out: + bool hide_y_axis = false; + SpectrumUnitType unit = GCU_SPECTRUM_UNIT_MAX; + // doon't do anything for unsupported spectra + switch (m_SpectrumType) { + case GCU_SPECTRUM_NMR: { + if (x == NULL && X > 0 && variables[X].Values == NULL) + return; + // fix origin + if (go_finite (offset)) { + unsigned i; + if (x) { + double d = offset * freq - maxx; + maxx += d; + minx += d; + firstx += d; + lastx += d; + for (i = 0; i < npoints; i++) + x[i] += d; + } else { + double d = offset * freq - variables[X].Max; + maxx = variables[X].Max += d; + minx = variables[X].Min += d; + variables[X].First += d; + variables[X].Last += d; + for (i = 0; i < npoints; i++) + variables[X].Values[i] += d; + } + } else if (go_finite (refpoint)) { + unsigned i; + double d = -refpoint; + if (x) { + maxx += d; + minx += d; + firstx += d; + lastx += d; + for (i = 0; i < npoints; i++) + x[i] += d; + } else { + maxx = variables[X].Max += d; + minx = variables[X].Min += d; + variables[X].First += d; + variables[X].Last += d; + for (i = 0; i < npoints; i++) + variables[X].Values[i] += d; + } + } + // add some widgets to the option box + GtkWidget *box = gtk_hbox_new (false, 5), *w; + if (go_finite (freq)) { + w = gtk_label_new (_("X unit:")); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + w = gtk_combo_box_new_text (); + gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Chemical shift (ppm)")); + gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Frequency (Hz)")); + SpectrumUnitType unit = (X >= 0)? variables[X].Unit: m_XUnit; + gtk_combo_box_set_active (GTK_COMBO_BOX (w), ((unit == GCU_SPECTRUM_UNIT_PPM)? 0: 1)); + g_signal_connect (w, "changed", G_CALLBACK (on_xunit_changed), this); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + } + w = gtk_button_new_with_label (_("Show integral")); + g_signal_connect (w, "clicked", G_CALLBACK (on_show_integral), this); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + gtk_widget_show_all (box); + gtk_box_pack_start (GTK_BOX (m_View->GetOptionBox ()), box, false, false, 0); + hide_y_axis = true; + break; + } + case GCU_SPECTRUM_NMR_FID: { + if (x == NULL && X > 0 && variables[X].Values == NULL) + return; +// Deactivate Fourier transfor for now +/* if (R >= 0 && I >= 0) { + GtkWidget *box = gtk_hbox_new (false, 5); + GtkWidget *w = gtk_button_new_with_label (_("Transform to spectrum")); + g_signal_connect (w, "clicked", G_CALLBACK (on_transform_fid), this); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + gtk_widget_show_all (box); + gtk_box_pack_start (GTK_BOX (m_View->GetOptionBox ()), box, false, false, 0); + } + hide_y_axis = true;*/ + break; + } + case GCU_SPECTRUM_INFRARED: + case GCU_SPECTRUM_RAMAN: + unit = GCU_SPECTRUM_UNIT_MICROMETERS; +// case GCU_SPECTRUM_INFRARED_PEAK_TABLE: +// case GCU_SPECTRUM_INFRARED_INTERFEROGRAM: +// case GCU_SPECTRUM_INFRARED_TRANSFORMED: + case GCU_SPECTRUM_UV_VISIBLE: + if (x == NULL && X > 0 && variables[X].Values == NULL) + return; + else { + if (unit == GCU_SPECTRUM_UNIT_MAX) + unit = GCU_SPECTRUM_UNIT_NANOMETERS; + // add some widgets to the option box + GtkWidget *box = gtk_hbox_new (false, 5), *w; + w = gtk_label_new (_("X unit:")); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + w = gtk_combo_box_new_text (); + if (unit == GCU_SPECTRUM_UNIT_NANOMETERS) + gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Wave length (nm)")); + else + gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Wave length (µm)")); + gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Wave number (1/cm)")); + SpectrumUnitType unit = (X >= 0)? variables[X].Unit: m_XUnit; + gtk_combo_box_set_active (GTK_COMBO_BOX (w), ((unit == GCU_SPECTRUM_UNIT_CM_1)? 1: 0)); + g_signal_connect (w, "changed", G_CALLBACK (on_xunit_changed), this); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + m_XAxisInvertBtn = gtk_check_button_new_with_label (_("Invert X Axis")); + m_XAxisInvertSgn = g_signal_connect (m_XAxisInvertBtn, "toggled", G_CALLBACK (on_xaxis_invert), this); + gtk_box_pack_start (GTK_BOX (box), m_XAxisInvertBtn, false, false, 0); + w = gtk_vseparator_new (); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 12); + w = gtk_label_new (_("Y unit:")); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + w = gtk_combo_box_new_text (); + gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Absorbance")); + gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Transmittance")); + unit = (Y >= 0)? variables[Y].Unit: m_YUnit; + gtk_combo_box_set_active (GTK_COMBO_BOX (w), ((unit == GCU_SPECTRUM_UNIT_ABSORBANCE)? 0: 1)); + g_signal_connect (w, "changed", G_CALLBACK (on_yunit_changed), this); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + gtk_widget_show_all (box); + gtk_box_pack_start (GTK_BOX (m_View->GetOptionBox ()), box, false, false, 0); + } + break; +// case GCU_SPECTRUM_NMR_PEAK_TABLE: +// case GCU_SPECTRUM_NMR_PEAK_ASSIGNMENTS: + case GCU_SPECTRUM_MASS: + break; + default: + return; + } + m_Empty = npoints == 0; + GOData *godata; + GogSeries *series = m_View->GetSeries (); + if (X >= 0 && variables[X].Values != NULL) { + godata = go_data_vector_val_new (variables[X].Values, npoints, NULL); + m_XUnit = variables[X].Unit; + } + else + godata = go_data_vector_val_new (x, npoints, NULL); + gog_series_set_dim (series, 0, godata, NULL); + if (Y >= 0 && variables[Y].Values != NULL) { + godata = go_data_vector_val_new (variables[Y].Values, npoints, NULL); + m_YUnit = variables[Y].Unit; + } else if (R >= 0 && variables[R].Values != NULL) { + godata = go_data_vector_val_new (variables[R].Values, npoints, NULL); + m_YUnit = variables[R].Unit; + } else + godata = go_data_vector_val_new (y, npoints, NULL); + gog_series_set_dim (series, 1, godata, NULL); + /* invert X-axis if needed */ + bool invert_axis = false; + switch (m_XUnit) { + case GCU_SPECTRUM_UNIT_CM_1: + case GCU_SPECTRUM_UNIT_PPM: + invert_axis = true; + break; + case GCU_SPECTRUM_UNIT_HZ: + if (m_SpectrumType == GCU_SPECTRUM_NMR) + invert_axis = true; + break; + default: + break; + } + if (m_XAxisInvertBtn) { + g_signal_handler_block (m_XAxisInvertBtn, m_XAxisInvertSgn); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_XAxisInvertBtn), invert_axis); + g_signal_handler_unblock (m_XAxisInvertBtn, m_XAxisInvertSgn); + } + m_View->SetAxisBounds (GOG_AXIS_X, minx, maxx, invert_axis); + if (hide_y_axis) + m_View->ShowAxis (GOG_AXIS_Y, false); + /* Add axes labels */ + if (m_XUnit < GCU_SPECTRUM_UNIT_MAX) + m_View->SetAxisLabel (GOG_AXIS_X, _(UnitNames[m_XUnit])); + if (m_YUnit < GCU_SPECTRUM_UNIT_MAX) + m_View->SetAxisLabel (GOG_AXIS_Y, _(UnitNames[m_YUnit])); +} + +void SpectrumDocument::ReadDataLine (char const *data, list &l) +{ + int i = 1, j; + char buf[32], c = data[0]; + double val = 0., newval = 0.; + bool pos, diff = false; + char *eq = strstr (const_cast (data), "$$"); + if (eq) + *eq = 0; + pos = true; + while (c) { + switch (c) { + case ' ': + c = data[i++]; + continue; + case '-': + pos = false; + case '+': + c = data[i++]; + if ((c < '0' || c > '9') && c != '.') // FIXME: throw an exception + ; + continue; + case '.': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buf[0] = c; + diff = false; + break; + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + buf[0] = c - 0x10; + diff = false; + break; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + pos = false; + diff = false; + buf[0] = c - 0x30; + break; + case '%': + c = 'I'; + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + diff = true; + buf[0] = c - 0x19; + break; + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + pos = false; + diff = true; + buf[0] = c - 0x39; + break; + case 's': + c = '['; + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': { + buf[0] = c - 0x22; + j = 1; + while (c = data[i++], (c >= '0' && c <= '9')) { + if (j == 31) { + g_warning (_("Constant too long")); + break; + } + buf[j++] = c; + } + buf[j] = 0; + int m, n = atoi (buf); + for (m = 1; m < n; m++) { + if (diff) + val += newval; + l.push_back (val); + } + continue; + } + case '?': + diff = false; + val = go_nan; + newval = 0.; + l.push_back (go_nan); + c = data[i++]; + continue; + default: + if (c > ' ') + g_warning (_("Invalid character in data block")); + c = data[i++]; + continue; + } + j = 1; + while (c = data[i++], (c >= '0' && c <= '9') || c == '.') { + if (j == 31) { + g_warning (_("Constant too long")); + break; + } + buf[j++] = c; + } + buf[j] = 0; + newval = strtod (buf, NULL); + if (!pos) + newval = - newval; + if (diff) + val += newval; + else + val = newval; + l.push_back (val); + pos = true; + } +} + +void SpectrumDocument::DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const +{ + cairo_t *cr; + gdouble width, height; + GtkWidget *widget = m_View->GetWidget (); + + cr = gtk_print_context_get_cairo_context (context); + width = gtk_print_context_get_width (context); + height = gtk_print_context_get_height (context); + int w, h; // size in points + w = widget->allocation.width; + h = widget->allocation.height; + switch (GetScaleType ()) { + case GCU_PRINT_SCALE_NONE: + break; + case GCU_PRINT_SCALE_FIXED: + w *= Printable::GetScale (); + h *= Printable::GetScale (); + break; + case GCU_PRINT_SCALE_AUTO: + if (GetHorizFit ()) + w = width; + if (GetVertFit ()) + h = height; + break; + } + double x = 0., y = 0.; + if (GetHorizCentered ()) + x = (width - w) / 2.; + if (GetVertCentered ()) + y = (height - h) / 2.; + cairo_save (cr); + cairo_translate (cr, x, y); + m_View->Render (cr, w, h); + cairo_restore (cr); +} + +GtkWindow *SpectrumDocument::GetGtkWindow () +{ + GtkWidget *w = m_View->GetWidget (); + return (GtkWindow*) ((w)? gtk_widget_get_toplevel (m_View->GetWidget ()): NULL); +} + +void SpectrumDocument::ReadDataTable (istream &s, double *x, double *y) +{ + char line[300]; // should be enough + unsigned read = 0; + list l; + int previous = 0; + double previousx = firstx; + while (1) { + if (s.eof ()) + break; // this should not occur, but a corrupted or bad file is always possible + s.getline (line, 300); + if (strstr (line, "##")) { + s.seekg (-strlen (line) -1, _S_cur); + if (read > npoints) { + g_warning (_("Found too many data!")); + // FIXME: throw an exception + } else + npoints = read; + break; + } + ReadDataLine (line, l); + if (l.empty ()) + continue; + list::iterator i = l.begin (), end = l.end (); + if (read > 0) { + double x1 = (*i) * xfactor; + int n = read - previous - (int)round((x1-previousx)/deltax); + previous = read; + previousx = x1; + if (n == 0) { + // values are the same, no y reminder, and nothing to do + } else if (n == 1) { + i++; + previous--; + double y0 = (*i) * yfactor; + if (fabs (y0 - y[read - 1]) > fmax (fabs (y0), fabs (y[read - 1])) * JCAMP_PREC) + g_warning (_("Data check failed!")); + } else if (previousx - x1 < 0.) { + unsigned missing = (unsigned) round ((x1 - previousx) / deltax), n; + for (n = 0; n < missing; n++) { + if (read > npoints) // FIXME: Throw an exception + break; + x[read] = firstx + deltax * read; + y[read++] = go_nan; + } + } else { + // FIXME: duplicate values, throw an exception + } + } else { + x[read] = (*i) * xfactor; + if (fabs (x[0] - firstx) > fabs (deltax * JCAMP_PREC)) { + xfactor = firstx / (*i); + deltax = (lastx - firstx) / (npoints - 1); + g_warning (_("Data check failed: FIRSTX!")); + } + i++; + y[read++] = (*i) * yfactor; + if (fabs (firsty - y[0]) > fmax (fabs (firsty), fabs (y[0])) * JCAMP_PREC) + g_warning (_("Data check failed: FIRSTY!")); + } + for (i++; i != end; i++) { + if (read >= npoints) { // FIXME: Throw an exception + g_warning (_("Found too many data")); + break; + } + x[read] = firstx + deltax * read; + y[read++] = (*i) * yfactor; + } + l.clear (); + } + while (npoints > read) { + // this should never occur, fill missing y values with nan + x[read] = minx + deltax * read; + y[read++] = go_nan; + } + if (isnan (maxx)) { + maxx = MAX (firstx, lastx); + minx = MIN (firstx, lastx); + } +} + +void SpectrumDocument::OnXUnitChanged (int i) +{ + SpectrumUnitType unit = GCU_SPECTRUM_UNIT_MAX; + bool invert_axis = false; + switch (m_SpectrumType) { + case GCU_SPECTRUM_NMR: + unit = (i == 0)? GCU_SPECTRUM_UNIT_PPM: GCU_SPECTRUM_UNIT_HZ; + invert_axis = true; + break; + case GCU_SPECTRUM_INFRARED: + case GCU_SPECTRUM_RAMAN: + if (i == 1) { + unit = GCU_SPECTRUM_UNIT_CM_1; + invert_axis = true; + } else + unit = GCU_SPECTRUM_UNIT_MICROMETERS; + break; + case GCU_SPECTRUM_UV_VISIBLE: + if (i == 1) { + unit = GCU_SPECTRUM_UNIT_CM_1; + invert_axis = true; + } else + unit = GCU_SPECTRUM_UNIT_NANOMETERS; + break; + default: + break; + } + if (unit == GCU_SPECTRUM_UNIT_MAX) + return; + GOData *godata; + GogSeries *series = m_View->GetSeries (); + if (x && m_XUnit == unit) { + X = -1; + godata = go_data_vector_val_new (x, npoints, NULL); + gog_series_set_dim (series, 0, godata, NULL); + m_View->SetAxisBounds (GOG_AXIS_X, minx, maxx, invert_axis); + m_View->SetAxisLabel (GOG_AXIS_X, _(UnitNames[m_XUnit])); + if (m_XAxisInvertBtn) { + g_signal_handler_block (m_XAxisInvertBtn, m_XAxisInvertSgn); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_XAxisInvertBtn), invert_axis); + g_signal_handler_unblock (m_XAxisInvertBtn, m_XAxisInvertSgn); + } + } else { + unsigned i, j; + double (*conv) (double, double, double); + double f, o; + for (i = 0; i < variables.size (); i++) + if (variables[i].Symbol == 'X' && variables[i].Unit == unit) + break; + if (i == variables.size ()) { + // Add new data vector + JdxVar v; + if (X >=0) { + conv = GetConversionFunction (variables[X].Unit, unit, f, o); + if (!conv) + return; + v.Name = _(UnitNames[variables[X].Unit]); + v.Symbol = variables[X].Symbol; + v.Type = variables[X].Type; + v.Unit = unit; + v.Format = variables[X].Format; + v.NbValues = variables[X].NbValues; + v.First = conv (variables[X].First, f, o); + v.Last = conv (variables[X].Last, f, o); + v.Min = conv (variables[X].Min, f, o); + v.Max = conv (variables[X].Max, f, o); + v.Factor = 1.; + v.Values = new double[variables[X].NbValues]; + for (j = 0; j < variables[X].NbValues; j++) + v.Values[j] = conv (variables[X].Values[j], f, o); + } else { + conv = GetConversionFunction (m_XUnit, unit, f, o); + if (!conv) + return; + v.Name = _(UnitNames[unit]); + v.Symbol = 'X'; + v.Type = GCU_SPECTRUM_TYPE_DEPENDENT; + v.Unit = unit; + v.Format = GCU_SPECTRUM_FORMAT_MAX; + v.NbValues = npoints; + v.First = conv (firstx, f, o); + v.Last = conv (lastx, f, o); + v.Min = conv (minx, f, o); + v.Max = conv (maxx, f, o); + v.Factor = 1.; + v.Values = new double[npoints]; + for (j = 0; j < npoints; j++) + v.Values[j] = conv (x[j], f, o); + } + if (v.Min > v.Max) { + f = v.Min; + v.Min = v.Max; + v.Max = f; + } + variables.push_back (v); + } + X = i; + godata = go_data_vector_val_new (variables[i].Values, variables[i].NbValues, NULL); + gog_series_set_dim (series, 0, godata, NULL); + m_View->SetAxisBounds (GOG_AXIS_X, variables[i].Min, variables[i].Max, invert_axis); + m_View->SetAxisLabel (GOG_AXIS_X, _(UnitNames[variables[i].Unit])); + if (m_XAxisInvertBtn) { + g_signal_handler_block (m_XAxisInvertBtn, m_XAxisInvertSgn); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_XAxisInvertBtn), invert_axis); + g_signal_handler_unblock (m_XAxisInvertBtn, m_XAxisInvertSgn); + } + if (integral > 0) { + g_object_ref (godata); + } + } + if (integral > 0) { + g_object_ref (godata); + gog_series_set_dim (variables[integral].Series, 0, godata, NULL); + } +} + +void SpectrumDocument::OnYUnitChanged (int i) +{ + SpectrumUnitType unit = GCU_SPECTRUM_UNIT_MAX; + bool invert_axis = false; + switch (m_SpectrumType) { + case GCU_SPECTRUM_INFRARED: + case GCU_SPECTRUM_RAMAN: + case GCU_SPECTRUM_UV_VISIBLE: + unit = (i == 0)? GCU_SPECTRUM_UNIT_ABSORBANCE: GCU_SPECTRUM_UNIT_TRANSMITTANCE; + break; + default: + break; + } + if (unit == GCU_SPECTRUM_UNIT_MAX) + return; + GOData *godata; + GogSeries *series = m_View->GetSeries (); + if (m_YUnit == unit) { + Y = -1; + godata = go_data_vector_val_new (y, npoints, NULL); + gog_series_set_dim (series, 1, godata, NULL); + m_View->SetAxisBounds (GOG_AXIS_Y, miny, maxy, invert_axis); + m_View->SetAxisLabel (GOG_AXIS_Y, _(UnitNames[m_YUnit])); + } else { + unsigned i, j; + double (*conv) (double, double, double); + double f, o; + for (i = 0; i < variables.size (); i++) + if (variables[i].Symbol == 'Y' && variables[i].Unit == unit) + break; + if (i == variables.size ()) { + // Add new data vector + JdxVar v; + if (Y >=0) { + conv = GetConversionFunction (variables[Y].Unit, unit, f, o); + if (!conv) + return; + v.Name = _(UnitNames[variables[Y].Unit]); + v.Symbol = variables[Y].Symbol; + v.Type = variables[Y].Type; + v.Unit = unit; + v.Format = variables[Y].Format; + v.NbValues = variables[Y].NbValues; + v.First = conv (variables[Y].First, f, o); + v.Last = conv (variables[Y].Last, f, o); + v.Min = conv (variables[Y].Min, f, o); + v.Max = conv (variables[Y].Max, f, o); + v.Factor = 1.; + v.Values = new double[variables[Y].NbValues]; + for (j = 0; j < variables[Y].NbValues; j++) + v.Values[j] = conv (variables[Y].Values[j], f, o); + } else { + conv = GetConversionFunction (m_YUnit, unit, f, o); + if (!conv) + return; + v.Name = _(UnitNames[unit]); + v.Symbol = 'Y'; + v.Type = GCU_SPECTRUM_TYPE_DEPENDENT; + v.Unit = unit; + v.Format = GCU_SPECTRUM_FORMAT_MAX; + v.NbValues = npoints; + v.First = conv (firsty, f, o); + v.Last = 0.; // not important + v.Min = conv (miny, f, o); + v.Max = conv (maxy, f, o); + v.Factor = 1.; + v.Values = new double[npoints]; + for (j = 0; j < npoints; j++) + v.Values[j] = conv (y[j], f, o); + } + if (v.Min > v.Max) { + f = v.Min; + v.Min = v.Max; + v.Max = f; + } + variables.push_back (v); + } + Y = i; + godata = go_data_vector_val_new (variables[i].Values, variables[i].NbValues, NULL); + gog_series_set_dim (series, 1, godata, NULL); + m_View->SetAxisBounds (GOG_AXIS_Y, variables[i].Min, variables[i].Max, invert_axis); + m_View->SetAxisLabel (GOG_AXIS_Y, _(UnitNames[variables[i].Unit])); + } +} + +static double mult (double val, double f, double offset) +{ + return val * f + offset; +} + +static double inv (double val, double f, double offset) +{ + return f / val + offset; +} + +static double logm (double val, double f, double offset) +{ + return -log10 (val * f + offset); +} + +static double expm (double val, double f, double offset) +{ + return exp10 (-val) * f + offset; +} + +double (*SpectrumDocument::GetConversionFunction (SpectrumUnitType oldu, SpectrumUnitType newu, double &factor, double &shift)) (double, double, double) +{ + switch (oldu) { + case GCU_SPECTRUM_UNIT_CM_1: + if (newu == GCU_SPECTRUM_UNIT_NANOMETERS) { + factor = 1.e7; + shift = 0; + return inv; + } + if (newu == GCU_SPECTRUM_UNIT_MICROMETERS) { + factor = 1.e4; + shift = 0; + return inv; + } + break; + case GCU_SPECTRUM_UNIT_TRANSMITTANCE: + if (newu == GCU_SPECTRUM_UNIT_ABSORBANCE) { + factor = 1.; + shift = 0.; + return logm; + } + break; + case GCU_SPECTRUM_UNIT_ABSORBANCE: + if (newu == GCU_SPECTRUM_UNIT_TRANSMITTANCE) { + factor = 1.; + shift = 0.; + return expm; + } + break; + case GCU_SPECTRUM_UNIT_PPM: + if (go_finite (freq) && newu == GCU_SPECTRUM_UNIT_HZ) { + factor = freq; + shift = 0; + return mult; + } + break; + case GCU_SPECTRUM_UNIT_NANOMETERS: + if (newu == GCU_SPECTRUM_UNIT_CM_1) { + factor = 1.e7; + shift = 0; + return inv; + } + break; + case GCU_SPECTRUM_UNIT_MICROMETERS: + if (newu == GCU_SPECTRUM_UNIT_CM_1) { + factor = 1.e4; + shift = 0; + return inv; + } + break; + case GCU_SPECTRUM_UNIT_HZ: + if (go_finite (freq) && newu == GCU_SPECTRUM_UNIT_PPM) + factor = 1. / freq; + shift = 0.; + return mult; + break; + default: + break; + } + return NULL; +} + +void SpectrumDocument::OnShowIntegral () +{ + m_IntegralVisible = !m_IntegralVisible; + GOStyle *style; + if (m_IntegralVisible) { + if (integral < 0) { + integral = variables.size (); + JdxVar v; + double *xo, *xn[5], *yb, cur, acc; + v.Name = _("Integral"); + v.Symbol = 'i'; + v.Type = GCU_SPECTRUM_TYPE_DEPENDENT; + v.Unit = GCU_SPECTRUM_UNIT_MAX; + v.Format = GCU_SPECTRUM_FORMAT_MAX; + v.Factor = 1.; + v.NbValues = (X >= 0)? variables[X].NbValues: npoints; + xn[0] = new double[v.NbValues]; + xn[1] = new double[v.NbValues]; + xn[2] = new double[v.NbValues]; + xn[3] = new double[v.NbValues]; + xn[4] = new double[v.NbValues]; + yb = new double[v.NbValues]; + v.First = 0.; + v.Values = new double[v.NbValues]; + unsigned i; + double *z; + if (R >= 0) + z = variables[R].Values; + else if (Y >= 0) + z = variables[R].Values; + else + z = y; + xo = (X >= 0 && variables[X].Values != NULL)? variables[X].Values: x; + double max, delta; + unsigned used = 0; + go_range_max (z, v.NbValues, &max); + max *= 0.005; + v.Values[0] = 0.; + for (i = 1; i < v.NbValues; i++) { + delta = 0.5 * (z[i - 1] + z[i]); + v.Values[i] = v.Values[i - 1] + delta; + if (delta < max) { + cur = xn[0][used] = xo[i]; + acc = xn[1][used] = cur * cur; + xn[2][used] = (acc *= cur); + xn[3][used] = (acc *= cur); + xn[4][used] = acc * cur; + yb[used] = (used > 0)? yb[used - 1] + delta: delta; + used++; + } + } + go_regression_stat_t reg; + double res[6]; + go_linear_regression (xn, 5, yb, used, true, res, ®); + for (i = 0; i < v.NbValues; i++) { + cur = xo[i]; + acc = cur * cur; + v.Values[i] -= res[0] + res[1] * cur + res[2] * acc; + v.Values[i] -= res[3] * (acc *= cur); + v.Values[i] -= res[4] * (acc *= cur); + v.Values[i] -= res[5] * cur * acc; + } + g_free (reg.se); + g_free (reg.t); + g_free (reg.xbar); + v.Last = v.Max = v.Values[v.NbValues - 1]; + v.Min = 0.; + v.Series = m_View->NewSeries (true); + GOData *godata; + godata = go_data_vector_val_new (xo, npoints, NULL); + gog_series_set_dim (v.Series, 0, godata, NULL); + godata = go_data_vector_val_new (v.Values, v.NbValues, NULL); + gog_series_set_dim (v.Series, 1, godata, NULL); + GOStyledObject *axis = GO_STYLED_OBJECT (g_object_new (GOG_TYPE_AXIS, "major-tick-labeled", false, NULL)); + GogPlot *plot = gog_series_get_plot (v.Series); + GogObject *chart = GOG_OBJECT (gog_object_get_parent (GOG_OBJECT (plot))); + gog_object_add_by_name (chart, "Y-Axis", GOG_OBJECT (axis)); + gog_plot_set_axis (plot, GOG_AXIS (axis)); + style = go_styled_object_get_style (axis); + style->line.auto_dash = false; + style->line.dash_type = GO_LINE_NONE; + style = go_styled_object_get_style (GO_STYLED_OBJECT (v.Series)); + style->line.auto_dash = false; + style->line.auto_color = false; + style->line.color = RGBA_RED; + variables.push_back (v); + delete [] xn[0]; + delete [] xn[1]; + delete [] xn[2]; + delete [] xn[3]; + delete [] xn[4]; + delete [] yb; + } else + style = go_styled_object_get_style (GO_STYLED_OBJECT (variables[integral].Series)); + // show the series + style->line.dash_type = GO_LINE_SOLID; + gog_object_request_update (GOG_OBJECT (variables[integral].Series)); + } else { + // hide the series + style = go_styled_object_get_style (GO_STYLED_OBJECT (variables[integral].Series)); + style->line.dash_type = GO_LINE_NONE; + gog_object_request_update (GOG_OBJECT (variables[integral].Series)); + } +} + +void SpectrumDocument::OnTransformFID (GtkButton *btn) +{ + double *re = variables[R].Values, *im = variables[I].Values; + unsigned n = 2; + while (n < npoints) + n <<= 1; + n <<= 1; // doubles the points number to get more transformed values + go_complex *fid = new go_complex[n], *sp; + unsigned i; + for (i = 0; i < npoints; i++) { + // assuming we have as many real, imaginary and time values + fid[i].re = re[i]; + fid[i].im = im[i]; + } + for (; i < n; i++) { + // fill with zeros + fid[i].re = fid[i].im = 0.; + } + //we make no apodization at the moment + go_fourier_fft (fid, n, 1, &sp, false); + delete [] fid; + // only the first half values are useful + n /= 2; + // copy the unphased data to Rt and It (t for transformed) + JdxVar vr, vi, rp; + vr.Name = _("Real transformed data"); + vr.Symbol = 't'; + vr.Type = GCU_SPECTRUM_TYPE_DEPENDENT; + vr.Unit = GCU_SPECTRUM_UNIT_MAX; + vr.Format = GCU_SPECTRUM_FORMAT_MAX; + vr.Factor = 1.; + vr.NbValues = n; + vr.Values = new double[n]; + for (i = 0; i < n; i++) + vr.Values[i] = sp[i].re; + vr.First = vr.Values[0]; + vr.Last = vr.Values[n - 1]; + go_range_min (vr.Values, n, &vr.Min); + go_range_max (vr.Values, n, &vr.Max); + vr.Series = NULL; + Rt = variables.size (); + variables.push_back (vr); + vi.Name = _("Imaginary transformed data"); + vi.Symbol = 'u'; + vi.Type = GCU_SPECTRUM_TYPE_DEPENDENT; + vi.Unit = GCU_SPECTRUM_UNIT_MAX; + vi.Format = GCU_SPECTRUM_FORMAT_MAX; + vi.Factor = 1.; + vi.NbValues = n; + vi.Values = new double[n]; + for (i = 0; i < n; i++) + vi.Values[i] = sp[i].im; + vi.First = vi.Values[0]; + vi.Last = vi.Values[n - 1]; + go_range_min (vi.Values, n, &vi.Min); + go_range_max (vi.Values, n, &vi.Max); + vi.Series = NULL; + It = variables.size (); + variables.push_back (vi); + // Now we need to adjust the phase (see http://www.ebyte.it/stan/Poster_EDISPA.html) + double phi = 0., tau = 0., *z; + double step = M_PI * 2. * tau / n, phase; + z = new double[n]; + for (i = 0; i < n; i++) + z[i] = go_complex_mod (sp + i); + g_free (sp); + // set the phase real values + // free what needs to be freed + delete [] z; + // set the corrected values + rp.Values = new double[n]; + //store phi and tau as first and last, respectively + rp.First = phi; + rp.Last = tau; + phase = phi - M_PI * 2. * tau; + for (i = 0; i < n; i++) { + phase += step; + rp.Values[i] = vr.Values[i] * cos (phase) + vi.Values[i] * sin (phase); + } + Rp = variables.size (); + variables.push_back (rp); + // add Hz and ppm variables (0 for last point, user will have to choose a reference peak) + // first Hz + // if we are there, we have R and I values, we should have also X, but let's check + double *xo, freq; + if (X >= 0 && variables[X].Values != NULL) { + xo = variables[X].Values; + freq = (variables[X].NbValues - 1) / (variables[X].Last - variables[X].First); + } else { + xo = x; + freq = (npoints - 1) / (lastx - firstx); + } + //now display the spectrum + variables[R].Series = NULL; + rp.Series = m_View->GetSeries (); + GOData *godata = go_data_vector_val_new (rp.Values, n, NULL); + gog_series_set_dim (rp.Series, 1, godata, NULL); + godata = (X < 0)? go_data_vector_val_new (x, npoints, NULL): go_data_vector_val_new (variables[X].Values, variables[X].NbValues, NULL); + gog_series_set_dim (rp.Series, 0, godata, NULL); +} + +void SpectrumDocument::OnXAxisInvert (bool inverted) +{ + m_View->InvertAxis (GOG_AXIS_X, inverted); +} + +} // nampespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/spectrumdoc.h gnome-chemistry-utils-0.10.9/libs/gcu/spectrumdoc.h --- gnome-chemistry-utils-0.8.6/libs/gcu/spectrumdoc.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/spectrumdoc.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,394 @@ +/* + * Gnome Chemisty Utils + * spectrumdoc.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_SPECTRUM_DOC_H +#define GCU_SPECTRUM_DOC_H + +#include "document.h" +#include "macros.h" +#include "printable.h" +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include +#include + +/*!\file*/ +namespace gcu +{ + +/*!\enum SpectrumType gcu/spectrumdoc.h +Represents the list of spectrum types supported (or which should be supported) +by the gcu::SpectrumDocument class. +*/ +typedef enum { +/*! +Infrared spectrum. +*/ + GCU_SPECTRUM_INFRARED, +/*! +Raman spectrum. +*/ + GCU_SPECTRUM_RAMAN, +/*! +Infrared peaks table. +*/ + GCU_SPECTRUM_INFRARED_PEAK_TABLE, +/*! +Infrared iterferogram. +*/ + GCU_SPECTRUM_INFRARED_INTERFEROGRAM, +/*! +Transformed infrared spectrum. +*/ + GCU_SPECTRUM_INFRARED_TRANSFORMED, +/*! +UV-visible spectrum. +*/ + GCU_SPECTRUM_UV_VISIBLE, +/*! +NMR spectrum. +*/ + GCU_SPECTRUM_NMR, +/*! +NMR FID. +*/ + GCU_SPECTRUM_NMR_FID, +/*! +NMR peaks table. +*/ + GCU_SPECTRUM_NMR_PEAK_TABLE, +/*! +NMR peaks assignments. +*/ + GCU_SPECTRUM_NMR_PEAK_ASSIGNMENTS, +/*! +Mass spectrum. +*/ + GCU_SPECTRUM_MASS, +/*! +Last known value. This value does not represent a valid type, but is +equal to the number of supported types. +*/ + GCU_SPECTRUM_MAX +} SpectrumType; + + +/*!\enum SpectrumUnitType gcu/spectrumdoc.h +Represents the list of units supported by the gcu::SpectrumDocument class. +*/ +typedef enum { +/*! +Wave number per cm. +*/ + GCU_SPECTRUM_UNIT_CM_1, +/*! +Transmittance +*/ + GCU_SPECTRUM_UNIT_TRANSMITTANCE, +/*! +Absorbance +*/ + GCU_SPECTRUM_UNIT_ABSORBANCE, +/*! +Part per million. +*/ + GCU_SPECTRUM_UNIT_PPM, +/*! +Nanometers +*/ + GCU_SPECTRUM_UNIT_NANOMETERS, +/*! +Micrometers +*/ + GCU_SPECTRUM_UNIT_MICROMETERS, +/*! +Seconds +*/ + GCU_SPECTRUM_UNIT_SECONDS, +/*! +Hz. +*/ + GCU_SPECTRUM_UNIT_HZ, +/*! +M/Z (for mass spectra). +*/ + GCU_SPECTRUM_UNIT_M_Z, +/*! +Relative abundance. +*/ + GCU_SPECTRUM_UNIT_REL_ABUNDANCE, +/*! +Last known value. This value does not represent a valid type, but is +equal to the number of supported units. +*/ + GCU_SPECTRUM_UNIT_MAX +} SpectrumUnitType; + +/*!\enum SpectrumVarType gcu/spectrumdoc.h +Represents the list of varialble types supported by the +gcu::SpectrumDocument class. +*/ +typedef enum { +/*! +Independent variable. +*/ + GCU_SPECTRUM_TYPE_INDEPENDENT, +/*! +Dependent variable. +*/ + GCU_SPECTRUM_TYPE_DEPENDENT, +/*! +Page number. +*/ + GCU_SPECTRUM_TYPE_PAGE, +/*! +Last known value. This value does not represent a valid type, but is +equal to the number of supported types. +*/ + GCU_SPECTRUM_TYPE_MAX +} SpectrumVarType; + +/*!\enum SpectrumFormatType gcu/spectrumdoc.h +Represents the list of data formats from the JCAMP-DX specification supported +by the gcu::SpectrumDocument class. See the JCAMP-DX specification for +more information. +*/ +typedef enum { +/*! +ASCII squeezed difference form. +*/ + GCU_SPECTRUM_FORMAT_ASDF, +/*! +ASCII free format numeric. +*/ + GCU_SPECTRUM_FORMAT_AFFN, +/*! +Packed form. +*/ + GCU_SPECTRUM_FORMAT_PAC, +/*! +Squeezed form. +*/ + GCU_SPECTRUM_FORMAT_SQZ, +/*! +Difference form. +*/ + GCU_SPECTRUM_FORMAT_DIF, +/*! +Last known value. This value does not represent a valid type, but is +equal to the number of supported formats. +*/ + GCU_SPECTRUM_FORMAT_MAX +} SpectrumFormatType; + +class Application; +class SpectrumView; + +/*!\struct JdxVar gcu/spectrumdoc.h +Used to store a series of data. +*/ +typedef struct { +/*! +The name of the series. +*/ + std::string Name; +/*! +The symbol associated to the series. +*/ + char Symbol; +/*! +The SpectrumVarType of the data. +*/ + SpectrumVarType Type; +/*! +The unit stored as a SpectrumUnitType value. +*/ + SpectrumUnitType Unit; +/*! +The format of the data when loaded from a JCAMP-DX file. +*/ + SpectrumFormatType Format; +/*! +The values number. +*/ + unsigned NbValues; +/*! +First vaue in the series. +*/ + double First; +/*! +Last value in the series +*/ + double Last; +/*! +Smallest value in the series. +*/ + double Min; +/*! +Largest value in the series. +*/ + double Max; +/*! +Constant value by which each value in the series must be multiplied after +loading from a JCAMP-DX file in order to get the real value. +*/ + double Factor; +/*! +The array of values. +*/ + double *Values; +/*! +The GogSeries used in the chart. See the GOffice documentation for more +information. +*/ + GogSeries *Series; +} JdxVar; + +/*!\class SpectrumDocument gcu/spectrumdoc.h +The document class used for spectra. This API is still quite unstable and +might change in the future. +*/ +class SpectrumDocument: public Document, public Printable +{ +public: +/*! +Default constructor +*/ + SpectrumDocument (); +/*! +@param app the application. +@param view an optional already existing SpectrumView instance. +*/ + SpectrumDocument (Application *app, SpectrumView *view = NULL); + +/*! +Default destructor +*/ + ~SpectrumDocument (); + +/*! +@param uri the uri of the spectrum file. +@param mime_type the mime type of the spectrum file. + +Loads a spaectrum from the provided uri. Default mime type is NULL, +"chemical/x-jcamp-dx" is the only one supported at the moment. +*/ + void Load (char const *uri, char const *mime_type = NULL); + +/*! +@param i the rank of the unit to set. + +Called to change the displayed X axis unit. The values acceptable for the +parameter are spectrum type dependent. This is used by the framework after +a user made an appropriate request from the graphical interface. +*/ + void OnXUnitChanged (int i); + +/*! +@param i the rank of the unit to set. + +Called to change the displayed Y axis unit. The values acceptable for the +parameter are spectrum type dependent. This is used by the framework after +a user made an appropriate request from the graphical interface. +*/ + void OnYUnitChanged (int i); + +/*! +@param inverted whether to invert the X axis scale. + +Called to change the X axis scale order. This is used by the framework after +a user made an appropriate request from the graphical interface. +*/ + void OnXAxisInvert (bool inverted); + +/*! +Used to show or hide the integral curve for an NMR spectrum. +*/ + void OnShowIntegral (); + +/*! +@param btn the clicked GtkButton. + +Called to transform an FID to the NMR spectrum. The label in the GtkButton +might be changed. +*/ + void OnTransformFID (GtkButton *btn); + +private: + void LoadJcampDx (char const *data); + void ReadDataLine (char const *data, std::list &l); + void DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const; + GtkWindow *GetGtkWindow (); + void ReadDataTable (std::istream &s, double *x, double *y); + double (*GetConversionFunction (SpectrumUnitType oldu, SpectrumUnitType newu, double &factor, double &offset)) (double, double, double); + +private: + double *x, *y; + unsigned npoints; + double maxx, maxy, minx, miny; + double firstx, lastx, deltax, firsty; + double xfactor, yfactor; + std::vector variables; + int X, Y, R, I, integral, Rt, It, Rp; + double freq; + double offset, refpoint; + GtkWidget *m_XAxisInvertBtn; + guint m_XAxisInvertSgn; + +/*!\var m_View +The SpectrumView instance associated with the document. +*/ +/*!\fn GetView() +@return the SpectrumView instance associated with the document. +*/ +GCU_PROT_PROP (SpectrumView*, View) +/*!\fn GetEmpty() +@return true if the document does not have any data, false otherwise. +*/ +GCU_RO_PROP (bool, Empty) +/*!\fn GetSpectrumType() +@return the gcu::SpectrumType of the document, or GCU_SPECTRUM_TYPE_MAX. +*/ +GCU_RO_PROP (SpectrumType, SpectrumType) +/*!\fn GetXUnit() +@return the unit of the x-axis as gcu::SpectumUnitType, or +GCU_SPECTRUM_UNIT_MAX. +*/ +GCU_RO_PROP (SpectrumUnitType, XUnit) +/*!\fn GetYUnit() +@return the unit of the y-axis as gcu::SpectumUnitType, or +GCU_SPECTRUM_UNIT_MAX. +*/ +GCU_RO_PROP (SpectrumUnitType, YUnit) +/*!\fn GetIntegralVisible() +@return true if the integral of an NMR spectrum is visible, false in all +other cases. +*/ +GCU_RO_PROP (bool, IntegralVisible) +}; + +} + +#endif // GCU_SPECTRUM_DOC_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/spectrumview.cc gnome-chemistry-utils-0.10.9/libs/gcu/spectrumview.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/spectrumview.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/spectrumview.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,297 @@ +/* + * Gnome Chemisty Utils + * spectrumview.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "spectrumdoc.h" +#include "spectrumview.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +# include +# include +# include +# ifndef GOG_TYPE_LABEL +# define GOG_TYPE_LABEL GOG_LABEL_TYPE +# include +# define GOStyle GogStyle +# define go_styled_object_get_style gog_styled_object_get_style +# define GO_STYLED_OBJECT GOG_STYLED_OBJECT +# else +# include +# include +# endif +# include +# include +#endif +#include +#include +#include +#include +#include + +using namespace std; + +namespace gcu +{ + +static void on_min_changed (SpectrumView *view) +{ + view->OnMinChanged (); +} + +static void on_max_changed (SpectrumView *view) +{ + view->OnMaxChanged (); +} + +static void on_xrange_changed (SpectrumView *view) +{ + view->OnXRangeChanged (); +} + +SpectrumView::SpectrumView (SpectrumDocument *pDoc) +{ + m_Doc = pDoc; + m_Widget = go_graph_widget_new (NULL); + GogGraph *graph = go_graph_widget_get_graph (GO_GRAPH_WIDGET (m_Widget)); + /* Add a title */ + GogLabel *label = (GogLabel *) g_object_new (GOG_TYPE_LABEL, NULL); + gog_object_add_by_name (GOG_OBJECT (graph), "Title", GOG_OBJECT (label)); + /* Get the chart created by the widget initialization */ + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + /* Create a scatter plot and add it to the chart */ + GogPlot *plot = (GogPlot *) gog_plot_new_by_name ("GogXYPlot"); + g_object_set (plot, "default-style-has-markers", false, NULL); + gog_object_add_by_name (GOG_OBJECT (chart), "Plot", GOG_OBJECT (plot)); + /* Create a series for the plot and populate it with some simple data */ + m_Series = gog_plot_new_series (plot); + m_OptionBox = gtk_vbox_new (false, 5); + GtkWidget *box = gtk_hbox_new (false, 5); + GtkWidget *w = gtk_label_new (_("Minimum X value:")); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + xminbtn = GTK_SPIN_BUTTON (gtk_spin_button_new_with_range (0., 1., 0.1)); + minsgn = g_signal_connect_swapped (xminbtn, "value-changed", G_CALLBACK (on_min_changed), this); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (xminbtn), false, false, 0); + w = gtk_label_new (_("Maximum X value:")); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + xmaxbtn = GTK_SPIN_BUTTON (gtk_spin_button_new_with_range (0., 1., 0.1)); + maxsgn = g_signal_connect_swapped (xmaxbtn, "value-changed", G_CALLBACK (on_max_changed), this); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (xmaxbtn), false, false, 0); + xrange = GTK_RANGE (gtk_hscrollbar_new (NULL)); + gtk_widget_set_sensitive (GTK_WIDGET (xrange), false); + xrangesgn = g_signal_connect_swapped (xrange, "value-changed", G_CALLBACK (on_xrange_changed), this); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (xrange), true, true, 0); + gtk_box_pack_start (GTK_BOX (m_OptionBox), box, false, false, 0); +} + +SpectrumView::~SpectrumView () +{ +} + +void SpectrumView::SetAxisBounds (GogAxisType target, double min, double max, bool inverted) +{ + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GSList *axes = gog_chart_get_axes (chart, target); + GogAxis *axis = GOG_AXIS (axes->data); + gog_axis_set_bounds (axis, min, max); + g_object_set (axis, "invert-axis", inverted, NULL); + if (target == GOG_AXIS_X) { + double l = log10 (fabs (max - min)); + int n = (l < 3)? rint (3 - l): 0; + xstep = pow (10., -n); + g_signal_handler_block (xminbtn, minsgn); + g_signal_handler_block (xmaxbtn, maxsgn); + gtk_spin_button_set_range (xminbtn, min, max); + gtk_spin_button_set_range (xmaxbtn, min, max); + gtk_spin_button_set_increments (xminbtn, xstep, 100 * xstep); + gtk_spin_button_set_increments (xmaxbtn, xstep, 100 * xstep); + gtk_range_set_increments (xrange, xstep, 100 * xstep); + gtk_range_set_inverted (xrange, !inverted); + g_signal_handler_block (xrange, xrangesgn); + gtk_range_set_value (xrange, 0.); + gtk_widget_set_sensitive (GTK_WIDGET (xrange), false); + g_signal_handler_unblock (xrange, xrangesgn); + gtk_spin_button_set_value (xminbtn, min); + gtk_spin_button_set_value (xmaxbtn, max); + gtk_spin_button_set_digits (xminbtn, n); + gtk_spin_button_set_digits (xmaxbtn, n); + g_signal_handler_unblock (xminbtn, minsgn); + g_signal_handler_unblock (xmaxbtn, maxsgn); + xmin = min; + xmax = max; + } +} + +void SpectrumView::SetAxisLabel (GogAxisType target, char const *unit) +{ + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GSList *axes = gog_chart_get_axes (chart, target); + GogObject *axis = GOG_OBJECT (axes->data); + GOData *data = go_data_scalar_str_new (unit, false); + GogObject *label = gog_object_get_child_by_name (axis, "Label"); + if (label) { + // remove the old label if any + gog_object_clear_parent (label); + g_object_unref (label); + } + label = GOG_OBJECT (g_object_new (GOG_TYPE_LABEL, NULL)); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, NULL); + gog_object_add_by_name (axis, "Label", label); + +} + +void SpectrumView::ShowAxis (GogAxisType target, bool show) +{ + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GSList *axes = gog_chart_get_axes (chart, target); + GogObject *axis = GOG_OBJECT (axes->data); + g_object_set (G_OBJECT (axis), "major-tick-labeled", false, NULL); + GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (axis)); + style->line.dash_type = GO_LINE_NONE; + style->line.auto_dash = false; +} + +void SpectrumView::Render (cairo_t *cr, double width, double height) +{ + gog_graph_render_to_cairo (go_graph_widget_get_graph (GO_GRAPH_WIDGET (m_Widget)), cr, width, height); +} + +void SpectrumView::OnMinChanged () +{ + double min = gtk_spin_button_get_value (xminbtn); + double max = gtk_spin_button_get_value (xmaxbtn); + if (max <= min) { + double step; + gtk_spin_button_get_increments (xminbtn, &step, NULL); + min = max - step; + g_signal_handler_block (xminbtn, minsgn); + gtk_spin_button_set_value (xminbtn, min); + g_signal_handler_unblock (xminbtn, minsgn); + } + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GSList *axes = gog_chart_get_axes (chart, GOG_AXIS_X); + GogAxis *axis = GOG_AXIS (axes->data); + gog_axis_set_bounds (axis, min, max); + g_signal_handler_block (xrange, xrangesgn); + if (max - min < xmax - xmin) { + gtk_range_set_range (xrange, 0., xmax - xmin - max + min); + gtk_range_set_value (xrange, min - xmin); + gtk_widget_set_sensitive (GTK_WIDGET (xrange), true); + } else { + gtk_range_set_value (xrange, 0.); + gtk_widget_set_sensitive (GTK_WIDGET (xrange), false); + } + g_signal_handler_unblock (xrange, xrangesgn); +} + +void SpectrumView::OnMaxChanged () +{ + double min = gtk_spin_button_get_value (xminbtn); + double max = gtk_spin_button_get_value (xmaxbtn); + if (max <= min) { + double step; + gtk_spin_button_get_increments (xmaxbtn, &step, NULL); + max = min + step; + g_signal_handler_block (xmaxbtn, maxsgn); + gtk_spin_button_set_value (xmaxbtn, max); + g_signal_handler_unblock (xmaxbtn, maxsgn); + } + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GSList *axes = gog_chart_get_axes (chart, GOG_AXIS_X); + GogAxis *axis = GOG_AXIS (axes->data); + gog_axis_set_bounds (axis, min, max); + g_signal_handler_block (xrange, xrangesgn); + if (max - min < xmax - xmin) { + gtk_range_set_range (xrange, 0., xmax - xmin - max + min); + gtk_range_set_value (xrange, min - xmin); + gtk_widget_set_sensitive (GTK_WIDGET (xrange), true); + } else { + gtk_range_set_value (xrange, 0.); + gtk_widget_set_sensitive (GTK_WIDGET (xrange), false); + } + g_signal_handler_unblock (xrange, xrangesgn); +} + +void SpectrumView::OnXRangeChanged () +{ + double max = gtk_spin_button_get_value (xmaxbtn) - gtk_spin_button_get_value (xminbtn); + double min = xmin + gtk_range_get_value (xrange); + max += min; + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GSList *axes = gog_chart_get_axes (chart, GOG_AXIS_X); + GogAxis *axis = GOG_AXIS (axes->data); + gog_axis_set_bounds (axis, min, max); + g_signal_handler_block (xminbtn, minsgn); + gtk_spin_button_set_value (xminbtn, min); + g_signal_handler_unblock (xminbtn, minsgn); + g_signal_handler_block (xmaxbtn, maxsgn); + gtk_spin_button_set_value (xmaxbtn, max); + g_signal_handler_unblock (xmaxbtn, maxsgn); +} + +GogSeries *SpectrumView::NewSeries (bool new_plot) +{ + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GogPlot *plot = NULL; + if (new_plot) { + /* Create a scatter plot and add it to the chart */ + plot = (GogPlot *) gog_plot_new_by_name ("GogXYPlot"); + g_object_set (plot, "default-style-has-markers", false, NULL); + gog_object_add_by_name (GOG_OBJECT (chart), "Plot", GOG_OBJECT (plot)); + } else { + // find the first plot in the chart + GSList *l = gog_object_get_children (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Plot")); + plot = (GogPlot*) l->data; + g_slist_free (l); + } + return gog_plot_new_series (plot); +} + +void SpectrumView::SaveAsImage (string const &filename, char const *mime_type, unsigned width, unsigned height) const +{ + char *fname = go_mime_to_image_format (mime_type); + GOImageFormat format = go_image_get_format_from_name ((fname)? fname: filename.c_str ()); + if (format == GO_IMAGE_FORMAT_UNKNOWN) + return; + GError *error = NULL; + GsfOutput *output = gsf_output_gio_new_for_uri (filename.c_str (), &error); + if (error) { + g_error_free (error); + return; + } + GogGraph *graph = gog_graph_dup (go_graph_widget_get_graph (GO_GRAPH_WIDGET (m_Widget))); + gog_graph_set_size (graph, width, height); + gog_graph_export_image (graph, format, output, -1., -1.); + g_object_unref (graph); +} + +void SpectrumView::InvertAxis (GogAxisType target, bool inverted) +{ + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); + GSList *axes = gog_chart_get_axes (chart, target); + GogAxis *axis = GOG_AXIS (axes->data); + g_object_set (axis, "invert-axis", inverted, NULL); +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/spectrumview.h gnome-chemistry-utils-0.10.9/libs/gcu/spectrumview.h --- gnome-chemistry-utils-0.8.6/libs/gcu/spectrumview.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/spectrumview.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,163 @@ +/* + * Gnome Chemisty Utils + * spectrumview.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_SPECTRUM_VIEW_H +#define GCU_SPECTRUM_VIEW_H + +#include "macros.h" +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include + +/*!\file*/ +namespace gcu +{ + +class SpectrumDocument; + +/*!\class SpectrumView gcu/spectrumview.h +The view class used for spectra. This API is still quite unstable and +might change in the future. +*/ +class SpectrumView +{ +public: +//!Constructor. +/*! +@param pDoc: a pointer to the SpectrumDocument instance. + +Creates a view for the document. +*/ + SpectrumView (SpectrumDocument *pDoc); + +//!Destructor. +/*! +The destructor of SpectrumView. +*/ + virtual ~SpectrumView (); + +/*! +@param target an axis type. +@param min the mimimum value to show. +@param max the maximum value to show. +@param inverted whether to invert the axis. + +Sets the scale of the first axis of the selected type. +*/ + void SetAxisBounds (GogAxisType target, double min, double max, bool inverted); + +/*! +@param target an axis type. +@param unit a text (might be a unit). + +Sets the text for the label of the first axis of the selected type. +*/ + void SetAxisLabel (GogAxisType target, char const *unit); + +/*! +@param target an axis type. +@param show whether to show the axis or not + +Used to show or hide the first axis of either GOG_AXIS_X or GOG_AXIS_Y types. +*/ + void ShowAxis (GogAxisType target, bool show); + +/*! +@param target an axis type. +@param inverted whether to invert the axis scale or not + +Used to invert the first axis of either GOG_AXIS_X or GOG_AXIS_Y types. +*/ + void InvertAxis (GogAxisType target, bool inverted); + +/*! +@param cr the cairo_t* to which render. +@param width the width of the rendering area. +@param height the height of the rendering area. + +Renders the chart to \a cr. +*/ + void Render (cairo_t *cr, double width, double height); + +/*! +Called by the framework if the minimum has changed for the x-axis. +*/ + void OnMinChanged (); + +/*! +Called by the framework if the maximum has changed for the x-axis. +*/ + void OnMaxChanged (); + +/*! +Called by the framework if the range has changed for the x-axis. +*/ + void OnXRangeChanged (); + +/*! +@param new_plot if true, a new plot is created (this is not yet implemented). +Creates a new GogSeries for the chart. +*/ + GogSeries *NewSeries (bool new_plot); + +/*! +@param filename the name of the file. +@param mime_type the requested mime type. +@param width the width of the generated image. +@param height the height of the generated image. + +Export the view contents as an image. The size of the new image is defined by the width +and height parameters. Supported ilage file format include svg, png, jpeg, ps, eps, +and pdf, and possibly a few other bitmap formats. +*/ + void SaveAsImage (std::string const &filename, char const *mime_type, unsigned width, unsigned height) const; + +private: + GtkSpinButton *xminbtn, *xmaxbtn; + GtkRange *xrange; + gulong minsgn, maxsgn, xrangesgn; + double xmin, xmax, xstep; + +/*!\fn GetDoc() +@return the associated document. +*/ +GCU_RO_PROP (SpectrumDocument *, Doc) +/*!\fn GetWidget() +@return the widget used to display the spectrum. +*/ +GCU_RO_PROP (GtkWidget *, Widget) +/*!\fn GetOptionBox() +@return a GtkBox to which an optional user interface might be added. +*/ +GCU_RO_PROP (GtkWidget *, OptionBox) +/*!\fn GetSeries() +@return the first GogSeries* created for the view. +*/ +GCU_RO_PROP (GogSeries *, Series) +}; + +} + +#endif // GCU_SPECTRUM_VIEW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/sphere.cc gnome-chemistry-utils-0.10.9/libs/gcu/sphere.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/sphere.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/sphere.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,304 @@ +/********************************************************************** + Sphere - Class for drawing spheres in OpenGL + + Copyright (C) 2007 Jean Brefort + Copyright (C) 2006,2007 Benoit Jacob + + This file is part of the Avogadro molecular editor project. + For more information, see + + Avogadro is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Avogadro is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + **********************************************************************/ + +#include "config.h" +#include "sphere.h" +#include "vector.h" +#include +#include +#include + +using namespace OpenBabel; + +namespace gcu { + +class SpherePrivate +{ +public: + SpherePrivate (): vertexBuffer(0), indexBuffer(0), displayList(0), isValid(false) {} + + /** Pointer to the buffer storing the vertex array */ + Vector3f *vertexBuffer; + /** Pointer to the buffer storing the indices */ + unsigned short *indexBuffer; + /** The id of the OpenGL display list */ + GLuint displayList; + /** the detail-level of the sphere. Must be at least 0. + * If 0, the sphere is an octahedron. If >=1, this number is + * interpreted as the number of sub-edges into which + * each edge of the icosahedron must be split. So the + * number of faces of the sphere is simply: + * 20 * detail^2. When detail==1, the sphere is just the + * icosahedron */ + int detail; + + bool isValid; +}; + +Sphere::Sphere (int detail): d (new SpherePrivate) +{ + setup (detail); +} + +Sphere::~Sphere () +{ + freeBuffers (); + if (d->displayList) + glDeleteLists (d->displayList, 1); + delete d; +} + +void Sphere::freeBuffers () +{ + if (d->indexBuffer) { + delete[] d->indexBuffer; + d->indexBuffer = 0; + } + if( d->vertexBuffer ) { + delete[] d->vertexBuffer; + d->vertexBuffer = 0; + } +} + +void Sphere::draw (vector3 const ¢er, double radius) const +{ + glPushMatrix (); + glTranslated (center.x (), center.y (), center.z ()); + glScaled (radius, radius, radius); + glCallList (d->displayList); + glPopMatrix (); +} + +#define USE_OCTAHEDRON_VERTEX(i) glNormal3fv(octahedronVertices[i]); \ + glVertex3fv(octahedronVertices[i]); + +void Sphere::initialize () +{ + if (d->detail < 0) + return; + + // deallocate any previously allocated buffer + freeBuffers (); + d->isValid = false; + int vertexCount = 0, indexCount = 0; + + if (d->detail == 0) { + if (!d->displayList) + d->displayList = glGenLists (1); + if (!d->displayList) + return; + float octahedronVertices[6][3] = {{1, 0, 0}, + {0, 1, 0}, + {0, 0, 1}, + {0, -1, 0}, + {0, 0, -1}, + {-1, 0, 0}}; + glNewList( d->displayList, GL_COMPILE ); + glBegin(GL_TRIANGLE_FAN); + USE_OCTAHEDRON_VERTEX(0); + USE_OCTAHEDRON_VERTEX(1); + USE_OCTAHEDRON_VERTEX(2); + USE_OCTAHEDRON_VERTEX(3); + USE_OCTAHEDRON_VERTEX(4); + USE_OCTAHEDRON_VERTEX(1); + glEnd(); + glBegin(GL_TRIANGLE_FAN); + USE_OCTAHEDRON_VERTEX(5); + USE_OCTAHEDRON_VERTEX(1); + USE_OCTAHEDRON_VERTEX(4); + USE_OCTAHEDRON_VERTEX(3); + USE_OCTAHEDRON_VERTEX(2); + USE_OCTAHEDRON_VERTEX(1); + glEnd(); + glEndList(); + d->isValid = true; + return; + } + + // compute number of vertices and indices + vertexCount = (3 * d->detail + 1) * (5 * d->detail + 1); + indexCount = (2 * (2 * d->detail + 1) + 2) * 5 * d->detail; + + // allocate memory for buffers + d->vertexBuffer = new Vector3f[vertexCount]; + if (!d->vertexBuffer) + return; + d->indexBuffer = new unsigned short[indexCount]; + if (!d->indexBuffer) { + delete[] d->vertexBuffer; + d->vertexBuffer = 0; + return; + } + + // build vertex buffer + for (int strip = 0; strip < 5; strip++) + for (int column = 1; column < d->detail; column++) + for (int row = column; row <= 2 * d->detail + column; row++) + computeVertex (strip, column, row); + + for (int strip = 1; strip < 5; strip++) + for (int row = 0; row <= 3 * d->detail; row++) + computeVertex (strip, 0, row); + + + for( int row = 0; row <= 2 * d->detail; row++ ) + computeVertex (0, 0, row); + + for( int row = d->detail; row <= 3 * d->detail; row++ ) + computeVertex (4, d->detail, row); + + // build index buffer + unsigned int i = 0; + for (int strip = 0; strip < 5; strip++) + for (int column = 0; column < d->detail; column++) { + int row = column; + d->indexBuffer[i++] = indexOfVertex (strip, column, row); + for (; row <= 2 * d->detail + column; row++) { + d->indexBuffer[i++] = indexOfVertex (strip, column, row); + d->indexBuffer[i++] = indexOfVertex (strip, column + 1, row + 1); + } + d->indexBuffer[i++] = indexOfVertex (strip, column + 1, + 2 * d->detail + column + 1); + } + + // compile display list and free buffers + if (!d->displayList) + d->displayList = glGenLists( 1 ); + if (!d->displayList) + return; + glEnableClientState (GL_VERTEX_ARRAY); + glEnableClientState (GL_NORMAL_ARRAY); + glNewList (d->displayList, GL_COMPILE); + glVertexPointer (3, GL_FLOAT, 0, d->vertexBuffer); + glNormalPointer (GL_FLOAT, 0, d->vertexBuffer); + glDrawElements (GL_TRIANGLE_STRIP, indexCount, GL_UNSIGNED_SHORT, d->indexBuffer); + glEndList (); + glDisableClientState (GL_VERTEX_ARRAY); + glDisableClientState (GL_NORMAL_ARRAY); + freeBuffers (); + d->isValid = true; +} + +unsigned short Sphere::indexOfVertex (int strip, int column, int row) +{ + return row + (3 * d->detail + 1) * (column + d->detail * strip); +} + +void Sphere::computeVertex (int strip, int column, int row) +{ + strip %= 5; + int next_strip = (strip + 1) % 5; + + // the index of the vertex we want to store the result in + unsigned short index = indexOfVertex (strip, column, row); + + // reference to the vertex we want to store the result in + Vector3f &vertex = d->vertexBuffer[index]; + + // the "golden ratio", useful to construct an icosahedron + const float phi = (1 + sqrtf(5.0f)) / 2; + + // the 12 vertices of the icosahedron + const Vector3f northPole (0, 1, phi); + const Vector3f northVertices[5] = { + Vector3f (0, -1, phi), + Vector3f (phi, 0, 1), + Vector3f (1, phi, 0), + Vector3f (-1, phi, 0), + Vector3f (-phi, 0, 1) }; + const Vector3f southVertices[5] = { + Vector3f (-1, -phi, 0), + Vector3f (1, -phi, 0), + Vector3f (phi, 0, -1), + Vector3f (0, 1, -phi), + Vector3f (-phi, 0, -1) + }; + const Vector3f southPole (0, -1, -phi); + + // pointers to the 3 vertices of the face of the icosahedron + // in which we are + const Vector3f *v0, *v1, *v2; + + // coordinates of our position inside this face. + // range from 0 to d->detail. + int c1, c2; + + // first, normalize the global coords row, column + if (row >= 2 * d->detail && column == 0) { + strip--; + if (strip < 0) + strip += 5; + next_strip--; + if (next_strip < 0) + next_strip += 5; + column = d->detail; + } + + // next, determine in which face we are, and determine the coords + // of our position inside this face + if (row <= d->detail) { + v0 = &northVertices[strip]; + v1 = &northPole; + v2 = &northVertices[next_strip]; + c1 = d->detail - row; + c2 = column; + } else if (row >= 2 * d->detail) { + v0 = &southVertices[next_strip]; + v1 = &southPole; + v2 = &southVertices[strip]; + c1 = row - 2 * d->detail; + c2 = d->detail - column; + } else if (row <= d->detail + column) { + v0 = &northVertices[next_strip]; + v1 = &southVertices[next_strip]; + v2 = &northVertices[strip]; + c1 = row - d->detail; + c2 = d->detail - column; + } else { + v0 = &southVertices[strip]; + v1 = &southVertices[next_strip]; + v2 = &northVertices[strip]; + c1 = column; + c2 = 2 * d->detail - row; + } + + // now, compute the actual coords of the vertex + float u1 = static_cast (c1) / d->detail; + float u2 = static_cast (c2) / d->detail; + vertex = *v0 + u1 * (*v1 - *v0) + u2 * (*v2 - *v0); + + // project the vertex onto the sphere + vertex.normalize (); +} + +void Sphere::setup (int detail) +{ + if (d->isValid && detail == d->detail) + return; + d->detail = detail; + initialize (); +} + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/sphere.h gnome-chemistry-utils-0.10.9/libs/gcu/sphere.h --- gnome-chemistry-utils-0.8.6/libs/gcu/sphere.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/sphere.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,88 @@ +/********************************************************************** + Sphere - Class for drawing spheres in OpenGL + + Copyright (C) 2007-2008 Jean Brefort + Copyright (C) 2006,2007 Benoit Jacob + + This file is part of the Avogadro molecular editor project. + For more information, see + + Avogadro is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Avogadro is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + **********************************************************************/ + +#ifndef GCU_SPHERE_H +#define GCU_SPHERE_H + +namespace OpenBabel { + class vector3; +} + +/*!\file*/ +namespace gcu { + +/** \class Sphere gcu/sphere.h +* This class represents and draws a sphere. The level of detail can be controlled. +* At level 0, the sphere is a octahedron. At levels >=1, the sphere is a +* "geosphere", that is, one starts with an icosahedron, which is the regular +* solid with 20 triangular faces, and one then sub-tesselates each face into +* smaller triangles. This is a classical tesselation, known to give a very good +* quality/complexity ratio. +* +* \author Benoit Jacob +*/ + +class SpherePrivate; + +class Sphere +{ +private: + SpherePrivate * const d; + +protected: + + /** computes the index (position inside the index buffer) + * of a vertex given by its position (strip, column, row) + * inside a certain flat model of the sub-tesselated + * icosahedron */ + inline unsigned short indexOfVertex (int strip, int column, int row); + + /** computes the coordinates + * of a vertex given by its position (strip, column, row) + * inside a certain flat model of the sub-tesselated + * icosahedron */ + void computeVertex (int strip, int column, int row); + + void freeBuffers (); + void initialize (); + +public: + Sphere (int detail = 0); + ~Sphere (); + + /** initializes the sphere with given level of detail. If the + * sphere was already initialized, any pre-allocated buffers + * are freed and then re-allocated. + @param detail the wanted level of detail. See m_detail member */ + void setup (int detail); + + /** draws the sphere at specified position and with + * specified radius */ + void draw (OpenBabel::vector3 const ¢er, double radius) const; +}; + +} + +#endif // GCU_SPHERE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/value.cc gnome-chemistry-utils-0.10.9/libs/gcu/value.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/value.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/value.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,251 @@ +/* + * Gnome Chemistry Utils + * value.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "value.h" +#include +#include +#include + +using namespace std; + +namespace gcu +{ + +Value::Value () +{ +} + +Value::~Value () +{ +} + +char const *Value::GetAsString () const +{ + return ""; +} + +double Value::GetAsDouble () const +{ + return 0.; +} + +SimpleValue::SimpleValue (): Value () +{ + val.value = 0.; + val.prec = val.delta = 0; +} + +SimpleValue::SimpleValue (GcuValue value): + Value (), val (value) +{ +} + +SimpleValue::~SimpleValue () +{ +} + +char const *SimpleValue::GetAsString () const +{ + if (str.length () == 0) { + char *buf = gcu_value_get_string (&val); + const_cast (this)->str = buf; + g_free (buf); + } + return str.c_str (); +} + +double SimpleValue::GetAsDouble () const +{ + return val.value; +} + +SimpleValue SimpleValue::operator+ (SimpleValue const &value) const +{ + SimpleValue result; + result.val.value = val.value + value.val.value; + if (val.prec > value.val.prec) { + result.val.prec = value.val.prec; + int n = 1; + while (result.val.prec < val.prec) { + n *= 10; + result.val.prec++; + } + result.val.delta = val.delta + n * value.val.delta; + } else { + result.val.prec = val.prec; + int n = 1; + while (result.val.prec < value.val.prec) { + n *= 10; + result.val.prec++; + } + result.val.delta = value.val.delta + n * val.delta; + } + return result; +} + +SimpleValue SimpleValue::operator* (int n) const +{ + SimpleValue result; + result.val.prec = val.prec; + result.val.value = val.value * n; + result.val.delta = val.delta * n; + return result; +} + +DimensionalValue::DimensionalValue (): Value () +{ + val.value = 0.; + val.prec = val.delta = 0; + val.unit = NULL; +} + +DimensionalValue::~DimensionalValue () +{ +} + +char const *DimensionalValue::GetAsString () const +{ + if (str.length () == 0) { + char *buf = gcu_dimensional_value_get_string (&val); + const_cast (this)->str = buf; + g_free (buf); + } + return str.c_str (); +} + +double DimensionalValue::GetAsDouble () const +{ + return val.value; +} + +DimensionalValue DimensionalValue::operator+ (DimensionalValue const &value) const throw (std::invalid_argument) +{ + DimensionalValue result; + // only make the addition if units are the same, otherwise throw an exception + if (strcmp (val.unit, value.val.unit)) + throw new invalid_argument (_("Attempt to add two values with different units.")); + result.val.unit = val.unit; + result.val.value = val.value + value.val.value; + if (val.prec > value.val.prec) { + result.val.prec = value.val.prec; + int n = 1; + while (result.val.prec < val.prec) { + n *= 10; + result.val.prec++; + } + result.val.delta = val.delta + n * value.val.delta; + } else { + result.val.prec = val.prec; + int n = 1; + while (result.val.prec < value.val.prec) { + n *= 10; + result.val.prec++; + } + result.val.delta = value.val.delta + n * val.delta; + } + return result; +} + +DimensionalValue DimensionalValue::operator* (int n) const +{ + DimensionalValue result; + result.val.unit = val.unit; + result.val.prec = val.prec; + result.val.value = val.value * n; + result.val.delta = val.delta * n; + return result; +} + +StringValue::StringValue () +{ +} + +StringValue::~StringValue () +{ +} + +char const *StringValue::GetAsString () const +{ + return val.c_str (); +} + +LocalizedStringValue::LocalizedStringValue () +{ +} + +LocalizedStringValue::~LocalizedStringValue () +{ + vals.clear (); +} + +char const *LocalizedStringValue::GetAsString () const +{ + char *lang = getenv ("LANG"); + map ::const_iterator i, end = vals.end (); + if (lang) { + i = vals.find (lang); + if (i == end || (*i).second.length () == 0) { + lang = g_strdup (lang); + char *dot = strchr (lang, '.'); + if (dot) { + *dot = 0; + i = vals.find (lang); + if (i == end || (*i).second.length () > 0) { + g_free (lang); + return (*i).second.c_str (); + } + } + if (strlen (lang) > 2) { + lang[2] = 0; + i = vals.find (lang); + if (i == end || (*i).second.length () > 0) { + g_free (lang); + return (*i).second.c_str (); + } + } + g_free (lang); + } else + return (*i).second.c_str (); + } + // if we are there, try "C" or "en" locales + i = vals.find ("C"); + if (i != end && (*i).second.length () > 0) + return (*i).second.c_str (); + i = vals.find ("en"); + if (i != end && (*i).second.length () > 0) + return (*i).second.c_str (); + // if not found, return first occurence or a void string + if (vals.size () > 0) + return (*vals.begin ()).second.c_str (); + return ""; +} + +char const *LocalizedStringValue::GetLocalizedString (char const *lang) const +{ + string s; + if (lang) + s = const_cast (this)->vals[lang]; + return (s.length () > 0)? s.c_str (): GetAsString (); +} + +} // namespace gcu diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/value.h gnome-chemistry-utils-0.10.9/libs/gcu/value.h --- gnome-chemistry-utils-0.8.6/libs/gcu/value.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/value.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,199 @@ +/* + * Gnome Chemistry Utils + * value.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_VALUE_H +#define GCU_VALUE_H + +#include "chemistry.h" +#include +#include +#include +#include + +/*!\file*/ +namespace gcu +{ + +/*!\class Value gcu/value.h +Base class used for data storing. +*/ +class Value +{ +public: +/*! +Default constructor +*/ + Value (); +/*! +Default destructor +*/ + virtual ~Value (); + +/*! +@return the value representation as a string. +*/ + virtual char const *GetAsString () const; + +/*! +@return the value representation as a double or 0. if not a numeric value. +*/ + virtual double GetAsDouble () const; +}; + +/*!\class SimpleValue gcu/value.h +Used to store adimensional data. +*/ +class SimpleValue: public Value +{ +friend class Element; + +public: +/*! +Default constructor +*/ + SimpleValue (); + SimpleValue (GcuValue value); +/*! +Default destructor +*/ + virtual ~SimpleValue (); + +/*! +@return the literal representation of the embedded adimensional data +*/ + char const *GetAsString () const; +/*! +@return the embedded value. +*/ + double GetAsDouble () const; +/*! +@return the embedded GcuValue structure. +*/ + GcuValue const GetValue () {return val;} + SimpleValue operator+ (SimpleValue const &value) const; + SimpleValue operator* (int n) const; + +private: + GcuValue val; + std::string str; +}; +/*!\class DimensionalValue gcu/value.h +Used for data with a dimension e.g. a time interval expressed in days. +*/ + +class DimensionalValue: public Value +{ +friend class Element; + +public: +/*! +Default constructor +*/ + DimensionalValue (); +/*! +Default destructor +*/ + virtual ~DimensionalValue (); + +/*! +@return the literal representation of the embedded dimensional data +*/ + char const *GetAsString () const; +/*! +@return the embedded value. Note that the unit is lost. +*/ + double GetAsDouble () const; + + DimensionalValue operator+ (DimensionalValue const &value) const throw (std::invalid_argument); + DimensionalValue operator* (int n) const; +/*! +@return the embedded GcuDimensionalValue structure. +*/ + GcuDimensionalValue const GetValue () const {return val;} + +private: + GcuDimensionalValue val; + std::string str; +}; + +/*!\class StringValue gcu/value.h +Used to store literal data. +*/ +class StringValue: public Value +{ +friend class Element; + +public: +/*! +Default constructor +*/ + StringValue (); +/*! +Default destructor +*/ + virtual ~StringValue (); + +/*! +@return the embedded string. +*/ + char const *GetAsString () const; + +private: + std::string val; +}; + +/*!\class LocalizedStringValue gcu/value.h +Used to store translatable strings. +*/ +class LocalizedStringValue: public Value +{ +friend class Element; + +public: +/*! +Default constructor +*/ + LocalizedStringValue (); +/*! +Default destructor +*/ + virtual ~LocalizedStringValue (); + +/*! +@return the string translated to the current locale if known, otherwise, the untranslated +string. +*/ + char const *GetAsString () const; +/*! +@param lang a locale name. +@return the string translated to the requested locale if known, otherwise, the untranslated +string. +*/ + char const *GetLocalizedString (char const *lang) const; + +private: + std::map vals; +}; + +} // namespace gcu + +#endif // GCU_VALUE_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/vector.cc gnome-chemistry-utils-0.10.9/libs/gcu/vector.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/vector.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/vector.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,89 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * vector.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "vector.h" +#include + +namespace gcu +{ + +Vector3f::Vector3f (): + m_x (0.), + m_y (0.), + m_z (0.) +{ +} + +Vector3f::Vector3f (float x, float y, float z): + m_x (x), + m_y (y), + m_z (z) +{ +} + +Vector3f::~Vector3f () +{ +} + +void Vector3f::normalize () +{ + double norm = sqrtf (m_x * m_x + m_y * m_y + m_z * m_z); + m_x /= norm; + m_y /= norm; + m_z /= norm; +} + +Vector3f &Vector3f::operator= (Vector3f const& other) +{ + m_x = other.m_x; + m_y = other.m_y; + m_z = other.m_z; + return *this; +} + +Vector3f Vector3f::operator- (Vector3f const& other) const +{ + Vector3f v (m_x - other.m_x, m_y - other.m_y, m_z - other.m_z); + return v; +} + +Vector3f Vector3f::operator+ (Vector3f const& other) const +{ + Vector3f v (m_x + other.m_x, m_y + other.m_y, m_z + other.m_z); + return v; +} + +Vector3f Vector3f::operator* (float f) const +{ + Vector3f v (m_x * f, m_y * f, m_z * f); + return v; +} + +Vector3f operator* (float f, Vector3f const& v) +{ + return v * f; +} + +}; diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/vector.h gnome-chemistry-utils-0.10.9/libs/gcu/vector.h --- gnome-chemistry-utils-0.8.6/libs/gcu/vector.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/vector.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,136 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * vector.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_VECTOR_H +#define GCU_VECTOR_H + +#include "macros.h" + +/*!\file*/ +namespace gcu +{ + +/*!\class Vector3f gcu/vector.h +Utility 3d vectors class used by the gcu::Sphere class. +*/ + +class Vector3f +{ +public: +/*! +Constructs a vector with all three coordinates equal to 0. +*/ + Vector3f (); +/*! +@param x the x coordinate. +@param y the y coordinate. +@param z the z coordinate. + +Constructs a vector given its three coordinates. +*/ + Vector3f (float x, float y, float z); +/*! +The destructor. +*/ + ~Vector3f (); + +/*! +*/ + void normalize (); +/*! +@param other a Vector3f to copy. + +The assignment operator. +@return a new vector identical to \a other and \a this. +*/ + Vector3f &operator= (Vector3f const& other); +/*! +@param other a Vector3f to substract. + +@return +*/ + Vector3f operator- (Vector3f const& other) const; +/*! +@param other a Vector3f to add. + +@return the some of the two vectors. +*/ + Vector3f operator+ (Vector3f const& other) const; +/*! +@param f a real parameter. + +@return the vector multiplied by \a f. +*/ + Vector3f operator* (float f) const; + +private: +/*!\fn Setx (float x) +@param x the new value for the first coordinate. + +Sets the first coordinate of the vector. +*/ +/*!\fn Getx() +@return the first coordinate of the vector. +*/ +/*!\fn GetRefx() +@return the first coordinate of the vector as a reference. +*/ + GCU_PROP (float, x); +/*!\fn Sety (float y) +@param y the new value for the second coordinate. + +Sets the second coordinate of the vector. +*/ +/*!\fn Gety() +@return the second coordinate of the vector. +*/ +/*!\fn GetRefy() +@return the second coordinate of the vector as a reference. +*/ + GCU_PROP (float, y); +/*!\fn Setz (float z) +@param z the new value for the third coordinate. + +Sets the third coordinate of the vector. +*/ +/*!\fn Getz() +@return the third coordinate of the vector. +*/ +/*!\fn GetRefz() +@return the third coordinate of the vector as a reference. +*/ + GCU_PROP (float, z); +}; + +/*! +@param f a multiplication factor +@param v the vector to multiply + +@return the product of f and v. +*/ +Vector3f operator* (float f, Vector3f const& v); + +} //namespace gcu + +#endif //GCU_VECTOR_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/window.cc gnome-chemistry-utils-0.10.9/libs/gcu/window.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/window.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/window.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,46 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/window.cc + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "window.h" + +namespace gcu { + +Window::Window () +{ +} + +Window::~Window () +{ +} + +void Window::Destroy () +{ +} + +void Window::Show () +{ +} + +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/window.h gnome-chemistry-utils-0.10.9/libs/gcu/window.h --- gnome-chemistry-utils-0.8.6/libs/gcu/window.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/window.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,71 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * gcu/window.h + * + * Copyright (C) 2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCU_WINDOW_H +#define GCU_WINDOW_H + +#include "macros.h" +#include + +/*!\file*/ +namespace gcu { + +/*!\class Window gcu/window.h +Base class for windows. Just a placeholder for now. +*/ +class Window +{ +public: +/*! +The default constructor. +*/ + Window (); +/*! +The destructor. +*/ + virtual ~Window (); + +/*! +Destroys the window. This method should be overloaded in derived classes since +default imlementation does not do anything. +*/ + virtual void Destroy (); +/*! +Raises the window and makes it active. This method should be overloaded in +derived classes since default imlementation does not do anything. +*/ + virtual void Show (); + +/*!\var m_Window +The GtkWindow instance corresponding to the Window. +*/ +/*!\fn GetWindow() +@return the GtkWindow correspondig to this Window instance. +*/ +GCU_PROT_PROP (GtkWindow*, Window); +}; + +} + +#endif // GCU_WINDOW_H diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/xml-utils.cc gnome-chemistry-utils-0.10.9/libs/gcu/xml-utils.cc --- gnome-chemistry-utils-0.8.6/libs/gcu/xml-utils.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/xml-utils.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,288 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * chemistry/xml-utils.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "xml-utils.h" +#include +#include +#include + +using namespace std; + +xmlNodePtr FindNodeByNameAndId (xmlNodePtr node, const char* name, const char* id) +{ + xmlNodePtr child = node->children; + char* tmp; + while (child) + { + if (!strcmp ((char*) child->name, name)) + { + tmp = (char*) xmlGetProp (child, (xmlChar*) "id"); + if ((!id && !tmp) || (id && tmp && !strcmp (tmp, id))) { + if (tmp) + xmlFree (tmp); + break; + } else if (tmp) + xmlFree (tmp); + } + child = child->next; + } + return child; +} + +bool ReadPosition (xmlNodePtr node, const char* id, double* x, double* y, double* z) +{ + xmlNodePtr child = FindNodeByNameAndId (node, "position", id); + if (!child) return false; + char* tmp; + tmp = (char*) xmlGetProp (child, (xmlChar*) "x"); + if (tmp) { + sscanf (tmp, "%lg", x); + xmlFree (tmp); + } else + return false; + tmp = (char*) xmlGetProp (child, (xmlChar*) "y"); + if (tmp) { + sscanf (tmp, "%lg", y); + xmlFree (tmp); + } else + return false; + if (z) + { + tmp = (char*) xmlGetProp (child, (xmlChar*) "z"); + if (tmp) { + sscanf (tmp, "%lg", z); + xmlFree (tmp); + } else + *z = 0.0; + } + return true; +} + +bool WritePosition (xmlDocPtr xml, xmlNodePtr node, const char* id, double x, double y, double z) +{ + xmlNodePtr child; + char buf[16]; + child = xmlNewDocNode (xml, NULL, (xmlChar*) "position", NULL); + if (child) + xmlAddChild (node, child); + else + return false; + if (id) + xmlNewProp (child, (xmlChar*) "id", (xmlChar*) id); + snprintf (buf, sizeof (buf), "%g", x); + xmlNewProp (child, (xmlChar*) "x", (xmlChar*) buf); + snprintf (buf, sizeof (buf), "%g", y); + xmlNewProp (child, (xmlChar*) "y", (xmlChar*) buf); + if (z != 0.0) { + snprintf (buf, sizeof (buf), "%g", z); + xmlNewProp (child, (xmlChar*) "z", (xmlChar*) buf); + } + return true; +} + +bool ReadColor (xmlNodePtr node, const char* id, float* red, float* green, float* blue, float* alpha) +{ + xmlNodePtr child = FindNodeByNameAndId (node, "color", id); + if (!child) return false; + char* tmp; + tmp = (char*) xmlGetProp (child, (xmlChar*) "red"); + if (tmp) { + sscanf (tmp, "%g", red); + xmlFree (tmp); + } else + return false; + tmp = (char*) xmlGetProp (child, (xmlChar*) "green"); + if (tmp) { + sscanf (tmp, "%g", green); + xmlFree (tmp); + } else + return false; + tmp = (char*) xmlGetProp (child, (xmlChar*) "blue"); + if (tmp) { + sscanf (tmp, "%g", blue); + xmlFree (tmp); + } else + return false; + if (alpha) + { + tmp = (char*) xmlGetProp (child, (xmlChar*) "alpha"); + if (tmp) { + sscanf (tmp, "%g", alpha); + xmlFree (tmp); + } else + *alpha = 1.0; + } + return true; +} + +bool WriteColor (xmlDocPtr xml, xmlNodePtr node, const char* id, double red, double green, double blue, double alpha) +{ + xmlNodePtr child; + char buf[16]; + child = xmlNewDocNode (xml, NULL, (xmlChar*) "color", NULL); + if (child) xmlAddChild (node, child); else return false; + if (id) xmlNewProp (child, (xmlChar*) "id", (xmlChar*) id); + snprintf (buf, sizeof (buf), "%g", red); + xmlNewProp (child, (xmlChar*) "red", (xmlChar*) buf); + snprintf (buf, sizeof (buf), "%g", green); + xmlNewProp (child, (xmlChar*) "green", (xmlChar*) buf); + snprintf (buf, sizeof (buf), "%g", blue); + xmlNewProp (child, (xmlChar*) "blue", (xmlChar*) buf); + if (alpha != 1.0) + { + snprintf (buf, sizeof (buf), "%g", alpha); + xmlNewProp (child, (xmlChar*) "alpha", (xmlChar*) buf); + } + return true; +} + +bool ReadRadius (xmlNodePtr node, GcuAtomicRadius& radius) +{ + char *tmp, *dot, *end; + tmp = (char*) xmlGetProp (node, (xmlChar*) "type"); + if (!tmp || + ((!((!strcmp (tmp, "unknown")) && (radius.type = GCU_RADIUS_UNKNOWN))) && + (!((!strcmp (tmp, "covalent")) && (radius.type = GCU_COVALENT))) && + (!((!strcmp (tmp, "vdW")) && (radius.type = GCU_VAN_DER_WAALS))) && + (!((!strcmp (tmp, "ionic")) && (radius.type = GCU_IONIC))) && + (!((!strcmp (tmp, "metallic")) && (radius.type = GCU_METALLIC))) && + (!((!strcmp (tmp, "atomic")) && (radius.type = GCU_ATOMIC))))) + radius.type = GCU_RADIUS_UNKNOWN; + if (tmp) + xmlFree (tmp); + tmp = (char*) xmlGetProp (node, (xmlChar*) "scale"); + if (tmp) { + radius.scale = GetStaticScale (tmp); + xmlFree (tmp); + } else + radius.scale = NULL; + tmp = (char*) xmlGetProp (node, (xmlChar*) "charge"); + if (tmp) { + radius.charge = strtol (tmp, NULL, 10); + xmlFree (tmp); + } else + radius.charge = 0; + tmp = (char*) xmlGetProp (node, (xmlChar*)"cn"); + if (tmp) { + radius.cn = strtol (tmp, NULL, 10); + xmlFree (tmp); + } else + radius.cn = -1; + tmp = (char*) xmlGetProp(node, (xmlChar*) "spin"); + if ((!tmp) || + ((!((!strcmp (tmp, "low")) && (radius.spin = GCU_LOW_SPIN))) && + (!((!strcmp (tmp, "high")) && (radius.spin = GCU_HIGH_SPIN))))) + radius.spin = GCU_N_A_SPIN; + if (tmp) + xmlFree(tmp); + if (((tmp = (char*) xmlGetProp (node, (xmlChar*) "value")) || + (tmp = (char*) xmlNodeGetContent (node))) && *tmp) { + radius.value.value = strtod (tmp, &end); + dot = strchr (tmp, '.'); + radius.value.prec = (dot)? end - dot - 1: 0; + radius.scale = "custom"; + xmlFree(tmp); + } else { + if (tmp) + xmlFree(tmp); + if (radius.scale && (!strcmp (radius.scale, "custom"))) + return false; + else if (!gcu_element_get_radius (&radius)) + return false; + } + if (radius.value.value <= 0.0) + return false; + return true; +} + +bool WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius& radius) +{ + xmlNodePtr child; + gchar buf[256]; + gchar const *tmp; + + child = xmlNewDocNode (xml, NULL, (xmlChar*) "radius", NULL); + if (child) + xmlAddChild (node, child); + else return false; + switch (radius.type) { + case GCU_RADIUS_UNKNOWN: + tmp = NULL; + break; + case GCU_ATOMIC: + tmp = "atomic"; + break; + case GCU_IONIC: + tmp = "ionic"; + break; + case GCU_METALLIC: + tmp = "metallic"; + break; + case GCU_COVALENT: + tmp = "covalent"; + break; + case GCU_VAN_DER_WAALS: + tmp = "vdW"; + break; + default: + tmp = NULL; + } + if (tmp) + xmlNewProp (child, (xmlChar*) "type", (xmlChar*) tmp); + if ((radius.type == GCU_RADIUS_UNKNOWN) || (radius.scale && (!strcmp (radius.scale, "custom")))) { + char *format = g_strdup_printf ("%%0.%df",radius.value.prec); + g_snprintf (buf, sizeof (buf) - 1, format, radius.value.value); + g_free (format); + xmlNewProp (child, (xmlChar*) "value", (xmlChar*) buf); + } + if (radius.scale && strcmp (radius.scale, "custom")) + xmlNewProp (child, (xmlChar*) "scale", (xmlChar*) radius.scale); + if (radius.charge) { + g_snprintf (buf, sizeof (buf) - 1, "%d", radius.charge); + xmlNewProp (child, (xmlChar*) "charge", (xmlChar*) buf); + } + if (radius.cn != -1) { + g_snprintf (buf, sizeof (buf) - 1, "%d", radius.cn); + xmlNewProp (child, (xmlChar*) "cn", (xmlChar*) buf); + } + if (radius.spin != GCU_N_A_SPIN) + xmlNewProp (child, (xmlChar*) "spin", (xmlChar*)((radius.spin == GCU_LOW_SPIN)? "low": "high")); + return true; +} + +// we must have static strings +static set ScaleNames; + +char const *GetStaticScale (char *buf) +{ + set ::iterator i = ScaleNames.find (buf); + if (i == ScaleNames.end ()) { + std::pair::iterator,bool> res = ScaleNames.insert (buf); + if (res.second) + return (*res.first).c_str (); + else + return NULL; + } + return (*i).c_str (); +} diff -Nru gnome-chemistry-utils-0.8.6/libs/gcu/xml-utils.h gnome-chemistry-utils-0.10.9/libs/gcu/xml-utils.h --- gnome-chemistry-utils-0.8.6/libs/gcu/xml-utils.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/gcu/xml-utils.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,140 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * xml-utils.h + * + * Copyright (C) 2002-2006 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + + +#ifndef GCU_XML_UTILS_H +#define GCU_XML_UTILS_H + +#include +#include "chemistry.h" + +/*!\file +Some helper functions to load / save Object instances. +*/ + +/*!ReadPosition +@param node: a pointer to the current parsed XML Node. +@param name: the name of the searched node. +@param id: the id property of the node or NULL if not significant. This parameter might be omitted in the last case. + +Helper method used to search the xmlNode instance of name Name and with id property equal to id +in the children of node. When id is NULL, the searched node does not have an id property. +When id is not NULL, the searched node should be unique. + +@return the matching node or NULL. +*/ +xmlNodePtr FindNodeByNameAndId (xmlNodePtr node, const char* name, const char* id = NULL); + +/*! +@param node: a pointer to the xmlNode representing an Object instance. +@param id: the value of the id property of the position. This is used for example for arrows because both the head and the tail +of the arrow are positions. +@param x: a pointer to the x coordinate of the position. +@param y: a pointer to the y coordinate of the position. +@param z: a pointer to the z coordinate of the position or NULL for 2D objects. + +This method can be used to load the coordinates of a point in an Object instance. It should be used in cunjunction with WritePosition() which +executes the inverse operation. If id is NULL, a position with no id property will be search and parsed. + +@return true on success and false on failure. +*/ +bool ReadPosition (xmlNodePtr node, const char* id, double* x, double* y, double* z = NULL); +/*!WritePosition +@param xml: a pointer to the xmlDoc used to serialize the document. +@param node: a pointer to the xmlNode representing an Object instance. +@param id: the value of the id property of the position. This is used for example for arrows because both the head and the tail +of the arrow are positions. +@param x: the x coordinate of the position. +@param y: the y coordinate of the position. +@param z: the z coordinate of the position. + +Save a position as an XML node added to the children of node. This position can then be parsed using ReadPosition(). + +@return true on success and false on failure. +*/ +bool WritePosition (xmlDocPtr xml, xmlNodePtr node, const char* id, double x, double y, double z = 0.0); + +/*! +@param node: a pointer to the xmlNode representing an Object instance. +@param id: the value of the id property of the color. This is used for Object instances having at least two colors. +@param red: a pointer to the red component of the color. +@param green: a pointer to the green component of the color. +@param blue: a pointer to the blue component of the color. +@param alpha: a pointer to the alpha component of the color or NULL if tranparency is not managed. + +This method can be used to load a color in an Object instance. It should be used in cunjunction with WriteColor() which +executes the inverse operation. If id is NULL, a color with no id property will be search and parsed. + +@return true on success and false on failure. +*/ +bool ReadColor (xmlNodePtr node, const char* id, float* red, float* green, float* blue, float* alpha = NULL); +/*! +@param xml: a pointer to the xmlDoc used to serialize the document. +@param node: a pointer to the xmlNode representing an Object instance. +@param id: the value of the id property of the color. This is used for Object instances having at least two colors. +of the arrow are positions. +@param red: the red component of the color. +@param green: the green component of the color. +@param blue: the blue component of the color. +@param alpha: the alpha component of the color. + +Save a color as an XML node added to the children of node. This color can then be parsed using ReadColor(). + +@return true on success and false on failure. +*/ +bool WriteColor (xmlDocPtr xml, xmlNodePtr node, const char* id, double red, double green, double blue, double alpha = 1.0); + +/*! +@param node: a pointer to the xmlNode representing an Object instance. +@param radius: a GcuAtomicRadius structure. + +This function parses the XML node representing a radius (written using WriteRadius()) and fills the fields in the GcuAtomicRadius +structure with the data parsed. + +@return true on success and false on failure. +*/ +bool ReadRadius (xmlNodePtr node, GcuAtomicRadius& radius); + +/*! +@param xml: a pointer to the xmlDoc used to serialize the document. +@param node: a pointer to the xmlNode representing an Object instance. +@param radius: a GcuAtomicRadius structure. + +Save a radius as an XML node added to the children of node. This radius can then be parsed using ReadRadius(). + +@return true on success and false on failure. +*/ +bool WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius& radius); + +/*! +@param buf: a string to convert to a static instance. + +This function is used to replace a dynamically allocated string by a static instance. It +works managing a set of string instances. It is used for scale names (as for radii and +electronegativity), hence its name. + +@return a static version of buf or NULL if a new static string could not be created. +*/ +char const *GetStaticScale (char *buf); +#endif // GCU_XML_UTILS_H diff -Nru gnome-chemistry-utils-0.8.6/libs/Makefile.am gnome-chemistry-utils-0.10.9/libs/Makefile.am --- gnome-chemistry-utils-0.8.6/libs/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,3 @@ +SUBDIRS = gcu canvas gcp + +MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/libs/Makefile.in gnome-chemistry-utils-0.10.9/libs/Makefile.in --- gnome-chemistry-utils-0.8.6/libs/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/libs/Makefile.in 2009-11-14 11:46:01.000000000 +0100 @@ -0,0 +1,651 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = gcu canvas gcp +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu libs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/ltmain.sh gnome-chemistry-utils-0.10.9/ltmain.sh --- gnome-chemistry-utils-0.8.6/ltmain.sh 2007-11-27 21:09:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/ltmain.sh 2009-04-07 23:40:40.000000000 +0200 @@ -1,52 +1,83 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, but +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="1.5.24 Debian 1.5.24-2" -TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" +VERSION="2.2.6 Debian-2.2.6a-4" +TIMESTAMP="" +package_revision=1.3012 -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -60,98 +91,261 @@ BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi +dirname="s,/[^/]*$,," +basename="s,^.*/,," -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} -##################################### -# Shell function definitions: -# This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running @@ -161,7 +355,7 @@ { my_template="${TMPDIR-/tmp}/${1-$progname}" - if test "$run" = ":"; then + if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else @@ -170,526 +364,787 @@ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $echo "X$my_tmpdir" | $Xsed + $ECHO "X$my_tmpdir" | $Xsed } -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () { - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac - ;; - esac - $echo $win32_libid_type } -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () { - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" } -# func_extract_an_archive dir oldlib -func_extract_an_archive () +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () { - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" + my_cmd="$1" + my_fail_exp="${2-:}" - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi fi } -# func_extract_archives gentop oldlib ... -func_extract_archives () + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () { - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi fi +} - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit } -# End of Shell function definitions -##################################### -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" +exit_cmd=: -disable_libs=no -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" + + + +# Check that we have a working $ECHO. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 - exit $EXIT_FAILURE - ;; - esac +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac +# Global variables. +# $mode is unset +nonopt= +execute_dlfiles= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 - prev= - prevopt= - continue - fi +opt_dry_run=false +opt_duplicate_deps=false +opt_silent=false +opt_debug=: - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= - --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2007 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - --dry-run | -n) - run=: - ;; + exit $? +} - --features) - $echo "host: $host" +# func_features +# Display the features supported by this script. +func_features () +{ + $ECHO "host: $host" if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" + $ECHO "enable shared libraries" else - $echo "disable shared libraries" + $ECHO "disable shared libraries" fi if test "$build_old_libs" = yes; then - $echo "enable static libraries" + $ECHO "enable static libraries" else - $echo "disable static libraries" + $ECHO "disable static libraries" fi + exit $? - ;; +} - --finish) mode="finish" ;; +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" - --preserve-dup-deps) duplicate_deps="yes" ;; + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift ;; - - *) - nonopt="$arg" - break + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac -done -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac + case $opt in + --config) func_config ;; -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; -if test -z "$show_help"; then + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: ;; *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF fi - ;; - esac + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." + help="Try \`$progname --help --mode=$mode' for more information." +} - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} - target ) - libobj="$arg" - arg_mode=normal - continue - ;; +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" + func_quote_for_eval "$arg" + lastarg="$lastarg $func_quote_for_eval_result" done IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; - * ) + *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # @@ -738,65 +1187,42 @@ esac # case $arg_mode # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" + func_quote_for_eval "$lastarg" + base_compile="$base_compile $func_quote_for_eval_result" done # for arg case $arg_mode in arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE + func_fatal_error "you must specify an argument for -Xcompile" ;; target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.obj | *.sx) + func_xform "$libobj" + libobj=$func_xform_result + ;; esac - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac @@ -804,7 +1230,15 @@ for arg in $later; do case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + -static) + build_libtool_libs=no build_old_libs=yes continue ;; @@ -821,28 +1255,17 @@ esac done - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then @@ -851,12 +1274,9 @@ removelist="$lobj $libobj ${libobj}T" fi - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in - cygwin* | mingw* | pw32* | os2*) + cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac @@ -868,10 +1288,8 @@ # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no @@ -881,13 +1299,13 @@ # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` @@ -898,34 +1316,22 @@ avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - $echo "$srcfile" > "$lockfile" + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" fi + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -978,45 +1371,27 @@ avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1050,5466 +1420,6784 @@ avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" +Compile a source file into a libtool library object. - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac +This mode accepts the following additional options: - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi +Automatically set library path, then run a program. - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" +This mode accepts the following additional options: - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi + -dlopen FILE add the directory containing FILE to the library path - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi +This mode sets the library path environment variable according to \`-dlopen' +flags. - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" +Then, COMMAND is executed, with ARGS as arguments." + ;; - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi +Complete the installation of libtool libraries. - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" +Each LIBDIR is a directory that contains libtool libraries. - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -avoid-version) - avoid_version=yes - continue - ;; +Install executables or libraries. - -dlopen) - prev=dlfiles - continue - ;; +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. - -dlpreopen) - prev=dlprefiles - continue - ;; +The following components of INSTALL-COMMAND are treated specially: - -export-dynamic) - export_dynamic=yes - continue - ;; + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -inst-prefix-dir) - prev=inst_prefix - continue - ;; +Link object files or libraries together to form another library, or to +create an executable program. - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; +The following components of LINK-COMMAND are treated specially: - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; +All other options (arguments beginning with \`-') are ignored. - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. - -module) - module=yes - continue - ;; +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." ;; - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; +Remove libraries from an installation directory. - -no-undefined) - allow_undefined=no - continue - ;; +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. - -objectlist) - prev=objectlist - continue - ;; +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; - -o) prev=output ;; + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac - -precious-files-regex) - prev=precious_regex - continue - ;; + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." - -release) - prev=release - continue - ;; + exit $? +} - -rpath) - prev=rpath - continue - ;; + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help - -R) - prev=xrpath - continue - ;; - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" - -thread-safe) - thread_safe=yes - continue - ;; + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; + # Read the libtool library. + dlname= + library_names= + func_source "$file" - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; + func_dirname "$file" "" "." + dir="$func_dirname_result" - -Xcompiler) - prev=xcompiler - continue + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi ;; - -Xlinker) - prev=xlinker - continue + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" ;; - -XCClinker) - prev=xcclinker + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; + esac - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi + $lt_unset $lt_var + fi" + done - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi +test "$mode" = execute && func_mode_execute ${1+"$@"} - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi - *.la) - # A libtool-controlled library. + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then prev= else - deplibs="$deplibs $arg" + dest=$arg + continue fi - continue ;; + esac - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi fi - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; *) - duplicate_compiler_generated_deps=$duplicate_deps + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done ;; esac - specialdeplibs= - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac ;; esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' fi - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac + *.lo) + # Install (i.e. copy) a libtool object. - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" fi - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi + exit $EXIT_SUCCESS + ;; - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac ;; esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + fi - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : else - newdlprefiles="$newdlprefiles $dir/$linklib" + $GREP -v "^: " < "$nlist" > "$nlist"S fi - fi # $pass = dlpreopen - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - deplibs="$lib $deplibs" # used for prog,scan pass + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - continue - fi - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" + $ECHO >> "$output_objdir/$my_dlsyms" "\ - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi + func_mkdir_p "$my_xdir" - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? + func_extract_archives_result="$my_oldobjs" +} - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 fi - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi + $ECHO "\ +#! $SHELL - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi +relink_command=\"$relink_command\" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; esac + fi - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 fi - install_libdir="$2" + fi - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" fi - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" fi - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" fi - else - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 fi - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat <&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname + Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; + The $output program cannot be directly executed until all the libtool + libraries that it depends on are installed. - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; + Currently, it simply execs the wrapper *script* "$SHELL $output", + but could eventually absorb all of the scripts functionality and + exec $objdir/$outputname directly. +*/ +EOF + cat <<"EOF" +#include +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi +const char *program_name = NULL; - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi +static const char *script_text_part1 = +EOF - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." + cat <<"EOF" +} - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + return p; +} - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} +const char * +base_name (const char *name) +{ + const char *base; - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi +int +check_executable (const char *path) +{ + struct stat st; - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if (!has_symlinks) + { + return xstrdup (pathspec); + } - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} - $echo "creating a temporary reloadable object file: $output" +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + assert (str != NULL); + assert (pat != NULL); - libobjs=$output - # Restore the value of output. - output=$save_output + len = strlen (str); + patlen = strlen (pat); - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? + if (exit_status >= 0) + exit (exit_status); +} - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} - exit $lt_exit - } - done - IFS="$save_ifs" +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; - exit $EXIT_SUCCESS - fi + p = strchr (arg, (int)'='); - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; + if (!p) + return 1; - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi + *value = xstrdup (++p); - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi + return 0; +} - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; - # Delete the old objects. - $run $rm $obj $libobj + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} - exit $EXIT_SUCCESS - fi +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi +EOF +} +# end: func_emit_cwrapperexe_src - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no - exit $EXIT_SUCCESS + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break ;; esac + done - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" ;; - *) new_libs="$new_libs $deplib" ;; esac - done - compile_deplibs="$new_libs" - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac + dlself=needless + export_dynamic=yes fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; esac ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + ;; esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" + # Read the .lo file + func_source "$arg" - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" -#ifdef __cplusplus -extern \"C\" { -#endif + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi -/* External symbol declarations for the compiler. */\ -" + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi + else + func_fatal_error "link input file \`$arg' does not exist" fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue ;; *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE + eval "$prev=\"\$arg\"" + prev= + continue ;; esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" + fi # test -n "$prev" - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? + prevarg="$arg" - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" fi + continue + ;; - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi + -avoid-version) + avoid_version=yes + continue + ;; - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi + -dlopen) + prev=dlfiles + continue + ;; - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi + -dlpreopen) + prev=dlprefiles + continue + ;; - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + -export-dynamic) + export_dynamic=yes + continue + ;; - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + prev=expsyms_regex fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + continue + ;; - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + -framework) + prev=framework + continue + ;; - $show "$link_command" - $run eval "$link_command" || exit $? + -inst-prefix-dir) + prev=inst_prefix + continue + ;; - # Now create the wrapper script. - $show "creating $output" + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" + func_fatal_error "need path for \`-L' option" fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; esac - # test for cygwin because mv fails w/o .exe extensions case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif + -multi_module) + single_module="${wl}-multi_module" + continue + ;; -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif + -no-fast-install) + fast_install=no + continue + ;; -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ + -no-undefined) + allow_undefined=no + continue + ;; -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ + -objectlist) + prev=objectlist + continue + ;; -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) + -o) prev=output ;; -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif + -precious-files-regex) + prev=precious_regex + continue + ;; -const char *program_name = NULL; + -release) + prev=release + continue + ;; -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); + -rpath) + prev=rpath + continue + ;; -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; + -R) + prev=xrpath + continue + ;; - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; + -shrext) + prev=shrext + continue + ;; - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); + -weak) + prev=weak + continue + ;; - return p; -} + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; -const char * -base_name (const char *name) -{ - const char *base; + -Xcompiler) + prev=xcompiler + continue + ;; -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif + -Xlinker) + prev=xlinker + continue + ;; - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} + -XCClinker) + prev=xcclinker + continue + ;; -int -check_executable(const char * path) -{ - struct stat st; + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; + *.$objext) + # A standard object. + objs="$objs $arg" + ;; - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + *.lo) + # A libtool-controlled object. - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif + # Read the .lo file + func_source "$arg" - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" - assert(str != NULL); - assert(pat != NULL); + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi - len = strlen(str); - patlen = strlen(pat); + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" - if (exit_status >= 0) - exit (exit_status); -} + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; - $echo > $output "\ -#! $SHELL + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. + *.la) + # A libtool-controlled library. -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop -relink_command=\"$relink_command\" + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" fi - fi\ -" - $echo >> $output "\ - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO + if test "X$deplibs_check_method" = "Xnone"; then + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + else + $ECHO "*** Warning: inter-library dependencies are not known to be supported." + fi + $ECHO "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; esac - fi - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi - file=\"\$\$-\$program\" + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= - $echo >> $output "\ + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - $echo >> $output "\ + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" - if test -f \"\$progdir/\$program\"; then" + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi - export $shlibpath_var -" + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi fi - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + else + output= + fi - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi - eval cmds=\"$old_archive_cmds\" + libobjs=$output + # Restore the value of output. + output=$save_output - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= + cmds=$module_cmds fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi fi fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' -# Version information for $libname. -current=$current -age=$age -revision=$revision + exit $lt_exit + } + done + IFS="$save_ifs" -# Is this an already installed library? -installed=$installed + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? -# Should we warn about portability when linking against -modules? -shouldnotlink=$module + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' + exit $EXIT_SUCCESS + fi -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done - fi - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi ;; - esac - exit $EXIT_SUCCESS - ;; - # libtool install mode - install) - modename="$modename: install" + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result ;; *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi + libobj= + obj="$output" ;; esac - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS ;; - esac - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; + esac - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; esac - fi + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' - exit $lt_exit - } - done - IFS="$save_ifs" + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; + exit $exit_status + fi - *.lo) - # Install (i.e. copy) a libtool object. + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi + fi - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS - ;; + fi - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" fi + fi - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac + func_show_eval "$link_command" 'exit $?' - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + # Now create the wrapper script. + func_verbose "creating $output" - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi - fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - # Set up the ranlib parameters. - oldlib="$destdir/$name" + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" fi - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac done - IFS="$save_ifs" fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS + eval cmds=\"$old_archive_cmds\" - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi + test -n "$generated" && \ + func_show_eval "${RM}r$generated" - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi - # Read the libtool library. - dlname= - library_names= + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac +# The name that we can dlopen(3). +dlname='$tdlname' - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi +# Names of this library. +library_names='$library_names' - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. +# The name of the static archive. +old_library='$old_library' - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - fi - ;; +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" +# Version information for $libname. +current=$current +age=$age +revision=$revision - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done +# Is this an already installed library? +installed=$installed - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" +# Should we warn about portability when linking against -modules? +shouldnotlink=$module - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} - # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - done +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" files= rmforce= exit_status=0 @@ -6521,30 +8209,28 @@ for arg do case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + func_basename "$file" + name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates @@ -6556,9 +8242,9 @@ fi # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then : elif test -d "$file"; then exit_status=1 @@ -6572,8 +8258,8 @@ case $name in *.la) # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name + if func_lalib_p "$file"; then + func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do @@ -6588,39 +8274,17 @@ *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -6630,20 +8294,20 @@ *.lo) # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_p "$file"; then # Read the .lo file - . $dir/$name + func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then + if test -n "$pic_object" && + test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi @@ -6654,17 +8318,26 @@ noexename=$name case $file in *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles @@ -6679,239 +8352,38 @@ fi ;; esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 + func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 + func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status - ;; +} - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then - eval exec $exec_cmd + eval exec "$exec_cmd" exit $EXIT_FAILURE fi -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. +exit $exit_status -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting @@ -6925,14 +8397,17 @@ # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared +build_libtool_libs=no +build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: +# vi:sw=2 + diff -Nru gnome-chemistry-utils-0.8.6/Makefile.am gnome-chemistry-utils-0.10.9/Makefile.am --- gnome-chemistry-utils-0.8.6/Makefile.am 2008-01-19 17:43:27.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -1,25 +1,25 @@ -AUTOMAKE_OPTIONS = 1.7 +SUBDIRS = po database glade pixmaps libs plugins programs mozilla-plugin \ + goffice templates themes samples tests dtds docs -SUBDIRS = po database glade pixmaps gcu programs mozilla-plugin \ - samples tests dtds docs - -EXTRA_DIST= \ - gcu.pc.in \ - $(mime_in_files) \ - intltool-extract.in \ - intltool-update.in \ - intltool-merge.in \ - gnome-doc-utils.make \ - COPYING-DOCS +EXTRA_DIST= \ + $(mime_in_files) \ + gnome-doc-utils.make \ + $(schemas_in_files) \ + intltool-extract.in \ + intltool-update.in \ + intltool-merge.in \ + COPYING-DOCS \ + COPYING-LIBS CLEANFILES = \ - gchemutils.xml + gchemutils.xml \ + $(schemas_DATA) DISTCLEANFILES = \ - gcu.pc \ intltool-extract \ intltool-update \ - intltool-merge + intltool-merge \ + doltcompile MAINTAINERCLEANFILES = \ aclocal.m4 \ @@ -32,8 +32,8 @@ gnome-doc-utils.make \ install-sh \ intltool-extract.in \ - intltool-merge.in \ intltool-update.in \ + intltool-merge.in \ ltmain.sh \ missing \ mkinstalldirs \ @@ -43,16 +43,15 @@ --disable-scrollkeeper \ --disable-schemas-install \ --disable-update-databases \ - --with-mozilla-libdir=\$${libdir}/mozilla + --with-mozilla-libdir=\$${libdir}/mozilla \ + --with-goffice-plugins-dir=\$${libdir}/goffice mime_in_files = gchemutils.xml.in + mimedir = $(datadir)/mime/packages mime_DATA = $(mime_in_files:.xml.in=.xml) @INTLTOOL_XML_RULE@ -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gcu.pc - install-data-hook: if WITH_UPDATE_MIME $(UPDATE_MIME_DATABASE) $(datadir)/mime @@ -69,5 +68,24 @@ $(UPDATE_DESKTOP_DATABASE) $(datadir)/applications endif #WITH_UPDATE_DESKTOP -distcleancheck_listfiles = \ - find -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' +schemas_in_files = gchemutils.schemas.in + +schemasdir = $(GCONF_SCHEMA_FILE_DIR) +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) +@INTLTOOL_SCHEMAS_RULE@ + +install-data-local: +if GCONF_SCHEMAS_INSTALL + for schema in $(schemas_DATA) ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-install-rule $${schema} ; \ + done +endif #GCONF_SCHEMAS_INSTALL + +uninstall-local: +if GCONF_SCHEMAS_INSTALL + for schema in $(schemas_DATA) ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ + done +endif #GCONF_SCHEMAS_INSTALL diff -Nru gnome-chemistry-utils-0.8.6/Makefile.in gnome-chemistry-utils-0.10.9/Makefile.in --- gnome-chemistry-utils-0.8.6/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/Makefile.in 2009-11-14 11:46:06.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -35,9 +37,9 @@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/gcu.pc.in $(top_srcdir)/configure AUTHORS COPYING \ - ChangeLog INSTALL NEWS TODO compile config.guess config.sub \ - depcomp install-sh ltmain.sh missing mkinstalldirs + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO compile config.guess config.rpath config.sub depcomp \ + install-sh ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -47,7 +49,8 @@ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = gcu.pc +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -62,13 +65,29 @@ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(pkgconfigdir)" -mimeDATA_INSTALL = $(INSTALL_DATA) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(mime_DATA) $(pkgconfig_DATA) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(schemasdir)" +DATA = $(mime_DATA) $(schemas_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -76,17 +95,42 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -106,26 +150,35 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = \ + --disable-scrollkeeper \ + --disable-schemas-install \ + --disable-update-databases \ + --with-mozilla-libdir=\$${libdir}/mozilla \ + --with-goffice-plugins-dir=\$${libdir}/goffice + DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -135,35 +188,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -176,14 +215,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -195,6 +241,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -206,31 +254,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -244,43 +317,53 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -AUTOMAKE_OPTIONS = 1.7 -SUBDIRS = po database glade pixmaps gcu programs mozilla-plugin \ - samples tests dtds docs +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = po database glade pixmaps libs plugins programs mozilla-plugin \ + goffice templates themes samples tests dtds docs EXTRA_DIST = \ - gcu.pc.in \ - $(mime_in_files) \ - intltool-extract.in \ - intltool-update.in \ - intltool-merge.in \ - gnome-doc-utils.make \ - COPYING-DOCS + $(mime_in_files) \ + gnome-doc-utils.make \ + $(schemas_in_files) \ + intltool-extract.in \ + intltool-update.in \ + intltool-merge.in \ + COPYING-DOCS \ + COPYING-LIBS CLEANFILES = \ - gchemutils.xml + gchemutils.xml \ + $(schemas_DATA) DISTCLEANFILES = \ - gcu.pc \ intltool-extract \ intltool-update \ - intltool-merge + intltool-merge \ + doltcompile MAINTAINERCLEANFILES = \ aclocal.m4 \ @@ -293,27 +376,19 @@ gnome-doc-utils.make \ install-sh \ intltool-extract.in \ - intltool-merge.in \ intltool-update.in \ + intltool-merge.in \ ltmain.sh \ missing \ mkinstalldirs \ Makefile.in -DISTCHECK_CONFIGURE_FLAGS = \ - --disable-scrollkeeper \ - --disable-schemas-install \ - --disable-update-databases \ - --with-mozilla-libdir=\$${libdir}/mozilla - mime_in_files = gchemutils.xml.in mimedir = $(datadir)/mime/packages mime_DATA = $(mime_in_files:.xml.in=.xml) -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gcu.pc -distcleancheck_listfiles = \ - find -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' - +schemas_in_files = gchemutils.schemas.in +schemasdir = $(GCONF_SCHEMA_FILE_DIR) +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -324,15 +399,15 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -348,9 +423,10 @@ $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ @@ -362,14 +438,12 @@ @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 -gcu.pc: $(top_builddir)/config.status $(srcdir)/gcu.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -378,41 +452,47 @@ -rm -rf .libs _libs distclean-libtool: - -rm -f libtool + -rm -f libtool config.lt install-mimeDATA: $(mime_DATA) @$(NORMAL_INSTALL) test -z "$(mimedir)" || $(MKDIR_P) "$(DESTDIR)$(mimedir)" - @list='$(mime_DATA)'; for p in $$list; do \ + @list='$(mime_DATA)'; test -n "$(mimedir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(mimeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(mimedir)/$$f'"; \ - $(mimeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(mimedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(mimedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(mimedir)" || exit $$?; \ done uninstall-mimeDATA: @$(NORMAL_UNINSTALL) - @list='$(mime_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(mimedir)/$$f'"; \ - rm -f "$(DESTDIR)$(mimedir)/$$f"; \ - done -install-pkgconfigDATA: $(pkgconfig_DATA) + @list='$(mime_DATA)'; test -n "$(mimedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(mimedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(mimedir)" && rm -f $$files +install-schemasDATA: $(schemas_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ + test -z "$(schemasdir)" || $(MKDIR_P) "$(DESTDIR)$(schemasdir)" + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemasdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(schemasdir)" || exit $$?; \ done -uninstall-pkgconfigDATA: +uninstall-schemasDATA: @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(schemasdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(schemasdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -438,7 +518,7 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -472,16 +552,16 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -489,14 +569,14 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -508,46 +588,50 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) + test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -563,38 +647,54 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -602,6 +702,14 @@ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -629,6 +737,10 @@ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -640,9 +752,11 @@ mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -664,13 +778,15 @@ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -692,7 +808,7 @@ all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(schemasdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -716,6 +832,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -738,28 +855,40 @@ html: html-recursive +html-am: + info: info-recursive info-am: -install-data-am: install-mimeDATA install-pkgconfigDATA +install-data-am: install-data-local install-mimeDATA \ + install-schemasDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook - install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -780,30 +909,31 @@ ps-am: -uninstall-am: uninstall-mimeDATA uninstall-pkgconfigDATA +uninstall-am: uninstall-local uninstall-mimeDATA uninstall-schemasDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-data-am install-strip uninstall-am +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-data-am install-strip \ + tags-recursive uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-hook install-dvi \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-data-hook install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ - install-mimeDATA install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-hook \ - uninstall-mimeDATA uninstall-pkgconfigDATA + install-mimeDATA install-pdf install-pdf-am install-ps \ + install-ps-am install-schemasDATA install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-hook uninstall-local \ + uninstall-mimeDATA uninstall-schemasDATA @INTLTOOL_XML_RULE@ @@ -814,6 +944,20 @@ uninstall-hook: @WITH_UPDATE_MIME_TRUE@ $(UPDATE_MIME_DATABASE) $(datadir)/mime @WITH_UPDATE_DESKTOP_TRUE@ $(UPDATE_DESKTOP_DATABASE) $(datadir)/applications +@INTLTOOL_SCHEMAS_RULE@ + +install-data-local: +@GCONF_SCHEMAS_INSTALL_TRUE@ for schema in $(schemas_DATA) ; do \ +@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +@GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --makefile-install-rule $${schema} ; \ +@GCONF_SCHEMAS_INSTALL_TRUE@ done + +uninstall-local: +@GCONF_SCHEMAS_INSTALL_TRUE@ for schema in $(schemas_DATA) ; do \ +@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +@GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ +@GCONF_SCHEMAS_INSTALL_TRUE@ done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/missing gnome-chemistry-utils-0.10.9/missing --- gnome-chemistry-utils-0.8.6/missing 2006-10-19 06:51:14.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/missing 2009-08-12 08:51:00.000000000 +0200 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2006-05-10.23 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -18,9 +18,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -89,6 +87,9 @@ tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + Send bug reports to ." exit $? ;; @@ -106,15 +107,22 @@ esac +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). +# the program). This is about non-GNU programs, so use $1 not +# $program. case $1 in - lex|yacc) + lex*|yacc*) # Not GNU programs, they don't have --version. ;; - tar) + tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 @@ -138,7 +146,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $1 in +case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -148,7 +156,7 @@ touch aclocal.m4 ;; - autoconf) + autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -157,7 +165,7 @@ touch configure ;; - autoheader) + autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -187,7 +195,7 @@ while read f; do touch "$f"; done ;; - autom4te) + autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -210,7 +218,7 @@ fi ;; - bison|yacc) + bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package @@ -240,7 +248,7 @@ fi ;; - lex|flex) + lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package @@ -263,7 +271,7 @@ fi ;; - help2man) + help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the @@ -277,11 +285,11 @@ else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit 1 + exit $? fi ;; - makeinfo) + makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -310,7 +318,7 @@ touch $file ;; - tar) + tar*) shift # We have already tried tar in the generic part. @@ -363,5 +371,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff -Nru gnome-chemistry-utils-0.8.6/mkinstalldirs gnome-chemistry-utils-0.10.9/mkinstalldirs --- gnome-chemistry-utils-0.8.6/mkinstalldirs 2006-10-19 06:51:14.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/mkinstalldirs 2009-08-12 08:51:00.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -scriptversion=2006-05-11.19 +scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 @@ -157,5 +157,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff -Nru gnome-chemistry-utils-0.8.6/mozilla-plugin/chem-viewer.cc gnome-chemistry-utils-0.10.9/mozilla-plugin/chem-viewer.cc --- gnome-chemistry-utils-0.8.6/mozilla-plugin/chem-viewer.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/mozilla-plugin/chem-viewer.cc 2009-11-14 11:30:40.000000000 +0100 @@ -2,7 +2,7 @@ * Gnome Chemisty Utils * chem-viewer.c * - * Copyright (C) 2005-2006 + * Copyright (C) 2005-2009 Jean Bréfort * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the @@ -23,23 +23,59 @@ #include #include #include +#include #include +#include +#include +#include +#include +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +#endif #include #include #include -#include +#ifdef GOFFICE_IS_0_6 +# include +#endif #include #include #include #include #include +#include #include +#ifndef GO_TYPE_PLUGIN_LOADER_MODULE +# define GO_TYPE_PLUGIN_LOADER_MODULE GO_PLUGIN_LOADER_MODULE_TYPE +#endif + using namespace std; using namespace gcu; static bool loaded_radii = false; +class MozPaintApp: public gcp::Application +{ +public: + MozPaintApp (); + virtual ~MozPaintApp (); + + void OnFileNew (char const *Theme = NULL) {} + GtkWindow* GetWindow() {return NULL;} +}; + +MozPaintApp::MozPaintApp (): gcp::Application () +{ +} + +MozPaintApp::~MozPaintApp () +{ +} + class ChemComp { public: @@ -56,7 +92,9 @@ string Filename, MimeType; GtkWidget *Plug, *Viewer; GdkWindow *Parent; + gcp::Document *Doc; map Params; + MozPaintApp *gcpApp; }; ChemComp::ChemComp (void* instance, string& mime_type) @@ -65,6 +103,9 @@ MimeType = mime_type; Xid = 0; Plug = NULL; + Doc = NULL; + gcpApp = NULL; + Viewer = NULL; } ChemComp::~ChemComp () @@ -77,6 +118,8 @@ void ChemComp::SetWindow (XID xid) { int width, height; + if (Viewer) + return; if (Xid == xid) { //just resize and redraw gdk_window_get_geometry (Parent, NULL, NULL, &width, &height, NULL); @@ -96,6 +139,14 @@ GDK_WINDOW_XID (Plug->window)); if (MimeType == "application/x-gcrystal") Viewer = gtk_crystal_viewer_new (NULL); + else if (MimeType == "application/x-gchempaint") { + if (!gcpApp) + gcpApp = new MozPaintApp (); + Doc = new gcp::Document (gcpApp, true, NULL); + Doc->SetEditable (false); + Viewer = Doc->GetView ()->CreateNewWidget (); + } else if (MimeType == "chemical/x-jcamp-dx") + Viewer = gtk_spectrum_viewer_new (NULL); else Viewer = gtk_chem3d_viewer_new (NULL); gtk_container_add (GTK_CONTAINER (Plug), Viewer); @@ -105,6 +156,8 @@ void ChemComp::SetFilename (string& filename) { + if (Filename.length ()) + return; Filename = filename; if (MimeType == "application/x-gcrystal") { if (!loaded_radii) { @@ -115,9 +168,30 @@ if (!xml || !xml->children || strcmp ((char*) xml->children->name, "crystal")) return; gtk_crystal_viewer_set_data (GTK_CRYSTAL_VIEWER (Viewer), xml->children); + xmlFree (xml); + } else if (MimeType == "application/x-gchempaint") { + xmlDocPtr xml = xmlParseFile (filename.c_str ()); + if (!xml || !xml->children || strcmp ((char*) xml->children->name, "chemistry")) + return; + Doc->Load (xml->children); + ArtDRect r; + gcp::WidgetData *pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (Viewer), "data"); + pData->GetObjectBounds (Doc, &r); + gcp::Theme *pTheme = Doc->GetTheme (); + if (r.x0 || r.y0) + Doc->Move (- r.x0 / pTheme->GetZoomFactor (), - r.y0 / pTheme->GetZoomFactor ()); + Doc->GetView ()->Update (Doc); + pData->GetObjectBounds (Doc, &r); + xmlFree (xml); + } else if (MimeType == "chemical/x-jcamp-dx") { + char *uri = g_filename_to_uri (filename.c_str (), NULL, NULL); + gtk_spectrum_viewer_set_uri (GTK_SPECTRUM_VIEWER (Viewer), uri); + g_free (uri); } else { + char *uri = g_filename_to_uri (filename.c_str (), NULL, NULL); gtk_chem3d_viewer_set_uri_with_mime_type (GTK_CHEM3D_VIEWER (Viewer), - filename.c_str (), MimeType.c_str ()); + uri, MimeType.c_str ()); + g_free (uri); map::iterator i, iend = Params.end (); for (i = Params.begin (); i != iend; i++) { if ((*i).first == "display3d") { @@ -230,10 +304,14 @@ GError *error = NULL; gtk_init (&argc, &argv); +#ifdef GOFFICE_IS_0_6 if (!gnome_vfs_init ()) { cerr << "Could not initialize GnomeVFS\n" << endl; return 1; } +#endif + libgoffice_init (); + go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE); in_channel = g_io_channel_unix_new (fileno (stdin)); g_io_add_watch (in_channel, G_IO_IN, io_func, &error); gtk_main (); diff -Nru gnome-chemistry-utils-0.8.6/mozilla-plugin/Makefile.am gnome-chemistry-utils-0.10.9/mozilla-plugin/Makefile.am --- gnome-chemistry-utils-0.8.6/mozilla-plugin/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/mozilla-plugin/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -1,19 +1,37 @@ MAINTAINERCLEANFILES = Makefile.in if WITH_MOZILLA -AM_CPPFLAGS = -I$(top_srcdir) +plugin_LTLIBRARIES = libmozgcu.la +libexec_PROGRAMS = chem-viewer +plugindir = $(mozlibdir)/plugins/ +else +plugin_LTLIBRARIES = +libexec_PROGRAMS = +plugindir = +endif -DEFS += -DLIBEXECDIR=\"$(libexecdir)\" +DEFS += -DLIBEXECDIR=\"$(libexecdir)\" -DDATADIR=\"$(datadir)\" -plugin_LTLIBRARIES = libmozgcu.la -libmozgcu_la_CFLAGS = $(MOZILLA_CFLAGS) -libmozgcu_la_LIBADD = $(MOZILLA_LIBS) -libmozgcu_la_LDFLAGS = -module -avoid-version libmozgcu_la_SOURCES = moz-plugin.c -plugindir = $(with_mozilla_libdir)/plugins/ - +libmozgcu_la_CPPFLAGS = $(MOZILLA_CFLAGS) +libmozgcu_la_LDFLAGS = -module -avoid-version +libmozgcu_la_LIBADD = $(MOZILLA_LIBS) -libexec_PROGRAMS = chem-viewer -chem_viewer_LDADD = $(top_builddir)/gcu/libgcu.la chem_viewer_SOURCES = chem-viewer.cc -endif #WITH_MOZILLA \ Kein Zeilenumbruch am Dateiende. +chem_viewer_LDADD = $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif diff -Nru gnome-chemistry-utils-0.8.6/mozilla-plugin/Makefile.in gnome-chemistry-utils-0.10.9/mozilla-plugin/Makefile.in --- gnome-chemistry-utils-0.8.6/mozilla-plugin/Makefile.in 2008-01-25 21:06:19.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/mozilla-plugin/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,7 +35,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@WITH_MOZILLA_TRUE@am__append_1 = -DLIBEXECDIR=\"$(libexecdir)\" @WITH_MOZILLA_TRUE@libexec_PROGRAMS = chem-viewer$(EXEEXT) subdir = mozilla-plugin DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -45,56 +46,61 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(libexecdir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = -@WITH_MOZILLA_TRUE@libmozgcu_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__libmozgcu_la_SOURCES_DIST = moz-plugin.c -@WITH_MOZILLA_TRUE@am_libmozgcu_la_OBJECTS = \ -@WITH_MOZILLA_TRUE@ libmozgcu_la-moz-plugin.lo +libmozgcu_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am_libmozgcu_la_OBJECTS = libmozgcu_la-moz-plugin.lo libmozgcu_la_OBJECTS = $(am_libmozgcu_la_OBJECTS) libmozgcu_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmozgcu_la_CFLAGS) \ - $(CFLAGS) $(libmozgcu_la_LDFLAGS) $(LDFLAGS) -o $@ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libmozgcu_la_LDFLAGS) $(LDFLAGS) -o $@ @WITH_MOZILLA_TRUE@am_libmozgcu_la_rpath = -rpath $(plugindir) -libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(libexec_PROGRAMS) -am__chem_viewer_SOURCES_DIST = chem-viewer.cc -@WITH_MOZILLA_TRUE@am_chem_viewer_OBJECTS = chem-viewer.$(OBJEXT) +am_chem_viewer_OBJECTS = chem-viewer.$(OBJEXT) chem_viewer_OBJECTS = $(am_chem_viewer_OBJECTS) -@WITH_MOZILLA_TRUE@chem_viewer_DEPENDENCIES = \ -@WITH_MOZILLA_TRUE@ $(top_builddir)/gcu/libgcu.la -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +chem_viewer_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libmozgcu_la_SOURCES) $(chem_viewer_SOURCES) -DIST_SOURCES = $(am__libmozgcu_la_SOURCES_DIST) \ - $(am__chem_viewer_SOURCES_DIST) +DIST_SOURCES = $(libmozgcu_la_SOURCES) $(chem_viewer_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -102,7 +108,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -120,28 +125,31 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ -DEFS = @DEFS@ $(am__append_1) +DEFS = @DEFS@ -DLIBEXECDIR=\"$(libexecdir)\" -DDATADIR=\"$(datadir)\" DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -151,35 +159,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -192,14 +186,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -211,6 +212,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -222,31 +225,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -260,32 +288,57 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ MAINTAINERCLEANFILES = Makefile.in -@WITH_MOZILLA_TRUE@AM_CPPFLAGS = -I$(top_srcdir) +@WITH_MOZILLA_FALSE@plugin_LTLIBRARIES = @WITH_MOZILLA_TRUE@plugin_LTLIBRARIES = libmozgcu.la -@WITH_MOZILLA_TRUE@libmozgcu_la_CFLAGS = $(MOZILLA_CFLAGS) -@WITH_MOZILLA_TRUE@libmozgcu_la_LIBADD = $(MOZILLA_LIBS) -@WITH_MOZILLA_TRUE@libmozgcu_la_LDFLAGS = -module -avoid-version -@WITH_MOZILLA_TRUE@libmozgcu_la_SOURCES = moz-plugin.c -@WITH_MOZILLA_TRUE@plugindir = $(with_mozilla_libdir)/plugins/ -@WITH_MOZILLA_TRUE@chem_viewer_LDADD = $(top_builddir)/gcu/libgcu.la -@WITH_MOZILLA_TRUE@chem_viewer_SOURCES = chem-viewer.cc +@WITH_MOZILLA_FALSE@plugindir = +@WITH_MOZILLA_TRUE@plugindir = $(mozlibdir)/plugins/ +libmozgcu_la_SOURCES = moz-plugin.c +libmozgcu_la_CPPFLAGS = $(MOZILLA_CFLAGS) +libmozgcu_la_LDFLAGS = -module -avoid-version +libmozgcu_la_LIBADD = $(MOZILLA_LIBS) +chem_viewer_SOURCES = chem-viewer.cc +chem_viewer_LDADD = $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_vfs_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + all: all-am .SUFFIXES: @@ -294,14 +347,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mozilla-plugin/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu mozilla-plugin/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mozilla-plugin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu mozilla-plugin/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -319,23 +372,28 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ + @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ + } uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ + @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ done clean-pluginLTLIBRARIES: @@ -351,31 +409,46 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ + } \ + ; done uninstall-libexecPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ - rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ - done + @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(libexecdir)" && rm -f $$files clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list chem-viewer$(EXEEXT): $(chem_viewer_OBJECTS) $(chem_viewer_DEPENDENCIES) @rm -f chem-viewer$(EXEEXT) $(CXXLINK) $(chem_viewer_OBJECTS) $(chem_viewer_LDADD) $(LIBS) @@ -391,49 +464,49 @@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libmozgcu_la-moz-plugin.lo: moz-plugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmozgcu_la_CFLAGS) $(CFLAGS) -MT libmozgcu_la-moz-plugin.lo -MD -MP -MF $(DEPDIR)/libmozgcu_la-moz-plugin.Tpo -c -o libmozgcu_la-moz-plugin.lo `test -f 'moz-plugin.c' || echo '$(srcdir)/'`moz-plugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libmozgcu_la-moz-plugin.Tpo $(DEPDIR)/libmozgcu_la-moz-plugin.Plo +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmozgcu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmozgcu_la-moz-plugin.lo -MD -MP -MF $(DEPDIR)/libmozgcu_la-moz-plugin.Tpo -c -o libmozgcu_la-moz-plugin.lo `test -f 'moz-plugin.c' || echo '$(srcdir)/'`moz-plugin.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmozgcu_la-moz-plugin.Tpo $(DEPDIR)/libmozgcu_la-moz-plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='moz-plugin.c' object='libmozgcu_la-moz-plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmozgcu_la_CFLAGS) $(CFLAGS) -c -o libmozgcu_la-moz-plugin.lo `test -f 'moz-plugin.c' || echo '$(srcdir)/'`moz-plugin.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmozgcu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmozgcu_la-moz-plugin.lo `test -f 'moz-plugin.c' || echo '$(srcdir)/'`moz-plugin.c .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -449,45 +522,49 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -508,13 +585,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -545,6 +626,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -567,6 +649,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -575,18 +659,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-libexecPROGRAMS install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -627,6 +721,7 @@ tags uninstall uninstall-am uninstall-libexecPROGRAMS \ uninstall-pluginLTLIBRARIES + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/mozilla-plugin/moz-plugin.c gnome-chemistry-utils-0.10.9/mozilla-plugin/moz-plugin.c --- gnome-chemistry-utils-0.8.6/mozilla-plugin/moz-plugin.c 2007-05-22 08:42:44.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/mozilla-plugin/moz-plugin.c 2009-11-14 11:30:40.000000000 +0100 @@ -14,15 +14,19 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA. */ #include #include "npapi.h" -#include "npupp.h" +#ifdef HAVE_NPFUNCTIONS_H +# include "npfunctions.h" +#else +# include "npupp.h" +#endif #include #include @@ -47,7 +51,11 @@ } ChemPlugin; static NPError ChemNew (NPMIMEType mime_type, NPP instance, +#ifdef HAVE_NPFUNCTIONS_H + uint16_t mode, uint16_t argc, char *argn[], char *argv[], +#else uint16 mode, uint16 argc, char *argn[], char *argv[], +#endif NPSavedData *saved) { ChemPlugin *plugin; @@ -83,7 +91,7 @@ close (p[0]); to_pipe = p[1]; } else { - close(p[1]); + close (p[1]); if (p[0] != STDIN_FILENO){ if (dup2 (p[0], STDIN_FILENO) != STDIN_FILENO) { perror("dup2 (stdin)"); @@ -101,7 +109,7 @@ write (to_pipe, mime_type, strlen ((char*) mime_type)); write (to_pipe, "\n", 1); i = 0; - while (strcmp (argn[i++], "PARAM")); + while (i < argc && strcmp (argn[i++], "PARAM")); for (; i < argc; i++) { write (to_pipe, argn[i], strlen (argn[i])); write (to_pipe, "\n", 1); @@ -145,7 +153,11 @@ } static NPError ChemNewStream (NPP instance, NPMIMEType type, NPStream *stream, +#ifdef HAVE_NPFUNCTIONS_H + NPBool seekable, uint16_t *stype) +#else NPBool seekable, uint16 *stype) +#endif { ChemPlugin *plugin; @@ -163,6 +175,7 @@ static void ChemPrint (NPP instance, NPPrint *platformPrint) { +// TODO: implement !!! } static void ChemStreamAsFile (NPP instance, NPStream *stream, const char *fname) @@ -197,7 +210,9 @@ return ("chemical/x-xyz:xyz:XYZ Coordinate Format;" "chemical/x-mdl-molfile:mol:MDL Molfile;" "chemical/x-pdb:pdb,ent:Protein DataBank;" - "application/x-gcrystal:gcrystal:Crystalline structure model"); + "chemical/x-jcamp-dx:dx,jdx:JCAMP Spectroscopic Data Exchange Format;" + "application/x-gcrystal:gcrystal:Crystalline structure model;" + "application/x-gchempaint:gchempaint:2D chemical structures"); } /* This is called to initialise the plugin @@ -217,15 +232,30 @@ pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; pluginFuncs->size = sizeof (NPPluginFuncs); +#ifdef HAVE_NPFUNCTIONS_H + pluginFuncs->newp = (NPP_NewProcPtr)ChemNew; + pluginFuncs->destroy = (NPP_DestroyProcPtr) ChemDestroy; + pluginFuncs->setwindow = (NPP_SetWindowProcPtr) ChemSetWindow; + pluginFuncs->newstream = (NPP_NewStreamProcPtr) ChemNewStream; +#else pluginFuncs->newp = NewNPP_NewProc (ChemNew); pluginFuncs->destroy = NewNPP_DestroyProc (ChemDestroy); pluginFuncs->setwindow = NewNPP_SetWindowProc (ChemSetWindow); pluginFuncs->newstream = NewNPP_NewStreamProc (ChemNewStream); +#endif pluginFuncs->destroystream = NULL; +#ifdef HAVE_NPFUNCTIONS_H + pluginFuncs->asfile = (NPP_StreamAsFileProcPtr) ChemStreamAsFile; +#else pluginFuncs->asfile = NewNPP_StreamAsFileProc (ChemStreamAsFile); +#endif pluginFuncs->writeready = NULL; pluginFuncs->write = NULL; +#ifdef HAVE_NPFUNCTIONS_H + pluginFuncs->print = (NPP_PrintProcPtr) ChemPrint; +#else pluginFuncs->print = NewNPP_PrintProc (ChemPrint); +#endif pluginFuncs->urlnotify = NULL; pluginFuncs->event = NULL; #ifdef OJI diff -Nru gnome-chemistry-utils-0.8.6/NEWS gnome-chemistry-utils-0.10.9/NEWS --- gnome-chemistry-utils-0.8.6/NEWS 2008-01-25 21:00:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/NEWS 2009-11-14 11:30:40.000000000 +0100 @@ -1,60 +1,254 @@ -Version 0.8.6 - * More fixes about printing and image export of 3D scenes. Concerns - bot Gnome Crystal and the 3D molecules viewer. - * Enhanced build system and applied patches from various sources - to make maintainers life easier (Daniel Leidert). +Version 0.10.9 + GChemPaint: + * Do not crash when modifying a theme after using the doc properties + dialog. [#27419] + * Revised Wikipedia theme (Matthias Mailänder). + * Do not crash when changing the bond angle in the chain + tool. [sr #107062] + Goffice component: + * Fixed edition window title. + Mozilla plugin: + * Fixed after gtk ABI changes. + Other: + * Fixed three typos in isotopes database. [#27619] + * Updated de translation (Matthias Mailänder). + +Version 0.10.8 + * Make compile with goffice-0.7.11 and, hopefully, later versions. + +Version 0.10.7 + * Minor goffice update. + +Version 0.10.6 + GChemPaint: + * Do not loose isolated spaces when loading. [#27131] + * A couple of minor bugs fixed (see ChangeLog for details). + Other: + * Make code compatible with latest goffice API. + +Version 0.10.5 + Other: + * Make our code compatible with new goffice API. [#26105] + +Version 0.10.4 + GChemPaint: + * Fixed text loading in groups. + * Fixed copying text while editing a text or fragment object. [#25888] + * Fixed loading integers in .cdx files on big endian machines. + Mozilla plugin: + * Made it compatible with new xulrunner API. + Other: + * Fixed various build issues (Daniel Leidert). + * Fixed compilation issues with gcc-4.4. [#25628] + * Do not call exit from a library. [#25686] + * Do not have unused direct shlib dependency. [#20617] + * New zh_TW translation (thanks to I-Yuan Chiang and his group). + +Version 0.10.3 + GChemPaint: + * Fixed a selection issue introduced by the fix to #24869. + * Fixed stereochemistry of InChI and SMILES output. + * Fixed zoom dialog behavior. + * Fixed a couple of other minor issues. + Gnome Crystal: + * Fixed CIF files loading. + +Version 0.10.2 + GChemPaint: + * Fixed an issue with double bond drawing. + * Fixed a crash when adding a bond between two molecules. [#24853] + * Fixed crash or end in an infinite loop when adding + a fourth bond to phophorus. [#24863] + * Fixed various issues related to group symbols. + * Do not end with an infinite canvas. [#24869] + Other: + * Unescape URIs before display in all applications. + +Version 0.10.1 + GChemPaint: + * Fixed the chain tool for undo/redo operations and unallowed + bond addition. + * Don't allow new bonds between molecules in different groups. + * Prefer a cycle with cis configuration when drawing + double bonds. [#24802] + * Fixed various crashes. + GSpectrum: + * More secure loading of some files. [#24719] + * Correctly load negative values in (XY..XY) tables. [#24720] + Mozilla plugin: + * fix loading of spectra and 3d files. + +Version 0.10.0 + GChemTable: + * Implement save as image for curves (thanks to Jordan Matha who + noticed that this feature was missing. + Other: + * Fixed a few API documentation issues. + * Fixed miscellaneous typo and style issues in help files (Jordan). + +Version 0.9.98 + GChemTable + * Fixed display of data series with invalid values. + * Fixed various help related issues. + * Fixed a memory leak. + * Updated the documentation. + +Version 0.9.93 + GChemCalc + * Updated the documentation. + GChemPaint + * Enlarge arrows when an attached object grows. + * Fixed molecule contextual menu issues. + * Fixed selection issues with atoms lacking a visible canvas item. + GSpectrum: + * Use reference point for varian nmr dx files. + * New documentation. + GOffice component: + * Set the object height. + Other: + * Completed API documentation for libgcu and libgchempaint. + +Version 0.9.92 + * Add theme support for tools icons. [#24382] + * Updated GChem3d, GChemCalc, and Gnome Crystal help files. + * More API documentation for libgchempaint. + +Version 0.9.91 + * Fixed compilation on ppc and other big endian machines. + * Downgraded intltool requirement to 0.37.1. + * Updated GChemPaint help. + +Version 0.9.90 + CGhemPaint: + * Fixed issues about residues management. + Gnome Crystal: + * Add support for document properties. + GChemTable: + * Add Brazilian to known languages. + Other: + * Fixed some build issues (Daniel Leidert). -Version 0.8.5 +Version 0.9.6 + CGhemPaint: + * enhanced cdx and cdxml files import. [#21112] + * enhanced atoms and bonds drawing (no more a white rectangles + under the atom symbol to hide bonds). + GSpectrum: + * the variables can now be changed in some instances, as absorbance + to transmittance or vice versa. + Other: + * removed as much gnome-vfs code as possible and replaced it + by gio/gvfs calls. + * enhanced build system. + +Version 0.9.4 3d viewer: + * export more image formats (ps, pdf, eps). + calc: + * initial support for ambiguous symbols .as Ac and Pr + Gnome Crystal: + * export more image formats (ps, pdf, eps). + * enhanced cif files import. + * enhanced radii support. + CGhemPaint: + * export more image formats (ps, pdf) and enhanced eps support. + * no more white rectangle under atoms symbols. + * correctly detects the mime type, even if the file doesn't + exist. [#22686] + * accept file names with spaces for files opened using + OpenBabel. [#22695] + * enhanced cdx files import. + GChemTable: + * customizable charts. + Mozilla plugin: + * added support for GChemPaint and JCAMP-DX files. + GSpectrum: + * add support for mass spectrum. + * load nmr spectra using jcamp-dx 5.x NTUPPLES. + * made possible to change the x coordinates and to display only + part of the spectrum. + * initial support for NMR fids. + +Version 0.9.3 + 3d viewer: + * show multiple bonds as multiple cylinders + in ball and stick mode. + * prints using GtkPrint. + * Loads files using GIO. + calc: + * display molar and monoisotopic masses with more digits. + * prints isotopic pattern chart. + CGhemPaint: + * Fix loading of double reaction arrows. [#22223] + * prints using GtkPrint and Cairo. + * enhanced loaders for cdx and cdxml files. + * initial support for nicknames and generic symbols in + molecules. [#21728] + * Do not crash after failing to merge two molecules. [#22485] + Gnome Crystal: + * prints using GtkPrint. + GSpectrum: + * prints using GtkPrint. + periodic table: + * prints charts using GtkPrint. + libgcu: + * new classes: gcu::Printable, gcu::PrintSetupDlg for + GtkPrint support. + +Version 0.9.2 + 3d viewer: + * Add wireframe mode. * Really implement command line options. + calc: + * support abbreviations (at least those that are + not ambiguous). + GChemPaint: + * SVG export does not work for radicals. [#21715] Gnome Crystal: * Fix print and image export [#21946] (also concernes 3d viewer). * Don't crash when changing an element in the atoms dialog [#21576]. + GSpectrum: + * New program. Other: * Fix compilation with gcc-4.3 snapshot [#21764]. - * various other fixes, see ChangeLog for details. -Version 0.8.4 - * enhanced build system (Daniel Leidert). - * new pt_BR translation (Gregoire Demets). - * a few fixes, see ChangeLog for details. - -Version 0.8.3 - * use yelp as the help viewer, not nautilus [20704]. - * fix use of --disable-schemas-install [#20943]. - * install mozilla plugin when browser is iceweasel. - -Version 0.8.2 - * fixed help files installation. - * fixed a crasher (in GChemPaint). - * fixed a typo in man pages (Daniel Leidert). - -Version 0.8.1 - * #19911: two folders in %{_datadir}. - * #18443: Icons for .desktop files - * various other fixes (see ChangeLog for details). - -Version 0.8.0 - * fixed the GCU_CONF_GET_STRING macro. - * add the KDE MIME files to CLEANFILES. - -Version 0.7.96 - * #19835: gchempaint 0.7.95 still looks for libgoffice-0.3.pc. - * #19836: Add KDE MIME stuff for gnome-crystal. - * removed a localized string from gcrystal.schemas.in. - -Version 0.7.95 - * uses goffice-0.4. - * added a man page for gcrystal (Daniel Leidert). - * cleaned build system (Daniel Leidert). - * various minor fixes. - -Version 0.7.91 - * fixes some internationalization issues. - * #19523: fixes build issues. +Version 0.9.1 + 3d viewer: + * Add cylinders mode. + GChemPaint: + * use keyboard to change the nature of an atom [sr #105937]. + * use the AltGr key to change the default orientation of a + new bond. + * use the keyboard to change the default length of a new + chain to some current values (2 to 10). + * add a new theme to support ACS standards (Takashi Suyama). + * new API to create residues. + Gnome Crystal: + * Initial support for CIF files (needs OpenBabel-2.2.x (svn trunk)). + Periodic table: + * graphs can be customized (a very unstable feature). + Library: + * Display of 3D models rewritten, using code from libavogadro + (thanks to B. Jacob). + * New gcu::Residue class, for use in both calc and GChemPaint. + Other: + * use Aplications|Education|Science for help files. -Version 0.7.90 - * removed unstable stuff. +Version 0.9.0 + 3d viewer: + * new icons (Jordan Mantha). + calc: + * new icons (Jordan Mantha). + GChemPaint: + * incorporated in the Gnome Chemistry Utils. + * new Wikipedia experimental export plugin. + * copy as bitmaps. + * a text or a molecule can be attached to a + reaction arrow. + periodic table: + * graphs can now be printed. + * new color schemes (Jordan Mantha). + * new icons (Jordan Mantha). Version 0.7.5 periodic table: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d128.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d128.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d32.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d32.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d48.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d48.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d72.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d72.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d-viewer128.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d-viewer128.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d-viewer32.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d-viewer32.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d-viewer48.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d-viewer48.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchem3d-viewer72.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchem3d-viewer72.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchempaint128.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchempaint128.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchempaint32.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchempaint32.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchempaint48.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchempaint48.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchempaint72.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchempaint72.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gchempaint_logo.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gchempaint_logo.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gspectrum128.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gspectrum128.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gspectrum32.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gspectrum32.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gspectrum48.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gspectrum48.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/pixmaps/gspectrum72.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/pixmaps/gspectrum72.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/pixmaps/Makefile.am gnome-chemistry-utils-0.10.9/pixmaps/Makefile.am --- gnome-chemistry-utils-0.8.6/pixmaps/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/pixmaps/Makefile.am 2009-11-14 11:30:35.000000000 +0100 @@ -1,20 +1,23 @@ -EXTRA_DIST = \ - $(pixmap_DATA) \ - $(icons) +EXTRA_DIST = $(icons) MAINTAINERCLEANFILES = Makefile.in -pixmapdir = $(datadir)/gchemutils/pixmaps -pixmap_DATA = gcrystal_logo.png +pixmapdir = $(datadir)/gchemutils/@GCU_API_VER@/pixmaps +dist_pixmap_DATA = gcrystal_logo.png gchempaint_logo.png -icons = gcrystal32.png \ +icons = \ + gcrystal32.png \ gcrystal48.png \ gcrystal72.png \ gcrystal128.png \ - gchem3d-viewer32.png \ - gchem3d-viewer48.png \ - gchem3d-viewer72.png \ - gchem3d-viewer128.png \ + gchempaint32.png \ + gchempaint48.png \ + gchempaint72.png \ + gchempaint128.png \ + gchem3d32.png \ + gchem3d48.png \ + gchem3d72.png \ + gchem3d128.png \ gchemcalc32.png \ gchemcalc48.png \ gchemcalc72.png \ @@ -22,7 +25,11 @@ gchemtable32.png \ gchemtable48.png \ gchemtable72.png \ - gchemtable128.png + gchemtable128.png \ + gspectrum32.png \ + gspectrum48.png \ + gspectrum72.png \ + gspectrum128.png install-data-hook: for i in 32 48 72 128; do \ @@ -32,19 +39,28 @@ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gcrystal.png; \ $(INSTALL_DATA) $(srcdir)/gcrystal$$i.png \ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gcrystal.png; \ - $(INSTALL_DATA) $(srcdir)/gchem3d-viewer$$i.png \ - $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d-viewer.png; \ + $(INSTALL_DATA) $(srcdir)/gchempaint$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gchempaint.png; \ + $(INSTALL_DATA) $(srcdir)/gchempaint$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchempaint.png; \ + $(INSTALL_DATA) $(srcdir)/gchem3d$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d.png; \ $(INSTALL_DATA) $(srcdir)/gchemcalc$$i.png \ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemcalc.png; \ $(INSTALL_DATA) $(srcdir)/gchemtable$$i.png \ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemtable.png; \ + $(INSTALL_DATA) $(srcdir)/gspectrum$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gspectrum.png; \ done uninstall-hook: for i in 32 48 72 128; do \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gcrystal.png; \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gcrystal.png; \ - rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d-viewer.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gchempaint.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchempaint.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d.png; \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemcalc.png; \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemtable.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gspectrum.png; \ done diff -Nru gnome-chemistry-utils-0.8.6/pixmaps/Makefile.in gnome-chemistry-utils-0.10.9/pixmaps/Makefile.in --- gnome-chemistry-utils-0.8.6/pixmaps/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/pixmaps/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,7 +35,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = pixmaps -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(dist_pixmap_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -42,6 +45,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -49,16 +53,29 @@ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pixmapdir)" -pixmapDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pixmap_DATA) +DATA = $(dist_pixmap_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -78,26 +95,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -107,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -148,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -167,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -178,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -216,37 +256,48 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -EXTRA_DIST = \ - $(pixmap_DATA) \ - $(icons) - +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(icons) MAINTAINERCLEANFILES = Makefile.in -pixmapdir = $(datadir)/gchemutils/pixmaps -pixmap_DATA = gcrystal_logo.png -icons = gcrystal32.png \ +pixmapdir = $(datadir)/gchemutils/@GCU_API_VER@/pixmaps +dist_pixmap_DATA = gcrystal_logo.png gchempaint_logo.png +icons = \ + gcrystal32.png \ gcrystal48.png \ gcrystal72.png \ gcrystal128.png \ - gchem3d-viewer32.png \ - gchem3d-viewer48.png \ - gchem3d-viewer72.png \ - gchem3d-viewer128.png \ + gchempaint32.png \ + gchempaint48.png \ + gchempaint72.png \ + gchempaint128.png \ + gchem3d32.png \ + gchem3d48.png \ + gchem3d72.png \ + gchem3d128.png \ gchemcalc32.png \ gchemcalc48.png \ gchemcalc72.png \ @@ -254,7 +305,11 @@ gchemtable32.png \ gchemtable48.png \ gchemtable72.png \ - gchemtable128.png + gchemtable128.png \ + gspectrum32.png \ + gspectrum48.png \ + gspectrum72.png \ + gspectrum128.png all: all-am @@ -263,14 +318,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu pixmaps/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -288,29 +343,33 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -install-pixmapDATA: $(pixmap_DATA) +install-dist_pixmapDATA: $(dist_pixmap_DATA) @$(NORMAL_INSTALL) test -z "$(pixmapdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapdir)" - @list='$(pixmap_DATA)'; for p in $$list; do \ + @list='$(dist_pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pixmapDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapdir)/$$f'"; \ - $(pixmapDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pixmapdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pixmapdir)" || exit $$?; \ done -uninstall-pixmapDATA: +uninstall-dist_pixmapDATA: @$(NORMAL_UNINSTALL) - @list='$(pixmap_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pixmapdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pixmapdir)/$$f"; \ - done + @list='$(dist_pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pixmapdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pixmapdir)" && rm -f $$files tags: TAGS TAGS: @@ -334,13 +393,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -371,6 +434,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -390,28 +454,39 @@ html: html-am +html-am: + info: info-am info-am: -install-data-am: install-pixmapDATA +install-data-am: install-dist_pixmapDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook - install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -430,24 +505,23 @@ ps-am: -uninstall-am: uninstall-pixmapDATA +uninstall-am: uninstall-dist_pixmapDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pixmapDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-hook \ - uninstall-pixmapDATA + install-data install-data-am install-data-hook \ + install-dist_pixmapDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-dist_pixmapDATA uninstall-hook install-data-hook: @@ -458,22 +532,32 @@ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gcrystal.png; \ $(INSTALL_DATA) $(srcdir)/gcrystal$$i.png \ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gcrystal.png; \ - $(INSTALL_DATA) $(srcdir)/gchem3d-viewer$$i.png \ - $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d-viewer.png; \ + $(INSTALL_DATA) $(srcdir)/gchempaint$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gchempaint.png; \ + $(INSTALL_DATA) $(srcdir)/gchempaint$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchempaint.png; \ + $(INSTALL_DATA) $(srcdir)/gchem3d$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d.png; \ $(INSTALL_DATA) $(srcdir)/gchemcalc$$i.png \ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemcalc.png; \ $(INSTALL_DATA) $(srcdir)/gchemtable$$i.png \ $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemtable.png; \ + $(INSTALL_DATA) $(srcdir)/gspectrum$$i.png \ + $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gspectrum.png; \ done uninstall-hook: for i in 32 48 72 128; do \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gcrystal.png; \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gcrystal.png; \ - rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d-viewer.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/mimetypes/gnome-mime-application-x-gchempaint.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchempaint.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchem3d.png; \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemcalc.png; \ rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gchemtable.png; \ + rm $(DESTDIR)$(datadir)/icons/hicolor/$$i"x"$$i/apps/gspectrum.png; \ done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/cdx.cc gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/cdx.cc --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/cdx.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/cdx.cc 2009-11-14 11:30:33.000000000 +0100 @@ -0,0 +1,1423 @@ +// -*- C++ -*- + +/* + * CDXML files loader plugin + * cdx.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace std; +using namespace gcu; + +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define READINT16(input,i) gsf_input_read (input, 2, (guint8*) &i) +#define READINT32(input,i) gsf_input_read (input, 4, (guint8*) &i) +#else +unsigned char buffer[4]; +bool readint_res; +#define READINT16(input,i) \ + readint_res = gsf_input_read (input, 2, (guint8*) buffer), \ + i = buffer[0] + (buffer[1] << 8), readint_res +#define READINT32(input,i) \ + readint_res = gsf_input_read (input, 4, (guint8*) buffer), \ + i = buffer[0] + (buffer[1] << 8) + (buffer[2] << 16) + (buffer[3] << 24), readint_res +#endif + +typedef struct { + guint16 index; + guint16 encoding; + string name; +} CDXFont; + +static map Charsets; +static map CharsetIDs; + +static gint32 ReadInt (GsfInput *input, int size) +{ + gint32 res = 0; + switch (size) { + case 1: + gsf_input_read (input, 1, (guint8*) &res); + break; + case 2: + READINT16 (input, res); + break; + case 4: + READINT32 (input, res); + break; + } + return res; +} + +/*static guint32 ReadUInt (GsfInput *input, int size) +{ + guint32 res = 0; + switch (size) { + case 1: + gsf_input_read (input, 1, (guint8*) &res); + break; + case 2: + READINT16 (input, res); + break; + case 4: + READINT32 (input, res); + break; + } + return res; +}*/ + +class CDXLoader: public gcu::Loader +{ +public: + CDXLoader (); + virtual ~CDXLoader (); + + bool Read (Document *doc, GsfInput *in, char const *mime_type, IOContext *io); + bool Write (Document *doc, GsfOutput *out, char const *mime_type, IOContext *io); + +private: + bool ReadGenericObject (GsfInput *in); + bool ReadPage (GsfInput *in, Object *parent); + bool ReadMolecule (GsfInput *in, Object *parent); + bool ReadAtom (GsfInput *in, Object *parent); + bool ReadBond (GsfInput *in, Object *parent); + bool ReadText (GsfInput *in, Object *parent); + bool ReadGroup (GsfInput *in, Object *parent); + bool ReadGraphic (GsfInput *in, Object *parent); + bool ReadFragmentText (GsfInput *in, Object *parent); + guint16 ReadSize (GsfInput *in); + bool ReadDate (GsfInput *in); + +private: + char *buf; + size_t bufsize; + map fonts; + vector colors; + guint8 m_TextAlign, m_TextJustify; +}; + +CDXLoader::CDXLoader (): + m_TextAlign (0), + m_TextJustify (0) +{ + AddMimeType ("chemical/x-cdx"); +} + +CDXLoader::~CDXLoader () +{ + RemoveMimeType ("chemical/x-cdx"); +} + +bool CDXLoader::Read (Document *doc, GsfInput *in, char const *mime_type, IOContext *io) +{ + if (doc == NULL || in == NULL) + return false; + bool result = true; + guint16 code; + bufsize = 64; + buf = new char [bufsize]; + // note that we read 28 bytes here while headers for recent cdx files have only 22 bytes, remaining are 0x8000 (document) and its id (0) + if (!gsf_input_read (in, kCDX_HeaderLength, (guint8*) buf) || strncmp (buf, kCDX_HeaderString, kCDX_HeaderStringLen)) { + result = false; + code = 0; + } else if (!(READINT16 (in, code))) { + result = false; + code = 0; + } + + while (code) { + if (code & kCDXTag_Object) { + switch (code) { + case kCDXObj_Page: + result = ReadPage (in, doc); + break; + default: + result = ReadGenericObject (in); + } + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) { + result = false; + break; + } + switch (code) { + case kCDXProp_CreationUserName: + gsf_input_read (in, size, (guint8*) buf); + doc->SetProperty (GCU_PROP_DOC_CREATOR, buf); + break; + case kCDXProp_CreationDate: { + if (size != 14 || !ReadDate (in)) { + result = false; + break; + } + doc->SetProperty (GCU_PROP_DOC_CREATION_TIME, buf); + break; + } + case kCDXProp_ModificationDate:{ + if (size != 14 || !ReadDate (in)) { + result = false; + break; + } + gsf_input_read (in, size, (guint8*) buf); + doc->SetProperty (GCU_PROP_DOC_MODIFICATION_TIME, buf); + break; + } + case kCDXProp_Name: + gsf_input_read (in, size, (guint8*) buf); + doc->SetProperty (GCU_PROP_DOC_TITLE, buf); + break; + case kCDXProp_Comment: + gsf_input_read (in, size, (guint8*) buf); + doc->SetProperty (GCU_PROP_DOC_COMMENT, buf); + break; + case kCDXProp_BondLength: { + if (size != 4) { + result = false; + break; + } + guint32 length; + if (!(READINT32 (in,length))) { + result = false; + break; + } + snprintf (buf, bufsize, "%u", length); + doc->SetProperty (GCU_PROP_THEME_BOND_LENGTH, buf); + break; + } + case kCDXProp_FontTable: { + // skip origin platform and read fonts number + guint16 nb; + if (gsf_input_seek (in, 2, G_SEEK_CUR) || !(READINT16 (in,nb))) + return false; + CDXFont font; + for (int i = 0; i < nb; i++) { + if (!(READINT16 (in,font.index)) || + !(READINT16 (in,font.encoding)) || + !(READINT16 (in,size))) + return false; + gsf_input_read (in, size, (guint8*) buf); + buf[size] = 0; + font.name = buf; + fonts[font.index] = font; + } + } + break; + case kCDXProp_ColorTable: { + colors.push_back ("red=\"1\" green=\"1\" blue=\"1\""); // white + colors.push_back ("red=\"0\" green=\"0\" blue=\"0\""); // black + unsigned nb = (size - 2) / 6; + if (!(READINT16 (in,size)) || size != nb) + return false; + guint16 red, blue, green; + for (unsigned i = 0; i < nb; i++) { + if (!(READINT16 (in,red)) || !(READINT16 (in,green)) || !(READINT16 (in,blue))) + return false; + snprintf (buf, bufsize, "red=\"%g\" green=\"%g\" blue=\"%g\"", (double) red / 0xffff, (double) green / 0xffff, (double) blue / 0xffff); + colors.push_back (buf); + } + break; + } + case kCDXProp_CaptionJustification: { + if (!gsf_input_read (in, 1, &m_TextAlign)) + return false; + break; + } + default: + if (size) + result = (gsf_input_read (in, size, (guint8*) buf)); + } + } + if (!result) + break; + if (!(READINT16 (in,code))) { + result = false; + break; + } + } + delete [] buf; + fonts.clear (); + return result; +} + +bool CDXLoader::Write (Document *doc, GsfOutput *out, char const *mime_type, IOContext *io) +{ + gsf_output_write (out, kCDX_HeaderStringLen, (guint8 const *) kCDX_HeaderString); + gsf_output_write (out, kCDX_HeaderLength - kCDX_HeaderStringLen, (guint8 const *) "\x04\x03\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00"); + // write the document contents + // there is a need for a two paths procedure + // in the first path, we collect fonts and colors + // everything else is saved during the second path + // write end of document and end of file + gsf_output_write (out, 4, (guint8 const *) "\x00\x00\x00\x00"); + return true; +} + +bool CDXLoader::ReadGenericObject (GsfInput *in) +{ + guint16 code; + if (gsf_input_seek (in, 4, G_SEEK_CUR)) //skip the id + return false; + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + if (!ReadGenericObject (in)) + return false; + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + if (size && !gsf_input_read (in, size, (guint8*) buf)) + return false; + } + if (!(READINT16 (in,code))) + return false; + } + return true; +} + +bool CDXLoader::ReadPage (GsfInput *in, Object *parent) +{ + guint16 code; + if (gsf_input_seek (in, 4, G_SEEK_CUR)) //skip the id + return false; + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + switch (code) { + case kCDXObj_Group: + if (!ReadGroup (in, parent)) + return false; + break; + case kCDXObj_Fragment: + if (!ReadMolecule (in, parent)) + return false; + break; + case kCDXObj_Text: + if (!ReadText (in, parent)) + return false; + break; + case kCDXObj_Graphic: + if (!ReadGraphic (in, parent)) + return false; + break; + default: + if (!ReadGenericObject (in)) + return false; + } + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + if (size && !gsf_input_read (in, size, (guint8*) buf)) + return false; + } + if (!(READINT16 (in,code))) + return false; + } + return true; +} + +bool CDXLoader::ReadMolecule (GsfInput *in, Object *parent) +{ + guint16 code; + Object *mol = Object::CreateObject ("molecule", parent); + guint32 Id; + if (!(READINT32 (in,Id))) + return false; + snprintf (buf, bufsize, "m%d", Id); + mol->SetId (buf); + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + switch (code) { + case kCDXObj_Node: + if (!ReadAtom (in, mol)) + return false; + break; + case kCDXObj_Bond: + if (!ReadBond (in, mol)) + return false; + break; + default: + if (!ReadGenericObject (in)) + return false; + } + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + if (size && !gsf_input_read (in, size, (guint8*) buf)) + return false; + } + if (!(READINT16 (in,code))) + return false; + } + static_cast (mol)->UpdateCycles (); + return true; +} + +bool CDXLoader::ReadAtom (GsfInput *in, Object *parent) +{ + guint16 code; + Object *Atom = Object::CreateObject ("atom", parent); + Document *Doc = NULL; + Atom->SetProperty (GCU_PROP_ATOM_Z, "6"); + guint32 Id; + int type = 0; + int Z = 6; + if (!(READINT32 (in,Id))) + return false; + snprintf (buf, bufsize, "a%d", Id); + Atom->SetId (buf); + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + switch (code) { + case kCDXObj_Fragment: { + if (!Doc) + Doc = parent->GetDocument ()->GetApp ()->CreateNewDocument (); + Doc->SetProperty (GCU_PROP_THEME_BOND_LENGTH, "943718"); + if (!ReadMolecule (in, Doc)) { + delete Doc; + return false; + } + break; + } + case kCDXObj_Text: + if (Z == 6) { + if (!ReadFragmentText (in, Atom)) + goto bad_exit; + switch (type) { + case 0: + // Parse the formula. + try { + Formula form (buf, GCU_FORMULA_PARSE_RESIDUE); + if (Doc) { + map< string, Object * >::iterator i; + Molecule *mol = dynamic_cast (Doc->GetFirstChild (i)); + if (Doc->GetChildrenNumber () != 1 || mol == NULL) + goto bad_exit; + // compare the formula as interpreted with the document contents + // TODO: write this code + } + // now build a molecule from the formula + Molecule *mol2 = NULL; + if (Doc) + mol2 = Molecule::MoleculeFromFormula (Doc, form); + bool replace = true; + if (mol2) { + } else { + // check if the formula contains only one atom + std::list const &items = form.GetElements (); + if (items.size () == 1 && dynamic_cast (items.front ())) + replace = false; + } + if (replace) { + string pos = Atom->GetProperty (GCU_PROP_POS2D); + Molecule *mol = dynamic_cast (parent); + if (mol) + mol->Remove (Atom); + delete Atom; + Atom = Object::CreateObject ("fragment", parent); + Atom->SetProperty (GCU_PROP_TEXT_TEXT, buf); + snprintf (buf, bufsize, "a%d", Id); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_ID, buf); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_START, "0"); + Atom->SetProperty (GCU_PROP_POS2D, pos.c_str ()); + } + if (!Doc) + Doc = parent->GetDocument ()->GetApp ()->CreateNewDocument (); + } + catch (parse_error &error) { + return false; + } + break; + case 4: { + bool amb; + Residue const *res = parent->GetDocument ()->GetResidue (buf, &amb); + if (res != NULL) { + map< string, Object * >::iterator i; + Molecule *mol = dynamic_cast (Doc->GetFirstChild (i)); + if (mol == NULL) + goto bad_exit; + if (*res == *mol) { + // Residue has been identified to the known one + string pos = Atom->GetProperty (GCU_PROP_POS2D); + Molecule *mol = dynamic_cast (parent); + if (mol) + mol->Remove (Atom); + delete Atom; + Atom = Object::CreateObject ("fragment", parent); + Atom->SetProperty (GCU_PROP_TEXT_TEXT, buf); + snprintf (buf, bufsize, "a%d", Id); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_ID, buf); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_START, "0"); + Atom->SetProperty (GCU_PROP_POS2D, pos.c_str ()); + } else { + // FIXME: should the document care with the residues? + g_warning (_("Unsupported feature, please report!")); + } + } else { + // FIXME: Unkown residue: add it to the database? or just to the document? + g_warning (_("Unsupported feature, please report!")); + } + break; + } + case 5: + // First, parse the formula. + { + map< string, Object * >::iterator i; + Molecule *mol = dynamic_cast (Doc->GetFirstChild (i)); + // Do the molecule have a pseudo-atom? + bool have_pseudo = false; + Object *obj = mol->GetFirstChild (i); + gcu::Atom *a = NULL; + while (obj) { + a = dynamic_cast (obj); + if (a && ! a->GetZ ()) { + have_pseudo = true; + break; + } + obj = mol->GetNextChild (i); + } + if (mol == NULL) + goto bad_exit; + try { + // First, parse the formula. + Formula form (buf, GCU_FORMULA_PARSE_RESIDUE); + // now build a molecule from the formula + Molecule *mol2 = Molecule::MoleculeFromFormula (Doc, form, have_pseudo); + // Now see if it matches with the molecule + if (!mol2 || !(*mol == *mol2)) { + if (have_pseudo) { + // try adding a new residue + // first examine the first atom + map ::iterator i; + gcu::Bond *b = a->GetFirstBond (i); + int residue_offset = 0; + if (!b) + goto fragment_error; + gcu::Atom *a2 = b->GetAtom (a); + if (!a2) + goto fragment_error; + list const &elts = form.GetElements (); + list::const_iterator j = elts.begin (); + FormulaAtom *fatom = dynamic_cast (*j); + int valence; + if (!fatom || fatom->elt != a2->GetZ ()) + goto fragment_add; + valence = Element::GetElement (fatom->elt)->GetDefaultValence (); + switch (valence) { + case 2: { + /* remove the first atom and replace it by a pseudo-atom, then add the residue + this helps with things begining with an oxygen or a sulfur, but might be + not enough n other cases */ + double x, y; + a2->GetCoords (&x, &y); + a->SetCoords (x, y); + a->RemoveBond (b); + a2->RemoveBond (b); + mol->Remove (b); + delete b; + if (a2->GetBondsNumber () > 1) + goto fragment_error; + b = a2->GetFirstBond (i); + if (b->GetOrder () != 1) + goto fragment_error; + b->ReplaceAtom (a2, a); + a->AddBond (b); + mol->Remove (a2); + delete a2; + // now remove the atom from the new residue symbol + residue_offset += fatom->end; + break; + } + case 3: + // we do not support that at the moment + goto fragment_error; + break; + default: + // we do not support that at the moment + goto fragment_error; + } +fragment_add: + // Try create a new document, using the symbol as name + parent->GetDocument ()->CreateResidue (buf + residue_offset, buf + residue_offset, mol); + goto fragment_success; + } +fragment_error: + g_warning (_("failed for %s\n"),buf); + } + } + catch (parse_error &error) { + int start, length; + puts (error.what (start, length)); + } +fragment_success: + string pos = Atom->GetProperty (GCU_PROP_POS2D); + mol = dynamic_cast (parent); + if (mol) + mol->Remove (Atom); + delete Atom; + Atom = Object::CreateObject ("fragment", parent); + Atom->SetProperty (GCU_PROP_TEXT_TEXT, buf); + snprintf (buf, bufsize, "a%d", Id); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_ID, buf); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_START, "0"); + Atom->SetProperty (GCU_PROP_POS2D, pos.c_str ()); + } + break; + case 7: { + bool amb; + Residue const *res = parent->GetDocument ()->GetResidue (buf, &amb); + if (res != NULL && res->GetGeneric ()) { + string pos = Atom->GetProperty (GCU_PROP_POS2D); + Molecule *mol = dynamic_cast (parent); + if (mol) + mol->Remove (Atom); + delete Atom; + Atom = Object::CreateObject ("fragment", parent); + Atom->SetProperty (GCU_PROP_TEXT_TEXT, buf); + snprintf (buf, bufsize, "a%d", Id); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_ID, buf); + Atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_START, "0"); + Atom->SetProperty (GCU_PROP_POS2D, pos.c_str ()); + } else { + // TODO: import it in the document + g_warning (_("Unsupported feature, please report!")); + } + break; + } + default: + g_warning (_("Unsupported feature, please report!")); + break; + } + break; + } + default: + if (!ReadGenericObject (in)) + goto bad_exit; + } + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + goto bad_exit; + switch (code) { + case kCDXProp_2DPosition: { + gint32 x, y; + if (size != 8 || !(READINT32 (in,y)) || !(READINT32 (in,x))) + goto bad_exit; + snprintf (buf, bufsize, "%d %d", x, y); + Atom->SetProperty (GCU_PROP_POS2D, buf); + break; + } + case kCDXProp_Node_Element: + if (size != 2 || !(READINT16 (in,size))) + goto bad_exit; + Z = size; + snprintf (buf, bufsize, "%u", size); + Atom->SetProperty (GCU_PROP_ATOM_Z, buf); + break; + case kCDXProp_Atom_Charge: + gint8 charge; + if (size!= 1 || !gsf_input_read (in, 1, (guint8*) &charge)) + goto bad_exit; + snprintf (buf, bufsize, "%d", charge); + Atom->SetProperty (GCU_PROP_ATOM_CHARGE, buf); + break; + case kCDXProp_Node_Type: + if (size != 2 || !(READINT16 (in,type))) + goto bad_exit; + if (type == 12) { + // convert the atom to a pseudo atom. + string pos = Atom->GetProperty (GCU_PROP_POS2D); + Molecule *mol = dynamic_cast (parent); + if (mol) + mol->Remove (Atom); + delete Atom; + Atom = Object::CreateObject ("pseudo-atom", parent); + snprintf (buf, bufsize, "a%d", Id); + Atom->SetId (buf); + Atom->SetProperty (GCU_PROP_POS2D, pos.c_str ()); + } + break; + default: + if (size && !gsf_input_read (in, size, (guint8*) buf)) + goto bad_exit; + } + } + if (!(READINT16 (in,code))) + goto bad_exit; + } + if (Doc) + delete Doc; + return true; +bad_exit: + if (Doc) + delete Doc; + return false; +} + +bool CDXLoader::ReadBond (GsfInput *in, Object *parent) +{ + guint16 code; + Object *Bond = Object::CreateObject ("bond", parent); + guint32 Id; + if (!(READINT32 (in,Id))) + return false; + snprintf (buf, bufsize, "b%d", Id); + Bond->SetId (buf); + Bond->SetProperty (GCU_PROP_BOND_ORDER, "1"); + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + if (!ReadGenericObject (in)) + return false; + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + switch (code) { + case kCDXProp_Bond_Begin: { + if (size != 4 || !(READINT32 (in,Id))) + return false; + snprintf (buf, bufsize, "%u", Id); + Bond->SetProperty (GCU_PROP_BOND_BEGIN, buf); + break; + } + case kCDXProp_Bond_End: { + if (size != 4 || !(READINT32 (in,Id))) + return false; + snprintf (buf, bufsize, "%u", Id); + Bond->SetProperty (GCU_PROP_BOND_END, buf); + break; + } + case kCDXProp_Bond_Order: + if (size != 2 || !(READINT16 (in,size))) + return false; + switch (size) { + case 2: + Bond->SetProperty (GCU_PROP_BOND_ORDER, "2"); + break; + case 4: + Bond->SetProperty (GCU_PROP_BOND_ORDER, "3"); + break; + default: + Bond->SetProperty (GCU_PROP_BOND_ORDER, "1"); + break; + } + break; + case kCDXProp_Bond_Display: + if (size != 2 || !(READINT16 (in,size))) + return false; + switch (size) { + case 1: + case 2: + case 3: + Bond->SetProperty (GCU_PROP_BOND_TYPE, "hash"); + break; + case 4: + Bond->SetProperty (GCU_PROP_BOND_TYPE, "hash-invert"); + break; + case 5: + Bond->SetProperty (GCU_PROP_BOND_TYPE, "large"); + break; + case 6: + Bond->SetProperty (GCU_PROP_BOND_TYPE, "wedge"); + break; + case 7: + Bond->SetProperty (GCU_PROP_BOND_TYPE, "wedge-invert"); + break; + case 8: + Bond->SetProperty (GCU_PROP_BOND_TYPE, "squiggle"); + break; + default: + Bond->SetProperty (GCU_PROP_BOND_TYPE, "normal"); + } + break; + default: + if (size && !gsf_input_read (in, size, (guint8*) buf)) + return false; + } + } + if (!(READINT16 (in,code))) + return false; + } + return true; +} + +typedef struct { + guint16 index; + guint16 font; + guint16 face; + guint16 size; + guint16 color; +} attribs; + +bool CDXLoader::ReadText (GsfInput *in, Object *parent) +{ + guint16 code; + Object *Text= Object::CreateObject ("text", parent); + guint32 Id; + guint8 TextAlign = 0xfe, TextJustify = 0xfe; + if (!(READINT32 (in,Id))) + return false; + snprintf (buf, bufsize, "t%d", Id); + Text->SetId (buf); + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + if (!ReadGenericObject (in)) + return false; + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + switch (code) { + case kCDXProp_2DPosition: { + if (size != 8) + return false; + gint32 x, y; + if (!(READINT32 (in,y))) + return false; + if (!(READINT32 (in,x))) + return false; + snprintf (buf, bufsize, "%d %d", x, y); + Text->SetProperty (GCU_PROP_POS2D, buf); + break; + } + case kCDXProp_Text: { + guint16 nb; + bool interpret = false; + attribs attrs, attrs0; + attrs0.index = 0; // makes gcc happy + attrs0.face = 0; // ditto + if (!(READINT16 (in,nb))) + return false; + list attributes; + size -=2; + guint16 *n = &attrs.index; + for (int i =0; i < nb; i++) { + if (size < 10) + return false; + for (int j = 0; j < 5; j++) + if (!(READINT16 (in,n[j]))) + return false; + attributes.push_back (attrs); + size -= 10; + } + if (size < 1) + return false; + if (attributes.empty ()) { + if (!gsf_input_read (in, size, (guint8*) buf)) + return false; + buf[size] = 0; + Text->SetProperty (GCU_PROP_TEXT_TEXT, buf); + } else { + ostringstream str; + str << ""; + while (!attributes.empty ()) { + attrs = attributes.front (); + attributes.pop_front (); + if (attrs.index > 0) { + attrs0.index = attrs.index - attrs0.index; + if (!gsf_input_read (in, attrs0.index, (guint8*) buf)) + return false; + buf[attrs0.index] = 0; + // supposing the text is ASCII !! + if (interpret) { + // for now put all numbers as subscripts + // FIXME: fix this kludgy code + int cur = 0; + while (cur < attrs0.index) { + while (cur < attrs0.index && (buf[cur] < '0' || buf[cur] > '9')){printf("cur=%d c=%c\n",cur,buf[cur]); + str << buf[cur++];} + if (cur < attrs0.index) { + if (attrs0.face & 4) + str << ""; + if (attrs0.face & 2) + str << ""; + if (attrs0.face & 1) + str << ""; + str << ""; + str << ""; + str << ""; + while (buf[cur] >= '0' && buf[cur] <= '9'){printf("cur=%d c=%c\n",cur,buf[cur]); + str << buf[cur++];} + str << ""; + str << ""; + if (attrs0.face & 1) + str << ""; + if (attrs0.face & 2) + str << ""; + if (attrs0.face & 4) + str << ""; + } + } + } else + str << buf; + size -= attrs0.index; + if ((attrs0.face & 0x60) == 0x60) + interpret = false; + else if (attrs0.face & 0x40) + str << ""; + else if (attrs0.face & 0x20) + str << ""; + if (attrs0.face & 4) + str << ""; + if (attrs0.face & 2) + str << ""; + if (attrs0.face & 1) + str << ""; + str << ""; + str << ""; + } + if ((attrs.face & 0x60) != 0 && (attrs.face & 0x60) != 0x60) + attrs.size = attrs.size * 2 / 3; + str << ""; + str << ""; + if (attrs.face & 1) + str << ""; + if (attrs.face & 2) + str << ""; + if (attrs.face & 4) + str << ""; + // skip 0x08 == outline since it is not supported + // skip 0x10 == shadow since it is not supported + if ((attrs.face & 0x60) == 0x60) + interpret = true; + else if (attrs.face & 0x20) + str << ""; + else if (attrs.face & 0x40) + str << ""; + attrs0 = attrs; + } + if (!gsf_input_read (in, size, (guint8*) buf)) + return false; + buf[size] = 0; + bool opened = true; + // supposing the text is ASCII!! + if (interpret) { + // for now put all numbers as subscripts + // FIXME: fix this kludgy code + int cur = 0; + while (cur < size) { + while (cur < size && (buf[cur] < '0' || buf[cur] > '9')) + str << buf[cur++]; + if (cur < size) { + if (attrs0.face & 4) + str << ""; + if (attrs0.face & 2) + str << ""; + if (attrs0.face & 1) + str << ""; + str << ""; + str << ""; + str << ""; + while (buf[cur] >= '0' && buf[cur] <= '9') + str << buf[cur++]; + str << ""; + if (cur < size) { + str << ""; + str << ""; + if (attrs0.face & 1) + str << ""; + if (attrs0.face & 4) + str << ""; + if (attrs0.face & 2) + str << ""; + } else + opened = false; + } + } + } else + str << buf; + if (opened) { + if ((attrs0.face & 0x60) != 0x60) { + if (attrs0.face & 0x40) + str << ""; + else if (attrs0.face & 0x20) + str << ""; + } + if (attrs0.face & 4) + str << ""; + if (attrs0.face & 2) + str << ""; + if (attrs0.face & 1) + str << ""; + str << ""; + str << ""; + } + str << ""; + Text->SetProperty (GCU_PROP_TEXT_MARKUP, str.str().c_str()); + } + break; + } + case kCDXProp_Justification: + if (!gsf_input_read (in, 1, &TextJustify)) + return false; + break; + case kCDXProp_CaptionJustification: + if (!gsf_input_read (in, 1, &TextAlign)) + return false; + break; + default: + if (size && !gsf_input_read (in, size, (guint8*) buf)) + return false; + } + } + if (!(READINT16 (in,code))) + return false; + } + if (TextAlign == 0xfe) + TextAlign = m_TextAlign; + switch (TextAlign) { + case 0xff: + Text->SetProperty (GCU_PROP_TEXT_ALIGNMENT, "right"); + break; + case 0: + Text->SetProperty (GCU_PROP_TEXT_ALIGNMENT, "left"); + break; + case 1: + Text->SetProperty (GCU_PROP_TEXT_ALIGNMENT, "center"); + break; + default: + // Other cases are not currently supported + break; + } + if (TextJustify == 0xfe) + TextJustify = m_TextJustify; + switch (TextJustify) { + case 0xff: + Text->SetProperty (GCU_PROP_TEXT_JUSTIFICATION, "right"); + break; + case 0: + Text->SetProperty (GCU_PROP_TEXT_JUSTIFICATION, "left"); + break; + case 1: + Text->SetProperty (GCU_PROP_TEXT_JUSTIFICATION, "center"); + break; + case 2: + Text->SetProperty (GCU_PROP_TEXT_JUSTIFICATION, "justify"); + break; + default: + // Other cases are not currently supported + break; + } + return true; +} + +bool CDXLoader::ReadGroup (GsfInput *in, Object *parent) +{ + guint16 code; + Object *Group= Object::CreateObject ("group", parent); + Group->Lock (); + if (gsf_input_seek (in, 4, G_SEEK_CUR)) //skip the id + return false; + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + switch (code) { + case kCDXObj_Fragment: + if (!ReadMolecule (in, Group)) + return false; + break; + case kCDXObj_Text: + if (!ReadText (in, Group)) + return false; + break; + default: + if (!ReadGenericObject (in)) + return false; + } + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + if (size && !gsf_input_read (in, size, (guint8*) buf)) + return false; + } + if (!(READINT16 (in,code))) + return false; + } + Group->Lock (false); + Group->OnLoaded (); + return true; +} + +bool CDXLoader::ReadGraphic (GsfInput *in, Object *parent) +{ + guint16 code; + guint32 Id; + guint16 type = 0xffff, arrow_type = 0xffff; + gint32 x0, y0, x1, y1; + if (!(READINT32 (in,Id)) || !(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + if (!ReadGenericObject (in)) + return false; + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + switch (code) { + case kCDXProp_BoundingBox: + if (size != 16 || !(READINT32 (in,y1)) || !(READINT32 (in,x1)) + || !(READINT32 (in,y0)) || !(READINT32 (in,x0))) + return false; + break; + case kCDXProp_Graphic_Type: + type = ReadInt (in, size); + break; + case kCDXProp_Arrow_Type: + arrow_type = ReadInt (in, size); + break; + default: + if (size && !gsf_input_read (in, size, (guint8*) buf)) + return false; + } + } + if (!(READINT16 (in,code))) + return false; + } + if (type == 1) { + Object *obj = NULL; + switch (arrow_type) { + case 1: + case 2: + obj = Object::CreateObject ("reaction-arrow", parent); + snprintf (buf, bufsize, "ra%d", Id); + break; + case 4: + obj = Object::CreateObject ("mesomery-arrow", parent); + snprintf (buf, bufsize, "ma%d", Id); + break; + case 8: + obj = Object::CreateObject ("reaction-arrow", parent); + snprintf (buf, bufsize, "ra%d", Id); + obj->SetProperty (GCU_PROP_REACTION_ARROW_TYPE, "double"); + break; + case 32: + obj = Object::CreateObject ("retrosynthesis-arrow", parent); + snprintf (buf, bufsize, "rsa%d", Id); + break; + default: + break; + } + if (obj) { + obj->SetId (buf); + snprintf (buf, bufsize, "%d %d %d %d", x0, y0, x1, y1); + obj->SetProperty (GCU_PROP_ARROW_COORDS, buf); + } + } + return true; +} + +guint16 CDXLoader::ReadSize (GsfInput *in) +{ + guint16 size; + if (!(READINT16 (in,size))) + return 0xffff; + if ((unsigned) size + 1 > bufsize) { + do + bufsize <<= 1; + while ((unsigned) size + 1 > bufsize); + delete [] buf; + buf = new char [bufsize]; + } + return size; +} + +bool CDXLoader::ReadDate (GsfInput *in) +{ + guint16 n[7]; + for (int i = 0; i < 7; i++) + if (!(READINT16 (in,n[i]))) + return false; + GDate *date = g_date_new_dmy (n[2], (GDateMonth) n[1], n[0]); + g_date_strftime (buf, bufsize, "%m/%d/%Y", date); + g_date_free (date); + return true; +} + +bool CDXLoader::ReadFragmentText (GsfInput *in, Object *parent) +{ + guint16 code; + if (gsf_input_seek (in, 4, G_SEEK_CUR)) //skip the id + return false; + if (!(READINT16 (in,code))) + return false; + while (code) { + if (code & kCDXTag_Object) { + if (!ReadGenericObject (in)) + return false; + } else { + guint16 size; + if ((size = ReadSize (in)) == 0xffff) + return false; + switch (code) { +/* case kCDXProp_2DPosition: { + if (size != 8) + return false; + gint32 x, y; + if (!READINT32 (in, y)) + return false; + if (!READINT32 (in, x)) + return false; + snprintf (buf, bufsize, "%d %d", x, y); +// Text->SetProperty (GCU_PROP_POS2D, buf); + break; + }*/ + case kCDXProp_Text: { + guint16 nb; + if (!(READINT16 (in,nb))) + return false; + size -=2; + for (int i =0; i < nb; i++) { + if (size < 10) + return false; + guint16 n[5]; + for (int j = 0; j < 5; j++) + if (!(READINT16 (in,n[j]))) + return false; + size -= 10; + } + if (size < 1) + return false; + if (!gsf_input_read (in, size, (guint8*) buf)) + return false; + buf[size] = 0; + break; + } + default: + if (size && gsf_input_seek (in, size, G_SEEK_CUR)) + return false; + } + } + if (!(READINT16 (in,code))) + return false; + } + return true; +} + +static CDXLoader loader; + +extern "C" { + +extern GOPluginModuleDepend const go_plugin_depends [] = { + { "goffice", GOFFICE_API_VERSION } +}; +extern GOPluginModuleHeader const go_plugin_header = + { GOFFICE_MODULE_PLUGIN_MAGIC_NUMBER, G_N_ELEMENTS (go_plugin_depends) }; + +G_MODULE_EXPORT void +go_plugin_init (GOPlugin *plugin, GOCmdContext *cc) +{ + bindtextdomain (GETTEXT_PACKAGE, DATADIR"/locale"); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + // initialize charsets names + Charsets[kCDXCharSetUnknown] = "Unknown"; + Charsets[kCDXCharSetEBCDICOEM] = "EBCDICOEM"; + Charsets[kCDXCharSetMSDOSUS] = "MSDOSUS"; + Charsets[kCDXCharSetEBCDIC500V1] = "EBCDIC500V1"; + Charsets[kCDXCharSetArabicASMO708] = "ASMO-708"; + Charsets[kCDXCharSetArabicASMO449P] = "ArabicASMO449P"; + Charsets[kCDXCharSetArabicTransparent] = "ArabicTransparent"; + Charsets[kCDXCharSetArabicTransparentASMO] = "DOS-720"; + Charsets[kCDXCharSetGreek437G] = "Greek437G"; + Charsets[kCDXCharSetBalticOEM] = "cp775"; + Charsets[kCDXCharSetMSDOSLatin1] = "windows-850"; + Charsets[kCDXCharSetMSDOSLatin2] = "ibm852"; + Charsets[kCDXCharSetIBMCyrillic] = "cp855"; + Charsets[kCDXCharSetIBMTurkish] = "cp857"; + Charsets[kCDXCharSetMSDOSPortuguese] = "cp860"; + Charsets[kCDXCharSetMSDOSIcelandic] = "cp861"; + Charsets[kCDXCharSetHebrewOEM] = "DOS-862"; + Charsets[kCDXCharSetMSDOSCanadianFrench] = "cp863"; + Charsets[kCDXCharSetArabicOEM] = "cp864"; + Charsets[kCDXCharSetMSDOSNordic] = "cp865"; + Charsets[kCDXCharSetMSDOSRussian] = "cp866"; + Charsets[kCDXCharSetIBMModernGreek] = "cp869"; + Charsets[kCDXCharSetThai] = "windows-874"; + Charsets[kCDXCharSetEBCDIC] = "EBCDIC"; + Charsets[kCDXCharSetJapanese] = "shift_jis"; + Charsets[kCDXCharSetChineseSimplified] = "gb2312"; + Charsets[kCDXCharSetKorean] = "ks_c_5601-1987"; + Charsets[kCDXCharSetChineseTraditional] = "big5"; + Charsets[kCDXCharSetUnicodeISO10646] = "iso-10646"; + Charsets[kCDXCharSetWin31EasternEuropean] = "windows-1250"; + Charsets[kCDXCharSetWin31Cyrillic] = "windows-1251"; + Charsets[kCDXCharSetWin31Latin1] = "iso-8859-1"; + Charsets[kCDXCharSetWin31Greek] = "iso-8859-7"; + Charsets[kCDXCharSetWin31Turkish] = "iso-8859-9"; + Charsets[kCDXCharSetHebrew] = "windows-1255"; + Charsets[kCDXCharSetArabic] = "windows-1256"; + Charsets[kCDXCharSetBaltic] = "windows-1257"; + Charsets[kCDXCharSetVietnamese] = "windows-1258"; + Charsets[kCDXCharSetKoreanJohab] = "windows-1361"; + Charsets[kCDXCharSetMacRoman] = "x-mac-roman"; + Charsets[kCDXCharSetMacJapanese] = "x-mac-japanese"; + Charsets[kCDXCharSetMacTradChinese] = "x-mac-tradchinese"; + Charsets[kCDXCharSetMacKorean] = "x-mac-korean"; + Charsets[kCDXCharSetMacArabic] = "x-mac-arabic"; + Charsets[kCDXCharSetMacHebrew] = "x-mac-hebrew"; + Charsets[kCDXCharSetMacGreek] = "x-mac-greek"; + Charsets[kCDXCharSetMacCyrillic] = "x-mac-cyrillic"; + Charsets[kCDXCharSetMacReserved] = "x-mac-reserved"; + Charsets[kCDXCharSetMacDevanagari] = "x-mac-devanagari"; + Charsets[kCDXCharSetMacGurmukhi] = "x-mac-gurmukhi"; + Charsets[kCDXCharSetMacGujarati] = "x-mac-gujarati"; + Charsets[kCDXCharSetMacOriya] = "x-mac-oriya"; + Charsets[kCDXCharSetMacBengali] = "x-mac-nengali"; + Charsets[kCDXCharSetMacTamil] = "x-mac-tamil"; + Charsets[kCDXCharSetMacTelugu] = "x-mac-telugu"; + Charsets[kCDXCharSetMacKannada] = "x-mac-kannada"; + Charsets[kCDXCharSetMacMalayalam] = "x-mac-Malayalam"; + Charsets[kCDXCharSetMacSinhalese] = "x-mac-sinhalese"; + Charsets[kCDXCharSetMacBurmese] = "x-mac-burmese"; + Charsets[kCDXCharSetMacKhmer] = "x-mac-khmer"; + Charsets[kCDXCharSetMacThai] = "x-mac-thai"; + Charsets[kCDXCharSetMacLao] = "x-mac-lao"; + Charsets[kCDXCharSetMacGeorgian] = "x-mac-georgian"; + Charsets[kCDXCharSetMacArmenian] = "x-mac-armenian"; + Charsets[kCDXCharSetMacSimpChinese] = "x-mac-simpChinese"; + Charsets[kCDXCharSetMacTibetan] = "x-mac-tibetan"; + Charsets[kCDXCharSetMacMongolian] = "x-mac-mongolian"; + Charsets[kCDXCharSetMacEthiopic] = "x-mac-ethiopic"; + Charsets[kCDXCharSetMacCentralEuroRoman] = "x-mac-ce"; + Charsets[kCDXCharSetMacVietnamese] = "x-mac-vietnamese"; + Charsets[kCDXCharSetMacExtArabic] = "x-mac-extArabic"; + Charsets[kCDXCharSetMacUninterpreted] = "x-mac-uninterpreted"; + Charsets[kCDXCharSetMacIcelandic] = "x-mac-icelandic"; + Charsets[kCDXCharSetMacTurkish] = "x-mac-turkish"; + CharsetIDs["Unknown"] = kCDXCharSetUnknown; + CharsetIDs["EBCDICOEM"] = kCDXCharSetEBCDICOEM; + CharsetIDs["MSDOSUS"] = kCDXCharSetMSDOSUS; + CharsetIDs["EBCDIC500V1"] = kCDXCharSetEBCDIC500V1; + CharsetIDs["ASMO-708"] = kCDXCharSetArabicASMO708; + CharsetIDs["ArabicASMO449P"] = kCDXCharSetArabicASMO449P; + CharsetIDs["ArabicTransparent"] = kCDXCharSetArabicTransparent; + CharsetIDs["DOS-720"] = kCDXCharSetArabicTransparentASMO; + CharsetIDs["Greek437G"] = kCDXCharSetGreek437G; + CharsetIDs["cp775"] = kCDXCharSetBalticOEM; + CharsetIDs["windows-850"] = kCDXCharSetMSDOSLatin1; + CharsetIDs["ibm852"] = kCDXCharSetMSDOSLatin2; + CharsetIDs["cp855"] = kCDXCharSetIBMCyrillic; + CharsetIDs["cp857"] = kCDXCharSetIBMTurkish; + CharsetIDs["cp860"] = kCDXCharSetMSDOSPortuguese; + CharsetIDs["cp861"] = kCDXCharSetMSDOSIcelandic; + CharsetIDs["DOS-862"] = kCDXCharSetHebrewOEM; + CharsetIDs["cp863"] = kCDXCharSetMSDOSCanadianFrench; + CharsetIDs["cp864"] = kCDXCharSetArabicOEM; + CharsetIDs["cp865"] = kCDXCharSetMSDOSNordic; + CharsetIDs["cp866"] = kCDXCharSetMSDOSRussian; + CharsetIDs["cp869"] = kCDXCharSetIBMModernGreek; + CharsetIDs["windows-874"] = kCDXCharSetThai; + CharsetIDs["EBCDIC"] = kCDXCharSetEBCDIC; + CharsetIDs["shift_jis"] = kCDXCharSetJapanese; + CharsetIDs["gb2312"] = kCDXCharSetChineseSimplified; + CharsetIDs["ks_c_5601-1987"] = kCDXCharSetKorean; + CharsetIDs["big5"] = kCDXCharSetChineseTraditional; + CharsetIDs["iso-10646"] = kCDXCharSetUnicodeISO10646; + CharsetIDs["windows-1250"] = kCDXCharSetWin31EasternEuropean; + CharsetIDs["windows-1251"] = kCDXCharSetWin31Cyrillic; + CharsetIDs["iso-8859-1"] = kCDXCharSetWin31Latin1; + CharsetIDs["iso-8859-7"] = kCDXCharSetWin31Greek; + CharsetIDs["iso-8859-9"] = kCDXCharSetWin31Turkish; + CharsetIDs["windows-1255"] = kCDXCharSetHebrew; + CharsetIDs["windows-1256"] = kCDXCharSetArabic; + CharsetIDs["windows-1257"] = kCDXCharSetBaltic; + CharsetIDs["windows-1258"] = kCDXCharSetVietnamese; + CharsetIDs["windows-1361"] = kCDXCharSetKoreanJohab; + CharsetIDs["x-mac-roman"] = kCDXCharSetMacRoman; + CharsetIDs["x-mac-japanese"] = kCDXCharSetMacJapanese; + CharsetIDs["x-mac-tradchinese"] = kCDXCharSetMacTradChinese; + CharsetIDs["x-mac-korean"] = kCDXCharSetMacKorean; + CharsetIDs["x-mac-arabic"] = kCDXCharSetMacArabic; + CharsetIDs["x-mac-hebrew"] = kCDXCharSetMacHebrew; + CharsetIDs["x-mac-greek"] = kCDXCharSetMacGreek; + CharsetIDs["x-mac-cyrillic"] = kCDXCharSetMacCyrillic; + CharsetIDs["x-mac-reserved"] = kCDXCharSetMacReserved; + CharsetIDs["x-mac-devanagari"] = kCDXCharSetMacDevanagari; + CharsetIDs["x-mac-gurmukhi"] = kCDXCharSetMacGurmukhi; + CharsetIDs["x-mac-gujarati"] = kCDXCharSetMacGujarati; + CharsetIDs["x-mac-oriya"] = kCDXCharSetMacOriya; + CharsetIDs["x-mac-nengali"] = kCDXCharSetMacBengali; + CharsetIDs["x-mac-tamil"] = kCDXCharSetMacTamil; + CharsetIDs["x-mac-telugu"] = kCDXCharSetMacTelugu; + CharsetIDs["x-mac-kannada"] = kCDXCharSetMacKannada; + CharsetIDs["x-mac-Malayalam"] = kCDXCharSetMacMalayalam; + CharsetIDs["x-mac-sinhalese"] = kCDXCharSetMacSinhalese; + CharsetIDs["x-mac-burmese"] = kCDXCharSetMacBurmese; + CharsetIDs["x-mac-khmer"] = kCDXCharSetMacKhmer; + CharsetIDs["x-mac-thai"] = kCDXCharSetMacThai; + CharsetIDs["x-mac-lao"] = kCDXCharSetMacLao; + CharsetIDs["x-mac-georgian"] = kCDXCharSetMacGeorgian; + CharsetIDs["x-mac-armenian"] = kCDXCharSetMacArmenian; + CharsetIDs["x-mac-simpChinese"] = kCDXCharSetMacSimpChinese; + CharsetIDs["x-mac-tibetan"] = kCDXCharSetMacTibetan; + CharsetIDs["x-mac-mongolian"] = kCDXCharSetMacMongolian; + CharsetIDs["x-mac-ethiopic"] = kCDXCharSetMacEthiopic; + CharsetIDs["x-mac-ce"] = kCDXCharSetMacCentralEuroRoman; + CharsetIDs["x-mac-vietnamese"] = kCDXCharSetMacVietnamese; + CharsetIDs["x-mac-extArabic"] = kCDXCharSetMacExtArabic; + CharsetIDs["x-mac-uninterpreted"] = kCDXCharSetMacUninterpreted; + CharsetIDs["x-mac-icelandic"] = kCDXCharSetMacIcelandic; + CharsetIDs["x-mac-turkish"] = kCDXCharSetMacTurkish; +} + +G_MODULE_EXPORT void +go_plugin_shutdown (GOPlugin *plugin, GOCmdContext *cc) +{ +} + +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/Makefile.am gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/Makefile.am 2009-11-14 11:30:33.000000000 +0100 @@ -0,0 +1,39 @@ +EXTRA_DIST = $(xml_in_files) + +CLEANFILES = $(xml_DATA) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +endif +DEFS += -DDATADIR=\"$(datadir)\" + +gcu_loader_cdxdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/cdx +gcu_loader_cdx_LTLIBRARIES = cdx.la + +cdx_la_LDFLAGS = -module -avoid-version -no-undefined + +cdx_la_LIBADD = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la + +cdx_la_SOURCES = \ + cdx.cc + +xml_in_files = plugin.xml.in + +xml_DATA = $(xml_in_files:.xml.in=.xml) +xmldir = $(gcu_loader_cdxdir) +@INTLTOOL_XML_RULE@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/Makefile.in gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -0,0 +1,666 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/loaders/cdx +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(gcu_loader_cdxdir)" \ + "$(DESTDIR)$(xmldir)" +LTLIBRARIES = $(gcu_loader_cdx_LTLIBRARIES) +cdx_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +am_cdx_la_OBJECTS = cdx.lo +cdx_la_OBJECTS = $(am_cdx_la_OBJECTS) +cdx_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(cdx_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(cdx_la_SOURCES) +DIST_SOURCES = $(cdx_la_SOURCES) +DATA = $(xml_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(xml_in_files) +CLEANFILES = $(xml_DATA) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +gcu_loader_cdxdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/cdx +gcu_loader_cdx_LTLIBRARIES = cdx.la +cdx_la_LDFLAGS = -module -avoid-version -no-undefined +cdx_la_LIBADD = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la + +cdx_la_SOURCES = \ + cdx.cc + +xml_in_files = plugin.xml.in +xml_DATA = $(xml_in_files:.xml.in=.xml) +xmldir = $(gcu_loader_cdxdir) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/loaders/cdx/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/loaders/cdx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-gcu_loader_cdxLTLIBRARIES: $(gcu_loader_cdx_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(gcu_loader_cdxdir)" || $(MKDIR_P) "$(DESTDIR)$(gcu_loader_cdxdir)" + @list='$(gcu_loader_cdx_LTLIBRARIES)'; test -n "$(gcu_loader_cdxdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(gcu_loader_cdxdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(gcu_loader_cdxdir)"; \ + } + +uninstall-gcu_loader_cdxLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(gcu_loader_cdx_LTLIBRARIES)'; test -n "$(gcu_loader_cdxdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gcu_loader_cdxdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gcu_loader_cdxdir)/$$f"; \ + done + +clean-gcu_loader_cdxLTLIBRARIES: + -test -z "$(gcu_loader_cdx_LTLIBRARIES)" || rm -f $(gcu_loader_cdx_LTLIBRARIES) + @list='$(gcu_loader_cdx_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +cdx.la: $(cdx_la_OBJECTS) $(cdx_la_DEPENDENCIES) + $(cdx_la_LINK) -rpath $(gcu_loader_cdxdir) $(cdx_la_OBJECTS) $(cdx_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdx.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-xmlDATA: $(xml_DATA) + @$(NORMAL_INSTALL) + test -z "$(xmldir)" || $(MKDIR_P) "$(DESTDIR)$(xmldir)" + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(xmldir)" || exit $$?; \ + done + +uninstall-xmlDATA: + @$(NORMAL_UNINSTALL) + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(xmldir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(xmldir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(gcu_loader_cdxdir)" "$(DESTDIR)$(xmldir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-gcu_loader_cdxLTLIBRARIES clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-gcu_loader_cdxLTLIBRARIES install-xmlDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-gcu_loader_cdxLTLIBRARIES uninstall-xmlDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-gcu_loader_cdxLTLIBRARIES clean-generic clean-libtool \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-gcu_loader_cdxLTLIBRARIES install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-xmlDATA installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-gcu_loader_cdxLTLIBRARIES \ + uninstall-xmlDATA + +@INTLTOOL_XML_RULE@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/plugin.xml.in gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/plugin.xml.in --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdx/plugin.xml.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdx/plugin.xml.in 2009-11-14 11:30:33.000000000 +0100 @@ -0,0 +1,18 @@ + + + + <_name>Loader : cdx + <_description>Chemdraw cdx files loader. + + + + + + + + + <_description>Chemdraw cdx files loader + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/cdxml.cc gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/cdxml.cc --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/cdxml.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/cdxml.cc 2009-11-14 11:30:33.000000000 +0100 @@ -0,0 +1,804 @@ +// -*- C++ -*- + +/* + * CDXML files loader plugin + * cdxml.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace std; +using namespace gcu; + +static map KnownProps; + +class CDXMLLoader: public gcu::Loader +{ +public: + CDXMLLoader (); + virtual ~CDXMLLoader (); + + bool Read (Document *doc, GsfInput *in, char const *mime_type, IOContext *io); + bool Write (Document *doc, GsfOutput *out, char const *mime_type, IOContext *io); +}; + +CDXMLLoader::CDXMLLoader () +{ + AddMimeType ("chemical/x-cdxml"); + KnownProps["BondLength"] = GCU_PROP_THEME_BOND_LENGTH; + KnownProps["Comment"] = GCU_PROP_DOC_COMMENT; + KnownProps["CreationDate"] = GCU_PROP_DOC_CREATION_TIME; + KnownProps["CreationUserName"] = GCU_PROP_DOC_CREATOR; + KnownProps["ModificationDate"] = GCU_PROP_DOC_MODIFICATION_TIME; + KnownProps["Name"] = GCU_PROP_DOC_TITLE; + KnownProps["p"] = GCU_PROP_POS2D; + KnownProps["Element"] = GCU_PROP_ATOM_Z; + KnownProps["Charge"] = GCU_PROP_ATOM_CHARGE; + KnownProps["id"] = GCU_PROP_ID; + KnownProps["B"] = GCU_PROP_BOND_BEGIN; + KnownProps["DISPLAY"] = GCU_PROP_BOND_TYPE; + KnownProps["E"] = GCU_PROP_BOND_END; + KnownProps["Order"] = GCU_PROP_BOND_ORDER; + KnownProps["LabelJustification"] =GCU_PROP_TEXT_JUSTIFICATION; + KnownProps["Justification"] =GCU_PROP_TEXT_JUSTIFICATION; + KnownProps["LabelAlignment"] = GCU_PROP_TEXT_ALIGNMENT; +} + +CDXMLLoader::~CDXMLLoader () +{ + RemoveMimeType ("chemical/x-cdxml"); +} + +typedef struct { + Object *obj; + unsigned property; + string value; +} CDXMLProps; + +typedef struct { + unsigned index; + string encoding; + string name; +} CDXMLFont; + +typedef struct { + Document *doc; + IOContext *context; + stack cur; + list failed; + map fonts; + vector colors; + string markup; + unsigned attributes; + unsigned font; + unsigned color; + string size; +} CDXMLReadState; + +static void +cdxml_simple_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + state->cur.top ()->Lock (false); + state->cur.top ()->OnLoaded (); + state->cur.pop (); +} + +static void +cdxml_doc (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + map::iterator it; + while (*attrs) { + if ((it = KnownProps.find ((char const *) *attrs++)) != KnownProps.end ()) { + state->doc->SetProperty ((*it).second, (char const *) *attrs);} + attrs++; + } + state->cur.push (state->doc); +} + +static void +cdxml_fragment_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + Object *obj = Object::CreateObject ("molecule", state->cur.top ()); + state->cur.push (obj); +} + +static void +cdxml_fragment_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + static_cast (state->cur.top ())->UpdateCycles (); + state->cur.top ()->Lock (false); + state->cur.top ()->OnLoaded (); + state->cur.pop (); +} + +static mapBondTypes; +static void +cdxml_bond_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + Object *obj = Object::CreateObject ("bond", state->cur.top ()); + obj->SetProperty (GCU_PROP_BOND_ORDER, "1"); + map::iterator it; + while (*attrs) { + if ((it = KnownProps.find ((char const *) *attrs++)) != KnownProps.end ()) { + if ((*it).second == GCU_PROP_BOND_TYPE) { + if (BondTypes.empty ()) { + BondTypes["Solid"] = 0; + BondTypes["Dash"] = 1; + BondTypes["Hash"] = 2; + BondTypes["WedgedHashBegin"] = 3; + BondTypes["WedgedHashEnd"] = 4; + BondTypes["Bold"] = 5; + BondTypes["WedgeBegin"] = 6; + BondTypes["WedgeEnd"] = 7; + BondTypes["Wavy"] = 8; + BondTypes["HollowWedgeBegin"] = 9; + BondTypes["HollowWedgeEnd"] = 10; + BondTypes["WavyWedgeBegin"] = 11; + BondTypes["WavyWedgeEnd"] = 12; + BondTypes["Dot"] = 13; + BondTypes["DashDot"] = 14; + } + switch (BondTypes[(char const *) *attrs]) { + case 1: + case 2: + case 3: + obj->SetProperty (GCU_PROP_BOND_TYPE, "hash"); + break; + case 4: + obj->SetProperty (GCU_PROP_BOND_TYPE, "hash-invert"); + break; + case 5: + obj->SetProperty (GCU_PROP_BOND_TYPE, "large"); + break; + case 6: + obj->SetProperty (GCU_PROP_BOND_TYPE, "wedge"); + break; + case 7: + obj->SetProperty (GCU_PROP_BOND_TYPE, "wedge-invert"); + break; + case 8: + obj->SetProperty (GCU_PROP_BOND_TYPE, "squiggle"); + break; + default: + obj->SetProperty (GCU_PROP_BOND_TYPE, "normal"); + } + } else if ((*it).second == GCU_PROP_BOND_ORDER) { + unsigned order = atoi ((char const *) *attrs); + switch (order) { + case 2: + obj->SetProperty (GCU_PROP_BOND_ORDER, "2"); + break; + case 4: + obj->SetProperty (GCU_PROP_BOND_ORDER, "3"); + break; + default: + obj->SetProperty (GCU_PROP_BOND_ORDER, "1"); + break; + } + } else if (!obj->SetProperty ((*it).second, (char const *) *attrs)) { + CDXMLProps p; + p.obj = obj; + p.property = (*it).second; + p.value = (char const *) *attrs; + state->failed.push_back (p); + } + } + attrs++; + } + state->cur.push (obj); +} + +static void +cdxml_text_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + Object *obj = Object::CreateObject ("text", state->cur.top ()); + state->cur.push (obj); + char *lowered; + map::iterator it; + while (*attrs) + if ((it = KnownProps.find ((char const *) *attrs++)) != KnownProps.end ()) { + lowered = g_ascii_strdown ((char const *) *attrs++, -1); + obj->SetProperty ((*it).second, lowered); + g_free (lowered); + } + state->markup = ""; +} + +static void +cdxml_text_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + state->markup += ""; + state->cur.top ()->SetProperty (GCU_PROP_TEXT_MARKUP, state->markup.c_str ()); + state->markup.clear (); + state->cur.pop (); +} + +static void +cdxml_string_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + state->attributes = 0; + while (*attrs) { + if (!strcmp ((char const *) *attrs, "font")) { + attrs++; + state->font = atoi ((char const *) *attrs); + state->markup += "markup += state->fonts[state->font].name; + state->markup += " "; + } else if (!strcmp ((char const *) *attrs, "face")) { + attrs++; + state->attributes |= atoi ((char const *) *attrs); + } else if (!strcmp ((char const *) *attrs, "size")) { + attrs++; + state->size = (char const *) *attrs; + } else if (!strcmp ((char const *) *attrs, "color")) { + attrs++; + state->attributes |= 0x100; + state->color = atoi ((char const *) *attrs); + } else + attrs ++; + attrs++; + } + state->markup += string (" ") + state->size + "\">"; + if (state->attributes & 0x100) + state->markup += string ("colors[state->color] + ">"; + if (state->attributes & 1) + state->markup += ""; + if (state->attributes & 2) + state->markup += ""; + if (state->attributes & 4) + state->markup += ""; + if ((state->attributes & 0x60) != 0x60) { + if (state->attributes & 0x20) + state->markup += ""; + else if (state->attributes & 0x40) + state->markup += ""; + } + + // TODO: parse attributes +} + +static void +cdxml_string_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + bool opened = true; + //TODO: add xin->content->str + if ((state->attributes & 0x60) == 0x60) { + // for now put all numbers as subscripts + // FIXME: fix this kludgy code + int cur = 0, size = strlen (xin->content->str); + char *new_size = g_strdup_printf ("%g", strtod (state->size.c_str (), NULL) / 1.5); + char *height = g_strdup_printf ("%g", strtod (state->size.c_str (), NULL) / 3.); + while (cur < size) { + while (cur < size && (xin->content->str[cur] < '0' || xin->content->str[cur] > '9')) + state->markup += xin->content->str[cur++]; + if (cur < size) { + if (state->attributes & 4) + state->markup += ""; + if (state->attributes & 2) + state->markup += ""; + if (state->attributes & 1) + state->markup += ""; + if (state->attributes & 0x100) + state->markup += ""; + state->markup += string ("fonts[state->font].name + " " + new_size + "\">"; + if (state->attributes & 0x100) + state->markup += string ("colors[state->color] + ">"; + state->markup += string (""; + while (xin->content->str[cur] >= '0' && xin->content->str[cur] <= '9') + state->markup += xin->content->str[cur++]; + state->markup += ""; + if (state->attributes & 0x100) + state->markup += ""; + state->markup += string (""); + if (cur < size) { + state->markup += string ("fonts[state->font].name + " " + state->size + "\">"; + if (state->attributes & 0x100) + state->markup += string ("colors[state->color] + ">"; + if (state->attributes & 1) + state->markup += ""; + if (state->attributes & 2) + state->markup += ""; + if (state->attributes & 4) + state->markup += ""; + } else + opened = false; + } + } + g_free (new_size); + g_free (height); + } else { + state->markup += xin->content->str; + if (state->attributes & 0x20) + state->markup += ""; + else if (state->attributes & 0x40) + state->markup += ""; + } + if (opened) { + if (state->attributes & 4) + state->markup += ""; + if (state->attributes & 2) + state->markup += ""; + if (state->attributes & 1) + state->markup += ""; + if (state->attributes & 0x100) + state->markup += ""; + state->markup += ""; + } + state->attributes = 0; +} + +static void +fragment_done (GsfXMLIn *xin, CDXMLReadState *state) +{ + Object *atom = state->cur.top (), *child; + state->cur.pop (); + map ::iterator i; + Molecule *mol = NULL, *mol1 = NULL; + string buf; + //TODO: retreive text and molecule and compare + while ((child = atom->GetFirstChild (i))) { + child->SetParent (NULL); + if (child->GetType () == MoleculeType) + mol = dynamic_cast (child); + else { + buf = child->GetProperty (GCU_PROP_TEXT_TEXT); + delete child; + } + } + if (mol) { + if (buf.length () > 0) { + try { + Formula form (buf, GCU_FORMULA_PARSE_RESIDUE); + mol1 = Molecule::MoleculeFromFormula (state->doc, form); + bool have_pseudo = false; + Object *obj = mol->GetFirstChild (i); + gcu::Atom *a = NULL; + while (obj) { + a = dynamic_cast (obj); + if (a && ! a->GetZ ()) { + have_pseudo = true; + break; + } + obj = mol->GetNextChild (i); + } + if (!mol1 || !(*mol == *mol1)) { + if (have_pseudo) { + // try adding a new residue + // first examine the first atom + map ::iterator i; + gcu::Bond *b = a->GetFirstBond (i); + int residue_offset = 0; + if (!b) + goto fragment_error; + gcu::Atom *a2 = b->GetAtom (a); + if (!a2) + goto fragment_error; + list const &elts = form.GetElements (); + list::const_iterator j = elts.begin (); + FormulaAtom *fatom = dynamic_cast (*j); + int valence; + if (!fatom || fatom->elt != a2->GetZ ()) + goto fragment_add; + valence = Element::GetElement (fatom->elt)->GetDefaultValence (); + switch (valence) { + case 2: { + /* remove the first atom and replace it by a pseudo-atom, then add the residue + this helps with things begining with an oxygen or a sulfur, but might be + not enough n other cases */ + double x, y; + a2->GetCoords (&x, &y); + a->SetCoords (x, y); + a->RemoveBond (b); + a2->RemoveBond (b); + mol->Remove (b); + delete b; + if (a2->GetBondsNumber () > 1) + goto fragment_error; + b = a2->GetFirstBond (i); + if (b->GetOrder () != 1) + goto fragment_error; + b->ReplaceAtom (a2, a); + a->AddBond (b); + mol->Remove (a2); + delete a2; + // now remove the atom from the new residue symbol + residue_offset += fatom->end; + break; + } + case 3: + // we do not support that at the moment + goto fragment_error; + break; + default: + // we do not support that at the moment + goto fragment_error; + } +fragment_add: + // Try create a new document, using the symbol as name + // reparent the molecule to avoid a crash + state->doc->AddChild (mol); + state->doc->CreateResidue (buf.c_str () + residue_offset, buf.c_str () + residue_offset, mol); + mol = NULL; + goto fragment_success; + } +fragment_error: + g_warning (_("failed for %s\n"),buf.c_str ()); + } + } + catch (parse_error &error) { + int start, length; + puts (error.what (start, length)); + } +fragment_success: + string pos = atom->GetProperty (GCU_PROP_POS2D); + string id = atom->GetId (); + mol = reinterpret_cast (state->cur.top ()); + mol->Remove (atom); + delete atom; + atom = Object::CreateObject ("fragment", mol); + atom->SetProperty (GCU_PROP_TEXT_TEXT, buf.c_str ()); + atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_ID, id.c_str ()); + atom->SetProperty (GCU_PROP_FRAGMENT_ATOM_START, "0"); + atom->SetProperty (GCU_PROP_POS2D, pos.c_str ()); + if (mol1) { + mol1->SetParent (NULL); + delete mol1; + } + mol = NULL; + } + if (mol) + delete mol; + } +} + +static void +cdxml_node_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + static GsfXMLInNode const atom_dtd[] = { + GSF_XML_IN_NODE (ATOM, ATOM, -1, "n", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (ATOM, T, -1, "t", GSF_XML_CONTENT, cdxml_text_start, cdxml_text_end), + GSF_XML_IN_NODE (T, S, -1, "s", GSF_XML_CONTENT, cdxml_string_start, cdxml_string_end), + GSF_XML_IN_NODE (ATOM, FRAGMENT, -1, "fragment", GSF_XML_CONTENT, cdxml_fragment_start, cdxml_fragment_end), + GSF_XML_IN_NODE (FRAGMENT, NODE, -1, "n", GSF_XML_CONTENT, cdxml_node_start, cdxml_simple_end), + GSF_XML_IN_NODE (FRAGMENT, BOND, -1, "b", GSF_XML_CONTENT, cdxml_bond_start, cdxml_simple_end), + GSF_XML_IN_NODE (FRAGMENT, T1, -1, "t", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (T1, S1, -1, "s", GSF_XML_CONTENT, cdxml_string_start, cdxml_string_end), + GSF_XML_IN_NODE_END + }; + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + Object *obj = Object::CreateObject ("atom", state->cur.top ()); + obj->SetProperty (GCU_PROP_ATOM_Z, "6"); + map::iterator it; + bool fragment = false; + while (*attrs) { + if ((it = KnownProps.find ((char const *) *attrs)) != KnownProps.end ()) { + attrs++; + obj->SetProperty ((*it).second, (char const *) *attrs); + } else if (!strcmp ((char const *) *attrs++, "NodeType")) { + if (!strcmp ((char const *) *attrs, "Fragment") || + !strcmp ((char const *) *attrs, "Nickname") || + !strcmp ((char const *) *attrs, "Unspecified") || + !strcmp ((char const *) *attrs, "GenericNickname")) + fragment = true; + else if (!strcmp ((char const *) *attrs, "ExternalConnectionPoint")) { + // convert the atom to a pseudo atom. + string pos = obj->GetProperty (GCU_PROP_POS2D); + string id = obj->GetProperty (GCU_PROP_ID); + Molecule *mol = dynamic_cast (state->cur.top ()); + if (mol) + mol->Remove (obj); + delete obj; + obj = Object::CreateObject ("pseudo-atom", state->cur.top ()); + if (id.length ()) + obj->SetProperty (GCU_PROP_ID, id.c_str ()); + obj->SetProperty (GCU_PROP_POS2D, pos.c_str ()); + } + attrs++; + } + attrs++; + } + state->cur.push (obj); + if (fragment) { + static GsfXMLInDoc *doc = NULL; + if (NULL == doc) + doc = gsf_xml_in_doc_new (atom_dtd, NULL); + state->cur.push (obj); // push it twice in that case + gsf_xml_in_push_state (xin, doc, state, (GsfXMLInExtDtor) fragment_done, attrs); + } +} + +static void +cdxml_font_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + CDXMLFont font; + font.index = 0; + while (*attrs) { + if (!strcmp ((char const *) *attrs, "id")) + font.index = atoi ((char const *) *(attrs + 1)); + else if (!strcmp ((char const *) *attrs, "charset")) + font.encoding = (char const *) *(attrs + 1); + else if (!strcmp ((char const *) *attrs, "name")) + font.name = (char const *) *(attrs + 1); + attrs += 2; + } + state->fonts[font.index] = font; +} + +static void +cdxml_color (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + string red, green, blue; + while (*attrs) { + if (!strcmp ((char const *) *attrs, "r")) + red = (char const *) attrs[1]; + else if (!strcmp ((char const *) *attrs, "g")) + green = (char const *) attrs[1]; + else if (!strcmp ((char const *) *attrs, "b")) + blue = (char const *) attrs[1]; + attrs += 2; + } + state->colors.push_back (string ("red=\"") + red + "\" green=\"" + green + "\" blue=\"" + blue + "\""); +} + +static void +cdxml_group_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + Object *obj = Object::CreateObject ("group", state->cur.top ()); + obj->Lock (); + state->cur.push (obj); +} + +static void +cdxml_graphic_start (GsfXMLIn *xin, xmlChar const **attrs) +{ + CDXMLReadState *state = (CDXMLReadState *) xin->user_state; + guint32 Id; + guint16 type = 0xffff, arrow_type = 0xffff; + double x0, y0, x1, y1; + while (*attrs) { + if (!strcmp ((char const *) *attrs, "id")) + Id = atoi ((char const *) attrs[1]); + else if (!strcmp ((char const *) *attrs, "BoundingBox")) + sscanf ((char const *) attrs[1], "%lg %lg %lg %lg", &x1, &y1, &x0, &y0); + else if (!strcmp ((char const *) *attrs, "GraphicType")) { + if (!strcmp ((char const *) attrs[1], "Line")) + type = 1; + } else if (!strcmp ((char const *) *attrs, "ArrowType")) { + if (!strcmp ((char const *) attrs[1], "FullHead") || !strcmp ((char const *) attrs[1], "HalfHead")) + arrow_type = 2; + else if (!strcmp ((char const *) attrs[1], "Resonance")) + arrow_type = 4; + else if (!strcmp ((char const *) attrs[1], "Equilibrium")) + arrow_type = 8; + else if (!strcmp ((char const *) attrs[1], "Hollow")) + arrow_type = 16; + else if (!strcmp ((char const *) attrs[1], "RetroSynthetic")) + arrow_type = 32; + } + attrs+=2; + } + if (type == 1) { + char *buf = NULL; + Object *obj = NULL; + switch (arrow_type) { + case 1: + case 2: + obj = Object::CreateObject ("reaction-arrow", state->cur.top ()); + buf = g_strdup_printf ("ra%d", Id); + break; + case 4: + obj = Object::CreateObject ("mesomery-arrow", state->cur.top ()); + buf = g_strdup_printf ("ma%d", Id); + break; + case 8: + obj = Object::CreateObject ("reaction-arrow", state->cur.top ()); + buf = g_strdup_printf ("ra%d", Id); + obj->SetProperty (GCU_PROP_REACTION_ARROW_TYPE, "double"); + break; + case 32: + obj = Object::CreateObject ("retrosynthesis-arrow", state->cur.top ()); + buf = g_strdup_printf ("rsa%d", Id); + break; + default: + break; + } + if (obj) { + obj->SetId (buf); + g_free (buf); + buf = g_strdup_printf ("%g %g %g %g", x0, y0, x1, y1); + obj->SetProperty (GCU_PROP_ARROW_COORDS, buf); + g_free (buf); + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +// Reading code +static GsfXMLInNode const cdxml_dtd[] = { +GSF_XML_IN_NODE (CDXML, CDXML, -1, "CDXML", GSF_XML_CONTENT, &cdxml_doc, NULL), + GSF_XML_IN_NODE (CDXML, COLORTABLE, -1, "colortable", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (COLORTABLE, COLOR, -1, "color", GSF_XML_CONTENT, &cdxml_color, NULL), + GSF_XML_IN_NODE (CDXML, FONTTABLE, -1, "fonttable", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (FONTTABLE, FONT, -1, "font", GSF_XML_CONTENT, cdxml_font_start, NULL), + GSF_XML_IN_NODE (CDXML, PAGE, -1, "page", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, T, -1, "t", GSF_XML_NO_CONTENT, cdxml_text_start, cdxml_simple_end), + GSF_XML_IN_NODE (T, S, -1, "s", GSF_XML_CONTENT, cdxml_string_start, cdxml_string_end), + GSF_XML_IN_NODE (PAGE, FRAGMENT, -1, "fragment", GSF_XML_CONTENT, &cdxml_fragment_start, &cdxml_fragment_end), + GSF_XML_IN_NODE (FRAGMENT, NODE, -1, "n", GSF_XML_CONTENT, cdxml_node_start, cdxml_simple_end), + GSF_XML_IN_NODE (FRAGMENT, BOND, -1, "b", GSF_XML_CONTENT, cdxml_bond_start, cdxml_simple_end), + GSF_XML_IN_NODE (FRAGMENT, T1, -1, "t", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, GROUP, -1, "group", GSF_XML_CONTENT, cdxml_group_start, cdxml_simple_end), + GSF_XML_IN_NODE (GROUP, FRAGMENT1, -1, "fragment", GSF_XML_CONTENT, cdxml_fragment_start, cdxml_simple_end), + GSF_XML_IN_NODE (FRAGMENT1, NODE1, -1, "n", GSF_XML_CONTENT, cdxml_node_start, cdxml_simple_end), + GSF_XML_IN_NODE (FRAGMENT1, BOND1, -1, "b", GSF_XML_CONTENT, cdxml_bond_start, cdxml_simple_end), + GSF_XML_IN_NODE (FRAGMENT1, T11, -1, "t", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, GRAPHIC, -1, "graphic", GSF_XML_CONTENT, cdxml_graphic_start, NULL), + GSF_XML_IN_NODE (PAGE, ALTGROUP, -1, "altgroup", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, CURVE, -1, "curve", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, STEP, -1, "step", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, SCHEME, -1, "scheme", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (SCHEME, REACTIONSTEP, -1, "step", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, SPECTRUM, -1, "spectrum", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, EMBEDDEDOBJECT, -1, "embeddedobject", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, SEQUENCE, -1, "sequence", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, CROSSREFERENCE, -1, "crossreference", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, SPLITTER, -1, "splitter", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, TABLE, -1, "table", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, BRACKETEDGROUP, -1, "bracketedgroup", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, BORDER, -1, "border", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, GEOMETRY, -1, "geometry", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, CONSTRAINT, -1, "constraint", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, TLCPLATE, -1, "tlcplate", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, CHEMICALPROPERTY, -1, "chemicalproperty", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, ARROW, -1, "arrow", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, BIOSHAPE, -1, "bioshape", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, STOICHIOMETRY, -1, "stoichiometrygrid", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, PLASMIDMAP, -1, "plasmidmap", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, OBJECTTAG, -1, "objecttag", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, ANNOTATION, -1, "annotation", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (PAGE, RLOGIC, -1, "rlogic", GSF_XML_CONTENT, NULL, NULL), + GSF_XML_IN_NODE (CDXML, TEMPLATEGRID, -1, "templategrid", GSF_XML_CONTENT, NULL, NULL), +GSF_XML_IN_NODE_END +}; + +bool CDXMLLoader::Read (Document *doc, GsfInput *in, char const *mime_type, IOContext *io) +{ + CDXMLReadState state; + + state.doc = doc; + state.context = io; + bool success = false; + state.colors.push_back ("red=\"1\" green=\"1\" blue=\"1\""); // white + state.colors.push_back ("red=\"0\" green=\"0\" blue=\"0\""); // black + state.font = 0; + state.color = 0; + + if (NULL != in) { + GsfXMLInDoc *xml = gsf_xml_in_doc_new (cdxml_dtd, NULL); + success = gsf_xml_in_doc_parse (xml, in, &state); + + if (!success) + gnm_io_warning (state.context, + _("'%s' is corrupt!"), + gsf_input_name (in)); + else if (!state.failed.empty ()) { + CDXMLProps p; + Object *parent = NULL; + while (!state.failed.empty ()) { + p = state.failed.front (); + if (parent != p.obj->GetParent ()) { + if (parent) + parent->OnLoaded (); + parent = p.obj->GetParent (); + } + if (!p.obj->SetProperty (p.property, p.value.c_str ())) { + success = false; + gnm_io_warning (state.context, + _("'%s' is corrupt!"), + gsf_input_name (in)); + } + state.failed.pop_front (); + } + if (parent) + parent->OnLoaded (); + } + gsf_xml_in_doc_free (xml); + } + return success; +} + +//////////////////////////////////////////////////////////////////////////////// +// Writing code + +bool CDXMLLoader::Write (Document *doc, GsfOutput *out, char const *mime_type, IOContext *io) +{ + map fonts; + + if (NULL != out) { + GsfXMLOut *xml = gsf_xml_out_new (out); + gsf_xml_out_set_doc_type (xml, ""); + gsf_xml_out_start_element (xml, "CDXML"); + gsf_xml_out_end_element (xml); + g_object_unref (xml); + return true; + } + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +// Initialization + +static CDXMLLoader loader; + +extern "C" { + +extern GOPluginModuleDepend const go_plugin_depends [] = { + { "goffice", GOFFICE_API_VERSION } +}; +extern GOPluginModuleHeader const go_plugin_header = + { GOFFICE_MODULE_PLUGIN_MAGIC_NUMBER, G_N_ELEMENTS (go_plugin_depends) }; + +G_MODULE_EXPORT void +go_plugin_init (GOPlugin *plugin, GOCmdContext *cc) +{ + bindtextdomain (GETTEXT_PACKAGE, DATADIR"/locale"); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); +} + +G_MODULE_EXPORT void +go_plugin_shutdown (GOPlugin *plugin, GOCmdContext *cc) +{ +} + +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/Makefile.am gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/Makefile.am 2009-11-14 11:30:33.000000000 +0100 @@ -0,0 +1,36 @@ +EXTRA_DIST = $(xml_in_files) + +CLEANFILES = $(xml_DATA) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(GCU_CFLAGS) +endif +DEFS += -DDATADIR=\"$(datadir)\" + +gcu_loader_cdxmldir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/cdxml +gcu_loader_cdxml_LTLIBRARIES = cdxml.la + +cdxml_la_LDFLAGS = -module -avoid-version -no-undefined + +cdxml_la_LIBADD = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la + +cdxml_la_SOURCES = \ + cdxml.cc + +xml_in_files = plugin.xml.in + +xml_DATA = $(xml_in_files:.xml.in=.xml) +xmldir = $(gcu_loader_cdxmldir) +@INTLTOOL_XML_RULE@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/Makefile.in gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -0,0 +1,663 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/loaders/cdxml +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(gcu_loader_cdxmldir)" \ + "$(DESTDIR)$(xmldir)" +LTLIBRARIES = $(gcu_loader_cdxml_LTLIBRARIES) +cdxml_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +am_cdxml_la_OBJECTS = cdxml.lo +cdxml_la_OBJECTS = $(am_cdxml_la_OBJECTS) +cdxml_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(cdxml_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(cdxml_la_SOURCES) +DIST_SOURCES = $(cdxml_la_SOURCES) +DATA = $(xml_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(xml_in_files) +CLEANFILES = $(xml_DATA) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +gcu_loader_cdxmldir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/cdxml +gcu_loader_cdxml_LTLIBRARIES = cdxml.la +cdxml_la_LDFLAGS = -module -avoid-version -no-undefined +cdxml_la_LIBADD = \ + $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la + +cdxml_la_SOURCES = \ + cdxml.cc + +xml_in_files = plugin.xml.in +xml_DATA = $(xml_in_files:.xml.in=.xml) +xmldir = $(gcu_loader_cdxmldir) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/loaders/cdxml/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/loaders/cdxml/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-gcu_loader_cdxmlLTLIBRARIES: $(gcu_loader_cdxml_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(gcu_loader_cdxmldir)" || $(MKDIR_P) "$(DESTDIR)$(gcu_loader_cdxmldir)" + @list='$(gcu_loader_cdxml_LTLIBRARIES)'; test -n "$(gcu_loader_cdxmldir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(gcu_loader_cdxmldir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(gcu_loader_cdxmldir)"; \ + } + +uninstall-gcu_loader_cdxmlLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(gcu_loader_cdxml_LTLIBRARIES)'; test -n "$(gcu_loader_cdxmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gcu_loader_cdxmldir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gcu_loader_cdxmldir)/$$f"; \ + done + +clean-gcu_loader_cdxmlLTLIBRARIES: + -test -z "$(gcu_loader_cdxml_LTLIBRARIES)" || rm -f $(gcu_loader_cdxml_LTLIBRARIES) + @list='$(gcu_loader_cdxml_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +cdxml.la: $(cdxml_la_OBJECTS) $(cdxml_la_DEPENDENCIES) + $(cdxml_la_LINK) -rpath $(gcu_loader_cdxmldir) $(cdxml_la_OBJECTS) $(cdxml_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdxml.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-xmlDATA: $(xml_DATA) + @$(NORMAL_INSTALL) + test -z "$(xmldir)" || $(MKDIR_P) "$(DESTDIR)$(xmldir)" + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(xmldir)" || exit $$?; \ + done + +uninstall-xmlDATA: + @$(NORMAL_UNINSTALL) + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(xmldir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(xmldir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(gcu_loader_cdxmldir)" "$(DESTDIR)$(xmldir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-gcu_loader_cdxmlLTLIBRARIES clean-generic \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-gcu_loader_cdxmlLTLIBRARIES install-xmlDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-gcu_loader_cdxmlLTLIBRARIES uninstall-xmlDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-gcu_loader_cdxmlLTLIBRARIES clean-generic clean-libtool \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-gcu_loader_cdxmlLTLIBRARIES \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip install-xmlDATA installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am \ + uninstall-gcu_loader_cdxmlLTLIBRARIES uninstall-xmlDATA + +@INTLTOOL_XML_RULE@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/plugin.xml.in gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/plugin.xml.in --- gnome-chemistry-utils-0.8.6/plugins/loaders/cdxml/plugin.xml.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/cdxml/plugin.xml.in 2009-11-14 11:30:33.000000000 +0100 @@ -0,0 +1,18 @@ + + + + <_name>Loader : cdxml + <_description>Chemdraw XML files loader. + + + + + + + + + <_description>Chemdraw XML files loader + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/Makefile.am gnome-chemistry-utils-0.10.9/plugins/loaders/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/loaders/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/Makefile.am 2009-11-14 11:30:33.000000000 +0100 @@ -0,0 +1,3 @@ +SUBDIRS = cdx cdxml + +MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/plugins/loaders/Makefile.in gnome-chemistry-utils-0.10.9/plugins/loaders/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/loaders/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/loaders/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -0,0 +1,651 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/loaders +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = cdx cdxml +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/loaders/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/loaders/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/Makefile.am gnome-chemistry-utils-0.10.9/plugins/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,3 @@ +SUBDIRS = loaders paint + +MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/plugins/Makefile.in gnome-chemistry-utils-0.10.9/plugins/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/Makefile.in 2009-11-14 11:46:02.000000000 +0100 @@ -0,0 +1,651 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = loaders paint +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrow1-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrow1-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrow2-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrow2-24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrowtool.cc gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrowtool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrowtool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrowtool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,531 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * arrowtool.cc + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "arrowtool.h" +#include "retrosynthesisarrow.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_GO_CONF_SYNC +# include +#else +# include +#endif +#include +#include + +static char const *ToolNames[] = { + "SimpleArrow", + "ReversibleArrow", + "ReversibleArrow", + "DoubleHeadedArrow", + "RetrosynthesisArrow" +}; + +static void on_default (GtkToggleButton *button) +{ +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (gcu::Application::GetConfDir (), "paint/plugins/arrows"); + go_conf_set_bool (node, "full-arrows-heads", gtk_toggle_button_get_active (button)); + go_conf_free_node (node); +#else + GConfClient *conf_client = gconf_client_get_default (); + gconf_client_set_bool (conf_client, "/apps/gchemutils/paint/plugins/arrows/full-arrows-heads", gtk_toggle_button_get_active (button), NULL); + g_object_unref (conf_client); +#endif +} + +gcpArrowTool::gcpArrowTool (gcp::Application* App, unsigned ArrowType): gcp::Tool (App, ToolNames[ArrowType]) +{ + points = gnome_canvas_points_new (2); + m_ArrowType = ArrowType; +} + +gcpArrowTool::~gcpArrowTool () +{ + gnome_canvas_points_free (points); +} + +bool gcpArrowTool::OnClicked () +{ + if (m_pObject) + return false; + gcp::Document *pDoc = m_pView->GetDoc (); + gcp::Theme *pTheme = pDoc->GetTheme (); + m_y1 = m_y0; + m_x1 = m_x0 + pDoc->GetArrowLength () * pTheme->GetZoomFactor (); + switch (m_ArrowType) { + case gcp::SimpleArrow: + points->coords[0] = m_x0; + points->coords[1] = m_y0; + points->coords[2] = m_x1; + points->coords[3] = m_y0; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char)ARROW_HEAD_BOTH, + NULL); + break; + case gcp::ReversibleArrow: + points->coords[0] = m_x0; + points->coords[1] = points->coords[3] = m_y0 - pTheme->GetArrowDist () / 2; + points->coords[2] = m_x1; + m_pItem = gnome_canvas_item_new (m_pGroup, gnome_canvas_group_ext_get_type (), NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char)ARROW_HEAD_LEFT, + NULL); + points->coords[2] = m_x0; + points->coords[1] = points->coords[3] = m_y0 + pTheme->GetArrowDist () / 2; + points->coords[0] = m_x0 + pDoc->GetArrowLength (); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char)ARROW_HEAD_LEFT, + NULL); + break; + case gcp::FullReversibleArrow: + points->coords[0] = m_x0; + points->coords[1] = points->coords[3] = m_y0 - pTheme->GetArrowDist () / 2; + points->coords[2] = m_x1; + m_pItem = gnome_canvas_item_new (m_pGroup, gnome_canvas_group_ext_get_type (), NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + points->coords[2] = m_x0; + points->coords[1] = points->coords[3] = m_y0 + pTheme->GetArrowDist () / 2; + points->coords[0] = m_x0 + pDoc->GetArrowLength (); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + break; + case gcpDoubleHeadedArrow: + points->coords[0] = m_x0; + points->coords[1] = m_y0; + points->coords[2] = m_x1; + points->coords[3] = m_y0; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "first_arrowhead", true, + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "first_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + break; + case gcpDoubleQueuedArrow: { + GnomeCanvasPathDef* path = gnome_canvas_path_def_new (); + gnome_canvas_path_def_moveto (path, m_x0, m_y0 - pTheme->GetArrowDist () / 2.); + gnome_canvas_path_def_lineto (path, m_x1 - pTheme->GetArrowDist () / 2., m_y0 - pTheme->GetArrowDist () / 2.); + gnome_canvas_path_def_moveto (path, m_x0, m_y0 + pTheme->GetArrowDist () / 2.); + gnome_canvas_path_def_lineto (path, m_x1 - pTheme->GetArrowDist () / 2., m_y0 + pTheme->GetArrowDist () / 2.); + gnome_canvas_path_def_moveto (path, m_x1 - pTheme->GetArrowDist () / 2. - pTheme->GetArrowHeadC (), m_y0 - pTheme->GetArrowDist () / 2. - pTheme->GetArrowHeadC ()); + gnome_canvas_path_def_lineto (path, m_x1, m_y0); + gnome_canvas_path_def_lineto (path, m_x1 - pTheme->GetArrowDist () / 2. - pTheme->GetArrowHeadC (), m_y0 + pTheme->GetArrowDist () / 2. + pTheme->GetArrowHeadC ()); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "outline_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "cap-style", GDK_CAP_BUTT, + "join-style", GDK_JOIN_MITER, + NULL); + break; + } + } + return true; +} + +void gcpArrowTool::OnDrag () +{ + double x1, y1, x2, y2; + gcp::Document *pDoc = m_pView->GetDoc (); + gcp::Theme *pTheme = pDoc->GetTheme (); + if (m_pItem) { + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gtk_object_destroy(GTK_OBJECT (GNOME_CANVAS_ITEM (m_pItem))); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + m_pItem = NULL; + } + double dAngle; + m_x -= m_x0; + m_y -= m_y0; + if (m_x == 0) { + if (m_y == 0) + return; + dAngle = (m_y < 0) ? 90. : 270.; + } else { + dAngle = atan (-m_y / m_x) * 180. / M_PI; + if (!(m_nState & GDK_CONTROL_MASK)) + dAngle = rint (dAngle / 5) * 5; + if (m_x < 0) + dAngle += 180; + } + m_dAngle = dAngle * M_PI / 180.; + double d = (m_nState & GDK_SHIFT_MASK)? sqrt (square (m_x) + square (m_y)): pDoc->GetArrowLength () * pTheme->GetZoomFactor (); + char tmp[32]; + if (dAngle < 0) + dAngle += 360; + snprintf (tmp, sizeof (tmp) - 1, _("Orientation: %g"), dAngle); + m_pApp->SetStatusText (tmp); + m_x1 = m_x0 + d * cos (m_dAngle); + m_y1 = m_y0 - d * sin (m_dAngle); + switch (m_ArrowType) { + case gcp::SimpleArrow: + points->coords[2] = m_x1; + points->coords[3] = m_y1; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + break; + case gcp::ReversibleArrow: + points->coords[0] = m_x0 - pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[1] = m_y0 - pTheme->GetArrowDist () / 2 * cos (m_dAngle); + points->coords[2] = m_x1 - pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[3] = m_y1 - pTheme->GetArrowDist () / 2 * cos (m_dAngle); + m_pItem = gnome_canvas_item_new (m_pGroup, gnome_canvas_group_ext_get_type (), NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char)ARROW_HEAD_LEFT, + NULL); + points->coords[2] = m_x0 + pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[3] = m_y0 + pTheme->GetArrowDist () / 2 * cos (m_dAngle); + points->coords[0] = m_x1 + pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[1] = m_y1 + pTheme->GetArrowDist () / 2 * cos (m_dAngle); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char)ARROW_HEAD_LEFT, + NULL); + break; + case gcp::FullReversibleArrow: + points->coords[0] = m_x0 - pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[1] = m_y0 - pTheme->GetArrowDist () / 2 * cos (m_dAngle); + points->coords[2] = m_x1 - pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[3] = m_y1 - pTheme->GetArrowDist () / 2 * cos (m_dAngle); + m_pItem = gnome_canvas_item_new (m_pGroup, gnome_canvas_group_ext_get_type (), NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + points->coords[2] = m_x0 + pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[3] = m_y0 + pTheme->GetArrowDist () / 2 * cos (m_dAngle); + points->coords[0] = m_x1 + pTheme->GetArrowDist () / 2 * sin (m_dAngle); + points->coords[1] = m_y1 + pTheme->GetArrowDist () / 2 * cos (m_dAngle); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + break; + case gcpDoubleHeadedArrow: + points->coords[2] = m_x1; + points->coords[3] = m_y1; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "first_arrowhead", true, + "last_arrowhead", true, + "arrow_shape_a", pTheme->GetArrowHeadA (), + "arrow_shape_b", pTheme->GetArrowHeadB (), + "arrow_shape_c", pTheme->GetArrowHeadC (), + "first_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + "last_arrowhead_style", (unsigned char) ARROW_HEAD_BOTH, + NULL); + break; + case gcpDoubleQueuedArrow: { + double x1, y1; + x1 = pTheme->GetArrowDist () / 2 * sin (m_dAngle); + y1 = pTheme->GetArrowDist () / 2 * cos (m_dAngle); + GnomeCanvasPathDef* path = gnome_canvas_path_def_new (); + gnome_canvas_path_def_moveto (path, m_x0 - x1, m_y0 - y1); + gnome_canvas_path_def_lineto (path, m_x1 - x1 - y1, m_y1 - y1 + x1); + gnome_canvas_path_def_moveto (path, m_x0 + x1, m_y0 + y1); + gnome_canvas_path_def_lineto (path, m_x1 + x1 - y1, m_y1 + y1 + x1); + x1 += pTheme->GetArrowHeadC () * sin (m_dAngle); + y1 += pTheme->GetArrowHeadC () * cos (m_dAngle); + gnome_canvas_path_def_moveto (path, m_x1 - x1 - y1, m_y1 - y1 + x1); + gnome_canvas_path_def_lineto (path, m_x1, m_y1); + gnome_canvas_path_def_lineto (path, m_x1 + x1 - y1, m_y1 + y1 + x1); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "outline_color", gcp::AddColor, + "width_units", pTheme->GetArrowWidth (), + "cap-style", GDK_CAP_BUTT, + "join-style", GDK_JOIN_MITER, + NULL); + break; + } + } +} + +void gcpArrowTool::OnRelease () +{ + double x1, y1, x2, y2; + if (m_pItem) { + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gtk_object_destroy (GTK_OBJECT (GNOME_CANVAS_ITEM (m_pItem))); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + m_pItem = NULL; + } + else return; + m_pApp->ClearStatus (); + gcp::Document* pDoc = m_pView->GetDoc (); + gcp::Arrow* a; + switch (m_ArrowType) + { + case gcpDoubleHeadedArrow: { + a = new gcp::MesomeryArrow (NULL); + a->SetCoords (m_x0 / m_dZoomFactor, m_y0 / m_dZoomFactor, m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + pDoc->AddObject (a); + } + break; + case gcpDoubleQueuedArrow: { + a = new gcpRetrosynthesisArrow (NULL); + a->SetCoords (m_x0 / m_dZoomFactor, m_y0 / m_dZoomFactor, m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + pDoc->AddObject (a); + } + break; + default: { + a = new gcp::ReactionArrow (NULL, m_ArrowType); + a->SetCoords (m_x0 / m_dZoomFactor, m_y0 / m_dZoomFactor, m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + pDoc->AddObject (a); + } + } + pDoc->FinishOperation (); +} + +static void on_full_toggled (GtkToggleButton *button, gcpArrowTool *tool) +{ + tool->SetArrowType (gtk_toggle_button_get_active (button)? gcp::FullReversibleArrow: gcp::ReversibleArrow); +} + +static void on_length_changed (GtkSpinButton *btn, gcpArrowTool *tool) +{ + tool->SetLength (gtk_spin_button_get_value (btn)); +} + +GtkWidget *gcpArrowTool::GetPropertyPage () +{ + bool show_all = m_ArrowType == gcp::ReversibleArrow || m_ArrowType == gcp::FullReversibleArrow; + GladeXML *xml = glade_xml_new (GLADEDIR"/arrowtool.glade", (show_all? "arrow-box": "length-box"), GETTEXT_PACKAGE); + if (show_all) { + GtkTable *table = GTK_TABLE (glade_xml_get_widget (xml, "heads-table")); + GnomeCanvas *canvas = GNOME_CANVAS (gnome_canvas_new_aa ()); + gcp::Theme *Theme = gcp::TheThemeManager.GetTheme ("Default"); + double width = (Theme->GetArrowLength () * Theme->GetZoomFactor () + 2 * Theme->GetArrowPadding ()), + height = Theme->GetArrowDist () + Theme->GetArrowWidth () + 2 * (Theme->GetArrowHeadB () + Theme->GetPadding ()); + GdkColor color = m_pApp->GetStyle ()->fg[0]; + gtk_widget_set_size_request (GTK_WIDGET (canvas), (int) width, (int) height); + GnomeCanvasGroup *group = gnome_canvas_root (canvas); + GnomeCanvasPoints *points = gnome_canvas_points_new (2); + gnome_canvas_set_scroll_region (canvas, 0, 0, Theme->GetArrowLength (), Theme->GetArrowDist () + Theme->GetArrowWidth () + 2 * Theme->GetArrowHeadB ()); + points->coords[0] = (width - Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + points->coords[1] = points->coords[3] = (height - Theme->GetArrowDist ()) / 2.; + points->coords[2] = (width + Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color_gdk", &color, + "width_units", Theme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a",Theme->GetArrowHeadA (), + "arrow_shape_b",Theme->GetArrowHeadB (), + "arrow_shape_c",Theme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_LEFT, + NULL); + points->coords[0] = (width + Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + points->coords[1] = points->coords[3] = (height + Theme->GetArrowDist ()) / 2.; + points->coords[2] = (width - Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color_gdk", &color, + "width_units",Theme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a",Theme->GetArrowHeadA (), + "arrow_shape_b",Theme->GetArrowHeadB (), + "arrow_shape_c",Theme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char) ARROW_HEAD_LEFT, + NULL); + gtk_widget_show (GTK_WIDGET (canvas)); + gtk_table_attach (table, GTK_WIDGET (canvas), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 10, 0); + canvas = GNOME_CANVAS (gnome_canvas_new_aa ()); + gtk_widget_set_size_request (GTK_WIDGET (canvas), (int) width, (int) height); + group = gnome_canvas_root (canvas); + gnome_canvas_set_scroll_region (canvas, 0, 0, Theme->GetArrowLength (), Theme->GetArrowDist () + Theme->GetArrowWidth () + 2 * Theme->GetArrowHeadB ()); + points->coords[0] = (width - Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + points->coords[1] = points->coords[3] = (height - Theme->GetArrowDist ()) / 2.; + points->coords[2] = (width + Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color_gdk", &color, + "width_units", Theme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a",Theme->GetArrowHeadA (), + "arrow_shape_b",Theme->GetArrowHeadB (), + "arrow_shape_c",Theme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char)ARROW_HEAD_BOTH, + NULL); + points->coords[0] = (width + Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + points->coords[1] = points->coords[3] = (height + Theme->GetArrowDist ()) / 2.; + points->coords[2] = (width - Theme->GetArrowLength () * Theme->GetZoomFactor ()) / 2.; + gnome_canvas_item_new ( + group, + gnome_canvas_line_ext_get_type (), + "points", points, + "fill_color_gdk", &color, + "width_units",Theme->GetArrowWidth (), + "last_arrowhead", true, + "arrow_shape_a",Theme->GetArrowHeadA (), + "arrow_shape_b",Theme->GetArrowHeadB (), + "arrow_shape_c",Theme->GetArrowHeadC (), + "last_arrowhead_style", (unsigned char)ARROW_HEAD_BOTH, + NULL); + gtk_widget_show (GTK_WIDGET (canvas)); + gtk_table_attach (table, GTK_WIDGET (canvas), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 10, 0); + gnome_canvas_points_free (points); + GtkWidget *b = glade_xml_get_widget (xml, "full"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (b), m_ArrowType == gcp::FullReversibleArrow); + g_signal_connect (G_OBJECT (b), "toggled", G_CALLBACK (on_full_toggled), this); + GtkWidget *w = glade_xml_get_widget (xml, "default"); + g_signal_connect_swapped (w, "clicked", G_CALLBACK (on_default), b); + } + m_LengthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "arrow-length")); + g_signal_connect (m_LengthBtn, "value-changed", G_CALLBACK (on_length_changed), this); + return glade_xml_get_widget (xml, (show_all? "arrow-box": "length-box")); +} + +void gcpArrowTool::SetLength (double length) +{ + m_pApp->GetActiveDocument ()->SetArrowLength (length); +} + +void gcpArrowTool::Activate () +{ + gtk_spin_button_set_value (m_LengthBtn, m_pApp->GetActiveDocument ()->GetArrowLength ()); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrowtool.glade gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrowtool.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrowtool.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrowtool.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,141 @@ + + + + + + + + True + 6 + + + True + + + True + 12 + + + True + 0 + 6 + Arrow len_gth: + True + + + False + + + + + True + True + 200 10 1000 1 10 0 + 2 + True + GTK_UPDATE_IF_VALID + + + False + False + 1 + + + + + False + False + + + + + False + False + + + + + True + + + False + 1 + + + + + True + 2 + 2 + 12 + 6 + + + + + + + + + True + True + H_alf heads + True + 0 + True + + + GTK_FILL + + + + + + True + True + _Full heads + True + 0 + True + half + + + 1 + 2 + GTK_FILL + + + + + + False + 2 + + + + + True + + + True + True + Set _default + True + 0 + + + False + False + 21 + + + + + False + 3 + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrowtool.h gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrowtool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/arrowtool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/arrowtool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,60 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * arrowtool.h + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ARROW_TOOL_H +#define GCHEMPAINT_ARROW_TOOL_H + +#include +#include + +enum { + gcpDoubleHeadedArrow = gcp::FullReversibleArrow + 1, + gcpDoubleQueuedArrow +}; + +class gcpArrowTool: public gcp::Tool +{ +public: + gcpArrowTool (gcp::Application* App, unsigned ArrowType = gcp::SimpleArrow); + ~gcpArrowTool (); + + bool OnClicked (); + void OnDrag (); + void OnRelease (); + void Activate (); + void SetArrowType (unsigned ArrowType) {m_ArrowType = ArrowType;} + GtkWidget *GetPropertyPage (); + char const *GetHelpTag () {return "arrow";} + void SetLength (double length); + +protected: + GnomeCanvasPoints *points; + +private: + double m_dAngle; + unsigned m_ArrowType; + GtkSpinButton *m_LengthBtn; +}; + +#endif //GCHEMPAINT_ARROW_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/arrows/curved1-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/arrows/curved1-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/arrows/curved24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/arrows/curved24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/curvedarrowtool.cc gnome-chemistry-utils-0.10.9/plugins/paint/arrows/curvedarrowtool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/curvedarrowtool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/curvedarrowtool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,49 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * curvedarrowtool.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "curvedarrowtool.h" + +using namespace std; + +gcpCurvedArrowTool::gcpCurvedArrowTool (gcp::Application *App, string Id): gcp::Tool (App, Id) +{ +} + +gcpCurvedArrowTool::~gcpCurvedArrowTool () +{ +} + +bool gcpCurvedArrowTool::OnClicked () +{ + return false; +} + +void gcpCurvedArrowTool::OnDrag () +{ +} + +void gcpCurvedArrowTool::OnRelease () +{ +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/curvedarrowtool.h gnome-chemistry-utils-0.10.9/plugins/paint/arrows/curvedarrowtool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/curvedarrowtool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/curvedarrowtool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,41 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * curvedarrowtool.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_CURVED_ARROW_TOOL_H +#define GCHEMPAINT_CURVED_ARROW_TOOL_H + +#include + +class gcpCurvedArrowTool: public gcp::Tool +{ +public: + gcpCurvedArrowTool (gcp::Application *App, std::string Id); + virtual ~gcpCurvedArrowTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); +}; + +#endif //GCHEMPAINT_CURVED_ARROW_TOOL_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/gchempaint-arrows.schemas.in gnome-chemistry-utils-0.10.9/plugins/paint/arrows/gchempaint-arrows.schemas.in --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/gchempaint-arrows.schemas.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/gchempaint-arrows.schemas.in 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,16 @@ + + + + /schemas/apps/gchemutils/paint/plugins/arrows/full-arrows-heads + /apps/gchemutils/paint/plugins/arrows/full-arrows-heads + gchemutils + bool + false + + Use full arrows heads for reversible reactions + If set to true, arrows for reversible reaction steps will + use full arrows heads by default instead of half heads. + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/arrows/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,98 @@ +EXTRA_DIST = \ + $(IMAGES) \ + $(schemas_in_files) + +BUILT_SOURCES = gcp-stock-pixbufs.h + +CLEANFILES = $(BUILT_SOURCES) $(schemas_DATA) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(arrowsdir)\" + +IMAGES = \ + arrow1-24.png \ + arrow2-24.png \ + curved1-24.png \ + curved24.png \ + mesomery24.png \ + retrosynth24.png + +VARIABLES = \ + gcp_arrow1_24 $(srcdir)/arrow1-24.png \ + gcp_arrow2_24 $(srcdir)/arrow2-24.png \ + gcp_retrosynth_24 $(srcdir)/retrosynth24.png \ + gcp_mesomery_24 $(srcdir)/mesomery24.png \ + gcp_curved_24 $(srcdir)/curved24.png \ + gcp_curved1_24 $(srcdir)/curved1-24.png + +arrowsdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +arrows_LTLIBRARIES = arrows.la + +arrows_la_LDFLAGS = -module -avoid-version +arrows_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +arrows_la_SOURCES = \ + plugin.cc \ + arrowtool.cc \ + curvedarrowtool.cc \ + retrosynthesis.cc \ + retrosynthesisarrow.cc \ + retrosynthesisstep.cc + +noinst_HEADERS = \ + plugin.h \ + arrowtool.h \ + curvedarrowtool.h \ + retrosynthesis.h \ + retrosynthesisarrow.h \ + retrosynthesisstep.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/arrows +dist_glade_DATA = arrowtool.glade + +schemas_in_files = gchempaint-arrows.schemas.in + +schemasdir = $(GCONF_SCHEMA_FILE_DIR) +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) +@INTLTOOL_SCHEMAS_RULE@ + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +install-data-local: +if GCONF_SCHEMAS_INSTALL + for p in $(schemas_DATA) ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-install-rule $$p; \ + done +endif #GCONF_SCHEMAS_INSTALL + +uninstall-local: +if GCONF_SCHEMAS_INSTALL + for schema in $(schemas_DATA) ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ + done +endif #GCONF_SCHEMAS_INSTALL diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/arrows/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/Makefile.in 2009-11-14 11:46:03.000000000 +0100 @@ -0,0 +1,754 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/arrows +DIST_COMMON = $(dist_glade_DATA) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(arrowsdir)" "$(DESTDIR)$(gladedir)" \ + "$(DESTDIR)$(schemasdir)" +LTLIBRARIES = $(arrows_LTLIBRARIES) +arrows_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_arrows_la_OBJECTS = plugin.lo arrowtool.lo curvedarrowtool.lo \ + retrosynthesis.lo retrosynthesisarrow.lo retrosynthesisstep.lo +arrows_la_OBJECTS = $(am_arrows_la_OBJECTS) +arrows_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(arrows_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(arrows_la_SOURCES) +DIST_SOURCES = $(arrows_la_SOURCES) +DATA = $(dist_glade_DATA) $(schemas_DATA) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(arrowsdir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = \ + $(IMAGES) \ + $(schemas_in_files) + +BUILT_SOURCES = gcp-stock-pixbufs.h +CLEANFILES = $(BUILT_SOURCES) $(schemas_DATA) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +IMAGES = \ + arrow1-24.png \ + arrow2-24.png \ + curved1-24.png \ + curved24.png \ + mesomery24.png \ + retrosynth24.png + +VARIABLES = \ + gcp_arrow1_24 $(srcdir)/arrow1-24.png \ + gcp_arrow2_24 $(srcdir)/arrow2-24.png \ + gcp_retrosynth_24 $(srcdir)/retrosynth24.png \ + gcp_mesomery_24 $(srcdir)/mesomery24.png \ + gcp_curved_24 $(srcdir)/curved24.png \ + gcp_curved1_24 $(srcdir)/curved1-24.png + +arrowsdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +arrows_LTLIBRARIES = arrows.la +arrows_la_LDFLAGS = -module -avoid-version +arrows_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +arrows_la_SOURCES = \ + plugin.cc \ + arrowtool.cc \ + curvedarrowtool.cc \ + retrosynthesis.cc \ + retrosynthesisarrow.cc \ + retrosynthesisstep.cc + +noinst_HEADERS = \ + plugin.h \ + arrowtool.h \ + curvedarrowtool.h \ + retrosynthesis.h \ + retrosynthesisarrow.h \ + retrosynthesisstep.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/arrows +dist_glade_DATA = arrowtool.glade +schemas_in_files = gchempaint-arrows.schemas.in +schemasdir = $(GCONF_SCHEMA_FILE_DIR) +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/arrows/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/arrows/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-arrowsLTLIBRARIES: $(arrows_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(arrowsdir)" || $(MKDIR_P) "$(DESTDIR)$(arrowsdir)" + @list='$(arrows_LTLIBRARIES)'; test -n "$(arrowsdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(arrowsdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(arrowsdir)"; \ + } + +uninstall-arrowsLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(arrows_LTLIBRARIES)'; test -n "$(arrowsdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(arrowsdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(arrowsdir)/$$f"; \ + done + +clean-arrowsLTLIBRARIES: + -test -z "$(arrows_LTLIBRARIES)" || rm -f $(arrows_LTLIBRARIES) + @list='$(arrows_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +arrows.la: $(arrows_la_OBJECTS) $(arrows_la_DEPENDENCIES) + $(arrows_la_LINK) -rpath $(arrowsdir) $(arrows_la_OBJECTS) $(arrows_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrowtool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curvedarrowtool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/retrosynthesis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/retrosynthesisarrow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/retrosynthesisstep.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_gladeDATA: $(dist_glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-dist_gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files +install-schemasDATA: $(schemas_DATA) + @$(NORMAL_INSTALL) + test -z "$(schemasdir)" || $(MKDIR_P) "$(DESTDIR)$(schemasdir)" + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemasdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(schemasdir)" || exit $$?; \ + done + +uninstall-schemasDATA: + @$(NORMAL_UNINSTALL) + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(schemasdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(schemasdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(arrowsdir)" "$(DESTDIR)$(gladedir)" "$(DESTDIR)$(schemasdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-arrowsLTLIBRARIES clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-arrowsLTLIBRARIES install-data-local \ + install-dist_gladeDATA install-schemasDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-arrowsLTLIBRARIES uninstall-dist_gladeDATA \ + uninstall-local uninstall-schemasDATA + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-arrowsLTLIBRARIES clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am \ + install-arrowsLTLIBRARIES install-data install-data-am \ + install-data-local install-dist_gladeDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-schemasDATA install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-arrowsLTLIBRARIES \ + uninstall-dist_gladeDATA uninstall-local uninstall-schemasDATA + +@INTLTOOL_SCHEMAS_RULE@ + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +install-data-local: +@GCONF_SCHEMAS_INSTALL_TRUE@ for p in $(schemas_DATA) ; do \ +@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +@GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --makefile-install-rule $$p; \ +@GCONF_SCHEMAS_INSTALL_TRUE@ done + +uninstall-local: +@GCONF_SCHEMAS_INSTALL_TRUE@ for schema in $(schemas_DATA) ; do \ +@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +@GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ +@GCONF_SCHEMAS_INSTALL_TRUE@ done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/arrows/mesomery24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/arrows/mesomery24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/arrows/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,143 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * plugin.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include "arrowtool.h" +#include "retrosynthesis.h" +#include "retrosynthesisarrow.h" +#include "retrosynthesisstep.h" +#include "gcp-stock-pixbufs.h" +#include +#ifdef HAVE_GO_CONF_SYNC +# include +#else +# include +#endif + +gcpArrowsPlugin plugin; + +static Object* CreateRetrosynthesis () +{ + return new gcpRetrosynthesis (); +} + +static Object* CreateRetrosynthesisArrow () +{ + return new gcpRetrosynthesisArrow (NULL); +} + +static Object* CreateRetrosynthesisStep () +{ + return new gcpRetrosynthesisStep (); +} + +gcpArrowsPlugin::gcpArrowsPlugin (): gcp::Plugin () +{ + RetrosynthesisType = Object::AddType ("retrosynthesis", CreateRetrosynthesis); + Object::SetCreationLabel (RetrosynthesisType, _("Create a new retrosynthesis pathway")); + RetrosynthesisArrowType = Object::AddType ("retrosynthesis-arrow", CreateRetrosynthesisArrow); + RetrosynthesisStepType = Object::AddType ("retrosynthesis-step", CreateRetrosynthesisStep); +} + +gcpArrowsPlugin::~gcpArrowsPlugin () +{ +} + +static gcp::IconDesc icon_descs[] = { + {"gcp_SimpleArrow", gcp_arrow1_24}, + {"gcp_ReversibleArrow", gcp_arrow2_24}, + {"gcp_RetrosynthesisArrow", gcp_retrosynth_24}, + {"gcp_MesomeryArrow", gcp_mesomery_24}, + {"gcp_CurvedArrow", gcp_curved_24}, + {"gcp_Curved1Arrow", gcp_curved1_24}, + {NULL, NULL}, +}; + +static GtkRadioActionEntry entries[] = { + { "SimpleArrow", "gcp_SimpleArrow", N_("Simple arrow"), NULL, + N_("Add an arrow for an irreversible reaction"), + 0 }, + { "ReversibleArrow", "gcp_ReversibleArrow", N_("Double arrow"), NULL, + N_("Add a pair of arrows for a reversible reaction"), + 0 }, + { "RetrosynthesisArrow", "gcp_RetrosynthesisArrow", N_("Retrosynthesis arrow"), NULL, + N_("Add an arrow for a retrosynthesis step"), + 0 }, + { "DoubleHeadedArrow", "gcp_MesomeryArrow", N_("Mesomery arrow"), NULL, + N_("Add a double headed arrow to represent mesomery"), + 0 }, + { "CurvedArrow", "gcp_CurvedArrow", N_("Electron pair move arrow"), NULL, + N_("Add a curved arrow to represent an electron pair move"), + 0 }, + { "Curved1Arrow", "gcp_Curved1Arrowd", N_("Single electron move arrow"), NULL, + N_("Add a curved arrow to represent an single electron move"), + 0 }, +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +//" " +//" " +" " +""; + +void gcpArrowsPlugin::Populate (gcp::Application* App) +{ +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node = go_conf_get_node (gcu::Application::GetConfDir (), "paint/plugins/arrows"); + bool FullHeads = go_conf_get_bool (node, "full-arrows-heads"); + go_conf_free_node (node); +#else + GError *error = NULL; + GConfClient *conf_client = gconf_client_get_default (); + gconf_client_add_dir (conf_client, "/apps/gchempaint/plugins/arrows", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); + bool FullHeads = gconf_client_get_bool (conf_client, "/apps/gchempaint/plugins/arrows/full-arrows-heads", &error); + if (error) { + FullHeads = false; + g_message("GConf failed: %s", error->message); + g_error_free (error); + } + gconf_client_remove_dir (conf_client, "/apps/gchempaint/plugins/arrows", NULL); + g_object_unref (conf_client); +#endif + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + App->RegisterToolbar ("ArrowsToolbar", 4); + new gcpArrowTool (App); + new gcpArrowTool (App, FullHeads? gcp::FullReversibleArrow: gcp::ReversibleArrow); + new gcpArrowTool (App, gcpDoubleHeadedArrow); + new gcpArrowTool (App, gcpDoubleQueuedArrow); + Object::AddRule ("retrosynthesis", RuleMustContain, "retrosynthesis-step"); + Object::AddRule ("retrosynthesis", RuleMustContain, "retrosynthesis-arrow"); + Object::AddRule ("retrosynthesis-step", RuleMustContain, "molecule"); + Object::AddRule ("molecule", RuleMayBeIn, "retrosynthesis-step"); + Object::AddRule ("retrosynthesis-arrow", RuleMustBeIn, "retrosynthesis"); + Object::AddRule ("retrosynthesis-step", RuleMustBeIn, "retrosynthesis"); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/arrows/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,39 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ARROWS_PLUGIN +#define GCHEMPAINT_ARROWS_PLUGIN + +#include + +class gcpArrowsPlugin: public gcp::Plugin +{ +public: + gcpArrowsPlugin (); + virtual ~gcpArrowsPlugin (); + + virtual void Populate (gcp::Application* App); +}; + +#endif //GCHEMPAINT_ARROWS_PLUGIN Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynth24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynth24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisarrow.cc gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisarrow.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisarrow.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisarrow.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,228 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * retrosynthesisarrow.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "retrosynthesisarrow.h" +#include "retrosynthesis.h" +#include "retrosynthesisstep.h" +#include +#include +#include +#include +#include +#include +#include +#include + +TypeId RetrosynthesisArrowType = NoType; + +gcpRetrosynthesisArrow::gcpRetrosynthesisArrow (gcpRetrosynthesis *rs): gcp::Arrow (RetrosynthesisArrowType) +{ + SetId ("rsa1"); + if (rs) + rs->AddChild( this); + m_Start = m_End = NULL; +} + +gcpRetrosynthesisArrow::~gcpRetrosynthesisArrow () +{ + if (IsLocked ()) + return; + if (m_Start && m_End) { + m_Start->RemoveArrow (this, m_End); + m_End->RemoveArrow (this, m_Start); + } +} + +xmlNodePtr gcpRetrosynthesisArrow::Save (xmlDocPtr xml) const +{ + xmlNodePtr parent, node; + node = xmlNewDocNode (xml, NULL, (xmlChar*) "retrosynthesis-arrow", NULL); + if (!node) return NULL; + if (!gcp::Arrow::Save (xml, node)) { + xmlFreeNode (node); + return NULL; + } + if (m_Start) + xmlNewProp (node, (xmlChar*) "start", (xmlChar*) m_Start->GetId ()); + if (m_End) + xmlNewProp (node, (xmlChar*) "end", (xmlChar*) m_End->GetId ()); + gcpRetrosynthesis* r = (gcpRetrosynthesis*) GetParentOfType (RetrosynthesisType); + if (!r) { + //save the arrow as an object + parent = xmlNewDocNode (xml, NULL, (xmlChar*)"object", NULL); + if (node && parent) + xmlAddChild (parent, node); + else { + xmlFreeNode (node); + return NULL; + } + } + else parent = node; + return parent; +} + +bool gcpRetrosynthesisArrow::Load (xmlNodePtr node) +{ + char *buf; + Object *parent; + if (gcp::Arrow::Load (node)) { + parent = GetParent (); + if (!parent) + return true; + buf = (char*) xmlGetProp (node, (xmlChar*) "start"); + if (buf) { + m_Start = reinterpret_cast (parent->GetDescendant (buf)); + xmlFree (buf); + if (!m_Start) + return false; + } + buf = (char*) xmlGetProp (node, (xmlChar*) "end"); + if (buf) { + m_End = reinterpret_cast (parent->GetDescendant (buf)); + xmlFree (buf); + if (!m_End) + return false; + m_End->AddArrow (this, m_Start, false); + } + if (m_Start) + m_Start->AddArrow (this, m_End, true); + return true; + } + return false; +} + +void gcpRetrosynthesisArrow::Add (GtkWidget* w) const +{ + gcp::WidgetData* pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] != NULL) + return; + gcp::Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + double x0, y0, x1, y1, dx, dy, dAngle; + x0 = m_x * pTheme->GetZoomFactor (); + y0 = m_y * pTheme->GetZoomFactor (); + x1 = (m_x + m_width) * pTheme->GetZoomFactor (); + y1 = (m_y + m_height) * pTheme->GetZoomFactor (); + if (m_width == 0.) { + if (m_height == 0.) + return; + dAngle = (m_height < 0.) ? M_PI / 2 : 1.5 * M_PI; + } else { + dAngle = atan(- m_height / m_width); + if (m_width < 0) + dAngle += M_PI; + } + GnomeCanvasGroup* group = GNOME_CANVAS_GROUP (gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type(), NULL)); + GnomeCanvasItem* item; + dx = pTheme->GetArrowDist () / 2 * sin (dAngle); + dy = pTheme->GetArrowDist () / 2 * cos (dAngle); + GnomeCanvasPathDef* path = gnome_canvas_path_def_new (); + gnome_canvas_path_def_moveto (path, x0 - dx, y0 - dy); + gnome_canvas_path_def_lineto (path, x1 - dx - dy, y1 - dy + dx); + gnome_canvas_path_def_moveto (path, x0 + dx, y0 + dy); + gnome_canvas_path_def_lineto (path, x1 + dx - dy, y1 + dy + dx); + dx += pTheme->GetArrowHeadC () * sin (dAngle); + dy += pTheme->GetArrowHeadC () * cos (dAngle); + gnome_canvas_path_def_moveto (path, x1 - dx - dy, y1 - dy + dx); + gnome_canvas_path_def_lineto (path, x1, y1); + gnome_canvas_path_def_lineto (path, x1 + dx - dy, y1 + dy + dx); + item = gnome_canvas_item_new ( + group, + gnome_canvas_bpath_ext_get_type (), + "bpath", path, + "outline_color", (pData->IsSelected (this))? gcp::SelectColor: gcp::Color, + "width_units", pTheme->GetArrowWidth (), + "cap-style", GDK_CAP_BUTT, + "join-style", GDK_JOIN_MITER, + NULL); + g_object_set_data (G_OBJECT (item), "object", (void *) this); + g_object_set_data( G_OBJECT (group), "arrow", item); + g_signal_connect(G_OBJECT (item), "event", G_CALLBACK (gcp::on_event), w); + pData->Items[this] = group; +} + +void gcpRetrosynthesisArrow::Update (GtkWidget* w) const +{ + gcp::WidgetData* pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + if (pData->Items[this] == NULL) + return; + gcp::Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup* group = pData->Items[this]; + double x0, y0, x1, y1, dx, dy, dAngle; + x0 = m_x * pTheme->GetZoomFactor (); + y0 = m_y * pTheme->GetZoomFactor (); + x1 = (m_x + m_width) * pTheme->GetZoomFactor (); + y1 = (m_y + m_height) * pTheme->GetZoomFactor (); + if (m_width == 0.) { + if (m_height == 0.) + return; + dAngle = (m_height < 0.) ? M_PI / 2 : 1.5 * M_PI; + } else { + dAngle = atan (- m_height / m_width); + if (m_width < 0) + dAngle += M_PI; + } + dx = pTheme->GetArrowDist () / 2 * sin (dAngle); + dy = pTheme->GetArrowDist () / 2 * cos (dAngle); + GnomeCanvasPathDef* path = gnome_canvas_path_def_new (); + gnome_canvas_path_def_moveto (path, x0 - dx, y0 - dy); + gnome_canvas_path_def_lineto (path, x1 - dx - dy, y1 - dy + dx); + gnome_canvas_path_def_moveto (path, x0 + dx, y0 + dy); + gnome_canvas_path_def_lineto (path, x1 + dx - dy, y1 + dy + dx); + dx += pTheme->GetArrowHeadC () * sin (dAngle); + dy += pTheme->GetArrowHeadC () * cos (dAngle); + gnome_canvas_path_def_moveto (path, x1 - dx - dy, y1 - dy + dx); + gnome_canvas_path_def_lineto (path, x1, y1); + gnome_canvas_path_def_lineto (path, x1 + dx - dy, y1 + dy + dx); + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "arrow")), + "bpath", path, + NULL); +} + +void gcpRetrosynthesisArrow::SetSelected (GtkWidget* w, int state) +{ + gcp::WidgetData* pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + GnomeCanvasGroup* group = pData->Items[this]; + gchar const *color; + switch (state) { + case gcp::SelStateUnselected: + color = gcp::Color; + break; + case gcp::SelStateSelected: + color = gcp::SelectColor; + break; + case gcp::SelStateUpdating: + color = gcp::AddColor; + break; + case gcp::SelStateErasing: + color = gcp::DeleteColor; + break; + default: + color = gcp::Color; + break; + } + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "arrow")), + "outline_color", color, + NULL); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisarrow.h gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisarrow.h --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisarrow.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisarrow.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,55 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * retrosynthesisarrow.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_RETROSYNTHESIS_ARROW_H +#define GCHEMPAINT_RETROSYNTHESIS_ARROW_H + +#include + +extern gcu::TypeId RetrosynthesisArrowType; + +class gcpRetrosynthesisStep; +class gcpRetrosynthesis; + +class gcpRetrosynthesisArrow: public gcp::Arrow +{ +public: + gcpRetrosynthesisArrow (gcpRetrosynthesis *rs); + virtual ~gcpRetrosynthesisArrow (); + + virtual xmlNodePtr Save (xmlDocPtr xml) const; + virtual bool Load (xmlNodePtr); + virtual void Add (GtkWidget* w) const; + virtual void Update (GtkWidget* w) const; + virtual void SetSelected (GtkWidget* w, int state); + void SetStartStep (gcpRetrosynthesisStep *Step) {m_Start = Step;} + gcpRetrosynthesisStep* GetStartStep () {return m_Start;} + void SetEndStep (gcpRetrosynthesisStep *Step) {m_End = Step;} + gcpRetrosynthesisStep* GetEndStep () {return m_End;} + +private: + gcpRetrosynthesisStep *m_Start, *m_End; +}; + +#endif // GCHEMPAINT_RETROSYNTHESIS_ARROW_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesis.cc gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesis.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesis.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesis.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,457 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * retrosynthesis.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "retrosynthesis.h" +#include "retrosynthesisarrow.h" +#include "retrosynthesisstep.h" +#include +#include +#include +#include +#include +#include +#include + +TypeId RetrosynthesisType = NoType; + +gcpRetrosynthesis::gcpRetrosynthesis (): Object (RetrosynthesisType) +{ + SetId ("rsy1"); + Target = NULL; +} + +gcpRetrosynthesis::~gcpRetrosynthesis () +{ + if (IsLocked ()) + return; + map::iterator i; + Object *pObj; + gcpRetrosynthesisArrow *arrow; + gcp::Document *pDoc = reinterpret_cast (GetDocument ()); + gcp::Operation *pOp = pDoc->GetCurrentOperation (); + while ((pObj = GetFirstChild (i))) { + if ((pObj->GetType () == RetrosynthesisArrowType)) { + arrow = reinterpret_cast (pObj); + arrow->SetStartStep (NULL); + arrow->SetEndStep (NULL); + arrow->SetParent (GetParent ()); + if (pOp) + pOp->AddObject (arrow, 1); + + } else + delete pObj; + } +} + +xmlNodePtr gcpRetrosynthesis::Save (xmlDocPtr xml) const +{ + xmlNodePtr node = Object::Save (xml); + xmlNewProp (node, (xmlChar const*) "target", (xmlChar const*) Target->GetId ()); + return node; +} + +bool gcpRetrosynthesis::Load (xmlNodePtr node) +{ + xmlChar* buf; + xmlNodePtr child; + Object* pObject; + list arrows; + + Lock (); + buf = xmlGetProp (node, (xmlChar*) "id"); + if (buf) { + SetId ((char*) buf); + xmlFree (buf); + } + child = node->children; + while (child) { + if (!strcmp ((const char*) child->name, "retrosynthesis-arrow")) + arrows.push_front (child); + else { + pObject = CreateObject ((const char*) child->name, this); + if (pObject) { + if (!pObject->Load (child)) + delete pObject; + } else { + Lock (false); + return false; + } + } + child = child->next; + } + while (!arrows.empty ()) { + child = arrows.back (); + pObject = CreateObject ("retrosynthesis-arrow", this); + if (pObject) { + if (!pObject->Load (child)) + delete pObject; + } else { + Lock (false); + return false; + } + arrows.pop_back (); + } + Lock (false); + buf = xmlGetProp (node, (xmlChar*) "target"); + if (!buf) + return false; + Target = reinterpret_cast (GetChild ((const char*) buf)); + xmlFree (buf); + if (!Target) + return false; + return true; +} + +typedef struct +{ + double x, y; + ArtDRect r; + gcpRetrosynthesisStep *step; +} ObjectData; + +bool gcpRetrosynthesis::Build (list& Children) throw (invalid_argument) +{ + gcp::Document *pDoc = reinterpret_cast (GetDocument ()); + gcp::Theme *pTheme = pDoc->GetTheme (); + gcp::WidgetData *pData= reinterpret_cast (g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data")); + list::iterator i, iend = Children.end (); + map Objects; + list Arrows; + double minright, minleft, x, y, x0, y0, x1, y1, l, d, ps; + Object *Left, *Right; + ObjectData od; + gcpRetrosynthesisArrow *arrow; + unsigned narrows = 0, nmol = 0; + TypeId Id; + for (i = Children.begin (); i != iend; i++) { + Id = (*i)->GetType (); + if (Id == MoleculeType) { + pData->GetObjectBounds (*i, &od.r); + od.x = (od.r.x0 + od.r.x1) / 2.; + od.y = (*i)->GetYAlign () * pTheme->GetZoomFactor (); + od.step = new gcpRetrosynthesisStep (this, reinterpret_cast(*i)); + nmol++; + Objects[*i] = od; + } else if (Id == RetrosynthesisArrowType) { + narrows++; + Arrows.push_back (*i); + AddChild (*i); + } else + throw invalid_argument (_("Something wrong happened, please file a bug report.")); + } + // now, for each arrow, search closiest object on both sides and verify it's a molecule + list::iterator j, jend = Arrows.end (); + map::iterator k, kend = Objects.end (); + for (j = Arrows.begin (); j != jend; j++) { + arrow = reinterpret_cast(*j); + arrow->GetCoords (&x0, &y0, &x1, &y1); + //x0 and y0 should be the center of the arrow, not the beginning, so we must transform them + x0 = (x0 + x1) / 2; + y0 = (y0 + y1) / 2; + // x1, y1 will now be the coordinates of a normalized vector: + x1 -= x0; + y1 -= y0; + x0 *= pTheme->GetZoomFactor (); + y0 *= pTheme->GetZoomFactor (); + l = sqrt (x1 * x1 + y1 * y1); + x1 /= l; + y1 /= l; + l *= pTheme->GetZoomFactor (); // half length of the arrow on the screen + // No molecule should be nearer than that + minright = minleft = DBL_MAX; + Left = Right = NULL; + for (k = Objects.begin (); k != kend; k++) { + od = (*k).second; + x = od.x - x0; + y = od.y - y0; + d = sqrt (x * x + y * y); + ps = (x * x1 + y * y1) / d; + if (ps >= -.71 && ps <= .71) + continue; + if (d < l) { + Left = (*k).first; + Right = *j; + pData->UnselectAll (); + pData->SetSelected (Left); + pData->SetSelected (Right); + throw invalid_argument (_("No space left between molecule and arrow!")); + } + if (ps < 0) { + if (d < minleft) { + Left = od.step; + minleft = d; + } + } else { + if (d < minright) { + Right = od.step; + minright = d; + } + } + } + if (!Left || !Right) { // Do not accept arrows with only one step (?) + Left = *j; + pData->UnselectAll (); + pData->SetSelected (Left); + throw invalid_argument (_("Isolated arrows are not allowed!")); + } + reinterpret_cast (*j)->SetStartStep (reinterpret_cast (Left)); + reinterpret_cast (*j)->SetEndStep (reinterpret_cast (Right)); + reinterpret_cast (Left)->AddArrow (reinterpret_cast (*j), reinterpret_cast (Right), true); + reinterpret_cast (Right)->AddArrow (reinterpret_cast (*j), reinterpret_cast (Left), false); + } + // now, check if each step has at least one arrow, may be we should add missing arrows? + // also check that there are no cyclic relationships and only one start point + for (k = Objects.begin (); k != kend; k++) { + od = (*k).second; + if (!od.step->Validate ()) { + Left = (*k).first; + pData->UnselectAll (); + pData->SetSelected (Left); + throw invalid_argument (_("Isolated molecule!\n Please add missing arrows.")); + } + } + switch (Validate (false)) { + case 0: + break; + case 1: + throw invalid_argument (_("No target molecule!")); + case 2: + throw invalid_argument (_("Multiple target molecules or missing arrows.")); + case 3: + throw invalid_argument (_("Sorry, cyclic retrosynthesis paths are not supported.")); + } + Align (); + return true; +} + +static int BuildConnectivity ( set &Objects, gcpRetrosynthesisStep* Step) +{ + map *Arrows = Step->GetArrows (); + map::iterator i, end = Arrows->end (); + for (i = Arrows->begin (); i != end; i++) { + Objects.insert ((*i).second); + if (Objects.find ((*i).first) == Objects.end ()) { + Objects.insert ((*i).first); + if (BuildConnectivity (Objects, (*i).first)) + return 1; + } else + return 1; + } + return 0; +} + +int gcpRetrosynthesis::Validate (bool split) +{ + map::iterator i; + Object *pObj = GetFirstChild (i); + while (pObj && (pObj->GetType () != RetrosynthesisStepType || + (reinterpret_cast (pObj))->GetArrow ())) + pObj = GetNextChild (i); + if (pObj == NULL) + return 1; + Target = reinterpret_cast (pObj); + set Objects; + Objects.insert (pObj); + if (BuildConnectivity (Objects, Target)) + return 3; + while (Objects.size () < GetChildrenNumber ()) { + if (!split) + return 2; + pObj = GetFirstChild (i); + while (pObj && (pObj->GetType () != RetrosynthesisStepType || + (reinterpret_cast (pObj))->GetArrow () || + pObj == Target)) + pObj = GetNextChild (i); + if (reinterpret_cast (pObj)->Validate ()) { + gcpRetrosynthesis *rs = new gcpRetrosynthesis (GetParent (), + reinterpret_cast (pObj)); + gcp::Document *pDoc = reinterpret_cast (GetDocument ()); + gcp::Operation *pOp = pDoc->GetCurrentOperation (); + pOp->AddObject (rs, 1); + } else + delete pObj; + } + return 0; +} + +typedef struct +{ + double x, y; + ArtDRect r; +} StepData; + +static void AlignStep (map &data, gcpRetrosynthesisStep *step, gcp::View *pView, gcp::WidgetData *pData) +{ + double x0, y0, x1, y1, x, y, l, dx, dy; + bool horiz; + StepData sd = data[step], sd1; + gcp::Theme *pTheme = pView->GetDoc ()->GetTheme (); + map *Arrows = step->GetArrows (); + map::iterator i, end = Arrows->end (); + for (i = Arrows->begin (); i != end; i++) { + (*i).second->GetCoords (&x0, &y0, &x1, &y1); + x = x1 - x0; + y = y1 - y0; + l = sqrt (x * x + y * y); + x /= l; + y /= l; + if ((fabs (x) > 1e-5) && (fabs (y) > 1e-5)) + horiz = (fabs (x) > fabs (y)); + else if (fabs (x) > 1e-5) + horiz = true; + else + horiz = false; + if (horiz) { + if (x > 0) + dx = sd.r.x1 - sd.x + pTheme->GetArrowPadding (); + else + dx = sd.r.x0 - sd.x - pTheme->GetArrowPadding (); + dy = dx * y / x; + } else { + if (y > 0) + dy = sd.r.y1 - sd.y + pTheme->GetArrowPadding (); + else + dy = sd.r.y0 - sd.y - pTheme->GetArrowPadding (); + dx = dy * x / y; + } + x1 += x0 = (dx + sd.x) / pTheme->GetZoomFactor () - x0; + y1 += y0 = (dy + sd.y) / pTheme->GetZoomFactor () - y0; + (*i).second->Move (x0, y0); + pView->Update ((*i).second); + sd1 = data[(*i).first]; + if (horiz) { + if (x > 0) + dx = sd1.x - sd1.r.x0 + pTheme->GetArrowPadding (); + else + dx = sd1.x - sd1.r.x1 +- pTheme->GetArrowPadding (); + dy = dx * y / x; + } else { + if (y > 0) + dy = sd1.y - sd1.r.y0 + pTheme->GetArrowPadding (); + else + dy = sd1.y - sd1.r.y1 - pTheme->GetArrowPadding (); + dx = dy * x / y; + } + dx = x1 * pTheme->GetZoomFactor () - (sd1.x - dx); + dy = y1 * pTheme->GetZoomFactor () - (sd1.y - dy); + (*i).first->Move (dx / pTheme->GetZoomFactor (), dy / pTheme->GetZoomFactor ()); + pView->Update ((*i).first); + sd1.r.x0 += dx; + sd1.r.x1 += dx; + sd1.x += dx; + sd1.r.y0 += dy; + sd1.r.y1 += dy; + sd1.y += dy; + data[(*i).first] = sd1; + AlignStep (data, (*i).first, pView, pData); + } +} + +void gcpRetrosynthesis::Align () +{ + gcp::Document *pDoc = reinterpret_cast (GetDocument ()); + gcp::Theme *pTheme = pDoc->GetTheme (); + gcp::View *pView = pDoc->GetView (); + gcp::WidgetData *pData = reinterpret_cast (g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data")); + /* Update the canvas if necessary */ + GnomeCanvas* w = GNOME_CANVAS (((gcp::Document*) GetDocument ())->GetWidget ()); + while (w->idle_id) + gtk_main_iteration(); + gnome_canvas_update_now (w); + map::iterator i; + Object *pObj = GetFirstChild (i); + map positions; + StepData sd; + while (pObj) { + if (pObj->GetType () == RetrosynthesisStepType) { + pData->GetObjectBounds (pObj, &sd.r); + sd.x = (sd.r.x0 + sd.r.x1) / 2.; + sd.y = pObj->GetYAlign () * pTheme->GetZoomFactor (); + positions[pObj] = sd; + } + pObj = GetNextChild (i); + } + AlignStep (positions, Target, pView, pData); +} + +double gcpRetrosynthesis::GetYAlign () +{ + return (Target)? Target->GetYAlign (): 0.; +} + +static void do_destroy_retrosynthesis (void *data) +{ + gcpRetrosynthesis *rs = reinterpret_cast (data); + gcp::Document *pDoc = reinterpret_cast (rs->GetDocument ()); + gcp::WidgetData *pData = reinterpret_cast (g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data")); + pData->Unselect (rs); + gcp::Operation *pOp = pDoc->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + pOp->AddObject (rs, 0); + delete rs; + pDoc->FinishOperation (); +} + +bool gcpRetrosynthesis::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + GtkActionGroup *group = gtk_action_group_new ("retrosynthesis"); + GtkAction *action = gtk_action_new ("destroy-rs", _("Destroy the retrosynthesis path"), NULL, NULL); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + char buf[] = ""; + gtk_ui_manager_add_ui_from_string (UIManager, buf, -1, NULL); + GtkWidget *w = gtk_ui_manager_get_widget (UIManager, "/popup/destroy-rs"); + g_signal_connect_swapped (w, "activate", G_CALLBACK (do_destroy_retrosynthesis), this); + Object::BuildContextualMenu (UIManager, object, x, y); + return true; +} + +bool gcpRetrosynthesis::OnSignal (SignalId Signal, Object *Child) +{ + Validate (true); + Align (); + if (GetChildrenNumber () == 1) + delete this; + return true; +} + +gcpRetrosynthesis::gcpRetrosynthesis (Object* parent, gcpRetrosynthesisStep *step): Object (RetrosynthesisType) +{ + SetId ("rsy1"); + SetParent (parent); + Target = step; + AddChild (Target); + set Objects; + BuildConnectivity (Objects, Target); + set::iterator i, end = Objects.end (); + for (i = Objects.begin (); i != end; i++) + AddChild (*i); + Align (); +} + +void gcpRetrosynthesis::Transform2D (Matrix2D& m, double x, double y) +{ +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesis.h gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesis.h --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesis.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesis.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,59 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * retrosynthesis.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_RETROSYNTHESIS_H +#define GCHEMPAINT_RETROSYNTHESIS_H + +#include + +using namespace gcu; + +extern TypeId RetrosynthesisType; + +class gcpRetrosynthesisStep; + +class gcpRetrosynthesis: public Object +{ +public: + gcpRetrosynthesis (); + virtual ~gcpRetrosynthesis (); + + virtual xmlNodePtr Save (xmlDocPtr xml) const; + virtual bool Load (xmlNodePtr); + virtual bool Build (std::list& Children) throw (std::invalid_argument); + virtual double GetYAlign (); + virtual bool BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y); + virtual bool OnSignal (SignalId Signal, Object *Child); + virtual void Transform2D (Matrix2D& m, double x, double y); + int Validate (bool split); + void Align (); + +private: + gcpRetrosynthesis (Object* parent, gcpRetrosynthesisStep *step); + +private: + gcpRetrosynthesisStep *Target; +}; + +#endif // GCHEMPAINT_RETROSYNTHESIS_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisstep.cc gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisstep.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisstep.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisstep.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,117 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * retrosynthesisstep.h + * + * Copyright (C) 2005-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "retrosynthesisstep.h" +#include "retrosynthesis.h" +#include "retrosynthesisarrow.h" +#include +#include +#include + +TypeId RetrosynthesisStepType; + +gcpRetrosynthesisStep::gcpRetrosynthesisStep (): Object (RetrosynthesisStepType) +{ + SetId ("rss1"); + Molecule = NULL; +} + +gcpRetrosynthesisStep::~gcpRetrosynthesisStep () +{ + if (IsLocked ()) + return; + gcp::Document *pDoc = reinterpret_cast (GetDocument ()); + gcp::Operation *pOp = pDoc->GetCurrentOperation (); + gcpRetrosynthesis *rs = reinterpret_cast (GetParent ()); + if (!rs) + return; + map::iterator i; + Object *Child, *Group = rs->GetGroup (); + while (HasChildren ()) { + Child = GetFirstChild (i); + GetParent ()->GetParent ()->AddChild (Child); + if (pOp && !Group) + pOp->AddObject (Child, 1); + } +} + +gcpRetrosynthesisStep::gcpRetrosynthesisStep (gcpRetrosynthesis *synthesis, gcp::Molecule* molecule) throw (std::invalid_argument): Object (RetrosynthesisStepType) +{ + if (!synthesis || !molecule) + throw invalid_argument ("NULL argument to gcpRetrosynthesisStep constructor!"); + SetId ("rss1"); + synthesis->AddChild (this); + GetDocument ()->EmptyTranslationTable(); + AddChild (molecule); + Molecule = molecule; + Arrow = NULL; +} + +void gcpRetrosynthesisStep::AddArrow (gcpRetrosynthesisArrow *arrow, gcpRetrosynthesisStep *step, bool start) throw (std::invalid_argument) +{ + if (start) { + if (Arrows[step]) + throw invalid_argument (_("Only one arrow can link two given steps.")); + Arrows[step] = arrow; + } else { + Arrow = arrow; + Precursor = step; + } +} + +bool gcpRetrosynthesisStep::Load(xmlNodePtr node) +{ + if (Object::Load (node)) { + if (GetChildrenNumber () != 1) + return false; + map::iterator i; + Molecule = reinterpret_cast (GetFirstChild (i)); + return true; + } + return false; +} + +double gcpRetrosynthesisStep::GetYAlign () +{ + return (Molecule)? Molecule->GetYAlign (): 0.; +} + +void gcpRetrosynthesisStep::RemoveArrow (gcpRetrosynthesisArrow *arrow, gcpRetrosynthesisStep *step) +{ + if (step == Precursor) { + Precursor = NULL; + Arrow = NULL; + } else + Arrows.erase (step); +} + +bool gcpRetrosynthesisStep::OnSignal (SignalId Signal, Object *Child) +{ + if (GetChildrenNumber () != 1) { + delete GetParent (); + return false; + } + return true; +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisstep.h gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisstep.h --- gnome-chemistry-utils-0.8.6/plugins/paint/arrows/retrosynthesisstep.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/arrows/retrosynthesisstep.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,65 @@ +// -*- C++ -*- + +/* + * GChemPaint arrows plugin + * retrosynthesisstep.h + * + * Copyright (C) 2005-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_RETROSYNTHESIS_STEP_H +#define GCHEMPAINT_RETROSYNTHESIS_STEP_H + +#include + +using namespace std; +using namespace gcu; + +extern TypeId RetrosynthesisStepType; + +class gcpRetrosynthesis; +class gcpRetrosynthesisArrow; + +namespace gcp { + class Molecule; +} + +class gcpRetrosynthesisStep: public Object +{ +public: + gcpRetrosynthesisStep (); + virtual ~gcpRetrosynthesisStep (); + + gcpRetrosynthesisStep (gcpRetrosynthesis *synthesis, gcp::Molecule *molecule) throw (std::invalid_argument); + virtual double GetYAlign (); + virtual bool Load(xmlNodePtr); + virtual bool OnSignal (SignalId Signal, Object *Child); + void AddArrow (gcpRetrosynthesisArrow *arrow, gcpRetrosynthesisStep *step, bool start) throw (std::invalid_argument); + bool Validate () {return Arrow != NULL || Arrows.size () > 0;} + map *GetArrows () {return &Arrows;} + gcpRetrosynthesisArrow const *GetArrow () {return Arrow;} + void RemoveArrow (gcpRetrosynthesisArrow *arrow, gcpRetrosynthesisStep *step); + +private: + gcp::Molecule *Molecule; + gcpRetrosynthesisArrow *Arrow; + gcpRetrosynthesisStep *Precursor; + map Arrows; +}; + +#endif // GCHEMPAINT_RETROSYNTHESIS_STEP_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/atoms/charge-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/atoms/charge-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/atoms/charge+24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/atoms/charge+24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/chargetool.cc gnome-chemistry-utils-0.10.9/plugins/paint/atoms/chargetool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/chargetool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/chargetool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,418 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * chargetool.cc + * + * Copyright (C) 2003-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "chargetool.h" +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +gcpChargeTool::gcpChargeTool (gcp::Application *App, string Id): gcp::Tool (App, Id) +{ + if (Id == string ("ChargePlus")) + m_glyph = "\xE2\x8a\x95"; + else if (Id == string ("ChargeMinus")) + m_glyph = "\xE2\x8a\x96"; + else m_glyph = 0; +} + +gcpChargeTool::~gcpChargeTool () +{ +} + +bool gcpChargeTool::OnClicked () +{ + if (!m_pObject || (m_pObject->GetType () != AtomType)) + return false; + gcp::Atom *pAtom = (gcp::Atom*) m_pObject; + gcp::Theme *Theme = m_pView->GetDoc ()->GetTheme (); + m_Charge = pAtom->GetCharge () + ((GetName() == string ("ChargePlus"))? 1: -1); + if (!pAtom->AcceptCharge (m_Charge)) + return false; + m_bDragged = false; + GObject *obj; + ArtDRect rect; + pAtom->GetCoords (&m_x0, &m_y0); + m_x0 *= m_dZoomFactor; + m_y0 *= m_dZoomFactor; + if (m_pObject->GetParent ()->GetType () == FragmentType) { + obj = G_OBJECT (m_pData->Items[m_pObject->GetParent ()]); + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (g_object_get_data (obj, "fragment")), + &rect.x0, &rect.y0, &rect.x1, &rect.y0); + } else { + obj = G_OBJECT (m_pData->Items[m_pObject]); + GnomeCanvasItem *sym = (GnomeCanvasItem*) g_object_get_data (obj, "symbol"); + if (sym) + gnome_canvas_item_get_bounds (sym, + &rect.x0, &rect.y0, &rect.x1, &rect.y0); + else + rect.y0 = m_y0 + 6; + } + GnomeCanvasItem *item = (GnomeCanvasItem*) g_object_get_data (obj, "charge"); + m_dDist = 0; + m_pData->GetObjectBounds (m_pObject, &rect); + m_dDistMax = 1.5 * fabs (rect.y0 - m_y0); + if (m_Charge) { + if (item) + gnome_canvas_item_hide (item); + double x, y, xc = 0., yc; + m_DefaultPos = 0xff; + int align = ((gcp::Atom*) m_pObject)->GetChargePosition (m_DefaultPos, 0., x, y); + if (!align) + return false; + m_Pos = m_DefaultPos; + x *= m_dZoomFactor; + y *= m_dZoomFactor; + if (!m_Pos) { + m_x = x - m_x0; + m_y = y - m_y0; + m_dAngle = atan (- m_y / m_x); + if (m_x < 0) + m_dAngle += M_PI; + m_dDist = sqrt (m_x * m_x + m_y * m_y); + } else { + switch (m_Pos) { + case POSITION_NE: + m_dAngle = M_PI / 4; + break; + case POSITION_NW: + m_dAngle = 3 * M_PI / 4; + break; + case POSITION_N: + m_dAngle = M_PI / 2; + break; + case POSITION_SE: + m_dAngle = 7 * M_PI / 4; + break; + case POSITION_SW: + m_dAngle = 5 * M_PI / 4; + break; + case POSITION_S: + m_dAngle = 3 * M_PI / 2; + break; + case POSITION_E: + m_dAngle = 0.; + break; + case POSITION_W: + m_dAngle = M_PI; + break; + } + } + char* markup = NULL; + PangoLayout* pl = NULL; + if (abs (m_Charge) > 1) { + markup = g_strdup_printf ("%d", abs (m_Charge)); + PangoContext* pc = m_pView->GetPangoContext (); + PangoRectangle rect; + pl = pango_layout_new (pc); + pango_layout_set_text (pl, markup, -1); + pango_layout_get_extents (pl, NULL, &rect); + m_ChargeWidth = rect.width / PANGO_SCALE; + pango_layout_set_font_description (pl, m_pView->GetPangoSmallFontDesc ()); + m_ChargeTWidth = m_ChargeWidth + 1. + Theme->GetChargeSignSize (); + } else { + m_ChargeWidth = 0.; + m_ChargeTWidth = Theme->GetChargeSignSize (); + } + switch (align) { + case -2: + xc = x + m_ChargeTWidth / 2. - Theme->GetChargeSignSize (); + y += Theme->GetChargeSignSize () / 2.; + break; + case -1: + xc = x - Theme->GetChargeSignSize () - Theme->GetPadding (); + break; + case 0: + case -3: + xc = x + m_ChargeTWidth / 2. - Theme->GetChargeSignSize (); + break; + case 1: + xc = x + m_ChargeWidth + Theme->GetPadding (); + break; + case 2: + xc = x + m_ChargeTWidth / 2. - Theme->GetChargeSignSize (); + y -= Theme->GetChargeSignSize () / 2.; + break; + } + x = xc - 1.; + yc = y - Theme->GetChargeSignSize () / 2.; + m_x1 = x; + m_y1 = y; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_group_get_type(), + NULL); + if (markup) { + gnome_canvas_item_new( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_pango_get_type(), + "fill_color", gcp::AddColor, + "layout", pl, + "anchor", GTK_ANCHOR_EAST, + "x", x, + "y", y, + NULL); + } + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_ellipse_get_type (), + "x1", xc, + "y1", yc, + "x2", xc + Theme->GetChargeSignSize (), + "y2", yc + Theme->GetChargeSignSize (), + "outline_color", gcp::AddColor, + "width_units", 0.5, + NULL + ); + ArtBpath *path = art_new (ArtBpath, 5); + path[0].code = ART_MOVETO_OPEN; + path[0].x3 = xc + 1.; + path[1].code = ART_LINETO; + path[1].x3 = xc + Theme->GetChargeSignSize () - 1.; + path[0].y3 = path[1].y3 = yc + Theme->GetChargeSignSize () / 2.; + if (m_Charge > 0) { + path[2].code = ART_MOVETO_OPEN; + path[2].y3 = yc + 1.; + path[3].code = ART_LINETO; + path[3].y3 = yc + Theme->GetChargeSignSize () - 1.; + path[2].x3 = path[3].x3 = xc + Theme->GetChargeSignSize () / 2.; + path[4].code = ART_END; + } else + path[2].code = ART_END; + GnomeCanvasPathDef *cpd = gnome_canvas_path_def_new_from_bpath (path); + item = gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_bpath_get_type (), + "bpath", cpd, + "outline_color", gcp::AddColor, + "width_units", .75, + NULL + ); + gnome_canvas_path_def_unref (cpd); + if (pl) + g_object_unref (G_OBJECT (pl)); + } else { + void *child = g_object_get_data (obj, "figure"); + if (child) + g_object_set (G_OBJECT (child), "fill-color", gcp::DeleteColor, NULL); + child = g_object_get_data (obj, "circle"); + g_object_set (G_OBJECT (child), "outline-color", gcp::DeleteColor, NULL); + child = g_object_get_data (obj, "sign"); + g_object_set (G_OBJECT (child), "outline-color", gcp::DeleteColor, NULL); + } + char buf[32]; + snprintf (buf, sizeof (buf) - 1, _("Orientation: %g"), m_dAngle * 180. / M_PI); + m_pApp->SetStatusText (buf); + m_bChanged = true; + return true; +} + +void gcpChargeTool::OnDrag () +{ + if (m_Charge && !m_pItem) + return; + m_bDragged = true; + GObject *obj = G_OBJECT ((m_pObject->GetParent ()->GetType () == FragmentType)? + m_pData->Items[m_pObject->GetParent ()]: m_pData->Items[m_pObject]); + GnomeCanvasItem *item = (GnomeCanvasItem*) g_object_get_data (obj, "charge"); + int align, old_pos = m_Pos; + m_x -= m_x0; + m_y -= m_y0; + m_dDist = sqrt (square (m_x) + square (m_y)); + if (!m_pItem) { + void *child; + if (m_dDist < m_dDistMax) { + if (!m_bChanged) { + child = g_object_get_data (obj, "figure"); + if (child) + g_object_set (G_OBJECT (child), "fill-color", gcp::DeleteColor, NULL); + child = g_object_get_data (obj, "circle"); + g_object_set (G_OBJECT (child), "outline-color", gcp::DeleteColor, NULL); + child = g_object_get_data (obj, "sign"); + g_object_set (G_OBJECT (child), "outline-color", gcp::DeleteColor, NULL); + m_bChanged = true; + } + } else { + if (m_bChanged) { + child = g_object_get_data (obj, "figure"); + if (child) + g_object_set (G_OBJECT (child), "fill-color", "black", NULL); + child = g_object_get_data (obj, "circle"); + g_object_set (G_OBJECT (child), "outline-color", "black", NULL); + child = g_object_get_data (obj, "sign"); + g_object_set (G_OBJECT (child), "outline-color", "black", NULL); + m_bChanged = false; + } + } + return; + } + double Angle = atan (- m_y / m_x); + if (isnan (Angle)) + Angle = m_dAngle; + else if (m_x < 0) + Angle += M_PI; + if (!(m_nState & GDK_CONTROL_MASK)) { + int pos = (int) rint (Angle * 4. / M_PI); + Angle = (double) pos * M_PI / 4.; + if (m_nState & GDK_SHIFT_MASK) + pos = 8; + else if (pos < 0) + pos += 8; + switch (pos) { + case 0: + m_Pos = POSITION_E; + break; + case 1: + m_Pos = POSITION_NE; + break; + case 2: + m_Pos = POSITION_N; + break; + case 3: + m_Pos = POSITION_NW; + break; + case 4: + m_Pos = POSITION_W; + break; + case 5: + m_Pos = POSITION_SW; + break; + case 6: + m_Pos = POSITION_S; + break; + case 7: + m_Pos = POSITION_SE; + break; + default: + m_Pos = 0; + } + } else + m_Pos = 0; + if ((Angle == m_dAngle) && !(m_nState & GDK_SHIFT_MASK)) { + if (m_dDist < m_dDistMax) { + if (!m_bChanged) { + gnome_canvas_item_show (m_pItem); + if (item) + gnome_canvas_item_hide (item); + m_bChanged = true; + } + } else { + if (m_bChanged) { + if (item) + gnome_canvas_item_show (item); + gnome_canvas_item_hide (m_pItem); + m_bChanged = false; + } + } + } else { + double x, y; + gcp::Atom *pAtom = (gcp::Atom*) m_pObject; + gcp::Theme *Theme = m_pView->GetDoc ()->GetTheme (); + if (!(m_nState & GDK_SHIFT_MASK) && (m_dDist >= m_dDistMax) && m_bChanged) { + gnome_canvas_item_hide (m_pItem); + m_bChanged = false; + } else if ((align = pAtom->GetChargePosition (m_Pos, Angle * 180. / M_PI, x, y))) { + m_dAngle = Angle; + if (m_nState & GDK_SHIFT_MASK) { + align = 0; + x = m_x0 + m_dDist * cos (m_dAngle); + y = m_y0 - m_dDist * sin (m_dAngle); + } else { + x = x * m_dZoomFactor; + y = y * m_dZoomFactor; + } + switch (align) { + case -2: + x += m_ChargeTWidth / 2. - Theme->GetChargeSignSize () - 1.; + y += Theme->GetChargeSignSize () / 2.; + break; + case -1: + x-= Theme->GetChargeSignSize () + Theme->GetPadding (); + break; + case -3: + x += m_ChargeTWidth / 2. - Theme->GetChargeSignSize () - 1.; + break; + case 1: + x += m_ChargeWidth + Theme->GetPadding (); + break; + case 2: + x += m_ChargeTWidth / 2. - Theme->GetChargeSignSize () - 1.; + y -= Theme->GetChargeSignSize () / 2.; + break; + } + gnome_canvas_item_move (m_pItem, x - m_x1, y - m_y1); + m_x1 = x; + m_y1 = y; + gnome_canvas_item_show (m_pItem); + if (item) + gnome_canvas_item_hide (item); + m_bChanged = true; + } else + m_Pos = old_pos; + } + char tmp[32]; + snprintf(tmp, sizeof(tmp) - 1, _("Orientation: %g"), m_dAngle * 180. / M_PI); + m_pApp->SetStatusText(tmp); +} + +void gcpChargeTool::OnRelease () +{ + if (m_bChanged) { + gcp::Atom* pAtom = (gcp::Atom*) m_pObject; + gcp::Document* pDoc = m_pView->GetDoc (); + gcp::Operation* pOp = pDoc-> GetNewOperation(gcp::GCP_MODIFY_OPERATION); + GObject *obj = G_OBJECT ((m_pObject->GetParent ()->GetType () == FragmentType)? + m_pData->Items[m_pObject->GetParent ()]: m_pData->Items[m_pObject]); + GnomeCanvasItem *item = (GnomeCanvasItem*) g_object_get_data (obj, "charge"); + if (item) + gnome_canvas_item_show (item); + m_pObject = m_pObject->GetGroup (); + pOp->AddObject (m_pObject, 0); + pAtom->SetCharge (m_Charge); + if (!m_bDragged) { + double x, y; + m_DefaultPos = 0xff; + pAtom->GetChargePosition (m_DefaultPos, 0., x, y); + if (m_Pos && (m_Pos != m_DefaultPos)) + m_Pos = m_DefaultPos; + } + if (!(m_nState & GDK_SHIFT_MASK)) + m_dDist = 0.; + pAtom->SetChargePosition (m_Pos, m_Pos == m_DefaultPos, + m_dAngle, m_dDist / m_dZoomFactor); + pAtom->Update (); + m_pView->Update (m_pObject); + pAtom->EmitSignal (gcp::OnChangedSignal); + pOp->AddObject (m_pObject, 1); + pDoc->FinishOperation (); + } +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/chargetool.h gnome-chemistry-utils-0.10.9/plugins/paint/atoms/chargetool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/chargetool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/chargetool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,50 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * chargetool.h + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_CHARGE_TOOL_H +#define GCHEMPAINT_CHARGE_TOOL_H + +#include + +class gcpChargeTool: public gcp::Tool +{ +public: + gcpChargeTool(gcp::Application *App, std::string Id); + virtual ~gcpChargeTool(); + + virtual bool OnClicked(); + virtual void OnDrag(); + virtual void OnRelease(); + char const *GetHelpTag () {return "charge";} + +private: + char const *m_glyph; + double m_dDist, m_dDistMax, m_dAngle; + int m_Charge; + unsigned char m_Pos, m_DefaultPos; + bool m_bDragged; + double m_ChargeWidth, m_ChargeTWidth, m_ChargeHeight; +}; + +#endif //GCHEMPAINT_CHARGE_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/atoms/electronpair24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/atoms/electronpair24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/electrontool.cc gnome-chemistry-utils-0.10.9/plugins/paint/atoms/electrontool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/electrontool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/electrontool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,286 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * electrontool.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "electrontool.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +gcpElectronTool::gcpElectronTool (gcp::Application *App, string Id): gcp::Tool (App, Id) +{ + if (Id == string ("ElectronPair")) + m_bIsPair = true; + else if (Id == string ("UnpairedElectron")) + m_bIsPair = false; + else throw logic_error ("Unknown tool Id!"); // This should not happen. +} + +gcpElectronTool::~gcpElectronTool () +{ +} + +bool gcpElectronTool::OnClicked () +{ + if (!m_pObject || (m_pObject->GetType () != AtomType)) + return false; + /* explicit electrons will be authorized in fragments only when they will + be fully implemented */ + if (m_pObject->GetParent ()->GetType () == FragmentType) + return false; + double x, y; + gcp::Atom *pAtom = (gcp::Atom*) m_pObject; + if (m_bIsPair) { + if (!pAtom->HasImplicitElectronPairs ()) + return false; + } else { + if (!pAtom->MayHaveImplicitUnpairedElectrons ()) + return false; + } + pAtom->GetCoords (&m_x0, &m_y0); + m_Pos = pAtom->GetAvailablePosition (x, y); + m_x = x - m_x0; + m_y = y - m_y0; + ArtDRect rect; + m_pData->GetObjectBounds (m_pObject, &rect); + m_x0 *= m_dZoomFactor; + m_y0 *= m_dZoomFactor; + m_dDistMax = min (sqrt (square (rect.x0 - m_x0) + square (rect.y0 - m_y0)), + sqrt (square (rect.x1 - m_x0) + square (rect.y0 - m_y0))); + m_dAngle = atan (- m_y / m_x); + if (m_x < 0) m_dAngle += M_PI; + x *= m_dZoomFactor; + y *= m_dZoomFactor; + x += 2. * cos (m_dAngle); + y -= 2. * sin (m_dAngle); + if (m_bIsPair) { + double deltax = 3. * sin (m_dAngle); + double deltay = 3. * cos (m_dAngle); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_group_get_type (), + NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_ellipse_get_type (), + "width_units", 0.0, + "fill_color", gcp::AddColor, + "x1", x + deltax - 2. , + "x2", x + deltax + 2., + "y1", y + deltay - 2., + "y2", y + deltay + 2., + NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_ellipse_get_type (), + "width_units", 0.0, + "fill_color", gcp::AddColor, + "x1", x - deltax - 2. , + "x2", x - deltax + 2., + "y1", y - deltay - 2., + "y2", y - deltay + 2., + NULL); + } else { + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_ellipse_get_type (), + "width_units", 0.0, + "fill_color", gcp::AddColor, + "x1", x - 2. , + "x2", x + 2., + "y1", y - 2., + "y2", y + 2., + NULL); + } + char tmp[32]; + snprintf (tmp, sizeof (tmp) - 1, _("Orientation: %g"), m_dAngle * 180. / M_PI); + m_pApp->SetStatusText (tmp); + m_bChanged = true; + return true; +} + +void gcpElectronTool::OnDrag () +{ + if (!m_pItem) + return; + int old_pos = m_Pos; + m_x -= m_x0; + m_y -= m_y0; + m_dDist = sqrt (square (m_x) + square (m_y)); + double Angle = atan (- m_y / m_x); + if (isnan (Angle)) + Angle = m_dAngle; + else if (m_x < 0) + Angle += M_PI; + if (!(m_nState & GDK_CONTROL_MASK)) { + int pos = (int) rint (Angle * 4. / M_PI); + Angle = (double) pos * M_PI / 4.; + if (m_nState & GDK_SHIFT_MASK) + pos = 8; + else if (pos < 0) + pos += 8; + switch (pos) { + case 0: + m_Pos = POSITION_E; + break; + case 1: + m_Pos = POSITION_NE; + break; + case 2: + m_Pos = POSITION_N; + break; + case 3: + m_Pos = POSITION_NW; + break; + case 4: + m_Pos = POSITION_W; + break; + case 5: + m_Pos = POSITION_SW; + break; + case 6: + m_Pos = POSITION_S; + break; + case 7: + m_Pos = POSITION_SE; + break; + default: + m_Pos = 0; + } + } else + m_Pos = 0; + if ((Angle == m_dAngle) && !(m_nState & GDK_SHIFT_MASK)) { + if (m_dDist < m_dDistMax) { + if (!m_bChanged) { + gnome_canvas_item_show (m_pItem); + m_bChanged = true; + } + } else { + if (m_bChanged) { + gnome_canvas_item_hide (m_pItem); + m_bChanged = false; + } + } + } else { + double x, y, x1, y1, x2, y2; + gcp::Atom *pAtom = (gcp::Atom*) m_pObject; + if (!(m_nState & GDK_SHIFT_MASK) && (m_dDist >= m_dDistMax) && m_bChanged) { + gnome_canvas_item_hide (m_pItem); + m_bChanged = false; + } else if (pAtom->GetPosition (Angle * 180. / M_PI, x, y)) { + m_dAngle = Angle; + if (m_pItem) + { + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gtk_object_destroy (GTK_OBJECT (GNOME_CANVAS_ITEM (m_pItem))); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + m_pItem = NULL; + } + if (m_nState & GDK_SHIFT_MASK) { + x = m_x0 + m_dDist * cos (m_dAngle); + y = m_y0 - m_dDist * sin (m_dAngle); + } else { + x = x * m_dZoomFactor; + y = y * m_dZoomFactor; + x += 2. * cos (m_dAngle); + y -= 2. * sin (m_dAngle); + } + if (m_bIsPair) { + double deltax = 3. * sin (m_dAngle); + double deltay = 3. * cos (m_dAngle); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_group_get_type (), + NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_ellipse_get_type (), + "width_units", 0.0, + "fill_color", gcp::AddColor, + "x1", x + deltax - 2. , + "x2", x + deltax + 2., + "y1", y + deltay - 2., + "y2", y + deltay + 2., + NULL); + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_ellipse_get_type (), + "width_units", 0.0, + "fill_color", gcp::AddColor, + "x1", x - deltax - 2. , + "x2", x - deltax + 2., + "y1", y - deltay - 2., + "y2", y - deltay + 2., + NULL); + } else { + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_ellipse_get_type (), + "width_units", 0.0, + "fill_color", gcp::AddColor, + "x1", x - 2. , + "x2", x + 2., + "y1", y - 2., + "y2", y + 2., + NULL); + } + m_bChanged = true; + } else + m_Pos = old_pos; + } + char tmp[32]; + snprintf (tmp, sizeof (tmp) - 1, _("Orientation: %g"), m_dAngle * 180. / M_PI); + m_pApp->SetStatusText (tmp); +} + +void gcpElectronTool::OnRelease () +{ + if (!m_bChanged) + return; + gcp::Atom *pAtom = (gcp::Atom*) m_pObject; + Object* pObj = m_pObject->GetGroup (); + gcp::Document* pDoc = m_pView->GetDoc (); + gcp::Operation* pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + pOp->AddObject (pObj, 0); + gcp::Electron *electron = new gcp::Electron (pAtom, m_bIsPair); + double Angle = m_dAngle * 180. / M_PI; + if (!(m_nState & GDK_SHIFT_MASK)) + m_dDist = 0.; + electron->SetPosition (m_Pos, Angle, m_dDist); + m_pObject->EmitSignal (gcp::OnChangedSignal); + pOp->AddObject (pObj, 1); + pDoc->FinishOperation (); + m_pView->AddObject (electron); + m_pView->Update (pAtom); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/electrontool.h gnome-chemistry-utils-0.10.9/plugins/paint/atoms/electrontool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/electrontool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/electrontool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,47 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * electrontool.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ELECTRON_TOOL_H +#define GCHEMPAINT_ELECTRON_TOOL_H + +#include + +class gcpElectronTool: public gcp::Tool +{ +public: + gcpElectronTool (gcp::Application *App, std::string Id); + virtual ~gcpElectronTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); + char const *GetHelpTag () {return "electron";} + +private: + bool m_bIsPair; + double m_dAngle, m_dDistMax, m_dDist; + unsigned char m_Pos; +}; + +#endif //GCHEMPAINT_ELECTRON_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/atoms/element24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/atoms/element24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/elementtool.cc gnome-chemistry-utils-0.10.9/plugins/paint/atoms/elementtool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/elementtool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/elementtool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,153 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * elementtool.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "elementtool.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +gcpElementTool::gcpElementTool (gcp::Application *App): gcp::Tool (App, "Element") +{ +} + +gcpElementTool::~gcpElementTool () +{ +} + +bool gcpElementTool::OnClicked () +{ + int CurZ = m_pApp->GetCurZ (); + if (m_pObject) { + if (m_pObject->GetType () != AtomType) + return false; + if (((gcp::Atom*) m_pObject)->GetTotalBondsNumber () > (int) Element::GetMaxBonds (CurZ)) + return false; + ((gcp::Atom*) m_pObject)->GetCoords (&m_x0, &m_y0); + m_x0 *= m_dZoomFactor; + m_y0 *= m_dZoomFactor; + } + m_bChanged = true; + const gchar* symbol = gcu::Element::Symbol (CurZ); + PangoLayout *pl = pango_layout_new (m_pView->GetPangoContext ()); + pango_layout_set_font_description (pl, m_pView->GetPangoFontDesc ()); + pango_layout_set_text (pl, symbol, strlen (symbol)); + gint width = pango_layout_get_width (pl); + double padding = m_pView->GetDoc ()->GetTheme ()->GetPadding (); + m_x1 = m_x0 - (double) width / 2 - padding; + m_y1 = m_y0 - m_pView->GetFontHeight() / 2 - padding; + m_x2 = m_x0 + (double) width / 2 + padding; + m_y2 = m_y0 + m_pView->GetFontHeight () / 2 + padding; + m_pItem = gnome_canvas_item_new (m_pGroup, gnome_canvas_group_ext_get_type (), NULL); + gnome_canvas_item_new ( + (GnomeCanvasGroup*) m_pItem, + gnome_canvas_rect_get_type (), + "x1", m_x1, + "y1", m_y1, + "x2", m_x2, + "y2", m_y2, + "fill_color", "white", + NULL); + gnome_canvas_item_new ( + (GnomeCanvasGroup*) m_pItem, + gnome_canvas_pango_get_type (), + "layout", pl, + "x", rint (m_x0), + "y", rint (m_y0), + "anchor", GTK_ANCHOR_CENTER, + "fill_color", gcp::AddColor, + NULL); + g_object_unref (pl); + return true; +} + +void gcpElementTool::OnDrag () +{ + if ((m_x > m_x1) && (m_x2 > m_x) && (m_y > m_y1) && (m_y2 > m_y)) { + if (!m_bChanged) { + gnome_canvas_item_show (m_pItem); + m_bChanged = true; + } + } else if (m_bChanged) { + gnome_canvas_item_hide (m_pItem); + m_bChanged = false; + } +} + +void gcpElementTool::OnRelease () +{ + int CurZ = m_pApp->GetCurZ () ; + if (m_bChanged) { + gcp::Document* pDoc = m_pView->GetDoc (); + if (m_pObject) + { + gcp ::Molecule* pMol = (gcp::Molecule*) m_pObject->GetMolecule (); + gcp::Operation* pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + Object *pObj = m_pObject->GetGroup (); + pOp->AddObject (pObj, 0); + Object* parent = m_pObject->GetParent (); + if (m_nState & GDK_CONTROL_MASK && (parent->GetType () == FragmentType)) { + //If m_pObject points to an atom inside a fragment, replace the whole fragment. + gcp::Atom* pAtom = ((gcp::Fragment*) parent)->GetAtom (); + map::iterator i; + gcp::Bond *pBond = (gcp::Bond*) pAtom->GetFirstBond (i); + double x, y; + pAtom->GetCoords (&x, &y); + gcp::Atom* pNewAtom = new gcp::Atom (CurZ, x, y, 0.); + pMol->Remove (parent); + m_pView->Remove (parent); + m_pView->AddObject (pNewAtom); + parent->SetParent (NULL); + pMol->AddAtom (pNewAtom); + pNewAtom->SetId ((gchar*) pAtom->GetId ()); + if (pBond) { + pBond->ReplaceAtom (pAtom, pNewAtom); + pNewAtom->AddBond (pBond); + } + pNewAtom->Update (); + m_pView->Update (pNewAtom); + delete parent; + } else { + ((gcp::Atom*) m_pObject)->SetZ (CurZ); + m_pView->Update ((gcp::Atom*) m_pObject); + } + pOp->AddObject (pObj, 1); + } else { + gcp::Atom* pAtom = new gcp::Atom (CurZ, m_x0 / m_dZoomFactor, m_y0 / m_dZoomFactor, 0); + gcp::Operation* pOp = pDoc-> GetNewOperation (gcp::GCP_ADD_OPERATION); + pDoc->AddAtom (pAtom); + pOp->AddObject (pAtom); + } + pDoc->FinishOperation (); + } +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/elementtool.h gnome-chemistry-utils-0.10.9/plugins/paint/atoms/elementtool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/elementtool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/elementtool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,45 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * elementtool.h + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ELEMENT_TOOL_H +#define GCHEMPAINT_ELEMENT_TOOL_H + +#include + +class gcpElementTool: public gcp::Tool +{ +public: + gcpElementTool (gcp::Application *App); + virtual ~gcpElementTool (); + + bool OnClicked (); + void OnDrag (); + void OnRelease (); + char const *GetHelpTag () {return "element";} + +private: + double m_x2, m_y2; +}; + +#endif // GCHEMPAINT_ELEMENT_TOOL_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/atoms/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,63 @@ +EXTRA_DIST= $(IMAGES) + +BUILT_SOURCES = gcp-stock-pixbufs.h + +CLEANFILES = $(BUILT_SOURCES) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif +DEFS += -DDATADIR=\"$(datadir)\" \ + -DPLUGINSDIR=\"$(atomsdir)\" + +IMAGES = \ + charge-24.png \ + charge+24.png \ + electronpair24.png \ + element24.png \ + unpairedelectron24.png + +VARIABLES = \ + gcp_chargem_24 $(srcdir)/charge-24.png \ + gcp_chargep_24 $(srcdir)/charge+24.png \ + gcp_elecpair_24 $(srcdir)/electronpair24.png \ + gcp_element_24 $(srcdir)/element24.png \ + gcp_unpairedelec_24 $(srcdir)/unpairedelectron24.png + +atomsdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +atoms_LTLIBRARIES = atoms.la + +atoms_la_LDFLAGS = -module -avoid-version +atoms_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +atoms_la_SOURCES = \ + plugin.cc \ + chargetool.cc \ + electrontool.cc \ + elementtool.cc + +noinst_HEADERS = \ + plugin.h \ + chargetool.h \ + electrontool.h \ + elementtool.h + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/atoms/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/Makefile.in 2009-11-14 11:46:03.000000000 +0100 @@ -0,0 +1,677 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/atoms +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(atomsdir)" +LTLIBRARIES = $(atoms_LTLIBRARIES) +atoms_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_atoms_la_OBJECTS = plugin.lo chargetool.lo electrontool.lo \ + elementtool.lo +atoms_la_OBJECTS = $(am_atoms_la_OBJECTS) +atoms_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(atoms_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(atoms_la_SOURCES) +DIST_SOURCES = $(atoms_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DPLUGINSDIR=\"$(atomsdir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(IMAGES) +BUILT_SOURCES = gcp-stock-pixbufs.h +CLEANFILES = $(BUILT_SOURCES) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +IMAGES = \ + charge-24.png \ + charge+24.png \ + electronpair24.png \ + element24.png \ + unpairedelectron24.png + +VARIABLES = \ + gcp_chargem_24 $(srcdir)/charge-24.png \ + gcp_chargep_24 $(srcdir)/charge+24.png \ + gcp_elecpair_24 $(srcdir)/electronpair24.png \ + gcp_element_24 $(srcdir)/element24.png \ + gcp_unpairedelec_24 $(srcdir)/unpairedelectron24.png + +atomsdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +atoms_LTLIBRARIES = atoms.la +atoms_la_LDFLAGS = -module -avoid-version +atoms_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +atoms_la_SOURCES = \ + plugin.cc \ + chargetool.cc \ + electrontool.cc \ + elementtool.cc + +noinst_HEADERS = \ + plugin.h \ + chargetool.h \ + electrontool.h \ + elementtool.h + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/atoms/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/atoms/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-atomsLTLIBRARIES: $(atoms_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(atomsdir)" || $(MKDIR_P) "$(DESTDIR)$(atomsdir)" + @list='$(atoms_LTLIBRARIES)'; test -n "$(atomsdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(atomsdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(atomsdir)"; \ + } + +uninstall-atomsLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(atoms_LTLIBRARIES)'; test -n "$(atomsdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(atomsdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(atomsdir)/$$f"; \ + done + +clean-atomsLTLIBRARIES: + -test -z "$(atoms_LTLIBRARIES)" || rm -f $(atoms_LTLIBRARIES) + @list='$(atoms_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +atoms.la: $(atoms_la_OBJECTS) $(atoms_la_DEPENDENCIES) + $(atoms_la_LINK) -rpath $(atomsdir) $(atoms_la_OBJECTS) $(atoms_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chargetool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/electrontool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elementtool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(atomsdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-atomsLTLIBRARIES clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-atomsLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-atomsLTLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-atomsLTLIBRARIES clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am \ + install-atomsLTLIBRARIES install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-atomsLTLIBRARIES + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/atoms/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,97 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * plugin.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include +#include "elementtool.h" +#include "chargetool.h" +#include "electrontool.h" +#include "gcp-stock-pixbufs.h" +#include + +gcpAtomsPlugin plugin; + +gcpAtomsPlugin::gcpAtomsPlugin(): gcp::Plugin() +{ +} + +gcpAtomsPlugin::~gcpAtomsPlugin() +{ +} + +static gcp::IconDesc icon_descs[] = { + {"gcp_Element", gcp_element_24}, + {"gcp_ChargePlus", gcp_chargep_24}, + {"gcp_ChargeMinus", gcp_chargem_24}, + {"gcp_ElectronPair", gcp_elecpair_24}, + {"gcp_UnpairedElectron", gcp_unpairedelec_24}, + {NULL, NULL}, +}; + +static GtkRadioActionEntry entries[] = { + { "Element", "gcp_Element", N_("Atom"), NULL, + N_("Add or modify an atom"), + 0 }, + { "ChargePlus", "gcp_ChargePlus", N_("Positive Charge"), NULL, + N_("Increment the charge of an atom"), + 0 }, + { "ChargeMinus", "gcp_ChargeMinus", N_("Negative Charge"), NULL, + N_("Decrement the charge of an atom"), + 0 }, + { "ElectronPair", "gcp_ElectronPair", N_("Electron Pair"), NULL, + N_("Add an electron pair to an atom"), + 0 }, + { "UnpairedElectron", "gcp_UnpairedElectron", N_("Unpaired Electron"), NULL, + N_("Add an unpaired electron to an atom"), + 0 }, +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +""; + +void gcpAtomsPlugin::Populate (gcp::Application* App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + App->RegisterToolbar ("AtomsToolbar", 1); + new gcpElementTool (App); + new gcpChargeTool (App, "ChargePlus"); + new gcpChargeTool (App, "ChargeMinus"); + new gcpElectronTool (App, "ElectronPair"); + new gcpElectronTool (App, "UnpairedElectron"); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/atoms/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/atoms/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/atoms/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/atoms/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,38 @@ +// -*- C++ -*- + +/* + * GChemPaint atoms plugin + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ATOMS_PLUGIN +#define GCHEMPAINT_ATOMS_PLUGIN + +#include + +class gcpAtomsPlugin: public gcp::Plugin +{ +public: + gcpAtomsPlugin(); + virtual ~gcpAtomsPlugin(); + + virtual void Populate (gcp::Application* App); +}; +#endif //GCHEMPAINT_ATOMS_PLUGIN Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/atoms/unpairedelectron24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/atoms/unpairedelectron24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/bonds/bond24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/bonds/bond24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/bond.glade gnome-chemistry-utils-0.10.9/plugins/paint/bonds/bond.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/bond.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/bond.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,159 @@ + + + + + + True + window1 + + + True + 3 + 5 + 3 + 10 + 6 + + + + + + + + + True + + + 3 + 3 + 4 + GTK_FILL + + + + + True + 0 + + + 2 + 3 + + + + + + True + True + Use existing atoms for end of bonds + _Merge with existing atoms + True + 0 + True + + + 3 + 4 + 5 + + + + + + True + 0 + <b>Property</b> + True + + + GTK_FILL + + + + + + True + True + Angle between two new bonds in an open chain + 120 90 150 1 10 0 + 1 + 1 + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + True + True + Default length for new bonds + 140 90 500 1 10 0 + 1 + 1 + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + <b>Value</b> + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Bond _angle: + True + bond-angle + + + 2 + 3 + GTK_FILL + + + + + + True + True + 0 + Bond len_gth: + True + bond-length + + + 1 + 2 + GTK_FILL + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/bondtool.cc gnome-chemistry-utils-0.10.9/plugins/paint/bonds/bondtool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/bondtool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/bondtool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,876 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * bondtool.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "bondtool.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +gcpBondTool::gcpBondTool (gcp::Application *App, string ToolId, unsigned nPoints): gcp::Tool (App, ToolId) +{ + points = (nPoints)? gnome_canvas_points_new (nPoints): NULL; + m_pOp = NULL; + m_AutoDir = false; +} + +gcpBondTool::~gcpBondTool () +{ + if (points) gnome_canvas_points_free (points); +} + +bool gcpBondTool::OnClicked () +{ + if (Element::GetMaxBonds (m_pApp->GetCurZ()) < 1) + return false; + int i; + m_pAtom = NULL; + m_pItem = NULL; + m_bChanged = false; + m_dAngle = 0.; + gcp::Bond* pBond; + gcp::Document* pDoc = m_pView->GetDoc (); + if (m_pObject) + { + TypeId Id = m_pObject->GetType (); + switch (Id) + { + case BondType: + pBond = static_cast (m_pObject); + if (pBond->IsLocked ()) + return false; + m_pAtom = static_cast (pBond->GetAtom (0)); + m_pAtom->GetCoords (&m_x0, &m_y0, NULL); + m_pAtom = static_cast (pBond->GetAtom (1)); + m_pAtom->GetCoords (&m_x1, &m_y1, NULL); + m_x0 *= m_dZoomFactor; + m_y0 *= m_dZoomFactor; + m_x1 *= m_dZoomFactor; + m_y1 *= m_dZoomFactor; + points->coords[0] = m_x0; + points->coords[1] = m_y0; + m_bChanged = true; + m_pOp = pDoc->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + m_pOp->AddObject (m_pObjectGroup, 0); + UpdateBond (); + return true; + case FragmentType: + m_pObject = static_cast (m_pObject)->GetAtom (); + case AtomType: + if (!((gcp::Atom*) m_pObject)->AcceptNewBonds ()) + return false; + ((gcp::Atom*) m_pObject)->GetCoords (&m_x0, &m_y0, NULL); + m_x0 *= m_dZoomFactor; + m_y0 *= m_dZoomFactor; + points->coords[0] = m_x0; + points->coords[1] = m_y0; + /* search preferred orientation for new bond */ + i = ((gcp::Atom*) m_pObject)->GetBondsNumber (); + switch (i) { + case 0: + break; + case 1: { + map::iterator i; + gcp::Bond* bond = (gcp::Bond*) ((Atom*) m_pObject)->GetFirstBond (i); + m_RefAngle = m_dAngle = bond->GetAngle2D ((gcp::Atom*) m_pObject); + m_dAngle += (((m_nState & GDK_LOCK_MASK && (!(m_nState & GDK_MOD5_MASK))) || + ((!(m_nState & GDK_LOCK_MASK)) && m_nState & GDK_MOD5_MASK)))? + pDoc->GetBondAngle (): -pDoc->GetBondAngle (); + m_AutoDir = true; + break; + } + case 2: { + double a1, a2; + map::iterator i; + gcp::Bond* bond = (gcp::Bond*) ((Atom*) m_pObject)->GetFirstBond (i); + a1 = bond->GetAngle2D ((gcp::Atom*) m_pObject); + bond = (gcp::Bond*) ((Atom*) m_pObject)->GetNextBond (i); + a2 = bond->GetAngle2D ((gcp::Atom*) m_pObject); + m_dAngle = (a1 + a2) / 2.; + a2 = fabs (a2 - m_dAngle); + if (a2 < 90.) + m_dAngle += 180.; + if (m_dAngle > 360.) + m_dAngle -= 360.; + break; + } + default: + break; + } + break; + default: + return false; + } + } + else if (points) + { + points->coords[0] = m_x0; + points->coords[1] = m_y0; + } + double a = m_dAngle * M_PI / 180.; + m_x1 = m_x0 + pDoc->GetBondLength () * m_dZoomFactor * cos (a); + m_y1 = m_y0 - pDoc->GetBondLength () * m_dZoomFactor * sin (a); + GnomeCanvasItem* pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x1, m_y1); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + Object* pObject = NULL; + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + m_pAtom = NULL; + if (gcp::MergeAtoms && pObject && pObject != m_pObject) { + if ((pObject->GetType () == BondType) || (pObject->GetType () == FragmentType)) + { + m_pAtom = (gcp::Atom*) pObject->GetAtomAt (m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + } else if (pObject->GetType() == AtomType) { + m_pAtom = (gcp::Atom*)pObject; + } + } + if (m_pAtom) { + if (m_pObject) { + Object *group = m_pObject->GetMolecule ()->GetParent (); + if (group != pDoc) { + Object *other = m_pAtom->GetMolecule ()->GetParent (); + if (other != pDoc && group != other) + return true; + } + } + m_pAtom->GetCoords(&m_x1, &m_y1, NULL); + m_x1 *= m_dZoomFactor; + m_y1 *= m_dZoomFactor; + m_x = m_x1 - m_x0; + m_y = m_y1 - m_y0; + m_dAngle = atan(-m_y/m_x) * 90 / 1.570796326794897; + if (m_x < 0) m_dAngle += 180; + } + char tmp[32]; + snprintf (tmp, sizeof (tmp) - 1, _("Orientation: %g"), m_dAngle); + m_pApp->SetStatusText (tmp); + Draw (); + return true; +} + +void gcpBondTool::OnDrag () +{ + double x1, y1, x2, y2; + gcp::Document* pDoc = m_pView->GetDoc (); + gcp::Theme *Theme = pDoc->GetTheme (); + if ((m_pObject) && (m_pObject->GetType () == BondType)) { + if (((gcp::Bond*) m_pObject)->GetDist (m_x / m_dZoomFactor, m_y / m_dZoomFactor) < (Theme->GetPadding () + Theme->GetBondWidth () / 2) * m_dZoomFactor) { + if (!m_bChanged) { + gnome_canvas_item_show (m_pItem); + m_bChanged = true; + } + } else if (m_bChanged) { + gnome_canvas_item_hide (m_pItem); + m_bChanged = false; + } + } else { + if (m_pItem) { + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gtk_object_destroy (GTK_OBJECT (GNOME_CANVAS_ITEM (m_pItem))); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + m_pItem = NULL; + } + + GnomeCanvasItem* pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x, m_y); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + Object* pObject = NULL; + if (pItem) { + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + if (pObject && (pObject == m_pObject || ((pObject->GetType () == FragmentType) && dynamic_cast (pObject)->GetAtom () == m_pObject))) { + if (!m_AutoDir) + return; + } else + m_AutoDir = false; + } else + m_AutoDir = false; + double dAngle = 0.; + if (m_AutoDir) { + dAngle = m_dAngle = m_RefAngle + + ((((m_nState & GDK_LOCK_MASK && (!(m_nState & GDK_MOD5_MASK))) || + ((!(m_nState & GDK_LOCK_MASK)) && m_nState & GDK_MOD5_MASK)))? + pDoc->GetBondAngle (): -pDoc->GetBondAngle ()); + m_x = m_x1 = m_x0 + pDoc->GetBondLength () * m_dZoomFactor * cos (m_dAngle / 180 * M_PI); + m_y = m_y1 = m_y0 - pDoc->GetBondLength () * m_dZoomFactor * sin (m_dAngle / 180 * M_PI); + pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x, m_y); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + pObject = NULL; + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + } + m_pAtom = NULL; + if (gcp::MergeAtoms && pObject) { + if (pObject->GetType () == BondType) + m_pAtom = (gcp::Atom*) pObject->GetAtomAt (m_x / m_dZoomFactor, m_y / m_dZoomFactor); + else if (pObject->GetType () == FragmentType) + m_pAtom = (gcp::Atom*)pObject->GetAtomAt (m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + else if (pObject->GetType () == AtomType) + m_pAtom = (gcp::Atom*) pObject; + } + if (m_pAtom) { + if (m_pObject) { + Object *group = m_pObject->GetMolecule ()->GetParent (); + if (group != pDoc) { + Object *other = m_pAtom->GetMolecule ()->GetParent (); + if (other != pDoc && group != other) + return; + } + } + if ((Object*) m_pAtom == m_pObject) + return; + if (!m_pAtom->AcceptNewBonds ()) + return; + m_pAtom->GetCoords (&m_x1, &m_y1, NULL); + m_x1 *= m_dZoomFactor; + m_y1 *= m_dZoomFactor; + m_x = m_x1 - m_x0; + m_y = m_y1 - m_y0; + dAngle = atan (-m_y / m_x) * 180. / M_PI; + if (isnan (dAngle)) + dAngle = m_dAngle; + else if (m_x < 0.) + dAngle += 180.; + } else if (!m_AutoDir) { + m_x -= m_x0; + m_y -= m_y0; + if (m_x == 0) { + if (m_y == 0) + return; + dAngle = (m_y < 0) ? 90 : 270; + } else { + dAngle = atan (-m_y/m_x) * 180. / M_PI; + if (!(m_nState & GDK_CONTROL_MASK)) + dAngle = rint (dAngle / 5) * 5; + if (isnan (dAngle)) + dAngle = m_dAngle; + else if (m_x < 0.) + dAngle += 180.; + } + m_dAngle = dAngle; + if (m_nState & GDK_SHIFT_MASK) { + x1 = sqrt (square (m_x) + square (m_y)); + m_x1 = m_x0 + x1 * cos (m_dAngle / 180 * M_PI); + m_y1 = m_y0 - x1 * sin (m_dAngle / 180 * M_PI); + } else { + m_x1 = m_x0 + pDoc->GetBondLength () * m_dZoomFactor * cos (m_dAngle / 180 * M_PI); + m_y1 = m_y0 - pDoc->GetBondLength () * m_dZoomFactor * sin (m_dAngle / 180 * M_PI); + } + } + char tmp[32]; + if (dAngle < 0) + dAngle += 360.; + snprintf (tmp, sizeof (tmp) - 1, _("Orientation: %g"), dAngle); + m_pApp->SetStatusText (tmp); + Draw (); + } +} + +void gcpBondTool::OnRelease () +{ + double x1, y1, x2, y2; + gcp::Document* pDoc = m_pView->GetDoc (); + if (m_pItem) { + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gtk_object_destroy (GTK_OBJECT(GNOME_CANVAS_ITEM (m_pItem))); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + m_pItem = NULL; + } else { + if (m_pOp) + pDoc->AbortOperation (); + m_pOp = NULL; + return; + } + if ((m_pObject) && (m_pObject->GetType () == BondType)) { + FinalizeBond (); + gcp::Atom* pAtom = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (0); + pAtom->Update (); + m_pView->Update (pAtom); + pAtom = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (1); + pAtom->Update (); + m_pView->Update (pAtom); + m_pOp->AddObject (m_pObjectGroup, 1); + pDoc->FinishOperation (); + m_pOp = NULL; + m_pObject->EmitSignal (gcp::OnChangedSignal); + return; + } else { + if (m_pOp) + pDoc->AbortOperation(); + m_pOp = NULL; + } + m_pApp->ClearStatus (); + GnomeCanvasItem* pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x1, m_y1); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + Object* pObject = NULL; + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + m_pAtom = NULL; + if (pObject == NULL) { + std::map::iterator i = m_pData->Items.begin (), + end = m_pData->Items.end (); + gcp::Bond* pBond; + while (i != end) { + if ((*i).first->GetType () == gcu::BondType) { + pBond = (gcp::Bond*) (*i).first; + if (pBond->GetDist(m_x1 / pDoc->GetTheme ()->GetZoomFactor (), m_y1 / pDoc->GetTheme ()->GetZoomFactor ()) < (pDoc->GetTheme ()->GetPadding () + pDoc->GetTheme ()->GetBondWidth () / 2) / pDoc->GetTheme ()->GetZoomFactor ()) { + pItem = GNOME_CANVAS_ITEM ((*i).second); + m_pObject = pBond; + break; + } else { + // may be one of the atoms might work + gcu::Atom *pAtom = pBond->GetAtom (0); + double xa, ya; + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pDoc->GetTheme ()->GetZoomFactor (); + ya *= pDoc->GetTheme ()->GetZoomFactor (); + xa =- m_x1; + ya -= m_y1; + if (sqrt (xa * xa + ya * ya) < 3.5) { + //3.5 is arbitrary + m_pObject = pAtom; + break; + } + pAtom = pBond->GetAtom (1); + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pDoc->GetTheme ()->GetZoomFactor (); + ya *= pDoc->GetTheme ()->GetZoomFactor (); + xa =- m_x1; + ya -= m_y1; + if (sqrt (xa * xa + ya * ya) < 3.5) { + pObject = pAtom; + break; + } + } + } else if ((*i).first->GetType () == gcu::AtomType) { + double xa, ya; + gcu::Atom *pAtom = (gcu::Atom*) (*i).first; + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pDoc->GetTheme ()->GetZoomFactor (); + ya *= pDoc->GetTheme ()->GetZoomFactor (); + xa -= m_x1; + ya -= m_y1; + if (sqrt (xa * xa + ya * ya) < 3.5) { + //3.5 is arbitrary + pObject = pAtom; + break; + } + } + i++; + } + } + if (gcp::MergeAtoms && pObject) { + if (pObject->GetType () == BondType) + m_pAtom = (gcp::Atom*) pObject->GetAtomAt (m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + else if (pObject->GetType() == FragmentType) + m_pAtom = (gcp::Atom*) pObject->GetAtomAt (m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + else if (pObject->GetType() == AtomType) + m_pAtom = (gcp::Atom*) pObject; + } + gcp::Atom* pAtom; + gcp::Bond* pBond; + if (!m_pObject) { + //Add an atom at (x0, y0) + pAtom = new gcp::Atom (m_pApp->GetCurZ(), m_x0 / m_dZoomFactor, m_y0 / m_dZoomFactor, 0); + pDoc->AddAtom (pAtom); + m_pObject = pAtom; + } else { + pObject = m_pObject->GetGroup (); + if (pObject) + ModifiedObjects.insert (pObject->GetId ()); + } + if (m_pObject->GetType () == AtomType) { + if (m_pAtom) { + if (m_pObject == m_pAtom) { + ModifiedObjects.clear (); + return; + } + pObject = m_pAtom->GetGroup (); + if (!pObject) + throw runtime_error (_("Invalid document tree, please file a bug report")); + ModifiedObjects.insert (pObject->GetId ()); + pAtom = m_pAtom; + } else { + pAtom = new gcp::Atom (m_pApp->GetCurZ (), m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor, 0); + pDoc->AddAtom (pAtom); + } + pBond = (gcp::Bond*) pAtom->GetBond ((gcp::Atom*) m_pObject); + if (pBond) { + m_pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + m_pOp->AddObject (pBond->GetGroup (), 0); + if (pBond->GetType () == gcp::NormalBondType) + pBond->IncOrder (); + m_pObject = pBond; + m_bChanged = true; + FinalizeBond (); + gcp::Atom* pAtom = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (0); + pAtom->Update (); + m_pView->Update (pAtom); + pAtom = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (1); + pAtom->Update (); + m_pView->Update (pAtom); + m_pView->Update (pBond); + m_pOp->AddObject (pBond->GetGroup (), 1); + pDoc->FinishOperation (); + m_pOp = NULL; + } else { + // Push modified objects in Operation + if (ModifiedObjects.size ()) { + m_pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + set::iterator it, end = ModifiedObjects.end (); + for (it = ModifiedObjects.begin (); it != end; it++) + m_pOp->AddObject (pDoc->GetDescendant ((*it).c_str ()), 0); + } + pBond = new gcp::Bond ((gcp::Atom*) m_pObject, pAtom, 1); + SetType (pBond); + pDoc->AddBond (pBond); + if (m_pOp) { + set::iterator it, end = ModifiedObjects.end (); + for (it = ModifiedObjects.begin (); it != end; it++) { + pObject = pDoc->GetDescendant ((*it).c_str ()); + if (pObject) + m_pOp->AddObject (pObject, 1); + } + } else { + m_pOp = pDoc-> GetNewOperation (gcp::GCP_ADD_OPERATION); + m_pOp->AddObject (pBond->GetMolecule ()); + } + pDoc->FinishOperation (); + } + } + ModifiedObjects.clear (); +} + +void gcpBondTool::Draw () +{ + double x1, y1, x2, y2; + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + points->coords[2] = m_x1; + points->coords[3] = m_y1; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_line_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetBondWidth (), + NULL); + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); +} + +void gcpBondTool::UpdateBond() +{ + double x1, y1, x2, y2; + int i = 1; + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + BondOrder = ((gcp::Bond*) m_pObject)->GetOrder (); + if (((gcp::Bond*) m_pObject)->GetType () == gcp::NormalBondType) + ((gcp::Bond*) m_pObject)->IncOrder (); + m_pItem = gnome_canvas_item_new (m_pGroup, gnome_canvas_group_ext_get_type (), NULL); + while (((gcp::Bond*) m_pObject)->GetLine2DCoords (i++, &x1, &y1, &x2, &y2)) { + points->coords[0] = x1 * m_dZoomFactor; + points->coords[1] = y1 * m_dZoomFactor; + points->coords[2] = x2 * m_dZoomFactor; + points->coords[3] = y2 * m_dZoomFactor; + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_line_get_type (), + "points", points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetBondWidth (), + NULL); + } + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); +} + +void gcpBondTool::FinalizeBond () +{ + if (m_bChanged) { + gcp::Bond* pBond = (gcp::Bond*) m_pObject; + if (pBond->GetType () == gcp::NormalBondType) { + pBond->Revert (); + m_pView->Update (m_pObject); + } else { + pBond->SetType (gcp::NormalBondType); + m_pView->Remove (m_pObject); + m_pView->AddObject (m_pObject); + } + } + else ((gcp::Bond*) m_pObject)->SetOrder (BondOrder); + m_pView->Update(((gcp::Bond*) m_pObject)->GetAtom (0)); + m_pView->Update(((gcp::Bond*) m_pObject)->GetAtom (1)); +} + +void gcpBondTool::SetType (gcp::Bond* pBond) +{ + pBond->SetType (gcp::NormalBondType); +} + +static void on_length_changed (GtkSpinButton *btn, gcpBondTool *tool) +{ + tool->SetLength (gtk_spin_button_get_value (btn)); +} + +static void on_angle_changed (GtkSpinButton *btn, gcpBondTool *tool) +{ + tool->SetAngle (gtk_spin_button_get_value (btn)); +} + +static void on_merge_toggled (GtkToggleButton *btn) +{ + gcp::MergeAtoms = gtk_toggle_button_get_active (btn); +} + +void gcpBondTool::SetAngle (double angle) +{ + m_pApp->GetActiveDocument ()->SetBondAngle (angle); +} + +void gcpBondTool::SetLength (double length) +{ + m_pApp->GetActiveDocument ()->SetBondLength (length); +} + +GtkWidget *gcpBondTool::GetPropertyPage () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/bond.glade", "bond", GETTEXT_PACKAGE); + m_LengthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-length")); + g_signal_connect (m_LengthBtn, "value-changed", G_CALLBACK (on_length_changed), this); + m_AngleBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-angle")); + g_signal_connect (m_AngleBtn, "value-changed", G_CALLBACK (on_angle_changed), this); + m_MergeBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "merge")); + g_signal_connect (m_MergeBtn, "toggled", G_CALLBACK (on_merge_toggled), NULL); + return glade_xml_get_widget (xml, "bond"); +} + +void gcpBondTool::Activate () +{ + gcp::Document *pDoc = m_pApp->GetActiveDocument (); + gtk_spin_button_set_value (m_LengthBtn, pDoc->GetBondLength ()); + gtk_spin_button_set_value (m_AngleBtn, pDoc->GetBondAngle ()); + gtk_toggle_button_set_active (m_MergeBtn, gcp::MergeAtoms); +} + +gcpUpBondTool::gcpUpBondTool (gcp::Application *App): gcpBondTool (App, "UpBond", 3) +{ +} + +gcpUpBondTool::~gcpUpBondTool () +{ +} + +void gcpUpBondTool::Draw () +{ + double dx, dy, x1, y1, x2, y2; + gcp::Theme *Theme = m_pView->GetDoc ()->GetTheme (); + x1 = sqrt (square (m_x1 - m_x0) + square (m_y1 - m_y0)); + if (x1 == 0) + return; + dx = (m_y0 - m_y1) / x1 * Theme->GetStereoBondWidth () / 2; + dy = (m_x1 - m_x0) / x1 * Theme->GetStereoBondWidth () / 2; + points->coords[2] = m_x1 + dx; + points->coords[3] = m_y1 + dy; + points->coords[4] = m_x1 - dx; + points->coords[5] = m_y1 - dy; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_polygon_get_type (), + "points", points, + "fill_color", gcp::AddColor, + NULL); + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); +} + +void gcpUpBondTool::UpdateBond () +{ + if (((gcp::Bond*) m_pObject)->GetType () == gcp::UpBondType) { + m_x = m_x0; + m_x0 = m_x1; + m_x1 = m_x; + m_y = m_y0; + m_y0 = m_y1; + m_y1 = m_y; + points->coords[0] = m_x0; + points->coords[1] = m_y0; + } + Draw (); +} + +void gcpUpBondTool::FinalizeBond() +{ + if (m_bChanged) { + gcp::Bond* pBond = (gcp::Bond*) m_pObject; + if (pBond->GetType () == gcp::UpBondType) { + pBond->Revert (); + m_pView->Update (m_pObject); + } else { + pBond->SetType (gcp::UpBondType); + m_pView->Remove (m_pObject); + m_pView->AddObject (m_pObject); + } + } +} + +void gcpUpBondTool::SetType (gcp::Bond* pBond)//FIXME: Is it really useful? +{ + pBond->SetType (gcp::UpBondType); +} + +gcpDownBondTool::gcpDownBondTool (gcp::Application *App): gcpBondTool (App, "DownBond", 4) +{ +} + +gcpDownBondTool::~gcpDownBondTool () +{ +} + +void gcpDownBondTool::Draw() +{ + double dx, dy, dx1, dy1, length; + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + m_pItem = gnome_canvas_item_new (m_pGroup, gnome_canvas_group_ext_get_type (), NULL); + length = sqrt (square (m_x1 - m_x0) + square (m_y1 - m_y0)); + if (length == 0.0) + return; + int n = int (floor (length / (pTheme->GetHashDist () + pTheme->GetHashWidth ()))); + dx1 = (m_x1 - m_x0) / length * pTheme->GetHashWidth (); + dy1 = (m_y1 - m_y0) / length * pTheme->GetHashWidth (); + dx = (m_y0 - m_y1) / length * pTheme->GetStereoBondWidth () / 2; + dy = (m_x1 - m_x0) / length * pTheme->GetStereoBondWidth () / 2; + points->coords[0] = m_x0 + dx; + points->coords[1] = m_y0 + dy; + points->coords[2] = m_x0 - dx; + points->coords[3] = m_y0 - dy; + dx *= (1 - pTheme->GetHashWidth () / length); + dy *= (1 - pTheme->GetHashWidth () / length); + points->coords[4] = m_x0 + dx1 - dx; + points->coords[5] = m_y0 + dy1 - dy; + points->coords[6] = m_x0 + dx1 + dx; + points->coords[7] = m_y0 + dy1 + dy; + dx = (m_x1 - m_x0) / length * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + - (m_y0 - m_y1) / length * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / length; + dy = (m_y1 - m_y0) / length * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + - (m_x1 - m_x0) / length * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / length; + dx1 = (m_x1 - m_x0) / length * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + + (m_y0 - m_y1) / length * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / length; + dy1 = (m_y1 - m_y0) / length * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) + + (m_x1 - m_x0) / length * pTheme->GetStereoBondWidth () / 2 * (pTheme->GetHashDist () + pTheme->GetHashWidth ()) / length; + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_polygon_get_type (), + "points", points, + "fill_color", gcp::AddColor, + NULL); + for (int i = 1; i < n; i++) { + points->coords[0] += dx; + points->coords[1] += dy; + points->coords[2] += dx1; + points->coords[3] += dy1; + points->coords[6] += dx; + points->coords[7] += dy; + points->coords[4] += dx1; + points->coords[5] += dy1; + gnome_canvas_item_new ( + GNOME_CANVAS_GROUP (m_pItem), + gnome_canvas_polygon_get_type (), + "points", points, + "fill_color", gcp::AddColor, + NULL); + } + gnome_canvas_item_get_bounds (m_pItem, &dx, &dy, &dx1, &dy1); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) dx, (int) dy, (int) dx1, (int) dy1); +} + +void gcpDownBondTool::UpdateBond () +{ + if (((gcp::Bond*) m_pObject)->GetType() == gcp::DownBondType) { + m_x = m_x0; + m_x0 = m_x1; + m_x1 = m_x; + m_y = m_y0; + m_y0 = m_y1; + m_y1 = m_y; + } + Draw (); +} + +void gcpDownBondTool::FinalizeBond () +{ + if (m_bChanged) { + gcp::Bond* pBond = (gcp::Bond*)m_pObject; + if (pBond->GetType () == gcp::DownBondType) { + pBond->Revert (); + m_pView->Update (m_pObject); + } else { + pBond->SetType (gcp::DownBondType); + m_pView->Remove (m_pObject); + m_pView->AddObject (m_pObject); + } + } +} + +void gcpDownBondTool::SetType (gcp::Bond* pBond) +{ + pBond->SetType (gcp::DownBondType); +} + +gcpForeBondTool::gcpForeBondTool (gcp::Application *App): gcpBondTool (App, "ForeBond", 4) +{ +} + +gcpForeBondTool::~gcpForeBondTool () +{ +} + +void gcpForeBondTool::Draw () +{ + double dx, dy, x1, y1, x2, y2; + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + x1 = sqrt (square (m_x1 - m_x0) + square (m_y1 - m_y0)); + if (x1 == 0) + return; + dx = (m_y0 - m_y1) / x1 * pTheme->GetStereoBondWidth () / 2; + dy = (m_x1 - m_x0) / x1 * pTheme->GetStereoBondWidth () / 2; + points->coords[0] = m_x0 + dx; + points->coords[1] = m_y0 + dy; + points->coords[2] = m_x1 + dx; + points->coords[3] = m_y1 + dy; + points->coords[4] = m_x1 - dx; + points->coords[5] = m_y1 - dy; + points->coords[6] = m_x0 - dx; + points->coords[7] = m_y0 - dy; + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_polygon_get_type (), + "points", points, + "fill_color", gcp::AddColor, + NULL); + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); +} + +void gcpForeBondTool::UpdateBond () +{ + Draw (); +} + +void gcpForeBondTool::FinalizeBond () +{ + if (m_bChanged) { + gcp::Bond* pBond = (gcp::Bond*) m_pObject; + if (pBond->GetType () != gcp::ForeBondType) { + pBond->SetType (gcp::ForeBondType); + m_pView->Remove (m_pObject); + m_pView->AddObject (m_pObject); + } + } +} + +void gcpForeBondTool::SetType (gcp::Bond* pBond) +{ + pBond->SetType (gcp::ForeBondType); +} + +gcpSquiggleBondTool::gcpSquiggleBondTool (gcp::Application *App): gcpBondTool (App, "SquiggleBond", 4) +{ +} + +gcpSquiggleBondTool::~gcpSquiggleBondTool () +{ +} + +void gcpSquiggleBondTool::Draw () +{ + GnomeCanvasPathDef *path_def; + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + path_def = gnome_canvas_path_def_new (); + gnome_canvas_path_def_moveto (path_def, m_x0, m_y0); + double x = m_x0, y = m_y0, dx, dy, length, x1, x2, y1, y2; + length = sqrt (square (m_x1 - m_x0) + square (m_y1 - m_y0)); + int n = (int)length / 3, s = 1; + dx = (m_x1 - m_x0) / n; + dy = (m_y1 - m_y0) / n; + for (int i = 1; i < n; i++) { + x1 = x + dx / 3 + dy /1.5 * s; + y1 = y + dy / 3 - dx /1.5 * s; + x2 = x + dx / 1.5 + dy /1.5 * s; + y2 = y + dy / 1.5 - dx /1.5 * s; + x += dx; + y += dy; + s *= -1; + gnome_canvas_path_def_curveto (path_def, x1, y1, x2, y2, x, y); + } + x1 = x + dx / 3 + dy /1.5 * s; + y1 = y + dy / 3 - dx /1.5 * s; + x2 = x + dx / 1.5 + dy /1.5 * s; + y2 = y + dy / 1.5 - dx /1.5 * s; + gnome_canvas_path_def_curveto (path_def, x1, y1, x2, y2, m_x1, m_y1); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_bpath_get_type (), + "outline_color", gcp::AddColor, + "width_units", pTheme->GetBondWidth (), + "bpath", path_def, + NULL); + gnome_canvas_path_def_unref (path_def); +} + +void gcpSquiggleBondTool::UpdateBond () +{ + Draw (); +} + +void gcpSquiggleBondTool::FinalizeBond () +{ + if (m_bChanged) { + gcp::Bond* pBond = (gcp::Bond*) m_pObject; + if (pBond->GetType () == gcp::UndeterminedBondType) { + pBond->Revert (); + m_pView->Update (m_pObject); + } else { + pBond->SetType (gcp::UndeterminedBondType); + m_pView->Remove (m_pObject); + m_pView->AddObject (m_pObject); + } + } +} + +void gcpSquiggleBondTool::SetType (gcp::Bond* pBond) +{ + pBond->SetType (gcp::UndeterminedBondType); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/bondtool.h gnome-chemistry-utils-0.10.9/plugins/paint/bonds/bondtool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/bondtool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/bondtool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,122 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * bondtool.h + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_BOND_TOOL_H +#define GCHEMPAINT_BOND_TOOL_H + +#include + +namespace gcp { + class Atom; + class Operation; +} + +class gcpBondTool: public gcp::Tool +{ +public: + gcpBondTool (gcp::Application *App, std::string ToolId = "Bond", unsigned nPoints = 2); + virtual ~gcpBondTool (); + + bool OnClicked (); + void OnDrag (); + void OnRelease (); + GtkWidget *GetPropertyPage (); + void Activate (); + void SetAngle (double angle); + void SetLength (double length); + char const *GetHelpTag () {return "bond";} + +protected: + virtual void Draw (); + virtual void UpdateBond (); + virtual void FinalizeBond (); + virtual void SetType (gcp::Bond* pBond); + +protected: + double m_dAngle; + gcp::Atom* m_pAtom; + GnomeCanvasPoints *points; + unsigned char BondOrder; + +private: + gcp::Operation *m_pOp; + GtkSpinButton *m_LengthBtn, *m_AngleBtn; + GtkToggleButton *m_MergeBtn; + bool m_AutoDir; + double m_RefAngle; +}; + +class gcpUpBondTool: public gcpBondTool +{ +public: + gcpUpBondTool (gcp::Application *App); + virtual ~gcpUpBondTool (); + +protected: + virtual void Draw (); + virtual void UpdateBond (); + virtual void FinalizeBond (); + virtual void SetType (gcp::Bond* pBond); +}; + +class gcpForeBondTool: public gcpBondTool +{ +public: + gcpForeBondTool (gcp::Application *App); + virtual ~gcpForeBondTool (); + +protected: + virtual void Draw (); + virtual void UpdateBond (); + virtual void FinalizeBond (); + virtual void SetType (gcp::Bond* pBond); +}; + +class gcpDownBondTool: public gcpBondTool +{ +public: + gcpDownBondTool (gcp::Application *App); + virtual ~gcpDownBondTool (); + +protected: + virtual void Draw (); + virtual void UpdateBond (); + virtual void FinalizeBond (); + virtual void SetType (gcp::Bond* pBond); +}; + +class gcpSquiggleBondTool: public gcpBondTool +{ +public: + gcpSquiggleBondTool (gcp::Application *App); + virtual ~gcpSquiggleBondTool (); + +protected: + virtual void Draw(); + virtual void UpdateBond(); + virtual void FinalizeBond(); + virtual void SetType(gcp::Bond* pBond); +}; + +#endif // GCHEMPAINT_BOND_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/bonds/chain24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/bonds/chain24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/chain.glade gnome-chemistry-utils-0.10.9/plugins/paint/bonds/chain.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/chain.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/chain.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,238 @@ + + + + + + True + window1 + + + True + 3 + 6 + 4 + 10 + 6 + + + + + + + + + + + + + + + + + + True + + + 4 + 4 + 5 + GTK_FILL + + + + + True + 8 + + + True + If set, the number of new bonds will be evaluated from the mouse position + True + False + 0 + True + + + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + 0 + + + 3 + 4 + + + + + + True + True + Use existing atoms for end of bonds + _Merge with existing atoms + True + 0 + True + + + 4 + 5 + 6 + + + + + + True + 0 + <b>Property</b> + True + + + GTK_FILL + + + + + + True + True + Number of new bonds + 2 2 100 1 10 0 + 1 + + + 2 + 3 + 3 + 4 + GTK_FILL + + + + + + True + True + Angle between two new bonds in an open chain + 120 90 150 1 10 0 + 1 + 1 + True + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + True + Default length for new bonds + 140 90 500 1 10 0 + 1 + 1 + True + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + True + 0 + <b>Value</b> + True + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + <b>Auto</b> + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Bonds _number: + True + bonds-number + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + Bond _angle: + True + bond-angle + + + 2 + 3 + GTK_FILL + + + + + + True + True + 0 + Bond len_gth: + True + bond-length + + + 1 + 2 + GTK_FILL + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/chaintool.cc gnome-chemistry-utils-0.10.9/plugins/paint/bonds/chaintool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/chaintool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/chaintool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,520 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * chaintool.cc + * + * Copyright (C) 2006-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "chaintool.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +gcpChainTool::gcpChainTool (gcp::Application *App): gcp::Tool (App, "Chain") +{ + m_Length = 0; // < 2 is auto. + m_Points = gnome_canvas_points_new (3); + m_Atoms.resize (3); + m_CurPoints = 3; + m_AutoNb = true; + m_AutoDir = false; +} + +gcpChainTool::~gcpChainTool() +{ + gnome_canvas_points_free (m_Points); +} + +bool gcpChainTool::OnClicked() +{ + if (Element::GetMaxBonds (m_pApp->GetCurZ()) < 2) + return false; + m_dAngle = 0.; + unsigned nb = (m_Length > 2)? m_Length + 1: 3; + double a1, x, y; + gcp::Document* pDoc = m_pView->GetDoc(); + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + m_BondLength = pDoc->GetBondLength (); + if (nb != m_CurPoints) { + m_CurPoints = nb; + gnome_canvas_points_free (m_Points); + m_Points = gnome_canvas_points_new (m_CurPoints); + if (m_CurPoints > m_Atoms.size ()) + m_Atoms.resize (m_CurPoints); + } + m_Positive = (m_nState & GDK_LOCK_MASK && !(m_nState & GDK_MOD5_MASK)) || + (m_nState & GDK_MOD5_MASK && !(m_nState & GDK_LOCK_MASK)); + if (m_pObject) { + if (m_pObject->GetType () != AtomType) + return false; + m_Atoms[0] = static_cast (m_pObject); + if (!m_Atoms[0]->AcceptNewBonds (1)) + return false; + nb = m_Atoms[0]->GetBondsNumber (); + m_Atoms[0]->GetCoords(&m_x0, &m_y0, NULL); + x = m_x0 *= m_dZoomFactor; + y = m_y0 *= m_dZoomFactor; + m_Points->coords[0] = m_x0; + m_Points->coords[1] = m_y0; + switch (nb) { + case 1: { + map::iterator i; + gcp::Bond* bond = (gcp::Bond*) ((Atom*) m_pObject)->GetFirstBond (i); + m_RefAngle = m_dAngle = bond->GetAngle2D ((gcp::Atom*) m_pObject); + m_dAngle += (m_Positive)? +150: -150; + m_AutoDir = true; + break; + } + case 2: { + double a2; + map::iterator i; + gcp::Bond* bond = (gcp::Bond*) ((Atom*) m_pObject)->GetFirstBond (i); + a1 = bond->GetAngle2D ((gcp::Atom*) m_pObject); + bond = (gcp::Bond*) ((Atom*) m_pObject)->GetNextBond (i); + a2 = bond->GetAngle2D ((gcp::Atom*) m_pObject); + m_dAngle = (a1 + a2) / 2.; + a2 = fabs (a2 - m_dAngle); + if (a2 < 90.) + m_dAngle += 180.; + if (m_dAngle > 360.) + m_dAngle -= 360.; + m_dAngle += (m_Positive)? + 90. - pDoc->GetBondAngle () / 2.: + pDoc->GetBondAngle () / 2. - 90; + break; + } + default: + break; + } + } else { + m_Atoms[0] = NULL; + x = m_Points->coords[0] = m_x0; + y = m_Points->coords[1] = m_y0; + m_AutoDir = true; + } + FindAtoms (); + m_Allowed = false; + if (gcp::MergeAtoms && !(m_Allowed = CheckIfAllowed ())) + return true; // true, since dragging the mouse might make things OK. + char tmp[32]; + snprintf(tmp, sizeof(tmp) - 1, _("Bonds: %d, Orientation: %g"), m_CurPoints - 1, m_dAngle); + m_pApp->SetStatusText(tmp); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_line_get_type (), + "points", m_Points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetBondWidth (), + NULL); + m_dMeanLength = pDoc->GetBondLength () * sin (pDoc->GetBondAngle () / 360. * M_PI) * m_dZoomFactor; + m_Allowed = true; + return true; +} + +void gcpChainTool::OnDrag () +{ + double x1, y1, x2, y2; + unsigned nb; + gcp::Document* pDoc = m_pView->GetDoc (); + gcp::Theme *pTheme = pDoc->GetTheme (); + if (m_pItem) { + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gtk_object_destroy (GTK_OBJECT(GNOME_CANVAS_ITEM (m_pItem))); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + m_pItem = NULL; + } + m_BondLength = pDoc->GetBondLength (); + GnomeCanvasItem* pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x, m_y); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + Object* pObject = NULL; + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + double dAngle = m_dAngle; + gcp::Atom *pAtom = NULL; + if (pObject) { + if (pObject->GetType () == BondType) + pAtom = (gcp::Atom*) pObject->GetAtomAt (m_x / m_dZoomFactor, m_y / m_dZoomFactor); + else if (pObject->GetType () == FragmentType) + pAtom = (gcp::Atom*) pObject->GetAtomAt (m_x1 / m_dZoomFactor, m_y1 / m_dZoomFactor); + else if (pObject->GetType () == AtomType) + pAtom = (gcp::Atom*) pObject; + } + m_Positive = (m_nState & GDK_LOCK_MASK && !(m_nState & GDK_MOD5_MASK)) || + (m_nState & GDK_MOD5_MASK && !(m_nState & GDK_LOCK_MASK)); + if (m_pObject && pAtom == m_pObject) { + if (m_AutoDir) { + m_dAngle = m_RefAngle + ((m_Positive)? +150: -150); + pAtom = NULL; + } else + return; + } else if (m_pObject || m_x != m_x0 || m_y != m_y0) + m_AutoDir = false; + // If m_Length has changed, adjust the points number + if (m_Length > 1 && m_CurPoints != m_Length + 1) { + m_CurPoints = m_Length + 1; + gnome_canvas_points_free (m_Points); + m_Points = gnome_canvas_points_new (m_CurPoints); + if (m_CurPoints > m_Atoms.size ()) + m_Atoms.resize (m_CurPoints); + } + if (pAtom && gcp::MergeAtoms) { + // in that case, end the chain there with the current number of bonds + pAtom->GetCoords (&m_x, &m_y, NULL); + m_x *= m_dZoomFactor; + m_y *= m_dZoomFactor; + m_x-= m_x0; + m_y -= m_y0; + x2 = sqrt (m_x * m_x + m_y * m_y); + if (m_CurPoints % 2 == 0) { + x1 = m_dMeanLength * (m_CurPoints - 1); + y1 = pDoc->GetBondLength () * cos (pDoc->GetBondAngle () / 360. * M_PI) * m_dZoomFactor; + m_dAngle = (atan2 (-m_y, m_x) - atan2((m_Positive)? -y1: y1, x1)) / M_PI * 180.; + m_BondLength = pDoc->GetBondLength () * x2 / x1; + } else { + m_dAngle = atan2 (-m_y, m_x) / M_PI * 180.; + m_BondLength = x2 / (m_CurPoints - 1) / sin (pDoc->GetBondAngle () / 360. * M_PI) / m_dZoomFactor; + } + } else if (!m_AutoDir) { + m_x-= m_x0; + m_y -= m_y0; + if (m_x == 0) { + if (m_y == 0) + return; + dAngle = (m_y < 0)? 90: 270; + } else { + // calculate the angle and the real distance + dAngle = atan (-m_y/m_x) * 180 / M_PI; + if (!(m_nState & GDK_CONTROL_MASK)) + dAngle = rint(dAngle / 5) * 5; + if (isnan (dAngle)) + dAngle = m_dAngle; + else if (m_x < 0.) + dAngle += 180.; + } + m_dAngle = dAngle; + // Calculate number of bonds if Shift key is not pressed and we do use + // an automatic bonds number (otherwise, change the bonds lengths, + // but not their number + dAngle = atan2 (-m_y, m_x) - m_dAngle * M_PI / 180.; + x2 = sqrt ((m_x * m_x + m_y * m_y) * cos (dAngle)); + if (m_nState & GDK_SHIFT_MASK) + m_BondLength = x2 / (m_CurPoints - 1) / sin (pDoc->GetBondAngle () / 360. * M_PI) / m_dZoomFactor; + else if (m_Length < 2) { + nb = 1 + (unsigned) rint (x2 / m_dMeanLength); + if (nb < 3) + nb = 3; + if (nb != m_CurPoints) { + m_CurPoints = nb; + gnome_canvas_points_free (m_Points); + m_Points = gnome_canvas_points_new (m_CurPoints); + if (m_CurPoints > m_Atoms.size ()) + m_Atoms.resize (m_CurPoints); + } + } + } + m_Points->coords[0] = m_x0; + m_Points->coords[1] = m_y0; + FindAtoms (); + if (gcp::MergeAtoms && !(m_Allowed = CheckIfAllowed ())) + return; + char tmp[32]; + snprintf (tmp, sizeof (tmp) - 1, _("Bonds: %d, Orientation: %g"), m_CurPoints - 1, m_dAngle); + m_pApp->SetStatusText(tmp); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_line_get_type (), + "points", m_Points, + "fill_color", gcp::AddColor, + "width_units", pTheme->GetBondWidth (), + NULL); +} + +void gcpChainTool::OnRelease () +{ + double x1, y1, x2, y2; + gcp::Document* pDoc = m_pView->GetDoc (); + unsigned nb; + gcp::Operation *pOp = NULL; + Object *pObject; + char const *Id; + gcp::Molecule *pMol = NULL; + gcp::Bond* pBond = NULL; + m_pApp->ClearStatus (); + m_AutoDir = false; + if (m_pItem) { + gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (m_pItem), &x1, &y1, &x2, &y2); + gtk_object_destroy (GTK_OBJECT(GNOME_CANVAS_ITEM (m_pItem))); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + m_pItem = NULL; + } else + return; + if (!m_Allowed) + return; + for (nb = 0; nb < m_CurPoints; nb++) { + if (m_Atoms[nb]) { + if (pMol == NULL) { + pMol = dynamic_cast (m_Atoms[0]->GetMolecule ()); + pMol->Lock (true); + } + pObject = m_Atoms[nb]->GetGroup (); + Id = pObject->GetId (); + if (ModifiedObjects.find (Id) == ModifiedObjects.end ()) { + if (!pOp) + pOp = pDoc->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + pOp->AddObject (pObject); + ModifiedObjects.insert (Id); + } + } else { + m_Atoms[nb] = new gcp::Atom (m_pApp->GetCurZ(), + m_Points->coords[2 * nb] / m_dZoomFactor, + m_Points->coords[2 * nb + 1] / m_dZoomFactor, + 0); + pDoc->AddAtom (m_Atoms[nb]); + } + // now add the bond. Atoms might be the same if the bonds are too short. + if (nb > 0 && m_Atoms[nb] != m_Atoms[nb - 1]) { + pBond = reinterpret_cast (m_Atoms[nb]->GetBond (m_Atoms[nb - 1])); + if (!pBond) { + pBond = new gcp::Bond (m_Atoms[nb - 1], m_Atoms[nb], 1); + pDoc->AddBond (pBond); + } + } + } + pObject = pBond->GetGroup (); + if (pOp) { + ModifiedObjects.insert (pObject->GetId ()); + set::iterator it, end = ModifiedObjects.end (); + for (it = ModifiedObjects.begin (); it != end; it++) { + pObject = pDoc->GetDescendant ((*it).c_str ()); + if (pObject) + pOp->AddObject (pObject, 1); + } + } else { + pOp = pDoc->GetNewOperation (gcp::GCP_ADD_OPERATION); + pOp->AddObject (pObject); + } + pDoc->FinishOperation (); + if (pMol) { + pMol->Lock (false); + pMol->EmitSignal (gcp::OnChangedSignal); + } + ModifiedObjects.clear (); +} + +static void on_length_changed (GtkSpinButton *btn, gcpChainTool *tool) +{ + tool->SetLength (gtk_spin_button_get_value (btn)); +} + +static void on_angle_changed (GtkSpinButton *btn, gcpChainTool *tool) +{ + tool->SetAngle (gtk_spin_button_get_value (btn)); +} + +static void on_merge_toggled (GtkToggleButton *btn) +{ + gcp::MergeAtoms = gtk_toggle_button_get_active (btn); +} + +static void on_number_toggled (GtkToggleButton *btn, gcpChainTool *tool) +{ + bool active = gtk_toggle_button_get_active (btn); + if (active) + tool->SetChainLength (0); + tool->SetAutoNumber (!gtk_toggle_button_get_active (btn)); +} + +static void on_number_changed (GtkSpinButton *btn, gcpChainTool *tool) +{ + tool->SetChainLength (gtk_spin_button_get_value_as_int (btn)); +} + +void gcpChainTool::SetAngle (double angle) +{ + m_pApp->GetActiveDocument ()->SetBondAngle (angle); +} + +void gcpChainTool::SetLength (double length) +{ + m_pApp->GetActiveDocument ()->SetBondLength (length); +} + +GtkWidget *gcpChainTool::GetPropertyPage () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/chain.glade", "chain", GETTEXT_PACKAGE); + m_LengthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-length")); + g_signal_connect (m_LengthBtn, "value-changed", G_CALLBACK (on_length_changed), this); + m_AngleBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-angle")); + g_signal_connect (m_AngleBtn, "value-changed", G_CALLBACK (on_angle_changed), this); + m_MergeBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "merge")); + g_signal_connect (m_MergeBtn, "toggled", G_CALLBACK (on_merge_toggled), NULL); + m_NumberBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bonds-number")); + gtk_widget_set_sensitive (GTK_WIDGET (m_NumberBtn), false); + g_signal_connect (m_NumberBtn, "value-changed", G_CALLBACK (on_number_changed), this); + m_AutoBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "auto-number")); + gtk_toggle_button_set_active (m_AutoBtn, true); + g_signal_connect (m_AutoBtn, "toggled", G_CALLBACK (on_number_toggled), this); + return glade_xml_get_widget (xml, "chain"); +} + +void gcpChainTool::Activate () +{ + gcp::Document *pDoc = m_pApp->GetActiveDocument (); + gtk_spin_button_set_value (m_LengthBtn, pDoc->GetBondLength ()); + gtk_spin_button_set_value (m_AngleBtn, pDoc->GetBondAngle ()); + gtk_toggle_button_set_active (m_MergeBtn, gcp::MergeAtoms); +} + +void gcpChainTool::FindAtoms () +{ + double x1 = m_Points->coords[0], y1 = m_Points->coords[1], a; + unsigned nb; + for (nb = 1; nb < m_CurPoints; nb++) { + a = (m_dAngle + + ((m_Positive ^ (nb % 2))? + 90. - m_pView->GetDoc ()->GetBondAngle () / 2.: + m_pView->GetDoc ()->GetBondAngle () / 2. - 90)) + * M_PI / 180.; + x1 += m_BondLength * m_dZoomFactor * cos (a); + y1 -= m_BondLength * m_dZoomFactor * sin (a); + m_Atoms[nb] = NULL; + if (gcp::MergeAtoms) { + GnomeCanvasItem* pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), x1, y1); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + Object* pObject = NULL; + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + if (pObject && pObject != m_pObject) { + if ((pObject->GetType () == BondType) || (pObject->GetType () == FragmentType)) { + m_Atoms[nb] = (gcp::Atom*) pObject->GetAtomAt (x1 / m_dZoomFactor, y1 / m_dZoomFactor); + } else if (pObject->GetType () == AtomType) { + m_Atoms[nb] = (gcp::Atom*) pObject; + } + } + if (m_Atoms[nb]) { + m_Atoms[nb]->GetCoords(&x1, &y1, NULL); + x1 *= m_dZoomFactor; + y1 *= m_dZoomFactor; + } + } + m_Points->coords[nb * 2] = x1; + m_Points->coords[nb * 2 + 1] = y1; + } +} + +bool gcpChainTool::CheckIfAllowed () +{ + unsigned i, n; + gcp::Document *pDoc = m_pView->GetDoc (); + Object *group, *other; + if (m_Atoms[0]) { + group = m_Atoms[0]->GetMolecule ()->GetParent (); + if (group == pDoc) + group = NULL; + } else + group = NULL; + for (i = 1; i < m_CurPoints; i++) { + if (m_Atoms[i] == NULL) + continue; + if (group == NULL) { + other = m_Atoms[i]->GetMolecule ()->GetParent (); + if (other != pDoc) + group = other; + } else { + other = m_Atoms[i]->GetMolecule ()->GetParent (); + if (other && other != pDoc && other != group) + return false; + } + n = (!m_Atoms[i]->GetBond(m_Atoms[i - 1]))? 1: 0; + if ((i < m_CurPoints - 1) && !m_Atoms[i]->GetBond(m_Atoms[i + 1])) + n++; + if (n && !m_Atoms[i]->AcceptNewBonds (n)) + return false; + } + return true; +} + +bool gcpChainTool::OnEvent (GdkEvent* event) +{ + if (event->type == GDK_KEY_PRESS) { + unsigned n; + switch (((GdkEventKey*) event)->keyval) { + case GDK_KP_0: + case GDK_0: + gtk_toggle_button_set_active (m_AutoBtn, true); + return true; + case GDK_KP_1: + case GDK_1: + n = 10; + break; + case GDK_KP_2: + case GDK_2: + n = 2; + break; + case GDK_KP_3: + case GDK_3: + n = 3; + break; + case GDK_KP_4: + case GDK_4: + n = 4; + break; + case GDK_KP_5: + case GDK_5: + n = 5; + break; + case GDK_KP_6: + case GDK_6: + n = 6; + break; + case GDK_KP_7: + case GDK_7: + n = 7; + break; + case GDK_KP_8: + case GDK_8: + n = 8; + break; + case GDK_KP_9: + case GDK_9: + n = 9; + break; + default: + return false; + } + gtk_toggle_button_set_active (m_AutoBtn, false); + gtk_spin_button_set_value (m_NumberBtn, n); + OnChangeState (); + } + return false; +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/chaintool.h gnome-chemistry-utils-0.10.9/plugins/paint/bonds/chaintool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/chaintool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/chaintool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,73 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * chaintool.h + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_CHAIN_TOOL_H +#define GCHEMPAINT_CHAIN_TOOL_H + +#include +#include +#include +#include + +namespace gcp { + class Atom; + class Operation; +} + +class gcpChainTool: public gcp::Tool +{ +public: + gcpChainTool (gcp::Application *App); + virtual ~gcpChainTool (); + + bool OnClicked(); + void OnDrag(); + void OnRelease(); + GtkWidget *GetPropertyPage (); + void Activate (); + bool OnEvent (GdkEvent* event); + + void SetAutoNumber (bool state) {gtk_widget_set_sensitive (GTK_WIDGET (m_NumberBtn), state);} + void SetChainLength (unsigned length) {m_Length = length;} + void SetAngle (double angle); + void SetLength (double length); + char const *GetHelpTag () {return "chain";} + +private: + void FindAtoms (); + bool CheckIfAllowed (); + +private: + unsigned m_Length, m_CurPoints; + bool m_Positive, m_AutoNb, m_Allowed; + double m_dAngle, m_dMeanLength, m_BondLength; + std::vector m_Atoms; + GnomeCanvasPoints *m_Points; + GtkSpinButton *m_LengthBtn, *m_AngleBtn, *m_NumberBtn; + GtkToggleButton *m_MergeBtn, *m_AutoBtn; + bool m_AutoDir; + double m_RefAngle; +}; + +#endif // GCHEMPAINT_CHAIN_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/bonds/delocalized24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/bonds/delocalized24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/delocalizedtool.cc gnome-chemistry-utils-0.10.9/plugins/paint/bonds/delocalizedtool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/delocalizedtool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/delocalizedtool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,47 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * delocalizedtool.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "delocalizedtool.h" + +gcpDelocalizedTool::gcpDelocalizedTool (gcp::Application *App): gcp::Tool (App, "DelocalizedBond") +{ +} + +gcpDelocalizedTool::~gcpDelocalizedTool () +{ +} + +bool gcpDelocalizedTool::OnClicked () +{ + return false; +} + +void gcpDelocalizedTool::OnDrag () +{ +} + +void gcpDelocalizedTool::OnRelease () +{ +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/delocalizedtool.h gnome-chemistry-utils-0.10.9/plugins/paint/bonds/delocalizedtool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/delocalizedtool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/delocalizedtool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,41 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * delocalizedtool.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_DELOCALIZED_TOOL_H +#define GCHEMPAINT_DELOCALIZED_TOOL_H + +#include + +class gcpDelocalizedTool: public gcp::Tool +{ +public: + gcpDelocalizedTool (gcp::Application *App); + virtual ~gcpDelocalizedTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); +}; + +#endif //GCHEMPAINT_DELOCALIZED_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/bonds/downbond24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/bonds/downbond24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/bonds/forebond24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/bonds/forebond24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/bonds/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,74 @@ +EXTRA_DIST = $(IMAGES) + +BUILT_SOURCES = gcp-stock-pixbufs.h + +CLEANFILES = $(BUILT_SOURCES) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(bondsdir)\" + +IMAGES = \ + bond24.png \ + chain24.png \ + delocalized24.png \ + downbond24.png \ + forebond24.png \ + upbond24.png \ + xbond24.png + +VARIABLES = \ + gcp_bond_24 $(srcdir)/bond24.png \ + gcp_chain_24 $(srcdir)/chain24.png \ + gcp_delocalizedbond_24 $(srcdir)/delocalized24.png \ + gcp_downbond_24 $(srcdir)/downbond24.png \ + gcp_forebond_24 $(srcdir)/forebond24.png \ + gcp_upbond_24 $(srcdir)/upbond24.png \ + gcp_xbond_24 $(srcdir)/xbond24.png + +bondsdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +bonds_LTLIBRARIES = bonds.la + +bonds_la_LDFLAGS = -module -avoid-version +bonds_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +bonds_la_SOURCES = \ + plugin.cc \ + bondtool.cc \ + chaintool.cc \ + delocalizedtool.cc + +noinst_HEADERS = \ + plugin.h \ + bondtool.h \ + chaintool.h \ + delocalizedtool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/bonds +dist_glade_DATA = \ + bond.glade \ + chain.glade + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/bonds/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/Makefile.in 2009-11-14 11:46:03.000000000 +0100 @@ -0,0 +1,710 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/bonds +DIST_COMMON = $(dist_glade_DATA) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(bondsdir)" "$(DESTDIR)$(gladedir)" +LTLIBRARIES = $(bonds_LTLIBRARIES) +bonds_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_bonds_la_OBJECTS = plugin.lo bondtool.lo chaintool.lo \ + delocalizedtool.lo +bonds_la_OBJECTS = $(am_bonds_la_OBJECTS) +bonds_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(bonds_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(bonds_la_SOURCES) +DIST_SOURCES = $(bonds_la_SOURCES) +DATA = $(dist_glade_DATA) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(bondsdir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(IMAGES) +BUILT_SOURCES = gcp-stock-pixbufs.h +CLEANFILES = $(BUILT_SOURCES) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +IMAGES = \ + bond24.png \ + chain24.png \ + delocalized24.png \ + downbond24.png \ + forebond24.png \ + upbond24.png \ + xbond24.png + +VARIABLES = \ + gcp_bond_24 $(srcdir)/bond24.png \ + gcp_chain_24 $(srcdir)/chain24.png \ + gcp_delocalizedbond_24 $(srcdir)/delocalized24.png \ + gcp_downbond_24 $(srcdir)/downbond24.png \ + gcp_forebond_24 $(srcdir)/forebond24.png \ + gcp_upbond_24 $(srcdir)/upbond24.png \ + gcp_xbond_24 $(srcdir)/xbond24.png + +bondsdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +bonds_LTLIBRARIES = bonds.la +bonds_la_LDFLAGS = -module -avoid-version +bonds_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +bonds_la_SOURCES = \ + plugin.cc \ + bondtool.cc \ + chaintool.cc \ + delocalizedtool.cc + +noinst_HEADERS = \ + plugin.h \ + bondtool.h \ + chaintool.h \ + delocalizedtool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/bonds +dist_glade_DATA = \ + bond.glade \ + chain.glade + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/bonds/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/bonds/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-bondsLTLIBRARIES: $(bonds_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(bondsdir)" || $(MKDIR_P) "$(DESTDIR)$(bondsdir)" + @list='$(bonds_LTLIBRARIES)'; test -n "$(bondsdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(bondsdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(bondsdir)"; \ + } + +uninstall-bondsLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(bonds_LTLIBRARIES)'; test -n "$(bondsdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(bondsdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(bondsdir)/$$f"; \ + done + +clean-bondsLTLIBRARIES: + -test -z "$(bonds_LTLIBRARIES)" || rm -f $(bonds_LTLIBRARIES) + @list='$(bonds_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +bonds.la: $(bonds_la_OBJECTS) $(bonds_la_DEPENDENCIES) + $(bonds_la_LINK) -rpath $(bondsdir) $(bonds_la_OBJECTS) $(bonds_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bondtool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chaintool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delocalizedtool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_gladeDATA: $(dist_glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-dist_gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(bondsdir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-bondsLTLIBRARIES clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-bondsLTLIBRARIES install-dist_gladeDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-bondsLTLIBRARIES uninstall-dist_gladeDATA + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-bondsLTLIBRARIES clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am \ + install-bondsLTLIBRARIES install-data install-data-am \ + install-dist_gladeDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-bondsLTLIBRARIES \ + uninstall-dist_gladeDATA + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/bonds/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,103 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * plugin.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include "bondtool.h" +#include "chaintool.h" +#include "delocalizedtool.h" +#include "gcp-stock-pixbufs.h" +#include + +gcpBondsPlugin plugin; + +gcpBondsPlugin::gcpBondsPlugin (): gcp::Plugin () +{ +} + +gcpBondsPlugin::~gcpBondsPlugin () +{ +} + +static gcp::IconDesc icon_descs[] = { + {"gcp_Bond", gcp_bond_24}, + {"gcp_Chain", gcp_chain_24}, + {"gcp_UpBond", gcp_upbond_24}, + {"gcp_DownBond", gcp_downbond_24}, + {"gcp_XBond", gcp_xbond_24}, + {"gcp_ForeBond", gcp_forebond_24}, + {"gcp_DelocalizedBond", gcp_delocalizedbond_24}, + {NULL, NULL}, +}; + +static GtkRadioActionEntry entries[] = { + { "Bond", "gcp_Bond", N_("Bond"), NULL, + N_("Add a bond or change the multiplicity of an existing one"), + 0 }, + { "Chain", "gcp_Chain", N_("Chain"), NULL, + N_("Add a chain"), + 0 }, + { "UpBond", "gcp_UpBond", N_("Wedge bond tool"), NULL, + N_("Add a wedge bond"), + 0 }, + { "DownBond", "gcp_DownBond", N_("Hash bond tool"), NULL, + N_("Add a hash bond"), + 0 }, + { "SquiggleBond", "gcp_XBond", N_("Squiggle bond tool"), NULL, + N_("Add a squiggle bond"), + 0 }, + { "ForeBond", "gcp_ForeBond", N_("Fore bond tool"), NULL, + N_("Add a fore bond"), + 0 }, + { "DelocalizedBond", "gcp_DelocalizedBond", N_("Delocalized bond tool"), NULL, + N_("Add a delocalized bonds system"), + 0 }, +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +//" " +" " +""; + +void gcpBondsPlugin::Populate (gcp::Application* App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + App->RegisterToolbar ("BondsToolbar", 2); + new gcpBondTool (App); + new gcpChainTool (App); + new gcpUpBondTool (App); + new gcpDownBondTool (App); + new gcpForeBondTool (App); + new gcpSquiggleBondTool (App); + new gcpDelocalizedTool (App); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/bonds/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/bonds/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/bonds/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/bonds/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,39 @@ +// -*- C++ -*- + +/* + * GChemPaint bonds plugin + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_BONDS_PLUGIN +#define GCHEMPAINT_BONDS_PLUGIN + +#include + +class gcpBondsPlugin: public gcp::Plugin +{ +public: + gcpBondsPlugin(); + virtual ~gcpBondsPlugin(); + + virtual void Populate (gcp::Application* App); +}; + +#endif //GCHEMPAINT_BONDS_PLUGIN Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/bonds/upbond24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/bonds/upbond24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/bonds/xbond24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/bonds/xbond24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/cycles/c3-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/cycles/c3-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/cycles/c4-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/cycles/c4-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/cycles/c5-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/cycles/c5-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/cycles/c6-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/cycles/c6-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/cycles/c7-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/cycles/c7-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/cycles/c8-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/cycles/c8-24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cn-24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cn-24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cycle.glade gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cycle.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cycle.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cycle.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,122 @@ + + + + + + True + window1 + + + True + 3 + 4 + 3 + 10 + 6 + + + + + + True + + + 3 + 2 + 3 + GTK_FILL + + + + + True + 0 + + + 2 + 3 + + + + + + True + True + Use existing atoms for end of bonds + _Merge with existing atoms + True + 0 + True + + + 3 + 3 + 4 + + + + + + True + 0 + <b>Property</b> + True + + + GTK_FILL + + + + + + True + True + Default length for new bonds + 140 90 500 1 10 0 + 1 + 1 + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + <b>Value</b> + True + + + 1 + 2 + GTK_FILL + + + + + + True + True + 0 + Bond len_gth: + True + bond-length + + + 1 + 2 + GTK_FILL + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cyclen.glade gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cyclen.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cyclen.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cyclen.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,155 @@ + + + + + + True + window1 + + + True + 3 + 5 + 3 + 10 + 6 + + + + + + + + + True + True + 3 3 100 1 10 0 + 1 + + + 1 + 2 + 2 + 3 + + + + + + True + 0 + Cycle _Size + True + sizebtn + + + 2 + 3 + GTK_FILL + + + + + + True + + + 3 + 3 + 4 + GTK_FILL + + + + + True + 0 + + + 2 + 3 + + + + + + True + True + Use existing atoms for end of bonds + _Merge with existing atoms + True + 0 + True + + + 3 + 4 + 5 + + + + + + True + 0 + <b>Property</b> + True + + + GTK_FILL + + + + + + True + True + Default length for new bonds + 140 90 500 1 10 0 + 1 + 1 + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + <b>Value</b> + True + + + 1 + 2 + GTK_FILL + + + + + + True + True + 0 + Bond len_gth: + True + bond-length + + + 1 + 2 + GTK_FILL + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cycletool.cc gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cycletool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cycletool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cycletool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,820 @@ +// -*- C++ -*- + +/* + * GChemPaint cycles plugin + * cycletool.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "cycletool.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +static char const *ToolNames [] = { + "Cycle3", + "Cycle4", + "Cycle5", + "Cycle6", + "Cycle7", + "Cycle8", + "CycleN", +}; + +gcpCycleTool::gcpCycleTool (gcp::Application *App, unsigned char size): gcp::Tool (App, ToolNames[size - 3]) +{ + if ((m_size = size)) + Init(); + else + m_xn = NULL; + m_Chain = NULL; +} + +gcpCycleTool::~gcpCycleTool () +{ + if (m_size) { + delete [] m_xn; + gnome_canvas_points_free (points); + } + if (m_Chain) + delete m_Chain; +} + +bool gcpCycleTool::OnClicked () +{ + if (!m_size) + return false; + double x1, y1, x2, y2; + double a0, a1, a2, b1, b2, m1, m2; + gcp::Atom* pAtom, *pAtom1; + gcp::Bond* pBond, *pBond1; + gcp::Document *pDoc = m_pView->GetDoc (); + gcp::Theme *pTheme = pDoc->GetTheme (); + m_dLength = pDoc->GetBondLength () * m_dZoomFactor; + map::iterator j; + int i; + bool bDone = false; + m_dDefAngle = 0.0; + if (m_pObject) { + bDone = true; + switch (m_pObject->GetType ()) { + case BondType: + pBond = (gcp::Bond*) m_pObject; + pAtom = (gcp::Atom*) pBond->GetAtom (0); + pAtom->GetCoords (&x1, &y1); + x1 *= m_dZoomFactor; + y1 *= m_dZoomFactor; + pAtom1 = (gcp::Atom*) pBond->GetAtom (1); + pAtom1->GetCoords (&x2, &y2); + x2 *= m_dZoomFactor; + y2 *= m_dZoomFactor; + m_dLength = sqrt (square (x2 - x1) + square (y2 - y1)); + if (pBond->IsCyclic () == 1) { + Cycle *pCycle = NULL; + list::iterator i; + pCycle = pBond->GetFirstCycle (i, pCycle); + a0 = atan2 (y1 - y2, x2 - x1); + pCycle->GetAngles2D (pBond, &a1, &a2); + if (sin (a0 - a1) * sin (a0 - a2) > 0) { + if (sin (a0 - a1) < 0.0) { + points->coords[0] = m_xn[0] = m_x0 = x1; + points->coords[1] = m_xn[1] = m_y0 = y1; + m_dAngle = a0; + m_Start = pAtom; + m_End = pAtom1; + m_Direct = true; + } else { + points->coords[0] = m_xn[0] = m_x0 = x1 = x2; + points->coords[1] = m_xn[1] = m_y0 = y1 = y2; + m_dAngle = a0 - M_PI; + m_Start = pAtom1; + m_End = pAtom; + m_Direct = false; + } + } + } else { + m_Start = pAtom; + m_End = pAtom1; + a0 = pBond->GetAngle2DRad (pAtom); + b1 = a0 + m_dDev; + b2 = a0 - m_dDev; + m1 = m2 = M_PI; + pBond1 = (gcp::Bond*) pAtom->GetFirstBond (j); + while (pBond1) { + if (pBond == pBond1) { + pBond1 = (gcp::Bond*) pAtom->GetNextBond (j); + continue; + } + a1 = pBond1->GetAngle2DRad (pAtom); + a2 = fabs (b2 - a1); + if (a2 > M_PI) + a2 = 2 * M_PI - a2; + if (m2 > a2) + m2 = a2; + a1 = fabs (a1 - b1); + if (a1 > M_PI) + a1 = 2 * M_PI - a1; + if (m1 > a1) + m1 = a1; + pBond1 = (gcp::Bond*) pAtom->GetNextBond (j); + } + pBond1 = (gcp::Bond*) pAtom1->GetFirstBond (j); + a2 = b2; + b2 = - b1; + b1 = - b2; + while (pBond1) { + if (pBond == pBond1) { + pBond1 = (gcp::Bond*) pAtom1->GetNextBond (j); + continue; + } + a1 = pBond1->GetAngle2DRad (pAtom1); + a2 = fabs (b2 - a1); + if (a2 > M_PI) + a2 = 2 * M_PI - a2; + if (m2 > a2) + m2 = a2; + a1 = fabs (a1 - b1); + if (a1 > M_PI) + a1 = 2 * M_PI - a1; + if (m1 > a1) + m1 = a1; + pBond1 = (gcp::Bond*) pAtom1->GetNextBond (j); + } + if (m2 > m1) { + points->coords[0] = m_xn[0] = m_x0 = x1; + points->coords[1] = m_xn[1] = m_y0 = y1; + m_dAngle = a0; + m_Direct = true; + } else { + points->coords[0] = m_xn[0] = m_x0 = x1 = x2; + points->coords[1] = m_xn[1] = m_y0 = y1 = y2; + m_dAngle = a0 - M_PI; + m_Direct = false; + } + } + if (m_Chain) + delete m_Chain; + if (m_nState & GDK_SHIFT_MASK) + m_Chain = new Chain (pBond, m_Start); + break; + case AtomType: + pAtom = (gcp::Atom*) m_pObject; + pAtom->GetCoords (&x1, &y1); + x1 *= m_dZoomFactor; + y1 *= m_dZoomFactor; + i = pAtom->GetBondsNumber (); + switch (i) { + case 0: + m_x0 = x1; + m_y0 = y1; + bDone = false; + break; + case 1: + pBond = (gcp::Bond*) pAtom->GetFirstBond (j); + pAtom1 = (gcp::Atom*) pBond->GetAtom (pAtom); + a0 = pBond->GetAngle2DRad (pAtom); + points->coords[0] = m_xn[0] = m_x0 = x1; + points->coords[1] = m_xn[1] = m_y0 = y1; + m_dDefAngle = m_dAngle = - M_PI / 2 + a0 - m_dDev / 2; + break; + case 2: + pBond = (gcp::Bond*) pAtom->GetFirstBond (j); + pBond1 = (gcp::Bond*) pAtom->GetNextBond (j); + a1 = pBond->GetAngle2DRad (pAtom); + a2 = pBond1->GetAngle2DRad (pAtom); + a0 = (a1 + a2) / 2; + if (fabs (a1 - a2) > M_PI) + a0 += M_PI; + points->coords[0] = m_xn[0] = m_x0 = x1; + points->coords[1] = m_xn[1] = m_y0 = y1; + m_dDefAngle = m_dAngle = - M_PI / 2 + a0 - m_dDev / 2; + break; + default: + vector orientations; + orientations.reserve (i); + pBond = (gcp::Bond*) pAtom->GetFirstBond (j); + orientations.push_back (pBond->GetAngle2DRad (pAtom)); + unsigned k; + while ((pBond = (gcp::Bond*) pAtom->GetNextBond (j))) { + k = 0; + a0 = pBond->GetAngle2DRad (pAtom); + while ((a0 > orientations[k]) && (k < orientations.size ())) + k++; + orientations.insert (orientations.begin () + k, a0); + } + a0 = 2 * M_PI - orientations[i - 1] + orientations[0]; + i = 0; + for (k = 1; k < orientations.size (); k++) { + a1 = orientations[k] - orientations[k - 1]; + if (a0 < a1) { + a0 = a1; + i = k; + } + } + if (a0 < M_PI - m_dDev + M_PI / 18) { + bDone = false; + break; + } + m_dAngle = (orientations[(i)? i - 1: orientations.size () - 1] + orientations[i] + M_PI - m_dDev) / 2; + if (!i) + m_dAngle += M_PI; + m_dDefAngle = m_dAngle; + points->coords[0] = m_xn[0] = m_x0 = x1; + points->coords[1] = m_xn[1] = m_y0 = y1; + orientations.clear (); + } + break; + default: + m_pObject = NULL; + return false; + } + } + if (!bDone) { + m_dAngle = M_PI / 2; + points->coords[0] = m_xn[0] = x1 = m_x0; + points->coords[1] = m_xn[1] = y1 = m_y0; + } + for (i = 2; i < m_size * 2; i+= 2) { + m_xn[i] = x1 += m_dLength * cos (m_dAngle - m_dDev * (i / 2 - 1)); + m_xn[i + 1] = y1 -= m_dLength * sin (m_dAngle - m_dDev * (i / 2 - 1)); + points->coords[i] = x1; + points->coords[i + 1] = y1; + } + + m_bAllowed = CheckIfAllowed (); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_polygon_get_type (), + "points", points, + "outline_color", (m_bAllowed)? gcp::AddColor: gcp::DeleteColor, + "width_units", pTheme->GetBondWidth (), + NULL); + return true; +} + +void gcpCycleTool::OnDrag () +{ + if (!m_size) + return; + int i; + double x1, y1, x2, y2; + bool bDone = false; + GnomeCanvasItem* pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x, m_y); + gcp::Document *pDoc = m_pView->GetDoc (); + gcp::Theme *pTheme = pDoc->GetTheme (); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + Object* pObject = NULL; + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + if (m_pObject) { + if (m_pObject->GetType() == BondType) { + if (((gcp::Bond*) m_pObject)->GetDist (m_x / m_dZoomFactor, m_y / m_dZoomFactor) < (pTheme->GetPadding () + pTheme->GetBondWidth () / 2) * m_dZoomFactor) { + if (m_pItem) { + gtk_object_destroy (GTK_OBJECT (GNOME_CANVAS_ITEM (m_pItem))); + m_pItem = NULL; + } + return; + } + x1 = (m_x - m_xn[0]) * (m_xn[3] - m_xn[1]) + (m_xn[1] - m_y) * (m_xn[2] - m_xn[0]); + if (m_nState & GDK_SHIFT_MASK) { + if (m_Chain->GetLength () == (unsigned) m_size - 2) + return; + gcp::Bond* pBond; + if (pObject) { + if (pObject->GetType () == AtomType) { + if (m_Chain->Contains ((gcp::Atom*) pObject)) + return; + pBond = (gcp::Bond*) m_Start->GetBond ((gcp::Atom*) pObject); + if (pBond) { + m_Chain->AddBond ((gcp::Atom*)pObject, m_Start); + m_Start = (gcp::Atom*) pObject; + } else { + pBond = (gcp::Bond*) m_End->GetBond ((gcp::Atom*) pObject); + if (pBond) { + m_Chain->AddBond (m_End, (gcp::Atom*) pObject); + m_End = (gcp::Atom*) pObject; + } + } + if (pBond) + bDone = true; + } else if (pObject->GetType() == BondType) { + m_pAtom = (gcp::Atom*) ((gcp::Bond*) pObject)->GetAtom (m_Start); + if (m_pAtom) { + if (m_Chain->Contains (m_pAtom)) + return; + m_Chain->AddBond (m_pAtom, m_Start); + m_Start = m_pAtom; + } else { + m_pAtom = (gcp::Atom*)((gcp::Bond*) pObject)->GetAtom (m_End); + if (m_pAtom) { + if (m_Chain->Contains (m_pAtom)) + return; + m_Chain->AddBond (m_End, m_pAtom); + m_End = m_pAtom; + } + } + if (m_pAtom) + bDone = true; + } + if (!bDone) + return; + m_Start->GetCoords (&x1, &y1); + x1 *= m_dZoomFactor; + y1 *= m_dZoomFactor; + m_End->GetCoords (&x2, &y2); + x2 *= m_dZoomFactor; + y2 *= m_dZoomFactor; + double d = sqrt (square (x2 - x1) + square (y2 - y1)), L = pDoc->GetBondLength () * m_dZoomFactor, t; + unsigned n = m_size - m_Chain->GetLength (); + if (d < L * n) { + //FIXME: this algorithm is far from optimal!!! + double t1, k = d/L, p = M_PI /n; + t = 0; + while (1) { + t1 = t + (p - t) * (1 - k / ((t != 0.0)? (sin (t * n) / sin (t)): n)); + if (fabs (t1 - t) < 1e-15) + break; //An infinite loop might be possible here! + t = t1; + } + } else t = 0; + if (t < fabs(m_dDev) / 4) + //too large, change the bond length + t = fabs (m_dDev) / 4; + //Find center + double dx, dy; + if (m_dDev > 0) { + dx = ((y1 - y2) / tan (M_PI - t * n) + x2 + x1) / 2; + dy = ((x1 - x2) / tan (t * n) + y1 + y2) / 2; + t = - t; + } else { + dx = ((y2 - y1) / tan (M_PI - t * n) + x2 + x1) / 2; + dy = ((x2 - x1) / tan (t * n) + y1 + y2) / 2; + } + double a0 = atan2 (dy - y2, x2 - dx); + d = sqrt (square (dy - y2) + square (dx - x2)); + i = 0; + m_pAtom = m_Start; + do { + m_pAtom->GetCoords (&x1, &y1); + m_xn[i] = points->coords[i] = x1 * m_dZoomFactor; + i++; + m_xn[i] = points->coords[i] = y1 * m_dZoomFactor; + i++; + } + while ((m_pAtom != m_End) && (m_pAtom = reinterpret_cast (m_Chain->GetNextAtom (m_pAtom)))); + while (i < m_size * 2) { + a0 += 2 * t; + m_xn[i] = points->coords[i] = dx + d * cos (a0); + i++; + m_xn[i] = points->coords[i] = dy - d * sin (a0); + i++; + } + } + bDone = true; + } else if (x1 * m_dDev > 0) { + m_dDev = - m_dDev; + x1 = m_xn[2]; + y1 = m_xn[3]; + for (i = 4; i < m_size * 2; i+= 2) { + m_xn[i] = x1 += (pDoc->GetBondLength () * m_dZoomFactor) * cos (m_dAngle - m_dDev * (i / 2 - 1)); + m_xn[i + 1] = y1 -= (pDoc->GetBondLength () * m_dZoomFactor) * sin (m_dAngle - m_dDev * (i / 2 - 1)); + points->coords[i] = x1; + points->coords[i + 1] = y1; + } + bDone = true; + } + else if (m_pItem) + return; + else bDone = true; + } + } + if (m_pItem) { + gtk_object_destroy (GTK_OBJECT (GNOME_CANVAS_ITEM (m_pItem))); + m_pItem = NULL; + } + if (!bDone) { + double dAngle; + m_pAtom = NULL; + if (pObject) { + if (pObject->GetType () == BondType) + m_pAtom = (gcp::Atom*) pObject->GetAtomAt (m_x / m_dZoomFactor, m_y / m_dZoomFactor); + else if (pObject->GetType() == AtomType) + m_pAtom = (gcp::Atom*) pObject; + } + if (m_pAtom) { + if (m_pAtom == m_pObject) + return; + m_pAtom->GetCoords (&m_x, &m_y); + m_x *= m_dZoomFactor; + m_y *= m_dZoomFactor; + m_x -= m_x0; + m_y -= m_y0; + double BondLength = sqrt (square (m_x) + square (m_y)); + if (m_x == 0) { + if (m_y == 0) + return; + dAngle = (m_y < 0) ? 90 : 270; + } else { + m_dAngle = atan (-m_y / m_x); + if (m_x < 0) + m_dAngle += M_PI; + } + x1 = m_x0; + y1 = m_y0; + for (i = 2; i < m_size * 2; i+= 2) { + m_xn[i] = x1 += (BondLength) * cos (m_dAngle - m_dDev * (i / 2 - 1)); + m_xn[i + 1] = y1 -= (BondLength) * sin (m_dAngle - m_dDev * (i / 2 - 1)); + points->coords[i] = x1; + points->coords[i + 1] = y1; + } + } else { + m_x -= m_x0; + m_y -= m_y0; + if (m_x == 0) { + if (m_y == 0) + return; + dAngle = (m_y < 0) ? 90 : 270; + } else { + dAngle = atan (-m_y/m_x) * 180 / M_PI; + if (!(m_nState & GDK_CONTROL_MASK)) + dAngle = rint (dAngle / 5) * 5; + if (m_x < 0) + dAngle += 180; + } + m_dAngle = dAngle * M_PI / 180; + x1 = m_x0; + y1 = m_y0; + double d = (m_nState & GDK_SHIFT_MASK)? sqrt (square (m_x) + square (m_y)): pDoc->GetBondLength () * m_dZoomFactor; + for (i = 2; i < m_size * 2; i+= 2) { + m_xn[i] = x1 += d * cos (m_dAngle - m_dDev * (i / 2 - 1)); + m_xn[i + 1] = y1 -= d * sin (m_dAngle - m_dDev * (i / 2 - 1)); + points->coords[i] = x1; + points->coords[i + 1] = y1; + } + char tmp[32]; + if (dAngle < 0) + dAngle += 360; + snprintf (tmp, sizeof (tmp) - 1, _("Orientation: %g"), dAngle); + m_pApp->SetStatusText (tmp); + } + } + m_bAllowed = CheckIfAllowed (); + m_pItem = gnome_canvas_item_new ( + m_pGroup, + gnome_canvas_polygon_get_type (), + "points", points, + "outline_color", (m_bAllowed)? gcp::AddColor: gcp::DeleteColor, + "width_units", pTheme->GetBondWidth (), + NULL); +} + +void gcpCycleTool::OnRelease () +{ + if (!m_size) + return; + if (m_Chain) { + delete m_Chain; + m_Chain = NULL; + } + if (m_pItem) { + gtk_object_destroy (GTK_OBJECT (GNOME_CANVAS_ITEM (m_pItem))); + m_pItem = NULL; + } + else + return; + if (!m_bAllowed) + return; + m_pApp->ClearStatus (); + gcp::Atom* pAtom[m_size]; + gcp::Bond* pBond; + Object *pObject; + char const *Id; + GnomeCanvasItem* pItem; + gcp::Document *pDoc = m_pView->GetDoc (); + gcp::Operation *pOp = NULL; + gcp::Molecule *pMol = NULL; + char const *MolId = NULL; + int i; + for (i = 0; i < m_size; i++) { + m_x = m_xn[2 * i]; + m_y = m_xn[2 * i + 1]; + pAtom[i] = NULL; + pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x, m_y); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + m_pObject = (pItem)? (Object*) g_object_get_data (G_OBJECT (pItem), "object"): NULL; + if (m_pObject == NULL) { + std::map::iterator i = m_pData->Items.begin (), + end = m_pData->Items.end (); + gcp::Bond* pBond; + while (i != end) { + if ((*i).first->GetType () == gcu::BondType) { + pBond = (gcp::Bond*) (*i).first; + if (pBond->GetDist(m_x / pDoc->GetTheme ()->GetZoomFactor (), m_y / pDoc->GetTheme ()->GetZoomFactor ()) < (pDoc->GetTheme ()->GetPadding () + pDoc->GetTheme ()->GetBondWidth () / 2) / pDoc->GetTheme ()->GetZoomFactor ()) { + pItem = GNOME_CANVAS_ITEM ((*i).second); + m_pObject = pBond; + break; + } else { + // may be one of the atoms might work + gcu::Atom *pAtom = pBond->GetAtom (0); + double xa, ya; + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pDoc->GetTheme ()->GetZoomFactor (); + ya *= pDoc->GetTheme ()->GetZoomFactor (); + xa -= m_x; + ya -= m_y; + if (sqrt (xa * xa + ya * ya) < 3.5) { + //3.5 is arbitrary + m_pObject = pAtom; + break; + } + pAtom = pBond->GetAtom (1); + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pDoc->GetTheme ()->GetZoomFactor (); + ya *= pDoc->GetTheme ()->GetZoomFactor (); + xa -= m_x; + ya -= m_y; + if (sqrt (xa * xa + ya * ya) < 3.5) { + m_pObject = pAtom; + break; + } + } + } else if ((*i).first->GetType () == gcu::AtomType) { + double xa, ya; + gcu::Atom *pAtom = (gcu::Atom*) (*i).first; + pAtom->GetCoords (&xa, &ya, NULL); + xa *= pDoc->GetTheme ()->GetZoomFactor (); + ya *= pDoc->GetTheme ()->GetZoomFactor (); + xa -= m_x; + ya -= m_y; + if (sqrt (xa * xa + ya * ya) < 3.5) { + //3.5 is arbitrary + m_pObject = pAtom; + break; + } + } + i++; + } + } + if (gcp::MergeAtoms && m_pObject) { + if (m_pObject->GetType () == BondType) + pAtom[i] = (gcp::Atom*) m_pObject->GetAtomAt (m_x / m_dZoomFactor, m_y / m_dZoomFactor); + else if (m_pObject->GetType () == AtomType) + pAtom[i] = (gcp::Atom*) m_pObject; + if (pAtom[i]) { + if (pMol == NULL) { + pMol = reinterpret_cast (pAtom[i]->GetMolecule ()); + pMol->Lock (true); + // we must store the id, the molecule might be destroyed + // FIXME! what happens to the parent in such a case? + MolId = pMol->GetId (); + } + // if group not in ModifiedObjects, add it and save it + pObject = pAtom[i]->GetGroup (); + Id = pObject->GetId (); + if (ModifiedObjects.find (Id) == ModifiedObjects.end ()) { + if (!pOp) + pOp = pDoc->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + pOp->AddObject (pObject); + ModifiedObjects.insert (Id); + } + } + } + if (!pAtom[i]) { + pAtom[i] = new gcp::Atom (m_pApp->GetCurZ (), m_xn[2 * i] / m_dZoomFactor, m_xn[2 * i + 1] / m_dZoomFactor, 0); + pDoc->AddAtom (pAtom[i]); + } + if (i) { + pBond = (gcp::Bond*) pAtom[i]->GetBond (pAtom[i - 1]); + if (!pBond) { + pBond = new gcp::Bond (pAtom[i - 1], pAtom[i], 1); + pDoc->AddBond (pBond); + } + } + } + pBond = (gcp::Bond*) pAtom[m_size - 1]->GetBond (pAtom[0]); + if (!pBond) { + pBond = new gcp::Bond (pAtom[m_size - 1], pAtom[0], 1); + pDoc->AddBond (pBond); + } + pObject = pBond->GetGroup (); + if (pOp) { + ModifiedObjects.insert (pObject->GetId ()); + set::iterator it, end = ModifiedObjects.end (); + for (it = ModifiedObjects.begin (); it != end; it++) { + pObject = pDoc->GetDescendant ((*it).c_str ()); + if (pObject) + pOp->AddObject (pObject, 1); + } + } else { + pOp = pDoc->GetNewOperation (gcp::GCP_ADD_OPERATION); + pOp->AddObject (pObject); + } + pDoc->FinishOperation (); + if (pMol) + pMol = static_cast (pDoc->GetDescendant (MolId)); + if (pMol) { + pMol->Lock (false); + pMol->EmitSignal (gcp::OnChangedSignal); + } + ModifiedObjects.clear (); +} + +void gcpCycleTool::OnChangeState () +{ + if (m_pObject && (m_pObject->GetType() == BondType)) { + if (m_nState & GDK_SHIFT_MASK) { + if (!m_Chain) { + if (m_Direct) { + m_Start = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (0); + m_End = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (1); + } else { + m_Start = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (1); + m_End = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (0); + } + m_Chain = new Chain ((gcp::Bond*) m_pObject, m_Start); + } + } else { + double x1, y1, x2, y2; + if (m_pItem) { + gtk_object_destroy(GTK_OBJECT(GNOME_CANVAS_ITEM(m_pItem))); + m_pItem = NULL; + } + if (m_Direct) { + m_Start = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (0); + m_End = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (1); + } else { + m_Start = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (1); + m_End = (gcp::Atom*) ((gcp::Bond*) m_pObject)->GetAtom (0); + } + m_Start->GetCoords (&x1, &y1); + m_End->GetCoords (&x2, &y2); + points->coords[0] = m_xn[0] = x1 * m_dZoomFactor; + points->coords[1] = m_xn[1] = y1 * m_dZoomFactor; + points->coords[2] = m_xn[2] = x1 = x2 * m_dZoomFactor; + points->coords[3] = m_xn[3] = y1 = y2 * m_dZoomFactor; + for (int i = 4; i < m_size * 2; i+= 2) { + gcp::Document *pDoc = m_pView->GetDoc (); + m_xn[i] = x1 += (pDoc->GetBondLength () * m_dZoomFactor) * cos (m_dAngle - m_dDev * (i / 2 - 1)); + m_xn[i + 1] = y1 -= (pDoc->GetBondLength () * m_dZoomFactor) * sin (m_dAngle - m_dDev * (i / 2 - 1)); + points->coords[i] = x1; + points->coords[i + 1] = y1; + } + if (m_Chain) { + delete m_Chain; + m_Chain = NULL; + } + } + } + m_bAllowed = CheckIfAllowed (); + gcp::Tool::OnChangeState (); +} + +void gcpCycleTool::Init () +{ + m_xn = new double[m_size * 2]; + m_dDev = 2 * M_PI / m_size; + points = gnome_canvas_points_new (m_size); +} + +bool gcpCycleTool::CheckIfAllowed () +{ +//Search atoms at the positions of the vertices and check if adding bonds to them is allowed + gcp::Atom* pAtom[m_size]; + GnomeCanvasItem* pItem; + Object* pObject; + int i, n; + for (i = 0; i < m_size; i++) { + m_x = m_xn[2 * i]; + m_y = m_xn[2 * i + 1]; + pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x, m_y); + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + pObject = (pItem)? (Object*) g_object_get_data (G_OBJECT (pItem), "object"): NULL; + if (gcp::MergeAtoms && pObject) { + TypeId Id = pObject->GetType (); + switch (Id) { + case BondType: + case FragmentType: + pAtom[i] = (gcp::Atom*) pObject->GetAtomAt (m_x / m_dZoomFactor, m_y / m_dZoomFactor); + break; + case AtomType: + pAtom[i] = (gcp::Atom*) pObject; + break; + default: + pAtom[i] = NULL; + } + } else + pAtom[i] = NULL; + } + for (i = 0; i < m_size; i++) { + if (!pAtom[i]) + continue; + n = 0; + if (!pAtom[i]->GetBond (pAtom[(i)? i - 1: m_size -1])) + n++; + if (!pAtom[i]->GetBond (pAtom[(i < m_size - 1)? i + 1: 0])) + n++; + if (n && (!pAtom[i]->AcceptNewBonds (n))) + return false; + } + return true; +} + +static void on_length_changed (GtkSpinButton *btn, gcpCycleTool *tool) +{ + tool->SetLength (gtk_spin_button_get_value (btn)); +} + +static void on_merge_toggled (GtkToggleButton *btn) +{ + gcp::MergeAtoms = gtk_toggle_button_get_active (btn); +} + +void gcpCycleTool::SetLength (double length) +{ + m_pApp->GetActiveDocument ()->SetBondLength (length); +} + +GtkWidget *gcpCycleTool::GetPropertyPage () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/cycle.glade", "cycle", GETTEXT_PACKAGE); + m_LengthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-length")); + g_signal_connect (m_LengthBtn, "value-changed", G_CALLBACK (on_length_changed), this); + m_MergeBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "merge")); + g_signal_connect (m_MergeBtn, "toggled", G_CALLBACK (on_merge_toggled), NULL); + return glade_xml_get_widget (xml, "cycle"); +} + +void gcpCycleTool::Activate () +{ + gcp::Document *pDoc = m_pApp->GetActiveDocument (); + gtk_spin_button_set_value (m_LengthBtn, pDoc->GetBondLength ()); + gtk_toggle_button_set_active (m_MergeBtn, gcp::MergeAtoms); +} + +gcpNCycleTool::gcpNCycleTool (gcp::Application* App, unsigned char size): gcpCycleTool (App, 9) +{ + SetSize(size); +} + +gcpNCycleTool::~gcpNCycleTool () +{ +} + +void gcpNCycleTool::SetSize (unsigned char size) +{ + if (m_size) { + delete [] m_xn; + gnome_canvas_points_free (points); + } + if ((m_size = size)) + Init(); +} + +static void on_size_changed (GtkSpinButton *button, gcpNCycleTool *tool) +{ + tool->SetSize ((unsigned char) gtk_spin_button_get_value_as_int (button)); +} + +GtkWidget *gcpNCycleTool::GetPropertyPage () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/cyclen.glade", "cycle", GETTEXT_PACKAGE); + m_LengthBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "bond-length")); + g_signal_connect (m_LengthBtn, "value-changed", G_CALLBACK (on_length_changed), this); + m_MergeBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "merge")); + g_signal_connect (m_MergeBtn, "toggled", G_CALLBACK (on_merge_toggled), NULL); + m_SizeBtn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "sizebtn")); + gtk_spin_button_set_value (m_SizeBtn, m_size); + g_signal_connect (m_SizeBtn, "value-changed", G_CALLBACK (on_size_changed), this); + return glade_xml_get_widget (xml, "cycle"); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cycletool.h gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cycletool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/cycletool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/cycletool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,84 @@ +// -*- C++ -*- + +/* + * GChemPaint cycles plugin + * cycletool.h + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_CYCLE_TOOL_H +#define GCHEMPAINT_CYCLE_TOOL_H + +#include + +namespace gcu { + class Atom; + class Chain; +} + +class gcpCycleTool: public gcp::Tool +{ +public: + gcpCycleTool (gcp::Application *App, unsigned char size); + virtual ~gcpCycleTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); + virtual void OnChangeState (); + GtkWidget *GetPropertyPage (); + void Activate (); + void SetLength (double length); + char const *GetHelpTag () {return "cycle";} + +protected: + void Init (); + bool CheckIfAllowed (); + +protected: + double *m_xn; + unsigned char m_size; + GnomeCanvasPoints *points; + GtkSpinButton *m_LengthBtn; + GtkToggleButton *m_MergeBtn; + +private: + double m_dAngle, m_dDev; //m_dAngle gives the direction of the first bond, m_dDev is deviation between two successive bonds + double m_dDefAngle; //default angle when appropriate + double m_dLength; //Lenght of newly created bonds + gcp::Atom *m_pAtom, *m_Start, *m_End; + gcu::Chain *m_Chain; + bool m_Direct; +}; + +class gcpNCycleTool: public gcpCycleTool +{ +public: + gcpNCycleTool (gcp::Application *App, unsigned char size); + virtual ~gcpNCycleTool (); + + void SetSize (unsigned char size); + unsigned char GetSize () {return m_size;} + GtkWidget *GetPropertyPage (); + +private: + GtkSpinButton *m_SizeBtn; +}; + +#endif //GCHEMPAINT_CYCLE_TOOL_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/cycles/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,70 @@ +EXTRA_DIST = $(IMAGES) + +BUILT_SOURCES = gcp-stock-pixbufs.h + +CLEANFILES = $(BUILT_SOURCES) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(cyclesdir)\" + +IMAGES = \ + c3-24.png \ + c4-24.png \ + c5-24.png \ + c6-24.png \ + c7-24.png \ + c8-24.png \ + cn-24.png + +VARIABLES = \ + gcp_c3_24 $(srcdir)/c3-24.png \ + gcp_c4_24 $(srcdir)/c4-24.png \ + gcp_c5_24 $(srcdir)/c5-24.png \ + gcp_c6_24 $(srcdir)/c6-24.png \ + gcp_c7_24 $(srcdir)/c7-24.png \ + gcp_c8_24 $(srcdir)/c8-24.png \ + gcp_cn_24 $(srcdir)/cn-24.png + +cyclesdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +cycles_LTLIBRARIES = cycles.la + +cycles_la_LDFLAGS = -module -avoid-version +cycles_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +cycles_la_SOURCES = \ + plugin.cc \ + cycletool.cc + +noinst_HEADERS = \ + plugin.h \ + cycletool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/cycles +dist_glade_DATA = \ + cycle.glade \ + cyclen.glade + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/cycles/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/Makefile.in 2009-11-14 11:46:03.000000000 +0100 @@ -0,0 +1,703 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/cycles +DIST_COMMON = $(dist_glade_DATA) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(cyclesdir)" "$(DESTDIR)$(gladedir)" +LTLIBRARIES = $(cycles_LTLIBRARIES) +cycles_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_cycles_la_OBJECTS = plugin.lo cycletool.lo +cycles_la_OBJECTS = $(am_cycles_la_OBJECTS) +cycles_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(cycles_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(cycles_la_SOURCES) +DIST_SOURCES = $(cycles_la_SOURCES) +DATA = $(dist_glade_DATA) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(cyclesdir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(IMAGES) +BUILT_SOURCES = gcp-stock-pixbufs.h +CLEANFILES = $(BUILT_SOURCES) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +IMAGES = \ + c3-24.png \ + c4-24.png \ + c5-24.png \ + c6-24.png \ + c7-24.png \ + c8-24.png \ + cn-24.png + +VARIABLES = \ + gcp_c3_24 $(srcdir)/c3-24.png \ + gcp_c4_24 $(srcdir)/c4-24.png \ + gcp_c5_24 $(srcdir)/c5-24.png \ + gcp_c6_24 $(srcdir)/c6-24.png \ + gcp_c7_24 $(srcdir)/c7-24.png \ + gcp_c8_24 $(srcdir)/c8-24.png \ + gcp_cn_24 $(srcdir)/cn-24.png + +cyclesdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +cycles_LTLIBRARIES = cycles.la +cycles_la_LDFLAGS = -module -avoid-version +cycles_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +cycles_la_SOURCES = \ + plugin.cc \ + cycletool.cc + +noinst_HEADERS = \ + plugin.h \ + cycletool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/cycles +dist_glade_DATA = \ + cycle.glade \ + cyclen.glade + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/cycles/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/cycles/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-cyclesLTLIBRARIES: $(cycles_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(cyclesdir)" || $(MKDIR_P) "$(DESTDIR)$(cyclesdir)" + @list='$(cycles_LTLIBRARIES)'; test -n "$(cyclesdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(cyclesdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(cyclesdir)"; \ + } + +uninstall-cyclesLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(cycles_LTLIBRARIES)'; test -n "$(cyclesdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(cyclesdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(cyclesdir)/$$f"; \ + done + +clean-cyclesLTLIBRARIES: + -test -z "$(cycles_LTLIBRARIES)" || rm -f $(cycles_LTLIBRARIES) + @list='$(cycles_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +cycles.la: $(cycles_la_OBJECTS) $(cycles_la_DEPENDENCIES) + $(cycles_la_LINK) -rpath $(cyclesdir) $(cycles_la_OBJECTS) $(cycles_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cycletool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_gladeDATA: $(dist_glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-dist_gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(cyclesdir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-cyclesLTLIBRARIES clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-cyclesLTLIBRARIES install-dist_gladeDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-cyclesLTLIBRARIES uninstall-dist_gladeDATA + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-cyclesLTLIBRARIES clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am \ + install-cyclesLTLIBRARIES install-data install-data-am \ + install-dist_gladeDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-cyclesLTLIBRARIES \ + uninstall-dist_gladeDATA + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/cycles/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,101 @@ +// -*- C++ -*- + +/* + * GChemPaint cycles plugin + * plugin.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include "cycletool.h" +#include "gcp-stock-pixbufs.h" +#include + +gcpCyclesPlugin plugin; + +gcpCyclesPlugin::gcpCyclesPlugin (): gcp::Plugin () +{ +} + +gcpCyclesPlugin::~gcpCyclesPlugin () +{ +} + +static gcp::IconDesc icon_descs[] = { + {"gcp_Cycle3", gcp_c3_24}, + {"gcp_Cycle4", gcp_c4_24}, + {"gcp_Cycle5", gcp_c5_24}, + {"gcp_Cycle6", gcp_c6_24}, + {"gcp_Cycle7", gcp_c7_24}, + {"gcp_Cycle8", gcp_c8_24}, + {"gcp_CycleN", gcp_cn_24}, + {NULL, NULL}, +}; + +static GtkRadioActionEntry entries[] = { + { "Cycle3", "gcp_Cycle3", N_("Three atoms cycle"), NULL, + N_("Add a three membered cycle"), + 0 }, + { "Cycle4", "gcp_Cycle4", N_("Four atoms cycle"), NULL, + N_("Add a four membered cycle"), + 0 }, + { "Cycle5", "gcp_Cycle5", N_("Five atoms cycle"), NULL, + N_("Add a five membered cycle"), + 0 }, + { "Cycle6", "gcp_Cycle6", N_("Six atoms cycle"), NULL, + N_("Add a six membered cycle"), + 0 }, + { "Cycle7", "gcp_Cycle7", N_("Seven atoms cycle"), NULL, + N_("Add a seven membered cycle"), + 0 }, + { "Cycle8", "gcp_Cycle8", N_("Eight atoms cycle"), NULL, + N_("Add an eight membered cycle"), + 0 }, + { "CycleN", "gcp_CycleN", N_("Variable sized cycle"), NULL, + N_("Add a cycle"), + 0 }, +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +""; + +void gcpCyclesPlugin::Populate (gcp::Application* App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + App->RegisterToolbar ("CyclesToolbar", 3); + new gcpCycleTool (App, 3); + new gcpCycleTool (App, 4); + new gcpCycleTool (App, 5); + new gcpCycleTool (App, 6); + new gcpCycleTool (App, 7); + new gcpCycleTool (App, 8); + new gcpNCycleTool (App, 9); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/cycles/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/cycles/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/cycles/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/cycles/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,39 @@ +// -*- C++ -*- + +/* + * GChemPaint cycles plugin + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_CYCLES_PLUGIN +#define GCHEMPAINT_CYCLES_PLUGIN + +#include + +class gcpCyclesPlugin: public gcp::Plugin +{ +public: + gcpCyclesPlugin (); + virtual ~gcpCyclesPlugin (); + + virtual void Populate (gcp::Application* App); +}; + +#endif //GCHEMPAINT_CYCLES_PLUGIN diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,12 @@ +SUBDIRS = \ + arrows \ + atoms \ + bonds \ + cycles \ + residues \ + selection \ + templates \ + text \ + wikipedia + +MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/Makefile.in 2009-11-14 11:46:03.000000000 +0100 @@ -0,0 +1,661 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = \ + arrows \ + atoms \ + bonds \ + cycles \ + residues \ + selection \ + templates \ + text \ + wikipedia + +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/residues/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,43 @@ +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(residuesdir)\" + +residuesdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +residues_LTLIBRARIES = residues.la + +residues_la_LDFLAGS = -module -avoid-version +residues_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +residues_la_SOURCES = \ + plugin.cc \ + residues-dlg.cc \ + pseudo-atom.cc + +noinst_HEADERS = \ + plugin.h \ + residues-dlg.h \ + pseudo-atom.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/residues +dist_glade_DATA = residues.glade diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/residues/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/Makefile.in 2009-11-14 11:46:03.000000000 +0100 @@ -0,0 +1,674 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/residues +DIST_COMMON = $(dist_glade_DATA) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(residuesdir)" "$(DESTDIR)$(gladedir)" +LTLIBRARIES = $(residues_LTLIBRARIES) +residues_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_residues_la_OBJECTS = plugin.lo residues-dlg.lo pseudo-atom.lo +residues_la_OBJECTS = $(am_residues_la_OBJECTS) +residues_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(residues_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(residues_la_SOURCES) +DIST_SOURCES = $(residues_la_SOURCES) +DATA = $(dist_glade_DATA) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(gladedir)\" -DPLUGINSDIR=\"$(residuesdir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +residuesdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +residues_LTLIBRARIES = residues.la +residues_la_LDFLAGS = -module -avoid-version +residues_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +residues_la_SOURCES = \ + plugin.cc \ + residues-dlg.cc \ + pseudo-atom.cc + +noinst_HEADERS = \ + plugin.h \ + residues-dlg.h \ + pseudo-atom.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/residues +dist_glade_DATA = residues.glade +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/residues/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/residues/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-residuesLTLIBRARIES: $(residues_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(residuesdir)" || $(MKDIR_P) "$(DESTDIR)$(residuesdir)" + @list='$(residues_LTLIBRARIES)'; test -n "$(residuesdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(residuesdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(residuesdir)"; \ + } + +uninstall-residuesLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(residues_LTLIBRARIES)'; test -n "$(residuesdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(residuesdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(residuesdir)/$$f"; \ + done + +clean-residuesLTLIBRARIES: + -test -z "$(residues_LTLIBRARIES)" || rm -f $(residues_LTLIBRARIES) + @list='$(residues_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +residues.la: $(residues_la_OBJECTS) $(residues_la_DEPENDENCIES) + $(residues_la_LINK) -rpath $(residuesdir) $(residues_la_OBJECTS) $(residues_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pseudo-atom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/residues-dlg.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_gladeDATA: $(dist_glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-dist_gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(residuesdir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-residuesLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_gladeDATA install-residuesLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_gladeDATA uninstall-residuesLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-residuesLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_gladeDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-residuesLTLIBRARIES \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-dist_gladeDATA uninstall-residuesLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/residues/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,206 @@ +// -*- C++ -*- + +/* + * GChemPaint residues plugin + * plugin.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include "residues-dlg.h" +#include "pseudo-atom.h" +#include +#include +#include +#include +#include +#include +#include + +gcpResiduesPlugin plugin; +extern xmlDocPtr user_residues; +extern set docs; + +static Object* CreatePseudoAtom () +{ + return new gcpPseudoAtom (); +} + +gcpResiduesPlugin::gcpResiduesPlugin (): gcp::Plugin () +{ + PseudoAtomType = Object::AddType ("pseudo-atom", CreatePseudoAtom); + xmlDocPtr doc; + xmlNodePtr node; + char *name; + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + doc = xmlParseFile (PKGDATADIR"/residues.xml"); + if (doc) { + docs.insert (doc); + node = doc->children; + if (!strcmp ((char*)node->name, "residues")) + ParseNodes (node->children, false); + } + char* gcupath = g_strconcat (getenv ("HOME"), "/.gchemutils", NULL); + GDir* dir = g_dir_open (gcupath, 0, NULL); + if (dir) + g_dir_close (dir); + else + mkdir (gcupath, 0x1ed); + g_free (gcupath) ; + name = g_strconcat (getenv ("HOME"), "/.gchemutils/residues.xml", NULL); + if (g_file_test (name, G_FILE_TEST_EXISTS) && (doc = xmlParseFile (name))) { + docs.insert (doc); + user_residues = doc; + node = doc->children; + if (!strcmp ((char*)node->name, "residues")) + ParseNodes (node->children, true); + } + g_free (name); +} + +gcpResiduesPlugin::~gcpResiduesPlugin () +{ + set::iterator i, iend = docs.end (); + for (i = docs.begin (); i != iend; i++) + xmlFreeDoc (*i); + docs.clear (); +} + +static void on_edit_residues () +{ + plugin.OpenDialog (); +} + +static void on_new_residue (gcp::Residue *res) +{ + plugin.OnNewResidue (res); +} + +static GOptionEntry options[] = +{ + {"edit-residue", 'e', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (void*) on_edit_residues, "Open residues dialog", NULL}, + {NULL} +}; + +static GtkActionEntry entries[] = { + { "Residues", NULL, N_("_Edit residues..."), NULL, + N_("Create new abbreviations"), G_CALLBACK (on_edit_residues) } +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +""; + +static void on_menu (GtkUIManager *UIManager) +{ + GtkActionGroup *action_group = gtk_action_group_new ("ResiduesActions"); + gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); + gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), NULL); + + gtk_ui_manager_insert_action_group (UIManager, action_group, 1); + g_object_unref (action_group); + gtk_ui_manager_add_ui_from_string (UIManager, ui_description, -1, NULL); +} + +void gcpResiduesPlugin::Populate (gcp::Application *App) +{ + m_App = App; + App->RegisterOptions (options); + App->AddMenuCallback (on_menu); + gcp::Residue::SetPostAddCallback (on_new_residue); +} + +void gcpResiduesPlugin::OpenDialog () +{ + Dialog *dlg = m_App->GetDialog ("residues"); + if (dlg) + gtk_window_present (dlg->GetWindow ()); + else + new gcpResiduesDlg (m_App); +} + +void gcpResiduesPlugin::ParseNodes (xmlNodePtr node, bool writeable) +{ + gcp::Residue* r; + while (node) { + if (!strcmp ((char*) node->name, "residue")) { + r = new gcp::Residue (); + r->Load (node, !writeable); + } + node = node->next; + } +} + +void gcpResiduesPlugin::OnNewResidue (gcp::Residue *res) +{ + Dialog *dlg = m_App->GetDialog ("residues"); + // build the xml node if none exists and save it + if (res) { + xmlNodePtr node = res->GetMolNode (); + if (!node) { + if (!user_residues) { + user_residues = xmlNewDoc ((xmlChar*) "1.0"); + docs.insert (user_residues); + xmlDocSetRootElement (user_residues, xmlNewDocNode (user_residues, NULL, (xmlChar*) "residues", NULL)); + char* filename = g_strconcat (getenv ("HOME"), "/.gchemutils/residues.xml", NULL); + user_residues->URL = xmlStrdup ((xmlChar*) filename); + g_free (filename); + } + node = xmlNewDocNode (user_residues, NULL, (xmlChar const *) "residue", NULL); + if (res->GetGeneric ()) + xmlNewProp (node, (xmlChar const *) "generic", (xmlChar const *) "true"); + string raw = static_cast (res->GetMolecule ())->GetRawFormula (); + xmlNewProp (node, (xmlChar const *) "raw", (xmlChar const *) raw.c_str ()); + map const &symbols = res->GetSymbols (); + map::const_iterator i = symbols.begin (), end = symbols.end (); + string sy; + if (i != symbols.end ()) + sy = (*i).first; + for (i++; i != end; i++) + sy += string(";") + (*i).first; + xmlNodePtr child = xmlNewDocNode (user_residues, NULL, (xmlChar const *) "symbols", (xmlChar const *) sy.c_str ()); + xmlAddChild (node, child); + child = xmlNewDocNode (user_residues, NULL, (xmlChar const *) "name", (xmlChar const *) res->GetName ()); + xmlAddChild (node, child); + xmlDocPtr xml = static_cast (res->GetDocument ())->BuildXMLTree (); + child = xml->children->children; + while (strcmp ((char const *) child->name, "molecule")) + child = child->next; + xmlUnlinkNode (child); + xmlAddChild (node, child); + xmlAddChild (user_residues->children, node); + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + xmlSaveFormatFile ((char*) user_residues->URL, user_residues, true); + xmlFreeDoc (xml); + res->Load (node, false); + } + } + if (dlg) + static_cast (dlg)->OnNewResidue (res); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/residues/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,53 @@ +// -*- C++ -*- + +/* + * GChemPaint residues plugin + * plugin.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_RESIDUES_PLUGIN_H +#define GCHEMPAINT_RESIDUES_PLUGIN_H + +#include +#include + +namespace gcp { + class Application; + class Residue; +} + +class gcpResiduesPlugin: public gcp::Plugin +{ +public: + gcpResiduesPlugin (); + virtual ~gcpResiduesPlugin (); + + void Populate (gcp::Application* App); + void OpenDialog (); + void OnNewResidue (gcp::Residue *res); + +private: + void ParseNodes (xmlNodePtr node, bool writeable); + +private: + gcp::Application *m_App; +}; + +#endif //GCHEMPAINT_RESIDUES_PLUGIN_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/pseudo-atom.cc gnome-chemistry-utils-0.10.9/plugins/paint/residues/pseudo-atom.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/pseudo-atom.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/pseudo-atom.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,150 @@ +// -*- C++ -*- + +/* + * GChemPaint residues plugin + * pseudo-atom.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "pseudo-atom.h" +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; + +TypeId PseudoAtomType = NoType; + +gcpPseudoAtom::gcpPseudoAtom (): gcp::Atom () +{ + gcu::Atom::SetZ (0); + Lock (true); +} + +gcpPseudoAtom::gcpPseudoAtom (double x, double y): gcp::Atom () +{ + gcu::Atom::SetZ (0); + SetCoords (x, y); + Lock (true); +} + +gcpPseudoAtom::~gcpPseudoAtom () +{ +} + +void gcpPseudoAtom::Update () +{ +} + +void gcpPseudoAtom::Add (GtkWidget* w) const +{ + gcp::WidgetData* pData = reinterpret_cast (g_object_get_data (G_OBJECT (w), "data")); + if (pData->Items[this] != NULL) + return; + gcp::Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + GnomeCanvasGroup* group = GNOME_CANVAS_GROUP (gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type(), NULL)); + double x, y, r; + GetCoords (&x, &y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + r = pTheme->GetFontSize () / PANGO_SCALE / 2; + GnomeCanvasItem *item = gnome_canvas_item_new ( + group, + gnome_canvas_ellipse_ext_get_type (), + "x1", x - r, + "y1", y - r, + "x2", x + r, + "y2", y + r, + "fill_color", (pData->IsSelected (this))? gcp::SelectColor: "black", + NULL); + g_object_set_data (G_OBJECT (group), "ellipse", item); + g_signal_connect (G_OBJECT (item), "event", G_CALLBACK (gcp::on_event), w); + g_object_set_data (G_OBJECT (item), "object", (void *) (this)); + pData->Items[this] = group; +} + +void gcpPseudoAtom::Update (GtkWidget* w) const +{ + if (!w) + return; + gcp::WidgetData* pData = reinterpret_cast (g_object_get_data (G_OBJECT (w), "data")); + gcp::Theme *pTheme = pData->m_View->GetDoc ()->GetTheme (); + double x, y, r; + GetCoords (&x, &y); + x *= pTheme->GetZoomFactor (); + y *= pTheme->GetZoomFactor (); + r = pTheme->GetFontSize () / PANGO_SCALE / 2; + GnomeCanvasGroup *group = pData->Items[this]; + g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "ellipse")), + "x1", x - r, + "y1", y - r, + "x2", x + r, + "y2", y + r, + NULL); +} + +xmlNodePtr gcpPseudoAtom::Save (xmlDocPtr xml) const +{ + xmlNodePtr parent; + parent = xmlNewDocNode (xml, NULL, (xmlChar*) "pseudo-atom", NULL); + if (!parent) + return NULL; + SaveId (parent); + + if (!WritePosition (xml, parent, NULL, m_x, m_y, m_z)) { + xmlFreeNode (parent); + return NULL; + } + + return parent; +} + +bool gcpPseudoAtom::Load (xmlNodePtr node) +{ + char* tmp; + tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); + if (tmp) { + SetId (tmp); + xmlFree (tmp); + if (strcmp (GetId(), "a1")) + return false; + } + if (!ReadPosition (node, NULL, &m_x, &m_y, &m_z)) + return false; + return true; +} + +bool gcpPseudoAtom::LoadNode (xmlNodePtr) +{ + return true; +} + +void gcpPseudoAtom::SetSelected (GtkWidget* w, int state) +{ + gcp::WidgetData* pData = reinterpret_cast (g_object_get_data (G_OBJECT (w), "data")); + GnomeCanvasGroup* group = pData->Items[this]; + g_object_set (G_OBJECT(g_object_get_data(G_OBJECT(group), "ellipse")), + "fill_color", ((state == gcp::SelStateSelected)? gcp::SelectColor: "black"), NULL); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/pseudo-atom.h gnome-chemistry-utils-0.10.9/plugins/paint/residues/pseudo-atom.h --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/pseudo-atom.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/pseudo-atom.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,50 @@ +// -*- C++ -*- + +/* + * GChemPaint residues plugin + * pseudo-atom.h + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCP_PSEUDO_ATOM_H +#define GCP_PSEUDO_ATOM_H + +#include + +extern gcu::TypeId PseudoAtomType; + +class gcpPseudoAtom: public gcp::Atom +{ +public: + gcpPseudoAtom (); + gcpPseudoAtom (double x, double y); + virtual ~gcpPseudoAtom (); + + void Update (); + void Add (GtkWidget* w) const; + void Update (GtkWidget* w) const; + virtual bool Load (xmlNodePtr); + xmlNodePtr Save (xmlDocPtr xml) const; + bool LoadNode (xmlNodePtr); + void SetSelected (GtkWidget* w, int state); + bool AcceptNewBonds (int nb = 1) {return false;} + bool AcceptCharge (int charge) {return false;} +}; + +#endif // GCP_PSEUDO_ATOM_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/residues-dlg.cc gnome-chemistry-utils-0.10.9/plugins/paint/residues/residues-dlg.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/residues-dlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/residues-dlg.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,481 @@ +// -*- C++ -*- + +/* + * GChemPaint residues plugin + * residues-dlg.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "residues-dlg.h" +#include "pseudo-atom.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +xmlDocPtr user_residues = NULL; +set docs; + + +static bool on_key_release (GtkWidget* widget, GdkEventKey* ev, gcpResiduesDlg *dlg) +{ + return dlg->OnKeyRelease (ev); +} + +static bool on_key_press (GtkWidget* widget, GdkEventKey* ev, gcpResiduesDlg *dlg) +{ + return dlg->OnKeyPress (ev); +} + +static void on_page (GtkNotebook *book, GtkNotebookPage *page, int num_page, gcpResiduesDlg *dlg) +{ + dlg->SetPage (num_page); +} + +static void on_cur_changed (GtkComboBox *box, gcpResiduesDlg *dlg) +{ + dlg->OnCurChanged (); +} + +static void on_save (gcpResiduesDlg *dlg) +{ + dlg->Add (); +} + +static void on_delete (gcpResiduesDlg *dlg) +{ + dlg->Remove (); +} + +static void on_symbol_activate (GtkEntry *entry, gcpResiduesDlg *dlg) +{ + dlg->OnSymbolActivate (); +} + +static bool on_symbol_focus_out (GtkEntry *entry, GdkEventFocus *event, gcpResiduesDlg *dlg) +{ + on_symbol_activate (entry, dlg); + return true; +} + +static void on_name_activate (GtkEntry *entry, gcpResiduesDlg *dlg) +{ + dlg->OnNameActivate (); +} + +static bool on_name_focus_out (GtkEntry *entry, GdkEventFocus *event, gcpResiduesDlg *dlg) +{ + on_name_activate (entry, dlg); + return true; +} + +static void on_generic_toggled (GtkToggleButton *btn, gcpResiduesDlg *dlg) +{ + dlg->SetGeneric (gtk_toggle_button_get_active (btn)); +} + +static void on_page_changed (GtkNotebook *book, gcpResiduesDlg *dlg) +{ + dlg->SetPage (gtk_notebook_get_current_page (book)); +} + +static int insert_symbol (GtkComboBox *box, char const *str) +{ + GtkTreeModel *model = gtk_combo_box_get_model (box); + GtkTreeIter iter; + int i = 1; + if (!gtk_tree_model_get_iter_from_string (model, &iter, "1")) { + gtk_combo_box_append_text (box, str); + return i; + } + char* text; + gtk_tree_model_get (model, &iter, 0, &text, -1); + while (strcmp (text, str) < 0) { + if (gtk_tree_model_iter_next (model, &iter)) + gtk_tree_model_get (model, &iter, 0, &text, -1); + else { + gtk_combo_box_append_text (box, str); + return i + 1; + } + i++; + } + gtk_combo_box_insert_text (box, i, str); + return i; +} + +static void delete_symbol (GtkComboBox *box, char const *str) +{ + GtkTreeModel *model = gtk_combo_box_get_model (box); + GtkTreeIter iter; + int i = 1; + if (!gtk_tree_model_get_iter_from_string (model, &iter, "1")) + return; + char* text; + gtk_tree_model_get (model, &iter, 0, &text, -1); + while (strcmp (text, str) < 0) { + if (gtk_tree_model_iter_next (model, &iter)) + gtk_tree_model_get (model, &iter, 0, &text, -1); + else + return; + i++; + } + gtk_combo_box_remove_text (box, i); +} + +gcpResiduesDlg::gcpResiduesDlg (gcp::Application *App): + Dialog (App, GLADEDIR"/residues.glade", "residues", App), + gcp::Target (App) +{ + m_Document = new gcp::Document (App, true, NULL); + m_Document->SetAllowClipboard (false); + GtkWidget *w = m_Document->GetView ()->CreateNewWidget (); + GtkScrolledWindow* scroll = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type (scroll, GTK_SHADOW_IN); + gtk_scrolled_window_add_with_viewport (scroll, w); + gtk_widget_set_size_request (GTK_WIDGET (scroll), 408, 308); + gtk_widget_show (GTK_WIDGET (scroll)); + gtk_box_pack_start (GTK_BOX (glade_xml_get_widget (xml, "formula-box")), GTK_WIDGET (scroll), true, true, 0); + gtk_widget_show_all (GTK_WIDGET (dialog)); + App->SetActiveDocument (m_Document); + gcp::Theme *theme = m_Document->GetTheme (); + double x = theme->GetFontSize () / PANGO_SCALE / 2. / theme->GetZoomFactor (); + m_Atom = new gcpPseudoAtom (x, 150. / theme->GetZoomFactor ()); + gcp::Atom *atom1 = new gcp::Atom (6, x + theme->GetBondLength (), 150. / theme->GetZoomFactor (), 0.); + m_Document->AddAtom (m_Atom); + m_Document->AddAtom (atom1); + gcp::Bond *bond = new gcp::Bond (m_Atom, atom1, 1); + m_Document->AddBond (bond); + atom1->Lock (true); + bond->Lock (true); + SetWindow (dialog); + g_signal_connect (dialog, "key-press-event", G_CALLBACK (on_key_press), this); + g_signal_connect (dialog, "key-release-event", G_CALLBACK (on_key_release), this); + g_signal_connect (glade_xml_get_widget (xml, "residue-book"), "switch-page", G_CALLBACK (on_page), this); + m_CurBox = GTK_COMBO_BOX (glade_xml_get_widget (xml, "cur-box")); + ResidueIterator i; + string const *s = Residue::GetFirstResidueSymbol (i); + while (s) { + gtk_combo_box_append_text (m_CurBox, s->c_str ()); + s = Residue::GetNextResidueSymbol (i); + } + gtk_combo_box_set_active (m_CurBox, 0); + g_signal_connect (G_OBJECT (m_CurBox), "changed", G_CALLBACK (on_cur_changed), this); + m_SaveBtn = glade_xml_get_widget (xml, "save"); + g_signal_connect_swapped (G_OBJECT (m_SaveBtn), "clicked", G_CALLBACK (on_save), this); + m_DeleteBtn = glade_xml_get_widget (xml, "delete"); + g_signal_connect_swapped (G_OBJECT (m_DeleteBtn), "clicked", G_CALLBACK (on_delete), this); + m_SymbolEntry = GTK_ENTRY (glade_xml_get_widget (xml, "symbol-entry")); + g_signal_connect (G_OBJECT (m_SymbolEntry), "activate", G_CALLBACK (on_symbol_activate), this); + g_signal_connect_after (G_OBJECT (m_SymbolEntry), "focus_out_event", G_CALLBACK (on_symbol_focus_out), this); + m_ValidSymbols = false; + m_NameEntry = GTK_ENTRY (glade_xml_get_widget (xml, "name-entry")); + g_signal_connect (G_OBJECT (m_NameEntry), "activate", G_CALLBACK (on_name_activate), this); + g_signal_connect_after (G_OBJECT (m_NameEntry), "focus_out_event", G_CALLBACK (on_name_focus_out), this); + m_ValidName = false; + m_GenericBtn = glade_xml_get_widget (xml, "generic-btn"); + g_signal_connect (m_GenericBtn, "toggled", G_CALLBACK (on_generic_toggled), this); + m_Generic = false; + m_Residue = NULL; + m_Page = 0; + g_signal_connect (glade_xml_get_widget (xml, "residue-book"), "change-current-page", G_CALLBACK (on_page_changed), this); +} + +gcpResiduesDlg::~gcpResiduesDlg () +{ +} + +void gcpResiduesDlg::Add () +{ + xmlDocPtr xml; + xmlNodePtr node, child; + if (m_Document->GetChildrenNumber () != 1) { + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Please, provide only one molecule."))); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return; + } + if (!user_residues) { + user_residues = xmlNewDoc ((xmlChar*) "1.0"); + docs.insert (user_residues); + xmlDocSetRootElement (user_residues, xmlNewDocNode (user_residues, NULL, (xmlChar*) "residues", NULL)); + char* filename = g_strconcat (getenv ("HOME"), "/.gchemutils/residues.xml", NULL); + user_residues->URL = xmlStrdup ((xmlChar*) filename); + g_free (filename); + } + char const *name = gtk_entry_get_text (m_NameEntry); + if (*name == 0) { + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Please, provide a name for the residue"))); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return; + } + gcp::Residue const *r = static_cast (gcp::Residue::GetResiduebyName (name)); + if (r && r != m_Residue) { + + } + char const *symbols = gtk_entry_get_text (m_SymbolEntry); + std::istringstream s(symbols); + std::list sl; + char buf[10]; + while (!s.eof ()) { + s.getline(buf, 10, ';'); + if (strlen (buf) > 8) { + // Symbols longer than 8 chars are not currently allowed + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Symbols with more than eight characters are not allowed."))); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return; + } else if (!strcmp (buf, _("New"))) { + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("\"New\" is not a valid symbol"))); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return; + } else + sl.push_back (buf); + } + if (sl.size () == 0) { + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Please provide at least one symbol"))); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return; + } + std::list::reverse_iterator i, iend = sl.rend (); + for (i = sl.rbegin (); i != iend; i++) { + r = static_cast (gcp::Residue::GetResidue ((*i).c_str ())); + if (r && r != m_Residue) { + char *mess = g_strdup_printf (_("%s is already used by another residue."), (*i).c_str ()); + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,mess)); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + g_free (mess); + return; + } + } + gcp::Molecule *mol = dynamic_cast (m_Atom->GetMolecule ()); + string raw = mol->GetRawFormula (); + if (raw.length () == 0) { + GtkDialog* box = GTK_DIALOG (gtk_message_dialog_new (GTK_WINDOW(dialog), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Empty formula, this should never happen.\nPlease file a bug report"))); + gtk_window_set_icon_name (GTK_WINDOW (box), m_App->GetName ().c_str ()); + if (gtk_dialog_run (box) != GTK_RESPONSE_NONE) + gtk_widget_destroy (GTK_WIDGET (box)); + return; + } + // If we are there, everything is OK. + char *new_name = g_strdup (name), *new_symbols = g_strdup (symbols);; + Remove (); // remove the old version if any + m_Residue = new gcp::Residue (new_name); + int n = -1; + for (i = sl.rbegin (); i != iend; i++) { + m_Residue->AddSymbol ((*i).c_str ()); + n = insert_symbol (m_CurBox, (*i).c_str ()); + } + node = xmlNewDocNode (user_residues, NULL, (xmlChar const *) "residue", NULL); + if (m_Generic) + xmlNewProp (node, (xmlChar const *) "generic", (xmlChar const *) "true"); + xmlNewProp (node, (xmlChar const *) "raw", (xmlChar const *) raw.c_str ()); + m_Residue->SetGeneric (m_Generic); + child = xmlNewDocNode (user_residues, NULL, (xmlChar const *) "symbols", (xmlChar const *) new_symbols); + g_free (new_symbols); + xmlAddChild (node, child); + child = xmlNewDocNode (user_residues, NULL, (xmlChar const *) "name", (xmlChar const *) new_name); + g_free (new_name); + xmlAddChild (node, child); + xml = m_Document->BuildXMLTree (); + child = xml->children->children; + while (strcmp ((char const *) child->name, "molecule")) + child = child->next; + xmlUnlinkNode (child); + xmlAddChild (node, child); + xmlAddChild (user_residues->children, node); + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + xmlSaveFormatFile ((char*) user_residues->URL, user_residues, true); + xmlFreeDoc (xml); + m_Residue->Load (node, false); + gtk_combo_box_set_active (m_CurBox, n); +} + +void gcpResiduesDlg::Remove () +{ + if (m_Residue == NULL) + return; + gcp::Residue *residue = m_Residue; + gtk_combo_box_set_active (m_CurBox, 0); + xmlUnlinkNode (residue->GetNode ()); + xmlFreeNode (residue->GetNode ()); + map const &symbols = residue->GetSymbols (); + map::const_iterator i, end = symbols.end (); + for (i = symbols.begin (); i != end; i++) + delete_symbol (m_CurBox, (*i).first.c_str ()); + delete residue; + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + xmlSaveFormatFile ((char*) user_residues->URL, user_residues, true); +} + +bool gcpResiduesDlg::Close () +{ + Dialog::Destroy (); + return true; +} + +bool gcpResiduesDlg::OnKeyPress (GdkEventKey *event) +{ + if (m_Page) { +// Next lines are commented out because they just do not work properly: FIXME if possible + if (event->state & GDK_CONTROL_MASK) { + switch (event->keyval) { + case GDK_Z: + m_Document->OnRedo (); + break; + case GDK_z: + m_Document->OnUndo (); + break; + } + return false; + } + // Only when editing the residue + switch (event->keyval) { + case GDK_Delete: + case GDK_Clear: + case GDK_BackSpace: { + // the molecule must not be deleted + Object *mol = m_Atom->GetMolecule (); + gcp::WidgetData *data = reinterpret_cast (g_object_get_data (reinterpret_cast (m_Document->GetWidget ()), "data")); + if (data->IsSelected (mol)) { + data->Unselect (mol); + m_Document->GetView ()->OnDeleteSelection (m_Document->GetWidget ()); + data->SetSelected (mol); + return false; + } + break; + } + default: + break; + } + return m_Document->GetView ()->OnKeyPress (m_Document->GetWidget (), event); + } + return false; +} + +bool gcpResiduesDlg::OnKeyRelease (GdkEventKey *event) +{ + if (m_Page) + return m_Document->GetView ()->OnKeyRelease (m_Document->GetWidget (), event); + return false; +} + +void gcpResiduesDlg::OnCurChanged () +{ + char *symbol = gtk_combo_box_get_active_text (m_CurBox); + if (!strcmp (symbol, _("New"))) { + m_Residue = NULL; + gtk_entry_set_text (m_NameEntry, ""); + gtk_entry_set_text (m_SymbolEntry, ""); + gtk_widget_set_sensitive (reinterpret_cast (m_NameEntry), true); + gtk_widget_set_sensitive (reinterpret_cast (m_SymbolEntry), true); + gtk_widget_set_sensitive (m_SaveBtn, false); + gtk_widget_set_sensitive (m_DeleteBtn, false); + gtk_widget_set_sensitive (m_GenericBtn, true); + m_Document->SetEditable (true); + return; + } + m_Residue = const_cast (static_cast (Residue::GetResidue (symbol))); + if (m_Residue->GetReadOnly ()) { + gtk_widget_set_sensitive (reinterpret_cast (m_NameEntry), false); + gtk_widget_set_sensitive (reinterpret_cast (m_SymbolEntry), false); + gtk_widget_set_sensitive (m_SaveBtn, false); + gtk_widget_set_sensitive (m_DeleteBtn, false); + gtk_widget_set_sensitive (m_GenericBtn, false); + m_Document->SetEditable (false); + } else { + gtk_widget_set_sensitive (reinterpret_cast (m_NameEntry), true); + gtk_widget_set_sensitive (reinterpret_cast (m_SymbolEntry), true); + gtk_widget_set_sensitive (m_SaveBtn, true); + gtk_widget_set_sensitive (m_DeleteBtn, m_Residue->GetRefs () == 0); + gtk_widget_set_sensitive (m_GenericBtn, true); + m_Document->SetEditable (true); + } + gtk_entry_set_text (m_NameEntry, m_Residue->GetName ()); + map const &symbols = m_Residue->GetSymbols (); + map::const_iterator i = symbols.begin (), end = symbols.end (); + string sy; + if (i != symbols.end ()) + sy = (*i).first; + for (i++; i != end; i++) + sy += string(";") + (*i).first; + gtk_entry_set_text (m_SymbolEntry, sy.c_str ()); + m_Document->Clear (); + m_Document->LoadObjects (m_Residue->GetMolNode ()); + double r = m_Document->GetTheme ()->GetBondLength () / m_Document->GetMedianBondLength (); + if (fabs (r - 1.) > .0001) { + Matrix2D m (r, 0., 0., r); + m_Document->Transform2D (m, 0., 0.); + m_Document->GetView ()->Update (m_Document); + m_Document->GetView ()->EnsureSize (); + } + m_Document->GetView ()->EnsureSize (); + m_Atom = dynamic_cast (m_Document->GetDescendant ("a1")); + map::iterator j; + m_Atom->GetFirstBond (j); + static_cast ((*j).first)->Lock (); + static_cast ((*j).second)->Lock (); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_GenericBtn), m_Residue->GetGeneric ()); +} + +void gcpResiduesDlg::OnSymbolActivate () +{ + char const *text = gtk_entry_get_text (m_SymbolEntry); + char **symbols = g_strsplit (text, ";", 0); + m_ValidSymbols = *symbols; + g_strfreev (symbols); + gtk_widget_set_sensitive (m_SaveBtn, m_ValidName && m_ValidSymbols); +} + +void gcpResiduesDlg::OnNameActivate () +{ + char const *text = gtk_entry_get_text (m_NameEntry); + m_ValidName = strlen (text) > 0; + gtk_widget_set_sensitive (m_SaveBtn, m_ValidName && m_ValidSymbols); +} + +void gcpResiduesDlg::OnNewResidue (gcp::Residue *res) +{ + if (res) { + map const &symbols = res->GetSymbols (); + map::const_iterator i = symbols.begin (), end = symbols.end (); + for (i = symbols.begin (); i != end; i++) + gtk_combo_box_append_text (m_CurBox, (*i).first.c_str ()); + } else if (m_Residue && !m_Residue->GetReadOnly ()) + gtk_widget_set_sensitive (m_DeleteBtn, m_Residue->GetRefs () == 0); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/residues-dlg.h gnome-chemistry-utils-0.10.9/plugins/paint/residues/residues-dlg.h --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/residues-dlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/residues-dlg.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,71 @@ +// -*- C++ -*- + +/* + * GChemPaint residues plugin + * residues-dlg.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCP_RESIDUE_DLG_H +#define GCP_RESIDUE_DLG_H + +#include +#include +#include + +class gcpPseudoAtom; +using namespace std; +using namespace gcu; + +namespace gcp { +class Application; +class Document; +class Residue; +} + +class gcpResiduesDlg: public Dialog, public gcp::Target +{ +public: + gcpResiduesDlg (gcp::Application *App); + virtual ~gcpResiduesDlg (); + + void Add (); + void Remove (); + bool Close (); + + bool OnKeyPress (GdkEventKey *event); + bool OnKeyRelease (GdkEventKey *event); + void OnCurChanged (); + void OnSymbolActivate (); + void OnNameActivate (); + void OnNewResidue (gcp::Residue *res); + +private: + gcpPseudoAtom *m_Atom; + GtkComboBox *m_CurBox; + GtkWidget *m_SaveBtn, *m_DeleteBtn, *m_GenericBtn; + GtkEntry *m_SymbolEntry, *m_NameEntry; + bool m_ValidName, m_ValidSymbols; + gcp::Residue *m_Residue; + +GCU_PROP (int, Page); +GCU_PROP (bool, Generic); +}; + +#endif // GCP_RESIDUE_DLG_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/residues/residues.glade gnome-chemistry-utils-0.10.9/plugins/paint/residues/residues.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/residues/residues.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/residues/residues.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,247 @@ + + + + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK + 5 + Residues + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + New + + + + + True + False + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-save + True + 0 + + + 1 + + + + + True + False + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-delete + True + 0 + + + 2 + + + + + 1 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 3 + 2 + 12 + 6 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 12 + N_ame: + True + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 12 + _Symbol(s): + True + + + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 12 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Generic + True + 0 + True + + + + + 2 + 2 + 3 + GTK_FILL + + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Identity + + + tab + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Formula + + + tab + 1 + False + + + + + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_BUTTONBOX_EDGE + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-help + True + 0 + + + + + + + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-close + True + 0 + + + 3 + + + + + False + GTK_PACK_END + + + + + + Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/selection/brackets24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/selection/brackets24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/bracketstool.cc gnome-chemistry-utils-0.10.9/plugins/paint/selection/bracketstool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/bracketstool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/bracketstool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,47 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * bracketstool.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "bracketstool.h" + +gcpBracketsTool::gcpBracketsTool (gcp::Application* App): gcp::Tool (App, "Brackets") +{ +} + +gcpBracketsTool::~gcpBracketsTool () +{ +} + +bool gcpBracketsTool::OnClicked () +{ + return false; +} + +void gcpBracketsTool::OnDrag () +{ +} + +void gcpBracketsTool::OnRelease () +{ +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/bracketstool.h gnome-chemistry-utils-0.10.9/plugins/paint/selection/bracketstool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/bracketstool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/bracketstool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,46 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * bracketstool.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_BRACKETS_TOOL_H +#define GCHEMPAINT_BRACKETS_TOOL_H + +#include + +namespace gcp { + class Application; +} + +class gcpBracketsTool: public gcp::Tool +{ +public: + gcpBracketsTool (gcp::Application* App); + virtual ~gcpBracketsTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); + char const *GetHelpTag () {return "brackets";} +}; + +#endif // GCHEMPAINT_BRACKETS_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/selection/eraser24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/selection/eraser24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/erasertool.cc gnome-chemistry-utils-0.10.9/plugins/paint/selection/erasertool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/erasertool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/erasertool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,182 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * erasertool.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "erasertool.h" +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; + +gcpEraserTool::gcpEraserTool (gcp::Application* App): gcp::Tool (App, "Erase") +{ + m_bChanged = false; +} + +gcpEraserTool::~gcpEraserTool () +{ +} + +bool gcpEraserTool::OnClicked () +{ + if (m_pObject) { + if (m_pObject->IsLocked ()) + return false; + TypeId Id = m_pObject->GetType (); + if (Id == ReactionOperatorType) + return false; //It's an automatic object, don't delete it + m_pObject->SetSelected (m_pWidget, gcp::SelStateErasing); + m_pItem = m_pView->GetCanvasItem (m_pWidget, m_pObject); + if (Id == AtomType) { + Object* parent = m_pObject->GetParent (); + if (parent->GetType () == FragmentType) + m_pItem = m_pView->GetCanvasItem (m_pWidget, parent); + std::map::iterator i; + gcp::Bond* pBond = (gcp::Bond*)((gcp::Atom*)m_pObject)->GetFirstBond (i); + while (pBond) { + pBond->SetSelected (m_pWidget, gcp::SelStateErasing); + pBond = (gcp::Bond*) ((gcp::Atom*) m_pObject)->GetNextBond (i); + } + } + m_bChanged = true; + return true; + } + return false; +} + +void gcpEraserTool::OnDrag () +{ + if (!m_pObject) + return; + TypeId Id = m_pObject->GetType (); + GnomeCanvasItem* pItem = gnome_canvas_get_item_at (GNOME_CANVAS (m_pWidget), m_x, m_y); + gcp::Theme *Theme = m_pView->GetDoc ()->GetTheme (); + Object* pObject = NULL; + switch (Id) { + case BondType: + if (((gcp::Bond*) m_pObject)->GetDist (m_x / m_dZoomFactor, m_y / m_dZoomFactor) < (Theme->GetPadding () + Theme->GetBondWidth () / 2) / m_dZoomFactor) { + if (!m_bChanged) { + m_pObject->SetSelected (m_pWidget, gcp::SelStateErasing); + m_bChanged = true; + } + } else if (m_bChanged) { + m_pObject->SetSelected (m_pWidget, gcp::SelStateUnselected); + m_bChanged = false; + } + break; + case AtomType: + if (pItem == (GnomeCanvasItem*) m_pBackground) + pItem = NULL; + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + if (pObject) { + if (pObject->GetType () == BondType) + pObject = ((gcp::Bond*) pObject)->GetAtomAt (m_x / m_dZoomFactor, m_y / m_dZoomFactor); + else if (pObject->GetType () == FragmentType) + pObject = ((gcp::Fragment*) pObject)->GetAtom (); + } + if (pObject == m_pObject) { + if (!m_bChanged) { + m_pObject->SetSelected (m_pWidget, gcp::SelStateErasing); + std::map::iterator i; + gcp::Bond* pBond = (gcp::Bond*) ((gcp::Atom*) m_pObject)->GetFirstBond (i); + while (pBond) { + pBond->SetSelected (m_pWidget, gcp::SelStateErasing); + pBond = (gcp::Bond*) ((gcp::Atom*) m_pObject)->GetNextBond (i); + } + m_bChanged = true; + } + } else if (m_bChanged) { + m_pObject->SetSelected (m_pWidget, gcp::SelStateUnselected); + std::map::iterator i; + gcp::Bond* pBond = (gcp::Bond*) ((gcp::Atom*) m_pObject)->GetFirstBond (i); + while (pBond) { + pBond->SetSelected (m_pWidget, gcp::SelStateUnselected); + pBond = (gcp::Bond*) ((gcp::Atom*) m_pObject)->GetNextBond (i); + } + m_bChanged = false; + } + break; + default: + if (pItem) + pObject = (Object*) g_object_get_data (G_OBJECT (pItem), "object"); + if (pObject == m_pObject) { + if (!m_bChanged) { + m_pObject->SetSelected (m_pWidget, gcp::SelStateErasing); + m_bChanged = true; + } + } else if (m_bChanged) { + m_pObject->SetSelected (m_pWidget, gcp::SelStateUnselected); + m_bChanged = false; + } + } +} + +void gcpEraserTool::OnRelease () +{ + char *id = NULL; + if ((!m_pObject) || (!m_bChanged)) { + m_pItem = NULL; + return; + } + gcp::Document* pDoc = m_pView->GetDoc (); + gcp::Operation *pOp; + Object *pObj = m_pObject->GetGroup (), *Parent; + if (pObj && (pObj->GetType () != MoleculeType || m_pObject->GetType () == OtherType)) { + pOp = pDoc->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + pOp->AddObject (pObj, 0); + id = g_strdup (pObj->GetId ()); + } else { + pOp = pDoc->GetNewOperation (gcp::GCP_DELETE_OPERATION); + pOp->AddObject (m_pObject); + } + if (m_pObject->GetType () == AtomType) { + Object* parent = m_pObject->GetParent (); + if (parent->GetType () == FragmentType) + m_pObject = parent; + } + Parent = m_pObject->GetParent (); +// A molecule might disappear, so get its parent + if (Parent->GetType () == MoleculeType) + Parent = Parent->GetParent (); + m_pItem = NULL; + if (m_pData->Items[m_pObject] == NULL) { + m_pData->Items.erase (m_pObject); + return; + } + pDoc->Remove (m_pObject); + Parent->EmitSignal (gcp::OnChangedSignal); + if (id) { + pObj = pDoc->GetChild (id); + if (pObj) + pOp->AddObject (pObj, 1); + g_free (id); + } + pDoc->FinishOperation (); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/erasertool.h gnome-chemistry-utils-0.10.9/plugins/paint/selection/erasertool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/erasertool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/erasertool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,46 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * erasertool.h + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_ERASER_TOOL_H +#define GCHEMPAINT_ERASER_TOOL_H + +#include + +namespace gcp { + class Application; +} + +class gcpEraserTool: public gcp::Tool +{ +public: + gcpEraserTool (gcp::Application* App); + virtual ~gcpEraserTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); + char const *GetHelpTag () {return "eraser";} +}; + +#endif // GCHEMPAINT_ERASER_TOOL_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/group.cc gnome-chemistry-utils-0.10.9/plugins/paint/selection/group.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/group.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/group.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,366 @@ +/* + * GChemPaint selection plugin + * group.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "group.h" +#include "groupdlg.h" +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +TypeId GroupType = NoType; + +static void on_group_properties (gcpGroup* group) +{ + new gcpGroupDlg ((gcp::Document*) group->GetDocument (), group); +} + +gcpGroup::gcpGroup (): Object(GroupType) +{ + SetId ("gr1"); + m_Align = false; + m_Spaced = false; +} + +gcpGroup::~gcpGroup () +{ +} + +bool gcpGroup::BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) +{ + GtkActionGroup *group = gtk_action_group_new ("group"); + GtkAction *action = gtk_action_new ("group_properties", _("Group properties..."), NULL, NULL); + g_signal_connect_swapped (action, "activate", G_CALLBACK (on_group_properties), this); + gtk_action_group_add_action (group, action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + gtk_ui_manager_insert_action_group (UIManager, group, 0); + Object::BuildContextualMenu (UIManager, object, x, y); + return true; +} + +void gcpGroup::SetAligned (gcpAlignType type) +{ + if (!m_Align || m_AlignType != type) { + m_Align = true; + m_AlignType = type; + Align (); + } +} + +void gcpGroup::UnAlign () +{ + m_Align = false; + m_Spaced = false; +} + +bool gcpGroup::GetAlignType (gcpAlignType& align) +{ + align = m_AlignType; + return m_Align; +} + +void gcpGroup::SetPadding (double padding) +{ + if (!m_Spaced || m_Padding != padding) { + m_Spaced = true; + m_Padding = padding; + Space (); + } +} + +void gcpGroup::UnSpace () +{ + m_Spaced = false; +} + +bool gcpGroup::GetPadding (double& padding) +{ + padding = m_Padding; + return m_Spaced; +} + +void gcpGroup::Align () +{ + if (!m_Align) + return; + map Children; + map::iterator i; + Object* obj = GetFirstChild (i); + ArtDRect rect; + gcp::Document *pDoc = dynamic_cast (GetDocument ()); + gcp::View *View = pDoc->GetView (); + gcp::Theme *pTheme = pDoc->GetTheme (); + gcp::WidgetData *Data = reinterpret_cast (g_object_get_data (G_OBJECT (View->GetWidget ()), "data")); + double x = 0., t = 0.; + if ((m_AlignType == GCP_ALIGN_TOP) + || (m_AlignType == GCP_ALIGN_LEFT)) + t = DBL_MAX; + while (obj) { + if (m_AlignType == GCP_ALIGN_NORMAL) { + x = obj->GetYAlign (); + t += x; + } else { + Data->GetObjectBounds (obj, &rect); + switch (m_AlignType) { + case GCP_ALIGN_TOP: + x = rect.y0 / pTheme->GetZoomFactor (); + if (t > x) + t = x; + break; + case GCP_ALIGN_MID_HEIGHT: + x = (rect.y0 + rect.y1) / 2. / pTheme->GetZoomFactor (); + t += x; + break; + case GCP_ALIGN_BOTTOM: + x = rect.y1 / pTheme->GetZoomFactor (); + if (t < x) + t = x; + break; + case GCP_ALIGN_LEFT: + x = rect.x0 / pTheme->GetZoomFactor (); + if (t > x) + t = x; + break; + case GCP_ALIGN_CENTER: + x = (rect.x0 + rect.x1) / 2. / pTheme->GetZoomFactor (); + t += x; + break; + case GCP_ALIGN_RIGHT: + x = rect.x1 / pTheme->GetZoomFactor (); + if (t < x) + t = x; + break; + default: + break; + } + } + Children[obj] = x; + obj = GetNextChild (i); + } + if ((m_AlignType == GCP_ALIGN_NORMAL) + || (m_AlignType == GCP_ALIGN_MID_HEIGHT) + || (m_AlignType == GCP_ALIGN_CENTER)) + t /= GetChildrenNumber (); + obj = GetFirstChild (i); + while (obj) { + if ((m_AlignType == GCP_ALIGN_LEFT) + || (m_AlignType == GCP_ALIGN_CENTER) + || (m_AlignType == GCP_ALIGN_RIGHT)) + obj->Move (t - Children[obj], 0); + else + obj->Move (0, t - Children[obj]); + View->Update (obj); + obj = GetNextChild (i); + } + Space (); +} + +void gcpGroup::Space () +{ + if (!m_Align || !m_Spaced) + return; + map::iterator i; + map rects; + map Children; + map::iterator im, endm; + Object* obj = GetFirstChild (i); + ArtDRect rect; + double x; + gcp::Document *pDoc = dynamic_cast (GetDocument ()); + gcp::View *View = pDoc->GetView (); + gcp::Theme *pTheme = pDoc->GetTheme (); + gcp::WidgetData *Data = (gcp::WidgetData*) g_object_get_data (G_OBJECT (View->GetWidget ()), "data"); + while (obj) { + Data->GetObjectBounds (obj, &rect); + rects[obj] = rect; + x = (m_AlignType <= GCP_ALIGN_BOTTOM)? rect.x0: rect.y0; + while (Children[x]) + x += 1e-5; + Children[x] = obj; + obj = GetNextChild (i); + } + endm = Children.end (); + im = Children.begin(); + rect = rects[(*im).second]; + x = (m_AlignType <= GCP_ALIGN_BOTTOM)? rect.x1: rect.y1; + x /= pTheme->GetZoomFactor (); + for (im++; im != endm; im++) { + x += m_Padding; + obj = (*im).second; + rect = rects[obj]; + if (m_AlignType <= GCP_ALIGN_BOTTOM) { + obj->Move (x - rect.x0 / pTheme->GetZoomFactor (), 0); + x += (rect.x1 - rect.x0) / pTheme->GetZoomFactor (); + } else { + obj->Move (0, x - rect.y0 / pTheme->GetZoomFactor ()); + x += (rect.y1 - rect.y0) /pTheme->GetZoomFactor (); + } + View->Update (obj); + } +} + +bool gcpGroup::Load (xmlNodePtr node) +{ + if (!Object::Load (node)) + return false; + Lock (); + char *buf = (char*) xmlGetProp (node, (const xmlChar*) "align"); + if (buf) { + if (!strcmp (buf, "normal")) { + m_Align = true; + m_AlignType = GCP_ALIGN_NORMAL; + } else if (!strcmp (buf, "top")) { + m_Align = true; + m_AlignType = GCP_ALIGN_TOP; + } else if (!strcmp (buf, "mid-height")) { + m_Align = true; + m_AlignType = GCP_ALIGN_MID_HEIGHT; + } else if (!strcmp (buf, "bottom")) { + m_Align = true; + m_AlignType = GCP_ALIGN_BOTTOM; + } else if (!strcmp (buf, "left")) { + m_Align = true; + m_AlignType = GCP_ALIGN_LEFT; + } else if (!strcmp (buf, "center")) { + m_Align = true; + m_AlignType = GCP_ALIGN_CENTER; + } else if (!strcmp (buf, "right")) { + m_Align = true; + m_AlignType = GCP_ALIGN_RIGHT; + } else + m_Align = false; + xmlFree (buf); + if (m_Align) { + m_Padding = false; + buf = (char*) xmlGetProp (node, (const xmlChar*) "padding"); + if (buf) { + char *endptr; + m_Padding = strtod (buf, &endptr); + if (!*endptr && (errno != ERANGE)) + m_Spaced = true; + xmlFree (buf); + } + ((gcp::Document*) GetDocument ())->GetView ()->AddObject (this); + gcp::WidgetData *pData= (gcp::WidgetData*) g_object_get_data (G_OBJECT (((gcp::Document*) GetDocument ())->GetWidget ()), "data"); + gnome_canvas_update_now (GNOME_CANVAS (pData->Canvas)); + Align (); + } + } + Lock (false); + return true; +} + +xmlNodePtr gcpGroup::Save (xmlDocPtr xml) const +{ + xmlNodePtr node = Object::Save (xml); + if (m_Align) { + char const *align_type = NULL; + switch (m_AlignType) { + case GCP_ALIGN_NORMAL: + align_type = "normal"; + break; + case GCP_ALIGN_TOP: + align_type = "top"; + break; + case GCP_ALIGN_MID_HEIGHT: + align_type = "mid-height"; + break; + case GCP_ALIGN_BOTTOM: + align_type = "bottom"; + break; + case GCP_ALIGN_LEFT: + align_type = "left"; + break; + case GCP_ALIGN_CENTER: + align_type = "center"; + break; + case GCP_ALIGN_RIGHT: + align_type = "right"; + break; + } + xmlNewProp (node, (const xmlChar*) "align", (const xmlChar*) align_type); + if (m_Spaced) { + char *buf = g_strdup_printf ("%g", m_Padding); + xmlNewProp (node, (const xmlChar*) "padding", (const xmlChar*) buf); + g_free (buf); + } + } + return node; +} + +bool gcpGroup::OnSignal (SignalId Signal, Object *Child) +{ + if (IsLocked ()) + return false; + if (Signal == gcp::OnChangedSignal) { + if (GetChildrenNumber () < 2) + delete this; + else { + GnomeCanvas* w = GNOME_CANVAS (((gcp::Document*) GetDocument ())->GetWidget ()); + while (w->idle_id) + gtk_main_iteration(); + gnome_canvas_update_now (w); + Align (); + } + } + return true; +} + +void gcpGroup::Transform2D (Matrix2D& m, double x, double y) +{ +} + +double gcpGroup::GetYAlign () +{ + gcp::Document *pDoc = reinterpret_cast (GetDocument ()); + gcp::WidgetData* pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (pDoc->GetWidget ()), "data"); + ArtDRect rect; + pData->GetObjectBounds (this, &rect); + return (rect.y1 - rect.y0) / 2.; +} + +void gcpGroup::Add (GtkWidget* w) +{ + map::iterator i; + Object* p = GetFirstChild (i); + while (p) + { + p->Add (w); + p = GetNextChild (i); + } +} + +void gcpGroup::OnLoaded () +{ + if (GetChildrenNumber () < 2) + delete this; + else + Align (); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/groupdlg.cc gnome-chemistry-utils-0.10.9/plugins/paint/selection/groupdlg.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/groupdlg.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/groupdlg.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,183 @@ +/* + * GChemPaint selection plugin + * groupdlg.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "groupdlg.h" +#include "selectiontool.h" +#include +#include +#include +#include + +using namespace std; + +static void on_align_toggled (gcpGroupDlg *dlg) +{ + dlg->OnAlignToggled (); +} + +static void on_space_toggled (gcpGroupDlg *dlg) +{ + dlg->OnSpaceToggled (); +} + +gcpGroupDlg::gcpGroupDlg (gcp::Document *Doc, gcpGroup *group): + Dialog (Doc->GetApplication (), GLADEDIR"/group.glade", "group", Doc) +{ + if (!xml) { + delete this; + return; + } + m_Group = group; + m_Doc = Doc; + m_Data = (gcp::WidgetData*) g_object_get_data (G_OBJECT (Doc->GetWidget ()), "data"); + align_box = GTK_COMBO_BOX (glade_xml_get_widget (xml, "align_type")); + align_btn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "align_btn")); + group_btn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "group_btn")); + space_btn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "space")); + padding_btn = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "padding")); + dist_lbl = glade_xml_get_widget (xml, "dist_lbl"); + if (group) { + gtk_toggle_button_set_active (group_btn, true); + gcpAlignType type; + bool aligned = group->GetAlignType (type); + gtk_toggle_button_set_active (align_btn, aligned); + if (!aligned) { + gtk_widget_set_sensitive (GTK_WIDGET (align_box), false); + gtk_widget_set_sensitive (GTK_WIDGET (padding_btn), false); + gtk_toggle_button_set_active (space_btn, false); + } else { + SetAlignType (type); + double padding; + bool spaced = group->GetPadding (padding); + gtk_toggle_button_set_active (space_btn, spaced); + if (spaced) + gtk_spin_button_set_value (padding_btn, padding); + else + gtk_widget_set_sensitive (GTK_WIDGET (padding_btn), false); + } + } else { + gcp::Theme *pTheme = Doc->GetTheme (); + gtk_combo_box_set_active (align_box, 0); + gtk_spin_button_set_value (padding_btn, pTheme->GetObjectPadding () / pTheme->GetZoomFactor ()); + } + g_signal_connect_swapped (align_btn, "toggled", G_CALLBACK (on_align_toggled), this); + g_signal_connect_swapped (space_btn, "toggled", G_CALLBACK (on_space_toggled), this); +} + +gcpGroupDlg::~gcpGroupDlg () +{ +} + +void gcpGroupDlg::SetAlignType (gcpAlignType type) +{ + gtk_combo_box_set_active (align_box, type); +} + +bool gcpGroupDlg::Apply () +{ + std::list::iterator i, end; + bool align = gtk_toggle_button_get_active (align_btn); + bool group = gtk_toggle_button_get_active (group_btn); + bool space = gtk_toggle_button_get_active (space_btn); + gcpAlignType align_type = (gcpAlignType) gtk_combo_box_get_active (align_box); + double padding = gtk_spin_button_get_value (padding_btn); + gcp::Operation *pOp = m_Doc->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + if (m_Group) + pOp->AddObject (m_Group, 0); + else { + end = m_Data->SelectedObjects.end (); + for (i = m_Data->SelectedObjects.begin (); i!= end; i++) + pOp->AddObject (*i, 0); + } + + if (!m_Group) { + m_Group = new gcpGroup (); + m_Group->SetParent (m_Doc); + for (i = m_Data->SelectedObjects.begin (); i!= end; i++) + (*i)->SetParent (m_Group); + m_Data->UnselectAll (); + m_Data->SetSelected (m_Group); + } + + // align objects now + if (align) { + m_Group->SetAligned (align_type); + if (space) + m_Group->SetPadding (padding); + m_Group->GetParent ()->EmitSignal (gcp::OnChangedSignal); + } + + if (!group && m_Group) { + bool selected = m_Data->IsSelected (m_Group); + if (selected) + m_Data->Unselect (m_Group); + map< string, Object * >::iterator j; + Object *obj = m_Group->GetFirstChild (j); + while (obj) { + pOp->AddObject (obj, 1); + if (selected) + m_Data->SetSelected (obj); + obj = m_Group->GetNextChild (j); + } + obj = m_Group->GetParent(); + delete m_Group; + obj->EmitSignal (gcp::OnChangedSignal); + m_Group = NULL; + } + + if (m_Group) + pOp->AddObject (m_Group, 1); + m_Doc->FinishOperation (); + + // Update clipboard stuff + gcp::Application *app = m_Doc->GetApplication (); + gcpSelectionTool *tool = (gcpSelectionTool*) app->GetTool ("Select"); + if (tool) + tool->AddSelection (m_Data); + + return true; +} + +void gcpGroupDlg::OnAlignToggled () +{ + if (gtk_toggle_button_get_active (align_btn)) { + gtk_widget_set_sensitive (GTK_WIDGET (align_box), true); + gtk_widget_set_sensitive (GTK_WIDGET (space_btn), true); + gtk_widget_set_sensitive (GTK_WIDGET (padding_btn), true); + } else { + gtk_widget_set_sensitive (GTK_WIDGET (align_box), false); + gtk_toggle_button_set_active (space_btn, false); + gtk_widget_set_sensitive (GTK_WIDGET (space_btn), false); + } +} + +void gcpGroupDlg::OnSpaceToggled () +{ + if (gtk_toggle_button_get_active (space_btn)) { + gtk_widget_set_sensitive (GTK_WIDGET (padding_btn), true); + gtk_widget_set_sensitive (dist_lbl, true); + } else { + gtk_widget_set_sensitive (GTK_WIDGET (padding_btn), false); + gtk_widget_set_sensitive (dist_lbl, false); + } +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/groupdlg.h gnome-chemistry-utils-0.10.9/plugins/paint/selection/groupdlg.h --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/groupdlg.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/groupdlg.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,55 @@ +/* + * GChemPaint selection plugin + * groupdlg.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_GROUP_DLG_H +#define GCHEMPAINT_GROUP_DLG_H + +#include +#include +#include "group.h" +#include + +using namespace gcu; + +class gcpGroupDlg: public Dialog +{ +public: + gcpGroupDlg (gcp::Document *Doc, gcpGroup *group); + virtual ~gcpGroupDlg (); + + virtual bool Apply (); + void SetAlignType (gcpAlignType type); + + void OnAlignToggled (); + void OnSpaceToggled (); + +private: + GtkComboBox *align_box; + GtkToggleButton *align_btn, *group_btn, *space_btn; + GtkSpinButton *padding_btn; + GtkWidget *dist_lbl; + gcp::Document *m_Doc; + gcp::WidgetData *m_Data; + gcpGroup *m_Group; +}; + +#endif // GCHEMPAINT_GROUP_DLG_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/group.glade gnome-chemistry-utils-0.10.9/plugins/paint/selection/group.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/group.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/group.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,176 @@ + + + + + + True + Group and/or align selected objects + False + True + GDK_WINDOW_TYPE_HINT_DIALOG + + + True + 5 + 6 + + + True + True + _Group + True + 0 + True + + + False + False + + + + + True + 12 + + + True + True + A_lign + True + 0 + True + True + + + False + False + + + + + True + Normal +Top +Mid-height +Bottom +Left +Center +Right + + + False + 1 + + + + + 1 + + + + + True + 12 + + + True + True + _Space evenly + True + 0 + True + True + + + False + False + + + + + True + 0.86000001430511475 + Distance: + GTK_JUSTIFY_RIGHT + + + 1 + + + + + True + True + 64 0 500 1 10 0 + 1 + 1 + True + + + 2 + + + + + 2 + + + + + True + + + 5 + 3 + + + + + True + + + True + True + True + gtk-help + True + 0 + + + + + True + True + True + gtk-cancel + True + 0 + + + 1 + + + + + True + True + True + gtk-ok + True + 0 + + + 2 + + + + + False + False + 4 + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/group.h gnome-chemistry-utils-0.10.9/plugins/paint/selection/group.h --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/group.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/group.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,73 @@ +/* + * GChemPaint selection plugin + * group.h + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_GROUP_H +#define GCHEMPAINT_GROUP_H + +#include + +using namespace gcu; + +extern TypeId GroupType; + +typedef enum { + GCP_ALIGN_NORMAL, + GCP_ALIGN_TOP, + GCP_ALIGN_MID_HEIGHT, + GCP_ALIGN_BOTTOM, + GCP_ALIGN_LEFT, + GCP_ALIGN_CENTER, + GCP_ALIGN_RIGHT +} gcpAlignType; + +class gcpGroup: public Object +{ +public: + gcpGroup (); + virtual ~gcpGroup (); + + void Add (GtkWidget* w); + bool BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y); + bool Load (xmlNodePtr); + xmlNodePtr Save (xmlDocPtr xml) const; + bool OnSignal (SignalId Signal, Object *Child); + void SetAligned (gcpAlignType type); + void UnAlign (); + bool GetAlignType (gcpAlignType& align); + void SetPadding (double padding); + void UnSpace (); + bool GetPadding (double& padding); + void Transform2D (Matrix2D& m, double x, double y); + double GetYAlign (); + void OnLoaded (); + +private: + void Align (); + void Space (); + +private: + gcpAlignType m_AlignType; + double m_Padding; + bool m_Align, m_Spaced; +}; + +#endif // GCHEMPAINT_GROUP_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/selection/horiz24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/selection/horiz24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/selection/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,76 @@ +EXTRA_DIST = $(IMAGES) + +BUILT_SOURCES = gcp-stock-pixbufs.h + +CLEANFILES = $(BUILT_SOURCES) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(selectiondir)\" + +IMAGES = \ + brackets24.png \ + eraser24.png \ + horiz24.png \ + merge24.png \ + rotate24.png \ + selection24.png \ + vert24.png + +VARIABLES = \ + gcp_brackets_24 $(srcdir)/brackets24.png \ + gcp_eraser_24 $(srcdir)/eraser24.png \ + gcp_horiz_24 $(srcdir)/horiz24.png \ + gcp_merge_24 $(srcdir)/merge24.png \ + gcp_rotate_24 $(srcdir)/rotate24.png \ + gcp_selection_24 $(srcdir)/selection24.png \ + gcp_vert_24 $(srcdir)/vert24.png + +selectiondir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +selection_LTLIBRARIES = selection.la + +selection_la_LDFLAGS = -module -avoid-version +selection_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +selection_la_SOURCES = \ + plugin.cc \ + bracketstool.cc \ + erasertool.cc \ + group.cc \ + groupdlg.cc \ + selectiontool.cc + +noinst_HEADERS = \ + plugin.h \ + bracketstool.h \ + erasertool.h \ + group.h \ + groupdlg.h \ + selectiontool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/selection +dist_glade_DATA = group.glade + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/selection/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/Makefile.in 2009-11-14 11:46:03.000000000 +0100 @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/selection +DIST_COMMON = $(dist_glade_DATA) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(selectiondir)" "$(DESTDIR)$(gladedir)" +LTLIBRARIES = $(selection_LTLIBRARIES) +selection_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_selection_la_OBJECTS = plugin.lo bracketstool.lo erasertool.lo \ + group.lo groupdlg.lo selectiontool.lo +selection_la_OBJECTS = $(am_selection_la_OBJECTS) +selection_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(selection_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(selection_la_SOURCES) +DIST_SOURCES = $(selection_la_SOURCES) +DATA = $(dist_glade_DATA) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(selectiondir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(IMAGES) +BUILT_SOURCES = gcp-stock-pixbufs.h +CLEANFILES = $(BUILT_SOURCES) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +IMAGES = \ + brackets24.png \ + eraser24.png \ + horiz24.png \ + merge24.png \ + rotate24.png \ + selection24.png \ + vert24.png + +VARIABLES = \ + gcp_brackets_24 $(srcdir)/brackets24.png \ + gcp_eraser_24 $(srcdir)/eraser24.png \ + gcp_horiz_24 $(srcdir)/horiz24.png \ + gcp_merge_24 $(srcdir)/merge24.png \ + gcp_rotate_24 $(srcdir)/rotate24.png \ + gcp_selection_24 $(srcdir)/selection24.png \ + gcp_vert_24 $(srcdir)/vert24.png + +selectiondir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +selection_LTLIBRARIES = selection.la +selection_la_LDFLAGS = -module -avoid-version +selection_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +selection_la_SOURCES = \ + plugin.cc \ + bracketstool.cc \ + erasertool.cc \ + group.cc \ + groupdlg.cc \ + selectiontool.cc + +noinst_HEADERS = \ + plugin.h \ + bracketstool.h \ + erasertool.h \ + group.h \ + groupdlg.h \ + selectiontool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/selection +dist_glade_DATA = group.glade +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/selection/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/selection/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-selectionLTLIBRARIES: $(selection_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(selectiondir)" || $(MKDIR_P) "$(DESTDIR)$(selectiondir)" + @list='$(selection_LTLIBRARIES)'; test -n "$(selectiondir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(selectiondir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(selectiondir)"; \ + } + +uninstall-selectionLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(selection_LTLIBRARIES)'; test -n "$(selectiondir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(selectiondir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(selectiondir)/$$f"; \ + done + +clean-selectionLTLIBRARIES: + -test -z "$(selection_LTLIBRARIES)" || rm -f $(selection_LTLIBRARIES) + @list='$(selection_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +selection.la: $(selection_la_OBJECTS) $(selection_la_DEPENDENCIES) + $(selection_la_LINK) -rpath $(selectiondir) $(selection_la_OBJECTS) $(selection_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bracketstool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erasertool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/groupdlg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selectiontool.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_gladeDATA: $(dist_glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-dist_gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(selectiondir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-selectionLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_gladeDATA install-selectionLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_gladeDATA uninstall-selectionLTLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-selectionLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_gladeDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-selectionLTLIBRARIES \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-dist_gladeDATA uninstall-selectionLTLIBRARIES + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/selection/merge24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/selection/merge24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/selection/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,96 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * plugin.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include +#include "selectiontool.h" +#include "erasertool.h" +#include "group.h" +#include "bracketstool.h" +#include "gcp-stock-pixbufs.h" +#include + +gcpSelectionPlugin plugin; + +static Object* CreateGroup () +{ + return new gcpGroup (); +} + +gcpSelectionPlugin::gcpSelectionPlugin(): gcp::Plugin() +{ + GroupType = Object::AddType ("group", CreateGroup); +} + +gcpSelectionPlugin::~gcpSelectionPlugin() +{ +} + +static gcp::IconDesc icon_descs[] = { + {"gcp_Selection", gcp_selection_24}, + {"gcp_Eraser", gcp_eraser_24}, + {"gcp_Horiz", gcp_horiz_24}, + {"gcp_Vert", gcp_vert_24}, + {"gcp_Rotate", gcp_rotate_24}, + {"gcp_Merge", gcp_merge_24}, +/* {"gcp_Brackets", gcp_brackets_24},*/ + {NULL, NULL}, +}; + +static GtkRadioActionEntry entries[] = { + { "Select", "gcp_Selection", N_("Select"), NULL, + N_("Select one or more objects"), + 0 }, + { "Erase", "gcp_Eraser", N_("Erase"), NULL, + N_("Eraser"), + 0 }/*, + { "Brackets", "gcp_Brackets", N_("Brackets"), NULL, + N_("Brackets"), + 0 },*/ +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +//" " +" " +" " +" " +" " +""; + +void gcpSelectionPlugin::Populate (gcp::Application* App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + App->RegisterToolbar ("SelectToolbar", 0); + new gcpSelectionTool (App); + new gcpEraserTool (App); + new gcpBracketsTool (App); + App->ActivateTool ("Select", true); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/selection/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,39 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_SELECTION_PLUGIN +#define GCHEMPAINT_SELECTION_PLUGIN + +#include + +class gcpSelectionPlugin: public gcp::Plugin +{ +public: + gcpSelectionPlugin (); + virtual ~gcpSelectionPlugin (); + + virtual void Populate (gcp::Application* App); +}; + +#endif //GCHEMPAINT_SELECTION_PLUGIN Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/selection/rotate24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/selection/rotate24.png sind verschieden. Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/selection/selection24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/selection/selection24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/selectiontool.cc gnome-chemistry-utils-0.10.9/plugins/paint/selection/selectiontool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/selectiontool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/selectiontool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,500 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * selectiontool.cc + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "selectiontool.h" +#include "group.h" +#include "groupdlg.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +static void on_flip (GtkWidget *btn, gcp::Application* App) +{ + gcpSelectionTool *tool = (gcpSelectionTool*) App->GetTool ("Select"); + if (GTK_IS_WIDGET (btn)) + tool->OnFlip (strcmp (gtk_widget_get_name (btn), "VertFlip")); + else + tool->OnFlip (strcmp (gtk_action_get_name (GTK_ACTION (btn)), "VertFlip")); +} + +static void on_rotate (GtkWidget *btn, gcp::Application* App) +{ + gcpSelectionTool *tool = (gcpSelectionTool*) App->GetTool ("Select"); + if (GTK_IS_WIDGET (btn)) + tool->Rotate (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (btn))); + else + tool->Rotate (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (btn))); +} + +static void on_merge (GtkWidget *btn, gcp::Application* App) +{ + gcpSelectionTool *tool = (gcpSelectionTool*) App->GetTool ("Select"); + tool->Merge (); +} + +gcpSelectionTool::gcpSelectionTool (gcp::Application *App): gcp::Tool (App, "Select") +{ + m_bRotate = false; + m_UIManager = NULL; +} + +gcpSelectionTool::~gcpSelectionTool () +{ + if (m_UIManager) + g_object_unref (m_UIManager); +} + +bool gcpSelectionTool::OnClicked () +{ + gcp::Window *win = m_pView->GetDoc ()->GetWindow (); + if (m_pObject) { + Object* pObj = m_pObject->GetGroup (); + if (pObj) + m_pObject = pObj; + if (!m_pData->IsSelected (m_pObject)) { + m_pData->UnselectAll (); + m_pData->SetSelected (m_pObject); + if (win) { + win->ActivateActionWidget ("/MainMenu/EditMenu/Copy", true); + win->ActivateActionWidget ("/MainMenu/EditMenu/Cut", true); + win->ActivateActionWidget ("/MainMenu/EditMenu/Erase", true); + } + } + } else { + m_pData->UnselectAll (); + if (win) { + win->ActivateActionWidget ("/MainMenu/EditMenu/Copy", false); + win->ActivateActionWidget ("/MainMenu/EditMenu/Cut", false); + win->ActivateActionWidget ("/MainMenu/EditMenu/Erase", false); + } + } + if (m_bRotate) { + // Calculate center of selection + ArtDRect rect; + m_pData->GetSelectionBounds (rect); + m_cx = (rect.x0 + rect.x1) / 2.; + m_cy = (rect.y0 + rect.y1) / 2.; + m_dAngle = 0.; + m_x0 -= m_cx; + m_y0 -= m_cy; + if (m_x0 == 0) + m_dAngleInit = (m_y0 <= 0) ? 90 : 270; + else + m_dAngleInit = atan (-m_y0 / m_x0) * 180 / M_PI; + if (m_x0 < 0) m_dAngleInit += 180.; + std::list::iterator i, end = m_pData->SelectedObjects.end (); + gcp::Document* pDoc = m_pView->GetDoc (); + m_pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + for (i = m_pData->SelectedObjects.begin (); i != end; i++) + m_pOp->AddObject (*i,0); + } + return true; +} + +void gcpSelectionTool::OnDrag () +{ + double dx = m_x - m_x1, dy = m_y - m_y1, x1, y1, x2, y2; + m_x1 = m_x; + m_y1 = m_y; + if (m_pObject) { + if (m_bRotate) { + double dAngle; + m_x-= m_cx; + m_y -= m_cy; + if (m_x == 0) { + if (m_y == 0) + return; + dAngle = (m_y < 0) ? 90 : 270; + } else { + dAngle = atan (-m_y / m_x) * 180. / M_PI; + if (m_x < 0) + dAngle += 180.; + dAngle -= m_dAngleInit; + if (!(m_nState & GDK_CONTROL_MASK)) + dAngle = rint(dAngle / 5) * 5; + } + if (dAngle < -180.) + dAngle += 360.; + if (dAngle > 180.) + dAngle -= 360.; + if (dAngle != m_dAngle) { + m_pData->RotateSelection (m_cx, m_cy, dAngle - m_dAngle); + m_dAngle = dAngle; + } + char tmp[32]; + snprintf (tmp, sizeof(tmp) - 1, _("Orientation: %g"), dAngle); + m_pApp->SetStatusText (tmp); + } else + m_pData->MoveSelectedItems (dx, dy); + } else { + if (m_pItem) { + gnome_canvas_item_get_bounds (m_pItem, &x1, &y1, &x2, &y2); + g_object_set (G_OBJECT (m_pItem), "x2", m_x, "y2", m_y, NULL); + gnome_canvas_request_redraw (GNOME_CANVAS (m_pWidget), (int) x1, (int) y1, (int) x2, (int) y2); + } else { + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + m_pItem = gnome_canvas_item_new ( + m_pData->Group, + gnome_canvas_rect_get_type (), + "x1", m_x0, + "y1", m_y0, + "x2", m_x, + "y2", m_y, + "outline_color", gcp::SelectColor, + "width_units", pTheme->GetBondWidth (), + NULL); + } + } +} + +void gcpSelectionTool::OnRelease () +{ + m_pApp->ClearStatus (); + if (m_pObject) { + if (m_bRotate) { + std::list::iterator i, end = m_pData->SelectedObjects.end (); + gcp::Document* pDoc = m_pView->GetDoc (); + for (i = m_pData->SelectedObjects.begin (); i != end; i++) + m_pOp->AddObject (*i,1); + pDoc->FinishOperation (); + } else { + double dx = m_x1 - m_x0, dy = m_y1 - m_y0; + if (dx != 0.0 && dy != 0.0) { + m_pData->MoveSelectedItems (-dx, -dy); + m_pData->MoveSelection (dx, dy); + } + } + } else { + if (m_x < m_x0) { + m_x1 = m_x0; + m_x0 = m_x; + } else + m_x1 = m_x; + if (m_y < m_y0) { + m_y1 = m_y0; + m_y0 = m_y; + } + else + m_y1 = m_y; + double x0, y0, x1, y1; + std::map::iterator j, jend = m_pData->Items.end (); + for (j = m_pData->Items.begin (); j != jend; j++) { + if (!m_pData->IsSelected ((*j).first)) { + GnomeCanvasItem *item = GNOME_CANVAS_ITEM ((*j).second); + if (!item) + continue; + gnome_canvas_item_get_bounds (item, &x0, &y0,&x1, &y1); + if ((x0 < m_x1) && (y0 < m_y1) && (x1 > m_x0) && (y1 > m_y0)) { + m_pObject = (*j).first->GetGroup (); //GetMolecule(); + if (m_pObject) { + if (!m_pData->IsSelected (m_pObject)) + m_pData->SetSelected (m_pObject); + } + else + m_pData->SetSelected (const_cast ((*j).first)); + } + } + } + } + AddSelection (m_pData); +} + +void gcpSelectionTool::Activate () +{ + if (m_UIManager) + gtk_widget_set_sensitive (m_MergeBtn, false); + gcp::Document *pDoc = m_pApp->GetActiveDocument (); + if (pDoc) { + m_pView = m_pApp->GetActiveDocument ()->GetView (); + GtkWidget *w = m_pView->GetWidget (); + m_pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + } +} + +bool gcpSelectionTool::Deactivate () +{ + while (!SelectedWidgets.empty ()) + { + SelectedWidgets.front ()->UnselectAll (); + SelectedWidgets.pop_front (); + } + return true; +} + +void gcpSelectionTool::AddSelection (gcp::WidgetData* data) +{ + gcp::WidgetData *d = m_pData; + m_pData = data; + m_pView = data->m_View; + gcp::Window *win = m_pView->GetDoc ()->GetWindow (); + if (m_pData->HasSelection()) { + GtkClipboard *clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY); + m_pView->OnCopySelection (m_pData->Canvas, clipboard); + if (win) { + win->ActivateActionWidget ("/MainMenu/EditMenu/Copy", true); + win->ActivateActionWidget ("/MainMenu/EditMenu/Cut", true); + win->ActivateActionWidget ("/MainMenu/EditMenu/Erase", true); + } + } + SelectedWidgets.remove (m_pData); + SelectedWidgets.push_front (m_pData); + if (d) { + m_pView = d->m_View; + m_pData = d; + } + // If the selection is made of two molecules, activate the merge tool + if (m_UIManager) + gtk_widget_set_sensitive (m_MergeBtn, ((m_pData->SelectedObjects.size () == 2) && + (m_pData->SelectedObjects.front ()->GetType () == MoleculeType) && + (m_pData->SelectedObjects.back ()->GetType () == MoleculeType))); +} + +void gcpSelectionTool::OnFlip (bool horizontal) +{ + if (!m_pData) { + m_pView = m_pApp->GetActiveDocument ()->GetView (); + GtkWidget *w = m_pView->GetWidget (); + m_pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + } + if (!m_pData->SelectedObjects.size ()) + return; + ArtDRect rect; + m_pData->GetSelectionBounds (rect); + m_cx = (rect.x0 + rect.x1) / 2.; + m_cy = (rect.y0 + rect.y1) / 2.; + m_x = (horizontal)? -1.: 1.; + Matrix2D m(m_x, 0., 0., -m_x); + std::list::iterator i, end = m_pData->SelectedObjects.end (); + gcp::Document* pDoc = m_pView->GetDoc (); + gcp::Theme *pTheme = pDoc->GetTheme (); + m_pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + for (i = m_pData->SelectedObjects.begin (); i != end; i++) { + m_pOp->AddObject (*i,0); + (*i)->Transform2D (m, m_cx / pTheme->GetZoomFactor (), m_cy / pTheme->GetZoomFactor ()); + m_pView->Update (*i); + m_pOp->AddObject (*i,1); + } + pDoc->FinishOperation (); +} + +void gcpSelectionTool::Rotate (bool rotate) +{ + m_bRotate = rotate; +} + +void gcpSelectionTool::Merge () +{ + gcp::Molecule *pMol0, *pMol1; + gcp::Document* pDoc = m_pApp->GetActiveDocument (); + if (!m_pData) { + m_pView = pDoc->GetView (); + GtkWidget *w = m_pView->GetWidget (); + m_pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + } + pMol0 = (gcp::Molecule*) m_pData->SelectedObjects.front (); + pMol1 = (gcp::Molecule*) m_pData->SelectedObjects.back (); + m_pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + m_pOp->AddObject (pMol0, 0); + m_pOp->AddObject (pMol1, 0); + m_pData->UnselectAll (); + if (pMol0->Merge (pMol1, true)) { + m_pOp->AddObject (pMol0, 1); + m_pData->SetSelected (pMol0); + m_pView->Update (pMol0); + pDoc->FinishOperation (); + } else { + pDoc->AbortOperation (); + } + AddSelection (m_pData); +} + +static void on_create_group (gcpSelectionTool* tool) +{ + tool->CreateGroup (); +} + +static void on_group (gcpSelectionTool* tool) +{ + tool->Group (); +} + +void gcpSelectionTool::Group () +{ + gcp::Document *pDoc = m_pView->GetDoc (); + new gcpGroupDlg (pDoc, NULL); +} + +void gcpSelectionTool::CreateGroup () +{ + gcp::Document *pDoc = m_pView->GetDoc (); + Object *pObj = Object::CreateObject (Object::GetTypeName (m_Type), pDoc); + try { + m_pOp = pDoc-> GetNewOperation (gcp::GCP_MODIFY_OPERATION); + std::list::iterator i, end = m_pData->SelectedObjects.end(); + for (i = m_pData->SelectedObjects.begin (); i != end; i++) + m_pOp->AddObject (*i,0); + if (!pObj->Build (m_pData->SelectedObjects)) { + pDoc->AbortOperation (); + delete pObj; + GtkWidget* message = gtk_message_dialog_new (NULL, (GtkDialogFlags) 0, + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Creation failed!")); + gtk_window_set_icon_name (GTK_WINDOW (message), "gchempaint"); + g_signal_connect_swapped (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (message)); + gtk_widget_show (message); + return; + } + m_pView->Update (pObj); + m_pData->UnselectAll (); + m_pData->SetSelected (pObj); + AddSelection (m_pData); + m_pOp->AddObject (pObj, 1); + pDoc->FinishOperation (); + } + catch (invalid_argument &e) { + pDoc->AbortOperation (); + delete pObj; + GtkWidget* message = gtk_message_dialog_new (NULL, (GtkDialogFlags) 0, + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, e.what ()); + gtk_window_set_icon_name (GTK_WINDOW (message), "gchempaint"); + g_signal_connect_swapped (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (message)); + gtk_widget_show (message); + } +} + +bool gcpSelectionTool::OnRightButtonClicked (GtkUIManager *UIManager) +{ + // first destroy the GtkUIManager + if (m_pData->SelectedObjects.size () > 1) { + GtkActionGroup *group = gtk_action_group_new ("selection"); + GtkAction *action = gtk_action_new ("group", _("Group and/or align objects"), NULL, NULL); + gtk_action_group_add_action (group, action); + m_uiIds.push_front (gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL)); + g_signal_connect_swapped (action, "activate", G_CALLBACK (on_group), this); + set possible_types, types, wrong_types; + list::iterator i = m_pData->SelectedObjects.begin (), + end = m_pData->SelectedObjects.end (); + (*i)->GetPossibleAncestorTypes (possible_types); + set::iterator type; + for (i++; i != end; i++) { + (*i)->GetPossibleAncestorTypes (types); + for (type = possible_types.begin(); type != possible_types.end (); type++) + if (types.find (*type) == types.end ()) + wrong_types.insert (*type); + for (type = wrong_types.begin(); type != wrong_types.end (); type++) + possible_types.erase (*type); + wrong_types.clear (); + types.clear (); + } + if (possible_types.size () == 1) { + // Add a new action. + m_Type = *possible_types.begin (); + const string &label = Object::GetCreationLabel (m_Type); + if (label.size ()) { + action = gtk_action_new ("create_group", label.c_str (), NULL, NULL); + gtk_action_group_add_action (group, action); + char buf[] = ""; + m_uiIds.push_front (gtk_ui_manager_add_ui_from_string (UIManager, buf, -1, NULL)); + g_signal_connect_swapped (action, "activate", G_CALLBACK (on_create_group), this); + } + } + gtk_ui_manager_insert_action_group (UIManager, group, 0); + return true; + } + return false; +} + +static GtkActionEntry entries[] = { + { "HorizFlip", "gcp_Horiz", N_("Horizontal flip"), NULL, + N_("Flip the selection horizontally"), G_CALLBACK (on_flip) }, + { "VertFlip", "gcp_Vert", N_("Vertical flip"), NULL, + N_("Flip the selection vertically"), G_CALLBACK (on_flip) }, + { "Merge", "gcp_Merge", N_("Merge"), NULL, + N_("Merge two molecules"), G_CALLBACK (on_merge) } +}; + +static GtkToggleActionEntry toggles[] = { + { "Rotate", "gcp_Rotate", N_("_Rotate"), NULL, + N_("Rotate the selection"), G_CALLBACK (on_rotate), false } +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +""; + +GtkWidget *gcpSelectionTool::GetPropertyPage () +{ + GtkWidget *box, *w; + GtkActionGroup *action_group; + GError *error; + + box = gtk_vbox_new (FALSE, 0); + action_group = gtk_action_group_new ("SelectionToolActions"); + gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); + gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), m_pApp); + gtk_action_group_add_toggle_actions (action_group, toggles, G_N_ELEMENTS (toggles), m_pApp); + + m_UIManager = gtk_ui_manager_new (); + if (!gtk_ui_manager_add_ui_from_string (m_UIManager, ui_description, -1, &error)) + { + g_message ("building property page failed: %s", error->message); + g_error_free (error); + gtk_widget_destroy (box); + g_object_unref (m_UIManager); + m_UIManager = NULL; + return NULL;; + } + gtk_ui_manager_insert_action_group (m_UIManager, action_group, 0); + w = gtk_ui_manager_get_widget (m_UIManager, "/Selection"); + gtk_toolbar_set_style (GTK_TOOLBAR (w), GTK_TOOLBAR_ICONS); + gtk_toolbar_set_show_arrow (GTK_TOOLBAR (w), false); + gtk_toolbar_set_tooltips (GTK_TOOLBAR (w), true); + gtk_box_pack_start (GTK_BOX (box), w, false, false, 0); + gtk_widget_show_all (box); + m_MergeBtn = gtk_ui_manager_get_widget (m_UIManager, "/Selection/Merge"); + gtk_widget_set_sensitive (m_MergeBtn, false); + return box; +} + +char const *gcpSelectionTool::GetHelpTag () +{ + if (m_bRotate) + return "rotate"; + return "selection"; +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/selection/selectiontool.h gnome-chemistry-utils-0.10.9/plugins/paint/selection/selectiontool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/selection/selectiontool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/selection/selectiontool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,70 @@ +// -*- C++ -*- + +/* + * GChemPaint selection plugin + * selectiontool.h + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_SELECTION_TOOL_H +#define GCHEMPAINT_SELECTION_TOOL_H + +#include + +namespace gcp { + class WidgetData; + class Application; +} + +class gcpSelectionTool: public gcp::Tool +{ +public: + gcpSelectionTool (gcp::Application *App); + virtual ~gcpSelectionTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); + virtual void Activate (); + virtual bool Deactivate (); + virtual bool OnRightButtonClicked (GtkUIManager *UIManager); + virtual GtkWidget *GetPropertyPage (); + + void AddSelection (gcp::WidgetData* data); + void OnFlip (bool horizontal); + void Rotate (bool rotate); + void Merge (); + + void CreateGroup (); + void Group (); + char const *GetHelpTag (); + +private: + std::list SelectedWidgets; + bool m_bRotate; + double m_cx, m_cy; + double m_dAngle, m_dAngleInit; + gcp::Operation *m_pOp; + gcu::TypeId m_Type; + std::list m_uiIds; + GtkUIManager *m_UIManager; + GtkWidget *m_MergeBtn; +}; + +#endif // GCHEMPAINT_SELECTION_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/selection/vert24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/selection/vert24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/category.cc gnome-chemistry-utils-0.10.9/plugins/paint/templates/category.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/category.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/category.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,53 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * category.cc + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "category.h" +#include "templatetree.h" + +map TemplateCategories; +set categories; + +gcpTemplateCategory::gcpTemplateCategory (string &name) +{ + m_Name = name; + categories.insert (name); + TemplateCategories[name] = this; +} + +gcpTemplateCategory::gcpTemplateCategory (char const *name) +{ + m_Name = name; + categories.insert (m_Name); + TemplateCategories[m_Name] = this; +} + +gcpTemplateCategory::~gcpTemplateCategory () +{ +} + +void gcpTemplateCategory::AddTemplate (gcpTemplate *temp) +{ + m_Templates[temp] = NULL; +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/category.h gnome-chemistry-utils-0.10.9/plugins/paint/templates/category.h --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/category.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/category.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,57 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * category.h + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEMPLATE_CATEGORY_H +#define GCHEMPAINT_TEMPLATE_CATEGORY_H + +#include +#include +#include + +using namespace std; + +class gcpTemplate; +namespace gcp { + class WidgetData; +} + +class gcpTemplateCategory +{ +public: + gcpTemplateCategory (string &name); + gcpTemplateCategory (char const *name); + ~gcpTemplateCategory (); + + void AddTemplate (gcpTemplate *temp); + gcp::WidgetData *GetData (gcpTemplate *temp) {return m_Templates[temp];} + +private: + string m_Name; + map m_Templates; +}; + +extern map TemplateCategories; +extern set categories; + +#endif // GCHEMPAINT_TEMPLATE_CATEGORY_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/gtkcombotoolitem.c gnome-chemistry-utils-0.10.9/plugins/paint/templates/gtkcombotoolitem.c --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/gtkcombotoolitem.c 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/gtkcombotoolitem.c 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,75 @@ +/* + * GChemPaint templates plugin + * gtkcombotoolitem.c + * + * Copyright (C) 2004-2005 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "gtkcombotoolitem.h" +#include +#include +#include +#include +#include + +static void +gtk_tool_combo_class_init (GtkToolItemClass *tool_item_class) +{ +} + +static void +gtk_tool_combo_init (GtkToolCombo *item) +{ +} + +GType gtk_tool_combo_get_type (void) +{ + static GType type = 0; + if (type == 0) { + static GTypeInfo const object_info = { + sizeof (GtkToolComboClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gtk_tool_combo_class_init, + (GClassFinalizeFunc) NULL, + NULL, + sizeof (GtkToolCombo), + 0, + (GInstanceInitFunc) gtk_tool_combo_init, + NULL + }; + type = g_type_register_static (GTK_TYPE_TOOL_ITEM, "GtkItemCombo", + &object_info, 0); + } + return type; +} + +GtkToolItem* gtk_tool_combo_new_with_model (GtkTreeModel* model) +{ + GtkToolCombo* item = g_object_new (GTK_TYPE_TOOL_COMBO, NULL); + GtkWidget* combo = gtk_combo_box_new_with_model (model); + GtkCellRenderer *renderer = GTK_CELL_RENDERER (gtk_cell_renderer_text_new()); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer, + "text", 0, + NULL); + gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); + gtk_container_add (GTK_CONTAINER (item), combo); + gtk_widget_show_all(combo); + return (GtkToolItem*) item; +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/gtkcombotoolitem.h gnome-chemistry-utils-0.10.9/plugins/paint/templates/gtkcombotoolitem.h --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/gtkcombotoolitem.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/gtkcombotoolitem.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,62 @@ +/* + * GChemPaint templates plugin + * gtkcombotoolitem.h + * + * Copyright (C) 2004 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GTK_COMBO_TOOl_ITEM_H +#define GTK_COMBO_TOOl_ITEM_H + +#include +#include +#include +#include + +G_BEGIN_DECLS + +#define GTK_TYPE_TOOL_COMBO (gtk_tool_combo_get_type ()) +#define GTK_TOOL_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOL_COMBO, GtkToolCombo)) +#define GTK_TOOL_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_COMBO, GtkToolComboClass)) +#define GTK_IS_TOOL_COMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOL_COMBO)) +#define GTK_IS_TOOL_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GTK_TYPE_TOOL_COMBO)) +#define GTK_TOOL_COMBO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOOL_COMBO, GtkToolComboClass)) + +typedef struct _GtkToolCombo GtkToolCombo; +typedef struct _GtkToolComboClass GtkToolComboClass; + + +struct _GtkToolCombo +{ + GtkToolItem parent; + GtkComboBox* box; +}; + +struct _GtkToolComboClass +{ + GtkToolItemClass parent_class; +}; + +GType gtk_tool_combo_get_type (void); + +GtkToolItem* gtk_tool_combo_new_with_model (GtkTreeModel* model); + + +G_END_DECLS + +#endif /* GTK_COMBO_TOOl_ITEM_H */ diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/templates/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,49 @@ +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(residuesdir)\" + +templatesdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +templates_LTLIBRARIES = templates.la + +templates_la_LDFLAGS = -module -avoid-version +templates_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +templates_la_SOURCES = \ + plugin.cc \ + category.cc \ + gtkcombotoolitem.c \ + templatetool.cc \ + templatetree.cc + +noinst_HEADERS = \ + plugin.h \ + category.h \ + gtkcombotoolitem.h \ + templatetool.h \ + templatetree.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/templates +dist_glade_DATA = \ + templates.glade \ + new-template.glade diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/templates/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/Makefile.in 2009-11-14 11:46:04.000000000 +0100 @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/templates +DIST_COMMON = $(dist_glade_DATA) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(templatesdir)" "$(DESTDIR)$(gladedir)" +LTLIBRARIES = $(templates_LTLIBRARIES) +templates_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_templates_la_OBJECTS = plugin.lo category.lo gtkcombotoolitem.lo \ + templatetool.lo templatetree.lo +templates_la_OBJECTS = $(am_templates_la_OBJECTS) +templates_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(templates_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(templates_la_SOURCES) +DIST_SOURCES = $(templates_la_SOURCES) +DATA = $(dist_glade_DATA) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(gladedir)\" -DPLUGINSDIR=\"$(residuesdir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +templatesdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +templates_LTLIBRARIES = templates.la +templates_la_LDFLAGS = -module -avoid-version +templates_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +templates_la_SOURCES = \ + plugin.cc \ + category.cc \ + gtkcombotoolitem.c \ + templatetool.cc \ + templatetree.cc + +noinst_HEADERS = \ + plugin.h \ + category.h \ + gtkcombotoolitem.h \ + templatetool.h \ + templatetree.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/templates +dist_glade_DATA = \ + templates.glade \ + new-template.glade + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/templates/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/templates/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-templatesLTLIBRARIES: $(templates_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(templatesdir)" || $(MKDIR_P) "$(DESTDIR)$(templatesdir)" + @list='$(templates_LTLIBRARIES)'; test -n "$(templatesdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(templatesdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(templatesdir)"; \ + } + +uninstall-templatesLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(templates_LTLIBRARIES)'; test -n "$(templatesdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(templatesdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(templatesdir)/$$f"; \ + done + +clean-templatesLTLIBRARIES: + -test -z "$(templates_LTLIBRARIES)" || rm -f $(templates_LTLIBRARIES) + @list='$(templates_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +templates.la: $(templates_la_OBJECTS) $(templates_la_DEPENDENCIES) + $(templates_la_LINK) -rpath $(templatesdir) $(templates_la_OBJECTS) $(templates_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/category.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcombotoolitem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/templatetool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/templatetree.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_gladeDATA: $(dist_glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-dist_gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(templatesdir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-templatesLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_gladeDATA install-templatesLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_gladeDATA uninstall-templatesLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-templatesLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_gladeDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip \ + install-templatesLTLIBRARIES installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-dist_gladeDATA \ + uninstall-templatesLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/new-template.glade gnome-chemistry-utils-0.10.9/plugins/paint/templates/new-template.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/new-template.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/new-template.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,189 @@ + + + + + + + + True + New template + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + + + + True + False + 4 + + + + 220 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + + + + 0 + True + True + + + + + + True + 2 + 2 + False + 8 + 0 + + + + True + _Name + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 5 + 0 + name + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + _Category: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 5 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 0 + 1 + + + + + + 0 + False + True + + + + + + True + + + 0 + False + True + + + + + + True + GTK_BUTTONBOX_DEFAULT_STYLE + 10 + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + + + + + 0 + False + False + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/templates/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,239 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * plugin.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include "templatetool.h" +#include "templatetree.h" +#include "category.h" +#include +#include +#include + +gcpTemplatesPlugin plugin; +extern set docs; + +gcpTemplatesPlugin::gcpTemplatesPlugin(): gcp::Plugin() +{ + //Load templates, assuming that users templates are not readonly + xmlDocPtr doc; + xmlNodePtr node; + const char *name; + char *path; + GDir* dir = g_dir_open (PKGDATADIR"/paint/templates", 0, NULL); + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + if (dir) { + while ((name = g_dir_read_name (dir))) { + if (strcmp (name + strlen (name) - 4, ".xml")) continue; + name = g_strconcat (PKGDATADIR"/paint/templates/", name, NULL); + doc = xmlParseFile (name); + docs.insert (doc); + node = doc->children; + if (!strcmp ((char*)node->name, "templates")) ParseNodes (node->children, false); + g_free ((void*) name); + } + g_dir_close (dir); + } + path = g_strconcat (getenv ("HOME"), "/.gchempaint/templates", NULL); + dir = g_dir_open (path, 0, NULL); + if (dir) { + bool is_user_templates; + while ((name = g_dir_read_name (dir))) { + if (strcmp (name + strlen (name) - 4, ".xml")) + continue; + is_user_templates = !strcmp (name, "templates.xml"); + name = g_strconcat (path, "/", name, NULL); + doc = xmlParseFile (name); + docs.insert (doc); + if (is_user_templates) + user_templates = doc; + node = doc->children; + if (!strcmp ((char*)node->name, "templates")) + ParseNodes (node->children, true); + g_free ((void*) name); + } + g_dir_close (dir); + } else { + char* gcppath = g_strconcat (getenv ("HOME"), "/.gchempaint", NULL); + dir = g_dir_open (gcppath, 0, NULL); + if (dir) + g_dir_close (dir); + else + mkdir (gcppath, 0x1ed); + g_free (gcppath) ; + mkdir (path, 0x1ed); + } + g_free (path); +} + +gcpTemplatesPlugin::~gcpTemplatesPlugin() +{ + set::iterator i, iend = docs.end (); + for (i = docs.begin (); i != iend; i++) + xmlFreeDoc (*i); + docs.clear (); + map::iterator j, jend = Templates.end (); + for (j = Templates.begin (); j != jend; j++) + delete (*j).second; + Templates.clear (); + TempbyName.clear (); +} + +static GtkRadioActionEntry entries[] = { + { "Templates", GTK_STOCK_INDEX, N_("Templates"), NULL, + N_("Use or manage templates"), + 0 }, +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +""; + +void gcpTemplatesPlugin::Populate (gcp::Application* App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, NULL); + new gcpTemplateTool (App); + new gcpTemplateTree (App); +} + +void gcpTemplatesPlugin::ParseNodes (xmlNodePtr node, bool writeable) +{ + xmlNodePtr next, child, next_child; + gcpTemplate* t; + gcpTemplateCategory *c; + bool lang_matched, cat_matched; + xmlChar *category, *name; + string key; + char *lang = getenv ("LANG"), *node_lang; + while (node) { + next = node->next; + if (!strcmp ((char*) node->name, "template")) { + category = name = NULL; + lang_matched = cat_matched = false; + t = new gcpTemplate (); + child = node->children; + while (child) { + if (!strcmp ((char*)child->name, "text")) { + child = child->next; + continue; + } + next_child = child->next; + if (!strcmp ((char*)child->name, "name")) { + node_lang = (char*) xmlNodeGetLang (child); + if (node_lang) { + if (lang) { + if (!strcmp (lang, node_lang) || (!lang_matched && !strncmp(lang, node_lang, 2)) ){ + if (name) xmlFree (name); + name = xmlNodeGetContent (child); + lang_matched = true; + } + } + xmlFree (node_lang); + } else if (!node_lang && !lang_matched) { + if (name) xmlFree (name); + name = xmlNodeGetContent (child); + } + } else if (!strcmp ((char*) child->name, "category")) { + node_lang = (char*) xmlNodeGetLang (child); + if (node_lang) { + if (lang) { + if (!strcmp (lang, node_lang) || (!cat_matched && !strncmp(lang, node_lang, 2))) { + if (category) xmlFree (category); + category = xmlNodeGetContent (child); + cat_matched = true; + } + } + xmlFree (node_lang); + } else if (!node_lang && !cat_matched) { + if (category) xmlFree (category); + category = xmlNodeGetContent (child); + } + } else if (t->node == NULL) { + t->node = child; + } else { + delete t; + t = NULL; + break; + } + child = next_child; + } + if (t) { + if (t->node) { + t->name = (char*) name; + t->category = (char*) category; + t->writeable = writeable; + key = string((char*) category) + "/" + (char*) name; + if (Templates[key]) { + int i = 0; + char* str = g_strdup_printf ("%d", i); + while (Templates[key + str]) { + g_free (str); + str = g_strdup_printf ("%d", ++i); + } + key += str; + g_free (str); + } + Templates[key] = t; + key = t->name; + if (TempbyName[key]) { + int i = 0; + char* str = g_strdup_printf ("%d", i); + while (TempbyName[key + str]) { + g_free (str); + str = g_strdup_printf ("%d", ++i); + } + key += str; + g_free (str); + } + TempbyName[key] = t; + } else + delete t; + } + if (name) + xmlFree (name); + if (category) { + c = TemplateCategories[(char*) category]; + if (c == NULL) + c = new gcpTemplateCategory ((char*) category); + xmlFree (category); + } else { + c = TemplateCategories[_("Miscellaneous")]; + if (c == NULL) + c = new gcpTemplateCategory (_("Miscellaneous")); + } + c->AddTemplate (t); + } + node = next; + } +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/templates/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,43 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEMPLATES_PLUGIN +#define GCHEMPAINT_TEMPLATES_PLUGIN + +#include +#include + +class gcpTemplatesPlugin: public gcp::Plugin +{ +public: + gcpTemplatesPlugin (); + virtual ~gcpTemplatesPlugin (); + + virtual void Populate (gcp::Application* App); + +private: + void ParseNodes (xmlNodePtr node, bool writeable); +}; + +#endif //GCHEMPAINT_TEMPLATES_PLUGIN diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/templates.glade gnome-chemistry-utils-0.10.9/plugins/paint/templates/templates.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/templates.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/templates.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,105 @@ + + + + + + True + window1 + + + True + + + True + + + True + 0 + 5 + _Templates + True + + + False + False + + + + + True + + + 1 + + + + + False + False + + + + + True + False + False + + + True + No selected template + + + False + + + + + True + 0 + 0 + category + + + tab + False + False + + + + + 1 + + + + + True + + + True + True + gtk-add + True + + + + + True + True + gtk-remove + True + + + 1 + + + + + False + False + 2 + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetool.cc gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,432 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * templatetool.cc + * + * Copyright (C) 2004-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "templatetool.h" +#include "templatetree.h" +#include +#include +#include +#include +#include +#include + +using namespace gcu; + +xmlDocPtr xml; + +class gcpNewTemplateToolDlg: public Dialog +{ +public: + gcpNewTemplateToolDlg (gcp::Application* App); + virtual ~gcpNewTemplateToolDlg (); + + virtual bool Apply (); + void SetTemplate (xmlNodePtr node); + +private: + gcpTemplate *temp; + gcp::Document *pDoc; + gcp::WidgetData* pData; + xmlNodePtr m_node; + GtkEntry *category_entry; +}; + +gcpTemplateTool::gcpTemplateTool (gcp::Application* App): gcp::Tool (App, "Templates") +{ + m_Template = NULL; + xml = xmlNewDoc ((const xmlChar*) "1.0"); +} + +gcpTemplateTool::~gcpTemplateTool () +{ + xmlFreeDoc (xml); +} + +bool gcpTemplateTool::OnClicked () +{ + gcp::Document* pDoc = m_pView->GetDoc (); + gcpNewTemplateToolDlg *dlg = (gcpNewTemplateToolDlg*) m_pApp->GetDialog ("new_template"); + if (dlg) { + m_pObject = m_pObject->GetMolecule (); + if (m_pObject) { + xmlNodePtr node = m_pObject->Save (xml); + if (node) { + char *buf = g_strdup_printf ("%g", pDoc->GetTheme ()->GetBondLength ()); + xmlNewProp (node, (const xmlChar*) "bond-length", (const xmlChar*) buf); + g_free (buf); + dlg->SetTemplate (node); + gdk_window_raise (GTK_WIDGET (dlg->GetWindow ())->window); + } + } + return false; + } + if (!m_Template) + return false; + pDoc->AddData (m_Template->node); + m_pObject = m_pData->SelectedObjects.front (); + if (m_Template->bond_length != 0.) { // if not, there is no bond... + double r = pDoc->GetBondLength () / m_Template->bond_length; + if (fabs (r - 1.) > .0001) { + Matrix2D m (r, 0., 0., r); + // FIXME: this would not work for reactions + m_pObject->Transform2D (m, 0., 0.); + m_pView->Update (m_pObject); + } + } + ArtDRect rect; + double dx, dy; + gnome_canvas_update_now (GNOME_CANVAS (m_pWidget)); + pDoc->AbortOperation (); + m_pData->GetSelectionBounds (rect); + dx = m_x0 - (rect.x0 + rect.x1) / 2.; + dy = m_y0 - (rect.y0 + rect.y1) / 2.; + m_x0 -= dx; + m_y0 -= dy; + m_pData->MoveSelectedItems (dx, dy); + return true; +} + +void gcpTemplateTool::OnDrag () +{ + double dx = m_x - m_x1, dy = m_y - m_y1; + m_x1 = m_x; + m_y1 = m_y; + m_pData->MoveSelectedItems (dx, dy); +} + +void gcpTemplateTool::OnRelease () +{ + gcp::Document* pDoc = m_pView->GetDoc (); + double dx = m_x - m_x0, dy = m_y - m_y0; + m_pData->MoveSelectedItems (-dx, -dy); + m_pData->MoveSelection(dx, dy); + pDoc->PopOperation (); + m_pData->UnselectAll (); + gcp::Operation* pOp = pDoc->GetNewOperation (gcp::GCP_ADD_OPERATION); + pOp->AddObject (m_pObject); + pDoc->FinishOperation (); +} + +enum { + NAME_COLUMN, + NUM_COLUMNS +}; + +static void on_template_changed (GtkComboBox *combo, gcpTemplateTool *tool) +{ + tool->OnChanged (combo); +} + +static void on_size (GtkWidget *widget, GtkAllocation *allocation, gcpTemplateTool *tool) +{ + tool->OnPreviewSize (allocation); +} + +static void on_add_template (GtkWidget *w, gcpTemplateTool *tool) +{ + tool->OnAddTemplate (); +} + +static void on_delete_template (GtkWidget *w, gcpTemplateTool *tool) +{ + tool->OnDeleteTemplate (); +} + +GtkWidget *gcpTemplateTool::GetPropertyPage () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/templates.glade", "templates", GETTEXT_PACKAGE); + gcpTemplateTree *tree = (gcpTemplateTree*) m_pApp->GetTool ("TemplateTree"); + if (!tree) + return NULL; + GtkComboBox *combo = GTK_COMBO_BOX (glade_xml_get_widget (xml, "templates-combo")); + gtk_combo_box_set_model (combo, tree->GetModel ()); + GtkCellRenderer* renderer = (GtkCellRenderer*) gtk_cell_renderer_text_new (); + g_object_set (renderer, "xalign", 0.0, NULL); + gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo)); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, true); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), + renderer, "text", + NAME_COLUMN); + gtk_combo_box_set_active (combo, 0); + g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (on_template_changed), this); + m_DeleteBtn = glade_xml_get_widget (xml, "delete"); + g_signal_connect (m_DeleteBtn, "clicked", G_CALLBACK (on_delete_template), this); + gtk_widget_set_sensitive (m_DeleteBtn, false); + GtkWidget *w = glade_xml_get_widget (xml, "add"); + g_signal_connect (w, "clicked", G_CALLBACK (on_add_template), this); + m_Book = GTK_NOTEBOOK (glade_xml_get_widget (xml, "book")); + g_signal_connect (m_Book, "size-allocate", G_CALLBACK (on_size), this); + + return glade_xml_get_widget (xml, "templates"); +} + +void gcpTemplateTool::OnChanged (GtkComboBox *combo) +{ + gcpTemplateTree *tree = (gcpTemplateTree*) m_pApp->GetTool ("TemplateTree"); + if (!tree) + return; + GtkTreeIter iter; + if (gtk_combo_box_get_active_iter (combo, &iter)) { + GtkTreePath *path = gtk_tree_model_get_path ((GtkTreeModel*) tree->GetModel (), &iter); + char* path_string = gtk_tree_path_to_string (path); + m_Template = tree->GetTemplate (path_string); + int page; + if (m_Template) { + if (!m_Template->doc) { + m_Template->doc = new gcp::Document (NULL, false); + gcp::Theme *pTheme = m_Template->doc->GetTheme (); + m_Template->doc->SetEditable (false); + m_Template->data = (gcp::WidgetData*) g_object_get_data (G_OBJECT (m_Template->doc->GetView ()->CreateNewWidget ()), "data"); + m_Template->doc->AddData (m_Template->node); + m_Template->data->UnselectAll (); + gnome_canvas_update_now (GNOME_CANVAS (m_Template->doc->GetWidget ())); + m_Template->data->GetObjectBounds (m_Template->doc, &m_Template->rect); + m_Template->doc->Move (-m_Template->rect.x0 / pTheme->GetZoomFactor (), -m_Template->rect.y0 / pTheme->GetZoomFactor ()); + m_Template->bond_length = 140.; + page = -1; + } else + page = gtk_notebook_page_num (m_Book, m_Template->w); + if (page < 0) { + m_Template->data = (gcp::WidgetData*) g_object_get_data (G_OBJECT (m_Template->doc->GetView ()->CreateNewWidget ()), "data"); + gnome_canvas_update_now (GNOME_CANVAS (m_Template->doc->GetWidget ())); + m_Template->data->GetObjectBounds (m_Template->doc, &m_Template->rect); + m_Template->w = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (m_Template->w), GTK_SHADOW_NONE); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (m_Template->w), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW (m_Template->w), m_Template->doc->GetWidget ()); + gtk_widget_show_all (m_Template->w); + gtk_notebook_append_page (m_Book, m_Template->w, NULL); + page = gtk_notebook_page_num (m_Book, m_Template->w); + } + GtkWidget *wd = gtk_notebook_get_nth_page (m_Book, 0); + // Why 4 and not 2 in following lines? + double w = (wd->allocation.width - 4 * m_Template->w->style->xthickness) / (m_Template->rect.x1 - m_Template->rect.x0); + double h = (wd->allocation.height - 4 * m_Template->w->style->ythickness) / (m_Template->rect.y1 - m_Template->rect.y0); + if (w < 1. || h < 1.) { + m_Template->data->Zoom = MIN (w, h); + gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (m_Template->doc->GetWidget ()), m_Template->data->Zoom); + } + gtk_notebook_set_current_page (m_Book, page); + gtk_widget_set_sensitive (m_DeleteBtn, m_Template->writeable); + } else { + // a category has been selected + m_Template = NULL; + GtkTreeModel *model = tree->GetModel (); + char const *name; + gtk_tree_model_get (model, &iter, 0, &name, -1); + gtk_widget_set_sensitive (m_DeleteBtn, false); + gtk_notebook_set_current_page (m_Book, 0); + gtk_widget_set_sensitive (m_DeleteBtn, false); + } + g_free (path_string); + gtk_tree_path_free (path); + } +} + +void gcpTemplateTool::OnPreviewSize (GtkAllocation *allocation) +{ + if (m_Template) { + double w = (allocation->width - 4 * m_Template->w->style->xthickness) / (m_Template->rect.x1 - m_Template->rect.x0); + double h = (allocation->height - 4 * m_Template->w->style->ythickness) / (m_Template->rect.y1 - m_Template->rect.y0); + m_Template->data->Zoom = (w < 1. || h < 1.)? MIN (w, h): 1.; + gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (m_Template->data->Canvas), m_Template->data->Zoom); + g_signal_emit_by_name (m_Template->data->Canvas, "update_bounds"); + } +} + +void gcpTemplateTool::OnAddTemplate () +{ + new gcpNewTemplateToolDlg (m_pApp); +} + +void gcpTemplateTool::OnDeleteTemplate () +{ + gcpTemplateTree *tree = (gcpTemplateTree*) m_pApp->GetTool ("TemplateTree"); + if (!tree) + return; + string key = m_Template->category + "/" + m_Template->name; + if (Templates[key] != m_Template) { + int i = 0; + char* str = g_strdup_printf ("%d", i); + while (Templates[key + str] != m_Template) { + g_free (str); + str = g_strdup_printf ("%d", ++i); + } + key += str; + g_free (str); + } + tree->DeleteTemplate (key); + m_Template = NULL; + gtk_notebook_set_current_page (m_Book, 0); +} + +gcpNewTemplateToolDlg::gcpNewTemplateToolDlg (gcp::Application* App): + Dialog(App, GLADEDIR"/new-template.glade", "new_template", App) +{ + m_node = NULL; + if (!xml) { + delete this; + return; + } + pDoc = new gcp::Document (reinterpret_cast (m_App), true); + pDoc->SetEditable (false); + GtkWidget* w; + GtkScrolledWindow* scroll = (GtkScrolledWindow*) glade_xml_get_widget (xml, "scrolledcanvas"); + gtk_scrolled_window_add_with_viewport (scroll, w = pDoc->GetView ()->CreateNewWidget ()); + pData = (gcp::WidgetData*) g_object_get_data (G_OBJECT (w), "data"); + /* build the categories list */ + GtkListStore *model = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING); + GtkTreeIter iter; + set::iterator it = categories.begin (), end = categories.end (); + for (; it != end; it++) { + gtk_list_store_append (model, &iter); + gtk_list_store_set (model, &iter, + NAME_COLUMN, (*it).c_str(), + -1); + } + w = gtk_combo_box_entry_new_with_model (GTK_TREE_MODEL (model), NAME_COLUMN); + g_object_unref (model); + gtk_table_attach_defaults (GTK_TABLE (glade_xml_get_widget (xml, "table1")), w, 1, 2, 1, 2); + gtk_widget_show (w); + category_entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (w))); +} + +gcpNewTemplateToolDlg::~gcpNewTemplateToolDlg () +{ + if (m_node){ + xmlUnlinkNode (m_node); + xmlFreeNode (m_node); + } +} + +bool gcpNewTemplateToolDlg::Apply () +{ + const char* name = gtk_entry_get_text ((GtkEntry*) glade_xml_get_widget (xml, "name")); + const char* category = gtk_entry_get_text (category_entry); + if (!m_node || (*name == 0) || (*category == 0)) { + char* msg; + if (!m_node) + msg = _("Please provide an object."); + else if (*name == 0) + msg = _("Please give a name."); + else + msg = _("Please choose a category."); + GtkWidget* message = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + msg); + g_signal_connect_swapped (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (message)); + gtk_window_set_icon_name (GTK_WINDOW (message), "gchempaint"); + gtk_widget_show (message); + return false; + } + gcpTemplate *temp = new gcpTemplate (); + temp->node = m_node; + temp->writeable = true; + temp->name = name; + temp->category = category; + if (!user_templates) { + user_templates = xmlNewDoc ((xmlChar*) "1.0"); + xmlDocSetRootElement (user_templates, xmlNewDocNode (user_templates, NULL, (xmlChar*) "templates", NULL)); + char* filename = g_strconcat (getenv ("HOME"), "/.gchempaint/templates/templates.xml", NULL); + user_templates->URL = xmlStrdup ((xmlChar*) filename); + g_free (filename); + } + xmlNodePtr node = xmlNewDocNode (user_templates, NULL, (xmlChar*) "template", NULL); + xmlNodePtr child = xmlNewDocNode (user_templates, NULL, (xmlChar*)"category", (xmlChar*) category); + xmlAddChild (node, child); + child = xmlNewDocNode (user_templates, NULL, (xmlChar*)"name", (xmlChar*) name); + xmlAddChild (node, child); + xmlUnlinkNode (m_node); + xmlAddChild (node, m_node); + set::iterator it = categories.find (category); + if (it == categories.end()) categories.insert (category); + string key = temp->name; + if (TempbyName[key]) { + int i = 0; + char* str = g_strdup_printf ("%d", i); + while (TempbyName[key + str]) { + g_free (str); + str = g_strdup_printf ("%d", ++i); + } + key += str; + g_free (str); + } + TempbyName[key] = temp; + key = string ((char*) category) + "/" + (char*) name; + if (Templates[key]) { + int i = 0; + char* str = g_strdup_printf ("%d", i); + while (Templates[key + str]) { + g_free (str); + str = g_strdup_printf ("%d", ++i); + } + key += str; + g_free (str); + } + Templates[key] = temp; + m_node = NULL; + xmlAddChild (user_templates->children, node); + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + xmlSaveFormatFile ((char*) user_templates->URL, user_templates, true); + gcpTemplateTree *tree = (gcpTemplateTree*) + reinterpret_cast (m_App)->GetTool ("TemplateTree"); + if (tree) + tree->AddTemplate (key); + return true; +} + +void gcpNewTemplateToolDlg::SetTemplate (xmlNodePtr node) +{ + map::iterator it; + Object* obj = pDoc->GetFirstChild(it); + if (obj) pDoc->Remove (obj); + pDoc->PopOperation (); + if (m_node) { + xmlUnlinkNode (m_node); + xmlFreeNode (m_node); + } + pDoc->AddData (node); + ArtDRect rect; + char *buf = (char*) xmlGetProp (node, (const xmlChar*) "bond-length"); + double r = 140. / strtod (buf, NULL); + xmlFree (buf); + if (fabs (r - 1.) > .0001) { + Matrix2D m (r, 0., 0., r); + // FIXME: this would not work for reactions + pDoc->Transform2D (m, 0., 0.); + pDoc->GetView ()->Update (pDoc); + } + while (gtk_events_pending ()) + gtk_main_iteration (); + pDoc->AbortOperation (); + pData->GetSelectionBounds (rect); + pData->MoveSelection (- rect.x0, - rect.y0); + pDoc->PopOperation (); + pData->UnselectAll (); + xmlUnlinkNode (node); + xmlFreeNode (node); + obj = pDoc->GetFirstChild (it); + m_node = obj->Save (::xml); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetool.h gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,59 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * templatetool.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEMPLATETOOL_H +#define GCHEMPAINT_TEMPLATETOOL_H + +#include + +class gcpTemplate; + +namespace gcp { + class Document; +} + +class gcpTemplateTool: public gcp::Tool +{ +public: + gcpTemplateTool (gcp::Application* App); + ~gcpTemplateTool (); + + virtual bool OnClicked (); + virtual void OnDrag (); + virtual void OnRelease (); + gcpTemplate* GetTemplate () {return m_Template;} + GtkWidget *GetPropertyPage (); + void OnChanged (GtkComboBox *combo); + void OnPreviewSize (GtkAllocation *allocation); + void OnAddTemplate (); + void OnDeleteTemplate (); + char const *GetHelpTag () {return "templates";} + +private: + gcpTemplate* m_Template; + GtkWidget *m_DeleteBtn; + GtkNotebook *m_Book; +}; + +#endif //GCHEMPAINT_TEMPLATETOOL_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetree.cc gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetree.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetree.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetree.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,242 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * templatetree.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "templatetree.h" +#include "templatetool.h" +#include "gtkcombotoolitem.h" +#include +#include +#include + +map Templates, TempbyName; +set docs; +xmlDocPtr user_templates = NULL; + +gcpTemplate::gcpTemplate (): + node (NULL), + doc (NULL), + bond_length (0.) +{ +} + +gcpTemplate::~gcpTemplate () +{ + if (doc) + delete (doc); +} + +enum { + NAME_COLUMN, + NUM_COLUMNS +}; + +typedef struct +{ + char* name; +} TreeItem; + +gcpTemplateTree::gcpTemplateTree (gcp::Application* App): gcp::Tool (App, "TemplateTree") +{ + model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING); + GtkTreeIter iter, child_iter; + map::iterator i, end = Templates.end (); + string category; + for (i = Templates.begin(); i!= end; i++) { + if (category != (*i).second->category) { + category = (*i).second->category; + gtk_tree_store_append (model, &iter, NULL); + gtk_tree_store_set (model, &iter, + NAME_COLUMN, category.c_str(), + -1); + } + gtk_tree_store_append (model, &child_iter, &iter); + gtk_tree_store_set (model, &child_iter, + NAME_COLUMN, (*i).second->name.c_str(), + -1); + GtkTreePath *path = gtk_tree_model_get_path ((GtkTreeModel*)model, &child_iter); + char* s = gtk_tree_path_to_string (path); + m_Templates[s] = (*i).second; + m_Paths[(*i).second] = s; + g_free (s); + gtk_tree_path_free (path); + } +} + +gcpTemplateTree::~gcpTemplateTree () +{ +} + +void gcpTemplateTree::SetTemplate (gcpTemplate *t) +{ + GtkTreePath* path = (t)? gtk_tree_path_new_from_string (m_Paths[t].c_str()): NULL; + GtkTreeIter iter; + if (path) { + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); + gtk_combo_box_set_active_iter (combo, &iter); + gtk_tree_path_free (path); + } else + gtk_combo_box_set_active (combo, 0); +} + +gcpTemplate* gcpTemplateTree::GetTemplate (string path) +{ + return m_Templates[path]; +} + +const char* gcpTemplateTree::GetPath (gcpTemplate *t) +{ + return m_Paths[t].c_str(); +} + +void gcpTemplateTree::AddTemplate (string& key) +{ + map::iterator i = Templates.find (key), end = Templates.end (); + GtkTreeIter iter, parent; + GtkTreePath *path; + gcpTemplate *t, *new_temp = (*i).second; + if (i == Templates.begin()) { + i++; + if (i == end || ((*i).second->category != new_temp->category)) { + gtk_tree_store_prepend (model, &parent, NULL); + gtk_tree_store_set (model, &parent, + NAME_COLUMN, new_temp->category.c_str(), + -1); + } else { + path = gtk_tree_path_new_from_string (GetPath ((*i).second)); + gtk_tree_path_up (path); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &parent, path); + gtk_tree_path_free (path); + } + gtk_tree_store_prepend (model, &iter, &parent); + gtk_tree_store_set (model, &iter, + NAME_COLUMN, new_temp->name.c_str(), + -1); + } else { + i--; + t = (*i).second; + if (t->category == new_temp->category) { + path = gtk_tree_path_new_from_string (GetPath (t)); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); + gtk_tree_path_up (path); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &parent, path); + gtk_tree_path_free (path); + gtk_tree_store_insert_after (model, &iter, &parent, &iter); + gtk_tree_store_set (model, &iter, + NAME_COLUMN, new_temp->name.c_str(), + -1); + } else { + i++; + i++; + t = (*i).second; + if (i != Templates.end() && (t->category == new_temp->category)) { + path = gtk_tree_path_new_from_string (GetPath (t)); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); + gtk_tree_path_up (path); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &parent, path); + gtk_tree_path_free (path); + gtk_tree_store_insert_before (model, &iter, &parent, &iter); + gtk_tree_store_set (model, &iter, + NAME_COLUMN, new_temp->name.c_str(), + -1); + } else { + //new category, must go backwards + i--; + i--; + path = gtk_tree_path_new_from_string (GetPath ((*i).second)); + gtk_tree_path_up (path); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); + gtk_tree_store_insert_after (model, &parent, NULL, &iter); + gtk_tree_store_set (model, &parent, + NAME_COLUMN, new_temp->category.c_str(), + -1); + gtk_tree_store_append (model, &iter, &parent); + gtk_tree_store_set (model, &iter, + NAME_COLUMN, new_temp->name.c_str(), + -1); + } + } + } + UpdateMaps (); +} + +void gcpTemplateTree::DeleteTemplate (string& key) +{ + gcpTemplate *t = Templates[key]; + GtkTreeIter iter, parent; + GtkTreePath *path, *path1; + const char *s = m_Paths[t].c_str(); + path = gtk_tree_path_new_from_string (s); + path1 = gtk_tree_path_copy (path); + gtk_tree_path_up (path1); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); + gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &parent, path1); + gtk_tree_store_remove (model, &iter); + if (!gtk_tree_model_iter_has_child (GTK_TREE_MODEL (model), &parent)) { + gtk_tree_store_remove (model, &parent); + categories.erase (t->category); + } + gtk_tree_path_next (path); + gtk_tree_path_next (path1); + xmlNodePtr node = t->node->parent; + xmlDocPtr doc = t->node->doc; + xmlUnlinkNode (node); + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + xmlSaveFormatFile((char*) doc->URL, doc, true); + xmlFreeNode (node); + Templates.erase (key); + delete t; + UpdateMaps (); +} + +void gcpTemplateTree::UpdateMaps () +{ + map::iterator i, end = Templates.end (); + GtkTreePath *path; + char* s; + string category; + path = gtk_tree_path_new_first (); + gtk_tree_path_down (path); + //rebuild the maps + m_Paths.clear (); + m_Templates.clear (); + i = Templates.begin (); + category = (*i).second->category; + while (i != end) { + if ((*i).second->category != category) { + category = (*i).second->category; + gtk_tree_path_up (path); + gtk_tree_path_next (path); + gtk_tree_path_down (path); + } + s = gtk_tree_path_to_string (path); + m_Templates[s] = (*i).second; + m_Paths[(*i).second] = s; + g_free (s); + gtk_tree_path_next (path); + i++; + } + gtk_tree_path_free (path); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetree.h gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetree.h --- gnome-chemistry-utils-0.8.6/plugins/paint/templates/templatetree.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/templates/templatetree.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,83 @@ +// -*- C++ -*- + +/* + * GChemPaint templates plugin + * templatetree.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEMPLATETREE_H +#define GCHEMPAINT_TEMPLATETREE_H + +#include +#include +#include +#include +#include +#include + +using namespace std; + +class gcpTemplate +{ +public: + gcpTemplate (); + ~gcpTemplate(); + + string &GetName () {return name;} + + string name; + string category; + bool writeable; + xmlNodePtr node; + gcp::Document *doc; + ArtDRect rect; + GtkWidget *w; + double bond_length; + gcp::WidgetData *data; +}; + +extern map Templates, TempbyName; +extern set categories; +extern xmlDocPtr user_templates; + +//Template tree item +class gcpTemplateTree: public gcp::Tool +{ +public: + gcpTemplateTree (gcp::Application* App); + ~gcpTemplateTree (); + + GtkTreeModel* GetModel () {return (GtkTreeModel*) model;} + gcpTemplate* GetTemplate (string path); + void SetTemplate (gcpTemplate *t); + const char* GetPath (gcpTemplate *t); + void AddTemplate (string& key); + void DeleteTemplate (string& key); + void UpdateMaps (); + void SetCombo (GtkWidget *w) {combo = GTK_COMBO_BOX (w);} + +private: + GtkTreeStore *model; + GtkComboBox *combo; + map m_Templates; + map m_Paths; +}; + +#endif //GCHEMPAINT_TEMPLATETREE_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/fontsel.glade gnome-chemistry-utils-0.10.9/plugins/paint/text/fontsel.glade --- gnome-chemistry-utils-0.8.6/plugins/paint/text/fontsel.glade 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/fontsel.glade 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,262 @@ + + + + + + True + window1 + + + True + + + True + 6 + 3 + 3 + 12 + + + True + 0 + 0 + _Family: + True + family + + + GTK_FILL + + + + + + True + 0 + 0 + _Style: + True + style + + + 1 + 2 + GTK_FILL + + + + + + True + True + GTK_POLICY_NEVER + GTK_SHADOW_IN + + + True + True + False + + + + + 1 + 2 + 1 + 3 + GTK_FILL + GTK_FILL + + + + + True + True + GTK_SHADOW_IN + + + True + True + False + + + + + 1 + 3 + + + + + True + 0 + 0 + Si_ze: + True + size-entry + + + 2 + 3 + GTK_SHRINK | GTK_FILL + + + + + + 20 + True + True + 4 + + + 2 + 3 + 1 + 2 + GTK_SHRINK | GTK_FILL + + + + + + True + True + GTK_POLICY_NEVER + GTK_SHADOW_IN + + + True + True + False + + + + + 2 + 3 + 2 + 3 + + + + + + + + True + 6 + 12 + + + True + 0 + _Underline: + True + underline + + + False + False + + + + + True + None +Single +Double +Low + + + 1 + + + + + True + 0 + 0 + + + 2 + + + + + True + True + Stri_kethrough + True + 0 + True + + + False + False + 3 + + + + + False + False + 1 + + + + + True + 6 + 4 + 12 + + + + + + True + True + 0 -100 100 1 10 0 + + + 3 + 4 + + + + + True + 0 + _Color: + True + + + + + True + _Position: + True + rise + + + 2 + 3 + + + + + False + False + 2 + + + + + + Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/text/fragment24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/text/fragment24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/fragmenttool.cc gnome-chemistry-utils-0.10.9/plugins/paint/text/fragmenttool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/text/fragmenttool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/fragmenttool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,308 @@ +// -*- C++ -*- + +/* + * GChemPaint text plugin + * fragmenttool.cc + * + * Copyright (C) 2003-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "fragmenttool.h" +#include +#include +#include +#include +#include +#include +#include +#include + +extern xmlDocPtr pXmlDoc; + +using namespace gcu; +extern GtkTargetEntry const text_targets[]; + +gcpFragmentTool::gcpFragmentTool (gcp::Application *App): gcpTextTool (App, "Fragment") +{ +} + +gcpFragmentTool::~gcpFragmentTool () +{ + if (gcp::ClipboardData) { + xmlFree (gcp::ClipboardData); + gcp::ClipboardData = NULL; + } +} + +static void on_get_data (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gcpFragmentTool* tool) +{ + tool->OnGetData (clipboard, selection_data, info); +} + +bool gcpFragmentTool::OnClicked () +{ + if (m_Active && ((m_pObject == NULL) || (m_pObject->GetType() != FragmentType) || + (m_Active != g_object_get_data (G_OBJECT (m_pData->Items[m_pObject]), "fragment")))) { + if (!Unselect ()) + return false; + } + gcp::Document* pDoc = m_pView->GetDoc (); + if (!m_pObject) { + gcp::Theme *pTheme = pDoc->GetTheme (); + gcp::Fragment *fragment = new gcp::Fragment (m_x0 / pTheme->GetZoomFactor (), m_y0 / pTheme->GetZoomFactor ()); + pDoc->AddFragment (fragment); + pDoc->AbortOperation (); + pDoc->EmptyTranslationTable (); + m_pObject = fragment; + } + struct GnomeCanvasPangoSelBounds bounds; + bool need_update = false; + gcp::Fragment *pFragment = NULL; + if (m_pObject) { + switch(m_pObject->GetType ()) { + case AtomType: { + gcp::Atom* pAtom = (gcp::Atom*) m_pObject; + if (pAtom->GetTotalBondsNumber () > 1) + return false; + double x, y; + pAtom->GetCoords (&x, &y); + gcp::Molecule *pMol = (gcp::Molecule*) pAtom->GetMolecule (); + map::iterator i; + gcp::Bond *pBond = (gcp::Bond*) pAtom->GetFirstBond (i); + pFragment = new gcp::Fragment (x, y); + gcp::Atom* pFragAtom = (gcp::Atom*) pFragment->GetAtom (); + map::iterator ie; + Object* electron = pAtom->GetFirstChild (ie); + while (electron) { + m_pView->Remove (electron); + delete electron; + electron = pAtom->GetNextChild (ie); + } + pMol->Remove (pAtom); + pAtom->SetParent (NULL); + pMol->AddFragment (pFragment); + pDoc->AddFragment (pFragment); + pDoc->AbortOperation (); + gcp::Operation* pOp = pDoc->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + pOp->AddObject (pAtom, 0); + if (pBond) + pOp->AddObject (pBond, 0); + m_pView->Remove (pAtom); + pFragAtom->SetZ (pAtom->GetZ ()); + pFragAtom->SetId ((gchar*) pAtom->GetId ()); + int n = pAtom->GetAttachedHydrogens (); + if (n) { + char* buf; + if (n > 1) + buf = g_strdup_printf ("H%d", n); + else + buf = g_strdup ("H"); + bounds.start = bounds.cur = ((pAtom->GetBestSide ())? strlen (pAtom->GetSymbol ()): 0); + pFragment->OnSelChanged (&bounds); + gcp_pango_layout_replace_text (pFragment->GetLayout (), + bounds.cur, + 0, buf, pDoc->GetPangoAttrList ()); + bounds.cur += strlen (buf); + need_update = true; + g_free (buf); + } + delete pAtom; + if (pBond) { + pBond->ReplaceAtom (pAtom, pFragAtom); + pFragAtom->AddBond (pBond); + pOp->AddObject (pBond, 1); + } + pOp->AddObject (pFragment, 1); + pDoc->FinishOperation (); + pDoc->EmptyTranslationTable (); + m_pObject = pFragment; + break; + } + case BondType: + return false; + case FragmentType: + break; + default: + return false; + } + m_pObject->SetSelected (m_pWidget, gcp::SelStateUpdating); + m_Active = GNOME_CANVAS_PANGO (g_object_get_data (G_OBJECT (m_pData->Items[m_pObject]), "fragment")); + if (need_update) { + gnome_canvas_pango_set_selection_bounds (m_Active, bounds.cur, bounds.cur); + pFragment->AnalContent ((unsigned) bounds.start, (unsigned&) bounds.cur); + pFragment->OnChanged (false); + } + m_pView->SetGnomeCanvasPangoActive (m_Active); + g_object_set (G_OBJECT (m_Active), "editing", true, NULL); + m_CurNode = ((gcp::Fragment*) m_pObject)->SaveSelected (); + m_InitNode = ((gcp::Fragment*) m_pObject)->SaveSelected (); + pDoc->GetWindow ()->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", false); + } + return true; +} + +bool gcpFragmentTool::Deactivate () +{ + if (m_Active && !Unselect ()) + return false; + return true; +} + +void gcpFragmentTool::Activate () +{ +} + +bool gcpFragmentTool::OnEvent (GdkEvent* event) +{ + if (m_Active) { + if ((event->type == GDK_KEY_PRESS) || (event->type == GDK_KEY_RELEASE)) { + if (event->key.state & GDK_CONTROL_MASK) { + switch(event->key.keyval) { + case GDK_Right: + case GDK_Left: + case GDK_Up: + case GDK_Down: + case GDK_End: + case GDK_Home: + case GDK_Delete: + case GDK_KP_Delete: + case GDK_BackSpace: + break; + case GDK_z: + m_pView->GetDoc ()->OnUndo (); + return true; + case GDK_Z: + m_pView->GetDoc ()->OnRedo (); + return true; + case GDK_c: + CopySelection (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); + return true; + case GDK_v: + PasteSelection (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); + return true; + case GDK_x: + CutSelection (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); + return true; + default: + return false; + } + } + if (event->key.keyval == GDK_KP_Enter || event->key.keyval == GDK_Return || + event->key.keyval == GDK_space) + return true; + if (!g_utf8_validate (((GdkEventKey*) event)->string, -1, NULL)) { + gsize r, w; + gchar* newstr = g_locale_to_utf8 (((GdkEventKey*) event)->string, ((GdkEventKey*) event)->length, &r, &w, NULL); + g_free (((GdkEventKey*) event)->string); + ((GdkEventKey*) event)->string = newstr; + ((GdkEventKey*) event)->length = w; + } + gnome_canvas_item_grab_focus ((GnomeCanvasItem*) m_Active); + GnomeCanvasItemClass* klass = GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (m_Active)); + klass->event ((GnomeCanvasItem*) m_Active, event); + return true; + } + } + return false; +} + +bool gcpFragmentTool::CopySelection (GtkClipboard *clipboard) +{ + if (!m_Active) + return false; + unsigned start, end; + gcp::Fragment *fragment = (gcp::Fragment*) g_object_get_data (G_OBJECT (m_Active), "object"); + fragment->GetSelectionBounds (start, end); + if (start == end) + return false; + m_pData->Copy (clipboard); //To clean the xmlDoc + xmlDocPtr pDoc = m_pData->GetXmlDoc (clipboard); + if (!pDoc) + return false; + pDoc->children = xmlNewDocNode (pDoc, NULL, (xmlChar*) "chemistry", NULL); + xmlNsPtr ns = xmlNewNs (pDoc->children, (xmlChar*) "http://www.nongnu.org/gchempaint", (xmlChar*) "gcp"); + xmlSetNs (pDoc->children, ns); + xmlNodePtr node = fragment->SaveSelection (pDoc); + if (node) + xmlAddChild (pDoc->children, node); + else + return false; + gtk_clipboard_set_with_data (clipboard, text_targets, 3, + (GtkClipboardGetFunc) on_get_data, + (GtkClipboardClearFunc) gcp::on_clear_data, this); + gtk_clipboard_request_contents (clipboard, + gdk_atom_intern ("TARGETS", FALSE), + (GtkClipboardReceivedFunc) gcp::on_receive_targets, + m_pApp); + return true; +} + +bool gcpFragmentTool::CutSelection (GtkClipboard *clipboard) +{ + if (!CopySelection (clipboard)) + return false; + return DeleteSelection (); +} + +/** +* This method does nothing and always return false because pasting something inside +* a fragment is somewhat unsafe and will not be implemented in a foreseable future. +*/ +bool gcpFragmentTool::OnReceive (GtkClipboard *clipboard, GtkSelectionData *data, int type) +{ + return false; +} + +bool gcpFragmentTool::Unselect () +{ + if (!m_Active) + return true; + gcp::Fragment *fragment = (gcp::Fragment*) g_object_get_data (G_OBJECT (m_Active), "object"); + if (fragment->Validate ()) { + Atom *atom = fragment->GetAtom (); + map::iterator i; + gcp::Bond *pBond = reinterpret_cast (atom->GetFirstBond (i)); + if (pBond) + m_pView->Update (pBond); + return gcpTextTool::Unselect (); + } + return false; +} + +void gcpFragmentTool::OnGetData (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info) +{ + xmlDocPtr pDoc = gcp::WidgetData::GetXmlDoc (clipboard); + if (gcp::ClipboardData) { + xmlFree (gcp::ClipboardData); + gcp::ClipboardData = NULL; + } + gcp::ClipboardDataType = info; + gint size; + if (info) { + gcp::ClipboardData = xmlNodeGetContent (pDoc->children->children); + size = strlen ((char*) gcp::ClipboardData); + gtk_selection_data_set_text (selection_data, (const gchar*) gcp::ClipboardData, size); + } else { + xmlDocDumpFormatMemory (pDoc, &gcp::ClipboardData, &size, info); + gtk_selection_data_set (selection_data, gdk_atom_intern (GCHEMPAINT_ATOM_NAME, FALSE), 8, (const guchar*) gcp::ClipboardData, size); + } + gcp::cleared = false; + if (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)) + m_pApp->ActivateWindowsActionWidget ("/MainMenu/EditMenu/Paste", true); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/fragmenttool.h gnome-chemistry-utils-0.10.9/plugins/paint/text/fragmenttool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/text/fragmenttool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/fragmenttool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,51 @@ +// -*- C++ -*- + +/* + * GChemPaint text plugin + * fragmenttool.h + * + * Copyright (C) 2003-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_FRAGMENT_TOOL_H +#define GCHEMPAINT_FRAGMENT_TOOL_H + +#include "texttool.h" + +class gcpFragmentTool: public gcpTextTool +{ +public: + gcpFragmentTool (gcp::Application *App); + virtual ~gcpFragmentTool (); + + virtual bool OnClicked (); + virtual bool Deactivate (); + virtual void Activate (); + virtual bool OnEvent (GdkEvent* event); + virtual bool CopySelection (GtkClipboard *clipboard); + virtual bool CutSelection (GtkClipboard *clipboard); + virtual bool OnReceive (GtkClipboard *clipboard, GtkSelectionData *data, int type); + void OnGetData (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info); + GtkWidget *GetPropertyPage () {return NULL;} + char const *GetHelpTag () {return "fragment";} + +protected: + virtual bool Unselect(); +}; + +#endif //GCHEMPAINT_FRAGMENT_TOOL_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/text/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/text/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,59 @@ +EXTRA_DIST = $(IMAGES) $(glade_DATA) + +BUILT_SOURCES = gcp-stock-pixbufs.h + +CLEANFILES = $(BUILT_SOURCES) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(textdir)\" + +IMAGES = \ + fragment24.png \ + text24.png + +VARIABLES = \ + gcp_fragment_24 $(srcdir)/fragment24.png \ + gcp_text_24 $(srcdir)/text24.png + +textdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +text_LTLIBRARIES = text.la + +text_la_LDFLAGS = -module -avoid-version +text_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +text_la_SOURCES = \ + plugin.cc \ + fragmenttool.cc \ + texttool.cc + +noinst_HEADERS = \ + plugin.h \ + fragmenttool.h \ + texttool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/text +glade_DATA = fontsel.glade + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/text/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/text/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/Makefile.in 2009-11-14 11:46:04.000000000 +0100 @@ -0,0 +1,692 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/text +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(textdir)" "$(DESTDIR)$(gladedir)" +LTLIBRARIES = $(text_LTLIBRARIES) +text_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_text_la_OBJECTS = plugin.lo fragmenttool.lo texttool.lo +text_la_OBJECTS = $(am_text_la_OBJECTS) +text_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(text_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(text_la_SOURCES) +DIST_SOURCES = $(text_la_SOURCES) +DATA = $(glade_DATA) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(textdir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(IMAGES) $(glade_DATA) +BUILT_SOURCES = gcp-stock-pixbufs.h +CLEANFILES = $(BUILT_SOURCES) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +IMAGES = \ + fragment24.png \ + text24.png + +VARIABLES = \ + gcp_fragment_24 $(srcdir)/fragment24.png \ + gcp_text_24 $(srcdir)/text24.png + +textdir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +text_LTLIBRARIES = text.la +text_la_LDFLAGS = -module -avoid-version +text_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +text_la_SOURCES = \ + plugin.cc \ + fragmenttool.cc \ + texttool.cc + +noinst_HEADERS = \ + plugin.h \ + fragmenttool.h \ + texttool.h + +gladedir = $(datadir)/gchemutils/@GCU_API_VER@/glade/paint/plugins/text +glade_DATA = fontsel.glade +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/text/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/text/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-textLTLIBRARIES: $(text_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(textdir)" || $(MKDIR_P) "$(DESTDIR)$(textdir)" + @list='$(text_LTLIBRARIES)'; test -n "$(textdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(textdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(textdir)"; \ + } + +uninstall-textLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(text_LTLIBRARIES)'; test -n "$(textdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(textdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(textdir)/$$f"; \ + done + +clean-textLTLIBRARIES: + -test -z "$(text_LTLIBRARIES)" || rm -f $(text_LTLIBRARIES) + @list='$(text_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +text.la: $(text_la_OBJECTS) $(text_la_DEPENDENCIES) + $(text_la_LINK) -rpath $(textdir) $(text_la_OBJECTS) $(text_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fragmenttool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texttool.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-gladeDATA: $(glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gladedir)" || exit $$?; \ + done + +uninstall-gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(glade_DATA)'; test -n "$(gladedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gladedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gladedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(textdir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-textLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-gladeDATA install-textLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-gladeDATA uninstall-textLTLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-textLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-gladeDATA \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip install-textLTLIBRARIES \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-gladeDATA \ + uninstall-textLTLIBRARIES + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/text/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/text/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,84 @@ +// -*- C++ -*- + +/* + * GChemPaint text plugin + * plugin.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include +#include +#include "texttool.h" +#include "fragmenttool.h" +#include "gcp-stock-pixbufs.h" +#include + +gcpTextPlugin plugin; + +gcpTextPlugin::gcpTextPlugin (): gcp::Plugin () +{ +} + +gcpTextPlugin::~gcpTextPlugin () +{ +} + +static gcp::IconDesc icon_descs[] = { + {"gcp_Text", gcp_text_24}, + {"gcp_Fragment", gcp_fragment_24}, + {NULL, NULL}, +}; + +static GtkRadioActionEntry entries[] = { + { "Text", "gcp_Text", N_("Text"), NULL, + N_("Add or modify a text"), + 0 }, + { "Fragment", "gcp_Fragment", N_("Erase"), NULL, + N_("Add or modify a group of atoms"), + 0 }, +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +""; + +void gcpTextPlugin::Populate (gcp::Application* App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + new gcpTextTool (App); + new gcpFragmentTool (App); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/text/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/text/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,39 @@ +// -*- C++ -*- + +/* + * GChemPaint text plugin + * plugin.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEXT_PLUGIN +#define GCHEMPAINT_TEXT_PLUGIN + +#include + +class gcpTextPlugin: public gcp::Plugin +{ +public: + gcpTextPlugin (); + virtual ~gcpTextPlugin (); + + virtual void Populate (gcp::Application* App); +}; + +#endif //GCHEMPAINT_TEXT_PLUGIN Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/text/text24.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/text/text24.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/texttool.cc gnome-chemistry-utils-0.10.9/plugins/paint/text/texttool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/text/texttool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/texttool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,1116 @@ +// -*- C++ -*- + +/* + * GChemPaint text plugin + * texttool.cc + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "texttool.h" +#include +#include +#include +#include +#include +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include +#include +#include + +using namespace gcu; +extern GtkTargetEntry const text_targets[]; + +GtkTargetEntry const text_targets[] = { + {(char *) GCHEMPAINT_ATOM_NAME, 0, gcp::GCP_CLIPBOARD_NATIVE}, + {(char *) "UTF8_STRING", 0, gcp::GCP_CLIPBOARD_UTF8_STRING}, + {(char *) "STRING", 0, gcp::GCP_CLIPBOARD_STRING} +}; + +static void on_get_data (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gcpTextTool* tool) +{ + tool->OnGetData (clipboard, selection_data, info); +} + +static void on_sel_changed (gcpTextTool *tool) +{ + tool->UpdateAttributeList (); +} + +static bool filter_attribute (PangoAttribute *attribute, gcpTextTool *tool) +{ + int index = tool->GetIndex (); + if (index < 0) + return false; + if ((index)? (attribute->start_index < (unsigned) index && attribute->end_index >= (unsigned) index): + attribute->start_index == 0) { + switch (attribute->klass->type) { + case PANGO_ATTR_FAMILY: + tool->SetFamilyName (((PangoAttrString*)attribute)->value); + break; + case PANGO_ATTR_STYLE: + tool->SetStyle ((PangoStyle) ((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_WEIGHT: + tool->SetWeight ((PangoWeight) ((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_VARIANT: + tool->SetVariant ((PangoVariant) ((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_STRETCH: + tool->SetStretch ((PangoStretch) ((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_SIZE: + tool->SetSize (((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_UNDERLINE: + tool->SetUnderline ((PangoUnderline) ((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_STRIKETHROUGH: + tool->SetStrikethrough (((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_RISE: + tool->SetRise (((PangoAttrInt*)attribute)->value); + break; + case PANGO_ATTR_FOREGROUND: { + PangoColor color = ((PangoAttrColor*)attribute)->color; + tool->SetColor (RGBA_TO_UINT(color.red >> 8, color.green >> 8, color.blue >> 8, 0xff)); + break; + } + default: + break; + } + } + return false; +} + +gcpTextTool::gcpTextTool (gcp::Application* App, string Id): + gcp::Tool (App, Id), + m_FamilyList (NULL) +{ + m_Active = NULL; + m_bUndo = true; + m_CurNode = m_InitNode = NULL; + m_Strikethrough = false; + m_FontDesc = NULL; + gcp::Theme *pTheme = gcp::TheThemeManager.GetTheme ("Default"); + m_FamilyName = pTheme->GetTextFontFamily (); + m_Style = pTheme->GetFontStyle (); + m_Weight = pTheme->GetFontWeight (); + m_Stretch = pTheme->GetFontStretch (); + m_Variant = pTheme->GetFontVariant (); + m_Size = pTheme->GetFontSize (); + m_Underline = PANGO_UNDERLINE_NONE; + m_Rise = 0; + m_Color = RGBA_BLACK; + m_SelSignal = 0; +} + +gcpTextTool::~gcpTextTool () +{ + map::iterator i, iend = m_Families.end (); + for (i = m_Families.begin (); i != iend; i++) { + g_object_unref ((*i).second); + } + map::iterator j, jend = m_Faces.end (); + for (j = m_Faces.begin (); j != jend; j++) { + g_object_unref ((*j).second); + } + m_FontDesc = NULL; +} + +bool gcpTextTool::OnClicked () +{ + if (m_Active && ((m_pObject == NULL) || (m_pObject->GetType () != TextType) || + (m_Active != g_object_get_data (G_OBJECT (m_pData->Items[m_pObject]), "text")))) + Unselect (); + bool create = false; + if (!m_pObject) { + gcp::Theme *pTheme = m_pView->GetDoc ()->GetTheme (); + gcp::Text *text = new gcp::Text(m_x0 / pTheme->GetZoomFactor (), m_y0 / pTheme->GetZoomFactor ()); + m_pView->GetDoc ()->AddObject (text); + m_pView->GetDoc ()->AbortOperation (); + m_pObject = text; + create = true; + } + if (m_pObject) { + if (m_pObject->GetType () != TextType) + return false; + m_pObject->SetSelected (m_pWidget, gcp::SelStateUpdating); + m_Active = GNOME_CANVAS_PANGO (g_object_get_data (G_OBJECT (m_pData->Items[m_pObject]), "text")); + m_pView->SetGnomeCanvasPangoActive (m_Active); + g_object_set (G_OBJECT (m_Active), "editing", true, NULL); + m_CurNode = ((gcp::Text*) m_pObject)->SaveSelected (); + m_InitNode = ((gcp::Text*) m_pObject)->SaveSelected (); + m_pView->GetDoc ()->GetWindow ()->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", false); + if (m_SelSignal == 0) + m_SelSignal = g_signal_connect_swapped (m_Active, "sel-changed", G_CALLBACK (on_sel_changed), this); + if (create) + BuildAttributeList (); + else + UpdateAttributeList (); + } + return true; +} + +bool gcpTextTool::OnEvent (GdkEvent* event) +{ + if (m_Active) { + if ((event->type == GDK_KEY_PRESS) || (event->type == GDK_KEY_RELEASE)) { + if (event->key.state & GDK_CONTROL_MASK) { + switch (event->key.keyval) { + case GDK_Right: + case GDK_Left: + case GDK_Up: + case GDK_Down: + case GDK_End: + case GDK_Home: + case GDK_Delete: + case GDK_KP_Delete: + case GDK_BackSpace: + break; + case GDK_a: + m_pView->OnSelectAll (); + return true; + case GDK_z: + m_pView->GetDoc()->OnUndo (); + return true; + case GDK_Z: + m_pView->GetDoc()->OnRedo (); + return true; + case GDK_c: + CopySelection (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); + return true; + case GDK_v: + PasteSelection (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); + return true; + case GDK_x: + CutSelection (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); + return true; + case GDK_i: + m_Style = (m_Style == PANGO_STYLE_NORMAL)? PANGO_STYLE_ITALIC: PANGO_STYLE_NORMAL; + SelectBestFontFace (); + BuildAttributeList (); + return true; + case GDK_u: + gtk_combo_box_set_active (m_UnderlineBox, ((m_Underline == PANGO_UNDERLINE_SINGLE)? PANGO_UNDERLINE_NONE: PANGO_UNDERLINE_SINGLE)); + return true; + case GDK_b: + m_Weight = (m_Weight == PANGO_WEIGHT_NORMAL)? PANGO_WEIGHT_BOLD: PANGO_WEIGHT_NORMAL; + SelectBestFontFace (); + BuildAttributeList (); + return true; + case GDK_k: + gtk_toggle_button_set_active (m_StrikethroughBtn, !m_Strikethrough); + return true; + case GDK_plus: + case GDK_dead_circumflex: + if (m_Rise == 0) { + m_Size = m_Size * 2 / 3; + m_Rise = m_Size / PANGO_SCALE; + } else if (m_Rise < 0) + m_Rise = m_Size / PANGO_SCALE; + else { + m_Size = m_Size * 3 / 2; + m_Rise = 0; + } + g_signal_handler_block (m_RiseButton, m_RiseSignal); + gtk_spin_button_set_value (m_RiseButton, m_Rise); + m_Rise *= PANGO_SCALE; + g_signal_handler_unblock (m_RiseButton, m_RiseSignal); + SetSizeFull (true); + return true; + case GDK_equal: + case GDK_underscore: + if (m_Rise == 0) { + m_Size = m_Size * 2 / 3; + m_Rise = - m_Size / PANGO_SCALE / 2; + } else if (m_Rise > 0) + m_Rise = - m_Size / PANGO_SCALE/ 2; + else { + m_Size = m_Size * 3 / 2; + m_Rise = 0; + } + g_signal_handler_block (m_RiseButton, m_RiseSignal); + gtk_spin_button_set_value (m_RiseButton, m_Rise); + m_Rise *= PANGO_SCALE; + g_signal_handler_unblock (m_RiseButton, m_RiseSignal); + SetSizeFull (true); + return true; + case GDK_space: { + GnomeCanvasPango* saved = m_Active; + m_Active = NULL; + UpdateAttributeList (); + m_Active = saved; + BuildAttributeList (); + return true; + } + default: + break; + } + } + if (!g_utf8_validate (((GdkEventKey*) event)->string, -1, NULL)) { + gsize r, w; + gchar* newstr = g_locale_to_utf8 (((GdkEventKey*) event)->string, ((GdkEventKey*) event)->length, &r, &w, NULL); + g_free (((GdkEventKey*) event)->string); + ((GdkEventKey*) event)->string = newstr; + ((GdkEventKey*) event)->length = w; + } + gnome_canvas_item_grab_focus ((GnomeCanvasItem*) m_Active); + GnomeCanvasItemClass* klass = GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (m_Active)); + klass->event ((GnomeCanvasItem*) m_Active, event); + return true; + } else if (event->type == GDK_BUTTON_PRESS) { + switch (event->button.button) { + case 2: + return true; + } + } else if (event->type == GDK_MOTION_NOTIFY) { + GnomeCanvasItemClass* klass = GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (m_Active)); + klass->event ((GnomeCanvasItem*) m_Active, event); + } + } + return false; +} + +void gcpTextTool::Activate () +{ + if (!m_Active) + UpdateAttributeList (); +} + +bool gcpTextTool::Deactivate () +{ + if (m_Active) + Unselect (); + return true; +} + +bool gcpTextTool::NotifyViewChange () +{ + return (m_Active)? Unselect (): true; +} + +bool gcpTextTool::Unselect () +{ + if (!m_Active) + return true; + if (m_SelSignal) { + g_signal_handler_disconnect (m_Active, m_SelSignal); + m_SelSignal = 0; + } + g_object_set (G_OBJECT (m_Active), "editing", false, NULL); + m_pView->SetGnomeCanvasPangoActive (NULL); + Object *pObj = (Object*) g_object_get_data (G_OBJECT (m_Active), "object"); + pObj->SetSelected (m_pWidget, gcp::SelStateUnselected); + char const *text = pango_layout_get_text (gnome_canvas_pango_get_layout (m_Active)); + m_Active = NULL; + while (!m_UndoList.empty ()) { + xmlFree(m_UndoList.front ()); + m_UndoList.pop_front (); + } + while (!m_RedoList.empty ()) { + xmlFree(m_RedoList.front ()); + m_RedoList.pop_front (); + } + xmlBufferPtr initbuf = xmlBufferCreate (); + xmlBufferPtr endbuf = xmlBufferCreate (); + xmlNodeDump (initbuf, m_pApp->GetXmlDoc (), m_InitNode, 0, 0); + xmlNodeDump (endbuf, m_pApp->GetXmlDoc (), m_CurNode, 0, 0); + if (strcmp ((char*) initbuf->content, (char*) endbuf->content)) + { + char* initval = (char*) xmlNodeGetContent (m_InitNode); + char* endval = (char*) xmlNodeGetContent (m_CurNode); + gcp::Operation *pOp = NULL; + if ((initval && strlen (initval))) { + if (endval && strlen (endval)) { + pOp = m_pView->GetDoc ()->GetNewOperation (gcp::GCP_MODIFY_OPERATION); + pOp->AddNode (m_InitNode, 0); + pOp->AddNode (m_CurNode, 1); + m_CurNode = m_InitNode = NULL; + } else { + pOp = m_pView->GetDoc ()->GetNewOperation (gcp::GCP_DELETE_OPERATION); + pOp->AddNode (m_InitNode); + m_InitNode = NULL; + } + } else if (endval && strlen (endval)) { + pOp = m_pView->GetDoc ()->GetNewOperation (gcp::GCP_ADD_OPERATION); + pOp->AddNode (m_CurNode); + m_CurNode = NULL; + } + if (initval) + xmlFree (initval); + if (endval) + xmlFree (endval); + if (pOp) + m_pView->GetDoc ()->PushOperation (pOp, m_bUndo); + m_bUndo = true; + } + xmlBufferFree (initbuf); + xmlBufferFree (endbuf); + if (m_CurNode) + xmlFree (m_CurNode); + if (m_InitNode) + xmlFree (m_InitNode); + m_CurNode = m_InitNode = NULL; + if (!*text) { + Object* pMol = pObj->GetMolecule (); //if pObj is a fragment + if (pMol) + pObj = pMol; + m_pView->GetDoc ()->Remove (pObj); + m_pView->GetDoc ()->AbortOperation (); + } + m_pView->GetDoc ()->GetWindow ()->ActivateActionWidget ("/MainMenu/FileMenu/SaveAsImage", m_pView->GetDoc ()->HasChildren ()); + return true; +} + +bool gcpTextTool::DeleteSelection () +{ + if (!m_Active) + return false; + unsigned start, end; + + gcp::TextObject *text = dynamic_cast ((Object*) g_object_get_data (G_OBJECT (m_Active), "object")); + if (!text) + return false; + text->GetSelectionBounds (start, end); + gcp_pango_layout_replace_text (gnome_canvas_pango_get_layout (m_Active), + start, end - start, "", NULL); + gnome_canvas_pango_set_selection_bounds (m_Active, start, start); + text->OnChanged (true); + return true; +} + +bool gcpTextTool::CopySelection (GtkClipboard *clipboard) +{ + if (!m_Active) + return false; + unsigned start, end; + gcp::Text *text = (gcp::Text*) g_object_get_data (G_OBJECT (m_Active), "object"); + text->GetSelectionBounds (start, end); + if (start == end) + return false; + m_pData->Copy (clipboard); //To clean the xmlDoc + xmlDocPtr pDoc = m_pData->GetXmlDoc (clipboard); + if (!pDoc) + return false; + pDoc->children = xmlNewDocNode (pDoc, NULL, (xmlChar*) "chemistry", NULL); + xmlNsPtr ns = xmlNewNs (pDoc->children, (xmlChar*) "http://www.nongnu.org/gchempaint", (xmlChar*) "gcp"); + xmlSetNs (pDoc->children, ns); + xmlNodePtr node = text->SaveSelection (pDoc); + if (node) + xmlAddChild (pDoc->children, node); + else + return false; + gtk_clipboard_set_with_data (clipboard, text_targets, 3, + (GtkClipboardGetFunc) on_get_data, + (GtkClipboardClearFunc) gcp::on_clear_data, this); + gtk_clipboard_request_contents (clipboard, + gdk_atom_intern ("TARGETS", FALSE), + (GtkClipboardReceivedFunc) gcp::on_receive_targets, + m_pApp); + return true; +} + +bool gcpTextTool::CutSelection (GtkClipboard *clipboard) +{ + if (!CopySelection (clipboard)) + return false; + return DeleteSelection (); +} + +bool gcpTextTool::PasteSelection (GtkClipboard *clipboard) +{ + if (!m_Active) + return false; + guint *DataType = (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))? &gcp::ClipboardDataType: &gcp::ClipboardDataType1; + GdkAtom targets_atom = gdk_atom_intern (gcp::targets[*DataType].target, FALSE); + gtk_clipboard_request_contents (clipboard, targets_atom, (GtkClipboardReceivedFunc) gcp::on_receive, m_pView); + return true; +} + +struct FragState { + PangoAttrList *l; + unsigned start; +}; + +static bool filter_fragment (PangoAttribute *attr, struct FragState *s) +{ + PangoAttribute *new_attr = pango_attribute_copy (attr); + new_attr->start_index += s->start; + new_attr->end_index += s->start; + pango_attr_list_change (s->l, new_attr); + return false; +} + +bool gcpTextTool::OnReceive (GtkClipboard *clipboard, GtkSelectionData *data, int type) +{ + if (!m_Active) + return false; + guint *DataType = (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))? &gcp::ClipboardDataType: &gcp::ClipboardDataType1; + g_return_val_if_fail ((data->target == gdk_atom_intern (gcp::targets[*DataType].target, FALSE)), FALSE); + gcp::Text *text = (gcp::Text*) g_object_get_data (G_OBJECT (m_Active), "object"); + unsigned start, end; + text->GetSelectionBounds (start, end); + PangoLayout *layout = gnome_canvas_pango_get_layout (m_Active); + switch (*DataType) { + case gcp::GCP_CLIPBOARD_NATIVE: { + xmlDocPtr xml = xmlParseMemory ((const char*) data->data, data->length); + xmlNodePtr node = xml->children; + if ((strcmp((char*)node->name, "chemistry")) || (node->children->next)) { + xmlFreeDoc (xml); + return false; + } + node = node->children; + if (!strcmp ((char*) node->name, "text")) { + gcp_pango_layout_replace_text (layout, start, end - start, "", NULL); + text->LoadSelection (node, start); + xmlFreeDoc (xml); + return true; // otherwise, we'd call OnChange(true) twice. + } else if (!strcmp((char*)node->name, "fragment")) { + gcp::Fragment* fragment = new gcp::Fragment (); + gcp::Document *pDoc = m_pView->GetDoc (); + gcp::Theme *pTheme = pDoc->GetTheme (); + pDoc->AddChild (fragment); + fragment->Load (node); + string buf = fragment->GetBuffer (); + PangoAttrList *l = pango_attr_list_new (); + PangoAttribute *attr = pango_attr_family_new (pTheme->GetFontFamily ()); + pango_attr_list_insert (l, attr); + attr = pango_attr_size_new (pTheme->GetFontSize ()); + pango_attr_list_insert (l, attr); + gcp_pango_layout_replace_text (layout, start, end - start, buf.c_str (), l); + pango_attr_list_unref (l); + l = fragment->GetAttrList (); + struct FragState s; + s.l = pango_layout_get_attributes (layout); + s.start = start; + pango_attr_list_filter (l, (PangoAttrFilterFunc) filter_fragment, &s); + delete fragment; + start += buf.length (); + gnome_canvas_pango_set_selection_bounds (m_Active, start, start); + } else { + xmlFreeDoc (xml); + return false; + } + xmlFreeDoc (xml); + break; + } + case gcp::GCP_CLIPBOARD_UTF8_STRING: { + PangoAttrList *l = pango_attr_list_new (); + gcp_pango_layout_replace_text (layout, start, end - start, (char const *) data->data, l); + pango_attr_list_unref (l); + break; + } + case gcp::GCP_CLIPBOARD_STRING: { + PangoAttrList *l = pango_attr_list_new (); + if (!g_utf8_validate ((const char*) data->data, data->length, NULL)) { + gsize r, w; + gchar* newstr = g_locale_to_utf8 ((const char*) data->data, data->length, &r, &w, NULL); + gcp_pango_layout_replace_text (layout, start, end - start, (char const *) data->data, l); + g_free (newstr); + } else + gcp_pango_layout_replace_text (layout, start, end - start, (char const *) data->data, l); + pango_attr_list_unref (l); + break; + } + } + text->OnChanged (true); + return true; +} + +bool gcpTextTool::OnUndo () +{ + if (m_UndoList.empty ()) { + if (m_pView->GetDoc()->CanUndo()) + { + if (!m_RedoList.empty()) + { + if (m_CurNode) xmlFree(m_CurNode); + m_CurNode = m_RedoList.back(); + m_RedoList.pop_back(); + } + m_bUndo = false; + Unselect(); + } + return false; + } + xmlNodePtr node = m_UndoList.front(); + gcp::TextObject *text = (gcp::TextObject*) g_object_get_data (G_OBJECT (m_Active), "object"); + text->LoadSelected (node); + m_UndoList.pop_front (); + gcp::Document *pDoc = m_pView->GetDoc (); + gcp::Window *pWin = pDoc->GetWindow (); + if (m_UndoList.empty() && !pDoc->CanUndo ()) + pWin->ActivateActionWidget ("/MainMenu/EditMenu/Undo", false); + m_RedoList.push_front(m_CurNode); + pWin->ActivateActionWidget ("/MainMenu/EditMenu/Redo", true); + unsigned start, end; + char* tmp = (char*) xmlGetProp (node, (xmlChar*) "start-sel"); + start = (int) strtoul (tmp, NULL, 10); + xmlFree (tmp); + tmp = (char*) xmlGetProp (node, (xmlChar*) "end-sel"); + end = (int) strtoul (tmp, NULL, 10); + xmlFree (tmp); + gnome_canvas_pango_set_selection_bounds (m_Active, start, end); + m_CurNode = node; + return true; +} + +bool gcpTextTool::OnRedo () +{ + if (m_RedoList.empty ()) + return false; + xmlNodePtr node = m_RedoList.front (); + gcp::TextObject *text = (gcp::TextObject*) g_object_get_data (G_OBJECT (m_Active), "object"); + text->LoadSelected (node); + m_RedoList.pop_front (); + gcp::Window *pWin = m_pView->GetDoc ()->GetWindow (); + if (m_RedoList.empty ()) + pWin->ActivateActionWidget ("/MainMenu/EditMenu/Redo", false); + m_UndoList.push_front (m_CurNode); + pWin->ActivateActionWidget ("/MainMenu/EditMenu/Undo", true); + unsigned start, end; + char* tmp = (char*) xmlGetProp (node, (xmlChar*) "start-sel"); + start = (int) strtoul (tmp, NULL, 10); + xmlFree (tmp); + tmp = (char*) xmlGetProp (node, (xmlChar*) "end-sel"); + end = (int) strtoul (tmp, NULL, 10); + xmlFree (tmp); + gnome_canvas_pango_set_selection_bounds (m_Active, start, end); + m_CurNode = node; + return true; +} + +void gcpTextTool::PushNode (xmlNodePtr node) +{ + gcp::Window *pWin = m_pView->GetDoc ()->GetWindow (); + while (!m_RedoList.empty ()) { + xmlFree (m_RedoList.front ()); + m_RedoList.pop_front (); + pWin->ActivateActionWidget ("/MainMenu/EditMenu/Redo", false); + } + m_UndoList.push_front (m_CurNode); + m_CurNode = node; + pWin->ActivateActionWidget ("/MainMenu/EditMenu/Undo", true); +} + +void gcpTextTool::OnGetData (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info) +{ + xmlDocPtr pDoc = gcp::WidgetData::GetXmlDoc (clipboard); + guint *DataType = (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))? &gcp::ClipboardDataType: &gcp::ClipboardDataType1; + *DataType = info; + gint size; + if (info) { + if (gcp::ClipboardTextData) { + g_free (gcp::ClipboardTextData); + } + gcp::Text *text = new gcp::Text (); + text->Load (pDoc->children->children); + gcp::ClipboardTextData = g_strdup (text->GetBuffer ().c_str ()); + delete text; + size = strlen ((char*) gcp::ClipboardTextData); + gtk_selection_data_set_text (selection_data, (const gchar*) gcp::ClipboardTextData, size); + } else { + xmlDocDumpFormatMemory (pDoc, &gcp::ClipboardData, &size, info); + gtk_selection_data_set (selection_data, gdk_atom_intern (GCHEMPAINT_ATOM_NAME, FALSE), 8, (const guchar*) gcp::ClipboardData, size); + } + gcp::cleared = false; + if (clipboard == gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)) + m_pView->GetDoc ()->GetWindow ()->ActivateActionWidget ("/MainMenu/EditMenu/Paste", true); +} + +void gcpTextTool::UpdateAttributeList () +{ + if (!m_FamilyList) + return; + gcp::Theme *pTheme = m_pApp->GetActiveDocument ()->GetTheme (); + m_FamilyName = pTheme->GetTextFontFamily (); + m_Style = pTheme->GetFontStyle (); + m_Weight = pTheme->GetFontWeight (); + m_Stretch = pTheme->GetFontStretch (); + m_Variant = pTheme->GetFontVariant (); + m_Size = pTheme->GetFontSize (); + m_Rise = 0; + m_Underline = PANGO_UNDERLINE_NONE; + m_Strikethrough = false; + m_Color = RGBA_BLACK; + if (m_Active) { + PangoLayout *layout; + g_object_get (m_Active, "layout", &layout, NULL); + PangoAttrList *l = pango_layout_get_attributes (layout); + if (l) + pango_attr_list_filter (l, (PangoAttrFilterFunc) filter_attribute, this); + } + // select the found face + GtkTreeIter iter; + char const *buf; + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (m_FamilyList), &iter); + do { + gtk_tree_model_get (GTK_TREE_MODEL (m_FamilyList), &iter, 0, &buf, -1); + if (!strcmp (m_FamilyName, buf)) { + m_Dirty = true; + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (m_FamilyList), &iter); + gtk_tree_view_set_cursor (m_FamilyTree, path, NULL, FALSE); + gtk_tree_path_free (path); + break; + } + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (m_FamilyList), &iter)); + // Update other widgets + SetSizeFull (true); + g_signal_handler_block (m_UnderlineBox, m_UnderlineSignal); + gtk_combo_box_set_active (m_UnderlineBox, m_Underline); + g_signal_handler_unblock (m_UnderlineBox, m_UnderlineSignal); + g_signal_handler_block (m_StrikethroughBtn, m_StrikethroughSignal); + gtk_toggle_button_set_active (m_StrikethroughBtn, m_Strikethrough); + g_signal_handler_unblock (m_StrikethroughBtn, m_StrikethroughSignal); + g_signal_handler_block (m_RiseButton, m_RiseSignal); + gtk_spin_button_set_value (m_RiseButton, m_Rise / PANGO_SCALE); + g_signal_handler_unblock (m_RiseButton, m_RiseSignal); + g_signal_handler_block (m_ColorSelector, m_ForeSignal); + go_color_selector_set_color (m_ColorSelector, m_Color); + g_signal_handler_unblock (m_ColorSelector, m_ForeSignal); + BuildAttributeList (); +} + +void gcpTextTool::BuildAttributeList () +{ + if (!m_Active) + return; + PangoAttrList *l = pango_attr_list_new (); + pango_attr_list_insert (l, pango_attr_family_new (m_FamilyName)); + pango_attr_list_insert (l, pango_attr_style_new (m_Style)); + pango_attr_list_insert (l, pango_attr_weight_new (m_Weight)); + pango_attr_list_insert (l, pango_attr_stretch_new (m_Stretch)); + pango_attr_list_insert (l, pango_attr_variant_new (m_Variant)); + pango_attr_list_insert (l, pango_attr_size_new (m_Size)); + pango_attr_list_insert (l, pango_attr_underline_new (m_Underline)); + pango_attr_list_insert (l, pango_attr_strikethrough_new (m_Strikethrough)); + pango_attr_list_insert (l, pango_attr_rise_new (m_Rise)); + pango_attr_list_insert (l, pango_attr_foreground_new (UINT_RGBA_R (m_Color) * 0x101, UINT_RGBA_G (m_Color) * 0x101, UINT_RGBA_B (m_Color) * 0x101)); + gnome_canvas_pango_set_insert_attrs (m_Active, l); + m_Dirty = false; + if (m_pView) + gtk_window_present (m_pView->GetDoc ()->GetWindow ()->GetWindow ()); +} + +static void on_select_family (GtkTreeSelection *selection, gcpTextTool *tool) +{ + tool->OnSelectFamily (selection); +} + +static void on_select_face (GtkTreeSelection *selection, gcpTextTool *tool) +{ + tool->OnSelectFace (selection); +} + +static void on_select_size (GtkTreeSelection *selection, gcpTextTool *tool) +{ + int size; + GtkTreeModel *model; + GtkTreeIter iter; + gtk_tree_selection_get_selected (selection, &model, &iter); + gtk_tree_model_get (model, &iter, 0, &size, -1); + tool->OnSelectSize (size * PANGO_SCALE); +} + +static void on_size_activate (GtkEntry *entry, gcpTextTool *tool) +{ + tool->OnSizeChanged (); +} + +static void on_size_focus_out (GtkEntry *entry, GdkEventFocus *event, gcpTextTool *tool) +{ + tool->OnSizeChanged (); +} + +static void on_underline_changed (GtkComboBox *box, gcpTextTool *tool) +{ + tool->OnUnderlineChanged (gtk_combo_box_get_active (box)); +} + +static void on_strikethrough_toggled (GtkToggleButton *btn, gcpTextTool *tool) +{ + tool->OnStriketroughToggled (gtk_toggle_button_get_active (btn)); +} + +static void on_fore_color_changed (GOSelector *sel, gcpTextTool *tool) +{ + gboolean auto_color; + tool->OnForeColorChanged (go_color_selector_get_color (sel, &auto_color)); +} + +static void on_rise_changed (GtkSpinButton *btn, gcpTextTool *tool) +{ + tool->OnPositionChanged (gtk_spin_button_get_value_as_int (btn)); +} + +/* These are what we use as the standard font sizes, for the size list. + */ +static const guint16 font_sizes[] = { + 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, + 32, 36, 40, 48, 56, 64, 72 +}; + +GtkWidget *gcpTextTool::GetPropertyPage () +{ + GladeXML *xml = glade_xml_new (GLADEDIR"/fontsel.glade", "fontsel", GETTEXT_PACKAGE); + PangoFontFamily **families; + int i, nb; + gcp::Theme *pTheme = m_pApp->GetActiveDocument ()->GetTheme (); + // Initialize faces list + m_FaceList = gtk_list_store_new (1, G_TYPE_STRING); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (m_FaceList), 0, GTK_SORT_ASCENDING); + m_FacesTree = (GtkTreeView *) glade_xml_get_widget (xml, "style"); + gtk_tree_view_set_model (m_FacesTree, GTK_TREE_MODEL (m_FaceList)); + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes (NULL, renderer, "text", 0, NULL); + gtk_tree_view_append_column (m_FacesTree, column); + GtkTreeSelection *selection = gtk_tree_view_get_selection (m_FacesTree); + m_FaceSel = selection; + m_FaceSignal = g_signal_connect (m_FaceSel, "changed", G_CALLBACK (on_select_face), this); + // Initialize sizes list + m_SizeList = gtk_list_store_new (1, G_TYPE_INT); + m_SizesTree = (GtkTreeView *) glade_xml_get_widget (xml, "size-list"); + gtk_tree_view_set_model (m_SizesTree, GTK_TREE_MODEL (m_SizeList)); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (NULL, renderer, "text", 0, NULL); + gtk_tree_view_append_column (m_SizesTree, column); + GtkTreeIter iter, selected; + for (i = 0; i < (int) G_N_ELEMENTS (font_sizes); i++) { + gtk_list_store_append (m_SizeList, &iter); + gtk_list_store_set (m_SizeList, &iter, + 0, font_sizes[i], + -1); + } + selection = gtk_tree_view_get_selection (m_SizesTree); + m_SizeSel = selection; + m_SizeSignal = g_signal_connect (m_SizeSel, "changed", G_CALLBACK (on_select_size), this); + // Size entry + m_SizeEntry = (GtkEntry*) glade_xml_get_widget (xml, "size-entry"); + g_signal_connect (m_SizeEntry, "activate", G_CALLBACK (on_size_activate), this); + g_signal_connect_after (m_SizeEntry, "focus_out_event", G_CALLBACK (on_size_focus_out), this); + SetSizeFull (true); + PangoContext *pc = gtk_widget_get_pango_context (GTK_WIDGET (m_SizeEntry)); + pango_context_list_families (pc, &families, &nb); + m_FamilyList = gtk_list_store_new (1, G_TYPE_STRING); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (m_FamilyList), 0, GTK_SORT_ASCENDING); + m_FamilyTree = (GtkTreeView *) glade_xml_get_widget (xml, "family"); + gtk_tree_view_set_model (m_FamilyTree, GTK_TREE_MODEL (m_FamilyList)); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (NULL, renderer, "text", 0, NULL); + gtk_tree_view_append_column (m_FamilyTree, column); + GtkTreePath *path = NULL; + string name; + bool default_found = false; + for (i = 0; i < nb; i++) { + PangoFontFace **faces; + int *sizes, n; + pango_font_family_list_faces (families[i], &faces, &n); + if (n <= 0) + continue; + pango_font_face_list_sizes (faces[0], &sizes, &n); + if (n > 0) // Do not use bitmap fonts + continue; + name = pango_font_family_get_name (families[i]); + m_Families[name] = (PangoFontFamily*) g_object_ref (families[i]); + gtk_list_store_append (m_FamilyList, &iter); + gtk_list_store_set (m_FamilyList, &iter, + 0, name.c_str (), + -1); + if (name == pTheme->GetTextFontFamily ()) { + selected = iter; + default_found = true; + } + } + if (!default_found) { + if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (m_FamilyList), &iter)) + return NULL; + selected = iter; + } + path = gtk_tree_model_get_path (GTK_TREE_MODEL (m_FamilyList), &selected); + selection = gtk_tree_view_get_selection (m_FamilyTree); + m_FamilySel = selection; + gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); + m_FamilySignal = g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (on_select_family), this); + // Select default font + if (path) { + gtk_tree_selection_select_path (selection, path); + gtk_tree_view_scroll_to_cell (m_FamilyTree, path, column, FALSE, 0., 0.); + gtk_tree_path_free (path); + } + m_UnderlineBox = GTK_COMBO_BOX (glade_xml_get_widget (xml, "underline")); + gtk_combo_box_set_active (m_UnderlineBox, 0); + m_UnderlineSignal = g_signal_connect (G_OBJECT (m_UnderlineBox), "changed", G_CALLBACK (on_underline_changed), this); + m_StrikethroughBtn = GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "strikethrough")); + m_StrikethroughSignal = g_signal_connect (G_OBJECT (m_StrikethroughBtn), "toggled", G_CALLBACK (on_strikethrough_toggled), this); + m_RiseButton = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "rise")); + m_RiseSignal = g_signal_connect (G_OBJECT (m_RiseButton), "value-changed", G_CALLBACK (on_rise_changed), this); + m_ColorSelector = GO_SELECTOR (go_color_selector_new (RGBA_BLACK, RGBA_BLACK, "fore")); + go_color_selector_set_allow_alpha (m_ColorSelector, false); + m_ForeSignal = g_signal_connect (G_OBJECT (m_ColorSelector), "activate", G_CALLBACK (on_fore_color_changed), this); + gtk_widget_show (GTK_WIDGET (m_ColorSelector)); + gtk_table_attach (GTK_TABLE (glade_xml_get_widget (xml, "table2")), GTK_WIDGET (m_ColorSelector), 1, 2, 0, 1, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 0, 0); + return glade_xml_get_widget (xml, "fontsel"); +} + +void gcpTextTool::OnSelectFamily (GtkTreeSelection *selection) +{ + GtkTreeModel *model; + GtkTreeIter iter, selected; + char const *name; + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) + return; + gtk_tree_model_get (model, &iter, 0, &m_FamilyName, -1); + PangoFontFamily *family = m_Families[m_FamilyName]; + PangoFontFace **faces; + int i, besti, nb; + g_signal_handler_block (m_FaceSel, m_FaceSignal); + pango_font_family_list_faces (family, &faces, &nb); + gtk_list_store_clear (m_FaceList); + map::iterator j, jend = m_Faces.end (); + for (j = m_Faces.begin (); j != jend; j++) { + g_object_unref ((*j).second); + } + m_Faces.clear (); + PangoFontDescription *desc; + int distance, best; + PangoStyle Style; + PangoWeight Weight; + PangoVariant Variant; + PangoStretch Stretch; + + best = 32000; // This should be enough + for (i = 0; i < nb; i++) { + name = pango_font_face_get_face_name (faces[i]); + desc = pango_font_face_describe (faces[i]); + m_Faces[name] = (PangoFontFace*) g_object_ref (faces[i]); + gtk_list_store_append (m_FaceList, &iter); + gtk_list_store_set (m_FaceList, &iter, + 0, name, + -1); + // Try to select the best available face + Style = pango_font_description_get_style (desc); + Weight = pango_font_description_get_weight (desc); + Variant = pango_font_description_get_variant (desc); + Stretch = pango_font_description_get_stretch (desc); + distance = abs (Weight - m_Weight) + + abs ((Style? Style + 2: 0) - (m_Style? m_Style + 2: 0)) * 1000 + + abs (Variant - m_Variant) * 10 + abs (Stretch - m_Stretch); + if (distance < best) { + best = distance; + selected = iter; + besti = i; + } + // TODO: write this code + pango_font_description_free (desc); + } + g_signal_handler_unblock (m_FaceSel, m_FaceSignal); + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (m_FaceList), &selected); + if (path) { + gtk_tree_selection_select_path (GTK_TREE_SELECTION (m_FaceSel), path); + gtk_tree_path_free (path); + } else { + //TODO: choose a face when default is not available + } + if (m_Active) { + PangoAttrList *l = pango_attr_list_new (); + pango_attr_list_insert (l, pango_attr_family_new (m_FamilyName)); + pango_attr_list_insert (l, pango_attr_style_new (m_Style)); + pango_attr_list_insert (l, pango_attr_weight_new (m_Weight)); + pango_attr_list_insert (l, pango_attr_stretch_new (m_Stretch)); + pango_attr_list_insert (l, pango_attr_variant_new (m_Variant)); + gnome_canvas_pango_apply_attrs_to_selection (m_Active, l); + pango_attr_list_unref (l); + } +} + +void gcpTextTool::OnSelectFace (GtkTreeSelection *selection) +{ + GtkTreeModel *model; + GtkTreeIter iter; + char const *name; + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) + return; + gtk_tree_model_get (model, &iter, 0, &name, -1); + PangoFontFace *face = m_Faces[name]; + PangoFontDescription *desc = pango_font_face_describe (face); + m_Style = pango_font_description_get_style (desc); + m_Weight = pango_font_description_get_weight (desc); + m_Variant = pango_font_description_get_variant (desc); + m_Stretch = pango_font_description_get_stretch (desc); + pango_font_description_free (desc); + BuildAttributeList (); + if (m_Active) { + PangoAttrList *l = pango_attr_list_new (); + pango_attr_list_insert (l, pango_attr_style_new (m_Style)); + pango_attr_list_insert (l, pango_attr_weight_new (m_Weight)); + pango_attr_list_insert (l, pango_attr_stretch_new (m_Stretch)); + pango_attr_list_insert (l, pango_attr_variant_new (m_Variant)); + gnome_canvas_pango_apply_attrs_to_selection (m_Active, l); + pango_attr_list_unref (l); + } +} + +void gcpTextTool::OnSelectSize (int size) +{ + m_Size = size; + SetSizeFull (false); +} + +void gcpTextTool::OnSizeChanged () +{ + char const *text = gtk_entry_get_text (m_SizeEntry); + m_Size = (int) (MAX (0.1, atof (text) * PANGO_SCALE + 0.5)); + SetSizeFull (true); +} + +void gcpTextTool::SetSizeFull (bool update_list) +{ + char *buf = g_strdup_printf ("%.1f", (double) m_Size / PANGO_SCALE); + gtk_entry_set_text (m_SizeEntry, buf); + g_free (buf); + if (update_list) { + GtkTreeIter iter; + bool found = false; + GtkTreeSelection *selection = gtk_tree_view_get_selection (m_SizesTree); + g_signal_handler_block (selection, m_SizeSignal); + + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (m_SizeList), &iter); + for (unsigned i = 0; i < G_N_ELEMENTS (font_sizes) && !found; i++) { + if (font_sizes[i] * PANGO_SCALE == m_Size) { + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (m_SizeList), &iter); + gtk_tree_view_set_cursor (m_SizesTree, path, NULL, FALSE); + gtk_tree_path_free (path); + found = true; + } + + gtk_tree_model_iter_next (GTK_TREE_MODEL (m_SizeList), &iter); + } + + if (!found) + gtk_tree_selection_unselect_all (selection); + g_signal_handler_unblock (selection, m_SizeSignal); + } + BuildAttributeList (); + if (m_Active) { + PangoAttrList *l = pango_attr_list_new (); + pango_attr_list_insert (l, pango_attr_size_new (m_Size)); + gnome_canvas_pango_apply_attrs_to_selection (m_Active, l); + pango_attr_list_unref (l); + } +} + +void gcpTextTool::SelectBestFontFace () +{ + PangoFontDescription *desc; + int distance, best; + PangoStyle Style; + PangoWeight Weight; + PangoVariant Variant; + PangoStretch Stretch; + map ::iterator i, iend = m_Faces.end (); + char const *name = NULL, *buf; + GtkTreeIter iter; + + best = 32000; // This should be enough + for (i = m_Faces.begin (); i != iend; i++) { + desc = pango_font_face_describe ((*i).second); + // Try to select the best available face + Style = pango_font_description_get_style (desc); + Weight = pango_font_description_get_weight (desc); + Variant = pango_font_description_get_variant (desc); + Stretch = pango_font_description_get_stretch (desc); + distance = abs (Weight - m_Weight) + + abs ((Style? Style + 2: 0) - (m_Style? m_Style + 2: 0)) * 1000 + + abs (Variant - m_Variant) * 10 + abs (Stretch - m_Stretch); + if (distance < best) { + best = distance; + name = (*i).first.c_str (); + } + pango_font_description_free (desc); + } + // select the found face + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (m_FaceList), &iter); + do { + gtk_tree_model_get (GTK_TREE_MODEL (m_FaceList), &iter, 0, &buf, -1); + if (!strcmp (name, buf)) { + m_Dirty = true; + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (m_FaceList), &iter); + gtk_tree_view_set_cursor (m_FacesTree, path, NULL, FALSE); + gtk_tree_path_free (path); + if (m_Dirty) + OnSelectFace ((GtkTreeSelection*) m_FaceSel); + break; + } + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (m_FaceList), &iter)); +} + +int gcpTextTool::GetIndex () +{ + return gnome_canvas_pango_get_cur_index (m_Active); +} + +void gcpTextTool::OnUnderlineChanged (unsigned underline) +{ + m_Underline = (PangoUnderline) underline; + BuildAttributeList (); + if (m_Active) { + PangoAttrList *l = pango_attr_list_new (); + pango_attr_list_insert (l, pango_attr_underline_new (m_Underline)); + gnome_canvas_pango_apply_attrs_to_selection (m_Active, l); + pango_attr_list_unref (l); + } +} + +void gcpTextTool::OnStriketroughToggled (bool strikethrough) +{ + m_Strikethrough = strikethrough; + BuildAttributeList (); + if (m_Active) { + PangoAttrList *l = pango_attr_list_new (); + pango_attr_list_insert (l, pango_attr_strikethrough_new (m_Strikethrough)); + gnome_canvas_pango_apply_attrs_to_selection (m_Active, l); + pango_attr_list_unref (l); + } +} + +void gcpTextTool::OnPositionChanged (int position) +{ + m_Rise = position * PANGO_SCALE; + BuildAttributeList (); +} + +void gcpTextTool::OnForeColorChanged (GOColor color) +{ + m_Color = color; + BuildAttributeList (); + if (m_Active) { + PangoAttrList *l = pango_attr_list_new (); + pango_attr_list_insert (l, pango_attr_foreground_new (UINT_RGBA_R (m_Color) * 0x101, UINT_RGBA_G (m_Color) * 0x101, UINT_RGBA_B (m_Color) * 0x101)); + gnome_canvas_pango_apply_attrs_to_selection (m_Active, l); + pango_attr_list_unref (l); + } +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/text/texttool.h gnome-chemistry-utils-0.10.9/plugins/paint/text/texttool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/text/texttool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/text/texttool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,112 @@ +// -*- C++ -*- + +/* + * GChemPaint text plugin + * texttool.h + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_TEXT_TOOL_H +#define GCHEMPAINT_TEXT_TOOL_H + +#include +#include +#include +#include + +using namespace std; + +class gcpTextTool: public gcp::Tool +{ +public: + gcpTextTool (gcp::Application *App, string Id = "Text"); + virtual ~gcpTextTool (); + + virtual bool OnClicked (); + virtual bool Deactivate (); + virtual void Activate (); + virtual bool OnEvent (GdkEvent *event); + virtual bool NotifyViewChange (); + virtual bool DeleteSelection (); + virtual bool CopySelection (GtkClipboard *clipboard); + virtual bool CutSelection (GtkClipboard *clipboard); + virtual bool PasteSelection (GtkClipboard *clipboard); + virtual bool OnReceive (GtkClipboard *clipboard, GtkSelectionData *data, int type); + virtual bool OnUndo (); + virtual bool OnRedo (); + void PushNode (xmlNodePtr node); + void OnGetData (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info); + GtkWidget *GetPropertyPage (); + void OnSelectFamily (GtkTreeSelection *selection); + void OnSelectFace (GtkTreeSelection *selection); + void OnSelectSize (int size); + void OnSizeChanged (); + void SetSizeFull (bool update_list); + void UpdateAttributeList (); + int GetIndex (); + void OnUnderlineChanged (unsigned underline); + void OnStriketroughToggled (bool strikethrough); + void OnPositionChanged (int position); + void OnForeColorChanged (GOColor color); + char const *GetHelpTag () {return "text";} + +protected: + virtual bool Unselect (); + +private: + void BuildAttributeList (); + void SelectBestFontFace (); + +protected: + GnomeCanvasPango* m_Active; + list m_UndoList, m_RedoList; + xmlNodePtr m_CurNode, m_InitNode; + +private: + bool m_bUndo; + PangoFontDescription *m_FontDesc, *m_DefaultFontDesc; + GtkListStore *m_FamilyList, *m_FaceList, *m_SizeList; + GtkTreeView *m_FamilyTree; + GtkTreeView *m_FacesTree; + GtkTreeView *m_SizesTree; + GtkEntry *m_SizeEntry; + GOSelector *m_ColorSelector; + map m_Families; + map m_Faces; + guint m_FamilySignal, m_FaceSignal, m_SizeSignal; + gpointer m_FamilySel, m_FaceSel, m_SizeSel; + GtkComboBox *m_UnderlineBox; + GtkToggleButton *m_StrikethroughBtn; + GtkSpinButton *m_RiseButton; + bool m_Dirty; + gulong m_SelSignal, m_UnderlineSignal, m_StrikethroughSignal, m_ForeSignal, m_RiseSignal; + +GCU_PROP (char const *, FamilyName) +GCU_PROP (PangoStyle, Style) +GCU_PROP (PangoWeight, Weight) +GCU_PROP (PangoStretch, Stretch) +GCU_PROP (PangoVariant, Variant) +GCU_PROP (PangoUnderline, Underline) +GCU_PROP (int, Size) +GCU_PROP (int, Rise) +GCU_PROP (bool, Strikethrough) +GCU_PROP (GOColor, Color); +}; + +#endif //GCHEMPAINT_TEXT_TOOL_H Binärdateien /tmp/Ih7tkdTCXu/gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/favicon.png and /tmp/ywuaR6msSl/gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/favicon.png sind verschieden. diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/Makefile.am gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/Makefile.am --- gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/Makefile.am 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,52 @@ +EXTRA_DIST = $(IMAGES) + +BUILT_SOURCES = gcp-stock-pixbufs.h + +CLEANFILES = $(BUILT_SOURCES) + +MAINTAINERCLEANFILES = Makefile.in + +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gconf_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif + +DEFS += -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(wikipediadir)\" + +IMAGES = favicon.png + +VARIABLES = \ + favicon $(srcdir)/favicon.png + +wikipediadir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +wikipedia_LTLIBRARIES = wikipedia.la + +wikipedia_la_LDFLAGS = -module -avoid-version +wikipedia_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +wikipedia_la_SOURCES = \ + plugin.cc \ + wikipediatool.cc + +noinst_HEADERS = \ + plugin.h \ + wikipediatool.h + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/Makefile.in gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/Makefile.in --- gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/Makefile.in 2009-11-14 11:46:04.000000000 +0100 @@ -0,0 +1,660 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/paint/wikipedia +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(wikipediadir)" +LTLIBRARIES = $(wikipedia_LTLIBRARIES) +wikipedia_la_DEPENDENCIES = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +am_wikipedia_la_OBJECTS = plugin.lo wikipediatool.lo +wikipedia_la_OBJECTS = $(am_wikipedia_la_OBJECTS) +wikipedia_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(wikipedia_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(wikipedia_la_SOURCES) +DIST_SOURCES = $(wikipedia_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" -DGLADEDIR=\"$(gladedir)\" \ + -DPLUGINSDIR=\"$(wikipediadir)\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(IMAGES) +BUILT_SOURCES = gcp-stock-pixbufs.h +CLEANFILES = $(BUILT_SOURCES) +MAINTAINERCLEANFILES = Makefile.in +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gconf_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +IMAGES = favicon.png +VARIABLES = \ + favicon $(srcdir)/favicon.png + +wikipediadir = $(libdir)/gchemutils/@GCU_API_VER@/plugins/paint +wikipedia_LTLIBRARIES = wikipedia.la +wikipedia_la_LDFLAGS = -module -avoid-version +wikipedia_la_LIBADD = \ + $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la + +wikipedia_la_SOURCES = \ + plugin.cc \ + wikipediatool.cc + +noinst_HEADERS = \ + plugin.h \ + wikipediatool.h + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/paint/wikipedia/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/paint/wikipedia/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-wikipediaLTLIBRARIES: $(wikipedia_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(wikipediadir)" || $(MKDIR_P) "$(DESTDIR)$(wikipediadir)" + @list='$(wikipedia_LTLIBRARIES)'; test -n "$(wikipediadir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(wikipediadir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(wikipediadir)"; \ + } + +uninstall-wikipediaLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(wikipedia_LTLIBRARIES)'; test -n "$(wikipediadir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(wikipediadir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(wikipediadir)/$$f"; \ + done + +clean-wikipediaLTLIBRARIES: + -test -z "$(wikipedia_LTLIBRARIES)" || rm -f $(wikipedia_LTLIBRARIES) + @list='$(wikipedia_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +wikipedia.la: $(wikipedia_la_OBJECTS) $(wikipedia_la_DEPENDENCIES) + $(wikipedia_la_LINK) -rpath $(wikipediadir) $(wikipedia_la_OBJECTS) $(wikipedia_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wikipediatool.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(wikipediadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-wikipediaLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-wikipediaLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-wikipediaLTLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-wikipediaLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-wikipediaLTLIBRARIES installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-wikipediaLTLIBRARIES + + +$(BUILT_SOURCES): $(IMAGES) + $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/plugin.cc gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/plugin.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/plugin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/plugin.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,115 @@ +// -*- C++ -*- + +/* + * GChemPaint Wikipedia plugin + * plugin.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "plugin.h" +#include +#include +#include +#include "wikipediatool.h" +#include "gcp-stock-pixbufs.h" +#include + +using namespace gcu; + +gcpWikipediaPlugin plugin; + +gcpWikipediaPlugin::gcpWikipediaPlugin (): gcp::Plugin () +{ +} + +gcpWikipediaPlugin::~gcpWikipediaPlugin () +{ +} + +static gcp::IconDesc icon_descs[] = { + {"gcp_Wikipedia", favicon}, + {NULL, NULL}, +}; + +static GtkRadioActionEntry entries[] = { + { "Wikipedia", "gcp_Wikipedia", N_("Wikipedia export"), NULL, + N_("Export for Wikipedia publication"), + 0 }, +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +""; + +struct CallbackData { + Object *Mol; + double x, y; +}; + +static void do_image_export (struct CallbackData *data) +{ + gcp::Document *Doc = dynamic_cast (data->Mol->GetDocument ()); + if (!Doc) + return; + gcp::Application *App = dynamic_cast (Doc->GetApp ()); + gcp::Tool *Tool = App->GetTool ("Wikipedia"); + Tool->OnClicked (Doc->GetView (), data->Mol, data->x, data->y, 0); +} + +static void do_free_data (struct CallbackData *data) +{ + delete data; +} + +static bool on_molecule_menu (Object *target, GtkUIManager *UIManager, Object *object, double x, double y) +{ + gcp::Document *Doc = dynamic_cast (target->GetDocument ()); + if (!Doc) + return false; + GtkActionGroup *group = gtk_action_group_new ("wikipedia"); + struct CallbackData *data = new struct CallbackData (); + data->Mol = target; + data->x = x; + data->y = y; + GtkAction *action = gtk_action_new ("wikipedia", _("Generate Wikipedia conformant PNG image"), NULL, NULL); + g_object_set_data_full (G_OBJECT (action), "data", data, (GDestroyNotify) do_free_data); + g_signal_connect_swapped (action, "activate", G_CALLBACK (do_image_export), data); + gtk_action_group_add_action (group, action); + g_object_unref (action); + gtk_ui_manager_add_ui_from_string (UIManager, "", -1, NULL); + gtk_ui_manager_insert_action_group (UIManager, group, 0); + g_object_unref (group); + return true; +} + +void gcpWikipediaPlugin::Populate (gcp::Application *App) +{ + App->AddActions (entries, G_N_ELEMENTS (entries), ui_description, icon_descs); + Object::AddMenuCallback (MoleculeType, on_molecule_menu); + new gcpWikipediaTool (App); +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/plugin.h gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/plugin.h --- gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/plugin.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,39 @@ +// -*- C++ -*- + +/* + * GChemPaint Wikipedia plugin + * plugin.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_WIKIPEDIA_PLUGIN_H +#define GCHEMPAINT_WIKIPEDIA_PLUGIN_H + +#include + +class gcpWikipediaPlugin: public gcp::Plugin +{ +public: + gcpWikipediaPlugin (); + virtual ~gcpWikipediaPlugin (); + + virtual void Populate (gcp::Application* App); +}; + +#endif //GCHEMPAINT_WIKIPEDIA_PLUGIN_H diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/wikipediatool.cc gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/wikipediatool.cc --- gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/wikipediatool.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/wikipediatool.cc 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,235 @@ +// -*- C++ -*- + +/* + * GChemPaint Wikipedia plugin + * wikipediatool.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "wikipediatool.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace gcu; +using namespace std; + +class WikipediaApp: public gcu::Application +{ +public: + WikipediaApp (gcu::Application *App); + virtual ~WikipediaApp (); + + bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *pDoc = NULL); + GtkWindow *GetWindow () {return m_pApp->GetWindow ();} + +private: + gcu::Application *m_pApp; +}; + +WikipediaApp::WikipediaApp (gcu::Application *App): gcu::Application ("gchempaint") +{ + m_pApp = App; +} + +WikipediaApp::~WikipediaApp () +{ +} + +// FIXME: make this a public function in libgcu +static gboolean do_save_image (const gchar *buf, gsize count, GError **error, gpointer data) +{ + GOutputStream *output = (GOutputStream *) data; + while (count) { + count -= g_output_stream_write (output, buf, count, NULL, error); + if (*error) + return false; + } + return true; +} + +bool WikipediaApp::FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, gcu::Document *pDoc) +{ + gcp::Document *Doc = static_cast (pDoc); + if (!filename || !strlen( filename) || filename[strlen( filename) - 1] == '/') { + GtkWidget* message = gtk_message_dialog_new (window, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + _("Please enter a file name,\nnot a directory")); + gtk_dialog_run (GTK_DIALOG (message)); + gtk_widget_destroy (message); + return true; + } + char *filename2 = (strcmp (filename + strlen (filename) - 4, ".png"))? + g_strconcat (filename, ".png", NULL): + g_strdup (filename); + GFile *file = g_vfs_get_file_for_uri (g_vfs_get_default (), filename2); + GError *error = NULL; + bool err = g_file_query_exists (file, NULL); + gint result = GTK_RESPONSE_YES; + if (err) { + char *buf = g_uri_unescape_string (filename2, NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), buf); + g_free (buf); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + } + if (result == GTK_RESPONSE_YES) { + if (err) { + // destroy the old file + g_file_delete (file, NULL, &error); + if (error) { + char *buf = g_uri_unescape_string (filename2, NULL); + gchar * message = g_strdup_printf (_("Error while processing %s:\n%s"), buf, error->message); + g_free (buf); + g_error_free (error); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gchempaint"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + g_object_unref (file); + return true; + } + } + } else + return true; + ArtDRect rect; + GnomeCanvas *canvas = GNOME_CANVAS (Doc->GetWidget ()); + gcp::WidgetData *pData = static_cast (g_object_get_data (G_OBJECT (canvas), "data")); + pData->GetObjectBounds (Doc, &rect); + int x, y, w, h; + x = static_cast (rect.x0); + y = static_cast (rect.y0); + w = static_cast (rect.x1 - rect.x0) + 36; + h = static_cast (rect.y1 - rect.y0) + 36; + GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, false, 8, w, h); + gdk_pixbuf_fill (pixbuf, 0xffffffff); + GnomeCanvasBuf buf; + buf.buf = gdk_pixbuf_get_pixels (pixbuf); + buf.rect.x0 = (int) floor (rect.x0) - 18; + buf.rect.x1 = (int) ceil (rect.x1); + buf.rect.y0 = (int) floor (rect.y0) - 18; + buf.rect.y1 = (int) ceil (rect.y1); + buf.buf_rowstride = gdk_pixbuf_get_rowstride (pixbuf); + buf.bg_color = 0xffffff; + buf.is_buf = 1; + (* GNOME_CANVAS_ITEM_GET_CLASS (pData->Group)->render) (GNOME_CANVAS_ITEM (pData->Group), &buf); + + GdkPixbuf *alpha = gdk_pixbuf_add_alpha (pixbuf, false, 0, 0, 0); + g_object_unref (pixbuf); + // Now make it transparent + int row, col, rowstride = gdk_pixbuf_get_rowstride (alpha) / 4;; + guint32 *color, *line; + line = color = reinterpret_cast (gdk_pixbuf_get_pixels (alpha)); + for (row = 0; row < h; row++) { + for (col = 0; col < w ; col++) { + *color = (~*color & 0xff) << 24; + color++; + } + color = line += rowstride; + } + + map::iterator i; + gcp::Molecule *Mol = dynamic_cast (pDoc->GetFirstChild (i)); + char const *InChI = Mol->GetInChI (); + GOutputStream *output = G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, NULL, &error)); + if (!error) { + vector keys, values; + char const *author = static_cast (pDoc)->GetAuthor (); + // We need to be sure that the author name can be converted to latin-1 + // otherwise, pixbuf export will fail, but it still must be passed as UTF-8 + char *latin1_author = g_convert (author, strlen (author), "ISO-8859-1", "UTF-8", NULL, NULL, NULL); + if (latin1_author) { + keys.push_back (const_cast ("tEXt::Author")); + values.push_back (const_cast (author)); + g_free (latin1_author); + } + keys.push_back (const_cast ("tEXt::Copyright")); + values.push_back (const_cast ("Public domain")); + keys.push_back (const_cast ("tEXt::InChI")); + values.push_back (const_cast (InChI)); + keys.push_back (reinterpret_cast (NULL)); + values.push_back (reinterpret_cast (NULL)); + gdk_pixbuf_save_to_callbackv (alpha, do_save_image, output, "png", keys.data (), values.data (), &error); + g_output_stream_close (output, NULL, NULL); // hope there will be no error there + } + if (error) { + cerr << _("Unable to save image file: ") << error->message << endl; + g_error_free (error); + } + g_object_unref (file); + g_object_unref (alpha); + + g_free (filename2); + return false; +} + +static WikipediaApp *pApp; + +gcpWikipediaTool::gcpWikipediaTool (gcp::Application *App): gcp::Tool (App, "Wikipedia") +{ + pApp = new WikipediaApp (App); +} + +gcpWikipediaTool::~gcpWikipediaTool () +{ + delete pApp; +} + + +bool gcpWikipediaTool::OnClicked () +{ + gcp::Molecule *pMol = dynamic_cast (m_pObject->GetMolecule ()); + if (!pMol) + return false; + gcp::Document *pDoc = new gcp::Document (NULL, true), + *OrigDoc = static_cast (pMol->GetDocument ()); + pDoc->GetView ()->CreateNewWidget (); + gcp::Theme *pTheme = gcp::TheThemeManager.GetTheme ("Wikipedia"); + pDoc->SetTheme (pTheme); + xmlDocPtr xml = xmlNewDoc ((xmlChar*) "1.0"); + if (!xml) + return false; // should not happen, but we need something better + xmlDocSetRootElement (xml, xmlNewDocNode (xml, NULL, (xmlChar*) "chemistry", NULL)); + xmlNsPtr ns = xmlNewNs (xml->children, (xmlChar*) "http://www.nongnu.org/gchempaint", (xmlChar*) "gcp"); + xmlSetNs (xml->children, ns); + //FIXME: implement exception handling + xmlNodePtr child = pMol->Save (xml); + if (child) + xmlAddChild (xml->children, child); + + pDoc->Load (xml->children); + xmlFree (xml); + pDoc->SetAuthor (OrigDoc->GetAuthor ()); + + list mimes; + mimes.push_front ("image/png"); + new FileChooser (pApp, true, mimes, pDoc, NULL, NULL); + delete pDoc; + return false; +} diff -Nru gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/wikipediatool.h gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/wikipediatool.h --- gnome-chemistry-utils-0.8.6/plugins/paint/wikipedia/wikipediatool.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/plugins/paint/wikipedia/wikipediatool.h 2009-11-14 11:30:34.000000000 +0100 @@ -0,0 +1,41 @@ +// -*- C++ -*- + +/* + * GChemPaint Wikipedia plugin + * wikipediatool.h + * + * Copyright (C) 2001-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_WIKIPEDIA_TOOL_H +#define GCHEMPAINT_WIKIPEDIA_TOOL_H + +#include + + +class gcpWikipediaTool: public gcp::Tool +{ +public: + gcpWikipediaTool (gcp::Application *App); + virtual ~gcpWikipediaTool (); + + virtual bool OnClicked (); +}; + +#endif // GCHEMPAINT_WIKIPEDIA_TOOL_H + diff -Nru gnome-chemistry-utils-0.8.6/po/ChangeLog gnome-chemistry-utils-0.10.9/po/ChangeLog --- gnome-chemistry-utils-0.8.6/po/ChangeLog 2007-10-25 07:07:22.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/ChangeLog 2009-11-14 11:30:40.000000000 +0100 @@ -1,45 +1,82 @@ ##Text encoding: utf-8 -2007-10-25 Jean Bréfort - * po/LINGUAS: add pt_BR. - * po/pt_BR.po: new translation by Grégoire Demets. +2009-11-14 Matthias Mailänder + * de.po: Updated German translation. -2007-05-10 Julian Sikorski - * Updated Polish translation. +2009-09-20 Matthias Mailänder + * de.po: Updated German translation. -2007-05-10 Jean Bréfort - * fr.po: cleaned out unused strings. +2009-03-13 Jean Bréfort + * LINGUAS: add zh_TW. + * zh_TW.po: new file, thanks to I-Yuan Chiang and his group. -2007-05-09 Jean Bréfort - * POTFILES.in: add x-gcrystal.desktop (no new string). +2008-11-26 Jean Bréfort + * fr.po: fixed typo. -2007-05-07 Jean Bréfort - * fr.po: fixed the last fuzzy. +2008-09-18 Julian Sikorski + * pl.po: updated polish translation. -2007-05-07 Daniel Leidert - * de.po: Update German translation. +2008-09-15 Julian Sikorski + * pl.po: updated polish translation. -2007-04-06 Jean Bréfort - * POTFILES.in: added missing file. - * fr.po: translate the new string. +2008-09-14 Julian Sikorski + * pl.po: updated polish translation. -2007-04-06 Jean Bréfort - * fr.po: fixed three fuzzies. +2008-09-06 Jean Bréfort + * POTFILES.skip: fixed file list. -2007-04-09 Costantino - * Updated Italian translation. +2008-09-06 Jean Bréfort + * POTFILES.in: added new programs/crystal/docprop.cc. + * fr.po: updated french translation. + +2008-08-25 Jean Bréfort + * de.po: merged missing strings from stable branch. + * it.po: ditto. + * pl.po: ditto. + * pt_BR.po: ditto. + * ru.po: ditto. + +2008-08-23 Jean Bréfort + * LINGUAS: merged with gchempaint po files. + * de.po: ditto. + * es.po: ditto. + * fr.po: ditto. + * it.po: ditto. + * pl.po: ditto. + * pt_BR.po: ditto. + * ru.po: ditto. + * zh_CN.po: ditto. + +2008-08-22 Jean Bréfort + * POTFILES.in: added missing files. + +2008-07-03 Jean Bréfort + * POTFILES.in: added plugins/loaders/cdx/cdx.cc + +2008-06-22 Jean Bréfort + * POTFILES.in: added missing files. + * POTFILES.skip: new file. + +2008-03-18 Jean Bréfort + * POTFILES.in: added missing files. -2007-04-06 Jean Bréfort - * fr.po: fixed more issues. +2007-09-16 Jean Bréfort + * POTFILES.in: added missing files. + +2007-05-09 Jean Bréfort + * POTFILES.in: added H-pos.glade. + +2007-05-09 Jean Bréfort + * POTFILES.in: update files list. -2007-04-06 Julian Sikorski - * Updated Polish translation. +2007-03-31 Jean Bréfort + * fr.po: fixed missing white spaces. -2007-03-22 Jean Bréfort - * fr.po: fixed some missing white spaces. +2007-03-09 Jean Bréfort + * POTFILES.in: update paths for new architecture. 2007-03-01 Jean Bréfort - * fr.po: updated French translation. + * fr.po: update French translation. 2007-02-16 Jean Bréfort * POTFILES.in: update files list. diff -Nru gnome-chemistry-utils-0.8.6/po/de.po gnome-chemistry-utils-0.10.9/po/de.po --- gnome-chemistry-utils-0.8.6/po/de.po 2007-05-10 14:07:17.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/de.po 2009-11-14 11:30:40.000000000 +0100 @@ -3,24 +3,180 @@ # This file is distributed under the same license as the gnome-chemistry-utils package. # Christian Lohmaier , 2004. # Daniel Leidert , 2006,2007. -# +# Matthias Mailänder , 2009 +# msgid "" msgstr "" "Project-Id-Version: gnome-chemistry-utils 0.8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-05-09 09:18+0200\n" -"PO-Revision-Date: 2007-05-07 13:51+0200\n" -"Last-Translator: Daniel Leidert \n" +"POT-Creation-Date: 2009-09-18 17:01+0200\n" +"PO-Revision-Date: 2009-10-15 18:18+0100\n" +"Last-Translator: Matthias Mailänder \n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../gchemutils.xml.in.h:1 ../programs/crystal/x-gcrystal.desktop.in.h:1 +#: ../gchemutils.schemas.in.h:1 +msgid "Default Bottom Margin" +msgstr "unterer Standardrandabstand" + +#: ../gchemutils.schemas.in.h:2 +msgid "Default Left Margin" +msgstr "linker Standardrandabstand" + +#: ../gchemutils.schemas.in.h:3 +msgid "Default Top Margin" +msgstr "oberer Standardrandabstand" + +#: ../gchemutils.schemas.in.h:4 +msgid "Default Top Outside Margin" +msgstr "oberer Standardaußenrandabstand" + +#: ../gchemutils.schemas.in.h:5 +msgid "Footer height" +msgstr "Fußnotenhöhe" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "Off-Screen-Rendering" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "Papier" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "Bevorzugte Darstellungseinheit" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "Dies ist die Standardausrichtung für Papier:" + +#: ../gchemutils.schemas.in.h:10 +msgid "This is the default paper specification like iso_a4 or na_letter, i.e. a PWG 5101.1-2002 paper name." +msgstr "Dies ist die Standard Papierspezifikation wie iso_a4 oder na_letter, z.B. ein PWG 5101.1-2002 Papiername." + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "Diese Zeichenkette gibt die Standardeinheit an, die im Seiteneinstellungsdialog verwendet werden soll." + +#: ../gchemutils.schemas.in.h:12 +#, fuzzy +msgid "This value gives the default footer height number of points." +msgstr "Dieser Wert gibt die Standardfußzeilenhöhe an. (Anzahl von Punkten)" + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "Dieser Wert gibt die Standardkopfzeilenhöhe an. (Anzahl von Punkten)" + +#: ../gchemutils.schemas.in.h:14 +#, fuzzy +msgid "This value gives the default number of points from the bottom of a page to the end of the body." +msgstr "Dieser Wert gibt die Standardanzahl an Punkten von der Unterseite eines Blattes bis zum Ende des Textkörpers an." + +#: ../gchemutils.schemas.in.h:15 +#, fuzzy +msgid "This value gives the default number of points from the left of a page to the left of the body." +msgstr "Dieser Wert gibt die Standardanzahl an Punkten von der linken Seite eines Blattes bis zur linken Seite des Textkörpers an." + +#: ../gchemutils.schemas.in.h:16 +#, fuzzy +msgid "This value gives the default number of points from the right of a page to the right of the body." +msgstr "Dieser Wert gibt die Standardanzahl an Punkten von der rechten Seite eines Blattes bis zur rechten Seite des Textkörpers an." + +#: ../gchemutils.schemas.in.h:17 +#, fuzzy +msgid "This value gives the default number of points from the top of a page to the start of the body." +msgstr "Dieser Wert gibt die Standardanzahl an Punkten von der Oberseite eines Blattes bis zum Beginn des Textkörpers an." + +#: ../gchemutils.schemas.in.h:18 +msgid "Whether to use off-screen rendering when printing or exporting as an image. Setting it to true might lead to a crash with some video cards drivers." +msgstr "Ob Off-Screen-Rendering beim Drucken oder ein Export als Bild verwendet werden soll. Es auf true zu setzen kann mit einigen Grafikartentreibern zu einem Programmabsturz führen." + +#: ../gchemutils.xml.in.h:1 +#: ../programs/paint/x-gchempaint.desktop.in.h:1 +msgid "2D Chemical structure" +msgstr "2D Strukturformel" + +#: ../gchemutils.xml.in.h:2 +#: ../programs/crystal/x-gcrystal.desktop.in.h:1 msgid "Crystalline structure model" msgstr "Kristallstrukturmodell" -#: ../glade/gchemcalc.glade.h:1 ../programs/calc/gchemcalc.desktop.in.h:2 +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "Acetyl" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "Alkyl" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "Aryl" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "Benzoyl" + +#: ../database/residues.xml.in.h:5 +msgid "Benzyl" +msgstr "Benzyl" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "Butyl" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "Ehtyl" + +#: ../database/residues.xml.in.h:8 +msgid "Halogen" +msgstr "Halogen" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "Isobutyl" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "Isopropyl" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "Mesyl" + +#: ../database/residues.xml.in.h:12 +msgid "Metal" +msgstr "Metall" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "Methyl" + +#: ../database/residues.xml.in.h:14 +msgid "Phenyl" +msgstr "Phenyl" + +#: ../database/residues.xml.in.h:15 +msgid "Propyl" +msgstr "Propyl" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "Tosyl" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "Triflyl" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "sec-Butyl" + +#: ../glade/gchemcalc.glade.h:1 msgid "Chemical calculator" msgstr "Chemie-Rechner" @@ -28,7 +184,8 @@ msgid "Composition" msgstr "Zusammensetzung" -#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:166 +#: ../glade/gchemcalc.glade.h:3 +#: ../programs/calc/gchemcalc.cc:355 msgid "Formula:" msgstr "Formel:" @@ -44,7 +201,8 @@ msgid "Monoisotopic mass:" msgstr "Monoisotopenmasse:" -#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:169 +#: ../glade/gchemcalc.glade.h:7 +#: ../programs/calc/gchemcalc.cc:358 msgid "Raw formula:" msgstr "Summenformel:" @@ -68,6 +226,154 @@ msgid "Image resolution:" msgstr "Bildauflösung:" +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "% der normalen Größe" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "mittig auf der Seite:" + +#: ../glade/print-setup.glade.h:4 +msgid "O_rientation:" +msgstr "Ausrichtung:" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "Blatt:" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "Skalierung" + +#: ../glade/print-setup.glade.h:7 +msgid "Bottom margin:" +msgstr "unterer Randabstand" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "Ändere Papiertyp" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "Konfigurieren" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "E_rste Seitenzahl:" + +#: ../glade/print-setup.glade.h:11 +msgid "Footer:" +msgstr "Fußzeile:" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "Kopfzeile:" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "Kopf- und Fußzeilen" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "Querformat" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "linker Randabstand" + +#: ../glade/print-setup.glade.h:16 +msgid "Page" +msgstr "Seite" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "Seiteneinstellungen" + +#: ../glade/print-setup.glade.h:18 +msgid "Portrait" +msgstr "Hochformat" + +#: ../glade/print-setup.glade.h:19 +msgid "Reload defaults" +msgstr "Vorgaben erneut laden" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "umgekehrt Querformat" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "umgekehrt Hochformat" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "rechter Randabstand" + +#: ../glade/print-setup.glade.h:23 +msgid "Save as defaults" +msgstr "Als Festwert abspeichern" + +#: ../glade/print-setup.glade.h:24 +msgid "Scale" +msgstr "Skalierung" + +#: ../glade/print-setup.glade.h:25 +msgid "Scale to fit _horizontally on" +msgstr "Horizontal einpassen" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "Vertikal einpassen" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "oberer Randabstand:" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "Einheit:" + +#: ../glade/print-setup.glade.h:29 +msgid "_Automatic scaling:" +msgstr "_Automatische Skalierung:" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "_Feste Skalierung:" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "_Fußzeile:" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "_Kopfzeile:" + +#: ../glade/print-setup.glade.h:33 +msgid "_Horizontally" +msgstr "_Horizontal" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "Kei_n Skalieren" + +#: ../glade/print-setup.glade.h:35 +msgid "_Vertically" +msgstr "_Vertikal" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "Seite(n)" + +#: ../glade/crystal/bonds.glade.h:1 +#: ../libs/gcp/preferences.cc:445 +#: ../libs/gcp/preferences.cc:519 +#: ../libs/gcp/preferences.cc:569 +msgid "Bonds" +msgstr "Bindungen" + #: ../glade/crystal/cell.glade.h:1 msgid "Cell" msgstr "Zelle" @@ -136,6 +442,51 @@ msgid "γ (°):" msgstr "γ (°):" +#: ../glade/crystal/docprop.glade.h:1 +#: ../glade/paint/docprop.glade.h:1 +msgid "Author:" +msgstr "Autor:" + +#: ../glade/crystal/docprop.glade.h:2 +#: ../glade/paint/docprop.glade.h:2 +msgid "History" +msgstr "Chronik" + +#: ../glade/crystal/docprop.glade.h:3 +#: ../glade/paint/docprop.glade.h:4 +msgid "_Comments:" +msgstr "_Kommentare:" + +#: ../glade/crystal/docprop.glade.h:4 +#: ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "Erstellungsdatum:" + +#: ../glade/crystal/docprop.glade.h:5 +#: ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "Dokumenteigenschaften" + +#: ../glade/crystal/docprop.glade.h:6 +#: ../glade/paint/docprop.glade.h:7 +msgid "E-_mail:" +msgstr "e-_Mail " + +#: ../glade/crystal/docprop.glade.h:7 +#: ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "Revisionsdatum:" + +#: ../glade/crystal/docprop.glade.h:8 +#: ../glade/paint/docprop.glade.h:10 +msgid "_Name:" +msgstr "_Name:" + +#: ../glade/crystal/docprop.glade.h:9 +#: ../glade/paint/docprop.glade.h:11 +msgid "_Title:" +msgstr "_Titel:" + #: ../glade/crystal/prefs.glade.h:1 msgid "" "300\n" @@ -159,15 +510,11 @@ "Andere" #: ../glade/crystal/prefs.glade.h:10 -msgid "" -"A printer resolution of 300 dpi generally gives a quite acceptable result. " -"Changing to a higher value can lead to a much longer processing time." -msgstr "" -"Eine Druckauflösung von 300 dpi erzeugt im Normalfall ein akzeptables " -"Druckresultat. Die Auswahl einer höheren Auflösung kann zu längeren " -"Prozesszeiten führen." +msgid "A printer resolution of 300 dpi generally gives a quite acceptable result. Changing to a higher value can lead to a much longer processing time." +msgstr "Eine Druckauflösung von 300 dpi erzeugt im Normalfall ein akzeptables Druckresultat. Die Auswahl einer höheren Auflösung kann zu längeren Prozesszeiten führen." -#: ../glade/crystal/prefs.glade.h:11 ../glade/crystal/view-settings.glade.h:1 +#: ../glade/crystal/prefs.glade.h:11 +#: ../glade/crystal/view-settings.glade.h:1 msgid "Background color:" msgstr "Hintergrundfarbe:" @@ -175,15 +522,18 @@ msgid "Default views settings" msgstr "Standardeinstellung für Ansicht" -#: ../glade/crystal/prefs.glade.h:13 ../glade/crystal/view-settings.glade.h:2 +#: ../glade/crystal/prefs.glade.h:13 +#: ../glade/crystal/view-settings.glade.h:2 msgid "Euler's angles" msgstr "Eulersche Winkel" -#: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 -msgid "Field of view (between 1° and 45°):" +#: ../glade/crystal/prefs.glade.h:14 +#: ../glade/crystal/view-settings.glade.h:3 +msgid "Field of view (between 1 and 45°):" msgstr "Blickwinkel (zwischen 1° und 45°):" -#: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 +#: ../glade/crystal/prefs.glade.h:15 +#: ../glade/crystal/view-settings.glade.h:4 msgid "Model orientation in space:" msgstr "Ausrichtung des Modells im Raum:" @@ -195,54 +545,79 @@ msgid "Printing" msgstr "Drucken" -#: ../glade/crystal/prefs.glade.h:18 ../glade/crystal/view-settings.glade.h:5 +#: ../glade/crystal/prefs.glade.h:18 +#: ../glade/crystal/view-settings.glade.h:5 msgid "θ (°):" msgstr "θ (°):" -#: ../glade/crystal/prefs.glade.h:19 ../glade/crystal/view-settings.glade.h:6 +#: ../glade/crystal/prefs.glade.h:19 +#: ../glade/crystal/view-settings.glade.h:6 msgid "φ (°):" msgstr "φ (°):" -#: ../glade/crystal/prefs.glade.h:20 ../glade/crystal/view-settings.glade.h:7 +#: ../glade/crystal/prefs.glade.h:20 +#: ../glade/crystal/view-settings.glade.h:7 msgid "ψ (°):" msgstr "ψ (°):" #: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "Änderungen anwenden auf:" + +#: ../glade/crystal/atoms.glade.h:2 +#: ../libs/gcp/preferences.cc:433 +#: ../libs/gcp/preferences.cc:507 +#: ../libs/gcp/preferences.cc:557 msgid "Atoms" msgstr "Atome" -#: ../glade/crystal/atoms.glade.h:2 +#: ../glade/crystal/atoms.glade.h:3 msgid "Charge: " msgstr "Ladung: " -#: ../glade/crystal/atoms.glade.h:3 +#: ../glade/crystal/atoms.glade.h:4 msgid "Custom" msgstr "Benutzerdefiniert" -#: ../glade/crystal/atoms.glade.h:4 +#: ../glade/crystal/atoms.glade.h:5 msgid "Custom color:" msgstr "Benutzerdefinierte Farbe:" -#: ../glade/crystal/atoms.glade.h:5 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/atoms.glade.h:6 +#: ../glade/crystal/cleavages.glade.h:2 #: ../glade/crystal/lines.glade.h:2 msgid "Dele_te all" msgstr "Alles _löschen" -#: ../glade/crystal/atoms.glade.h:6 ../gcu/gtkcomboperiodic.c:96 -#: ../programs/table/gchemtable-app.cc:252 -#: ../programs/table/gchemtable.desktop.in.h:2 +#: ../glade/crystal/atoms.glade.h:7 +#: ../libs/gcu/gtkcomboperiodic.c:104 +#: ../programs/table/gchemtable-app.cc:267 msgid "Periodic table of the elements" msgstr "Periodensystem der Elemente" -#: ../glade/crystal/atoms.glade.h:7 +#: ../glade/crystal/atoms.glade.h:8 msgid "Radius" msgstr "Radius" -#: ../glade/crystal/atoms.glade.h:8 +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "Skalierungsfaktor:" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" +"Ausgewählte Elemente\n" +"Ausgewählte Atome\n" +"Alle Atome" + +#: ../glade/crystal/atoms.glade.h:13 msgid "Type:" msgstr "Typ:" -#: ../glade/crystal/atoms.glade.h:9 +#: ../glade/crystal/atoms.glade.h:14 msgid "" "Unknown\n" "Ionic\n" @@ -256,20 +631,22 @@ "Kovalent\n" "Van der Waals" -#: ../glade/crystal/atoms.glade.h:14 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/atoms.glade.h:19 +msgid "Value (pm):" +msgstr "Wert (pm):" + +#: ../glade/crystal/atoms.glade.h:20 +#: ../glade/crystal/cleavages.glade.h:5 #: ../glade/crystal/lines.glade.h:7 msgid "_Add" msgstr "_Einfügen" -#: ../glade/crystal/atoms.glade.h:15 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/atoms.glade.h:21 +#: ../glade/crystal/cleavages.glade.h:6 #: ../glade/crystal/lines.glade.h:8 msgid "_Delete" msgstr "_Entfernen" -#: ../glade/crystal/atoms.glade.h:16 -msgid "value (pm):" -msgstr "Wert (pm):" - #: ../glade/crystal/cleavages.glade.h:1 msgid "Cleavages" msgstr "Spaltebenen" @@ -311,6 +688,7 @@ msgstr "Radius (pm):" #: ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 msgid "*" msgstr "*" @@ -330,18 +708,301 @@ msgid "Minimum" msgstr "Minimum" -#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:143 +#: ../glade/crystal/size.glade.h:6 +#: ../programs/crystal/atomsdlg.cc:144 msgid "x" msgstr "x" -#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:153 +#: ../glade/crystal/size.glade.h:7 +#: ../programs/crystal/atomsdlg.cc:154 msgid "y" msgstr "y" -#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:163 +#: ../glade/crystal/size.glade.h:8 +#: ../programs/crystal/atomsdlg.cc:164 msgid "z" msgstr "z" +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" +msgstr "Pfeil zugehöriges Objekt" + +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" +msgstr "_Rolle:" + +#: ../glade/paint/arrow-object.glade.h:3 +msgid "gtk-close" +msgstr "" + +#: ../glade/paint/arrow-object.glade.h:4 +#: ../glade/paint/newfiledlg.glade.h:5 +msgid "gtk-help" +msgstr "" + +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "Thema" + +#: ../glade/paint/docprop.glade.h:9 +#: ../glade/paint/newfiledlg.glade.h:2 +msgid "Theme:" +msgstr "Thema:" + +#: ../glade/paint/H-pos.glade.h:1 +#: ../libs/gcp/atom.cc:1885 +msgid "Hydrogen atoms position" +msgstr "Position der Wasserstoffatome" + +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" +msgstr "" +"Links\n" +"Rechts\n" +"Oben\n" +"Unten\n" +"Auto" + +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" +msgstr "Neue Datei mit Thema" + +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "" + +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" +msgstr "" + +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" +msgstr "Pfeilspitze" + +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" +msgstr "Normale Bindungen" + +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" +msgstr "Stereochemische Bindungen" + +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "Themen" + +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "A:" + +#: ../glade/paint/preferences.glade.h:6 +msgid "Angl_e:" +msgstr "Wink_el:" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "Pfeilliniendicke (in Pixel)." + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "B:" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "Bindungsliniendicke (in Pixel)" + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "C:" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "Ladungs_zeichengröße" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "Standardkompressionsgrad für GChemPaint-Dateien:" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "Standardwinkel zwischen zwei aufeinander folgende Bindungen in einer Kette." + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "Standardpfeillänge (in pm genau wie Bindungslängen)." + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "Standardbindungslänge (pm)." + +#: ../glade/paint/preferences.glade.h:16 +msgid "Default padding in pixels added between consecutive objects during an alignment operation." +msgstr "Standardabstand in Pixel zwischen zwei aufeinanderfolgenden Objekten während einer Ausrichtungsoperation." + +#: ../glade/paint/preferences.glade.h:17 +msgid "Dist_ance:" +msgstr "Dist_anz:" + +#: ../glade/paint/preferences.glade.h:18 +#, fuzzy +msgid "Distance between hashes in pixels." +msgstr "Entfernung zwischen Strichkeilen in Pixel." + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "Abstand in Pixel zwischen zwei Linien einer Doppelbindung." + +#: ../glade/paint/preferences.glade.h:20 +msgid "Distance in pixels between two parallel lines (either two arrows or one arrow with two lines)." +msgstr "Abstand in Pixel zwischen zwei parallelen Linien (entweder zwei Pfeilen oder einem Pfeil mit zwei Linien)." + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "Abstand in Pixel von Spitze des Pfeilkopfes zum Zentrum." + +#: ../glade/paint/preferences.glade.h:22 +#, fuzzy +msgid "Distance in pixels from tip of arrowhead to trailing point, measured along shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:23 +#, fuzzy +msgid "Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:24 +msgid "Extra padding between a stoichiometric coefficient and its associated molecule in pixels." +msgstr "Zusätzlicher Abstand zwischen einem stöchiometrischen Koeffizienten und seinen zugehörigen Molekülen in Pixel." + +#: ../glade/paint/preferences.glade.h:25 +msgid "GChemPaint Preferences" +msgstr "GChemPaint Einstellungen" + +#: ../glade/paint/preferences.glade.h:26 +#, fuzzy +msgid "General _padding:" +msgstr "Allgemeiner Einbettungsabstand:" + +#: ../glade/paint/preferences.glade.h:27 +#, fuzzy +msgid "Ha_sh width:" +msgstr "Keildicke" + +#: ../glade/paint/preferences.glade.h:28 +msgid "Ha_ve a tearable table of the elements" +msgstr "abtrennbares Periodensystem der Elemente" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "Län_ge" + +#: ../glade/paint/preferences.glade.h:30 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "N_ame:" +msgstr "N_ame:" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "Abstand, der jedem Ende eines Pfeils hinzugefügt wird (in Pixel)." + +#: ../glade/paint/preferences.glade.h:32 +msgid "Padding between a '+' sign in a reaction equation and reactants symbols in pixels." +msgstr "Abstand zwischen einem Pluszeichen in einer Reaktionsgleichung und den Symbolen der Reaktanden in Pixel." + +#: ../glade/paint/preferences.glade.h:33 +msgid "Padding used around text objects such as atoms, texts and other typographic signs in pixels." +msgstr "Abstand um Textobjekte wie Atome, Textelemente und andere typographische Zeichen in Pixel." + +#: ../glade/paint/preferences.glade.h:34 +msgid "Scale used to convert real distance to canvas distance expressed in pm per pixel." +msgstr "Skalierung um die echte Distanz in pm pro Pixel auf der Zeichenfläche in umzuwandeln." + +#: ../glade/paint/preferences.glade.h:35 +#, fuzzy +msgid "Si_gn padding:" +msgstr "Zeicheneinbettungsabstand" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "Größe des Ladungszeichens in Pixel." + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "Stöchio_metrieabstand:" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "Brei_te" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "Breite in Pixel am größten Ende." + +#: ../glade/paint/preferences.glade.h:40 +#, fuzzy +msgid "Width of hashes in pixels." +msgstr "Dicke der Keile in Pixel." + +#: ../glade/paint/preferences.glade.h:41 +msgid "_Default theme:" +msgstr "Stan_dardthema" + +#: ../glade/paint/preferences.glade.h:42 +msgid "_Distance:" +msgstr "_Distanz:" + +#: ../glade/paint/preferences.glade.h:43 +#, fuzzy +msgid "_Object padding:" +msgstr "_Objekteinbettungsabstand:" + +#: ../glade/paint/preferences.glade.h:44 +#, fuzzy +msgid "_Padding:" +msgstr "Ein_bettungsabstand:" + +#: ../glade/paint/preferences.glade.h:45 +msgid "_Scale:" +msgstr "_Skalierung:" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "_Breite:" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "_Momentanes Element:" + +#: ../glade/paint/zoom.glade.h:1 +msgid "Zoom" +msgstr "Zoom" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "Zoomfaktor (%)" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr " basisch " + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr " neutral " + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr " amphoter " + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr " sauer " + #: ../glade/table/eltpage.glade.h:1 msgid "1:" msgstr "1:" @@ -402,7 +1063,8 @@ msgid "Radii" msgstr "Radien" -#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:133 +#: ../glade/table/eltpage.glade.h:16 +#: ../programs/table/gchemtable-elt.cc:130 msgid "Show curve" msgstr "Kurve zeigen" @@ -430,6 +1092,10 @@ msgid "Temperature (K):" msgstr "Temperatur (K):" +#: ../glade/table/curve.glade.h:1 +msgid "GChemTable Graph" +msgstr "GChemTable Graph" + #: ../glade/table/family.glade.h:1 msgid "" "All\n" @@ -458,6 +1124,22 @@ msgid "Selected Family:" msgstr "Gewählte Familie:" +#: ../glade/table/block.glade.h:1 +msgid " s block " +msgstr " s-Block " + +#: ../glade/table/block.glade.h:2 +msgid " d block " +msgstr " d-Block " + +#: ../glade/table/block.glade.h:3 +msgid " p block " +msgstr " p-Block " + +#: ../glade/table/block.glade.h:4 +msgid " f block " +msgstr " f-Block " + #: ../database/elements.xml.in.h:1 msgid "Actinium" msgstr "Actinium" @@ -934,419 +1616,2254 @@ msgid "tritium" msgstr "Tritium" -#: ../gcu/application.cc:181 +#: ../goffice/plugin.xml.in.h:1 +msgid "2D Chemical Structures Viewer/Editor" +msgstr "chemischer 2D Strukturenbetrachter/-editor" + +#: ../goffice/plugin.xml.in.h:2 +msgid "Chemical structures" +msgstr "chemische Strukturen" + +#: ../goffice/plugin.xml.in.h:3 +#, fuzzy +msgid "Chemical structures component engine" +msgstr "" + +#: ../goffice/plugin.xml.in.h:4 +#, fuzzy +msgid "Component : GChemPaint" +msgstr "Komponente : GChemPaint" + +#: ../goffice/gogcpapp.cc:183 +#: ../programs/paint/standaloneapp.cc:46 #, c-format -msgid "(screen resolution is %u)" -msgstr "(Bildschirmauflösung ist %u)" +msgid "Untitled %d" +msgstr "Unbenannt %d" -#: ../gcu/crystaldoc.cc:403 -msgid "Everything has been cleaved" -msgstr "Alles wurde gespalten" +#: ../goffice/gogcpwin.cc:88 +msgid "Embedded GChemPaint Object" +msgstr "Eingebettetes GChemPaint Objekt" + +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" +msgstr "Layout" + +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" +msgstr "Pango Layout" + +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" +msgstr "X" + +#: ../libs/canvas/gcp-canvas-pango.c:376 +msgid "X position" +msgstr "X Position" + +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" +msgstr "Y" + +#: ../libs/canvas/gcp-canvas-pango.c:384 +msgid "Y position" +msgstr "Y Position" + +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" +msgstr "Breite" + +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" +msgstr "Breite für Textkasten" + +#: ../libs/canvas/gcp-canvas-pango.c:399 +msgid "Height" +msgstr "Höhe" + +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "Höhe für Textkasten" + +#: ../libs/canvas/gcp-canvas-pango.c:407 +msgid "Anchor" +msgstr "Anker" + +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "Verweisanker für Text" + +#: ../libs/canvas/gcp-canvas-pango.c:416 +msgid "Color" +msgstr "Farbe" + +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" +msgstr "Textfarbe, als Zeichenkette" + +#: ../libs/canvas/gcp-canvas-pango.c:424 +msgid "Editing" +msgstr "Bearbeitung" + +#: ../libs/canvas/gcp-canvas-pango.c:425 +#, fuzzy +msgid "Is this rich text item currently edited?" +msgstr "Wird dieses Rich Text Segment momentan bearbeitet?" -#: ../gcu/dialog.cc:125 -msgid "Type a number" -msgstr "Geben Sie eine Zahl ein" +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 +#: ../programs/3d/window.cc:153 +#: ../programs/calc/gchemcalc.cc:335 +#: ../programs/crystal/window.cc:145 +#: ../programs/spectra/window.cc:146 +#: ../programs/table/gchemtable-app.cc:369 +msgid "translator_credits" +msgstr "" +"Christian Lohmaier \n" +"Daniel Leidert \n" +"Matthias Mailänder " -#: ../gcu/dialog.cc:134 -#, c-format -msgid "Type a number greater than or equal %g and lower than to %g" -msgstr "Geben Sie eine Zahl größer/gleich %g und kleiner %g ein" +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "GChemPaint ist ein 2D Formeleditor für Gnome" + +#: ../libs/gcp/about.cc:56 +msgid "Copyright © 2001-2008 by Jean Bréfort" +msgstr "Copyright © 2001-2008 Jean Bréfort" + +#: ../libs/gcp/application.cc:305 +msgid "Create a new reaction" +msgstr "Eine neue Reaktion erstellen" + +#: ../libs/gcp/application.cc:312 +msgid "Create a new mesomery relationship" +msgstr "Eine neue mesomere Beziehung erstellen" + +#: ../libs/gcp/application.cc:513 +#: ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" +"Bitte geben Sie einen Dateinamen ein,\n" +"kein Verzeichnis" -#: ../gcu/dialog.cc:144 +#: ../libs/gcp/application.cc:556 #, c-format -msgid "Type a number greater than %g and lower than or equal to %g" -msgstr "Geben Sie eine Zahl größer %g und kleiner/gleich %g ein" +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "" +"Entschuldigung, das Format %s wird nicht unterstützt.\n" +"Konnte %s nicht laden." -#: ../gcu/dialog.cc:154 +#: ../libs/gcp/application.cc:587 +#: ../libs/gcp/stringdlg.cc:118 +#: ../plugins/paint/wikipedia/wikipediatool.cc:93 +#: ../programs/3d/application.cc:171 +#: ../programs/calc/gchemcalc.cc:244 +#: ../programs/crystal/application.cc:217 +#: ../programs/spectra/application.cc:84 +#: ../programs/table/gchemtable-app.cc:684 #, c-format -msgid "Type a number between %g and %g, the limits are valid." +msgid "" +"File %s\n" +"exists, overwrite?" msgstr "" -"Geben Sie eine Zahl zwischen %g and %g ein (die Grenzen sind valide Werte)" +"Die Datei %s\n" +"existiert. Überschreiben?" -#: ../gcu/dialog.cc:164 +#: ../libs/gcp/application.cc:602 +#: ../libs/gcp/stringdlg.cc:134 +#: ../plugins/paint/wikipedia/wikipediatool.cc:107 +#: ../programs/crystal/application.cc:231 #, c-format -msgid "Type a number greater than %g and lower than %g" -msgstr "Geben Sie eine Zahl größer %g und kleiner %g ein" +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" +"Fehler beim Bearbeiten von %s:\n" +"%s" -#: ../gcu/dialog.cc:174 -#, c-format -msgid "Type a number lower than %g" -msgstr "Geben Sie eine Zahl kleiner %g ein" +#: ../libs/gcp/application.cc:811 +#: ../libs/gcp/application.cc:942 +msgid "No filename" +msgstr "Kein Dateiname" -#: ../gcu/dialog.cc:184 +#: ../libs/gcp/application.cc:814 #, c-format -msgid "Type a number greater than %g" -msgstr "Geben Sie eine Zahl größer %g ein" +msgid "" +"Could not open file\n" +"%s" +msgstr "Datei »%s« konnte nicht geöffnet werden" -#: ../gcu/dialog.cc:194 +#: ../libs/gcp/application.cc:817 +#: ../libs/gcp/application.cc:954 #, c-format -msgid "Type a number lower than or equal to %g" -msgstr "Geben Sie eine Zahl kleiner/gleich %g ein" +msgid "%s: parse error." +msgstr "»%s«: Parse-Fehler" -#: ../gcu/dialog.cc:204 +#: ../libs/gcp/application.cc:945 +#: ../programs/crystal/document.cc:329 #, c-format -msgid "Type a number greater than or equal to %g" -msgstr "Geben Sie eine Zahl größer/gleich %g ein" +msgid "" +"Could not load file\n" +"%s" +msgstr "" +"Datei konnte nicht geladen werden\n" +"%s" -#: ../gcu/element.cc:99 -msgid "German" -msgstr "Deutsch" +#: ../libs/gcp/application.cc:948 +#: ../programs/crystal/document.cc:332 +#, c-format +msgid "" +"%s: invalid xml file.\n" +"Tree is empty?" +msgstr "" +"%s: ungültige XML Datei.\n" +"Ist der Baum leer?" -#: ../gcu/element.cc:100 -msgid "French" -msgstr "Französisch" +#: ../libs/gcp/application.cc:951 +#: ../programs/crystal/document.cc:335 +#, c-format +msgid "%s: invalid file format." +msgstr "%s: ungültiges Dateiformat." -#: ../gcu/element.cc:101 -msgid "Italian" -msgstr "Italienisch" +#: ../libs/gcp/application.cc:988 +#: ../programs/3d/application.cc:254 +#: ../programs/calc/gchemcalc.cc:233 +#: ../programs/crystal/application.cc:114 +#: ../programs/spectra/application.cc:138 +#: ../programs/table/gchemtable-app.cc:672 +msgid "Save as image" +msgstr "Als Bild speichern" -#: ../gcu/element.cc:102 -msgid "Polish" -msgstr "Polnisch" +#: ../libs/gcp/atom.cc:1867 +#: ../libs/gcp/atom.cc:1881 +#: ../plugins/paint/atoms/plugin.cc:55 +#: ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "Atom" -#: ../gcu/element.cc:103 -msgid "Russian" -msgstr "Russisch" +#: ../libs/gcp/atom.cc:1870 +msgid "Display symbol" +msgstr "Symbol anzeigen" + +#: ../libs/gcp/atom.cc:1870 +msgid "Whether to display carbon atom symbol or not" +msgstr "Ob das Kohlenstoffatom angezeigt werden soll oder nicht." + +#: ../libs/gcp/bond.cc:999 +#: ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "Bindung" + +#: ../libs/gcp/bond.cc:1003 +msgid "Move to back" +msgstr "Ganz nach unten absenken" + +#: ../libs/gcp/bond.cc:1010 +msgid "Bring to front" +msgstr "Ganz nach oben anheben" + +#: ../libs/gcp/docprop.cc:118 +#: ../libs/gcp/docprop.cc:125 +#: ../programs/crystal/docprop.cc:109 +#: ../programs/crystal/docprop.cc:116 +msgid "%A, %B %d, %Y" +msgstr "%A, %d. %B %Y" -#: ../gcu/element.cc:106 -msgid "Can't find and read elements.xml" -msgstr "Kann elements.xml nicht finden/lesen." +#: ../libs/gcp/fontsel.cc:287 +#: ../programs/table/gchemtable-app.cc:154 +msgid "Family" +msgstr "Familie" -#: ../gcu/element.cc:111 ../gcu/element.cc:118 -msgid "Incorrect file format: elements.xml" -msgstr "Fehlerhaftes Dateiformat: elements.xml" +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "Schriftfamilie" + +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "Stil" + +#: ../libs/gcp/fontsel.cc:292 +#, fuzzy +msgid "The font style (normal, oblique or italic)" +msgstr "Der Schriftstil (normal, schräg oder kursiv)" + +#: ../libs/gcp/fontsel.cc:296 +msgid "Weight" +msgstr "Dicke" + +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "Die Schriftdicke" + +#: ../libs/gcp/fontsel.cc:301 +msgid "Variant" +msgstr "Variante" + +#: ../libs/gcp/fontsel.cc:302 +#, fuzzy +msgid "The font variant" +msgstr "Schriftvariante" + +#: ../libs/gcp/fontsel.cc:306 +msgid "Stretch" +msgstr "Streckung" + +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" +msgstr "Der Schriftabstand (eng, normal oder weit)" + +#: ../libs/gcp/fontsel.cc:311 +msgid "Size" +msgstr "Größe" + +#: ../libs/gcp/fontsel.cc:312 +#, fuzzy +msgid "The font size (in pango units)" +msgstr "Die Schriftgröße (in Pangoeinheiten)" + +#: ../libs/gcp/fragment.cc:732 +#: ../libs/gcp/fragment.cc:1329 +msgid "Invalid charge." +msgstr "Ungültige Ladung." + +#: ../libs/gcp/fragment.cc:1302 +msgid "Invalid symbol." +msgstr "Ungültiges Symbol." + +#: ../libs/gcp/mesomer.cc:76 +msgid "Only one arrow can link two given mesomers." +msgstr "Nur ein Pfeil kann zwei Mesomere miteinander verbinden." + +#: ../libs/gcp/mesomery.cc:153 +#: ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "Ein Fehler ist aufgetreten. Bitte senden Sie als Fehlerbericht melden" + +#: ../libs/gcp/mesomery.cc:191 +#: ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "Es gibt zwischen Molekül und Pfeil keinen Platz mehr!" + +#: ../libs/gcp/mesomery.cc:209 +#: ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "Isolierte Pfeile sind nicht erlaubt!" -#: ../gcu/element.cc:151 -msgid "English" -msgstr "Englisch" +#: ../libs/gcp/mesomery.cc:223 +#: ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." +msgstr "" +"Isoliertes Molekül!\n" +" Bitte fehlende(n) Pfeil(e) ergänzen." -#: ../gcu/element.cc:430 -msgid "Can't find and read radii.xml" -msgstr "Kann radii.xml nicht finden/lesen." +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "Bitte fehlende(n) Pfeil(e) ergänzen." + +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" +msgstr "Mesomere Beziehung zerstören" + +#: ../libs/gcp/molecule.cc:505 +msgid "Molecule" +msgstr "Molekül" + +#: ../libs/gcp/molecule.cc:511 +msgid "Export molecule to Ghemical" +msgstr "Exportiere Molekül zu Ghemical" + +#: ../libs/gcp/molecule.cc:518 +msgid "Generate InChI" +msgstr "InChI erstellen" + +#: ../libs/gcp/molecule.cc:523 +msgid "NIST WebBook page for this molecule" +msgstr "NIST WebBook Seite für dieses Molekül" + +#: ../libs/gcp/molecule.cc:528 +msgid "PubChem page for this molecule" +msgstr "PubChem Seite für dieses Molekül" + +#: ../libs/gcp/molecule.cc:534 +msgid "Generate SMILES" +msgstr "SMILES erzeugen" + +#: ../libs/gcp/molecule.cc:539 +msgid "Open in Calculator" +msgstr "Öffne im Rechner" + +#: ../libs/gcp/molecule.cc:547 +msgid "Select alignment item" +msgstr "Wähle Ausrichtungselement" + +#: ../libs/gcp/preferences.cc:387 +#: ../libs/gcp/preferences.cc:406 +#: ../libs/gcp/preferences.cc:535 +#: ../libs/gcp/theme.cc:341 +#: ../libs/gcp/theme.cc:348 +#: ../programs/table/gchemtable-app.cc:149 +msgid "Default" +msgstr "Standard" -#: ../gcu/element.cc:435 ../gcu/element.cc:446 -msgid "Incorrect file format: radii.xml" -msgstr "Fehlerhaftes Dateiformat: radii.xml" +#: ../libs/gcp/preferences.cc:427 +#: ../libs/gcp/preferences.cc:496 +#: ../libs/gcp/preferences.cc:563 +msgid "General" +msgstr "Allgemein" -#: ../gcu/element.cc:530 -msgid "Can't find and read elecprops.xml" -msgstr "Kann elecprops.xml nicht finden/lesen." +#: ../libs/gcp/preferences.cc:437 +#: ../libs/gcp/preferences.cc:511 +#: ../libs/gcp/preferences.cc:565 +msgid "Font" +msgstr "Schriftart" + +#: ../libs/gcp/preferences.cc:441 +#: ../libs/gcp/preferences.cc:515 +#: ../libs/gcp/preferences.cc:567 +msgid "Other" +msgstr "Andere" + +#: ../libs/gcp/preferences.cc:449 +#: ../libs/gcp/preferences.cc:523 +#: ../libs/gcp/preferences.cc:571 +msgid "Arrows" +msgstr "Pfeile" + +#: ../libs/gcp/preferences.cc:453 +#: ../libs/gcp/preferences.cc:527 +#: ../libs/gcp/preferences.cc:573 +#: ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "Text" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" +msgstr "Einen stöchiometrischen Koeffizient hinzufügen" + +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 +#: ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" +"Fehler: Konnte keine Reaktion aus\n" +"den gewählten Objekten erstellen." -#: ../gcu/element.cc:535 ../gcu/element.cc:540 -msgid "Incorrect file format: elecprops.xml" -msgstr "Fehlerhaftes Dateiformat: elecprops.xml" +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "Reaktion zerstören" + +#: ../libs/gcp/reaction-arrow.cc:381 +msgid "Arrow" +msgstr "Pfeil" + +#: ../libs/gcp/reaction-arrow.cc:387 +msgid "Attach selection to arrow..." +msgstr "Füge Auswahl zu Pfeil hinzu..." -#: ../gcu/element.cc:688 -msgid "Can't find and read isotopes.xml" -msgstr "Kann isotopes.xml nicht finden/lesen." +#: ../libs/gcp/reaction-prop.cc:39 +msgid "Unkown" +msgstr "Unbekannt" -#: ../gcu/element.cc:693 ../gcu/element.cc:700 -msgid "Incorrect file format: isotopes.xml" -msgstr "Fehlerhaftes Dateiformat: isotopes.xml" +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" +msgstr "Katalysator" + +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" +msgstr "Edukt" + +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "Produkt" + +#: ../libs/gcp/reaction-prop.cc:43 +msgid "Solvent" +msgstr "Lösemittel" + +#: ../libs/gcp/reaction-prop.cc:44 +msgid "Temperature" +msgstr "Temperatur" + +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" +msgstr "Druck" + +#: ../libs/gcp/reaction-prop.cc:46 +msgid "Time" +msgstr "Zeit" + +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" +msgstr "Enthalpie" -#: ../gcu/filechooser.cc:40 +#: ../libs/gcp/stringdlg.cc:79 +#: ../libs/gcu/filechooser.cc:45 msgid "Save as" msgstr "Speichern als" -#: ../gcu/filechooser.cc:40 -msgid "Open" -msgstr "Öffnen" - -#: ../gcu/filechooser.cc:59 -msgid "File _type:" -msgstr "Datei_typ:" - -#: ../gcu/filechooser.cc:61 -msgid "Automatic" -msgstr "Automatisch" - -#: ../gcu/formula.cc:391 ../gcu/formula.cc:429 -msgid "Unmatched parenthesis" -msgstr "Keine passende Klammer gefunden" - -#: ../gcu/formula.cc:417 -msgid "Could not interpret the symbol list" -msgstr "Synbolliste konnte nicht interpretiert werden" - -#: ../gcu/formula.cc:423 -msgid "Parser failed, please fill a bug report." -msgstr "Parser fehlgeschlagen, bitte senden Sie eine Fehlermeldung" - -#: ../gcu/formula.cc:431 -msgid "Invalid character" -msgstr "Ungültiges Zeichen" - -#: ../gcu/glview.cc:486 +#: ../libs/gcp/stringdlg.cc:150 #, c-format -msgid "Unable to save image file: %s\n" -msgstr "Bilddatei konnte nicht gespeichert werden: %s\n" - -#: ../gcu/gtkchem3dviewer.cc:154 -msgid "Background Color" -msgstr "Hintergrundfarbe" - -#: ../gcu/gtkchem3dviewer.cc:155 -msgid "Color used to paint the background" -msgstr "Eine andere Hintergrundfarbe wählen" +msgid "" +"Could not open file %s, error was:\n" +"%s" +msgstr "" +"Konnte in Datei %s nicht öffnen, Fehler war:\n" +"%s" -#: ../gcu/gtkperiodic.c:334 +#: ../libs/gcp/stringdlg.cc:168 #, c-format msgid "" -"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" -"p\n" +"Could not write to file %s, error was:\n" +"%s." msgstr "" -"Wert %d für Eigenschaft \"color-style\" außerhalb des gültgen Wertebereichs " -"für GtkPeriodic Instanz %p\n" - -#: ../programs/3d/application.cc:35 ../programs/3d/application.cc:46 -msgid "GChem3D Viewer" -msgstr "GChem3d Betrachter" - -#: ../programs/3d/application.cc:92 -msgid "Sorry, format not supported!" -msgstr "Entschuldigung, das Format wird nicht unterstützt." +"Konnte in Datei %s nicht schreiben, Fehler war:\n" +"%s" -#: ../programs/3d/application.cc:102 ../programs/crystal/application.cc:214 +#: ../libs/gcp/stringdlg.cc:184 #, c-format msgid "" -"File %s\n" -"exists, overwrite?" +"Could not close file %s, error was:\n" +"%s" msgstr "" -"Die Datei %s\n" -"existiert. Überschreiben?" - -#: ../programs/3d/application.cc:147 ../programs/crystal/application.cc:145 -msgid "Save as image" -msgstr "Als Bild speichern" +"Konnte Datei %s nicht schließen, Fehler war:\n" +"%s" -#: ../programs/3d/main.cc:40 -msgid "GChem3d Viewer version: " -msgstr "Version des Betrachters GChem3d: " +#: ../libs/gcp/text.cc:298 +#: ../libs/gcp/text.cc:304 +msgid "This should not have occured, please file a bug record." +msgstr "Das hätte nicht passieren sollen. Bitte einen Fehlerbericht abschicken." + +#: ../libs/gcp/theme.cc:454 +msgid "NewTheme1" +msgstr "NeuesThema1" -#: ../programs/3d/main.cc:51 -msgid "Prints GChem3d Viewer version" -msgstr "Gibt die Version des Betrachters GChem3D aus" +#: ../libs/gcp/theme.cc:458 +#, c-format +msgid "NewTheme%d" +msgstr "NeuesThema%d" -#: ../programs/3d/main.cc:52 -msgid "Background color: white, black or #rrggbb (default is black)" -msgstr "Hintergrundfarbe: weiß, schwarz oder #rrggbb (Standard ist schwarz)" +#: ../libs/gcp/theme.cc:559 +#: ../libs/gcp/theme.cc:563 +#: ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 +#: ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "Unbekannt" -#: ../programs/3d/main.cc:53 +#: ../libs/gcp/view.cc:1028 +#: ../programs/3d/application.cc:192 +#: ../programs/crystal/application.cc:277 +#, fuzzy, c-format msgid "" -"How molecules are displayed; possible values are BallnStick (the default) " -"and SpaceFill" +"Could not create stream!\n" +"%s" msgstr "" -"Wie Moleküle angezeigt werden; mögliche Werte sind BallnStick (Standard) und " -"Spacefill" - -#: ../programs/3d/main.cc:75 -msgid " [file]" -msgstr " [Datei]" +"Datenstrom konnte nicht erstellt werden!\n" +"%s" -#: ../programs/3d/main.cc:97 ../programs/crystal/main.cc:145 +#: ../libs/gcp/view.cc:1065 +#: ../libs/gcu/glview.cc:390 #, c-format -msgid "Invalid or misplaced argument: %s\n" -msgstr "Unbekanntes oder falsch gesetztes Argument: %s\n" +msgid "Unable to save image file: %s\n" +msgstr "Bilddatei konnte nicht gespeichert werden: %s\n" -#: ../programs/3d/window.cc:119 -msgid "GChem3D is a molecular structures viewer for Gnome" -msgstr "GChem3D ist ein Molekülbetrachter für GNOME" +#: ../libs/gcp/window.cc:281 +#: ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:280 +#: ../programs/spectra/window.cc:168 +#: ../programs/table/gchemtable-app.cc:140 +#: ../programs/table/gchemtable-curve.cc:228 +msgid "_File" +msgstr "_Datei" -#. const gchar * documentors[] = {NULL}; -#: ../programs/3d/window.cc:121 -msgid "Copyright © 2004-2007 Jean Bréfort\n" -msgstr "Copyright © 2004-2007 Jean Bréfort\n" +#: ../libs/gcp/window.cc:282 +#: ../programs/crystal/window.cc:281 +msgid "_New File" +msgstr "_Neue Datei" -#. Note to translators: replace the following string with the appropriate credits for you lang -#: ../programs/3d/window.cc:139 ../programs/calc/gchemcalc.cc:146 -#: ../programs/crystal/window.cc:120 ../programs/table/gchemtable-app.cc:122 -msgid "translator_credits" -msgstr "" -"Christian Lohmaier \n" -"Daniel Leidert " +#: ../libs/gcp/window.cc:283 +#: ../programs/crystal/window.cc:282 +msgid "Create a new file" +msgstr "Neue Datei erstellen" -#: ../programs/3d/window.cc:161 ../programs/calc/gchemcalc.cc:406 -#: ../programs/crystal/window.cc:247 ../programs/table/gchemtable-app.cc:141 -msgid "_File" -msgstr "_Datei" +#: ../libs/gcp/window.cc:284 +msgid "Ne_w File with Theme..." +msgstr "Ne_ue Datei mit Thema..." + +#: ../libs/gcp/window.cc:285 +#, fuzzy +msgid "Create a new file using a theme" +msgstr "Neue Datei mit einem Vorgabethema erstellen" -#: ../programs/3d/window.cc:162 ../programs/crystal/window.cc:250 +#: ../libs/gcp/window.cc:286 +#: ../programs/3d/window.cc:176 +#: ../programs/crystal/window.cc:283 +#: ../programs/spectra/window.cc:169 msgid "_Open..." msgstr "_Öffnen..." -#: ../programs/3d/window.cc:163 ../programs/crystal/window.cc:251 +#: ../libs/gcp/window.cc:287 +#: ../programs/3d/window.cc:177 +#: ../programs/crystal/window.cc:284 +#: ../programs/spectra/window.cc:170 msgid "Open a file" msgstr "Datei öffnen" -#: ../programs/3d/window.cc:164 ../programs/crystal/window.cc:256 +#: ../libs/gcp/window.cc:288 +#: ../programs/crystal/window.cc:285 +msgid "_Save" +msgstr "_Speichern" + +#: ../libs/gcp/window.cc:289 +#: ../programs/crystal/window.cc:286 +msgid "Save the current file" +msgstr "Aktuelle Datei speichern" + +#: ../libs/gcp/window.cc:290 +#: ../programs/crystal/window.cc:287 +msgid "Save _As..." +msgstr "Speichern _unter..." + +#: ../libs/gcp/window.cc:291 +#: ../programs/crystal/window.cc:288 +msgid "Save the current file with a different name" +msgstr "Akteulle Datei unter anderem Namen speichern" + +#: ../libs/gcp/window.cc:292 +#: ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:171 +#: ../programs/table/gchemtable-curve.cc:229 msgid "Save As _Image..." msgstr "Als _Bild speichern..." -#: ../programs/3d/window.cc:165 ../programs/crystal/window.cc:257 +#: ../libs/gcp/window.cc:293 +#: ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:629 +#: ../programs/crystal/window.cc:290 +#: ../programs/spectra/window.cc:172 +#: ../programs/table/gchemtable-curve.cc:230 msgid "Save the current file as an image" msgstr "Die aktuelle Datei als Bild speichern" -#: ../programs/3d/window.cc:166 ../programs/crystal/window.cc:258 +#: ../libs/gcp/window.cc:294 +#: ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:630 +#: ../programs/crystal/window.cc:291 +#: ../programs/spectra/window.cc:173 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "Page Set_up..." +msgstr "Seiteneigensc_haften" + +#: ../libs/gcp/window.cc:295 +#: ../programs/3d/window.cc:181 +#: ../programs/calc/gchemcalc.cc:631 +#: ../programs/crystal/window.cc:292 +#: ../programs/spectra/window.cc:174 +#: ../programs/table/gchemtable-curve.cc:232 +msgid "Setup the page settings for your current printer" +msgstr "Die Seite für den momentanen Drucker einrichten" + +#: ../libs/gcp/window.cc:296 +#: ../programs/3d/window.cc:182 +#: ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:175 +#: ../programs/table/gchemtable-curve.cc:233 +msgid "Print Pre_view" +msgstr "Druckvorschau" + +#: ../libs/gcp/window.cc:297 +#: ../programs/3d/window.cc:183 +#: ../programs/calc/gchemcalc.cc:633 +#: ../programs/crystal/window.cc:294 +#: ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:234 +msgid "Print preview" +msgstr "Druckvorschau" + +#: ../libs/gcp/window.cc:298 +#: ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:295 +#: ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:235 msgid "_Print..." msgstr "_Drucken..." -#: ../programs/3d/window.cc:167 -msgid "Print the current scene" -msgstr "Aktuelle Szenerie drucken" +#: ../libs/gcp/window.cc:299 +#: ../programs/calc/gchemcalc.cc:635 +#: ../programs/crystal/window.cc:296 +#: ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:236 +msgid "Print the current file" +msgstr "Aktuelle Datei drucken" -#: ../programs/3d/window.cc:168 ../programs/crystal/window.cc:260 +#: ../libs/gcp/window.cc:300 +#: ../programs/crystal/window.cc:297 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "Prope_rties..." +msgstr "_Eigenschaften..." + +#: ../libs/gcp/window.cc:301 +#: ../programs/crystal/window.cc:298 +msgid "Modify the file's properties" +msgstr "Die Dateieigenschaften bearbeiten" + +#: ../libs/gcp/window.cc:302 +#: ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:299 +#: ../programs/spectra/window.cc:179 +#: ../programs/table/gchemtable-curve.cc:239 msgid "_Close" msgstr "_Schließen" -#: ../programs/3d/window.cc:169 ../programs/crystal/window.cc:261 +#: ../libs/gcp/window.cc:303 +#: ../programs/3d/window.cc:187 +#: ../programs/crystal/window.cc:300 +#: ../programs/spectra/window.cc:180 +#: ../programs/table/gchemtable-curve.cc:240 msgid "Close the current file" msgstr "Aktuelle Datei schließen" -#: ../programs/3d/window.cc:170 ../programs/calc/gchemcalc.cc:407 -#: ../programs/crystal/window.cc:262 ../programs/table/gchemtable-app.cc:142 +#: ../libs/gcp/window.cc:304 +#: ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:636 +#: ../programs/crystal/window.cc:301 +#: ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-curve.cc:241 msgid "_Quit" msgstr "_Beenden" -#: ../programs/3d/window.cc:171 -msgid "Quit GChem3D" -msgstr "GChem3D beenden" +#: ../libs/gcp/window.cc:305 +msgid "Quit GChemPaint" +msgstr "GChemPaint beenden" + +#: ../libs/gcp/window.cc:306 +#: ../programs/calc/gchemcalc.cc:638 +#: ../programs/crystal/window.cc:303 +#: ../programs/spectra/window.cc:183 +#: ../programs/table/gchemtable-curve.cc:243 +msgid "_Edit" +msgstr "_Bearbeiten" -#: ../programs/3d/window.cc:172 ../programs/crystal/window.cc:278 -#: ../programs/table/gchemtable-app.cc:144 +#: ../libs/gcp/window.cc:307 +msgid "_Undo" +msgstr "_Rückgängig" + +#: ../libs/gcp/window.cc:308 +msgid "Undo the last action" +msgstr "Die letzte Aktion rückgängig machen" + +#: ../libs/gcp/window.cc:309 +msgid "_Redo" +msgstr "_Wiederherstellen" + +#: ../libs/gcp/window.cc:310 +msgid "Redo the undone action" +msgstr "Den rückgängig gemachten Vorgang wiederholen" + +#: ../libs/gcp/window.cc:311 +msgid "Cu_t" +msgstr "_Ausschneiden" + +#: ../libs/gcp/window.cc:312 +msgid "Cut the selection" +msgstr "Die markierte Auswahlausschneiden" + +#: ../libs/gcp/window.cc:313 +#: ../programs/calc/gchemcalc.cc:639 +#: ../programs/spectra/window.cc:184 +#: ../programs/table/gchemtable-curve.cc:244 +msgid "_Copy" +msgstr "_Kopieren" + +#: ../libs/gcp/window.cc:314 +#: ../programs/calc/gchemcalc.cc:640 +#: ../programs/spectra/window.cc:185 +#: ../programs/table/gchemtable-curve.cc:245 +msgid "Copy the selection" +msgstr "Die markierte Auswahlkopieren" + +#: ../libs/gcp/window.cc:315 +msgid "_Paste" +msgstr "E_infügen" + +#: ../libs/gcp/window.cc:316 +msgid "Paste the clipboard" +msgstr "Den Inhalt der Zwischenablage einfügen" + +#: ../libs/gcp/window.cc:317 +msgid "C_lear" +msgstr "_Löschen" + +#: ../libs/gcp/window.cc:318 +msgid "Clear the selection" +msgstr "Die markierte Auswahl löschen" + +#: ../libs/gcp/window.cc:319 +msgid "Select _All" +msgstr "Alles _markieren" + +#: ../libs/gcp/window.cc:320 +msgid "Select everything" +msgstr "Alles markieren/auswählen" + +#: ../libs/gcp/window.cc:321 +msgid "Pr_eferences..." +msgstr "_Einstellungen..." + +#: ../libs/gcp/window.cc:322 +#: ../programs/crystal/window.cc:305 +msgid "Configure the application" +msgstr "Programm konfigurieren" + +#: ../libs/gcp/window.cc:323 +#: ../programs/3d/window.cc:190 +#: ../programs/crystal/window.cc:317 +#: ../programs/table/gchemtable-app.cc:145 msgid "_View" msgstr "_Ansicht" -#: ../programs/3d/window.cc:173 ../programs/calc/gchemcalc.cc:409 -#: ../programs/crystal/window.cc:286 ../programs/table/gchemtable-app.cc:159 +#: ../libs/gcp/window.cc:324 +msgid "_Zoom" +msgstr "_Zoom" + +#: ../libs/gcp/window.cc:325 +msgid "_400%" +msgstr "_400%" + +#: ../libs/gcp/window.cc:326 +msgid "Zoom to 400%" +msgstr "Auf 400% vergrößern" + +#: ../libs/gcp/window.cc:327 +msgid "_300%" +msgstr "_300%" + +#: ../libs/gcp/window.cc:328 +msgid "Zoom to 300%" +msgstr "Auf 300% vergrößern" + +#: ../libs/gcp/window.cc:329 +msgid "_200%" +msgstr "_200%" + +#: ../libs/gcp/window.cc:330 +msgid "Zoom to 200%" +msgstr "Auf 200% vergrößern" + +#: ../libs/gcp/window.cc:331 +msgid "150%" +msgstr "150%" + +#: ../libs/gcp/window.cc:332 +msgid "Zoom to 150%" +msgstr "Auf 150% vergrößern" + +#: ../libs/gcp/window.cc:333 +msgid "_100%" +msgstr "_100%" + +#: ../libs/gcp/window.cc:334 +msgid "Zoom to 100%" +msgstr "Auf 100% vergrößern" + +#: ../libs/gcp/window.cc:335 +msgid "_75%" +msgstr "_75%" + +#: ../libs/gcp/window.cc:336 +msgid "Zoom to 75%" +msgstr "Auf 75% vergrößern" + +#: ../libs/gcp/window.cc:337 +msgid "_50%" +msgstr "_50%" + +#: ../libs/gcp/window.cc:338 +msgid "Zoom to 50%" +msgstr "Auf 50% vergrößern" + +#: ../libs/gcp/window.cc:339 +msgid "25%" +msgstr "25%" + +#: ../libs/gcp/window.cc:340 +msgid "Zoom to 25%" +msgstr "Auf 25% vergrößern" + +#: ../libs/gcp/window.cc:341 +msgid "_Zoom to...%" +msgstr "_Auf ...% vergrößern" + +#: ../libs/gcp/window.cc:342 +msgid "Open Zoom Dialog Box" +msgstr "Zoom-Dialog-Box öffnen" + +#: ../libs/gcp/window.cc:343 +msgid "_Tools" +msgstr "_Werkzeuge" + +#: ../libs/gcp/window.cc:344 +#: ../programs/crystal/window.cc:320 +msgid "_Windows" +msgstr "_Fenster" + +#: ../libs/gcp/window.cc:345 +#: ../programs/3d/window.cc:191 +#: ../programs/calc/gchemcalc.cc:642 +#: ../programs/crystal/window.cc:325 +#: ../programs/spectra/window.cc:186 +#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:246 +#: ../programs/table/gchemtable-curve.cc:249 msgid "_Help" msgstr "_Hilfe" -#: ../programs/3d/window.cc:174 ../programs/calc/gchemcalc.cc:410 -#: ../programs/crystal/window.cc:287 ../programs/table/gchemtable-app.cc:160 +#: ../libs/gcp/window.cc:346 +#: ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:643 +#: ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:247 msgid "_Contents" msgstr "_Inhalt" -#: ../programs/3d/window.cc:175 +#: ../libs/gcp/window.cc:347 +msgid "View help for GChemPaint" +msgstr "Hilfe zu GChemPaint anschauen" + +#: ../libs/gcp/window.cc:348 +msgid "GChemPaint on the _web" +msgstr "GChemPaint im _Internet" + +#: ../libs/gcp/window.cc:349 +msgid "Browse GChemPaint's web site" +msgstr "Die GChemPaint Homepage besuchen" + +#: ../libs/gcp/window.cc:350 +#: ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:647 +#: ../programs/crystal/window.cc:330 +#: ../programs/spectra/window.cc:191 +#: ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:253 +msgid "Live assistance" +msgstr "Echtzeitunterstützung" + +#: ../libs/gcp/window.cc:351 +#: ../programs/3d/window.cc:197 +#: ../programs/calc/gchemcalc.cc:648 +#: ../programs/crystal/window.cc:331 +#: ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:254 +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "Den Gnome Chemistry Utils IRC-Kanal öffnen" + +#: ../libs/gcp/window.cc:352 +#: ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:649 +#: ../programs/crystal/window.cc:332 +#: ../programs/spectra/window.cc:193 +#: ../programs/table/gchemtable-app.cc:176 +#: ../programs/table/gchemtable-curve.cc:255 +msgid "_Ask a question" +msgstr "Fr_age stellen" + +#: ../libs/gcp/window.cc:353 +msgid "Ask a question about GChemPaint" +msgstr "Eine Frage zu GChemPaint stellen" + +#: ../libs/gcp/window.cc:354 +#: ../programs/3d/window.cc:200 +#: ../programs/calc/gchemcalc.cc:651 +#: ../programs/crystal/window.cc:334 +#: ../programs/spectra/window.cc:195 +#: ../programs/table/gchemtable-app.cc:178 +#: ../programs/table/gchemtable-curve.cc:257 +msgid "Report _Bugs" +msgstr "_Fehler melden" + +#: ../libs/gcp/window.cc:355 +msgid "Submit a bug report for GChemPaint" +msgstr "Einen Fehlerbericht zu GChemPaint senden" + +#: ../libs/gcp/window.cc:356 +#: ../programs/3d/window.cc:202 +#: ../programs/calc/gchemcalc.cc:653 +#: ../programs/crystal/window.cc:336 +#: ../programs/spectra/window.cc:197 +#: ../programs/table/gchemtable-app.cc:180 +#: ../programs/table/gchemtable-curve.cc:259 +msgid "_About" +msgstr "_Über" + +#: ../libs/gcp/window.cc:357 +msgid "About GChemPaint" +msgstr "Über GChemPaint" + +#: ../libs/gcp/window.cc:500 +msgid "Open _recent" +msgstr "Zuletzte verwendete öffnen" + +#: ../libs/gcp/window.cc:524 +#: ../programs/crystal/window.cc:459 +msgid "Ready" +msgstr "Bereit" + +#: ../libs/gcp/window.cc:692 +msgid "GChemPaint" +msgstr "GChemPaint" + +#: ../libs/gcp/window.cc:709 +#: ../programs/crystal/document.cc:754 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "\"%s\" wurde geändert. Wollen Sie die Datei speichern?" + +#: ../libs/gcu/application.cc:198 +#, c-format +msgid "(screen resolution is %u)" +msgstr "(Bildschirmauflösung ist %u)" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "Alles wurde gespalten" + +#: ../libs/gcu/dialog.cc:135 +msgid "Type a number" +msgstr "Geben Sie eine Zahl ein" + +#: ../libs/gcu/dialog.cc:144 +#, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "Geben Sie eine Zahl größer/gleich %g und kleiner %g ein" + +#: ../libs/gcu/dialog.cc:154 +#, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "Geben Sie eine Zahl größer %g und kleiner/gleich %g ein" + +#: ../libs/gcu/dialog.cc:164 +#, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "Geben Sie eine Zahl zwischen %g and %g ein (die Grenzen sind valide Werte)" + +#: ../libs/gcu/dialog.cc:174 +#, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "Geben Sie eine Zahl größer %g und kleiner %g ein" + +#: ../libs/gcu/dialog.cc:184 +#, c-format +msgid "Type a number lower than %g" +msgstr "Geben Sie eine Zahl kleiner %g ein" + +#: ../libs/gcu/dialog.cc:194 +#, c-format +msgid "Type a number greater than %g" +msgstr "Geben Sie eine Zahl größer %g ein" + +#: ../libs/gcu/dialog.cc:204 +#, c-format +msgid "Type a number lower than or equal to %g" +msgstr "Geben Sie eine Zahl kleiner/gleich %g ein" + +#: ../libs/gcu/dialog.cc:214 +#, c-format +msgid "Type a number greater than or equal to %g" +msgstr "Geben Sie eine Zahl größer/gleich %g ein" + +#: ../libs/gcu/element.cc:99 +msgid "German" +msgstr "Deutsch" + +#: ../libs/gcu/element.cc:100 +msgid "French" +msgstr "Französisch" + +#: ../libs/gcu/element.cc:101 +msgid "Italian" +msgstr "Italienisch" + +#: ../libs/gcu/element.cc:102 +msgid "Polish" +msgstr "Polnisch" + +#: ../libs/gcu/element.cc:103 +msgid "Brazilian" +msgstr "Brasilianisch" + +#: ../libs/gcu/element.cc:104 +msgid "Russian" +msgstr "Russisch" + +#: ../libs/gcu/element.cc:106 +msgid "Can't find and read elements.xml" +msgstr "Kann elements.xml nicht finden/lesen." + +#: ../libs/gcu/element.cc:112 +#: ../libs/gcu/element.cc:121 +msgid "Incorrect file format: elements.xml" +msgstr "Fehlerhaftes Dateiformat: elements.xml" + +#: ../libs/gcu/element.cc:157 +msgid "English" +msgstr "Englisch" + +#: ../libs/gcu/element.cc:409 +msgid "Can't find and read radii.xml" +msgstr "Kann radii.xml nicht finden/lesen." + +#: ../libs/gcu/element.cc:415 +#: ../libs/gcu/element.cc:428 +msgid "Incorrect file format: radii.xml" +msgstr "Fehlerhaftes Dateiformat: radii.xml" + +#: ../libs/gcu/element.cc:516 +msgid "Can't find and read elecprops.xml" +msgstr "Kann elecprops.xml nicht finden/lesen." + +#: ../libs/gcu/element.cc:522 +#: ../libs/gcu/element.cc:529 +msgid "Incorrect file format: elecprops.xml" +msgstr "Fehlerhaftes Dateiformat: elecprops.xml" + +#: ../libs/gcu/element.cc:678 +msgid "Can't find and read isotopes.xml" +msgstr "Kann isotopes.xml nicht finden/lesen." + +#: ../libs/gcu/element.cc:684 +#: ../libs/gcu/element.cc:693 +msgid "Incorrect file format: isotopes.xml" +msgstr "Fehlerhaftes Dateiformat: isotopes.xml" + +#: ../libs/gcu/filechooser.cc:45 +msgid "Open" +msgstr "Öffnen" + +#: ../libs/gcu/filechooser.cc:64 +msgid "File _type:" +msgstr "Datei_typ:" + +#: ../libs/gcu/filechooser.cc:66 +msgid "Automatic" +msgstr "Automatisch" + +#: ../libs/gcu/formula.cc:512 +#: ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "Keine passende Klammer gefunden" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "Synbolliste konnte nicht interpretiert werden" + +#: ../libs/gcu/formula.cc:546 +msgid "Parser failed, please fill a bug report." +msgstr "Parser fehlgeschlagen, bitte senden Sie eine Fehlermeldung" + +#: ../libs/gcu/formula.cc:554 +msgid "Invalid character" +msgstr "Ungültiges Zeichen" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +msgid "Background Color" +msgstr "Hintergrundfarbe" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "Eine andere Hintergrundfarbe wählen" + +#: ../libs/gcu/gtkperiodic.c:331 +#, c-format +msgid "Out of range value %d for property \"color-style\" for GtkPeriodic instance %p\n" +msgstr "Wert %d für Eigenschaft \"color-style\" außerhalb des gültgen Wertebereichs für GtkPeriodic Instanz %p\n" + +#: ../libs/gcu/loader.cc:113 +#, fuzzy +msgid "Chemical file loader type." +msgstr "Chemischer Dateiladertyp." + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, fuzzy, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "%.1f %s breit und %.1f %s hoch" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, fuzzy, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "%.0f %s breit und %.0f %s hoch" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "Pixel" + +#: ../libs/gcu/printable.cc:35 +msgid "points" +msgstr "Punkte" + +#: ../libs/gcu/printable.cc:36 +msgid "inches" +msgstr "Zoll" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "mm" + +#: ../libs/gcu/spectrumdoc.cc:254 +msgid "Wavenumber (1/cm)" +msgstr "Wellenzahl (1/cm)" + +#: ../libs/gcu/spectrumdoc.cc:255 +#: ../libs/gcu/spectrumdoc.cc:1359 +msgid "Transmittance" +msgstr "Transmission" + +#: ../libs/gcu/spectrumdoc.cc:256 +#: ../libs/gcu/spectrumdoc.cc:1358 +msgid "Absorbance" +msgstr "Absorption" + +#: ../libs/gcu/spectrumdoc.cc:257 +#: ../libs/gcu/spectrumdoc.cc:1294 +msgid "Chemical shift (ppm)" +msgstr "Chemische Verschiebung (ppm)" + +#: ../libs/gcu/spectrumdoc.cc:258 +msgid "Wavelength (nm)" +msgstr "Wellenlänge (nm)" + +#: ../libs/gcu/spectrumdoc.cc:259 +msgid "Wavelength (µm)" +msgstr "Wellenlänge (µm)" + +#: ../libs/gcu/spectrumdoc.cc:260 +msgid "Time (s)" +msgstr "Zeit (s)" + +#: ../libs/gcu/spectrumdoc.cc:261 +#: ../libs/gcu/spectrumdoc.cc:1295 +msgid "Frequency (Hz)" +msgstr "Frequenz (Hz)" + +#: ../libs/gcu/spectrumdoc.cc:262 +msgid "Mass/charge ratio" +msgstr "Masse/Ladung-Verhältnis" + +#: ../libs/gcu/spectrumdoc.cc:263 +msgid "Relative abundance" +msgstr "Relative Isotopenhäufigkeit" + +#: ../libs/gcu/spectrumdoc.cc:633 +#: ../libs/gcu/spectrumdoc.cc:1301 +msgid "Show integral" +msgstr "Zeige Integral" + +#: ../libs/gcu/spectrumdoc.cc:633 +msgid "Hide integral" +msgstr "Verberge Integral" + +#: ../libs/gcu/spectrumdoc.cc:723 +#: ../libs/gcu/spectrumdoc.cc:1631 +msgid "Found too many data!" +msgstr "Zuviel Daten gefunden!" + +#: ../libs/gcu/spectrumdoc.cc:1291 +#: ../libs/gcu/spectrumdoc.cc:1338 +msgid "X unit:" +msgstr "X Einheit:" + +#: ../libs/gcu/spectrumdoc.cc:1342 +msgid "Wave length (nm)" +msgstr "Wellenlänge (nm)" + +#: ../libs/gcu/spectrumdoc.cc:1344 +msgid "Wave length (µm)" +msgstr "Wellenlänge (µm)" + +#: ../libs/gcu/spectrumdoc.cc:1345 +msgid "Wave number (1/cm)" +msgstr "Wellenzahl (1/cm)" + +#: ../libs/gcu/spectrumdoc.cc:1350 +msgid "Invert X Axis" +msgstr "X-Achse invertieren" + +#: ../libs/gcu/spectrumdoc.cc:1355 +msgid "Y unit:" +msgstr "Y Einheit:" + +#: ../libs/gcu/spectrumdoc.cc:1526 +#: ../libs/gcu/spectrumdoc.cc:1556 +msgid "Constant too long" +msgstr " Konstante zu lang" + +#: ../libs/gcu/spectrumdoc.cc:1549 +msgid "Invalid character in data block" +msgstr "ungültiges Zeichen im Datenblock" + +#: ../libs/gcu/spectrumdoc.cc:1653 +msgid "Data check failed!" +msgstr "Datenüberprüfung fehlgeschlagen!" + +#: ../libs/gcu/spectrumdoc.cc:1670 +msgid "Data check failed: FIRSTX!" +msgstr "Datenüberprüfung fehlgeschlagen: FIRSTX!" + +#: ../libs/gcu/spectrumdoc.cc:1675 +msgid "Data check failed: FIRSTY!" +msgstr "Datenüberprüfung fehlgeschlagen: FIRSTY!" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1679 +msgid "Found too many data" +msgstr "Zuviel Daten gefunden" + +#: ../libs/gcu/spectrumdoc.cc:1990 +msgid "Integral" +msgstr "Integral" + +#: ../libs/gcu/spectrumdoc.cc:2111 +#, fuzzy +msgid "Real transformed data" +msgstr "Real transformierte Daten" + +#: ../libs/gcu/spectrumdoc.cc:2128 +#, fuzzy +msgid "Imaginary transformed data" +msgstr "Imaginär transformierte Daten" + +#: ../libs/gcu/spectrumview.cc:91 +msgid "Minimum X value:" +msgstr "Minimaler X-Wert:" + +#: ../libs/gcu/spectrumview.cc:96 +msgid "Maximum X value:" +msgstr "Maximaler X-Wert:" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "Versuch zwei Werte mit unterschiedlichen Einheiten hinzuzufügen." + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:503 +#: ../plugins/loaders/cdx/cdx.cc:507 +#: ../plugins/loaders/cdx/cdx.cc:632 +#: ../plugins/loaders/cdx/cdx.cc:637 +msgid "Unsupported feature, please report!" +msgstr "Nicht unterstütze Funktion, bitte melden!" + +#: ../plugins/loaders/cdx/cdx.cc:594 +#: ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "fehlgeschlagen für %s\n" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "Lader für binäres ChemDraw (CDX) Format" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "Lader für binäres ChemDraw (CDX) Format." + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "Lader : cdx" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 +#: ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "'%s' ist defekt!" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "Lader für ChemDraw XML-Dateien" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "Lader für ChemDraw XML-Dateien." + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "Lader : cdxml" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:177 +#: ../plugins/paint/bonds/bondtool.cc:295 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "Ausrichtung: %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "Pfeillän_ge" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +msgid "H_alf heads" +msgstr "H_albe Pfeilspitzen" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +msgid "Set _default" +msgstr "Standard setzen" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "ausge_füllte Köpfe" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "If set to true, arrows for reversible reaction steps will use full arrows heads by default instead of half heads." +msgstr "Falls auf wahr gesetzt, werden die Pfeile für reversible Reaktionen standardmäßig ganze Pfeilspitzen anstatt halbe Pfeilspitzen verwenden." + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +msgid "Use full arrows heads for reversible reactions" +msgstr "Benutze ausgefüllte Pfeilköpfe für reversible Reaktionen" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "Einen neuen Retrosyntheseweg erstellen" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "Einfacher Pfeil" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "Einen Pfeil für einee irreversible Reaktion hinzufügen" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "Gleichgewichtspfeil" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "Ein Pfeilpaar für eine reversible Reaktion hinzufügen" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "Retrosynthesepfeil" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "Einen Pfeil für einen Retrosyntheseschritt hinzufügen" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "Mesomeriepfeil" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "Einen doppelköpfigen Pfeil hinzufügen um Mesomerie darzustellen" + +#: ../plugins/paint/arrows/plugin.cc:92 +msgid "Electron pair move arrow" +msgstr "Elektronenpaar-Verschiebepfeil" + +#: ../plugins/paint/arrows/plugin.cc:93 +msgid "Add a curved arrow to represent an electron pair move" +msgstr "Einen gekrümmten Pfeil zur Darstellung einer Elektronenpaarverschiebung hinzufügen" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "Verschiebepfeil für ein einzelnes Elektron" + +#: ../plugins/paint/arrows/plugin.cc:96 +msgid "Add a curved arrow to represent an single electron move" +msgstr "Einen gekrümmten Pfeil zur Darstellung der Verschiebung eines einzelnen Elektrons hinzufügen" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "Kein Zielmolekül!" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "Mehrere Zielmoleküle oder fehlende Pfeile." + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "Entschuldigung, zyklische Retrosynthesepfade werden nicht unterstützt." + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "Retrosyntheseweg zerstören" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "Nur ein Pfeil kann zwei Stufen miteinander verbinden." + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "Ein Atom hinzufügen oder ändern" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "Positive Ladung" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "Die Ladung eines Atoms erhöhen" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "Negative Ladung" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "Die Ladung eines Atoms reduzieren" + +#: ../plugins/paint/atoms/plugin.cc:64 +msgid "Electron Pair" +msgstr "Elektronenpaar" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "Ein Elektronenpaar zu einem Atom hinzufügen" + +#: ../plugins/paint/atoms/plugin.cc:67 +msgid "Unpaired Electron" +msgstr "Ungepaartes Elektron" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "Ein ungepaartes Elektron zu einem Atom hinzufügen" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "Eigenschaft" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "Wert:" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "Winkel zwischen zwei neuen Bindungen in einer offenen Kette" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "Bindungs_winkel" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "Bindungslän_ge:" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "Standardlänge für neue Bindungen" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "Existierende Atome für das Ende der Bindungen verwenden" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "_Mit existierenden Atomen zusammenführen" + +#: ../plugins/paint/bonds/bondtool.cc:423 +msgid "Invalid document tree, please file a bug report" +msgstr "Ungültiger Dokumentbaum, bitte als Fehlerbericht melden" + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "Automatisch" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "Bindungs_nummer:" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "If set, the number of new bonds will be evaluated from the mouse position" +msgstr "Falls gesetzt wird die Anzahl neuer Bindungen von der Mausposition festgelegt" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "Anzahl neuer Bindungen" + +#: ../plugins/paint/bonds/chaintool.cc:128 +#: ../plugins/paint/bonds/chaintool.cc:250 +#, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "Bindung: %d, Ausrichtung: %g" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "Eine Bindung hinzufügen oder die Wertigkeit einer bestehenden Bindung ändern" + +#: ../plugins/paint/bonds/plugin.cc:59 +msgid "Chain" +msgstr "Kette" + +#: ../plugins/paint/bonds/plugin.cc:60 +msgid "Add a chain" +msgstr "Eine Kette hinzufügen" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "Werkzeug für stereospezifische Bindungen" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "Eine stereospezifische Bindung hinzufügen" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "Werkzeug für gestrichelte Bindungen" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "Eine gestrichelte Bindung hinzufügen" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "Werkzeug für racemische Bindungen" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "Eine racemische Bindung hinzufügen" + +#: ../plugins/paint/bonds/plugin.cc:71 +#, fuzzy +msgid "Fore bond tool" +msgstr "Werkzeug für gestrichelte Bindungen" + +#: ../plugins/paint/bonds/plugin.cc:72 +#, fuzzy +msgid "Add a fore bond" +msgstr "Eine gestrichelte Bindung hinzufügen" + +#: ../plugins/paint/bonds/plugin.cc:74 +msgid "Delocalized bond tool" +msgstr "Werkzeug für delokalisierte Bindungen" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "Ein delokalisiertes Bindungssystem hinzufügen" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +msgid "Cycle _Size" +msgstr "Ring_größe" + +#: ../plugins/paint/cycles/plugin.cc:54 +msgid "Three atoms cycle" +msgstr "Cyclopropan" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "Einen Ring mit 3 Atomen hinzufügen" + +#: ../plugins/paint/cycles/plugin.cc:57 +msgid "Four atoms cycle" +msgstr "Cyclobutan" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "Einen Ring mit 4 Atomen hinzufügen" + +#: ../plugins/paint/cycles/plugin.cc:60 +msgid "Five atoms cycle" +msgstr "Cyclopentan" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "Einen Ring mit 5 Atomen hinzufügen" + +#: ../plugins/paint/cycles/plugin.cc:63 +msgid "Six atoms cycle" +msgstr "Cyclohexan" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "Einen Ring mit 6 Atomen hinzufügen" + +#: ../plugins/paint/cycles/plugin.cc:66 +msgid "Seven atoms cycle" +msgstr "Cycloheptan" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "Einen Ring mit 7 Atomen hinzufügen" + +#: ../plugins/paint/cycles/plugin.cc:69 +msgid "Eight atoms cycle" +msgstr "Cyclooctan" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "Einen Ring mit 8 Atomen hinzufügen" + +#: ../plugins/paint/cycles/plugin.cc:72 +msgid "Variable sized cycle" +msgstr "Zeichnet Ring mit variabler Anzahl von Ringgliedern" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "Einen Ring hinzufügen" + +#: ../plugins/paint/residues/plugin.cc:104 +#, fuzzy +msgid "_Edit residues..." +msgstr "Reste b_earbeiten..." + +#: ../plugins/paint/residues/plugin.cc:105 +msgid "Create new abbreviations" +msgstr "Eine neue Abkürzung erstellen" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +msgid "Please, provide only one molecule." +msgstr "Bitte nur ein Molekül angeben" + +#: ../plugins/paint/residues/residues-dlg.cc:232 +#, fuzzy +msgid "Please, provide a name for the residue" +msgstr "Bitte geben Sie einen Namen für den Rest ein" + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "Symbole mit mehr als acht Zeichen sind nicht erlaubt." + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:4 +msgid "New" +msgstr "Neu" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +msgid "\"New\" is not a valid symbol" +msgstr "\"New\" ist kein gültiges Symbol" + +#: ../plugins/paint/residues/residues-dlg.cc:265 +msgid "Please provide at least one symbol" +msgstr "Bitte mit mindestens einem Symbol versehen" + +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "%s wird bereits bei einem anderen Rest verwendet" + +#: ../plugins/paint/residues/residues-dlg.cc:287 +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "" +"Leere Formel, dies sollte niemals passieren.\n" +"Bitte Fehlerbericht abschicken" + +#: ../plugins/paint/residues/residues.glade.h:1 +msgid "Formula" +msgstr "Formel" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "Identität" + +#: ../plugins/paint/residues/residues.glade.h:5 +#, fuzzy +msgid "Residues" +msgstr "Reste" + +#: ../plugins/paint/residues/residues.glade.h:6 +msgid "_Generic" +msgstr "All_gemein" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "_Symbol(e):" + +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-delete" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-save" +msgstr "" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "Gruppeneigenschaften..." + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "A_nordnen" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "Abstand:" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "Ausgewählte Objekte gruppieren und/oder anordnen" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" +"Normal\n" +"Oben\n" +"Halbe Höhe\n" +"Unten\n" +"Links\n" +"Mitte\n" +"Rechts" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "_Gruppieren" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "_Gleichmäßig verteilen" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "Auswählen" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "Ein oder mehrere Objekte auswählen" + +#: ../plugins/paint/selection/plugin.cc:67 +#: ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "Löschen" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "Radierer" + +#: ../plugins/paint/selection/selectiontool.cc:371 +msgid "Creation failed!" +msgstr "Erzeugung fehlgeschlagen!" + +#: ../plugins/paint/selection/selectiontool.cc:400 +msgid "Group and/or align objects" +msgstr "Objekte gruppieren und/oder ausrichten" + +#: ../plugins/paint/selection/selectiontool.cc:438 +msgid "Horizontal flip" +msgstr "Horizontal spiegeln" + +#: ../plugins/paint/selection/selectiontool.cc:439 +msgid "Flip the selection horizontally" +msgstr "Die Markierung horizontal spiegeln" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Vertical flip" +msgstr "Vertikal spiegeln" + +#: ../plugins/paint/selection/selectiontool.cc:441 +msgid "Flip the selection vertically" +msgstr "Die Markierung vertikal spiegeln" + +#: ../plugins/paint/selection/selectiontool.cc:442 +msgid "Merge" +msgstr "Vereinen" + +#: ../plugins/paint/selection/selectiontool.cc:443 +msgid "Merge two molecules" +msgstr "Zwei Moleküle miteinander vereinen" + +#: ../plugins/paint/selection/selectiontool.cc:447 +msgid "_Rotate" +msgstr "D_rehen" + +#: ../plugins/paint/selection/selectiontool.cc:448 +msgid "Rotate the selection" +msgstr "Die markierte Auswahl drehen" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "Neue Vorlage" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "_Kategorie" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "_Name" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "Vorlagen" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "Vorlagen anwenden oder verwalten" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "Verschiedenes" + +#: ../plugins/paint/templates/templates.glade.h:1 +msgid "No selected template" +msgstr "Keine Vorlage ausgewählt" + +#: ../plugins/paint/templates/templates.glade.h:2 +msgid "_Templates" +msgstr "_Vorlagen" + +#: ../plugins/paint/templates/templates.glade.h:3 +msgid "category" +msgstr "Kategorie" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "Bitte stellen Sie ein Objekt zur Verfügung" + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "Bitte geben Sie einen Namen an." + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "Bitte wählen Sie eine Kategorie." + +#: ../plugins/paint/text/fontsel.glade.h:1 +#, fuzzy +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" +"Keine\n" +"Einzel\n" +"Doppel\n" +"Niedrig" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "G_röße:" + +#: ../plugins/paint/text/fontsel.glade.h:6 +msgid "Stri_kethrough" +msgstr "Durchge_strichen" + +#: ../plugins/paint/text/fontsel.glade.h:7 +msgid "_Color:" +msgstr "Farbe:" + +#: ../plugins/paint/text/fontsel.glade.h:8 +msgid "_Family:" +msgstr "_Familie:" + +#: ../plugins/paint/text/fontsel.glade.h:9 +msgid "_Position:" +msgstr "_Position:" + +#: ../plugins/paint/text/fontsel.glade.h:10 +msgid "_Style:" +msgstr "_Stil:" + +#: ../plugins/paint/text/fontsel.glade.h:11 +msgid "_Underline:" +msgstr "_Unterstrichen:" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "Einen Text hinzufügen oder ändern" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "Eine Gruppe von Atomen hinzufügen oder ändern" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "Wikipediaexport" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "Export zur Wikipediaveröffentlichung" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "Generiere ein Wikipedia-konformes PNG-Bild" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:182 +msgid "Unable to save image file: " +msgstr "Bilddatei konnte nicht gespeichert werden:" + +#: ../programs/3d/application.cc:45 +#: ../programs/3d/application.cc:82 +msgid "GChem3D Viewer" +msgstr "GChem3d Betrachter" + +#: ../programs/3d/application.cc:159 +msgid "Sorry, format not supported!" +msgstr "Entschuldigung, das Format wird nicht unterstützt." + +#: ../programs/3d/main.cc:46 +msgid "GChem3d Viewer version: " +msgstr "Version des Betrachters GChem3d: " + +#: ../programs/3d/main.cc:57 +msgid "Prints GChem3d Viewer version" +msgstr "Gibt die Version des Betrachters GChem3D aus" + +#: ../programs/3d/main.cc:58 +msgid "Background color: white, black or #rrggbb (default is black)" +msgstr "Hintergrundfarbe: weiß, schwarz oder #rrggbb (Standard ist schwarz)" + +#: ../programs/3d/main.cc:59 +msgid "How molecules are displayed; possible values are BallnStick (the default), SpaceFill, Cylinders, and Wireframe" +msgstr "Wie Moleküle angezeigt werden; mögliche Werte sind BallnStick (Standard), Spacefill, Cylinders und Wireframe" + +#: ../programs/3d/main.cc:105 +#: ../programs/spectra/gspectrum.cc:59 +msgid " [file]" +msgstr " [Datei]" + +#: ../programs/3d/main.cc:126 +#: ../programs/crystal/main.cc:161 +#: ../programs/paint/main.cc:92 +#: ../programs/spectra/gspectrum.cc:79 +#, c-format +msgid "Invalid or misplaced argument: %s\n" +msgstr "Unbekanntes oder falsch gesetztes Argument: %s\n" + +#: ../programs/3d/window.cc:133 +msgid "GChem3D is a molecular structures viewer for Gnome" +msgstr "GChem3D ist ein Molekülbetrachter für GNOME" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/3d/window.cc:135 +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "Copyright © 2004-2008 Jean Bréfort\n" + +#: ../programs/3d/window.cc:185 +msgid "Print the current scene" +msgstr "Aktuelle Szenerie drucken" + +#: ../programs/3d/window.cc:189 +msgid "Quit GChem3D" +msgstr "GChem3D beenden" + +#: ../programs/3d/window.cc:193 msgid "View help for the Molecules Viewer" msgstr "Hilfe zu Molekülbetrachter anschauen" -#: ../programs/3d/window.cc:176 ../programs/calc/gchemcalc.cc:412 -#: ../programs/crystal/window.cc:289 ../programs/table/gchemtable-app.cc:162 +#: ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:645 +#: ../programs/crystal/window.cc:328 +#: ../programs/spectra/window.cc:189 +#: ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:251 msgid "Gnome Chemistry Utils on the _web" msgstr "Gnome Chemistry Utils im _WWW" -#: ../programs/3d/window.cc:177 ../programs/calc/gchemcalc.cc:413 -#: ../programs/crystal/window.cc:290 ../programs/table/gchemtable-app.cc:163 +#: ../programs/3d/window.cc:195 +#: ../programs/calc/gchemcalc.cc:646 +#: ../programs/crystal/window.cc:329 +#: ../programs/spectra/window.cc:190 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:252 msgid "Browse the Gnome Chemistry Utils's web site" msgstr "Websieten der Gnome Chemistry Utils durchsuchen" -#: ../programs/3d/window.cc:178 ../programs/calc/gchemcalc.cc:414 -#: ../programs/crystal/window.cc:291 ../programs/table/gchemtable-app.cc:164 -msgid "_Ask a question" -msgstr "Fr_age stellen" - -#: ../programs/3d/window.cc:179 ../programs/calc/gchemcalc.cc:415 -#: ../programs/crystal/window.cc:292 ../programs/table/gchemtable-app.cc:165 +#: ../programs/3d/window.cc:199 +#: ../programs/calc/gchemcalc.cc:650 +#: ../programs/crystal/window.cc:333 +#: ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:177 +#: ../programs/table/gchemtable-curve.cc:256 msgid "Ask a question about the Gnome Chemistry Utils" msgstr "Frage zu den Gnome Chemistry Utils stellen" -#: ../programs/3d/window.cc:180 ../programs/calc/gchemcalc.cc:416 -#: ../programs/crystal/window.cc:293 ../programs/table/gchemtable-app.cc:166 -msgid "Report _Bugs" -msgstr "_Fehler melden" - -#: ../programs/3d/window.cc:181 ../programs/calc/gchemcalc.cc:417 -#: ../programs/crystal/window.cc:294 ../programs/table/gchemtable-app.cc:167 +#: ../programs/3d/window.cc:201 +#: ../programs/calc/gchemcalc.cc:652 +#: ../programs/crystal/window.cc:335 +#: ../programs/spectra/window.cc:196 +#: ../programs/table/gchemtable-app.cc:179 +#: ../programs/table/gchemtable-curve.cc:258 msgid "Submit a bug report for the Gnome Chemistry Utils" msgstr "Fehlerbericht zu den Gnome Chemistry Utils senden" -#: ../programs/3d/window.cc:182 ../programs/calc/gchemcalc.cc:418 -#: ../programs/crystal/window.cc:295 ../programs/table/gchemtable-app.cc:168 -msgid "_About" -msgstr "_Über" - -#: ../programs/3d/window.cc:183 +#: ../programs/3d/window.cc:203 msgid "About GChem3D" msgstr "Über GChem3D" -#: ../programs/3d/window.cc:187 +#: ../programs/3d/window.cc:207 msgid "Balls and sticks" msgstr "Balls and Sticks" -#: ../programs/3d/window.cc:188 +#: ../programs/3d/window.cc:208 msgid "Display a balls and sticks model" msgstr "Balls-and-Sticks-Modell anzeigen" -#: ../programs/3d/window.cc:190 +#: ../programs/3d/window.cc:210 msgid "Space filling" msgstr "Spacefill" -#: ../programs/3d/window.cc:191 +#: ../programs/3d/window.cc:211 msgid "Display a space filling model" msgstr "Spacefill-Modell anzeigen" -#: ../programs/3d/window.cc:268 +#: ../programs/3d/window.cc:213 +msgid "Cylinders" +msgstr "Zylinder" + +#: ../programs/3d/window.cc:214 +msgid "Display a cylinders model" +msgstr "Zylindermodell anzeigen" + +#: ../programs/3d/window.cc:216 +msgid "Wireframe" +msgstr "Drahtmodell" + +#: ../programs/3d/window.cc:217 +msgid "Display a wireframe model" +msgstr "Drahtmodell anzeigen" + +#: ../programs/3d/window.cc:275 msgid "Background color" msgstr "Hintergrundfarbe" -#: ../programs/3d/window.cc:269 +#: ../programs/3d/window.cc:276 msgid "Choose a new background color" msgstr "Eine neue Hintergrundfarbe wählen" -#: ../programs/3d/window.cc:299 ../programs/crystal/window.cc:425 +#: ../programs/3d/window.cc:299 +#: ../programs/crystal/window.cc:439 +#: ../programs/spectra/window.cc:259 msgid "Open recent" msgstr "Zuletzt geöffnet" -#: ../programs/3d/window.cc:359 ../programs/crystal/application.cc:126 -msgid "Preview" -msgstr "Vorschau" - -#: ../programs/3d/gchem3d-viewer.desktop.in.h:1 +#: ../programs/3d/gchem3d.desktop.in.h:1 msgid "Display chemical 3D structures" msgstr "3D-Struktur anzeigen" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:2 -msgid "Molecules Viewer" +#: ../programs/3d/gchem3d.desktop.in.h:2 +msgid "Molecules Viewer " msgstr "Molekülbetrachter" -#: ../programs/calc/gchemcalc.cc:126 +#: ../programs/calc/gchemcalc.cc:315 msgid "GChemCalc is a simple calculator for chemists" msgstr "GChemCalc ist ein einfacher Rechner für Chemiker" #. const gchar * documentors[] = {NULL}; -#: ../programs/calc/gchemcalc.cc:128 -msgid "Copyright © 2005-2007 Jean Bréfort\n" -msgstr "Copyright © 2005-2007 Jean Bréfort\n" +#: ../programs/calc/gchemcalc.cc:317 +#: ../programs/table/gchemtable-app.cc:351 +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "Copyright © 2005-2008 Jean Bréfort" -#: ../programs/calc/gchemcalc.cc:408 +#: ../programs/calc/gchemcalc.cc:637 msgid "Quit GChemCalc" msgstr "GChemCalc beenden" -#: ../programs/calc/gchemcalc.cc:411 +#: ../programs/calc/gchemcalc.cc:641 +msgid "_Mode" +msgstr "_Modus" + +#: ../programs/calc/gchemcalc.cc:644 msgid "View help for the Chemical Calculator" msgstr "Hilfe zu Chemie-Rechner anschauen" -#: ../programs/calc/gchemcalc.cc:419 +#: ../programs/calc/gchemcalc.cc:654 msgid "About GChemCalc" msgstr "Über GChemCalc" -#: ../programs/calc/gchemcalc.cc:465 +#: ../programs/calc/gchemcalc.cc:658 +msgid "_Guess" +msgstr "_Raten" + +#: ../programs/calc/gchemcalc.cc:659 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "Versuche zu raten was korrekt ist, wenn mehrdeutige Symbole verwendet werden" + +#: ../programs/calc/gchemcalc.cc:661 +msgid "_Atom" +msgstr "_Atom" + +#: ../programs/calc/gchemcalc.cc:662 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "Interpretiere mehrdeutige Symbole als Atome" + +#: ../programs/calc/gchemcalc.cc:664 +msgid "_Nickname" +msgstr "Spitz_name" + +#: ../programs/calc/gchemcalc.cc:665 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "Interpretiere mehrdeutige Symbole als zu Atomen gruppierte Spitznamen" + +#: ../programs/calc/gchemcalc.cc:667 +msgid "As_k" +msgstr "Frag" + +#: ../programs/calc/gchemcalc.cc:668 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "Frage den Benutzer nach der korrekten Interpretation mehrdeutiger Symbole" + +#: ../programs/calc/gchemcalc.cc:706 msgid "GChemCalc Calculator version: " msgstr "GChemCalc Chemie-Rechner Version: " -#: ../programs/calc/gchemcalc.cc:486 +#: ../programs/calc/gchemcalc.cc:732 msgid " [formula]" msgstr " [Formel]" -#: ../programs/calc/gchemcalc.cc:502 +#: ../programs/calc/gchemcalc.cc:748 msgid "For usage see: gchemcalc [-?|--help]" msgstr "Für Hinweise zur Benutzung, siehe: gchemcalc [-?|--help]" -#: ../programs/calc/gchemcalc.cc:556 +#: ../programs/calc/gchemcalc.cc:794 msgid "Element" msgstr "Element" -#: ../programs/calc/gchemcalc.cc:563 +#: ../programs/calc/gchemcalc.cc:801 msgid "Mass %" msgstr "Masseprozent" @@ -1354,13 +3871,17 @@ msgid "A simple calculator for chemistry" msgstr "Ein einfacher Rechner für Chemiker" +#: ../programs/calc/gchemcalc.desktop.in.h:2 +msgid "Chemical calculator " +msgstr "Chemie-Rechner" + #: ../programs/crystal/gcrystal.desktop.in.h:1 msgid "Edit and display crystalline structures" msgstr "Kristallstrukturen anzeigen und bearbeiten" #: ../programs/crystal/gcrystal.desktop.in.h:2 msgid "Gnome Crystal Crystalline Structures Viewer " -msgstr "Gnome Crystal - Betrachter für Kristallstrukturen" +msgstr "Gnome Crystal Betrachter für Kristallstrukturen" #: ../programs/crystal/gcrystal.schemas.in.h:1 msgid "Background color blue value" @@ -1375,34 +3896,20 @@ msgstr "Rotanteil der Hintergrundfarbe" #: ../programs/crystal/gcrystal.schemas.in.h:4 -msgid "" -"Blue value for the default background color. Acceptable values are 0. to 1." -msgstr "" -"Blauanteil der Standardhintergrundfarbe. Zulässiger Wertebereich: 0. bus 1." +msgid "Blue value for the default background color. Acceptable values are 0. to 1." +msgstr "Blauanteil der Standardhintergrundfarbe. Zulässiger Wertebereich: 0. bus 1." #: ../programs/crystal/gcrystal.schemas.in.h:5 -msgid "" -"Default Euler's nutation angle for model display. Acceptable values are 0. " -"to + 180." -msgstr "" -"Standardwert für Eulerschen Nutationswinkel zum Anzeigen des Modells. " -"Zulässiger Wertebereich: 0. bis +180." +msgid "Default Euler's nutation angle for model display. Acceptable values are 0. to + 180." +msgstr "Standardwert für Eulerschen Nutationswinkel zum Anzeigen des Modells. Zulässiger Wertebereich: 0. bis +180." #: ../programs/crystal/gcrystal.schemas.in.h:6 -msgid "" -"Default Euler's precession angle for model display. Acceptable values are -" -"180. to + 180." -msgstr "" -"Standardwert für Eulerschen Präzessionswinkel zum Anzeigen des Modells. " -"Zulässiger Wertebereich: -180. bis +180." +msgid "Default Euler's precession angle for model display. Acceptable values are -180. to + 180." +msgstr "Standardwert für Eulerschen Präzessionswinkel zum Anzeigen des Modells. Zulässiger Wertebereich: -180. bis +180." #: ../programs/crystal/gcrystal.schemas.in.h:7 -msgid "" -"Default Euler's spin angle for model display. Acceptable values are -180. to " -"+ 180." -msgstr "" -"Standardwert für Eulerschen Winkel der reinen Drehung (Spin) zum Anzeigen " -"des Modells. Zulässiger Wertebereich: -180. bis +180." +msgid "Default Euler's spin angle for model display. Acceptable values are -180. to + 180." +msgstr "Standardwert für Eulerschen Winkel der reinen Drehung (Spin) zum Anzeigen des Modells. Zulässiger Wertebereich: -180. bis +180." #: ../programs/crystal/gcrystal.schemas.in.h:8 msgid "Default field of view" @@ -1425,10 +3932,8 @@ msgstr "Standardmäßig genutzter Blickwinkel zum Anzeigen des Modells" #: ../programs/crystal/gcrystal.schemas.in.h:13 -msgid "" -"Green value for the default background color. Acceptable values are 0. to 1." -msgstr "" -"Grünanteil der Standardhintergrundfarbe. Zulässiger Wertebereich: 0. bus 1." +msgid "Green value for the default background color. Acceptable values are 0. to 1." +msgstr "Grünanteil der Standardhintergrundfarbe. Zulässiger Wertebereich: 0. bus 1." #: ../programs/crystal/gcrystal.schemas.in.h:14 msgid "Printing resolution" @@ -1439,48 +3944,33 @@ msgstr "Druckauflösung, falls nicht automatisch erkannt" #: ../programs/crystal/gcrystal.schemas.in.h:16 -msgid "" -"Red value for the default background color. Acceptable values are 0. to 1." -msgstr "" -"Rotanteil der Standardhintergrundfarbe. Zulässiger Wertebereich: 0. bus 1." +msgid "Red value for the default background color. Acceptable values are 0. to 1." +msgstr "Rotanteil der Standardhintergrundfarbe. Zulässiger Wertebereich: 0. bus 1." -#: ../programs/crystal/application.cc:55 +#: ../programs/crystal/application.cc:60 #, c-format msgid "Untitled%d" msgstr "Unbenannt%d" -#: ../programs/crystal/application.cc:261 +#: ../programs/crystal/application.cc:324 #, c-format -msgid "" -"\"%s\" has been modified since last saving. Do you wish to come back to " -"saved version?" -msgstr "" -"\"%s\" wurde seit dem letzten Speichern geändert. Möchten Sie die Änderungen " -"verwerfen und zur gespeicherten Version zurück gehen?" - -#: ../programs/crystal/atomsdlg.cc:133 -msgid "Atom" -msgstr "Atom" - -#: ../programs/crystal/atomsdlg.cc:187 ../programs/crystal/atomsdlg.cc:282 -#: ../programs/crystal/atomsdlg.cc:415 -msgid "Unknown" -msgstr "Unbekannt" +msgid "\"%s\" has been modified since last saving. Do you wish to come back to saved version?" +msgstr "\"%s\" wurde seit dem letzten Speichern geändert. Möchten Sie die Änderungen verwerfen und zur gespeicherten Version zurück gehen?" #. Note for translators: c.n. is for coordination number -#: ../programs/crystal/atomsdlg.cc:555 +#: ../programs/crystal/atomsdlg.cc:624 msgid " c.n.=" msgstr " OZ=" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "low spin" msgstr "geringer Spin" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "high spin" msgstr "hoher Spin" -#: ../programs/crystal/atomsdlg.cc:563 +#: ../programs/crystal/atomsdlg.cc:632 msgid "Database" msgstr "Datenbank" @@ -1488,11 +3978,23 @@ msgid "The sum of the three angles must be less than 360°" msgstr "Die Summer aller drei Winkel muss kleiner als 360 sein" +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "h" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "k" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "l" + #: ../programs/crystal/cleavagesdlg.cc:128 msgid "Planes cleaved" msgstr "Spaltebenen" -#: ../programs/crystal/document.cc:237 +#: ../programs/crystal/document.cc:326 #, c-format msgid "" "Could not save file\n" @@ -1501,401 +4003,1174 @@ "Datei konnte nicht gespeichert werden\n" "%s" -#: ../programs/crystal/document.cc:240 -#, c-format -msgid "" -"Could not load file\n" -"%s" -msgstr "" -"Datei konnte nicht geladen werden\n" -"%s" - -#: ../programs/crystal/document.cc:243 -#, c-format -msgid "" -"%s: invalid xml file.\n" -"Tree is empty?" -msgstr "" -"%s: ungültige XML Datei.\n" -"Ist der Baum leer?" - -#: ../programs/crystal/document.cc:246 -#, c-format -msgid "%s: invalid file format." -msgstr "%s: ungültiges Dateiformat." +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" +msgstr "x1" + +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" +msgstr "y1" + +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" +msgstr "z1" + +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "x2" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "y2" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" +msgstr "z2" -#: ../programs/crystal/document.cc:594 -#, c-format -msgid "\"%s\" has been modified. Do you wish to save it?" -msgstr "\"%s\" wurde geändert. Wollen Sie die Datei speichern?" - -#: ../programs/crystal/linesdlg.cc:178 +#: ../programs/crystal/linesdlg.cc:180 msgid "Single" msgstr "Einfach" -#: ../programs/crystal/main.cc:76 +#: ../programs/crystal/main.cc:90 msgid "Gnome Chemistry Utils version: " msgstr "Gnome Chemistry Utils Version: " -#: ../programs/crystal/main.cc:104 +#: ../programs/crystal/main.cc:116 +#: ../programs/paint/main.cc:74 msgid " [file...]" msgstr " [Datei...]" -#: ../programs/crystal/window.cc:122 ../programs/crystal/window.cc:383 +#: ../programs/crystal/window.cc:148 +#: ../programs/crystal/window.cc:404 msgid "Gnome Crystal" msgstr "Gnome Crystal" -#: ../programs/crystal/window.cc:125 +#: ../programs/crystal/window.cc:151 msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" msgstr "Gnome Crystal ist ein Betrachter für Kristallstrukturen unter Gnome" -#: ../programs/crystal/window.cc:126 -msgid "Copyright © 1999-2007 by Jean Bréfort" -msgstr "Copyright © 1999-2007 by Jean Bréfort" - -#: ../programs/crystal/window.cc:248 -msgid "_New File" -msgstr "_Neue Datei" - -#: ../programs/crystal/window.cc:249 -msgid "Create a new file" -msgstr "Neue Datei erstellen" +#: ../programs/crystal/window.cc:152 +msgid "Copyright © 1999-2008 by Jean Bréfort" +msgstr "Copyright © 1999-2008 Jean Bréfort" -#: ../programs/crystal/window.cc:252 -msgid "_Save" -msgstr "_Speichern" - -#: ../programs/crystal/window.cc:253 -msgid "Save the current file" -msgstr "Aktuelle Datei speichern" - -#: ../programs/crystal/window.cc:254 -msgid "Save _As..." -msgstr "Speichern _unter..." - -#: ../programs/crystal/window.cc:255 -msgid "Save the current file with a different name" -msgstr "Akteulle Datei unter anderem Namen speichern" - -#: ../programs/crystal/window.cc:259 -msgid "Print the current file" -msgstr "Aktuelle Datei drucken" - -#: ../programs/crystal/window.cc:263 +#: ../programs/crystal/window.cc:302 msgid "Quit Gnome Crystal" msgstr "Gnome Crystal beenden" -#: ../programs/crystal/window.cc:264 -msgid "_Edit" -msgstr "_Bearbeiten" - -#: ../programs/crystal/window.cc:265 +#: ../programs/crystal/window.cc:304 msgid "Prefere_nces..." msgstr "Ei_nstellungen" -#: ../programs/crystal/window.cc:266 -msgid "Configure the application" -msgstr "Programm konfigurieren" - -#: ../programs/crystal/window.cc:267 +#: ../programs/crystal/window.cc:306 msgid "_Crystal" msgstr "_Kristall" -#: ../programs/crystal/window.cc:268 +#: ../programs/crystal/window.cc:307 msgid "_Lattice..." msgstr "_Gitter" -#: ../programs/crystal/window.cc:269 +#: ../programs/crystal/window.cc:308 msgid "Define the lattice" msgstr "Gittertyp festlegen" -#: ../programs/crystal/window.cc:270 +#: ../programs/crystal/window.cc:309 msgid "_Atoms..." msgstr "_Atome..." -#: ../programs/crystal/window.cc:271 +#: ../programs/crystal/window.cc:310 msgid "Add or edit atoms" msgstr "Atome ändern oder hinzufügen" -#: ../programs/crystal/window.cc:272 +#: ../programs/crystal/window.cc:311 msgid "_Bonds and lines..." msgstr "_Bindungen und Linien" -#: ../programs/crystal/window.cc:273 +#: ../programs/crystal/window.cc:312 msgid "Add or edit bonds and lines" msgstr "Bindungen und Linien einfügen" -#: ../programs/crystal/window.cc:274 +#: ../programs/crystal/window.cc:313 msgid "_Size..." msgstr "_Größe..." -#: ../programs/crystal/window.cc:275 +#: ../programs/crystal/window.cc:314 msgid "Define size" msgstr "Größe festlegen" -#: ../programs/crystal/window.cc:276 +#: ../programs/crystal/window.cc:315 msgid "_Cleavages..." msgstr "_Spaltungen..." -#: ../programs/crystal/window.cc:277 +#: ../programs/crystal/window.cc:316 msgid "Add or edit cleavages to remove some planes" msgstr "Spaltung einfügen um Kristallebenen zu entfernen" -#: ../programs/crystal/window.cc:279 +#: ../programs/crystal/window.cc:318 msgid "View _settings..." msgstr "An_sicht..." -#: ../programs/crystal/window.cc:280 +#: ../programs/crystal/window.cc:319 msgid "Choose background color and model position" msgstr "Hintergrundfarbe und Modellposition auswählen" -#: ../programs/crystal/window.cc:281 -msgid "_Windows" -msgstr "_Fenster" - -#: ../programs/crystal/window.cc:282 +#: ../programs/crystal/window.cc:321 msgid "Create new _window" msgstr "Fenster _öffnen" -#: ../programs/crystal/window.cc:283 +#: ../programs/crystal/window.cc:322 msgid "Create a new window" msgstr "Neues Fenster öffnen" -#: ../programs/crystal/window.cc:284 +#: ../programs/crystal/window.cc:323 msgid "_Close this window" msgstr "Fenster _schließen" -#: ../programs/crystal/window.cc:285 +#: ../programs/crystal/window.cc:324 msgid "Close the current window" msgstr "Aktuelles Fenster schließen" -#: ../programs/crystal/window.cc:288 +#: ../programs/crystal/window.cc:327 msgid "View help for Gnome Crystal" msgstr "Hilfe zu Gnome Crystal anschauen" -#: ../programs/crystal/window.cc:296 +#: ../programs/crystal/window.cc:337 msgid "About Gnome Crystal" msgstr "Über Gnome Crystal" -#: ../programs/crystal/window.cc:445 -msgid "Ready" -msgstr "Bereit" +#: ../programs/paint/gchempaint.desktop.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "Erstellt 2D-Formeln chemischer Strukturen" + +#: ../programs/paint/gchempaint.desktop.in.h:2 +msgid "GChemPaint Chemical Structures Editor " +msgstr "GChemPaint Chemischer Strukturformeleditor" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "Schriftfamilie für chemische Fomreln" + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "Schriftgröße für chemische Formeln" + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "Zeichenabstand bei chemischen Formeln." + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "Schriftstil bei chemischen Formeln." + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "Schriftvariante bei chemischen Formeln." + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "Schriftdicke bei chemischen Formeln." + +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "Compression factor when saving files. Acceptable values are 0 (no compression) to 9." +msgstr "Kompressionsfaktor beim Speichern von Dateien. Akzeptierte Werte reichen von 0 (keine Kompression) bis 9." + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "Standardwinkel zwischen zwei Bindungen" + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "Default angle between two consecutive bonds in a chain in degrees. Used in the default theme." +msgstr "Standardwinkel zwischen zwei aufeinander folgenden Bindungen in einer Kette in Grad. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:10 +msgid "Default arrow length" +msgstr "Standardpfeillänge" + +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "Standardpfeillänge in Pikometern. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "Standardpfeilliniendicke in Pixel (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "Standardpfeilliniendicke" + +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" +msgstr "Standardbindungslänge:" + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "Standardbindungslänge in Pikometern. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "Standardbindungsliniendicke in Pixel (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "Standardbindungsliniendicke" + +#: ../programs/paint/gchempaint.schemas.in.h:20 +msgid "Default charge sign size." +msgstr "Standardladungszeichengröße" + +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "Standardentfernung zwischen zwei Linien für Doppelpfeile" + +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "Standardentfernung zwischen zwei Linien in einer Mehrfachbindung" + +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "Default distance between two lines in pixels (at 100% zoom) for double arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "Standardentfernung zwischen zwei Linien in Pixel (bei 100% Vergrößerung) für Doppel- oder Retrosynthesepfeile. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "Default distance between two lines in pixels (at 100% zoom) in a multiple bond. Used in the default theme." +msgstr "Standardentfernung zwischen zwei Linien in Pixel (bei 100% Vergrößerung) in einer Mehrfachbindung. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, fuzzy, no-c-format +msgid "Default distance between two lines in pixels for hash bonds (at 100% zoom). Used in the default theme." +msgstr "Standardentfernung zwischen zwei Linien in Pixel für gestrichelte Keile (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format +msgid "Default distance from tip of arrowhead to center in pixels (at 100% zoom). Used in the default theme." +msgstr "Standardentfernung von Spitze des Pfeilkopfes zum Zentrum in Pixel (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "Standardentfernung von Spitze des Pfeilkopfes zum Zentrum." + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, fuzzy, no-c-format +msgid "Default distance from tip of arrowhead to trailing point, measured along shaft, in pixels (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/table/gchemtable-app.cc:102 -msgid "GChemTable is a chemical periodic table of the elements application" -msgstr "GChemTable enthält ein Periodensystem der Elemente" +#: ../programs/paint/gchempaint.schemas.in.h:34 +#, fuzzy +msgid "Default distance from tip of arrowhead to trailing point, measured along shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, fuzzy, no-c-format +msgid "Default distance of arrowhead trailing points from outside edge of shaft in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:37 +#, fuzzy +msgid "Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "Standardextraabstand nach stöchiometrischen Koeffizienten" + +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "Default extra padding between a stoichiometric coefficient and its associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "Standardmäßige Zusatzraumaussparung zwischen einem stöchiometrischen Koeffizienten und der zugehörigen Moleküle in Pixel (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "Standard Schriftfamilie für Texte. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "Default font stretch used for texts (0 = ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default theme." +msgstr "Standardschriftzeichenabstand für Texte (0 = ultra verdichtet; 1 = extra verdichtet; 2 = verdichtet; 3 = semi verdichtet; 4 = normal; 5 = semi ausgeweitet; 6 = ausgeweitet; 7 = extra ausgeweitet; 8 = ultra ausgeweitet). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "Standardschriftartstil, der für Text verwendet wird (0 = normal; 1 = schräg; 2 = kursiv). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "Default font variant used for texts (0 = normal; 1 = small caps). Used in the default theme." +msgstr "Standardschriftvariante, die für Text verwendet wird (0 = normal; 1 = kleine Kapitälchen). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default theme." +msgstr "Standardschriftdicke, die für Text verwendet wird (2 = ultra dünn; 3 = dünn; 4 = nomral; 6 = semi dick; 7 = dick; 8 = ultra dick; 9 = fett). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:46 +msgid "Default hash line width." +msgstr "Standardliniendicke bei gestrichelten Keilen" + +#: ../programs/paint/gchempaint.schemas.in.h:47 +msgid "Default hash lines distance." +msgstr "Standardlinienabstand bei gestrichelten Keilen" + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "Default largest width for hash or wedge bonds (at 100% zoom). Used in the default theme." +msgstr "Größte Standarddicke für Keil- oder Strichbindungen (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "Größte Standarddicke für Keil- oder Strichbindungen." + +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "Default line width in pixels for hash bonds (at 100% zoom). Used in the default theme." +msgstr "Standardlinienbreite in Pixel für gestrichelte Bindungen (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:53 +msgid "Default padding around arrows." +msgstr "Standardabstand um Pfeile" + +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "Default padding between a '+' sign in a reaction equation and reactants symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "Standardabstand zwischen einem Pluszeichen und den Symbolen der Reaktanden in einer Reaktionsgleichung (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "Default padding between a '+' sign in a reaction equation and reactants symbols." +msgstr "Standardabstand zwischen einem Pluszeichen und den Symbolen der Reaktanden in einer Reaktionsgleichung." + +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "Standardabstand zwischen ausgerichteten Objekten." + +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "Default padding between arrows and associated objects in pixels (at 100% zoom). Used in the default theme." +msgstr "Standardabstand in Pixel zwischen zusammengehörigen Objekten während einer Ausrichtungsoperation (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "Standardabstand um Textelemente" + +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "Default padding in pixels added between consecutive objects during an alignment operation (at 100% zoom). Used in the default theme." +msgstr "Standardabstand in Pixel zwischen aufeinanderfolgenden Objekten während einer Ausrichtungsoperation (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "Default size of the charge sign in pixels (at 100% zoom). Used in the default theme." +msgstr "Standardgröße für das Ladungssymbol in Pixel (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "Standardschriftfamilie" + +#: ../programs/paint/gchempaint.schemas.in.h:66 +msgid "Default text font size." +msgstr "Standardschriftgröße" + +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "Standardschriftausdehnung" + +#: ../programs/paint/gchempaint.schemas.in.h:68 +msgid "Default text font style." +msgstr "Standardschriftartstil" + +#: ../programs/paint/gchempaint.schemas.in.h:69 +msgid "Default text font variant." +msgstr "Standardschriftartvariante" + +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "Standardschriftdicke" + +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "Standardthema, das für neue Dateien verwendet wird." + +#: ../programs/paint/gchempaint.schemas.in.h:72 +msgid "Default theme." +msgstr "Standard" + +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." +msgstr "Dateikompressionsfaktor" + +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "Font family used for chemical formula such as atoms and fragments. Used in the default theme." +msgstr "Schriftartfamilie, die für chemische Formeln wie Atome und Fragmente verwendet wird. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "Font size used for chemical formula such as atoms and fragments. Used in the default theme." +msgstr "Schriftgröße für chemische Formeln wie Atome und Fragmente. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "Schriftgröße für Texte. Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "Font stretch used for chemical formula such as atoms and fragments (0 = ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default theme." +msgstr "Schriftzeichenabstand, der für chemische Formeln wie Atome and Fragmente verwendet wird (0 = ultra verdichtet; 1 = extra verdichtet; 2 = verdichtet; 3 = semi verdichtet; 4 = normal; 5 = semi ausgeweitet; 6 = ausgeweitet; 7 = extra ausgeweitet; 8 = ultra ausgeweitet). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "Font style used for chemical formula such as atoms and fragments (0 = normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "Schriftartstil, der für chemische Formeln wie Atome and Fragmente verwendet wird (0 = normal; 1 = schräg; 2 = kursiv). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "Font variant used for chemical formula such as atoms and fragments (0 = normal; 1 = small caps). Used in the default theme." +msgstr "Schriftvariante, die für chemische Formeln wie Atome und Fragmente verwendet wird (0 = normal; 1 = kleine Kapitälchen). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "Font weight used for chemical formula such as atoms and fragments (2 = ultra-light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default theme." +msgstr "Schriftdicke, die für chemische Formeln wie Atome oder Fragmente verwendet wird (2 = ultra dünn; 3 = dünn; 4 = nomral; 6 = semi dick; 7 = dick; 8 = ultra dick; 9 = fett). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "Wenn TRUE, dann werden STRING_UTF8 und STRING zum Zwischenablagenformat hinzugefügt." + +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "If TRUE, the periodic table popup widget will be tearable from the tools dialog box." +msgstr "Wenn TRUE, dann wird das Periodensystem-Popup-Widget von dem Werkzeugkastendialog abtrennbar." + +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "Padding used around text objects such as atoms, texts and other typographic signs in pixels (at 100% zoom). Used in the default theme." +msgstr "Abstand um Textobjekte wie Atome, Beschriftung und andere typographische Symbole in Pixel (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "Skalierung (pm pro Pixel)" + +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "Scale used to convert real distance to canvas distance expressed in pm per pixel (at 100% zoom). Used in the default theme." +msgstr "Skalierung um reale Abstände auf Zeichenbrettabstände umzuwandeln; ausgedrückt in pm pro Pixel (bei 100% Vergrößerung). Verwendet im Standardthema." + +#: ../programs/paint/gchempaint.schemas.in.h:88 +msgid "Whether the periodic table is tearable." +msgstr "Ob das Periodensystem abtrennbar ist." + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "Ob einfacher Text beim Kopieren exportiert werden soll." + +#: ../programs/paint/main.cc:48 +msgid "GChemPaint version: " +msgstr "GChemPaint-Version: " + +#: ../programs/spectra/application.cc:42 +#: ../programs/spectra/application.cc:54 +msgid "GSpectrum" +msgstr "GSpectrum" + +#: ../programs/spectra/gspectrum.desktop.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "Ein Spektrenbetrachter für den GNOME Desktop" + +#: ../programs/spectra/gspectrum.desktop.in.h:2 +msgid "Spectrum viewer " +msgstr "Spektrenbetrachter" + +#: ../programs/spectra/window.cc:126 +msgid "GSpectrum is a spectrum viewer for Gnome" +msgstr "GChem3D ist ein Spektrenbetrachter für GNOME" #. const gchar * documentors[] = {NULL}; -#: ../programs/table/gchemtable-app.cc:104 -msgid "Copyright © 2005-2007 Jean Bréfort" -msgstr "Copyright © 2005-2007 Jean Bréfort" +#: ../programs/spectra/window.cc:128 +msgid "Copyright © 2007-2008 Jean Bréfort\n" +msgstr "Copyright © 2004-2008 Jean Bréfort\n" + +#: ../programs/spectra/window.cc:182 +msgid "Quit GSpectrum" +msgstr "GSpectrum beenden" + +#: ../programs/spectra/window.cc:188 +msgid "View help for the Spectra Viewer" +msgstr "Hilfe zum Spektrenbetrachter anschauen" + +#: ../programs/spectra/window.cc:198 +msgid "About GSpectrum" +msgstr "Über GSpectrum" + +#: ../programs/table/gchemtable-app.cc:141 +msgid "New _Chart" +msgstr "Neues _Diagramm" + +#: ../programs/table/gchemtable-app.cc:142 +msgid "Create a new chart" +msgstr "Erstelle ein neues Diagramm" -#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-app.cc:144 +#: ../programs/table/gchemtable-curve.cc:242 msgid "Quit GChemTable" msgstr "GChemTable beenden" -#: ../programs/table/gchemtable-app.cc:145 +#: ../programs/table/gchemtable-app.cc:146 msgid "Color scheme" msgstr "Farbschema" -#: ../programs/table/gchemtable-app.cc:146 +#: ../programs/table/gchemtable-app.cc:147 msgid "No colors" msgstr "Keine Farben" -#: ../programs/table/gchemtable-app.cc:147 +#: ../programs/table/gchemtable-app.cc:148 msgid "Use default Gtk theme colors" msgstr "Farben des Standard Gtk-Themas verwenden" -#: ../programs/table/gchemtable-app.cc:148 -msgid "Default" -msgstr "Standard" - -#: ../programs/table/gchemtable-app.cc:149 +#: ../programs/table/gchemtable-app.cc:150 msgid "Use default symbolic element colors" msgstr "Standardsysmbolfarben nutzen" -#: ../programs/table/gchemtable-app.cc:150 +#: ../programs/table/gchemtable-app.cc:151 msgid "Physical states" msgstr "Aggregatzustände" -#: ../programs/table/gchemtable-app.cc:151 +#: ../programs/table/gchemtable-app.cc:152 msgid "Use colors to display physical state at a given temperature" -msgstr "" -"Farben nutzen, um Aggregatszustände bei einer gegebenen Temperatur zu " -"kennzeichnen." +msgstr "Farben nutzen, um Aggregatszustände bei einer gegebenen Temperatur zu kennzeichnen." -#: ../programs/table/gchemtable-app.cc:153 -msgid "Family" -msgstr "Familie" - -#: ../programs/table/gchemtable-app.cc:154 +#: ../programs/table/gchemtable-app.cc:155 msgid "Use colors to display the family grouping of the elements" msgstr "Farben nutzen, um Elementgruppen zu kennzeichnen." -#: ../programs/table/gchemtable-app.cc:156 +#: ../programs/table/gchemtable-app.cc:157 msgid "Acidity" msgstr "Acidität" -#: ../programs/table/gchemtable-app.cc:157 +#: ../programs/table/gchemtable-app.cc:158 msgid "Use colors to display the acidity of the elements" msgstr "Farben nutzen, um die Azidität der Elemente zu kennzeichnen." +#: ../programs/table/gchemtable-app.cc:160 +msgid "Electronegativity" +msgstr "Elektronegativität" + #: ../programs/table/gchemtable-app.cc:161 +msgid "Use colors to display the electronegativity of the elements" +msgstr "Farben nutzen, um die Elektronegativität der Elemente zu kennzeichnen." + +#: ../programs/table/gchemtable-app.cc:163 +msgid "Atomic radius" +msgstr "Atomradius" + +#: ../programs/table/gchemtable-app.cc:164 +msgid "Use colors to display the covalent radii of the elements" +msgstr "Farben nutzen, um Kovalenzradien zu kennzeichnen." + +#: ../programs/table/gchemtable-app.cc:166 +msgid "Block" +msgstr "Block" + +#: ../programs/table/gchemtable-app.cc:167 +msgid "Use colors to display the blocks elements belong to" +msgstr "Farben nutzen, um die Blöcke zu kennzeichnen zu denen die Elemente gehören" + +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:248 msgid "View help for the Periodic Table" msgstr "Hilfe zu PSE anschauen" -#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-app.cc:181 +#: ../programs/table/gchemtable-curve.cc:260 msgid "About GChemTable" msgstr "Über GChemTable" +#: ../programs/table/gchemtable-app.cc:349 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "GChemTable enthält ein Periodensystem der Elemente" + #. The markup at the end of the chain is there to ensure that #. things will be correcly aligned, add the same to the translated string -#: ../programs/table/gchemtable-elt.cc:64 +#: ../programs/table/gchemtable-elt.cc:61 msgid "Electronic configuration: " msgstr "Elektronische Konfiguration: " -#: ../programs/table/gchemtable-elt.cc:76 +#: ../programs/table/gchemtable-elt.cc:73 msgid "Lang" msgstr "Sprache" -#: ../programs/table/gchemtable-elt.cc:83 +#: ../programs/table/gchemtable-elt.cc:80 msgid "Name" msgstr "Name" -#: ../programs/table/gchemtable-elt.cc:109 -#: ../programs/table/gchemtable-elt.cc:152 -#: ../programs/table/gchemtable-elt.cc:188 -#: ../programs/table/gchemtable-elt.cc:211 -#: ../programs/table/gchemtable-elt.cc:225 -#: ../programs/table/gchemtable-elt.cc:239 -#: ../programs/table/gchemtable-elt.cc:261 +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 msgid "n.a." msgstr "n.v." -#: ../programs/table/gchemtable-elt.cc:121 -#: ../programs/table/gchemtable-elt.cc:162 +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 #, c-format msgid "%d:" msgstr "%d:" -#: ../programs/table/gchemtable-elt.cc:273 +#: ../programs/table/gchemtable-elt.cc:271 msgid "Ion" msgstr "Ion" #. C.N. stands for coordination number -#: ../programs/table/gchemtable-elt.cc:280 +#: ../programs/table/gchemtable-elt.cc:278 msgid "C.N." msgstr "OZ" -#: ../programs/table/gchemtable-elt.cc:285 +#: ../programs/table/gchemtable-elt.cc:283 msgid "Spin" msgstr "Spin" -#: ../programs/table/gchemtable-elt.cc:292 +#: ../programs/table/gchemtable-elt.cc:290 msgid "Value" msgstr "Wert" -#: ../programs/table/gchemtable-elt.cc:311 +#: ../programs/table/gchemtable-elt.cc:310 msgid "Low" msgstr "Niedrig" -#: ../programs/table/gchemtable-elt.cc:314 +#: ../programs/table/gchemtable-elt.cc:313 msgid "High" msgstr "Hoch" -#: ../programs/table/gchemtable-curve.cc:183 -#: ../programs/table/gchemtable-curve.cc:187 +#: ../programs/table/gchemtable-curve.cc:238 +msgid "Modify the graph properties" +msgstr "Die Grapheigenschaften bearbeiten" + +#: ../programs/table/gchemtable-curve.cc:250 +#, fuzzy +msgid "View help for the Curve Window" +msgstr "Hilfe zum Kurvenfenster anschauen" + +#: ../programs/table/gchemtable-curve.cc:334 +#: ../programs/table/gchemtable-curve.cc:337 +#: ../programs/table/gchemtable-curve.cc:341 +#: ../programs/table/gchemtable-data.cc:560 msgid "Pauling electronegativity" msgstr "Elektronegativität nach Pauling" -#: ../programs/table/gchemtable-curve.cc:199 +#: ../programs/table/gchemtable-curve.cc:343 +#: ../programs/table/gchemtable-data.cc:564 +msgid "Electronic affinity" +msgstr "Elektronenaffinität" + +#: ../programs/table/gchemtable-curve.cc:346 msgid "Electron affinity (kJ/mol)" msgstr "Elektronenaffinität (kJ/mol)" -#: ../programs/table/gchemtable-curve.cc:203 +#: ../programs/table/gchemtable-curve.cc:350 msgid "Electron affinity" msgstr "Elektronenaffinität" -#: ../programs/table/gchemtable-curve.cc:217 +#: ../programs/table/gchemtable-curve.cc:356 +#: ../programs/table/gchemtable-data.cc:561 +msgid "First ionization energy" +msgstr "Erste Ionisierungsenergie" + +#: ../programs/table/gchemtable-curve.cc:357 msgid "1st. " msgstr "1. " -#: ../programs/table/gchemtable-curve.cc:220 +#: ../programs/table/gchemtable-curve.cc:360 +#: ../programs/table/gchemtable-data.cc:562 +msgid "Second ionization energy" +msgstr "Zweite Ionisierungsenergie" + +#: ../programs/table/gchemtable-curve.cc:361 msgid "2nd. " msgstr "2. " -#: ../programs/table/gchemtable-curve.cc:223 +#: ../programs/table/gchemtable-curve.cc:364 +#: ../programs/table/gchemtable-data.cc:563 +msgid "Third ionization energy" +msgstr "Dritte Ionisierungsenergie" + +#: ../programs/table/gchemtable-curve.cc:365 msgid "3rd. " msgstr "3. " -#: ../programs/table/gchemtable-curve.cc:226 +#: ../programs/table/gchemtable-curve.cc:368 #, c-format msgid "%dth. " msgstr "%d. " -#: ../programs/table/gchemtable-curve.cc:229 +#: ../programs/table/gchemtable-curve.cc:374 msgid "ionization energy (MJ/mol)" msgstr "Ionisationsenergie (MJ/mol)" -#: ../programs/table/gchemtable-curve.cc:236 +#: ../programs/table/gchemtable-curve.cc:381 msgid "ionization energy" msgstr "Ionisationsenergie" -#: ../programs/table/gchemtable-curve.cc:255 -#: ../programs/table/gchemtable-curve.cc:259 +#: ../programs/table/gchemtable-curve.cc:386 +#: ../programs/table/gchemtable-data.cc:565 +msgid "Covalent radius" +msgstr "Kovalenzradius" + +#: ../programs/table/gchemtable-curve.cc:389 +#: ../programs/table/gchemtable-curve.cc:393 msgid "Covalent radii" msgstr "Kovalenzradien" -#: ../programs/table/gchemtable-curve.cc:275 -#: ../programs/table/gchemtable-curve.cc:279 +#: ../programs/table/gchemtable-curve.cc:395 +#: ../programs/table/gchemtable-data.cc:566 +msgid "Van der Waals radius" +msgstr "Van-der-Waals-Radius" + +#: ../programs/table/gchemtable-curve.cc:398 +#: ../programs/table/gchemtable-curve.cc:402 msgid "Van der Waals radii" msgstr "Van-der-Walls-Radien" -#: ../programs/table/gchemtable-curve.cc:295 -#: ../programs/table/gchemtable-curve.cc:299 +#: ../programs/table/gchemtable-curve.cc:404 +#: ../programs/table/gchemtable-data.cc:567 +msgid "Metallic radius" +msgstr "Metallradius" + +#: ../programs/table/gchemtable-curve.cc:407 +#: ../programs/table/gchemtable-curve.cc:411 msgid "Metallic radii" msgstr "Metallradien" -#: ../programs/table/gchemtable-curve.cc:310 -#: ../programs/table/gchemtable-curve.cc:314 +#: ../programs/table/gchemtable-curve.cc:413 +#: ../programs/table/gchemtable-data.cc:568 +msgid "Fusion temperature" +msgstr "Schmelztemperatur" + +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 msgid "Melting point" msgstr "Schmelzpunkt" -#: ../programs/table/gchemtable-curve.cc:325 -#: ../programs/table/gchemtable-curve.cc:329 +#: ../programs/table/gchemtable-curve.cc:422 +#: ../programs/table/gchemtable-data.cc:569 +msgid "Ebullition temperature" +msgstr "Siedetemperatur" + +#: ../programs/table/gchemtable-curve.cc:425 +#: ../programs/table/gchemtable-curve.cc:429 msgid "Boiling point" msgstr "Siedepunkt" +#: ../programs/table/gchemtable-curve.cc:445 +#: ../programs/table/gchemtable-data.cc:558 +msgid "Atomic number" +msgstr "Ordnungszahl" + +#: ../programs/table/gchemtable-data-allocator.cc:175 +msgid "Invalid data" +msgstr "Ungültige Daten" + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:223 +msgid "Not supported" +msgstr "Nicht unterstützt" + +#: ../programs/table/gchemtable-data-allocator.cc:232 +msgid "None" +msgstr "Keine" + +#: ../programs/table/gchemtable-data.cc:559 +msgid "Atomic mass" +msgstr "Atommasse" + #: ../programs/table/gchemtable.desktop.in.h:1 msgid "A Mendeleiev table of the chemical elements" msgstr "Mendelejew's Periodensystem der Elemente" -#~ msgid "Other" -#~ msgstr "Andere" - -#~ msgid "h" -#~ msgstr "h" - -#~ msgid "k" -#~ msgstr "k" - -#~ msgid "l" -#~ msgstr "l" - -#~ msgid "x1" -#~ msgstr "x1" - -#~ msgid "y1" -#~ msgstr "y1" - -#~ msgid "z1" -#~ msgstr "z1" - -#~ msgid "x2" -#~ msgstr "x2" +#: ../programs/table/gchemtable.desktop.in.h:2 +msgid "Periodic table of the elements " +msgstr "Periodensystem der Elemente" -#~ msgid "y2" -#~ msgstr "y2" +#: ../templates/paint/haworth.xml.in.h:1 +msgid "Saccharides" +msgstr "Saccharide" + +#: ../templates/paint/haworth.xml.in.h:2 +msgid "α-D-deoxyribofuranose" +msgstr "α-D-Desoxyribofuranose" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "α-D-Fructofuranose" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "α-D-Galactopyranose" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "α-D-Glucopyranose" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "α-D-Ribofuranose" + +#: ../templates/paint/haworth.xml.in.h:7 +msgid "β-D-deoxyribofuranose" +msgstr "β-D-Desoxyribofuranose" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "β-D-Fructofuranose" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "β-D-Galactopyranose" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "β-D-Glucopyranose" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "β-D-Ribofuranose" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "Adenin" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "Adenosin" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "Alanin" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "Aminosäuren" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "Anthracen" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "Arginin" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "Aromatische Kohlenwasserstoffe" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "Asparagin" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "Asparaginsäure" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "Azulen" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "Benzol" + +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "Cystein" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "Cytidin" + +#: ../templates/paint/templates.xml.in.h:14 +msgid "Cytosine" +msgstr "Cytosin" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "Deoxyadenosin" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "Deoxycytidin" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "Deoxyguanosin" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "Deoxythymidin" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "Glutaminsäure" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "Glutamin" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "Glycin" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "Guanin" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "Guanosin" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "Histidin" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "Isoleucin" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "Leucin" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "Lysin" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "Methionin" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "Naphthalin" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "Nukleinbasen" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "Nukleoside" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "Phenanthren" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "Phenylalanin" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "Prolin" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "Pyren" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "Serin" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "Threonin" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "Thymin" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "Tryptophan" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "Tyrosin" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "Uracil" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "Uridin" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "Valin" + +#~ msgid "Author" +#~ msgstr "Autor" +#~ msgid "Comments" +#~ msgstr "Kommentare" +#~ msgid "E-mail:" +#~ msgstr "e-Mail:" +#~ msgid "Name:" +#~ msgstr "Name:" +#~ msgid "Title:" +#~ msgstr "Titel:" +#~ msgid "Copyright © 2005-2007 Jean Bréfort\n" +#~ msgstr "Copyright © 2005-2007 Jean Bréfort\n" + +#, fuzzy +#~ msgid "Chemical calculator @STABILITY_POSTFIX@" +#~ msgstr "Hilfe zu Chemie-Rechner anschauen" +#~ msgid "Copyright © 2007 Jean Bréfort\n" +#~ msgstr "Copyright © 2007 Jean Bréfort\n" +#~ msgid "Periodic table of the elements @STABILITY_POSTFIX@" +#~ msgstr "Periodensystem der Elemente @STABILITY_POSTFIX@" +#~ msgid "GChemPaint component" +#~ msgstr "GChemPaint-Komponente" +#~ msgid "GChemPaint component to draw 2D chemical formulas" +#~ msgstr "GChemPaint-Komponente zum Zeichnen von Strukturformeln in 2D" +#~ msgid "GChemPaint control" +#~ msgstr "GChemPaint-Steuerung" +#~ msgid "GChemPaint control to display 2D chemical formulas" +#~ msgstr "GChemPaint-Steuerung zum Anzeigen von Strukturformeln in 2D" +#~ msgid "GChemPaint embeddable factory" +#~ msgstr "GChemPaint einbettbare Einheit" +#~ msgid "GChemPaint object factory" +#~ msgstr "GChemPaint Objekt-Dienste" +#~ msgid "(C) 2001-2005 by Jean Bréfort" +#~ msgstr "(C) 2001-2005 by Jean Bréfort" +#~ msgid "GChemPaint help contents" +#~ msgstr "Inhalt GChemPaint-Hilfe" +#~ msgid "_Save All" +#~ msgstr "Alle _speichern" +#~ msgid "_Close All" +#~ msgstr "Alle s_chließen" +#~ msgid "Close all open files" +#~ msgstr "Alle offenen Dateien schließen" +#~ msgid "_Periodic table" +#~ msgstr "_Periodensystem" +#~ msgid "Tools Options" +#~ msgstr "Werkzeugoptionen" +#~ msgid "Variable size cycle tool" +#~ msgstr "Zeichnet Ring mit variabler Anzahl von Ringgliedern" +#~ msgid "GChemPaint Templates" +#~ msgstr "GChemPaint Vorlagen" +#~ msgid "Arrows toolbar" +#~ msgstr "Pfeile-Werkzeugleiste" +#~ msgid "Double arrow tool" +#~ msgstr "Werkzeug für Gleichgewichtspfeil" +#~ msgid "Mesomery arrow tool" +#~ msgstr "Werkzeug für Mesomeriepfeile" +#~ msgid "Retrosynthesis arrow tool" +#~ msgstr "Werkzeug für Retrosynthesepfeile" +#~ msgid "Simple arrow tool" +#~ msgstr "Werkzeug für einfache Pfeile" +#~ msgid "Atoms toolbar" +#~ msgstr "Atome-Werkzeugleiste" +#~ msgid "Electron pair tool" +#~ msgstr "Werkzeug für Elektronenpaare" +#~ msgid "Element tool" +#~ msgstr "Werkzeug für Elemente" +#~ msgid "Negative Charge tool" +#~ msgstr "Werkzeug für negative Ladung" +#~ msgid "Positive Charge tool" +#~ msgstr "Werkzeug für positive Ladung" +#~ msgid "Unpaired electron tool" +#~ msgstr "Werkzeug für ungepaarte Elektronen" +#~ msgid "Bond tool" +#~ msgstr "Werkzeug für Bindungen" +#~ msgid "Bonds toolbar" +#~ msgstr "Bindungen-Werkzeugleiste" +#~ msgid "Hash bond" +#~ msgstr "Gestrichelte Bindung" +#~ msgid "Squiggle bond" +#~ msgstr "Racemische Bindung" +#~ msgid "Wedge bond" +#~ msgstr "Stereospezifische Bindung" +#~ msgid "Cycles toolbar" +#~ msgstr "Werkzeug für Ringsysteme" +#~ msgid "Four atoms cycle tool" +#~ msgstr "Werkzeug für viergliedrige Ringe" +#~ msgid "Three atoms cycle tool" +#~ msgstr "Werkzeug für dreigliedrige Ringe" +#~ msgid "Eraser tool" +#~ msgstr "Radierer-Werkzeug" +#~ msgid "Horizontal flip tool" +#~ msgstr "Werkzeug zum horizontalen Spiegeln" +#~ msgid "Merge molecules tool" +#~ msgstr "Werkzeug um Moleküle miteinander zu vereinen" +#~ msgid "Rotate" +#~ msgstr "Drehen" +#~ msgid "Rotation tool" +#~ msgstr "Werkzeug zum Drehen" +#~ msgid "Selection" +#~ msgstr "Auswahl" +#~ msgid "Selection tool" +#~ msgstr "Auswahl-Werkzeug" +#~ msgid "Selection toolbar" +#~ msgstr "Auswahl-Werkzeugleiste" +#~ msgid "Vertical flip tool" +#~ msgstr "Werkzeug zum vertikalen Spiegeln" +#~ msgid "Change current template" +#~ msgstr "Die aktuelle Vorlage ändern" +#~ msgid "Templates selector" +#~ msgstr "Vorlagenauswahl" +#~ msgid "Templates tool" +#~ msgstr "Werkzeug für Vorlagen" +#~ msgid "Templates toolbar" +#~ msgstr "Vorlagen-Werkzeugleiste" +#~ msgid "Bold" +#~ msgstr "Fett" +#~ msgid "Fragment" +#~ msgstr "Atomgruppe" +#~ msgid "Fragment tool" +#~ msgstr "Atomgruppen-Werkzeug" +#~ msgid "Italic" +#~ msgstr "Kursiv" +#~ msgid "Subscript" +#~ msgstr "Tiefgestellt" +#~ msgid "Superscript" +#~ msgstr "Hochgestellt" +#~ msgid "Text tool" +#~ msgstr "Werkzeug zur Texteingabe" +#~ msgid "Text toolbar" +#~ msgstr "Text-Werkzeugleiste" +#~ msgid "About GChemPaint..." +#~ msgstr "Über GChemPaint..." +#~ msgid "Displays copyright and contributors of GChemPaint" +#~ msgstr "Lizenzinformationen und Mitwirkende von GChemPaint anzeigen" +#~ msgid "Edit file propeties" +#~ msgstr "Dateieigenschaften bearbeiten" +#~ msgid "GChemPaint T_ools" +#~ msgstr "GChemPaint _Werkzeuge" +#~ msgid "Print file to the printer" +#~ msgstr "Datei an den Drucker senden" +#~ msgid "Proper_ties" +#~ msgstr "_Eigenschaften" +#~ msgid "Show tools window" +#~ msgstr "Werkzeugfenster anzeigen" +#~ msgid "_Print" +#~ msgstr "_Drucken" +#~ msgid "GChemPaint document" +#~ msgstr "GChemPaint-Dokument" +#~ msgid "Documents" +#~ msgstr "Dokumente" +#~ msgid "Type a number between %g and %g" +#~ msgstr "Geben Sie eine Zahl zwischen %g und %g ein" +#~ msgid "Sorry, not yet implemented!" +#~ msgstr "Entschuldigung, das ist noch nicht implementiert!" +#~ msgid "Editable file flag" +#~ msgstr "Schreibschutzoption" +#~ msgid "Paste the clipborad" +#~ msgstr "Den Inhalt aus der Zwischenablage einfügen" +#~ msgid "Electron pair move arrow tool" +#~ msgstr "Werkzeug für Elektonenpaar-Verschiebepfeile" +#~ msgid "Single electron move arrow tool" +#~ msgstr "Werkzeug für Verschiebepfeile einzelner Elektronen" +#~ msgid "Delocalized bonds" +#~ msgstr "Delokalisierte Bindungen" +#~ msgid "Jean Bréfort : French" +#~ msgstr "Jean Bréfort : Französisch" +#~ msgid "Christian Neumair : German" +#~ msgstr "Christian Neumair : Deutsch" +#~ msgid "Ben Luo: Chinese" +#~ msgstr "Ben Luo: Chinesisch" +#~ msgid "Michał Sałaban: Polish" +#~ msgstr "Michał Sałaban: Polnisch" +#~ msgid "Nikodem Kuznik: Polish" +#~ msgstr "Nikodem Kuznik: Polnisch" +#~ msgid "Save _As" +#~ msgstr "Speichern _unter" -#~ msgid "z2" -#~ msgstr "z2" diff -Nru gnome-chemistry-utils-0.8.6/po/es.po gnome-chemistry-utils-0.10.9/po/es.po --- gnome-chemistry-utils-0.8.6/po/es.po 2007-05-10 14:07:17.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/es.po 2009-11-14 11:30:40.000000000 +0100 @@ -2,12 +2,12 @@ # Copyright (C) 2000-2001 Free Software Foundation, Inc. # Jean Bréfort , 2000. # Jean Bréfort , 2002. -# +# msgid "" msgstr "" "Project-Id-Version: 0.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-05-09 09:18+0200\n" +"POT-Creation-Date: 2008-08-23 13:53+0200\n" "PO-Revision-Date: 2002-02-25 15:53-0600\n" "Last-Translator: Tigrux \n" "Language-Team: Spanish/Mexico\n" @@ -15,12 +15,176 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../gchemutils.xml.in.h:1 ../programs/crystal/x-gcrystal.desktop.in.h:1 +#: ../gchemutils.schemas.in.h:1 +#, fuzzy +msgid "Default Bottom Margin" +msgstr "Vista predeterminada" + +#: ../gchemutils.schemas.in.h:2 +#, fuzzy +msgid "Default Left Margin" +msgstr "Vista predeterminada" + +#: ../gchemutils.schemas.in.h:3 +#, fuzzy +msgid "Default Top Margin" +msgstr "Vista predeterminada" + +#: ../gchemutils.schemas.in.h:4 +#, fuzzy +msgid "Default Top Outside Margin" +msgstr "Vista predeterminada" + +#: ../gchemutils.schemas.in.h:5 +msgid "Footer height" +msgstr "" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "" + +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "" + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +msgid "2D Chemical structure" +msgstr "" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 #, fuzzy msgid "Crystalline structure model" msgstr "C_ristal" -#: ../glade/gchemcalc.glade.h:1 ../programs/calc/gchemcalc.desktop.in.h:2 +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "" + +#: ../database/residues.xml.in.h:5 +msgid "Benzyl" +msgstr "" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "" + +#: ../database/residues.xml.in.h:8 +msgid "Halogen" +msgstr "" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "" + +#: ../database/residues.xml.in.h:12 +msgid "Metal" +msgstr "" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "" + +#: ../database/residues.xml.in.h:14 +msgid "Phenyl" +msgstr "" + +#: ../database/residues.xml.in.h:15 +msgid "Propyl" +msgstr "" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "" + +#: ../glade/gchemcalc.glade.h:1 msgid "Chemical calculator" msgstr "" @@ -28,7 +192,7 @@ msgid "Composition" msgstr "" -#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:166 +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 msgid "Formula:" msgstr "" @@ -44,7 +208,7 @@ msgid "Monoisotopic mass:" msgstr "" -#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:169 +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 msgid "Raw formula:" msgstr "" @@ -70,6 +234,155 @@ msgid "Image resolution:" msgstr "Resolución de la impresora:" +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "" + +#: ../glade/print-setup.glade.h:4 +msgid "O_rientation:" +msgstr "" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "" + +#: ../glade/print-setup.glade.h:7 +#, fuzzy +msgid "Bottom margin:" +msgstr "Abajo" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "" + +#: ../glade/print-setup.glade.h:11 +#, fuzzy +msgid "Footer:" +msgstr "Color:" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:16 +msgid "Page" +msgstr "" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "" + +#: ../glade/print-setup.glade.h:18 +msgid "Portrait" +msgstr "" + +#: ../glade/print-setup.glade.h:19 +msgid "Reload defaults" +msgstr "" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:23 +msgid "Save as defaults" +msgstr "" + +#: ../glade/print-setup.glade.h:24 +#, fuzzy +msgid "Scale" +msgstr "Salvar" + +#: ../glade/print-setup.glade.h:25 +msgid "Scale to fit _horizontally on" +msgstr "" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "" + +#: ../glade/print-setup.glade.h:29 +msgid "_Automatic scaling:" +msgstr "" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:33 +msgid "_Horizontally" +msgstr "" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "" + +#: ../glade/print-setup.glade.h:35 +msgid "_Vertically" +msgstr "" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:407 +#: ../libs/gcp/preferences.cc:481 ../libs/gcp/preferences.cc:531 +msgid "Bonds" +msgstr "" + #: ../glade/crystal/cell.glade.h:1 #, fuzzy msgid "Cell" @@ -125,6 +438,47 @@ msgid "γ (°):" msgstr "" +#: ../glade/crystal/docprop.glade.h:1 ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 +msgid "*" +msgstr "" + +#: ../glade/crystal/docprop.glade.h:2 +#, fuzzy +msgid "Author" +msgstr "Átomos" + +#: ../glade/crystal/docprop.glade.h:3 +#, fuzzy +msgid "Comments" +msgstr "Documentos" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +#, fuzzy +msgid "Document properties" +msgstr "Documentos" + +#: ../glade/crystal/docprop.glade.h:6 +msgid "E-mail:" +msgstr "" + +#: ../glade/crystal/docprop.glade.h:7 +#, fuzzy +msgid "Name:" +msgstr "Nouveau" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "" + +#: ../glade/crystal/docprop.glade.h:9 +msgid "Title:" +msgstr "" + #: ../glade/crystal/prefs.glade.h:1 msgid "" "300\n" @@ -158,7 +512,7 @@ #: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 #, fuzzy -msgid "Field of view (between 1° and 45°):" +msgid "Field of view (between 1 and 45°):" msgstr "Ángulo del campo visual (entre 1 y 45°):" #: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 @@ -186,45 +540,60 @@ msgstr "" #: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:395 +#: ../libs/gcp/preferences.cc:469 ../libs/gcp/preferences.cc:519 msgid "Atoms" msgstr "Átomos" -#: ../glade/crystal/atoms.glade.h:2 +#: ../glade/crystal/atoms.glade.h:3 msgid "Charge: " msgstr "" -#: ../glade/crystal/atoms.glade.h:3 +#: ../glade/crystal/atoms.glade.h:4 #, fuzzy msgid "Custom" msgstr "Color:" -#: ../glade/crystal/atoms.glade.h:4 +#: ../glade/crystal/atoms.glade.h:5 #, fuzzy msgid "Custom color:" msgstr "Color:" -#: ../glade/crystal/atoms.glade.h:5 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 #: ../glade/crystal/lines.glade.h:2 msgid "Dele_te all" msgstr "Borrar _todo" -#: ../glade/crystal/atoms.glade.h:6 ../gcu/gtkcomboperiodic.c:96 -#: ../programs/table/gchemtable-app.cc:252 -#: ../programs/table/gchemtable.desktop.in.h:2 +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:261 msgid "Periodic table of the elements" msgstr "Tabla periódica de los elementos" -#: ../glade/crystal/atoms.glade.h:7 +#: ../glade/crystal/atoms.glade.h:8 #, fuzzy msgid "Radius" msgstr "Radio (pm) :" -#: ../glade/crystal/atoms.glade.h:8 +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:13 #, fuzzy msgid "Type:" msgstr "Tipo" -#: ../glade/crystal/atoms.glade.h:9 +#: ../glade/crystal/atoms.glade.h:14 msgid "" "Unknown\n" "Ionic\n" @@ -233,21 +602,21 @@ "Van der Waals" msgstr "" -#: ../glade/crystal/atoms.glade.h:14 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/atoms.glade.h:19 +#, fuzzy +msgid "Value (pm):" +msgstr "Radio (pm) :" + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 #: ../glade/crystal/lines.glade.h:7 msgid "_Add" msgstr "_Agregar" -#: ../glade/crystal/atoms.glade.h:15 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 #: ../glade/crystal/lines.glade.h:8 msgid "_Delete" msgstr "_Borrar" -#: ../glade/crystal/atoms.glade.h:16 -#, fuzzy -msgid "value (pm):" -msgstr "Radio (pm) :" - #: ../glade/crystal/cleavages.glade.h:1 msgid "Cleavages" msgstr "Clivajes" @@ -291,10 +660,6 @@ msgid "radius (pm):" msgstr "Radio (pm) :" -#: ../glade/crystal/size.glade.h:1 -msgid "*" -msgstr "" - #: ../glade/crystal/size.glade.h:2 #, fuzzy msgid "Crystal size" @@ -312,107 +677,427 @@ msgid "Minimum" msgstr "Mínimo" -#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:143 +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 msgid "x" msgstr "" -#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:153 +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 msgid "y" msgstr "" -#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:163 +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 msgid "z" msgstr "" -#: ../glade/table/eltpage.glade.h:1 -msgid "1:" +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" msgstr "" -#: ../glade/table/eltpage.glade.h:2 -msgid "Atomic number:" +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" msgstr "" -#: ../glade/table/eltpage.glade.h:3 -msgid "Atomic weight:" +#: ../glade/paint/arrow-object.glade.h:3 +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-close" msgstr "" -#: ../glade/table/eltpage.glade.h:4 -msgid "Boiling point:" +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +#: ../plugins/paint/residues/residues.glade.h:10 +msgid "gtk-help" msgstr "" -#: ../glade/table/eltpage.glade.h:5 -msgid "Covalent:" +#: ../glade/paint/docprop.glade.h:1 +msgid "Author:" msgstr "" -#: ../glade/table/eltpage.glade.h:6 -msgid "Electronic affinities:" +#: ../glade/paint/docprop.glade.h:2 +msgid "History" msgstr "" -#: ../glade/table/eltpage.glade.h:7 -msgid "Electronic properties" +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" msgstr "" -#: ../glade/table/eltpage.glade.h:8 -msgid "Ionic radii (Shannon and Prewitt):" +#: ../glade/paint/docprop.glade.h:4 +msgid "_Comments:" msgstr "" -#: ../glade/table/eltpage.glade.h:9 -msgid "Ionization energies:" +#: ../glade/paint/docprop.glade.h:7 +msgid "E-_mail:" msgstr "" -#: ../glade/table/eltpage.glade.h:10 -msgid "Isotopes" +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +msgid "Theme:" msgstr "" -#: ../glade/table/eltpage.glade.h:11 -msgid "Main" -msgstr "" +#: ../glade/paint/docprop.glade.h:10 +#: ../plugins/paint/residues/residues.glade.h:6 +#, fuzzy +msgid "_Name:" +msgstr "Nouveau" -#: ../glade/table/eltpage.glade.h:12 -msgid "Melting point:" -msgstr "" +#: ../glade/paint/docprop.glade.h:11 +#, fuzzy +msgid "_Title:" +msgstr "Archivo nuevo" -#: ../glade/table/eltpage.glade.h:13 -msgid "Metallic:" +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1879 +#, fuzzy +msgid "Hydrogen atoms position" +msgstr "Posición de las pestañas" + +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" msgstr "" -#: ../glade/table/eltpage.glade.h:14 -msgid "Pauling electronegativity:" +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" msgstr "" -#: ../glade/table/eltpage.glade.h:15 -#, fuzzy -msgid "Radii" -msgstr "Radio (pm) :" +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "" -#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:133 -msgid "Show curve" +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" msgstr "" -#: ../glade/table/eltpage.glade.h:17 -msgid "Thermodynamics" +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" msgstr "" -#: ../glade/table/eltpage.glade.h:18 -msgid "Van der Waals:" +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" msgstr "" -#: ../glade/table/state-thermometer.glade.h:1 -msgid " Solid " +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" msgstr "" -#: ../glade/table/state-thermometer.glade.h:2 -msgid " Liquid " +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" msgstr "" -#: ../glade/table/state-thermometer.glade.h:3 -msgid " Gas " +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:6 +#, fuzzy +msgid "Angl_e:" +msgstr "Tamaño" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "" + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:16 +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" + +#: ../glade/paint/preferences.glade.h:17 +msgid "Dist_ance:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "" + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:23 +msgid "" +"Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:25 +#, fuzzy +msgid "GChemPaint Preferences" +msgstr "Preferencias" + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:28 +#, fuzzy +msgid "Ha_ve a tearable table of the elements" +msgstr "Tabla periódica de los elementos" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:30 +#, fuzzy +msgid "N_ame:" +msgstr "Nouveau" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:38 +#, fuzzy +msgid "Wid_th" +msgstr "Ancho:" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "" + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:41 +#, fuzzy +msgid "_Default theme:" +msgstr "Vista predeterminada" + +#: ../glade/paint/preferences.glade.h:42 +msgid "_Distance:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:45 +#, fuzzy +msgid "_Scale:" +msgstr "Salvar" + +#: ../glade/paint/preferences.glade.h:46 +#, fuzzy +msgid "_Width:" +msgstr "Ancho:" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "" + +#: ../glade/paint/zoom.glade.h:1 +#, fuzzy +msgid "Zoom" +msgstr "Abajo" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr "" + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr "" + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr "" + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr "" + +#: ../glade/table/eltpage.glade.h:1 +msgid "1:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:2 +msgid "Atomic number:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:3 +msgid "Atomic weight:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:4 +msgid "Boiling point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:5 +msgid "Covalent:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:6 +msgid "Electronic affinities:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:7 +msgid "Electronic properties" +msgstr "" + +#: ../glade/table/eltpage.glade.h:8 +msgid "Ionic radii (Shannon and Prewitt):" +msgstr "" + +#: ../glade/table/eltpage.glade.h:9 +msgid "Ionization energies:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:10 +msgid "Isotopes" +msgstr "" + +#: ../glade/table/eltpage.glade.h:11 +msgid "Main" +msgstr "" + +#: ../glade/table/eltpage.glade.h:12 +msgid "Melting point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:13 +msgid "Metallic:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:14 +msgid "Pauling electronegativity:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:15 +#, fuzzy +msgid "Radii" +msgstr "Radio (pm) :" + +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 +msgid "Show curve" +msgstr "" + +#: ../glade/table/eltpage.glade.h:17 +msgid "Thermodynamics" +msgstr "" + +#: ../glade/table/eltpage.glade.h:18 +msgid "Van der Waals:" +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:1 +msgid " Solid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:2 +msgid " Liquid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:3 +msgid " Gas " msgstr "" #: ../glade/table/state-thermometer.glade.h:4 msgid "Temperature (K):" msgstr "" +#: ../glade/table/curve.glade.h:1 +msgid "GChemTable Graph" +msgstr "" + #: ../glade/table/family.glade.h:1 msgid "" "All\n" @@ -432,6 +1117,30 @@ msgid "Selected Family:" msgstr "Elegir un color" +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" + #: ../database/elements.xml.in.h:1 #, fuzzy msgid "Actinium" @@ -924,511 +1633,2210 @@ msgid "tritium" msgstr "" -#: ../gcu/application.cc:181 -#, c-format -msgid "(screen resolution is %u)" +#: ../goffice/plugin.xml.in.h:1 +msgid "2D Chemical Structures Viewer/Editor" msgstr "" -#: ../gcu/crystaldoc.cc:403 -msgid "Everything has been cleaved" -msgstr "Todo ha sido dividido" - -#: ../gcu/dialog.cc:125 -msgid "Type a number" -msgstr "Escriba un número" - -#: ../gcu/dialog.cc:134 -#, fuzzy, c-format -msgid "Type a number greater than or equal %g and lower than to %g" -msgstr "Escriba un número mayor que %g" - -#: ../gcu/dialog.cc:144 -#, fuzzy, c-format -msgid "Type a number greater than %g and lower than or equal to %g" -msgstr "Escriba un número mayor que %g" - -#: ../gcu/dialog.cc:154 -#, fuzzy, c-format -msgid "Type a number between %g and %g, the limits are valid." -msgstr "Escriba un número entre %g y %g" - -#: ../gcu/dialog.cc:164 -#, fuzzy, c-format -msgid "Type a number greater than %g and lower than %g" -msgstr "Escriba un número mayor que %g" - -#: ../gcu/dialog.cc:174 -#, fuzzy, c-format -msgid "Type a number lower than %g" -msgstr "Escriba un número mayor que %g" +#: ../goffice/plugin.xml.in.h:2 +msgid "Chemical structures" +msgstr "" -#: ../gcu/dialog.cc:184 -#, c-format -msgid "Type a number greater than %g" -msgstr "Escriba un número mayor que %g" +#: ../goffice/plugin.xml.in.h:3 +msgid "Chemical structures component engine" +msgstr "" -#: ../gcu/dialog.cc:194 -#, fuzzy, c-format -msgid "Type a number lower than or equal to %g" -msgstr "Escriba un número mayor que %g" +#: ../goffice/plugin.xml.in.h:4 +msgid "Component : GChemPaint" +msgstr "" -#: ../gcu/dialog.cc:204 +#: ../goffice/gogcpapp.cc:182 ../programs/paint/standaloneapp.cc:46 #, fuzzy, c-format -msgid "Type a number greater than or equal to %g" -msgstr "Escriba un número mayor que %g" +msgid "Untitled %d" +msgstr "SinNombre%d" -#: ../gcu/element.cc:99 -msgid "German" +#: ../goffice/gogcpwin.cc:88 +msgid "Embedded GChemPaint Object" msgstr "" -#: ../gcu/element.cc:100 -msgid "French" +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" msgstr "" -#: ../gcu/element.cc:101 -msgid "Italian" +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" msgstr "" -#: ../gcu/element.cc:102 -msgid "Polish" +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" msgstr "" -#: ../gcu/element.cc:103 -msgid "Russian" +#: ../libs/canvas/gcp-canvas-pango.c:376 +msgid "X position" msgstr "" -#: ../gcu/element.cc:106 -msgid "Can't find and read elements.xml" +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" msgstr "" -#: ../gcu/element.cc:111 ../gcu/element.cc:118 -msgid "Incorrect file format: elements.xml" +#: ../libs/canvas/gcp-canvas-pango.c:384 +msgid "Y position" msgstr "" -#: ../gcu/element.cc:151 -msgid "English" -msgstr "" +#: ../libs/canvas/gcp-canvas-pango.c:391 +#, fuzzy +msgid "Width" +msgstr "Ancho:" -#: ../gcu/element.cc:430 -msgid "Can't find and read radii.xml" +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" msgstr "" -#: ../gcu/element.cc:435 ../gcu/element.cc:446 -msgid "Incorrect file format: radii.xml" -msgstr "" +#: ../libs/canvas/gcp-canvas-pango.c:399 +#, fuzzy +msgid "Height" +msgstr "Alto:" -#: ../gcu/element.cc:530 -msgid "Can't find and read elecprops.xml" +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" msgstr "" -#: ../gcu/element.cc:535 ../gcu/element.cc:540 -msgid "Incorrect file format: elecprops.xml" +#: ../libs/canvas/gcp-canvas-pango.c:407 +msgid "Anchor" msgstr "" -#: ../gcu/element.cc:688 -msgid "Can't find and read isotopes.xml" +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" msgstr "" -#: ../gcu/element.cc:693 ../gcu/element.cc:700 -msgid "Incorrect file format: isotopes.xml" +#: ../libs/canvas/gcp-canvas-pango.c:416 +#, fuzzy +msgid "Color" +msgstr "Color:" + +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" msgstr "" -#: ../gcu/filechooser.cc:40 +#: ../libs/canvas/gcp-canvas-pango.c:424 #, fuzzy -msgid "Save as" -msgstr "Salvar" +msgid "Editing" +msgstr "Impresión" -#: ../gcu/filechooser.cc:40 -msgid "Open" -msgstr "Abrir" +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" +msgstr "" -#: ../gcu/filechooser.cc:59 -msgid "File _type:" +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:139 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:363 +msgid "translator_credits" +msgstr "" + +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" msgstr "" -#: ../gcu/filechooser.cc:61 +#: ../libs/gcp/about.cc:56 #, fuzzy -msgid "Automatic" -msgstr "Átomos" +msgid "Copyright © 2001-2007 by Jean Bréfort" +msgstr "(C) 1999-2001 por Jean Bréfort" -#: ../gcu/formula.cc:391 ../gcu/formula.cc:429 -msgid "Unmatched parenthesis" -msgstr "" +#: ../libs/gcp/application.cc:303 +#, fuzzy +msgid "Create a new reaction" +msgstr "O_uvrir dans une nouvelle fenêtre..." -#: ../gcu/formula.cc:417 -msgid "Could not interpret the symbol list" +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" msgstr "" -#: ../gcu/formula.cc:423 -msgid "Parser failed, please fill a bug report." +#: ../libs/gcp/application.cc:504 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" msgstr "" +"Introduzca un nombre de archivo,\n" +"no un directorio" -#: ../gcu/formula.cc:431 -msgid "Invalid character" +#: ../libs/gcp/application.cc:546 +#, c-format +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." msgstr "" -#: ../gcu/glview.cc:486 +#: ../libs/gcp/application.cc:575 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 #, c-format -msgid "Unable to save image file: %s\n" +msgid "" +"File %s\n" +"exists, overwrite?" msgstr "" +"El archivo %s\n" +"existe, sobreescribir ?" -#: ../gcu/gtkchem3dviewer.cc:154 -#, fuzzy -msgid "Background Color" -msgstr "Color de fondo:" +#: ../libs/gcp/application.cc:588 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 +#, c-format +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" -#: ../gcu/gtkchem3dviewer.cc:155 -msgid "Color used to paint the background" +#: ../libs/gcp/application.cc:796 ../libs/gcp/application.cc:924 +msgid "No filename" msgstr "" -#: ../gcu/gtkperiodic.c:334 -#, c-format +#: ../libs/gcp/application.cc:799 +#, fuzzy, c-format msgid "" -"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" -"p\n" +"Could not open file\n" +"%s" msgstr "" +"No pudo guardar archivo\n" +"%s" -#: ../programs/3d/application.cc:35 ../programs/3d/application.cc:46 -msgid "GChem3D Viewer" +#: ../libs/gcp/application.cc:802 ../libs/gcp/application.cc:936 +#, c-format +msgid "%s: parse error." msgstr "" -#: ../programs/3d/application.cc:92 -msgid "Sorry, format not supported!" +#: ../libs/gcp/application.cc:927 ../programs/crystal/document.cc:274 +#, c-format +msgid "" +"Could not load file\n" +"%s" msgstr "" +"No pudo cargar archivo\n" +"%s" -#: ../programs/3d/application.cc:102 ../programs/crystal/application.cc:214 +#: ../libs/gcp/application.cc:930 ../programs/crystal/document.cc:277 #, c-format msgid "" -"File %s\n" -"exists, overwrite?" +"%s: invalid xml file.\n" +"Tree is empty?" msgstr "" -"El archivo %s\n" -"existe, sobreescribir ?" +"%s: archivo XML inválido.\n" +"Quizá el árbol está vació?" + +#: ../libs/gcp/application.cc:933 ../programs/crystal/document.cc:280 +#, c-format +msgid "%s: invalid file format." +msgstr "%s: formato de archivo inválido" -#: ../programs/3d/application.cc:147 ../programs/crystal/application.cc:145 +#: ../libs/gcp/application.cc:968 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 #, fuzzy msgid "Save as image" msgstr "Salvar archivo" -#: ../programs/3d/main.cc:40 -msgid "GChem3d Viewer version: " +#: ../libs/gcp/atom.cc:1861 ../libs/gcp/atom.cc:1875 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +#, fuzzy +msgid "Atom" +msgstr "Átomos" + +#: ../libs/gcp/atom.cc:1864 +msgid "Display symbol" msgstr "" -#: ../programs/3d/main.cc:51 -msgid "Prints GChem3d Viewer version" +#: ../libs/gcp/atom.cc:1864 +msgid "Whether to display carbon atom symbol or not" msgstr "" -#: ../programs/3d/main.cc:52 -msgid "Background color: white, black or #rrggbb (default is black)" +#: ../libs/gcp/bond.cc:980 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" msgstr "" -#: ../programs/3d/main.cc:53 -msgid "" -"How molecules are displayed; possible values are BallnStick (the default) " -"and SpaceFill" +#: ../libs/gcp/bond.cc:984 +msgid "Move to back" msgstr "" -#: ../programs/3d/main.cc:75 -#, fuzzy -msgid " [file]" -msgstr "Archivo nuevo" +#: ../libs/gcp/bond.cc:991 +msgid "Bring to front" +msgstr "" -#: ../programs/3d/main.cc:97 ../programs/crystal/main.cc:145 -#, c-format -msgid "Invalid or misplaced argument: %s\n" +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +msgid "%A, %B %d, %Y" msgstr "" -#: ../programs/3d/window.cc:119 -msgid "GChem3D is a molecular structures viewer for Gnome" +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:148 +msgid "Family" msgstr "" -#. const gchar * documentors[] = {NULL}; -#: ../programs/3d/window.cc:121 -#, fuzzy -msgid "Copyright © 2004-2007 Jean Bréfort\n" -msgstr "(C) 1999-2001 por Jean Bréfort" +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "" -#. Note to translators: replace the following string with the appropriate credits for you lang -#: ../programs/3d/window.cc:139 ../programs/calc/gchemcalc.cc:146 -#: ../programs/crystal/window.cc:120 ../programs/table/gchemtable-app.cc:122 -msgid "translator_credits" +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" msgstr "" -#: ../programs/3d/window.cc:161 ../programs/calc/gchemcalc.cc:406 -#: ../programs/crystal/window.cc:247 ../programs/table/gchemtable-app.cc:141 -#, fuzzy -msgid "_File" -msgstr "Archivo nuevo" +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "" -#: ../programs/3d/window.cc:162 ../programs/crystal/window.cc:250 +#: ../libs/gcp/fontsel.cc:296 #, fuzzy -msgid "_Open..." -msgstr "Abrir" +msgid "Weight" +msgstr "Derecha" -#: ../programs/3d/window.cc:163 ../programs/crystal/window.cc:251 -#, fuzzy -msgid "Open a file" -msgstr "Abrir archivo" +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "" -#: ../programs/3d/window.cc:164 ../programs/crystal/window.cc:256 -#, fuzzy -msgid "Save As _Image..." -msgstr "Guardar modelo como..." +#: ../libs/gcp/fontsel.cc:301 +msgid "Variant" +msgstr "" -#: ../programs/3d/window.cc:165 ../programs/crystal/window.cc:257 -#, fuzzy -msgid "Save the current file as an image" -msgstr "Salvar archivo" +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" +msgstr "" -#: ../programs/3d/window.cc:166 ../programs/crystal/window.cc:258 -#, fuzzy -msgid "_Print..." -msgstr "Imprimir" +#: ../libs/gcp/fontsel.cc:306 +msgid "Stretch" +msgstr "" -#: ../programs/3d/window.cc:167 -msgid "Print the current scene" +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" msgstr "" -#: ../programs/3d/window.cc:168 ../programs/crystal/window.cc:260 +#: ../libs/gcp/fontsel.cc:311 #, fuzzy -msgid "_Close" -msgstr "Cerrar" +msgid "Size" +msgstr "_Tamaño" -#: ../programs/3d/window.cc:169 ../programs/crystal/window.cc:261 -#, fuzzy -msgid "Close the current file" +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" msgstr "" -"No pudo guardar archivo\n" -"%s" - -#: ../programs/3d/window.cc:170 ../programs/calc/gchemcalc.cc:407 -#: ../programs/crystal/window.cc:262 ../programs/table/gchemtable-app.cc:142 -#, fuzzy -msgid "_Quit" -msgstr "Salir" -#: ../programs/3d/window.cc:171 -msgid "Quit GChem3D" +#: ../libs/gcp/fragment.cc:685 ../libs/gcp/fragment.cc:1209 +msgid "Invalid charge." msgstr "" -#: ../programs/3d/window.cc:172 ../programs/crystal/window.cc:278 -#: ../programs/table/gchemtable-app.cc:144 -#, fuzzy -msgid "_View" -msgstr "_Nuevo" +#: ../libs/gcp/fragment.cc:1182 +msgid "Invalid symbol." +msgstr "" -#: ../programs/3d/window.cc:173 ../programs/calc/gchemcalc.cc:409 -#: ../programs/crystal/window.cc:286 ../programs/table/gchemtable-app.cc:159 -msgid "_Help" +#: ../libs/gcp/mesomer.cc:76 +msgid "Only one arrow can link two given mesomers." msgstr "" -#: ../programs/3d/window.cc:174 ../programs/calc/gchemcalc.cc:410 -#: ../programs/crystal/window.cc:287 ../programs/table/gchemtable-app.cc:160 -#, fuzzy -msgid "_Contents" -msgstr "Coordenadas" +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "" -#: ../programs/3d/window.cc:175 -msgid "View help for the Molecules Viewer" +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" msgstr "" -#: ../programs/3d/window.cc:176 ../programs/calc/gchemcalc.cc:412 -#: ../programs/crystal/window.cc:289 ../programs/table/gchemtable-app.cc:162 -msgid "Gnome Chemistry Utils on the _web" +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" msgstr "" -#: ../programs/3d/window.cc:177 ../programs/calc/gchemcalc.cc:413 -#: ../programs/crystal/window.cc:290 ../programs/table/gchemtable-app.cc:163 -msgid "Browse the Gnome Chemistry Utils's web site" +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." msgstr "" -#: ../programs/3d/window.cc:178 ../programs/calc/gchemcalc.cc:414 -#: ../programs/crystal/window.cc:291 ../programs/table/gchemtable-app.cc:164 -msgid "_Ask a question" +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." msgstr "" -#: ../programs/3d/window.cc:179 ../programs/calc/gchemcalc.cc:415 -#: ../programs/crystal/window.cc:292 ../programs/table/gchemtable-app.cc:165 -msgid "Ask a question about the Gnome Chemistry Utils" +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" msgstr "" -#: ../programs/3d/window.cc:180 ../programs/calc/gchemcalc.cc:416 -#: ../programs/crystal/window.cc:293 ../programs/table/gchemtable-app.cc:166 -msgid "Report _Bugs" +#: ../libs/gcp/molecule.cc:515 +msgid "Molecule" msgstr "" -#: ../programs/3d/window.cc:181 ../programs/calc/gchemcalc.cc:417 -#: ../programs/crystal/window.cc:294 ../programs/table/gchemtable-app.cc:167 -msgid "Submit a bug report for the Gnome Chemistry Utils" +#: ../libs/gcp/molecule.cc:520 +msgid "Export molecule to Ghemical" msgstr "" -#: ../programs/3d/window.cc:182 ../programs/calc/gchemcalc.cc:418 -#: ../programs/crystal/window.cc:295 ../programs/table/gchemtable-app.cc:168 -msgid "_About" +#: ../libs/gcp/molecule.cc:527 +msgid "Generate InChI" msgstr "" -#: ../programs/3d/window.cc:183 -msgid "About GChem3D" +#: ../libs/gcp/molecule.cc:532 +msgid "NIST WebBook page for this molecule" msgstr "" -#: ../programs/3d/window.cc:187 -msgid "Balls and sticks" +#: ../libs/gcp/molecule.cc:537 +msgid "PubChem page for this molecule" msgstr "" -#: ../programs/3d/window.cc:188 -msgid "Display a balls and sticks model" +#: ../libs/gcp/molecule.cc:543 +msgid "Generate SMILES" msgstr "" -#: ../programs/3d/window.cc:190 -msgid "Space filling" +#: ../libs/gcp/molecule.cc:549 +msgid "Open in Calculator" msgstr "" -#: ../programs/3d/window.cc:191 -msgid "Display a space filling model" +#: ../libs/gcp/molecule.cc:555 +msgid "Select alignment item" msgstr "" -#: ../programs/3d/window.cc:268 +#: ../libs/gcp/preferences.cc:349 ../libs/gcp/preferences.cc:368 +#: ../libs/gcp/preferences.cc:497 ../libs/gcp/theme.cc:336 +#: ../libs/gcp/theme.cc:343 ../programs/table/gchemtable-app.cc:143 #, fuzzy -msgid "Background color" -msgstr "Color de fondo:" +msgid "Default" +msgstr "Vista predeterminada" -#: ../programs/3d/window.cc:269 +#: ../libs/gcp/preferences.cc:389 ../libs/gcp/preferences.cc:458 +#: ../libs/gcp/preferences.cc:525 #, fuzzy -msgid "Choose a new background color" -msgstr "Color de fondo:" +msgid "General" +msgstr "Gnome Cristal" -#: ../programs/3d/window.cc:299 ../programs/crystal/window.cc:425 -#, fuzzy -msgid "Open recent" -msgstr "Abrir archivo" +#: ../libs/gcp/preferences.cc:399 ../libs/gcp/preferences.cc:473 +#: ../libs/gcp/preferences.cc:527 +msgid "Font" +msgstr "" -#: ../programs/3d/window.cc:359 ../programs/crystal/application.cc:126 -msgid "Preview" -msgstr "Previsualizar" +#: ../libs/gcp/preferences.cc:403 ../libs/gcp/preferences.cc:477 +#: ../libs/gcp/preferences.cc:529 +msgid "Other" +msgstr "Otro" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:1 -msgid "Display chemical 3D structures" +#: ../libs/gcp/preferences.cc:411 ../libs/gcp/preferences.cc:485 +#: ../libs/gcp/preferences.cc:533 +msgid "Arrows" msgstr "" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:2 -msgid "Molecules Viewer" +#: ../libs/gcp/preferences.cc:415 ../libs/gcp/preferences.cc:489 +#: ../libs/gcp/preferences.cc:535 ../plugins/paint/text/plugin.cc:52 +msgid "Text" msgstr "" -#: ../programs/calc/gchemcalc.cc:126 -msgid "GChemCalc is a simple calculator for chemists" +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" msgstr "" -#. const gchar * documentors[] = {NULL}; -#: ../programs/calc/gchemcalc.cc:128 -#, fuzzy -msgid "Copyright © 2005-2007 Jean Bréfort\n" -msgstr "(C) 1999-2001 por Jean Bréfort" +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" -#: ../programs/calc/gchemcalc.cc:408 -#, fuzzy -msgid "Quit GChemCalc" -msgstr "Gnome Cristal" +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "" -#: ../programs/calc/gchemcalc.cc:411 -msgid "View help for the Chemical Calculator" +#: ../libs/gcp/reaction-arrow.cc:380 +msgid "Arrow" msgstr "" -#: ../programs/calc/gchemcalc.cc:419 -msgid "About GChemCalc" +#: ../libs/gcp/reaction-arrow.cc:386 +msgid "Attach selection to arrow..." msgstr "" -#: ../programs/calc/gchemcalc.cc:465 -msgid "GChemCalc Calculator version: " +#: ../libs/gcp/reaction-prop.cc:39 +msgid "Unkown" msgstr "" -#: ../programs/calc/gchemcalc.cc:486 -msgid " [formula]" +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" msgstr "" -#: ../programs/calc/gchemcalc.cc:502 -msgid "For usage see: gchemcalc [-?|--help]" +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" msgstr "" -#: ../programs/calc/gchemcalc.cc:556 +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:43 #, fuzzy -msgid "Element" -msgstr "Elemento:" +msgid "Solvent" +msgstr "Tamaño" -#: ../programs/calc/gchemcalc.cc:563 -msgid "Mass %" +#: ../libs/gcp/reaction-prop.cc:44 +msgid "Temperature" msgstr "" -#: ../programs/calc/gchemcalc.desktop.in.h:1 -msgid "A simple calculator for chemistry" +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" msgstr "" -#: ../programs/crystal/gcrystal.desktop.in.h:1 -msgid "Edit and display crystalline structures" +#: ../libs/gcp/reaction-prop.cc:46 +msgid "Time" msgstr "" -#: ../programs/crystal/gcrystal.desktop.in.h:2 -msgid "Gnome Crystal Crystalline Structures Viewer " +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:1 -#, fuzzy -msgid "Background color blue value" -msgstr "Color de fondo:" - -#: ../programs/crystal/gcrystal.schemas.in.h:2 -#, fuzzy -msgid "Background color green value" -msgstr "Color de fondo:" - -#: ../programs/crystal/gcrystal.schemas.in.h:3 +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 #, fuzzy -msgid "Background color red value" -msgstr "Color de fondo:" +msgid "Save as" +msgstr "Salvar" -#: ../programs/crystal/gcrystal.schemas.in.h:4 +#: ../libs/gcp/stringdlg.cc:145 +#, fuzzy, c-format msgid "" -"Blue value for the default background color. Acceptable values are 0. to 1." +"Could not open file %s, error was:\n" +"%s" msgstr "" +"No pudo guardar archivo\n" +"%s" -#: ../programs/crystal/gcrystal.schemas.in.h:5 +#: ../libs/gcp/stringdlg.cc:161 +#, c-format msgid "" -"Default Euler's nutation angle for model display. Acceptable values are 0. " -"to + 180." +"Could not write to file %s, error was:\n" +"%s." msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:6 +#: ../libs/gcp/stringdlg.cc:175 +#, fuzzy, c-format msgid "" -"Default Euler's precession angle for model display. Acceptable values are -" -"180. to + 180." +"Could not close file %s, error was:\n" +"%s" msgstr "" +"No pudo guardar archivo\n" +"%s" -#: ../programs/crystal/gcrystal.schemas.in.h:7 -msgid "" -"Default Euler's spin angle for model display. Acceptable values are -180. to " -"+ 180." +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +msgid "This should not have occured, please file a bug record." msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:8 -msgid "Default field of view" +#: ../libs/gcp/theme.cc:449 +msgid "NewTheme1" msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:9 -#, fuzzy -msgid "Default nutation" -msgstr "Vista predeterminada" - -#: ../programs/crystal/gcrystal.schemas.in.h:10 -#, fuzzy -msgid "Default precession" -msgstr "Vista predeterminada" - -#: ../programs/crystal/gcrystal.schemas.in.h:11 -#, fuzzy -msgid "Default spin" -msgstr "Vista predeterminada" - -#: ../programs/crystal/gcrystal.schemas.in.h:12 -msgid "Field of view used by default for the model display." +#: ../libs/gcp/theme.cc:453 +#, c-format +msgid "NewTheme%d" +msgstr "" + +#: ../libs/gcp/theme.cc:550 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "" + +#: ../libs/gcp/view.cc:1015 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, fuzzy, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" +"No pudo guardar archivo\n" +"%s" + +#: ../libs/gcp/view.cc:1051 ../libs/gcu/glview.cc:394 +#, c-format +msgid "Unable to save image file: %s\n" +msgstr "" + +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:274 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:134 +#: ../programs/table/gchemtable-curve.cc:212 +#, fuzzy +msgid "_File" +msgstr "Archivo nuevo" + +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:275 +#, fuzzy +msgid "_New File" +msgstr "Archivo nuevo" + +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:276 +msgid "Create a new file" +msgstr "" + +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." +msgstr "" + +#: ../libs/gcp/window.cc:284 +#, fuzzy +msgid "Create a new file using a theme" +msgstr "O_uvrir dans une nouvelle fenêtre..." + +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:277 ../programs/spectra/window.cc:167 +#, fuzzy +msgid "_Open..." +msgstr "Abrir" + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:278 ../programs/spectra/window.cc:168 +#, fuzzy +msgid "Open a file" +msgstr "Abrir archivo" + +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:279 +#, fuzzy +msgid "_Save" +msgstr "Salvar" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:280 +#, fuzzy +msgid "Save the current file" +msgstr "Salvar archivo" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:281 +#, fuzzy +msgid "Save _As..." +msgstr "Guardar modelo como..." + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:282 +msgid "Save the current file with a different name" +msgstr "" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:283 +#: ../programs/spectra/window.cc:169 +#, fuzzy +msgid "Save As _Image..." +msgstr "Guardar modelo como..." + +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:284 +#: ../programs/spectra/window.cc:170 +#, fuzzy +msgid "Save the current file as an image" +msgstr "Salvar archivo" + +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:285 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:213 +msgid "Page Set_up..." +msgstr "" + +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:286 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:214 +msgid "Setup the page settings for your current printer" +msgstr "" + +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:287 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:215 +#, fuzzy +msgid "Print Pre_view" +msgstr "Imprimir vista" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:288 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:216 +#, fuzzy +msgid "Print preview" +msgstr "Imprimir vista" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:217 +#, fuzzy +msgid "_Print..." +msgstr "Imprimir" + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:290 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "Print the current file" +msgstr "" + +#: ../libs/gcp/window.cc:299 ../programs/table/gchemtable-curve.cc:219 +#, fuzzy +msgid "Prope_rties..." +msgstr "Preferencias" + +#: ../libs/gcp/window.cc:300 +msgid "Modify the file's properties" +msgstr "" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:291 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:221 +#, fuzzy +msgid "_Close" +msgstr "Cerrar" + +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:292 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:222 +#, fuzzy +msgid "Close the current file" +msgstr "" +"No pudo guardar archivo\n" +"%s" + +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:137 +#: ../programs/table/gchemtable-curve.cc:223 +#, fuzzy +msgid "_Quit" +msgstr "Salir" + +#: ../libs/gcp/window.cc:304 +#, fuzzy +msgid "Quit GChemPaint" +msgstr "Gnome Cristal" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:295 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:225 +msgid "_Edit" +msgstr "" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "" + +#: ../libs/gcp/window.cc:310 +#, fuzzy +msgid "Cu_t" +msgstr "Color:" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:226 +msgid "_Copy" +msgstr "" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:227 +msgid "Copy the selection" +msgstr "" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "" + +#: ../libs/gcp/window.cc:318 +#, fuzzy +msgid "Select _All" +msgstr "Elegir un color" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "" + +#: ../libs/gcp/window.cc:320 +#, fuzzy +msgid "Pr_eferences..." +msgstr "Preferencias" + +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:297 +msgid "Configure the application" +msgstr "" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:309 ../programs/table/gchemtable-app.cc:139 +#, fuzzy +msgid "_View" +msgstr "_Nuevo" + +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "" + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "" + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "" + +#: ../libs/gcp/window.cc:342 +msgid "_Tools" +msgstr "" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:312 +msgid "_Windows" +msgstr "" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:317 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:163 +#: ../programs/table/gchemtable-curve.cc:228 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "_Help" +msgstr "" + +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:318 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:164 +#: ../programs/table/gchemtable-curve.cc:229 +#, fuzzy +msgid "_Contents" +msgstr "Coordenadas" + +#: ../libs/gcp/window.cc:346 +#, fuzzy +msgid "View help for GChemPaint" +msgstr "Gnome Cristal" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:322 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:168 +#: ../programs/table/gchemtable-curve.cc:235 +msgid "Live assistance" +msgstr "" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:323 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:324 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Ask a question" +msgstr "" + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "Report _Bugs" +msgstr "" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:328 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "_About" +msgstr "" + +#: ../libs/gcp/window.cc:356 +#, fuzzy +msgid "About GChemPaint" +msgstr "Gnome Cristal" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:449 +msgid "Ready" +msgstr "" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:639 +#, fuzzy, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "``%s'' ha sido modificado. ¿Desea guardarlo?" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "Todo ha sido dividido" + +#: ../libs/gcu/dialog.cc:131 +msgid "Type a number" +msgstr "Escriba un número" + +#: ../libs/gcu/dialog.cc:140 +#, fuzzy, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "Escriba un número mayor que %g" + +#: ../libs/gcu/dialog.cc:150 +#, fuzzy, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "Escriba un número mayor que %g" + +#: ../libs/gcu/dialog.cc:160 +#, fuzzy, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "Escriba un número entre %g y %g" + +#: ../libs/gcu/dialog.cc:170 +#, fuzzy, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "Escriba un número mayor que %g" + +#: ../libs/gcu/dialog.cc:180 +#, fuzzy, c-format +msgid "Type a number lower than %g" +msgstr "Escriba un número mayor que %g" + +#: ../libs/gcu/dialog.cc:190 +#, c-format +msgid "Type a number greater than %g" +msgstr "Escriba un número mayor que %g" + +#: ../libs/gcu/dialog.cc:200 +#, fuzzy, c-format +msgid "Type a number lower than or equal to %g" +msgstr "Escriba un número mayor que %g" + +#: ../libs/gcu/dialog.cc:210 +#, fuzzy, c-format +msgid "Type a number greater than or equal to %g" +msgstr "Escriba un número mayor que %g" + +#: ../libs/gcu/element.cc:97 +msgid "German" +msgstr "" + +#: ../libs/gcu/element.cc:98 +msgid "French" +msgstr "" + +#: ../libs/gcu/element.cc:99 +msgid "Italian" +msgstr "" + +#: ../libs/gcu/element.cc:100 +msgid "Polish" +msgstr "" + +#: ../libs/gcu/element.cc:101 +msgid "Russian" +msgstr "" + +#: ../libs/gcu/element.cc:103 +msgid "Can't find and read elements.xml" +msgstr "" + +#: ../libs/gcu/element.cc:109 ../libs/gcu/element.cc:118 +msgid "Incorrect file format: elements.xml" +msgstr "" + +#: ../libs/gcu/element.cc:154 +msgid "English" +msgstr "" + +#: ../libs/gcu/element.cc:406 +msgid "Can't find and read radii.xml" +msgstr "" + +#: ../libs/gcu/element.cc:412 ../libs/gcu/element.cc:425 +msgid "Incorrect file format: radii.xml" +msgstr "" + +#: ../libs/gcu/element.cc:513 +msgid "Can't find and read elecprops.xml" +msgstr "" + +#: ../libs/gcu/element.cc:519 ../libs/gcu/element.cc:526 +msgid "Incorrect file format: elecprops.xml" +msgstr "" + +#: ../libs/gcu/element.cc:675 +msgid "Can't find and read isotopes.xml" +msgstr "" + +#: ../libs/gcu/element.cc:681 ../libs/gcu/element.cc:690 +msgid "Incorrect file format: isotopes.xml" +msgstr "" + +#: ../libs/gcu/filechooser.cc:43 +msgid "Open" +msgstr "Abrir" + +#: ../libs/gcu/filechooser.cc:62 +msgid "File _type:" +msgstr "" + +#: ../libs/gcu/filechooser.cc:64 +#, fuzzy +msgid "Automatic" +msgstr "Átomos" + +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "" + +#: ../libs/gcu/formula.cc:546 +msgid "Parser failed, please fill a bug report." +msgstr "" + +#: ../libs/gcu/formula.cc:554 +msgid "Invalid character" +msgstr "" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +#, fuzzy +msgid "Background Color" +msgstr "Color de fondo:" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "" + +#: ../libs/gcu/gtkperiodic.c:331 +#, c-format +msgid "" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" +msgstr "" + +#: ../libs/gcu/loader.cc:106 +msgid "Chemical file loader type." +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "" + +#: ../libs/gcu/printable.cc:35 +#, fuzzy +msgid "points" +msgstr "Taille" + +#: ../libs/gcu/printable.cc:36 +msgid "inches" +msgstr "" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1321 +msgid "Transmittance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1320 +msgid "Absorbance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1256 +msgid "Chemical shift (ppm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1257 +msgid "Frequency (Hz)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 ../libs/gcu/spectrumdoc.cc:1263 +msgid "Show integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 +msgid "Hide integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:706 ../libs/gcu/spectrumdoc.cc:1593 +msgid "Found too many data!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1253 ../libs/gcu/spectrumdoc.cc:1300 +msgid "X unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1304 +msgid "Wave length (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1306 +msgid "Wave length (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1307 +msgid "Wave number (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1312 +msgid "Invert X Axis" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1317 +msgid "Y unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1488 ../libs/gcu/spectrumdoc.cc:1518 +msgid "Constant too long" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1511 +msgid "Invalid character in data block" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1615 +msgid "Data check failed!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1632 +msgid "Data check failed: FIRSTX!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1637 +msgid "Data check failed: FIRSTY!" +msgstr "" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1641 +msgid "Found too many data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1947 +msgid "Integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2068 +msgid "Real transformed data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2085 +msgid "Imaginary transformed data" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:80 +#, fuzzy +msgid "Minimum X value:" +msgstr "Mínimo" + +#: ../libs/gcu/spectrumview.cc:85 +#, fuzzy +msgid "Maximum X value:" +msgstr "Máximo" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "" + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:502 ../plugins/loaders/cdx/cdx.cc:506 +#: ../plugins/loaders/cdx/cdx.cc:631 ../plugins/loaders/cdx/cdx.cc:636 +msgid "Unsupported feature, please report!" +msgstr "" + +#: ../plugins/loaders/cdx/cdx.cc:593 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:169 +#: ../plugins/paint/bonds/bondtool.cc:279 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, fuzzy, c-format +msgid "Orientation: %g" +msgstr "Impresión" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +msgid "H_alf heads" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +msgid "Set _default" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +msgid "Use full arrows heads for reversible reactions" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:92 +msgid "Electron pair move arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:93 +msgid "Add a curved arrow to represent an electron pair move" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:96 +msgid "Add a curved arrow to represent an single electron move" +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:56 +#, fuzzy +msgid "Add or modify an atom" +msgstr "Agregar átomos" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:64 +msgid "Electron Pair" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:67 +msgid "Unpaired Electron" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +#, fuzzy +msgid "Bond _angle:" +msgstr "_Enlaces y líneas" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "" + +#: ../plugins/paint/bonds/bondtool.cc:354 +msgid "Invalid document tree, please file a bug report" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "" +"If set, the number of new bonds will be evaluated from the mouse position" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "" + +#: ../plugins/paint/bonds/chaintool.cc:125 +#: ../plugins/paint/bonds/chaintool.cc:247 +#, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:59 +#, fuzzy +msgid "Chain" +msgstr "Coordenadas" + +#: ../plugins/paint/bonds/plugin.cc:60 +msgid "Add a chain" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:63 +#, fuzzy +msgid "Add a wedge bond" +msgstr "Agregar enlaces" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:66 +#, fuzzy +msgid "Add a hash bond" +msgstr "Agregar enlaces" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:71 +msgid "Fore bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:72 +#, fuzzy +msgid "Add a fore bond" +msgstr "Agregar enlaces" + +#: ../plugins/paint/bonds/plugin.cc:74 +msgid "Delocalized bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +#, fuzzy +msgid "Cycle _Size" +msgstr "_Tamaño" + +#: ../plugins/paint/cycles/plugin.cc:54 +msgid "Three atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:57 +msgid "Four atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:60 +msgid "Five atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:63 +msgid "Six atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:66 +msgid "Seven atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:69 +msgid "Eight atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:72 +msgid "Variable sized cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "" + +#: ../plugins/paint/residues/plugin.cc:105 +#, fuzzy +msgid "Create new abbreviations" +msgstr "O_uvrir dans une nouvelle fenêtre..." + +#: ../plugins/paint/residues/residues-dlg.cc:216 +msgid "Please, provide only one molecule." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:232 +msgid "Please, provide a name for the residue" +msgstr "" + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "New" +msgstr "Nuevo" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +msgid "\"New\" is not a valid symbol" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:265 +msgid "Please provide at least one symbol" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:287 +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:1 +msgid "Formula" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:4 +msgid "Residues" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:5 +msgid "_Generic" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-delete" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:11 +msgid "gtk-save" +msgstr "" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:64 +#, fuzzy +msgid "Select" +msgstr "_Borrar" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:368 +msgid "Creation failed!" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:392 +msgid "Group and/or align objects" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:430 +msgid "Horizontal flip" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:431 +msgid "Flip the selection horizontally" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:432 +msgid "Vertical flip" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:433 +msgid "Flip the selection vertically" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:434 +msgid "Merge" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:435 +msgid "Merge two molecules" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:439 +msgid "_Rotate" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Rotate the selection" +msgstr "" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "" + +#: ../plugins/paint/templates/new-template.glade.h:4 +#, fuzzy +msgid "_Name" +msgstr "Nouveau" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "" + +#: ../plugins/paint/templates/templates.glade.h:1 +msgid "No selected template" +msgstr "" + +#: ../plugins/paint/templates/templates.glade.h:2 +msgid "_Templates" +msgstr "" + +#: ../plugins/paint/templates/templates.glade.h:3 +msgid "category" +msgstr "" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "" + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "" + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:5 +#, fuzzy +msgid "Si_ze:" +msgstr "_Tamaño" + +#: ../plugins/paint/text/fontsel.glade.h:6 +msgid "Stri_kethrough" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:7 +#, fuzzy +msgid "_Color:" +msgstr "Color:" + +#: ../plugins/paint/text/fontsel.glade.h:8 +#, fuzzy +msgid "_Family:" +msgstr "Archivo nuevo" + +#: ../plugins/paint/text/fontsel.glade.h:9 +msgid "_Position:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:10 +msgid "_Style:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:11 +msgid "_Underline:" +msgstr "" + +#: ../plugins/paint/text/plugin.cc:53 +#, fuzzy +msgid "Add or modify a text" +msgstr "Agregar átomos" + +#: ../plugins/paint/text/plugin.cc:56 +#, fuzzy +msgid "Add or modify a group of atoms" +msgstr "Agregar átomos" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "" + +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +msgid "GChem3D Viewer" +msgstr "" + +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "" + +#: ../programs/3d/main.cc:44 +msgid "GChem3d Viewer version: " +msgstr "" + +#: ../programs/3d/main.cc:55 +msgid "Prints GChem3d Viewer version" +msgstr "" + +#: ../programs/3d/main.cc:56 +msgid "Background color: white, black or #rrggbb (default is black)" +msgstr "" + +#: ../programs/3d/main.cc:57 +msgid "" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" +msgstr "" + +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 +#, fuzzy +msgid " [file]" +msgstr "Archivo nuevo" + +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 +#, c-format +msgid "Invalid or misplaced argument: %s\n" +msgstr "" + +#: ../programs/3d/window.cc:129 +msgid "GChem3D is a molecular structures viewer for Gnome" +msgstr "" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/3d/window.cc:131 +#, fuzzy +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "(C) 1999-2001 por Jean Bréfort" + +#: ../programs/3d/window.cc:181 +msgid "Print the current scene" +msgstr "" + +#: ../programs/3d/window.cc:185 +msgid "Quit GChem3D" +msgstr "" + +#: ../programs/3d/window.cc:189 +msgid "View help for the Molecules Viewer" +msgstr "" + +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:320 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:166 +#: ../programs/table/gchemtable-curve.cc:233 +msgid "Gnome Chemistry Utils on the _web" +msgstr "" + +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:321 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/table/gchemtable-curve.cc:234 +msgid "Browse the Gnome Chemistry Utils's web site" +msgstr "" + +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:325 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 +msgid "Ask a question about the Gnome Chemistry Utils" +msgstr "" + +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:327 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:240 +msgid "Submit a bug report for the Gnome Chemistry Utils" +msgstr "" + +#: ../programs/3d/window.cc:199 +msgid "About GChem3D" +msgstr "" + +#: ../programs/3d/window.cc:203 +msgid "Balls and sticks" +msgstr "" + +#: ../programs/3d/window.cc:204 +msgid "Display a balls and sticks model" +msgstr "" + +#: ../programs/3d/window.cc:206 +msgid "Space filling" +msgstr "" + +#: ../programs/3d/window.cc:207 +msgid "Display a space filling model" +msgstr "" + +#: ../programs/3d/window.cc:209 +msgid "Cylinders" +msgstr "" + +#: ../programs/3d/window.cc:210 +msgid "Display a cylinders model" +msgstr "" + +#: ../programs/3d/window.cc:212 +msgid "Wireframe" +msgstr "" + +#: ../programs/3d/window.cc:213 +msgid "Display a wireframe model" +msgstr "" + +#: ../programs/3d/window.cc:271 +#, fuzzy +msgid "Background color" +msgstr "Color de fondo:" + +#: ../programs/3d/window.cc:272 +#, fuzzy +msgid "Choose a new background color" +msgstr "Color de fondo:" + +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:429 +#: ../programs/spectra/window.cc:257 +#, fuzzy +msgid "Open recent" +msgstr "Abrir archivo" + +#: ../programs/3d/gchem3d.desktop.in.in.h:1 +msgid "Display chemical 3D structures" +msgstr "" + +#: ../programs/3d/gchem3d.desktop.in.in.h:2 +msgid "Molecules Viewer @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:301 +msgid "GChemCalc is a simple calculator for chemists" +msgstr "" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/calc/gchemcalc.cc:303 +#, fuzzy +msgid "Copyright © 2005-2007 Jean Bréfort\n" +msgstr "(C) 1999-2001 por Jean Bréfort" + +#: ../programs/calc/gchemcalc.cc:619 +#, fuzzy +msgid "Quit GChemCalc" +msgstr "Gnome Cristal" + +#: ../programs/calc/gchemcalc.cc:623 +#, fuzzy +msgid "_Mode" +msgstr "_Modificar" + +#: ../programs/calc/gchemcalc.cc:626 +msgid "View help for the Chemical Calculator" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:636 +msgid "About GChemCalc" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:643 +#, fuzzy +msgid "_Atom" +msgstr "_Atomos" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:646 +#, fuzzy +msgid "_Nickname" +msgstr "Nouveau" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:688 +msgid "GChemCalc Calculator version: " +msgstr "" + +#: ../programs/calc/gchemcalc.cc:714 +msgid " [formula]" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:731 +msgid "For usage see: gchemcalc-unstable [-?|--help]" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:777 +#, fuzzy +msgid "Element" +msgstr "Elemento:" + +#: ../programs/calc/gchemcalc.cc:784 +msgid "Mass %" +msgstr "" + +#: ../programs/calc/gchemcalc.desktop.in.in.h:1 +msgid "A simple calculator for chemistry" +msgstr "" + +#: ../programs/calc/gchemcalc.desktop.in.in.h:2 +msgid "Chemical calculator @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/crystal/gcrystal.desktop.in.in.h:1 +msgid "Edit and display crystalline structures" +msgstr "" + +#: ../programs/crystal/gcrystal.desktop.in.in.h:2 +msgid "Gnome Crystal Crystalline Structures Viewer @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:1 +#, fuzzy +msgid "Background color blue value" +msgstr "Color de fondo:" + +#: ../programs/crystal/gcrystal.schemas.in.h:2 +#, fuzzy +msgid "Background color green value" +msgstr "Color de fondo:" + +#: ../programs/crystal/gcrystal.schemas.in.h:3 +#, fuzzy +msgid "Background color red value" +msgstr "Color de fondo:" + +#: ../programs/crystal/gcrystal.schemas.in.h:4 +msgid "" +"Blue value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:5 +msgid "" +"Default Euler's nutation angle for model display. Acceptable values are 0. " +"to + 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:6 +msgid "" +"Default Euler's precession angle for model display. Acceptable values are -" +"180. to + 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:7 +msgid "" +"Default Euler's spin angle for model display. Acceptable values are -180. to " +"+ 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:8 +msgid "Default field of view" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:9 +#, fuzzy +msgid "Default nutation" +msgstr "Vista predeterminada" + +#: ../programs/crystal/gcrystal.schemas.in.h:10 +#, fuzzy +msgid "Default precession" +msgstr "Vista predeterminada" + +#: ../programs/crystal/gcrystal.schemas.in.h:11 +#, fuzzy +msgid "Default spin" +msgstr "Vista predeterminada" + +#: ../programs/crystal/gcrystal.schemas.in.h:12 +msgid "Field of view used by default for the model display." msgstr "" #: ../programs/crystal/gcrystal.schemas.in.h:13 @@ -1436,482 +3844,1181 @@ "Green value for the default background color. Acceptable values are 0. to 1." msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:14 +#: ../programs/crystal/gcrystal.schemas.in.h:14 +#, fuzzy +msgid "Printing resolution" +msgstr "Resolución de la impresora:" + +#: ../programs/crystal/gcrystal.schemas.in.h:15 +msgid "Printing resolution if not automatically detected." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:16 +msgid "" +"Red value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/application.cc:58 +#, c-format +msgid "Untitled%d" +msgstr "SinNombre%d" + +#: ../programs/crystal/application.cc:318 +#, fuzzy, c-format +msgid "" +"\"%s\" has been modified since last saving. Do you wish to come back to " +"saved version?" +msgstr "" +"``%s'' ha sido modificado sin guardar.\n" +"Desea volver a la última versión guardada ?" + +#. Note for translators: c.n. is for coordination number +#: ../programs/crystal/atomsdlg.cc:624 +msgid " c.n.=" +msgstr "" + +#: ../programs/crystal/atomsdlg.cc:630 +#, fuzzy +msgid "low spin" +msgstr "Vista predeterminada" + +#: ../programs/crystal/atomsdlg.cc:630 +msgid "high spin" +msgstr "" + +#: ../programs/crystal/atomsdlg.cc:632 +msgid "Database" +msgstr "" + +#: ../programs/crystal/celldlg.cc:141 +#, fuzzy +msgid "The sum of the three angles must be less than 360°" +msgstr "La suma de los tres ángulos debe ser menor a 360°" + +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:128 +#, fuzzy +msgid "Planes cleaved" +msgstr "Planos escindidos:" + +#: ../programs/crystal/document.cc:271 +#, c-format +msgid "" +"Could not save file\n" +"%s" +msgstr "" +"No pudo guardar archivo\n" +"%s" + +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:180 +#, fuzzy +msgid "Single" +msgstr "Tamaño" + +#: ../programs/crystal/main.cc:88 +msgid "Gnome Chemistry Utils version: " +msgstr "" + +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 +msgid " [file...]" +msgstr "" + +#: ../programs/crystal/window.cc:142 ../programs/crystal/window.cc:394 +msgid "Gnome Crystal" +msgstr "Gnome Cristal" + +#: ../programs/crystal/window.cc:145 +msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" +msgstr "" + +#: ../programs/crystal/window.cc:146 +#, fuzzy +msgid "Copyright © 1999-2007 by Jean Bréfort" +msgstr "(C) 1999-2001 por Jean Bréfort" + +#: ../programs/crystal/window.cc:294 +#, fuzzy +msgid "Quit Gnome Crystal" +msgstr "Gnome Cristal" + +#: ../programs/crystal/window.cc:296 +#, fuzzy +msgid "Prefere_nces..." +msgstr "Preferencias" + +#: ../programs/crystal/window.cc:298 +msgid "_Crystal" +msgstr "C_ristal" + +#: ../programs/crystal/window.cc:299 +#, fuzzy +msgid "_Lattice..." +msgstr "_Red" + +#: ../programs/crystal/window.cc:300 +msgid "Define the lattice" +msgstr "Definir la red" + +#: ../programs/crystal/window.cc:301 +#, fuzzy +msgid "_Atoms..." +msgstr "_Atomos" + +#: ../programs/crystal/window.cc:302 +#, fuzzy +msgid "Add or edit atoms" +msgstr "Agregar átomos" + +#: ../programs/crystal/window.cc:303 +#, fuzzy +msgid "_Bonds and lines..." +msgstr "_Enlaces y líneas" + +#: ../programs/crystal/window.cc:304 +#, fuzzy +msgid "Add or edit bonds and lines" +msgstr "Enlaces y líneas" + +#: ../programs/crystal/window.cc:305 +#, fuzzy +msgid "_Size..." +msgstr "_Tamaño" + +#: ../programs/crystal/window.cc:306 +msgid "Define size" +msgstr "Definir tamaño" + +#: ../programs/crystal/window.cc:307 +#, fuzzy +msgid "_Cleavages..." +msgstr "_Clivajes" + +#: ../programs/crystal/window.cc:308 +#, fuzzy +msgid "Add or edit cleavages to remove some planes" +msgstr "Agregar clivajes para remover planos" + +#: ../programs/crystal/window.cc:310 +msgid "View _settings..." +msgstr "_Configuración de la vista" + +#: ../programs/crystal/window.cc:311 +msgid "Choose background color and model position" +msgstr "Color de fondo y posición del modelo" + +#: ../programs/crystal/window.cc:313 +#, fuzzy +msgid "Create new _window" +msgstr "O_uvrir dans une nouvelle fenêtre..." + +#: ../programs/crystal/window.cc:314 +#, fuzzy +msgid "Create a new window" +msgstr "O_uvrir dans une nouvelle fenêtre..." + +#: ../programs/crystal/window.cc:315 +msgid "_Close this window" +msgstr "" + +#: ../programs/crystal/window.cc:316 +msgid "Close the current window" +msgstr "" + +#: ../programs/crystal/window.cc:319 #, fuzzy -msgid "Printing resolution" -msgstr "Resolución de la impresora:" +msgid "View help for Gnome Crystal" +msgstr "Gnome Cristal" -#: ../programs/crystal/gcrystal.schemas.in.h:15 -msgid "Printing resolution if not automatically detected." +#: ../programs/crystal/window.cc:329 +#, fuzzy +msgid "About Gnome Crystal" +msgstr "Gnome Cristal" + +#: ../programs/paint/gchempaint.desktop.in.in.h:1 +msgid "Edit chemical 2D structures" msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:16 +#: ../programs/paint/gchempaint.desktop.in.in.h:2 +msgid "GChemPaint Chemical Structures Editor @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:7 msgid "" -"Red value for the default background color. Acceptable values are 0. to 1." +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." msgstr "" -#: ../programs/crystal/application.cc:55 -#, c-format -msgid "Untitled%d" -msgstr "SinNombre%d" +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "" -#: ../programs/crystal/application.cc:261 -#, fuzzy, c-format +#: ../programs/paint/gchempaint.schemas.in.h:9 msgid "" -"\"%s\" has been modified since last saving. Do you wish to come back to " -"saved version?" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." msgstr "" -"``%s'' ha sido modificado sin guardar.\n" -"Desea volver a la última versión guardada ?" -#: ../programs/crystal/atomsdlg.cc:133 +#: ../programs/paint/gchempaint.schemas.in.h:10 #, fuzzy -msgid "Atom" -msgstr "Átomos" +msgid "Default arrow length" +msgstr "Vista predeterminada" -#: ../programs/crystal/atomsdlg.cc:187 ../programs/crystal/atomsdlg.cc:282 -#: ../programs/crystal/atomsdlg.cc:415 -msgid "Unknown" +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." msgstr "" -#. Note for translators: c.n. is for coordination number -#: ../programs/crystal/atomsdlg.cc:555 -msgid " c.n.=" +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "" +"Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "" +"Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." msgstr "" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/paint/gchempaint.schemas.in.h:20 #, fuzzy -msgid "low spin" +msgid "Default charge sign size." msgstr "Vista predeterminada" -#: ../programs/crystal/atomsdlg.cc:561 -msgid "high spin" +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." msgstr "" -#: ../programs/crystal/atomsdlg.cc:563 -msgid "Database" +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." msgstr "" -#: ../programs/crystal/celldlg.cc:141 -#, fuzzy -msgid "The sum of the three angles must be less than 360°" -msgstr "La suma de los tres ángulos debe ser menor a 360°" +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "" -#: ../programs/crystal/cleavagesdlg.cc:128 -#, fuzzy -msgid "Planes cleaved" -msgstr "Planos escindidos:" +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" -#: ../programs/crystal/document.cc:237 -#, c-format +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format msgid "" -"Could not save file\n" -"%s" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." msgstr "" -"No pudo guardar archivo\n" -"%s" -#: ../programs/crystal/document.cc:240 -#, c-format +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format msgid "" -"Could not load file\n" -"%s" +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." msgstr "" -"No pudo cargar archivo\n" -"%s" -#: ../programs/crystal/document.cc:243 -#, c-format +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format msgid "" -"%s: invalid xml file.\n" -"Tree is empty?" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." msgstr "" -"%s: archivo XML inválido.\n" -"Quizá el árbol está vació?" -#: ../programs/crystal/document.cc:246 -#, c-format -msgid "%s: invalid file format." -msgstr "%s: formato de archivo inválido" +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" -#: ../programs/crystal/document.cc:594 -#, fuzzy, c-format -msgid "\"%s\" has been modified. Do you wish to save it?" -msgstr "``%s'' ha sido modificado. ¿Desea guardarlo?" +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/linesdlg.cc:178 -#, fuzzy -msgid "Single" -msgstr "Tamaño" +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "" -#: ../programs/crystal/main.cc:76 -msgid "Gnome Chemistry Utils version: " +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." msgstr "" -#: ../programs/crystal/main.cc:104 -msgid " [file...]" +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:122 ../programs/crystal/window.cc:383 -msgid "Gnome Crystal" -msgstr "Gnome Cristal" +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:125 -msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." msgstr "" -#: ../programs/crystal/window.cc:126 -#, fuzzy -msgid "Copyright © 1999-2007 by Jean Bréfort" -msgstr "(C) 1999-2001 por Jean Bréfort" +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:248 -#, fuzzy -msgid "_New File" -msgstr "Archivo nuevo" +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." +msgstr "" -#: ../programs/crystal/window.cc:249 -msgid "Create a new file" +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." msgstr "" -#: ../programs/crystal/window.cc:252 +#: ../programs/paint/gchempaint.schemas.in.h:46 #, fuzzy -msgid "_Save" -msgstr "Salvar" +msgid "Default hash line width." +msgstr "Vista predeterminada" -#: ../programs/crystal/window.cc:253 +#: ../programs/paint/gchempaint.schemas.in.h:47 #, fuzzy -msgid "Save the current file" -msgstr "Salvar archivo" +msgid "Default hash lines distance." +msgstr "Vista predeterminada" -#: ../programs/crystal/window.cc:254 -#, fuzzy -msgid "Save _As..." -msgstr "Guardar modelo como..." +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" -#: ../programs/crystal/window.cc:255 -msgid "Save the current file with a different name" +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." msgstr "" -#: ../programs/crystal/window.cc:259 -msgid "Print the current file" +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." msgstr "" -#: ../programs/crystal/window.cc:263 -#, fuzzy -msgid "Quit Gnome Crystal" -msgstr "Gnome Cristal" +#: ../programs/paint/gchempaint.schemas.in.h:53 +msgid "Default padding around arrows." +msgstr "" -#: ../programs/crystal/window.cc:264 -msgid "_Edit" +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:265 -#, fuzzy -msgid "Prefere_nces..." -msgstr "Preferencias" +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "" -#: ../programs/crystal/window.cc:266 -msgid "Configure the application" +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." msgstr "" -#: ../programs/crystal/window.cc:267 -msgid "_Crystal" -msgstr "C_ristal" +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:268 -#, fuzzy -msgid "_Lattice..." -msgstr "_Red" +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "" -#: ../programs/crystal/window.cc:269 -msgid "Define the lattice" -msgstr "Definir la red" +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:270 -#, fuzzy -msgid "_Atoms..." -msgstr "_Atomos" +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "" -#: ../programs/crystal/window.cc:271 +#: ../programs/paint/gchempaint.schemas.in.h:66 #, fuzzy -msgid "Add or edit atoms" -msgstr "Agregar átomos" +msgid "Default text font size." +msgstr "Vista predeterminada" + +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "" -#: ../programs/crystal/window.cc:272 +#: ../programs/paint/gchempaint.schemas.in.h:68 #, fuzzy -msgid "_Bonds and lines..." -msgstr "_Enlaces y líneas" +msgid "Default text font style." +msgstr "Vista predeterminada" -#: ../programs/crystal/window.cc:273 +#: ../programs/paint/gchempaint.schemas.in.h:69 #, fuzzy -msgid "Add or edit bonds and lines" -msgstr "Enlaces y líneas" +msgid "Default text font variant." +msgstr "Vista predeterminada" + +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "" -#: ../programs/crystal/window.cc:274 +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:72 #, fuzzy -msgid "_Size..." -msgstr "_Tamaño" +msgid "Default theme." +msgstr "Vista predeterminada" + +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." +msgstr "" -#: ../programs/crystal/window.cc:275 -msgid "Define size" -msgstr "Definir tamaño" +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:276 -#, fuzzy -msgid "_Cleavages..." -msgstr "_Clivajes" +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "" -#: ../programs/crystal/window.cc:277 -#, fuzzy -msgid "Add or edit cleavages to remove some planes" -msgstr "Agregar clivajes para remover planos" +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:279 -msgid "View _settings..." -msgstr "_Configuración de la vista" +#: ../programs/paint/gchempaint.schemas.in.h:88 +msgid "Whether the periodic table is tearable." +msgstr "" -#: ../programs/crystal/window.cc:280 -msgid "Choose background color and model position" -msgstr "Color de fondo y posición del modelo" +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "" -#: ../programs/crystal/window.cc:281 -msgid "_Windows" +#: ../programs/paint/main.cc:46 +msgid "GChemPaint version: " msgstr "" -#: ../programs/crystal/window.cc:282 -#, fuzzy -msgid "Create new _window" -msgstr "O_uvrir dans une nouvelle fenêtre..." +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" +msgstr "" -#: ../programs/crystal/window.cc:283 -#, fuzzy -msgid "Create a new window" -msgstr "O_uvrir dans une nouvelle fenêtre..." +#: ../programs/spectra/gspectrum.desktop.in.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "" -#: ../programs/crystal/window.cc:284 -msgid "_Close this window" +#: ../programs/spectra/gspectrum.desktop.in.in.h:2 +msgid "Spectrum viewer @STABILITY_POSTFIX@" msgstr "" -#: ../programs/crystal/window.cc:285 -msgid "Close the current window" +#: ../programs/spectra/window.cc:124 +msgid "GSpectrum is a spectrum viewer for Gnome" msgstr "" -#: ../programs/crystal/window.cc:288 +#. const gchar * documentors[] = {NULL}; +#: ../programs/spectra/window.cc:126 #, fuzzy -msgid "View help for Gnome Crystal" -msgstr "Gnome Cristal" +msgid "Copyright © 2007 Jean Bréfort\n" +msgstr "(C) 1999-2001 por Jean Bréfort" -#: ../programs/crystal/window.cc:296 +#: ../programs/spectra/window.cc:180 +msgid "Quit GSpectrum" +msgstr "" + +#: ../programs/spectra/window.cc:186 #, fuzzy -msgid "About Gnome Crystal" +msgid "View help for the Spetra Viewer" msgstr "Gnome Cristal" -#: ../programs/crystal/window.cc:445 -msgid "Ready" +#: ../programs/spectra/window.cc:196 +msgid "About GSpectrum" msgstr "" -#: ../programs/table/gchemtable-app.cc:102 -msgid "GChemTable is a chemical periodic table of the elements application" +#: ../programs/table/gchemtable-app.cc:135 +msgid "New _Chart" msgstr "" -#. const gchar * documentors[] = {NULL}; -#: ../programs/table/gchemtable-app.cc:104 +#: ../programs/table/gchemtable-app.cc:136 #, fuzzy -msgid "Copyright © 2005-2007 Jean Bréfort" -msgstr "(C) 1999-2001 por Jean Bréfort" +msgid "Create a new chart" +msgstr "O_uvrir dans une nouvelle fenêtre..." -#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-app.cc:138 +#: ../programs/table/gchemtable-curve.cc:224 msgid "Quit GChemTable" msgstr "" -#: ../programs/table/gchemtable-app.cc:145 +#: ../programs/table/gchemtable-app.cc:140 msgid "Color scheme" msgstr "" -#: ../programs/table/gchemtable-app.cc:146 +#: ../programs/table/gchemtable-app.cc:141 #, fuzzy msgid "No colors" msgstr "Color:" -#: ../programs/table/gchemtable-app.cc:147 +#: ../programs/table/gchemtable-app.cc:142 msgid "Use default Gtk theme colors" msgstr "" -#: ../programs/table/gchemtable-app.cc:148 -#, fuzzy -msgid "Default" -msgstr "Vista predeterminada" - -#: ../programs/table/gchemtable-app.cc:149 +#: ../programs/table/gchemtable-app.cc:144 msgid "Use default symbolic element colors" msgstr "" -#: ../programs/table/gchemtable-app.cc:150 +#: ../programs/table/gchemtable-app.cc:145 msgid "Physical states" msgstr "" -#: ../programs/table/gchemtable-app.cc:151 +#: ../programs/table/gchemtable-app.cc:146 msgid "Use colors to display physical state at a given temperature" msgstr "" -#: ../programs/table/gchemtable-app.cc:153 -msgid "Family" +#: ../programs/table/gchemtable-app.cc:149 +msgid "Use colors to display the family grouping of the elements" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:151 +msgid "Acidity" msgstr "" +#: ../programs/table/gchemtable-app.cc:152 +#, fuzzy +msgid "Use colors to display the acidity of the elements" +msgstr "Tabla periódica de los elementos" + #: ../programs/table/gchemtable-app.cc:154 -msgid "Use colors to display the family grouping of the elements" +msgid "Electronegativity" msgstr "" -#: ../programs/table/gchemtable-app.cc:156 -msgid "Acidity" +#: ../programs/table/gchemtable-app.cc:155 +msgid "Use colors to display the electronegativity of the elements" msgstr "" #: ../programs/table/gchemtable-app.cc:157 +msgid "Atomic radius" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:158 #, fuzzy -msgid "Use colors to display the acidity of the elements" +msgid "Use colors to display the covalent radii of the elements" msgstr "Tabla periódica de los elementos" +#: ../programs/table/gchemtable-app.cc:160 +msgid "Block" +msgstr "" + #: ../programs/table/gchemtable-app.cc:161 +msgid "Use colors to display the blocks elements belong to" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/table/gchemtable-curve.cc:230 #, fuzzy msgid "View help for the Periodic Table" msgstr "Gnome Cristal" -#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:242 msgid "About GChemTable" msgstr "" +#: ../programs/table/gchemtable-app.cc:343 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/table/gchemtable-app.cc:345 +#, fuzzy +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "(C) 1999-2001 por Jean Bréfort" + #. The markup at the end of the chain is there to ensure that #. things will be correcly aligned, add the same to the translated string -#: ../programs/table/gchemtable-elt.cc:64 +#: ../programs/table/gchemtable-elt.cc:61 msgid "Electronic configuration: " msgstr "" -#: ../programs/table/gchemtable-elt.cc:76 +#: ../programs/table/gchemtable-elt.cc:73 msgid "Lang" msgstr "" -#: ../programs/table/gchemtable-elt.cc:83 +#: ../programs/table/gchemtable-elt.cc:80 #, fuzzy msgid "Name" msgstr "Nouveau" -#: ../programs/table/gchemtable-elt.cc:109 -#: ../programs/table/gchemtable-elt.cc:152 -#: ../programs/table/gchemtable-elt.cc:188 -#: ../programs/table/gchemtable-elt.cc:211 -#: ../programs/table/gchemtable-elt.cc:225 -#: ../programs/table/gchemtable-elt.cc:239 -#: ../programs/table/gchemtable-elt.cc:261 +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 msgid "n.a." msgstr "" -#: ../programs/table/gchemtable-elt.cc:121 -#: ../programs/table/gchemtable-elt.cc:162 +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 #, c-format msgid "%d:" msgstr "" -#: ../programs/table/gchemtable-elt.cc:273 +#: ../programs/table/gchemtable-elt.cc:271 msgid "Ion" msgstr "" #. C.N. stands for coordination number -#: ../programs/table/gchemtable-elt.cc:280 +#: ../programs/table/gchemtable-elt.cc:278 msgid "C.N." msgstr "" -#: ../programs/table/gchemtable-elt.cc:285 +#: ../programs/table/gchemtable-elt.cc:283 #, fuzzy msgid "Spin" msgstr "Taille" -#: ../programs/table/gchemtable-elt.cc:292 +#: ../programs/table/gchemtable-elt.cc:290 msgid "Value" msgstr "" -#: ../programs/table/gchemtable-elt.cc:311 +#: ../programs/table/gchemtable-elt.cc:310 msgid "Low" msgstr "" -#: ../programs/table/gchemtable-elt.cc:314 +#: ../programs/table/gchemtable-elt.cc:313 #, fuzzy msgid "High" msgstr "Alto:" -#: ../programs/table/gchemtable-curve.cc:183 -#: ../programs/table/gchemtable-curve.cc:187 +#: ../programs/table/gchemtable-curve.cc:220 +msgid "Modify the graph properties" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:232 +#, fuzzy +msgid "View help for the Curve Window" +msgstr "Gnome Cristal" + +#: ../programs/table/gchemtable-curve.cc:324 +#: ../programs/table/gchemtable-curve.cc:328 +#: ../programs/table/gchemtable-data.cc:524 msgid "Pauling electronegativity" msgstr "" -#: ../programs/table/gchemtable-curve.cc:199 +#: ../programs/table/gchemtable-curve.cc:340 msgid "Electron affinity (kJ/mol)" msgstr "" -#: ../programs/table/gchemtable-curve.cc:203 +#: ../programs/table/gchemtable-curve.cc:344 msgid "Electron affinity" msgstr "" -#: ../programs/table/gchemtable-curve.cc:217 +#: ../programs/table/gchemtable-curve.cc:358 msgid "1st. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:220 +#: ../programs/table/gchemtable-curve.cc:361 msgid "2nd. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:223 +#: ../programs/table/gchemtable-curve.cc:364 msgid "3rd. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:226 +#: ../programs/table/gchemtable-curve.cc:367 #, c-format msgid "%dth. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:229 +#: ../programs/table/gchemtable-curve.cc:370 msgid "ionization energy (MJ/mol)" msgstr "" -#: ../programs/table/gchemtable-curve.cc:236 +#: ../programs/table/gchemtable-curve.cc:377 msgid "ionization energy" msgstr "" -#: ../programs/table/gchemtable-curve.cc:255 -#: ../programs/table/gchemtable-curve.cc:259 +#: ../programs/table/gchemtable-curve.cc:396 +#: ../programs/table/gchemtable-curve.cc:400 msgid "Covalent radii" msgstr "" -#: ../programs/table/gchemtable-curve.cc:275 -#: ../programs/table/gchemtable-curve.cc:279 +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 msgid "Van der Waals radii" msgstr "" -#: ../programs/table/gchemtable-curve.cc:295 -#: ../programs/table/gchemtable-curve.cc:299 +#: ../programs/table/gchemtable-curve.cc:436 +#: ../programs/table/gchemtable-curve.cc:440 msgid "Metallic radii" msgstr "" -#: ../programs/table/gchemtable-curve.cc:310 -#: ../programs/table/gchemtable-curve.cc:314 +#: ../programs/table/gchemtable-curve.cc:451 +#: ../programs/table/gchemtable-curve.cc:455 msgid "Melting point" msgstr "" -#: ../programs/table/gchemtable-curve.cc:325 -#: ../programs/table/gchemtable-curve.cc:329 +#: ../programs/table/gchemtable-curve.cc:466 +#: ../programs/table/gchemtable-curve.cc:470 msgid "Boiling point" msgstr "" -#: ../programs/table/gchemtable.desktop.in.h:1 +#: ../programs/table/gchemtable-curve.cc:485 +#: ../programs/table/gchemtable-data.cc:522 +msgid "Atomic number" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +msgid "Invalide data" +msgstr "" + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +#, fuzzy +msgid "None" +msgstr "Nouveau" + +#: ../programs/table/gchemtable-data.cc:523 +#, fuzzy +msgid "Atomic mass" +msgstr "Átomos" + +#: ../programs/table/gchemtable-data.cc:525 +msgid "First ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:526 +msgid "Second ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:527 +msgid "Third ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:528 +msgid "Electronic affinity" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:529 +msgid "Covalent radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:530 +msgid "Van der Waals radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:531 +msgid "Metallic radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Fusion temperature" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Ebullition temperature" +msgstr "" + +#: ../programs/table/gchemtable.desktop.in.in.h:1 #, fuzzy msgid "A Mendeleiev table of the chemical elements" msgstr "Tabla periódica de los elementos" -#~ msgid "Bottom" -#~ msgstr "Abajo" +#: ../programs/table/gchemtable.desktop.in.in.h:2 +#, fuzzy +msgid "Periodic table of the elements @STABILITY_POSTFIX@" +msgstr "Tabla periódica de los elementos" -#~ msgid "Documents" -#~ msgstr "Documentos" +#: ../templates/paint/haworth.xml.in.h:1 +#, fuzzy +msgid "Saccharides" +msgstr "Lantánidos" + +#: ../templates/paint/haworth.xml.in.h:2 +msgid "α-D-deoxyribofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:7 +msgid "β-D-deoxyribofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:4 +#, fuzzy +msgid "Amino acids" +msgstr "Actínidos" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:6 +#, fuzzy +msgid "Arginine" +msgstr "Impresión" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:12 +#, fuzzy +msgid "Cysteine" +msgstr "C_ristal" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:14 +#, fuzzy +msgid "Cytosine" +msgstr "Coordenadas" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:35 +#, fuzzy +msgid "Pyrene" +msgstr "Previsualizar" + +#: ../templates/paint/templates.xml.in.h:36 +#, fuzzy +msgid "Serine" +msgstr "Tamaño" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "" #~ msgid "Hidden" #~ msgstr "Oculto" @@ -1925,15 +5032,6 @@ #~ msgid "Notebook tab position:" #~ msgstr "Posición de las pestañas" -#~ msgid "Other" -#~ msgstr "Otro" - -#~ msgid "Preferences" -#~ msgstr "Preferencias" - -#~ msgid "Right" -#~ msgstr "Derecha" - #~ msgid "Top" #~ msgstr "Arriba" @@ -1944,10 +5042,6 @@ #~ msgid "Choose a color" #~ msgstr "Elegir un color" -#, fuzzy -#~ msgid "Notebook tabs position" -#~ msgstr "Posición de las pestañas" - #~ msgid "Can't create file %s" #~ msgstr "" #~ "No puede crear archivo\n" @@ -2040,19 +5134,9 @@ #~ msgid "Allow Gnome Crystal to act as a Bonobo server." #~ msgstr "Permitir a Gnome Cristal actuar como servidor Bonobo" -#~ msgid "" -#~ "Please enter a file name,\n" -#~ "not a directory" -#~ msgstr "" -#~ "Introduzca un nombre de archivo,\n" -#~ "no un directorio" - #~ msgid "Export data or graphics" #~ msgstr "Exportar datos o gráficos" -#~ msgid "New" -#~ msgstr "Nuevo" - #, fuzzy #~ msgid "Print active view" #~ msgstr "Imprimir vista" @@ -2080,18 +5164,6 @@ #~ msgid "Crystal" #~ msgstr "C_ristal" -#~ msgid "Add bonds" -#~ msgstr "Agregar enlaces" - -#~ msgid "Print view" -#~ msgstr "Imprimir vista" - -#~ msgid "_Atoms" -#~ msgstr "_Atomos" - -#~ msgid "_Bonds and lines" -#~ msgstr "_Enlaces y líneas" - #~ msgid "_Cleavages" #~ msgstr "_Clivajes" @@ -2102,9 +5174,6 @@ #~ msgid "_Settings" #~ msgstr "Vista" -#~ msgid "_Size" -#~ msgstr "_Tamaño" - #, fuzzy #~ msgid "gtk-preferences" #~ msgstr "Preferencias" @@ -2129,9 +5198,6 @@ #~ "Las coordenadas están en celdas unitarias y deberían estar en el rango " #~ "[0,1]" -#~ msgid "_Modify" -#~ msgstr "_Modificar" - #~ msgid "Begin" #~ msgstr "Inicio" diff -Nru gnome-chemistry-utils-0.8.6/po/fr.po gnome-chemistry-utils-0.10.9/po/fr.po --- gnome-chemistry-utils-0.8.6/po/fr.po 2007-05-10 14:07:17.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/fr.po 2009-11-14 11:30:40.000000000 +0100 @@ -1,25 +1,200 @@ # Gnome Chemistry Utils fr.po -# Copyright (C) 2002-2007 Free Software Foundation, Inc. +# Copyright (C) 2002 Free Software Foundation, Inc. # This file is distributed under the same license as the Gnome Chemistry Utils package. -# Jean Bréfort , 2002-2007. +# Jean Bréfort , 2002-2004. # msgid "" msgstr "" -"Project-Id-Version: gnome-chemistry-utils-0.8.0\n" +"Project-Id-Version: gnome-chemistry-utils-0.3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-05-10 14:06+0200\n" -"PO-Revision-Date: 2007-05-05 14:08+0200\n" +"POT-Creation-Date: 2008-09-06 13:22+0200\n" +"PO-Revision-Date: 2008-11-26 19:41+0100\n" "Last-Translator: Jean Bréfort \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../gchemutils.xml.in.h:1 ../programs/crystal/x-gcrystal.desktop.in.h:1 +#: ../gchemutils.schemas.in.h:1 +msgid "Default Bottom Margin" +msgstr "Valeur par défaut de la marge droite." + +#: ../gchemutils.schemas.in.h:2 +msgid "Default Left Margin" +msgstr "Valeur par défaut de la marge gauche." + +#: ../gchemutils.schemas.in.h:3 +msgid "Default Top Margin" +msgstr "Valeur par défaut de la marge haute." + +#: ../gchemutils.schemas.in.h:4 +msgid "Default Top Outside Margin" +msgstr "Valeur par défaut de la marge haute externe." + +#: ../gchemutils.schemas.in.h:5 +msgid "Footer height" +msgstr "Hauteur du pied de page." + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "Rendu hors écran" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "Feuille" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "Unité de mesure par défaut." + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "Orientation par défaut de la page." + +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" +"Taille de feuille de papier par défaut comme iso_a4 ou na_letter, selon la " +"norme PWG 5101.1-2002" + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "" +"Unité par défaut utilisée dans la page de configuration de l'impression." + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "Valeur par défaut de la hauteur du pied de page en points." + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "Valeur par défaut de la hauteur d'en-tête de page en points" + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" +"Valeur par défaut de la distance en pôints entre le bas de la pageet le bas " +"du corps." + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" +"Valeur par défaut de la distance en pôints entre la gauche de la pageet la " +"gauche du corps." + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" +"Valeur par défaut de la distance en pôints entre la droite de la pageet la " +"droite du corps." + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" +"Valeur par défaut de la distance en pôints entre le haut de la pageet le " +"haut du corps." + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" +"Indique si le rendu doit-il s'effectuer hors écran lors de l'impression ou " +"l'export vers une image. Donner la valeur \"vrai\" à cette variable peut " +"conduire à un arrêt prématuré du pogramme aveccertains pilotes de carte " +"vidéo." + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +msgid "2D Chemical structure" +msgstr "Structure Chimique 2D" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 msgid "Crystalline structure model" msgstr "Modèle de structure cristalline" -#: ../glade/gchemcalc.glade.h:1 ../programs/calc/gchemcalc.desktop.in.h:2 +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "Acétyle" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "Alkyle" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "Aryle" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "Benzoyle" + +#: ../database/residues.xml.in.h:5 +msgid "Benzyl" +msgstr "Benzyle" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "Butyle" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "Ethyle" + +#: ../database/residues.xml.in.h:8 +msgid "Halogen" +msgstr "Halogène" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "Isobutyle" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "Isopropyle" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "Mésyle" + +#: ../database/residues.xml.in.h:12 +msgid "Metal" +msgstr "Métal" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "Méthyle" + +#: ../database/residues.xml.in.h:14 +msgid "Phenyl" +msgstr "Phényle" + +#: ../database/residues.xml.in.h:15 +msgid "Propyl" +msgstr "Propyle" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "Tosyle" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "Triflyle" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "sec-Butyle" + +#: ../glade/gchemcalc.glade.h:1 msgid "Chemical calculator" msgstr "Calculatrice chimique" @@ -27,7 +202,7 @@ msgid "Composition" msgstr "Composition" -#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:166 +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 msgid "Formula:" msgstr "Formule :" @@ -43,7 +218,7 @@ msgid "Monoisotopic mass:" msgstr "Masse monoisotopique :" -#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:169 +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 msgid "Raw formula:" msgstr "Formule brute :" @@ -67,6 +242,152 @@ msgid "Image resolution:" msgstr "Résolution de l'image" +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "% de la taille normale" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "Centrer sur la page :" + +#: ../glade/print-setup.glade.h:4 +msgid "O_rientation:" +msgstr "O_rientation : %g" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "Papier :" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "Échelle" + +#: ../glade/print-setup.glade.h:7 +msgid "Bottom margin:" +msgstr "Marge basse :" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "Changer le type de papier" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "Configurer" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "Numé_ro de la première page :" + +#: ../glade/print-setup.glade.h:11 +msgid "Footer:" +msgstr "Pied de page :" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "En-tête :" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "En-têtes et pieds de page" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "Paysage" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "Marge gauche :" + +#: ../glade/print-setup.glade.h:16 +msgid "Page" +msgstr "Page" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "Configuration de la page" + +#: ../glade/print-setup.glade.h:18 +msgid "Portrait" +msgstr "Portrait" + +#: ../glade/print-setup.glade.h:19 +msgid "Reload defaults" +msgstr "Recharger les valeurs pas défaut" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "Paysage renversé" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "Portrait renversé" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "Marge droite :" + +#: ../glade/print-setup.glade.h:23 +msgid "Save as defaults" +msgstr "Sauver comme valeurs par défaut" + +#: ../glade/print-setup.glade.h:24 +msgid "Scale" +msgstr "Échelle" + +#: ../glade/print-setup.glade.h:25 +msgid "Scale to fit _horizontally on" +msgstr "Remplit horizontalement" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "Remplit _verticalement" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "Marge haute :" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "Unité :" + +#: ../glade/print-setup.glade.h:29 +msgid "_Automatic scaling:" +msgstr "Échelle _automatique" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "Échelle fi_xe :" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "_Pied de page :" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "_En-tête :" + +#: ../glade/print-setup.glade.h:33 +msgid "_Horizontally" +msgstr "_Horizontalement" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "Taille _naturelle" + +#: ../glade/print-setup.glade.h:35 +msgid "_Vertically" +msgstr "Verticalement" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "page(s)" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:407 +#: ../libs/gcp/preferences.cc:481 ../libs/gcp/preferences.cc:531 +msgid "Bonds" +msgstr "Liaisons" + #: ../glade/crystal/cell.glade.h:1 msgid "Cell" msgstr "Maille" @@ -135,6 +456,43 @@ msgid "γ (°):" msgstr "γ (°) :" +#: ../glade/crystal/docprop.glade.h:1 ../glade/paint/docprop.glade.h:1 +msgid "Author:" +msgstr "Auteur :" + +#: ../glade/crystal/docprop.glade.h:2 ../glade/paint/docprop.glade.h:2 +msgid "History" +msgstr "Historique" + +#: ../glade/crystal/docprop.glade.h:3 ../glade/paint/docprop.glade.h:4 +msgid "_Comments:" +msgstr "_Commentaires :" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "Date de création :" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "Propriétés du document" + +#: ../glade/crystal/docprop.glade.h:6 ../glade/paint/docprop.glade.h:7 +msgid "E-_mail:" +msgstr "Cou_rriel :" + +#: ../glade/crystal/docprop.glade.h:7 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "Date de révision :" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:10 +#: ../plugins/paint/residues/residues.glade.h:6 +msgid "_Name:" +msgstr "_Nom :" + +#: ../glade/crystal/docprop.glade.h:9 ../glade/paint/docprop.glade.h:11 +msgid "_Title:" +msgstr "_Titre :" + #: ../glade/crystal/prefs.glade.h:1 msgid "" "300\n" @@ -179,8 +537,8 @@ msgstr "Angles d'Euler" #: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 -msgid "Field of view (between 1° and 45°):" -msgstr "Angle du cône de vision (entre 1° et 45°) :" +msgid "Field of view (between 1 and 45°):" +msgstr "Angle du cône de vision (entre 1 et 45°) :" #: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 msgid "Model orientation in space:" @@ -207,41 +565,59 @@ msgstr "ψ (°) :" #: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "Appliquer les changements à :" + +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:395 +#: ../libs/gcp/preferences.cc:469 ../libs/gcp/preferences.cc:519 msgid "Atoms" msgstr "Atomes" -#: ../glade/crystal/atoms.glade.h:2 +#: ../glade/crystal/atoms.glade.h:3 msgid "Charge: " msgstr "Charge : " -#: ../glade/crystal/atoms.glade.h:3 +#: ../glade/crystal/atoms.glade.h:4 msgid "Custom" msgstr "Personnalisé" -#: ../glade/crystal/atoms.glade.h:4 +#: ../glade/crystal/atoms.glade.h:5 msgid "Custom color:" msgstr "Couleur personnalisée:" -#: ../glade/crystal/atoms.glade.h:5 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 #: ../glade/crystal/lines.glade.h:2 msgid "Dele_te all" msgstr "Supprimer _tout" -#: ../glade/crystal/atoms.glade.h:6 ../gcu/gtkcomboperiodic.c:96 -#: ../programs/table/gchemtable-app.cc:252 -#: ../programs/table/gchemtable.desktop.in.h:2 +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:261 msgid "Periodic table of the elements" msgstr "Tableau périodique des éléments" -#: ../glade/crystal/atoms.glade.h:7 +#: ../glade/crystal/atoms.glade.h:8 msgid "Radius" msgstr "Rayon" -#: ../glade/crystal/atoms.glade.h:8 +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "Éch_elle :" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" +"Élement sélectionné\n" +"Atome sélectionné\n" +"Tous les atomes" + +#: ../glade/crystal/atoms.glade.h:13 msgid "Type:" msgstr "Type :" -#: ../glade/crystal/atoms.glade.h:9 +#: ../glade/crystal/atoms.glade.h:14 msgid "" "Unknown\n" "Ionic\n" @@ -255,20 +631,20 @@ "Covalent\n" "Van der Waals" -#: ../glade/crystal/atoms.glade.h:14 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/atoms.glade.h:19 +msgid "Value (pm):" +msgstr "valeur (pm) :" + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 #: ../glade/crystal/lines.glade.h:7 msgid "_Add" msgstr "_Ajouter" -#: ../glade/crystal/atoms.glade.h:15 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 #: ../glade/crystal/lines.glade.h:8 msgid "_Delete" msgstr "_Supprimer" -#: ../glade/crystal/atoms.glade.h:16 -msgid "value (pm):" -msgstr "valeur (pm) :" - #: ../glade/crystal/cleavages.glade.h:1 msgid "Cleavages" msgstr "Clivages" @@ -310,33 +686,335 @@ msgstr "Rayon (pm) :" #: ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 +msgid "*" +msgstr "*" + +#: ../glade/crystal/size.glade.h:2 msgid "Crystal size" msgstr "Taille du cristal" -#: ../glade/crystal/size.glade.h:2 +#: ../glade/crystal/size.glade.h:3 msgid "Give minimum and maximum coordinates in cell units" msgstr "Indiquez les coordonnées minimales et maximales en nombre de cellules" -#: ../glade/crystal/size.glade.h:3 +#: ../glade/crystal/size.glade.h:4 msgid "Maximum" msgstr "Maximum" -#: ../glade/crystal/size.glade.h:4 +#: ../glade/crystal/size.glade.h:5 msgid "Minimum" msgstr "Minimum" -#: ../glade/crystal/size.glade.h:5 ../programs/crystal/atomsdlg.cc:143 +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 msgid "x" msgstr "x" -#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:153 +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 msgid "y" msgstr "y" -#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:163 +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 msgid "z" msgstr "z" +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" +msgstr "Objet associé à la flèche" + +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" +msgstr "_Role" + +#: ../glade/paint/arrow-object.glade.h:3 +msgid "gtk-close" +msgstr "gtk-close" + +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +msgid "gtk-help" +msgstr "gtk-help" + +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "Thème" + +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +msgid "Theme:" +msgstr "Thème :" + +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1879 +msgid "Hydrogen atoms position" +msgstr "Position des atomes d'hydrogène" + +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" +msgstr "" +"Gauche\n" +"Droite\n" +"Haut\n" +"Bas\n" +"Auto" + +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" +msgstr "Nouveau fichier avec thème" + +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "gtk-apply" + +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" +msgstr "gtk-cancel" + +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" +msgstr "Têtes des flèches" + +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" +msgstr "Liaisons normales" + +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" +msgstr "Liaisons de stéréochimie" + +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "Thèmes" + +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "A :" + +#: ../glade/paint/preferences.glade.h:6 +msgid "Angl_e:" +msgstr "An_gle:" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "Largeur de la queue d'une flèche (en pixels)." + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "B :" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "Largeur de ligne d'une liaison (en pixels)." + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "C :" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "_Taille d'un signe de charge :" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "Niveau de _compression par défaut des fichiers de GChemPaint :" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "Angle par défaut entre deux liaisons consécutives dans une chaîne." + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "Longueur par défaut d'une flèche (en pm comme pour les liaisons)" + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "Longueur par défaut d'une liaison (pm)." + +#: ../glade/paint/preferences.glade.h:16 +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" +"Espacement par défaut en pixels entre deux objets consécutifs lors d'une " +"opération d'alignement." + +#: ../glade/paint/preferences.glade.h:17 +msgid "Dist_ance:" +msgstr "Distanc_e :" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "Distance entre les hachures en pixels" + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" +"Distance en pixels entre deux lignes représentant une liaison multiple." + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" +"Distance en pixels entre deux lignes parallèles (soit deux flèches, soit une " +"flèche avec deux lignes)." + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "Distance en pixels de la pointe de la flèche au centre." + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" +"Distance entre la pointe de la flèche et son point de fuite, mesurée " +"parallèlement à la queue." + +#: ../glade/paint/preferences.glade.h:23 +msgid "" +"Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "Distance entre le point de fuite de la tête de la flèche et la queue." + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" +"Espace supplémentaire entre un coefficient stœchiométrique et sa molécule " +"associée en pixels." + +#: ../glade/paint/preferences.glade.h:25 +msgid "GChemPaint Preferences" +msgstr "Préférences de GChemPaint" + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "Bourrage _général :" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "Largeur de _hachure :" + +#: ../glade/paint/preferences.glade.h:28 +msgid "Ha_ve a tearable table of the elements" +msgstr "Tableau périodique des éléments _détachable" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "_Longueur :" + +#: ../glade/paint/preferences.glade.h:30 +msgid "N_ame:" +msgstr "N_om :" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "Espace ajouté à chaque extrémité d'une flèche (en pixels)." + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" +"Espace en pixels entre un signe '+' et les symboles des réactifs dans une " +"réction chimique." + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" +"Espace en pixels ajouté autour des objets de texte comme les symboles " +"chimiques, les textes et autres signes typographiques." + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" +"Échelle utilisée pour convertir une distance réelle en distance dans le " +"dessin exprimée en pm par pixel." + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "Bourrage de _signe :" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "Taille du signe d'une charge en pixels." + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "Bourrage de stœc_hiométrie :" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "Large_ur" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "Largeur en pixels à l'extrémité la plus large." + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "Largeur des hachures en pixels." + +#: ../glade/paint/preferences.glade.h:41 +msgid "_Default theme:" +msgstr "Thème par _défaut :" + +#: ../glade/paint/preferences.glade.h:42 +msgid "_Distance:" +msgstr "Di_stance :" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "Bourrage d'aligne_ment :" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "_Bourrage :" + +#: ../glade/paint/preferences.glade.h:45 +msgid "_Scale:" +msgstr "Éch_elle :" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "La_rgeur" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "Élément _courant :" + +#: ../glade/paint/zoom.glade.h:1 +msgid "Zoom" +msgstr "Zoom" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "Facteur de zoom (%) :" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr " Basique " + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr " Neutre " + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr " Amphotère " + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr " Acide " + #: ../glade/table/eltpage.glade.h:1 msgid "1:" msgstr "1 :" @@ -397,7 +1075,7 @@ msgid "Radii" msgstr "Rayons" -#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:133 +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 msgid "Show curve" msgstr "Courbe" @@ -425,6 +1103,10 @@ msgid "Temperature (K):" msgstr "Température (K) :" +#: ../glade/table/curve.glade.h:1 +msgid "GChemTable Graph" +msgstr "Graphique GChemTable" + #: ../glade/table/family.glade.h:1 msgid "" "All\n" @@ -442,7 +1124,7 @@ "Alcalins\n" "Alkalino Terreux\n" "Halogènes\n" -"Metalloïdes\n" +"Métalloïdes\n" "Gaz Nobles\n" "Non-Métaux\n" "Terre Rares\n" @@ -453,6 +1135,38 @@ msgid "Selected Family:" msgstr "Famille sélectionnée :" +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" +" bloc s " + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" +" bloc d " + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" +" bloc p " + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" +" block f " + #: ../database/elements.xml.in.h:1 msgid "Actinium" msgstr "Actinium" @@ -929,416 +1643,2105 @@ msgid "tritium" msgstr "tritium" -#: ../gcu/application.cc:181 +#: ../goffice/plugin.xml.in.h:1 +msgid "2D Chemical Structures Viewer/Editor" +msgstr "Éditeur/Visonneuse de structures chimiques 2D" + +#: ../goffice/plugin.xml.in.h:2 +msgid "Chemical structures" +msgstr "Structures Chimiques" + +#: ../goffice/plugin.xml.in.h:3 +msgid "Chemical structures component engine" +msgstr "Moteur du composant Structures Chimiques" + +#: ../goffice/plugin.xml.in.h:4 +msgid "Component : GChemPaint" +msgstr "Composant : GChemPaint" + +#: ../goffice/gogcpapp.cc:182 ../programs/paint/standaloneapp.cc:46 #, c-format -msgid "(screen resolution is %u)" -msgstr "(la résolution de l'écran est %u)" +msgid "Untitled %d" +msgstr "Sans Titre %d" -#: ../gcu/crystaldoc.cc:403 -msgid "Everything has been cleaved" -msgstr "Tout a été clivé" +#: ../goffice/gogcpwin.cc:88 +msgid "Embedded GChemPaint Object" +msgstr "Objet GChemPaint encapsulé" + +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" +msgstr "Agencement" + +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" +msgstr "Agencement de Pango" + +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" +msgstr "X" + +#: ../libs/canvas/gcp-canvas-pango.c:376 +msgid "X position" +msgstr "Position selon X" + +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" +msgstr "Y" + +#: ../libs/canvas/gcp-canvas-pango.c:384 +msgid "Y position" +msgstr "Position selon Y" + +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" +msgstr "Largeur" + +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" +msgstr "Largeur de la zone de texte." + +#: ../libs/canvas/gcp-canvas-pango.c:399 +msgid "Height" +msgstr "Hauteur" + +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "Hauteur de la zone de texte" + +#: ../libs/canvas/gcp-canvas-pango.c:407 +msgid "Anchor" +msgstr "Ancrage" + +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "Point d'ancrage du texte" + +#: ../libs/canvas/gcp-canvas-pango.c:416 +msgid "Color" +msgstr "Couleur" + +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" +msgstr "Couleur du texte sous forme de chaîne de caractères." + +#: ../libs/canvas/gcp-canvas-pango.c:424 +msgid "Editing" +msgstr "Édition" + +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" +msgstr "Indique si la zone de texte est en cours d'édition." -#: ../gcu/dialog.cc:125 -msgid "Type a number" -msgstr "Entrez un nombre" +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:145 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:363 +msgid "translator_credits" +msgstr "Jean Bréfort" -#: ../gcu/dialog.cc:134 -#, c-format -msgid "Type a number greater than or equal %g and lower than to %g" -msgstr "Entrez un nombre plus grand ou égal à %g et plus petit que %g" +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "GChemPaint est un éditeur de structures chimiques en 2D pour Gnome" + +#: ../libs/gcp/about.cc:56 +msgid "Copyright © 2001-2008 by Jean Bréfort" +msgstr "Copyright © 2001-2008 par Jean Bréfort" + +#: ../libs/gcp/application.cc:303 +msgid "Create a new reaction" +msgstr "Créer une nouvelle réaction" + +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" +msgstr "Créer une nouvelle relation de mésomérie" + +#: ../libs/gcp/application.cc:504 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" +"Veuillez entre un nom de fichier,\n" +"pas un nom de répertoire" -#: ../gcu/dialog.cc:144 +#: ../libs/gcp/application.cc:546 #, c-format -msgid "Type a number greater than %g and lower than or equal to %g" -msgstr "Entrez un nombre plus grand que %g et plus petit ou égal à %g" +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "Désolé, format %s non supporté !%s n'a pas pu être chargé." + +#: ../libs/gcp/application.cc:575 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 +#, c-format +msgid "" +"File %s\n" +"exists, overwrite?" +msgstr "" +"Le fichier %s\n" +"existe, souhaitez vous l'écraser ?" -#: ../gcu/dialog.cc:154 +#: ../libs/gcp/application.cc:588 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 #, c-format -msgid "Type a number between %g and %g, the limits are valid." -msgstr "Entrez un nombre entre %g et %g, les limites sont valides" +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" +"Erreur pendant le traitement de %s :\n" +"%s" + +#: ../libs/gcp/application.cc:796 ../libs/gcp/application.cc:924 +msgid "No filename" +msgstr "Pas nom de fichier" -#: ../gcu/dialog.cc:164 +#: ../libs/gcp/application.cc:799 #, c-format -msgid "Type a number greater than %g and lower than %g" -msgstr "Entrez un nombre plus grand que %g et plus petit que %g" +msgid "" +"Could not open file\n" +"%s" +msgstr "" +"Impossible d'ouvrir le fichier\n" +"%s" -#: ../gcu/dialog.cc:174 +#: ../libs/gcp/application.cc:802 ../libs/gcp/application.cc:936 #, c-format -msgid "Type a number lower than %g" -msgstr "Entrez un nombre plus petit que %g" +msgid "%s: parse error." +msgstr "%s: erreur d'analyse." -#: ../gcu/dialog.cc:184 +#: ../libs/gcp/application.cc:927 ../programs/crystal/document.cc:316 #, c-format -msgid "Type a number greater than %g" -msgstr "Entrez un nombre plus grand que %g" +msgid "" +"Could not load file\n" +"%s" +msgstr "" +"Erreur lors du chargement du fichier\n" +"%s" -#: ../gcu/dialog.cc:194 +#: ../libs/gcp/application.cc:930 ../programs/crystal/document.cc:319 #, c-format -msgid "Type a number lower than or equal to %g" -msgstr "Entrez un nombre plus petit ou égal à %g" +msgid "" +"%s: invalid xml file.\n" +"Tree is empty?" +msgstr "" +"%s: fichier xml incorrect.\n" +"L'arborescence est vide ?" -#: ../gcu/dialog.cc:204 +#: ../libs/gcp/application.cc:933 ../programs/crystal/document.cc:322 #, c-format -msgid "Type a number greater than or equal to %g" -msgstr "Entrez un nombre plus grand ou égal à %g" +msgid "%s: invalid file format." +msgstr "%s: format de fichier incorrect." -#: ../gcu/element.cc:99 -msgid "German" -msgstr "Allemand" +#: ../libs/gcp/application.cc:968 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 +msgid "Save as image" +msgstr "Sauvegarder en tant qu'image" -#: ../gcu/element.cc:100 -msgid "French" -msgstr "Français" +#: ../libs/gcp/atom.cc:1861 ../libs/gcp/atom.cc:1875 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "Atome" -#: ../gcu/element.cc:101 -msgid "Italian" -msgstr "Italien" +#: ../libs/gcp/atom.cc:1864 +msgid "Display symbol" +msgstr "Afficher le symbole" + +#: ../libs/gcp/atom.cc:1864 +msgid "Whether to display carbon atom symbol or not" +msgstr "Afficher ou non le symbole d'un atome de carbone" + +#: ../libs/gcp/bond.cc:980 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "Liaison" + +#: ../libs/gcp/bond.cc:984 +msgid "Move to back" +msgstr "Mettre à l'arrière plan" + +#: ../libs/gcp/bond.cc:991 +msgid "Bring to front" +msgstr "Mettre à l'avant plan" + +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +#: ../programs/crystal/docprop.cc:109 ../programs/crystal/docprop.cc:116 +msgid "%A, %B %d, %Y" +msgstr "%A %d %B %Y" -#: ../gcu/element.cc:102 -msgid "Polish" -msgstr "Polonais" +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:148 +msgid "Family" +msgstr "Famille" -#: ../gcu/element.cc:103 -msgid "Russian" -msgstr "Russe" +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "Famille de la police" + +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "Style" + +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "Style de la police (normal, oblique ou italique)" + +#: ../libs/gcp/fontsel.cc:296 +msgid "Weight" +msgstr "Graisse" + +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "La graisse de la police" + +#: ../libs/gcp/fontsel.cc:301 +msgid "Variant" +msgstr "Variante" + +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" +msgstr "La variante de la police" + +#: ../libs/gcp/fontsel.cc:306 +msgid "Stretch" +msgstr "Étirement" + +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" +msgstr "L'étirement de la police (condensé, normal or étiré)" + +#: ../libs/gcp/fontsel.cc:311 +msgid "Size" +msgstr "Taille" + +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" +msgstr "La taille de la police (en unités pango)" + +#: ../libs/gcp/fragment.cc:709 ../libs/gcp/fragment.cc:1233 +msgid "Invalid charge." +msgstr "Charge incorrecte." + +#: ../libs/gcp/fragment.cc:1206 +msgid "Invalid symbol." +msgstr "Symbole non valide." + +#: ../libs/gcp/mesomer.cc:76 +msgid "Only one arrow can link two given mesomers." +msgstr "Une seule flèche peut lier deux formes mésomères." + +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "" +"Un événement inattendu est survenu, merci de faire un rapport de bogue." -#: ../gcu/element.cc:106 -msgid "Can't find and read elements.xml" -msgstr "Impossible de trouver et lire elements.xml" +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "Aucune place disponible entre la molécule et la flèche !" -#: ../gcu/element.cc:111 ../gcu/element.cc:118 -msgid "Incorrect file format: elements.xml" -msgstr "Format de fichier incorrect : elements.xml" +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "Les flèches isolées ne sont pas autorisées !" -#: ../gcu/element.cc:151 -msgid "English" -msgstr "Anglais" +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." +msgstr "" +"Molécule isolée !\n" +"Ajoutez les flèches manquantes." -#: ../gcu/element.cc:430 -msgid "Can't find and read radii.xml" -msgstr "Impossible de trouver et lire radii.xml" +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "Ajoutez les flèches manquantes." + +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" +msgstr "Détruire la relation de mésomérie" + +#: ../libs/gcp/molecule.cc:515 +msgid "Molecule" +msgstr "Molécule" + +#: ../libs/gcp/molecule.cc:520 +msgid "Export molecule to Ghemical" +msgstr "Exporter la molécule vers Ghemical" + +#: ../libs/gcp/molecule.cc:527 +msgid "Generate InChI" +msgstr "Générer l'InChI" + +#: ../libs/gcp/molecule.cc:532 +msgid "NIST WebBook page for this molecule" +msgstr "La page du NIST WebBook pour cette molécule" + +#: ../libs/gcp/molecule.cc:537 +msgid "PubChem page for this molecule" +msgstr "La page de PubChem pour cette molécule" + +#: ../libs/gcp/molecule.cc:543 +msgid "Generate SMILES" +msgstr "Générer le code SMILES" + +#: ../libs/gcp/molecule.cc:549 +msgid "Open in Calculator" +msgstr "Ouvrir dans la calculette" + +#: ../libs/gcp/molecule.cc:555 +msgid "Select alignment item" +msgstr "Séléctionner l'élément utilisé pour l'alignement" + +#: ../libs/gcp/preferences.cc:349 ../libs/gcp/preferences.cc:368 +#: ../libs/gcp/preferences.cc:497 ../libs/gcp/theme.cc:336 +#: ../libs/gcp/theme.cc:343 ../programs/table/gchemtable-app.cc:143 +msgid "Default" +msgstr "Défaut" -#: ../gcu/element.cc:435 ../gcu/element.cc:446 -msgid "Incorrect file format: radii.xml" -msgstr "Format de fichier incorrect : radii.xml" +#: ../libs/gcp/preferences.cc:389 ../libs/gcp/preferences.cc:458 +#: ../libs/gcp/preferences.cc:525 +msgid "General" +msgstr "Général" + +#: ../libs/gcp/preferences.cc:399 ../libs/gcp/preferences.cc:473 +#: ../libs/gcp/preferences.cc:527 +msgid "Font" +msgstr "Police" + +#: ../libs/gcp/preferences.cc:403 ../libs/gcp/preferences.cc:477 +#: ../libs/gcp/preferences.cc:529 +msgid "Other" +msgstr "Autre" + +#: ../libs/gcp/preferences.cc:411 ../libs/gcp/preferences.cc:485 +#: ../libs/gcp/preferences.cc:533 +msgid "Arrows" +msgstr "Flèches" + +#: ../libs/gcp/preferences.cc:415 ../libs/gcp/preferences.cc:489 +#: ../libs/gcp/preferences.cc:535 ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "Texte" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" +msgstr "Ajouter un coefficient stœchiométrique" -#: ../gcu/element.cc:530 -msgid "Can't find and read elecprops.xml" -msgstr "Impossible de trouver et lire elecprops.xml" +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" +"Erreur, il n'est pas possible de construire une réaction à partir des objets " +"sélectionnés." -#: ../gcu/element.cc:535 ../gcu/element.cc:540 -msgid "Incorrect file format: elecprops.xml" -msgstr "Format de fichier incorrect : elecprops.xml" +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "Détruire la réaction" + +#: ../libs/gcp/reaction-arrow.cc:380 +msgid "Arrow" +msgstr "Flèche" + +#: ../libs/gcp/reaction-arrow.cc:386 +msgid "Attach selection to arrow..." +msgstr "Attacher la sélection à la flèche..." -#: ../gcu/element.cc:688 -msgid "Can't find and read isotopes.xml" -msgstr "Impossible de trouver et lire isotopes.xml" +#: ../libs/gcp/reaction-prop.cc:39 +msgid "Unkown" +msgstr "Inconnu" -#: ../gcu/element.cc:693 ../gcu/element.cc:700 -msgid "Incorrect file format: isotopes.xml" -msgstr "Format de fichier incorrect : isotopes.xml" +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" +msgstr "Catalyseur" + +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" +msgstr "Réactif" + +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "Produit" + +#: ../libs/gcp/reaction-prop.cc:43 +msgid "Solvent" +msgstr "Solvant" + +#: ../libs/gcp/reaction-prop.cc:44 +msgid "Temperature" +msgstr "Température" + +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" +msgstr "Pression" + +#: ../libs/gcp/reaction-prop.cc:46 +msgid "Time" +msgstr "Durée" + +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" +msgstr "Enthalpie" -#: ../gcu/filechooser.cc:40 +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 msgid "Save as" msgstr "Enregistrer _sous" -#: ../gcu/filechooser.cc:40 -msgid "Open" -msgstr "Ouvrir" +# c-format +#: ../libs/gcp/stringdlg.cc:145 +#, c-format +msgid "" +"Could not open file %s, error was:\n" +"%s" +msgstr "" +"Impossible d'ouvrir le fichier %s,\n" +"l'erreur est: %s" -#: ../gcu/filechooser.cc:59 -msgid "File _type:" -msgstr "_Type de fichier :" +#: ../libs/gcp/stringdlg.cc:161 +#, c-format +msgid "" +"Could not write to file %s, error was:\n" +"%s." +msgstr "" +"Impossible d'écrire dans le fichier %s,\n" +"l'erreur était :\n" +"%s" -#: ../gcu/filechooser.cc:61 -msgid "Automatic" -msgstr "Automatique" +#: ../libs/gcp/stringdlg.cc:175 +#, c-format +msgid "" +"Could not close file %s, error was:\n" +"%s" +msgstr "" +"Erreur lors de la fermeture du fichier %s\n" +"l'erreur était :\n" +"%s" -#: ../gcu/formula.cc:391 ../gcu/formula.cc:429 -msgid "Unmatched parenthesis" -msgstr "Parenthèse non appariée" +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +msgid "This should not have occured, please file a bug record." +msgstr "" +"Un événement inattendu est survenu, merci de faire un rapport de bogue." -#: ../gcu/formula.cc:417 -msgid "Could not interpret the symbol list" -msgstr "Impossible d'interpréter la liste de symboles" +#: ../libs/gcp/theme.cc:449 +msgid "NewTheme1" +msgstr "NouveauThème1" -#: ../gcu/formula.cc:423 -msgid "Parser failed, please fill a bug report." -msgstr "L'analyseur a échoué, veuillez remplir un rapport de bogue." +#: ../libs/gcp/theme.cc:453 +#, c-format +msgid "NewTheme%d" +msgstr "NouveauThème%d" -#: ../gcu/formula.cc:431 -msgid "Invalid character" -msgstr "Charactère invalide" +#: ../libs/gcp/theme.cc:550 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "Inconnu" + +#: ../libs/gcp/view.cc:1015 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" +"Impossible de créer le flux !\n" +"%s" -#: ../gcu/glview.cc:486 +#: ../libs/gcp/view.cc:1051 ../libs/gcu/glview.cc:394 #, c-format msgid "Unable to save image file: %s\n" msgstr "Impossible de sauvegarder l'image : %s\n" -#: ../gcu/gtkchem3dviewer.cc:154 -msgid "Background Color" -msgstr "Couleur du fond" +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:280 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:134 +#: ../programs/table/gchemtable-curve.cc:212 +msgid "_File" +msgstr "_Fichier" -#: ../gcu/gtkchem3dviewer.cc:155 -msgid "Color used to paint the background" -msgstr "Couleur utilisée pour peindre le fond" +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:281 +msgid "_New File" +msgstr "_Nouveau fichier" -#: ../gcu/gtkperiodic.c:334 -#, c-format -msgid "" -"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" -"p\n" -msgstr "" -"La valeur %d n'est pas dans la plage valide pour l'instance de GtkPeriodic %" -"p\n" +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:282 +msgid "Create a new file" +msgstr "Créer un nouveau fichier" -#: ../programs/3d/application.cc:35 ../programs/3d/application.cc:46 -msgid "GChem3D Viewer" -msgstr "Visionneuse de molécules GChem3D" +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." +msgstr "Nouvea_u fichier avec thème..." + +#: ../libs/gcp/window.cc:284 +msgid "Create a new file using a theme" +msgstr "Créer un nouveau fichier utilisant un thème" -#: ../programs/3d/application.cc:92 -msgid "Sorry, format not supported!" -msgstr "Désolé, format non supporté !" +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:283 ../programs/spectra/window.cc:167 +msgid "_Open..." +msgstr "_Ouvrir..." + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:284 ../programs/spectra/window.cc:168 +msgid "Open a file" +msgstr "Ouvrir un fichier" + +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:285 +msgid "_Save" +msgstr "_Enregistrer" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:286 +msgid "Save the current file" +msgstr "Enregistrer le fichier actif" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:287 +msgid "Save _As..." +msgstr "Enregistrer _sous..." + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:288 +msgid "Save the current file with a different name" +msgstr "Enregistrer le fichier actif sous un nouveau nom" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:169 +msgid "Save As _Image..." +msgstr "Enregistrer en tant qu'_Image..." + +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:290 +#: ../programs/spectra/window.cc:170 +msgid "Save the current file as an image" +msgstr "Enregistrer le fichier actif en tant qu'image" + +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:291 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:213 +msgid "Page Set_up..." +msgstr "_Configuration de l'impression..." + +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:292 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:214 +msgid "Setup the page settings for your current printer" +msgstr "Configure la mise en page pour votre imprimante" + +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:215 +msgid "Print Pre_view" +msgstr "_Aperçu avant impression" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:294 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:216 +msgid "Print preview" +msgstr "Aperçu avant impression" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:295 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:217 +msgid "_Print..." +msgstr "Im_primer..." + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:296 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "Print the current file" +msgstr "Imprimer la scène courante" + +#: ../libs/gcp/window.cc:299 ../programs/crystal/window.cc:297 +#: ../programs/table/gchemtable-curve.cc:219 +msgid "Prope_rties..." +msgstr "P_ropriétés..." + +#: ../libs/gcp/window.cc:300 ../programs/crystal/window.cc:298 +msgid "Modify the file's properties" +msgstr "Édite les propriétés du fichier" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:299 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:221 +msgid "_Close" +msgstr "_Fermer" + +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:300 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:222 +msgid "Close the current file" +msgstr "Fermer le fichier actif" + +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:301 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:137 +#: ../programs/table/gchemtable-curve.cc:223 +msgid "_Quit" +msgstr "_Quitter" + +#: ../libs/gcp/window.cc:304 +msgid "Quit GChemPaint" +msgstr "Quitter GChemPaint" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:303 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:225 +msgid "_Edit" +msgstr "_Édition" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "A_nnuler" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "Annule la dernière opération" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "_Refaire" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "Refait la dernière opération" + +#: ../libs/gcp/window.cc:310 +msgid "Cu_t" +msgstr "Co_uper" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "Coupe la sélection" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:226 +msgid "_Copy" +msgstr "_Copier" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:227 +msgid "Copy the selection" +msgstr "Copie la sélection" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "C_oller" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "Colle le contenu du presse-papier" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "_Effacer" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "Efface la sélection" + +#: ../libs/gcp/window.cc:318 +msgid "Select _All" +msgstr "_Tout sélectionner" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "Sélectionne le document en entier" + +#: ../libs/gcp/window.cc:320 +msgid "Pr_eferences..." +msgstr "_Préférences..." + +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:305 +msgid "Configure the application" +msgstr "Configurer l'application" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:317 ../programs/table/gchemtable-app.cc:139 +msgid "_View" +msgstr "_Vue" + +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "_Zoom" + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "_400%" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "Zoom à 400%" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "_300%" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "Zoom à 300%" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "_200%" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "Zoom à 200%" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "150%" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "Zoom à 150%" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "_100%" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "Zoom à 100%" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "_75%" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "Zoom à 75%" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "_50%" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "Zoom à 50%" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "25%" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "Zoom à 25%" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "_Zoom à...%" + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "Ouvrir la boite de dialogue de zoom" + +#: ../libs/gcp/window.cc:342 +msgid "_Tools" +msgstr "_Outils" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:320 +msgid "_Windows" +msgstr "Fe_nêtres" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:325 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:163 +#: ../programs/table/gchemtable-curve.cc:228 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "_Help" +msgstr "_Aide" + +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:164 +#: ../programs/table/gchemtable-curve.cc:229 +msgid "_Contents" +msgstr "_Contenu" + +#: ../libs/gcp/window.cc:346 +msgid "View help for GChemPaint" +msgstr "Consulter l'aide pour GChemPaint" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "Page _internet de GChemPaint" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "Ouvre un navigateur internet à la page de GChemPaint" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:330 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:168 +#: ../programs/table/gchemtable-curve.cc:235 +msgid "Live assistance" +msgstr "_Assistance en ligne" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:331 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "Ouvrir le cannal IRC des Gnome Chemistry Utils" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:332 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Ask a question" +msgstr "Poser une _question" + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "Envoie un message sur la liste de diffusion de GChemPaint" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:334 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "Report _Bugs" +msgstr "_Rapporter une Anomalie" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "Ouvre un navigateur internet pour signaler un problème via Bugzilla" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:336 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "_About" +msgstr "À _propos..." + +#: ../libs/gcp/window.cc:356 +msgid "About GChemPaint" +msgstr "À propos de GChemPain" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "Ou_vrir récents" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:459 +msgid "Ready" +msgstr "Prêt" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "GChemPaint" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:740 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "``%s'' a été modifié? Voulez-vous le sauvegarder ?" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "(la résolution de l'écran est %u)" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "Tout a été clivé" + +#: ../libs/gcu/dialog.cc:131 +msgid "Type a number" +msgstr "Entrez un nombre" + +#: ../libs/gcu/dialog.cc:140 +#, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "Entrez un nombre plus grand ou égal à %g et plus petit que %g" + +#: ../libs/gcu/dialog.cc:150 +#, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "Entrez un nombre plus grand que %g et plus petit ou égal à %g" + +#: ../libs/gcu/dialog.cc:160 +#, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "Entrez un nombre entre %g et %g, les limites sont valides" + +#: ../libs/gcu/dialog.cc:170 +#, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "Entrez un nombre plus grand que %g et plus petit que %g" + +#: ../libs/gcu/dialog.cc:180 +#, c-format +msgid "Type a number lower than %g" +msgstr "Entrez un nombre plus petit que %g" + +#: ../libs/gcu/dialog.cc:190 +#, c-format +msgid "Type a number greater than %g" +msgstr "Entrez un nombre plus grand que %g" + +#: ../libs/gcu/dialog.cc:200 +#, c-format +msgid "Type a number lower than or equal to %g" +msgstr "Entrez un nombre plus petit ou égal à %g" + +#: ../libs/gcu/dialog.cc:210 +#, c-format +msgid "Type a number greater than or equal to %g" +msgstr "Entrez un nombre plus grand ou égal à %g" + +#: ../libs/gcu/element.cc:97 +msgid "German" +msgstr "Allemand" + +#: ../libs/gcu/element.cc:98 +msgid "French" +msgstr "Français" + +#: ../libs/gcu/element.cc:99 +msgid "Italian" +msgstr "Italien" + +#: ../libs/gcu/element.cc:100 +msgid "Polish" +msgstr "Polonais" + +#: ../libs/gcu/element.cc:101 +msgid "Brazilian" +msgstr "Brézilien" + +#: ../libs/gcu/element.cc:102 +msgid "Russian" +msgstr "Russe" + +#: ../libs/gcu/element.cc:104 +msgid "Can't find and read elements.xml" +msgstr "Impossible de trouver et lire elements.xml" + +#: ../libs/gcu/element.cc:110 ../libs/gcu/element.cc:119 +msgid "Incorrect file format: elements.xml" +msgstr "Format de fichier incorrect : elements.xml" + +#: ../libs/gcu/element.cc:155 +msgid "English" +msgstr "Anglais" + +#: ../libs/gcu/element.cc:407 +msgid "Can't find and read radii.xml" +msgstr "Impossible de trouver et lire radii.xml" -#: ../programs/3d/application.cc:102 ../programs/crystal/application.cc:214 +#: ../libs/gcu/element.cc:413 ../libs/gcu/element.cc:426 +msgid "Incorrect file format: radii.xml" +msgstr "Format de fichier incorrect : radii.xml" + +#: ../libs/gcu/element.cc:514 +msgid "Can't find and read elecprops.xml" +msgstr "Impossible de trouver et lire elecprops.xml" + +#: ../libs/gcu/element.cc:520 ../libs/gcu/element.cc:527 +msgid "Incorrect file format: elecprops.xml" +msgstr "Format de fichier incorrect : elecprops.xml" + +#: ../libs/gcu/element.cc:676 +msgid "Can't find and read isotopes.xml" +msgstr "Impossible de trouver et lire isotopes.xml" + +#: ../libs/gcu/element.cc:682 ../libs/gcu/element.cc:691 +msgid "Incorrect file format: isotopes.xml" +msgstr "Format de fichier incorrect : isotopes.xml" + +#: ../libs/gcu/filechooser.cc:43 +msgid "Open" +msgstr "Ouvrir" + +#: ../libs/gcu/filechooser.cc:62 +msgid "File _type:" +msgstr "_Type de fichier :" + +#: ../libs/gcu/filechooser.cc:64 +msgid "Automatic" +msgstr "Automatique" + +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "Parenthèse non appariée" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "Impossible d'interpréter la liste de symboles" + +#: ../libs/gcu/formula.cc:546 +msgid "Parser failed, please fill a bug report." +msgstr "L'analyseur a échoué, veuillez remplir un rapport de bogue." + +#: ../libs/gcu/formula.cc:554 +msgid "Invalid character" +msgstr "Charactère invalide" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +msgid "Background Color" +msgstr "Couleur du fond" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "Couleur utilisée pour peindre le fond" + +#: ../libs/gcu/gtkperiodic.c:331 #, c-format msgid "" -"File %s\n" -"exists, overwrite?" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" msgstr "" -"Le fichier %s\n" -"existe, souhaitez vous l'écraser ?" +"La valeur %d n'est pas dans la plage valide pour l'instance de GtkPeriodic %" +"p\n" -#: ../programs/3d/application.cc:147 ../programs/crystal/application.cc:145 -msgid "Save as image" -msgstr "Sauvegarder en tant qu'image" +#: ../libs/gcu/loader.cc:106 +msgid "Chemical file loader type." +msgstr "Type des filtres d'importation des fichiers chimiques." -#: ../programs/3d/main.cc:40 -msgid "GChem3d Viewer version: " -msgstr "Version de la visionneuse GChem3D :" +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "%.1f %s de largeur par %.1f %s de hauteur" -#: ../programs/3d/main.cc:51 -msgid "Prints GChem3d Viewer version" -msgstr "Imprime la version de la visionneuse GChem3D" +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "%.0f %s de largeur par %.0f %s de hauteur" -#: ../programs/3d/main.cc:52 -msgid "Background color: white, black or #rrggbb (default is black)" -msgstr "Couleur de fond : white, black ou #rrvvbb (black par défaut)" +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "pixels" + +#: ../libs/gcu/printable.cc:35 +msgid "points" +msgstr "points" + +#: ../libs/gcu/printable.cc:36 +msgid "inches" +msgstr "pouces" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "mm" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "Longueur d'onde (1/cm)" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1321 +msgid "Transmittance" +msgstr "Transmittance" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1320 +msgid "Absorbance" +msgstr "Absorbance" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1256 +msgid "Chemical shift (ppm)" +msgstr "Déplacement chimique (ppm)" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "Longueur d'onde (nm)" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "Longueur d'onde (µm)" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "Temps (s)" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1257 +msgid "Frequency (Hz)" +msgstr "Fréquence (Hz)" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "Rapport masse/charge" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "Abondance relative" + +#: ../libs/gcu/spectrumdoc.cc:616 ../libs/gcu/spectrumdoc.cc:1263 +msgid "Show integral" +msgstr "Montrer l'intégrale" + +#: ../libs/gcu/spectrumdoc.cc:616 +msgid "Hide integral" +msgstr "Cacher l'intégrale" + +#: ../libs/gcu/spectrumdoc.cc:706 ../libs/gcu/spectrumdoc.cc:1593 +msgid "Found too many data!" +msgstr "Trom de données trouvées !" + +#: ../libs/gcu/spectrumdoc.cc:1253 ../libs/gcu/spectrumdoc.cc:1300 +msgid "X unit:" +msgstr "Unité X :" + +#: ../libs/gcu/spectrumdoc.cc:1304 +msgid "Wave length (nm)" +msgstr "Longueur d'onde (nm)" + +#: ../libs/gcu/spectrumdoc.cc:1306 +msgid "Wave length (µm)" +msgstr "Longueur d'onde (µm)" + +#: ../libs/gcu/spectrumdoc.cc:1307 +msgid "Wave number (1/cm)" +msgstr "Nombre d'ondes (1/cm)" + +#: ../libs/gcu/spectrumdoc.cc:1312 +msgid "Invert X Axis" +msgstr "Inverser l'axe des X" + +#: ../libs/gcu/spectrumdoc.cc:1317 +msgid "Y unit:" +msgstr "Unité Y :" + +#: ../libs/gcu/spectrumdoc.cc:1488 ../libs/gcu/spectrumdoc.cc:1518 +msgid "Constant too long" +msgstr "Constante trop longue" + +#: ../libs/gcu/spectrumdoc.cc:1511 +msgid "Invalid character in data block" +msgstr "Charactère invalide dans le bloc de données" + +#: ../libs/gcu/spectrumdoc.cc:1615 +msgid "Data check failed!" +msgstr "Échec de la vérification des données !" + +#: ../libs/gcu/spectrumdoc.cc:1632 +msgid "Data check failed: FIRSTX!" +msgstr "Échec de la vérification des données : FIRSTX !" + +#: ../libs/gcu/spectrumdoc.cc:1637 +msgid "Data check failed: FIRSTY!" +msgstr "Échec de la vérification des données : FIRSTY !" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1641 +msgid "Found too many data" +msgstr "Trop de données ont été trouvées." + +#: ../libs/gcu/spectrumdoc.cc:1947 +msgid "Integral" +msgstr "Intégrale" + +#: ../libs/gcu/spectrumdoc.cc:2068 +msgid "Real transformed data" +msgstr "Données réelles transformées" + +#: ../libs/gcu/spectrumdoc.cc:2085 +msgid "Imaginary transformed data" +msgstr "Données imagnaires transformées" + +#: ../libs/gcu/spectrumview.cc:80 +msgid "Minimum X value:" +msgstr "Valeur minimale X" + +#: ../libs/gcu/spectrumview.cc:85 +msgid "Maximum X value:" +msgstr "Valeur maximale X" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "Tentative d'addition de dexu valeurs n'ayant pas la même dimension." + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:502 ../plugins/loaders/cdx/cdx.cc:506 +#: ../plugins/loaders/cdx/cdx.cc:631 ../plugins/loaders/cdx/cdx.cc:636 +msgid "Unsupported feature, please report!" +msgstr "Fonction non supportée, contactez l'équipe de développement !" + +#: ../plugins/loaders/cdx/cdx.cc:593 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "échec pour %s\n" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "Filtre de fichiers Chemdraw cdx" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "Filtre de fichiers Chemdraw cdx." + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "Filtre : cdx" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "'%s' est corrompu !" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "Filtre de fichiers Chemdraw XML" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "Filtre de fichiers Chemdraw XML." + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "Filtre : cdxml" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:169 +#: ../plugins/paint/bonds/bondtool.cc:279 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "Orientation : %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "_Longueur de la flèche" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +msgid "H_alf heads" +msgstr "_Demi pointes" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +msgid "Set _default" +msgstr "_Par défaut" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "Pointes _entières" -#: ../programs/3d/main.cc:53 +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 msgid "" -"How molecules are displayed; possible values are BallnStick (the default) " -"and SpaceFill" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." msgstr "" -"Comment les molécules sont dessinées ; les valeurs possibles sont BallnStick " -"(la valeur par défaut) et SpaceFill" +"Si vraie, les flèches de réactions réversibles utiliseront des têtes " +"entières par défaut au lieur de demi-têtes." -#: ../programs/3d/main.cc:75 -msgid " [file]" -msgstr " [fichier]" +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +msgid "Use full arrows heads for reversible reactions" +msgstr "Utiliser des têtes de flèches entières pour les réactions réversibles" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "Créer un chemin de rétrosynthèse" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "Flèche simple" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "Ajouter une flèche pour une réaction irréversible" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "Flèche double" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "Ajouter une paire de flèches pour une réaction réversible" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "Flèche de rétrosynthèse" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "Ajouter une flèche de rétrosynthèse" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "Flêche de mésomérie" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "Ajouter une flèche à deux pointes pour représenter une mésomérie" + +#: ../plugins/paint/arrows/plugin.cc:92 +msgid "Electron pair move arrow" +msgstr "Flèche de déplacement d'une paire d'électrons" + +#: ../plugins/paint/arrows/plugin.cc:93 +msgid "Add a curved arrow to represent an electron pair move" +msgstr "" +"Ajouter une flèche courbe pour représenter un déplacement de paire " +"d'électrons" -#: ../programs/3d/main.cc:97 ../programs/crystal/main.cc:145 +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "Flèche de déplacement d'unh électron" + +#: ../plugins/paint/arrows/plugin.cc:96 +msgid "Add a curved arrow to represent an single electron move" +msgstr "" +"Ajouter une flèche courbe pour représenter le déplacement d'un électron" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "Absence de molécule cible !" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "Présence de cibles multiples ou flèches manquantes." + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "Désolé, les chemins de rétrosynthèse cycliques ne sont pas supportés." + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "Détruire le chemin de rétrosynthèse" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "Une seule flèche peut lier deux étapes données." + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "Ajoute ou modifie un atome" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "Charge positve" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "Incrémente la charge d'un atome" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "Charge négative" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "Décrémente la charge d'un atome" + +#: ../plugins/paint/atoms/plugin.cc:64 +msgid "Electron Pair" +msgstr "Paire d'électrons" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "Ajoute une paire d'électrons à un atome" + +#: ../plugins/paint/atoms/plugin.cc:67 +msgid "Unpaired Electron" +msgstr "Électron non apparié" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "Ajoute un électron non apparié à un atome" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "Propriété" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "Valeur" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "Angle entre deux nouvelles liaison dans une chaîne ouverte" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "Angl_e de liaison :" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "_Longueur de liaison :" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "Longueur par défaut pour les nouvelles liaisons" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "Utiler les atomes existants pour la fin des liaisons" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "_Utiliser les atomes existants" + +#: ../plugins/paint/bonds/bondtool.cc:354 +msgid "Invalid document tree, please file a bug report" +msgstr "" +"L'arbre du document n'est pas valide,\n" +"veuillez faire un rapport de bogue." + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "Auto" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "_Nombre de liaisons :" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "" +"If set, the number of new bonds will be evaluated from the mouse position" +msgstr "" +"Si la case est cochée, nombre de liaisons sera calculé à partir de la " +"position de la souris" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "Nombre de nouvelles liaisons" + +#: ../plugins/paint/bonds/chaintool.cc:125 +#: ../plugins/paint/bonds/chaintool.cc:247 #, c-format -msgid "Invalid or misplaced argument: %s\n" -msgstr "Argument invalide ou mal placé : %s\n" +msgid "Bonds: %d, Orientation: %g" +msgstr "Liaisons: %d, Orientation : %g" -#: ../programs/3d/window.cc:119 -msgid "GChem3D is a molecular structures viewer for Gnome" -msgstr "GChem3D est une visionneuse de structures moléculaires pour Gnome" +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "Ajoute une liaison ou change la multiplicité d'une liaison existante" + +#: ../plugins/paint/bonds/plugin.cc:59 +msgid "Chain" +msgstr "Chaîne" + +#: ../plugins/paint/bonds/plugin.cc:60 +msgid "Add a chain" +msgstr "Ajoute une chaîne" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "Outil liaison vers l'avant" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "Ajoute une liaison vers l'avant" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "Outil liaison vers l'arrière" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "Ajoute une liaison vers l'arrière" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "Outil liaison de stéréochimie indéterminée" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "Ajoute une de stéréochimie indéterminée" + +#: ../plugins/paint/bonds/plugin.cc:71 +msgid "Fore bond tool" +msgstr "Outil liaison large" + +#: ../plugins/paint/bonds/plugin.cc:72 +msgid "Add a fore bond" +msgstr "Ajoute une liaison large" + +#: ../plugins/paint/bonds/plugin.cc:74 +msgid "Delocalized bond tool" +msgstr "Outil liaison délocalisée" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "Ajouter un système de liaisons délocalisées" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +msgid "Cycle _Size" +msgstr "_Taille du cycle :" + +#: ../plugins/paint/cycles/plugin.cc:54 +msgid "Three atoms cycle" +msgstr "Cycle à trois atomes" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "Ajoute un cycle à trois atomes" + +#: ../plugins/paint/cycles/plugin.cc:57 +msgid "Four atoms cycle" +msgstr "Cycle à quatre atomes" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "Ajoute un cycle à quatre atomes" + +#: ../plugins/paint/cycles/plugin.cc:60 +msgid "Five atoms cycle" +msgstr "Cycle à cinq atomes" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "Ajoute un cycle à cinq atomes" + +#: ../plugins/paint/cycles/plugin.cc:63 +msgid "Six atoms cycle" +msgstr "Cycle à six atomes" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "Ajoute un cycle à six atomes" + +#: ../plugins/paint/cycles/plugin.cc:66 +msgid "Seven atoms cycle" +msgstr "Cycle à sept atomes" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "Ajoute un cycle à sept atomes" + +#: ../plugins/paint/cycles/plugin.cc:69 +msgid "Eight atoms cycle" +msgstr "Outil de cycle à huit atomes" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "Ajoute un cycle à huit atomes" + +#: ../plugins/paint/cycles/plugin.cc:72 +msgid "Variable sized cycle" +msgstr "Cycle à taille variable" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "Ajoute un cycle" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "É_diter les résidus..." + +#: ../plugins/paint/residues/plugin.cc:105 +msgid "Create new abbreviations" +msgstr "Créer de nouvelles abréviations" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +msgid "Please, provide only one molecule." +msgstr "Veuillez fournir une seule molécule." + +#: ../plugins/paint/residues/residues-dlg.cc:232 +msgid "Please, provide a name for the residue" +msgstr "Veuillez fournir un nom pour le résidu." + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "Le symboles de plus de huit caractères ne sont pas autorisés." + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "New" +msgstr "Nouveau" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +msgid "\"New\" is not a valid symbol" +msgstr "``Nouveau'' n'est pas un symbole valide." + +#: ../plugins/paint/residues/residues-dlg.cc:265 +msgid "Please provide at least one symbol" +msgstr "Veuillez fournir au moins un symbole." -#. const gchar * documentors[] = {NULL}; -#: ../programs/3d/window.cc:121 -msgid "Copyright © 2004-2007 Jean Bréfort\n" -msgstr "Copyright © 2004-2007 par Jean Bréfort\n" +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "%s est déjà utilisé par un autre residu." -#. Note to translators: replace the following string with the appropriate credits for you lang -#: ../programs/3d/window.cc:139 ../programs/calc/gchemcalc.cc:146 -#: ../programs/crystal/window.cc:120 ../programs/table/gchemtable-app.cc:122 -msgid "translator_credits" -msgstr "Jean Bréfort" +#: ../plugins/paint/residues/residues-dlg.cc:287 +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "" +"La formule est vide, cela ne devrait jamais arriver.\n" +"Merci de faire un rapport de bogue." -#: ../programs/3d/window.cc:161 ../programs/calc/gchemcalc.cc:406 -#: ../programs/crystal/window.cc:247 ../programs/table/gchemtable-app.cc:141 -msgid "_File" -msgstr "_Fichier" +#: ../plugins/paint/residues/residues.glade.h:1 +msgid "Formula" +msgstr "Formule" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "Identité" + +#: ../plugins/paint/residues/residues.glade.h:4 +msgid "Residues" +msgstr "Résidus" + +#: ../plugins/paint/residues/residues.glade.h:5 +msgid "_Generic" +msgstr "_Générique" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "_Symbole(s) :" + +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-delete" +msgstr "gtk-delete" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-save" +msgstr "gtk-save" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "Propriétés du groupe..." + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "A_ligner" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "Distance :" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "Grouper et/ou aligner les objets sélectionnés" -#: ../programs/3d/window.cc:162 ../programs/crystal/window.cc:250 -msgid "_Open..." -msgstr "_Ouvrir..." +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" +"Normal\n" +"Haut\n" +"Mi-hauteur\n" +"Bas\n" +"Gauche\n" +"Centre\n" +"Droite" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "_Grouper" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "E_spacer régulièrement" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "Sélectionner" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "Sélectionner un ou plusieurs objets" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "Efface" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "Gomme" + +#: ../plugins/paint/selection/selectiontool.cc:368 +msgid "Creation failed!" +msgstr "La création a échoué !" + +#: ../plugins/paint/selection/selectiontool.cc:392 +msgid "Group and/or align objects" +msgstr "Grouper et/ou aligner des objets" + +#: ../plugins/paint/selection/selectiontool.cc:430 +msgid "Horizontal flip" +msgstr "Retournement horizontal" + +#: ../plugins/paint/selection/selectiontool.cc:431 +msgid "Flip the selection horizontally" +msgstr "Retourne la sélection horizontalement" + +#: ../plugins/paint/selection/selectiontool.cc:432 +msgid "Vertical flip" +msgstr "Retournement vertical" + +#: ../plugins/paint/selection/selectiontool.cc:433 +msgid "Flip the selection vertically" +msgstr "Retourne la sélection verticalement" + +#: ../plugins/paint/selection/selectiontool.cc:434 +msgid "Merge" +msgstr "Fusionne" + +#: ../plugins/paint/selection/selectiontool.cc:435 +msgid "Merge two molecules" +msgstr "Fusionner deux molécules" + +#: ../plugins/paint/selection/selectiontool.cc:439 +msgid "_Rotate" +msgstr "_Rotation" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Rotate the selection" +msgstr "Fait pivoter la sélection" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "Nouveau modèle" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "_Catégorie :" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "_Nom" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "Modèles" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "Utilise ou gère les modèles" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "Divers" + +#: ../plugins/paint/templates/templates.glade.h:1 +msgid "No selected template" +msgstr "Aucun modèle sélectionné" + +#: ../plugins/paint/templates/templates.glade.h:2 +msgid "_Templates" +msgstr "_Modèles" + +#: ../plugins/paint/templates/templates.glade.h:3 +msgid "category" +msgstr "catégorie" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "Veuillez fournir un objet." + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "Veuillez donner un nom." + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "Veuillez choisir une catégorie." -#: ../programs/3d/window.cc:163 ../programs/crystal/window.cc:251 -msgid "Open a file" -msgstr "Ouvrir un fichier" +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" +"Aucun\n" +"Simple\n" +"Double\n" +"Bas" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "_Taille" + +#: ../plugins/paint/text/fontsel.glade.h:6 +msgid "Stri_kethrough" +msgstr "_Barré" + +#: ../plugins/paint/text/fontsel.glade.h:7 +msgid "_Color:" +msgstr "_Couleur :" + +#: ../plugins/paint/text/fontsel.glade.h:8 +msgid "_Family:" +msgstr "_Famille" + +#: ../plugins/paint/text/fontsel.glade.h:9 +msgid "_Position:" +msgstr "_Position :" + +#: ../plugins/paint/text/fontsel.glade.h:10 +msgid "_Style:" +msgstr "_Style :" + +#: ../plugins/paint/text/fontsel.glade.h:11 +msgid "_Underline:" +msgstr "So_uligné" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "Ajoute ou modifie un texte" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "Ajoute ou modifie un groupe d'atomes" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "Exporter au format Wikipedia" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "Exporter en vue d'une publication dans Wikipedia" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "Générer une image PNG conforme aux exigences de Wikipedia" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "Impossible de sauvegarder l'image : " -#: ../programs/3d/window.cc:164 ../programs/crystal/window.cc:256 -msgid "Save As _Image..." -msgstr "Enregistrer en tant qu'_Image..." +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +msgid "GChem3D Viewer" +msgstr "Visionneuse de molécules GChem3D" -#: ../programs/3d/window.cc:165 ../programs/crystal/window.cc:257 -msgid "Save the current file as an image" -msgstr "Enregistrer le fichier actif en tant qu'image" +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "Désolé, format non supporté !" -#: ../programs/3d/window.cc:166 ../programs/crystal/window.cc:258 -msgid "_Print..." -msgstr "Im_primer..." +#: ../programs/3d/main.cc:44 +msgid "GChem3d Viewer version: " +msgstr "Version de la visionneuse GChem3D :" -#: ../programs/3d/window.cc:167 -msgid "Print the current scene" -msgstr "Imprimer la scène courante" +#: ../programs/3d/main.cc:55 +msgid "Prints GChem3d Viewer version" +msgstr "Imprime la version de la visionneuse GChem3D" -#: ../programs/3d/window.cc:168 ../programs/crystal/window.cc:260 -msgid "_Close" -msgstr "_Fermer" +#: ../programs/3d/main.cc:56 +msgid "Background color: white, black or #rrggbb (default is black)" +msgstr "Couleur de fond : white, black ou #rrvvbb (black par défaut)" -#: ../programs/3d/window.cc:169 ../programs/crystal/window.cc:261 -msgid "Close the current file" -msgstr "Fermer le fichier actif" +#: ../programs/3d/main.cc:57 +msgid "" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" +msgstr "" +"Comment les molécules sont dessinées ; les valeurs possibles sont BallnStick " +"(la valeur par défaut), SpaceFill, Cylinders et Wireframe" -#: ../programs/3d/window.cc:170 ../programs/calc/gchemcalc.cc:407 -#: ../programs/crystal/window.cc:262 ../programs/table/gchemtable-app.cc:142 -msgid "_Quit" -msgstr "_Quitter" +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 +msgid " [file]" +msgstr " [fichier]" -#: ../programs/3d/window.cc:171 -msgid "Quit GChem3D" -msgstr "Quiiter GChem3D" +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 +#, c-format +msgid "Invalid or misplaced argument: %s\n" +msgstr "Argument invalide ou mal placé : %s\n" + +#: ../programs/3d/window.cc:129 +msgid "GChem3D is a molecular structures viewer for Gnome" +msgstr "GChem3D est une visionneuse de structures moléculaires pour Gnome" -#: ../programs/3d/window.cc:172 ../programs/crystal/window.cc:278 -#: ../programs/table/gchemtable-app.cc:144 -msgid "_View" -msgstr "_Vue" +#. const gchar * documentors[] = {NULL}; +#: ../programs/3d/window.cc:131 +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "Copyright © 2004-2008 par Jean Bréfort\n" -#: ../programs/3d/window.cc:173 ../programs/calc/gchemcalc.cc:409 -#: ../programs/crystal/window.cc:286 ../programs/table/gchemtable-app.cc:159 -msgid "_Help" -msgstr "_Aide" +#: ../programs/3d/window.cc:181 +msgid "Print the current scene" +msgstr "Imprimer la scène courante" -#: ../programs/3d/window.cc:174 ../programs/calc/gchemcalc.cc:410 -#: ../programs/crystal/window.cc:287 ../programs/table/gchemtable-app.cc:160 -msgid "_Contents" -msgstr "_Contenu" +#: ../programs/3d/window.cc:185 +msgid "Quit GChem3D" +msgstr "Quiiter GChem3D" -#: ../programs/3d/window.cc:175 +#: ../programs/3d/window.cc:189 msgid "View help for the Molecules Viewer" msgstr "Voir l'aide pour la Visionneuse de Molécules" -#: ../programs/3d/window.cc:176 ../programs/calc/gchemcalc.cc:412 -#: ../programs/crystal/window.cc:289 ../programs/table/gchemtable-app.cc:162 +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:328 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:166 +#: ../programs/table/gchemtable-curve.cc:233 msgid "Gnome Chemistry Utils on the _web" msgstr "Gnome Chemistry Utils sur la _Toile" -#: ../programs/3d/window.cc:177 ../programs/calc/gchemcalc.cc:413 -#: ../programs/crystal/window.cc:290 ../programs/table/gchemtable-app.cc:163 +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:329 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/table/gchemtable-curve.cc:234 msgid "Browse the Gnome Chemistry Utils's web site" msgstr "Parcourir le site internet des Gnome Chemistry Utils" -#: ../programs/3d/window.cc:178 ../programs/calc/gchemcalc.cc:414 -#: ../programs/crystal/window.cc:291 ../programs/table/gchemtable-app.cc:164 -msgid "_Ask a question" -msgstr "_Poser une question" - -#: ../programs/3d/window.cc:179 ../programs/calc/gchemcalc.cc:415 -#: ../programs/crystal/window.cc:292 ../programs/table/gchemtable-app.cc:165 +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:333 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 msgid "Ask a question about the Gnome Chemistry Utils" msgstr "Poser une question sur les Gnome Chemistry Utils" -#: ../programs/3d/window.cc:180 ../programs/calc/gchemcalc.cc:416 -#: ../programs/crystal/window.cc:293 ../programs/table/gchemtable-app.cc:166 -msgid "Report _Bugs" -msgstr "_Rapporter une Anomalie" - -#: ../programs/3d/window.cc:181 ../programs/calc/gchemcalc.cc:417 -#: ../programs/crystal/window.cc:294 ../programs/table/gchemtable-app.cc:167 +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:335 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:240 msgid "Submit a bug report for the Gnome Chemistry Utils" msgstr "Rapporter une anomalie concernant les Gnome Chemistry Utils" -#: ../programs/3d/window.cc:182 ../programs/calc/gchemcalc.cc:418 -#: ../programs/crystal/window.cc:295 ../programs/table/gchemtable-app.cc:168 -msgid "_About" -msgstr "À _propos..." - -#: ../programs/3d/window.cc:183 +#: ../programs/3d/window.cc:199 msgid "About GChem3D" msgstr "À propos de GChem3D" -#: ../programs/3d/window.cc:187 +#: ../programs/3d/window.cc:203 msgid "Balls and sticks" msgstr "Éclaté" -#: ../programs/3d/window.cc:188 +#: ../programs/3d/window.cc:204 msgid "Display a balls and sticks model" msgstr "Affiche un modèle éclaté" -#: ../programs/3d/window.cc:190 +#: ../programs/3d/window.cc:206 msgid "Space filling" msgstr "Compact" -#: ../programs/3d/window.cc:191 +#: ../programs/3d/window.cc:207 msgid "Display a space filling model" msgstr "Affiche un modèle compact" -#: ../programs/3d/window.cc:268 +#: ../programs/3d/window.cc:209 +msgid "Cylinders" +msgstr "Cylindres" + +#: ../programs/3d/window.cc:210 +msgid "Display a cylinders model" +msgstr "Affiche un modèle en cylindres" + +#: ../programs/3d/window.cc:212 +msgid "Wireframe" +msgstr "Fil de fer" + +#: ../programs/3d/window.cc:213 +msgid "Display a wireframe model" +msgstr "Affiche un modèle en fil de fer" + +#: ../programs/3d/window.cc:271 msgid "Background color" msgstr "Couleur de fond" -#: ../programs/3d/window.cc:269 +#: ../programs/3d/window.cc:272 msgid "Choose a new background color" msgstr "Choisir un nouvelle couleur de fond" -#: ../programs/3d/window.cc:299 ../programs/crystal/window.cc:425 +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:439 +#: ../programs/spectra/window.cc:257 msgid "Open recent" msgstr "Récemment ouverts" -#: ../programs/3d/window.cc:359 ../programs/crystal/application.cc:126 -msgid "Preview" -msgstr "Prévisualisation" - -#: ../programs/3d/gchem3d-viewer.desktop.in.h:1 +#: ../programs/3d/gchem3d.desktop.in.h:1 msgid "Display chemical 3D structures" msgstr "Affiche des structures moléculaires en trois dimensions" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:2 -msgid "Molecules Viewer" +#: ../programs/3d/gchem3d.desktop.in.h:2 +msgid "Molecules Viewer " msgstr "Visionneuse de molécules" -#: ../programs/calc/gchemcalc.cc:126 +#: ../programs/calc/gchemcalc.cc:301 msgid "GChemCalc is a simple calculator for chemists" msgstr "GChemCalc est une calculatrice simple pour chimiste" #. const gchar * documentors[] = {NULL}; -#: ../programs/calc/gchemcalc.cc:128 -msgid "Copyright © 2005-2007 Jean Bréfort\n" -msgstr "Copyright © 2005-2007 par Jean Bréfort\n" +#: ../programs/calc/gchemcalc.cc:303 ../programs/table/gchemtable-app.cc:345 +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "Copyright © 2005-2008 par Jean Bréfort" -#: ../programs/calc/gchemcalc.cc:408 +#: ../programs/calc/gchemcalc.cc:619 msgid "Quit GChemCalc" msgstr "Quitter GChemCalc" -#: ../programs/calc/gchemcalc.cc:411 +#: ../programs/calc/gchemcalc.cc:623 +msgid "_Mode" +msgstr "_Mode" + +#: ../programs/calc/gchemcalc.cc:626 msgid "View help for the Chemical Calculator" -msgstr "Voir l'aide pour la Calculatrice Chimique" +msgstr "Voir l'aide pour la Calculatrice chimique" -#: ../programs/calc/gchemcalc.cc:419 +#: ../programs/calc/gchemcalc.cc:636 msgid "About GChemCalc" msgstr "À propos de GChemCalc" -#: ../programs/calc/gchemcalc.cc:465 +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "_Devine" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "Essaie de deviner la signification des symboles ambigus" + +#: ../programs/calc/gchemcalc.cc:643 +msgid "_Atom" +msgstr "_Atome" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "Interprète les symboles ambigus comme des atomes" + +#: ../programs/calc/gchemcalc.cc:646 +msgid "_Nickname" +msgstr "_Groupe" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "Interprète les symboles ambigus comme des groupes d'atomes" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "De_mander" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "Demander à l'utilisateur la signification des symboles ambigus" + +#: ../programs/calc/gchemcalc.cc:688 msgid "GChemCalc Calculator version: " -msgstr "Version de la Calculatrice GChemCalc :" +msgstr "Version de la Calculatrice Chimique :" -#: ../programs/calc/gchemcalc.cc:486 +#: ../programs/calc/gchemcalc.cc:714 msgid " [formula]" msgstr "[formule]" -#: ../programs/calc/gchemcalc.cc:502 +#: ../programs/calc/gchemcalc.cc:730 msgid "For usage see: gchemcalc [-?|--help]" msgstr "Pour l'utilisation, voir : gchemcalc [-?|--help]" -#: ../programs/calc/gchemcalc.cc:556 +#: ../programs/calc/gchemcalc.cc:776 msgid "Element" msgstr "Élément" -#: ../programs/calc/gchemcalc.cc:563 +#: ../programs/calc/gchemcalc.cc:783 msgid "Mass %" msgstr "% Masse" @@ -1346,6 +3749,10 @@ msgid "A simple calculator for chemistry" msgstr "Une calculatrice simple pour chimiste" +#: ../programs/calc/gchemcalc.desktop.in.h:2 +msgid "Chemical calculator " +msgstr "Calculatrice chimique" + #: ../programs/crystal/gcrystal.desktop.in.h:1 msgid "Edit and display crystalline structures" msgstr "Édite et représente des structures cristallines" @@ -1356,15 +3763,15 @@ #: ../programs/crystal/gcrystal.schemas.in.h:1 msgid "Background color blue value" -msgstr "Composante bleue de la couleur d'arrière-plan" +msgstr "Composante bleue de la couleur de l'arrière-plan" #: ../programs/crystal/gcrystal.schemas.in.h:2 msgid "Background color green value" -msgstr "Composante verte de la couleur d'arrière-plan" +msgstr "Composante verte de la couleur de l'arrière-plan" #: ../programs/crystal/gcrystal.schemas.in.h:3 msgid "Background color red value" -msgstr "Composante rouge de la couleur d'arrière-plan" +msgstr "Composante rouge de la couleur de l'arrière-plan" #: ../programs/crystal/gcrystal.schemas.in.h:4 msgid "" @@ -1441,12 +3848,12 @@ "Valeur par défaut de la composante rouge de la couleur d'arrière-plan. Les " "valeurs acceptables sont comprises entre 0 et 1." -#: ../programs/crystal/application.cc:55 +#: ../programs/crystal/application.cc:58 #, c-format msgid "Untitled%d" msgstr "SansTitre%d" -#: ../programs/crystal/application.cc:261 +#: ../programs/crystal/application.cc:318 #, c-format msgid "" "\"%s\" has been modified since last saving. Do you wish to come back to " @@ -1455,29 +3862,20 @@ "``%s'' a été modifié depuis la dernière sauvegarde.\n" " Voulez-vous revenir à la version enregistrée ?" -#: ../programs/crystal/atomsdlg.cc:133 -msgid "Atom" -msgstr "Atome" - -#: ../programs/crystal/atomsdlg.cc:187 ../programs/crystal/atomsdlg.cc:282 -#: ../programs/crystal/atomsdlg.cc:415 -msgid "Unknown" -msgstr "Inconnu" - #. Note for translators: c.n. is for coordination number -#: ../programs/crystal/atomsdlg.cc:555 +#: ../programs/crystal/atomsdlg.cc:624 msgid " c.n.=" msgstr " i.c. =" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "low spin" msgstr "bas spin" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "high spin" msgstr "haut spin" -#: ../programs/crystal/atomsdlg.cc:563 +#: ../programs/crystal/atomsdlg.cc:632 msgid "Database" msgstr "Base de données" @@ -1485,11 +3883,23 @@ msgid "The sum of the three angles must be less than 360°" msgstr "La somme des trois angles doit être inférieure à 360°" +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "h" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "k" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "l" + #: ../programs/crystal/cleavagesdlg.cc:128 msgid "Planes cleaved" msgstr "Plans clivés" -#: ../programs/crystal/document.cc:237 +#: ../programs/crystal/document.cc:313 #, c-format msgid "" "Could not save file\n" @@ -1498,374 +3908,1145 @@ "Erreur lors de la sauvegarde du fichier\n" "%s" -#: ../programs/crystal/document.cc:240 -#, c-format -msgid "" -"Could not load file\n" -"%s" -msgstr "" -"Erreur lors du chargement du fichier\n" -"%s" - -#: ../programs/crystal/document.cc:243 -#, c-format -msgid "" -"%s: invalid xml file.\n" -"Tree is empty?" -msgstr "" -"%s: fichier xml incorrect.\n" -"L'arborescence est vide ?" - -#: ../programs/crystal/document.cc:246 -#, c-format -msgid "%s: invalid file format." -msgstr "%s: format de fichier incorrect." - -#: ../programs/crystal/document.cc:594 -#, c-format -msgid "\"%s\" has been modified. Do you wish to save it?" -msgstr "``%s'' a été modifié? Voulez-vous le sauvegarder ?" +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" +msgstr "x1" + +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" +msgstr "y1" + +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" +msgstr "z1" + +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "x2" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "y2" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" +msgstr "z2" -#: ../programs/crystal/linesdlg.cc:178 +#: ../programs/crystal/linesdlg.cc:180 msgid "Single" msgstr "Unique" -#: ../programs/crystal/main.cc:76 +#: ../programs/crystal/main.cc:88 msgid "Gnome Chemistry Utils version: " msgstr "Version de Gnome Chemistry Utils :" -#: ../programs/crystal/main.cc:104 +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 msgid " [file...]" msgstr " [fichier...]" -#: ../programs/crystal/window.cc:122 ../programs/crystal/window.cc:383 +#: ../programs/crystal/window.cc:148 ../programs/crystal/window.cc:404 msgid "Gnome Crystal" msgstr "Gnome Cristal" -#: ../programs/crystal/window.cc:125 +#: ../programs/crystal/window.cc:151 msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" msgstr "" "Gnome Cristal est une visionneuse simple de structures cristallines pour " "Gnome" -#: ../programs/crystal/window.cc:126 -msgid "Copyright © 1999-2007 by Jean Bréfort" -msgstr "Copyright © 1999-2007 par Jean Bréfort" - -#: ../programs/crystal/window.cc:248 -msgid "_New File" -msgstr "_Nouveau fichier" - -#: ../programs/crystal/window.cc:249 -msgid "Create a new file" -msgstr "Créer un nouveau fichier" - -#: ../programs/crystal/window.cc:252 -msgid "_Save" -msgstr "_Enregistrer" - -#: ../programs/crystal/window.cc:253 -msgid "Save the current file" -msgstr "Enregistrer le fichier actif" - -#: ../programs/crystal/window.cc:254 -msgid "Save _As..." -msgstr "Enregistrer _sous..." +#: ../programs/crystal/window.cc:152 +msgid "Copyright © 1999-2008 by Jean Bréfort" +msgstr "Copyright © 1999-2008 par Jean Bréfort" -#: ../programs/crystal/window.cc:255 -msgid "Save the current file with a different name" -msgstr "Enregistrer le fichier actif sous un nouveau nom" - -#: ../programs/crystal/window.cc:259 -msgid "Print the current file" -msgstr "Imprimer la scène courante" - -#: ../programs/crystal/window.cc:263 +#: ../programs/crystal/window.cc:302 msgid "Quit Gnome Crystal" msgstr "Quitter Gnome Cristal" -#: ../programs/crystal/window.cc:264 -msgid "_Edit" -msgstr "_Édition" - -#: ../programs/crystal/window.cc:265 +#: ../programs/crystal/window.cc:304 msgid "Prefere_nces..." msgstr "_Préférences" -#: ../programs/crystal/window.cc:266 -msgid "Configure the application" -msgstr "Configurer l'application" - -#: ../programs/crystal/window.cc:267 +#: ../programs/crystal/window.cc:306 msgid "_Crystal" msgstr "_Cristal" -#: ../programs/crystal/window.cc:268 +#: ../programs/crystal/window.cc:307 msgid "_Lattice..." msgstr "_Réseau..." -#: ../programs/crystal/window.cc:269 +#: ../programs/crystal/window.cc:308 msgid "Define the lattice" msgstr "Définir le réseau" -#: ../programs/crystal/window.cc:270 +#: ../programs/crystal/window.cc:309 msgid "_Atoms..." msgstr "_Atomes..." -#: ../programs/crystal/window.cc:271 +#: ../programs/crystal/window.cc:310 msgid "Add or edit atoms" msgstr "Ajouter ou éditer des atomes" -#: ../programs/crystal/window.cc:272 +#: ../programs/crystal/window.cc:311 msgid "_Bonds and lines..." msgstr "_Liaisons et traits..." -#: ../programs/crystal/window.cc:273 +#: ../programs/crystal/window.cc:312 msgid "Add or edit bonds and lines" msgstr "Ajouter des liaisons et des traits" -#: ../programs/crystal/window.cc:274 +#: ../programs/crystal/window.cc:313 msgid "_Size..." msgstr "_Taille..." -#: ../programs/crystal/window.cc:275 +#: ../programs/crystal/window.cc:314 msgid "Define size" msgstr "Définir la taille" -#: ../programs/crystal/window.cc:276 +#: ../programs/crystal/window.cc:315 msgid "_Cleavages..." msgstr "_Clivages..." -#: ../programs/crystal/window.cc:277 +#: ../programs/crystal/window.cc:316 msgid "Add or edit cleavages to remove some planes" msgstr "Ajouter des clivages pour éliminer des plans" -#: ../programs/crystal/window.cc:279 +#: ../programs/crystal/window.cc:318 msgid "View _settings..." msgstr "_Paramètres de la vue..." -#: ../programs/crystal/window.cc:280 +#: ../programs/crystal/window.cc:319 msgid "Choose background color and model position" msgstr "Choisir la couleur de fond et la position du modèle" -#: ../programs/crystal/window.cc:281 -msgid "_Windows" -msgstr "Fe_nêtres" - -#: ../programs/crystal/window.cc:282 +#: ../programs/crystal/window.cc:321 msgid "Create new _window" msgstr "_Nouvelle fenêtre" -#: ../programs/crystal/window.cc:283 +#: ../programs/crystal/window.cc:322 msgid "Create a new window" msgstr "Créer une nouvelle fenêtre" -#: ../programs/crystal/window.cc:284 +#: ../programs/crystal/window.cc:323 msgid "_Close this window" msgstr "_Fermer cette fenêtre" -#: ../programs/crystal/window.cc:285 +#: ../programs/crystal/window.cc:324 msgid "Close the current window" msgstr "Ferme la fenêtre active" -#: ../programs/crystal/window.cc:288 +#: ../programs/crystal/window.cc:327 msgid "View help for Gnome Crystal" msgstr "Consulter l'aide de Gnome Cristal" -#: ../programs/crystal/window.cc:296 +#: ../programs/crystal/window.cc:337 msgid "About Gnome Crystal" msgstr "À propos de Gnome Cristal" -#: ../programs/crystal/window.cc:445 -msgid "Ready" -msgstr "Prêt" +#: ../programs/paint/gchempaint.desktop.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "Édite des structures chimiques 2D" + +#: ../programs/paint/gchempaint.desktop.in.h:2 +msgid "GChemPaint Chemical Structures Editor " +msgstr "Éditeur de structures chimiques GChemPaint" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "Famille de la police utilisée par les formules chimiques." + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "Taille de la police utilisée par les formules chimiques." + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "Étirement de la police utilisée par les formules chimiques." + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "Style de la police utilisée par les formules chimiques." + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "Variante de la police utilisée par les formules chimiques." + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "Graisse de la police utilisée par les formules chimiques." -#: ../programs/table/gchemtable-app.cc:102 -msgid "GChemTable is a chemical periodic table of the elements application" -msgstr "GChemTable est une application de tableau périodique des éléments" +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "" +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." +msgstr "" +"Facteur de compression des fichiers sauvegardés. Les valeurs acceptables " +"vont de 0 (pas de compression) à 9." + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "Angle par défaut entre deux liaisons." + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." +msgstr "" +"Angle par défaut entre deux liaisons consécutives dans une chaîne en degrés. " +"Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:10 +msgid "Default arrow length" +msgstr "Longueur par défaut des flèches." + +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "" +"Longueur par défaut des flèches en picomètres. Valeur utilisée dans le thème " +"par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "" +"Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Largeur par défaut de la queue d'une flêche (à 100% d'agrandissement). " +"Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "Largeur par défaut de la queue d'une flêche." + +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" +msgstr "Longueur par défaut des liaisons" + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "" +"Longueur par défaut des liaisons en picomètres. Valeur utilisée dans le " +"thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "" +"Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Largeur par défaut de la ligne représentant une liaison (à 100% " +"d'agrandissement). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "Largeur par défaut de la ligne représentant une liaison." + +#: ../programs/paint/gchempaint.schemas.in.h:20 +msgid "Default charge sign size." +msgstr "Taille par défaut d'un signe de charge." + +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "Distance par défaut entre deux lignes d'une double flêche." + +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "Distance par défaut entre deux lignes d'une liaison multiple." + +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "" +"Distance par défaut entre deux lignes (à 100% d'agrandissement) d'une double " +"flêche ou d'une flèche de rétrosynthèse. Valeur utilisée dans le thème par " +"défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" +"Distance par défaut entre deux lignes (à 100% d'agrandissement) d'une " +"liaison multiple. Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format +msgid "" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." +msgstr "" +"Distance par défaut entre deux hachures (à 100% d'agrandissement) d'une " +"liaison. Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." +msgstr "" +"Distance par défaut en pixels de la pointe de la flèche au centre (à 100% " +"d'agrandissement). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "Distance par défaut en pixels de la pointe de la flèche au centre." + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Distance par défaut entre la pointe de la flèche et son point de fuite, " +"mesurée parallèlement à la queue, en pixels (à 100% d'agrandissement). " +"Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" +"Distance par défaut entre la pointe de la flèche et son point de fuite, " +"mesurée parallèlement à la queue." + +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Distance par défaut entre le point de fuite de la tête de la flèche et la " +"queue (à 100% d'agrandissement). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "" +"Distance par défaut entre le point de fuite de la tête de la flèche et la " +"queue." + +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "Espace supplémentaire par défaut après un coefficient stœchiométrique." + +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Espace supplémentaire par défaut antre un coefficient stœchiométrique et la " +"molécule associée (à 100% d'agrandissement). Valeur utilisée dans le thème " +"par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "" +"Famille par défaut de la police utilisée pour le texte. Valeur utilisée dans " +"le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." +msgstr "" +"Étirement de la police utilisée par le texte (0 = ultra-condensé ; 1 = extra-" +"condensé ; 2 = condensé ; 3 = semi-condensé ; 4 = normal ; 5 = semi-étiré ; " +"6 = étiré ; 7 = extra-étiré ; 8 = ultra-étiré). Valeur utilisée dans le " +"thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" +"Style par défaut de la police utilisée pour le texte (0 = normal ; 1 = " +"oblique ; 2 =italique). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." +msgstr "" +"Variante par défaut de la police utilisée pour le texte (0 = normal ; 1 = " +"petites capitales). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." +msgstr "" +"Graisse par défaut de la police utilisée pour le texte (2 = ultra-fine ; 3 = " +"fine ; 4 =normale 6 = semi-grasse ; 7 = grasse ; 8 = ultra-grasse ; 9 = " +"lourde). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:46 +msgid "Default hash line width." +msgstr "Largeur par défaut des hachures." + +#: ../programs/paint/gchempaint.schemas.in.h:47 +msgid "Default hash lines distance." +msgstr "Distance par défaut entre deux hachures." + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Largeur par défaut des liaisons stéréochimiques à l'extrémité la plus large " +"(à 100% d'agrandissement). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "Largeur par défaut des liaisons stéréochimiques." + +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Largeur par défaut des hachures (à 100% d'agrandissement). Valeur utilisée " +"dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:53 +msgid "Default padding around arrows." +msgstr "Espace par défaut autour des flèches." + +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Espace par défaut avant et après un signe '+' dans une réaction chimique (à " +"100% d'agrandissement). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "Espace par défaut avant et après un signe '+' dans une réaction." + +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "Espace par défaut entre des objets alignés." + +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." +msgstr "" +"Espace par défaut entre les flèches et les objets associés (à 100% " +"d'agrandissement). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "Espace par défaut autour des textes." + +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." +msgstr "" +"Espace par défaut en pixels ajouté entre deux objets consécutifs lors d'une " +"opération d'alignement (à 100% d'agrandissement). Valeur utilisée dans le " +"thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Taille par défaut en pixels d'un signe de charge (à 100% d'agrandissement). " +"Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "Famille par défaut de la police utilisée pour le texte." + +#: ../programs/paint/gchempaint.schemas.in.h:66 +msgid "Default text font size." +msgstr "Taille par défaut de la police utilisée pour le texte." + +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "Étirement par défaut de la police utilisée pour le texte." + +#: ../programs/paint/gchempaint.schemas.in.h:68 +msgid "Default text font style." +msgstr "Style par défaut de la police utilisée pour le texte." + +#: ../programs/paint/gchempaint.schemas.in.h:69 +msgid "Default text font variant." +msgstr "Variante par défaut de la police utilisée pour le texte." + +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "Graisse par défaut de la police utilisée pour le texte." + +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "Thème par défaut utilisé lors de la cration d'un nouveau fichier." + +#: ../programs/paint/gchempaint.schemas.in.h:72 +msgid "Default theme." +msgstr "Thème par défaut" + +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." +msgstr "Facteur de compression des fichiers." + +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." +msgstr "" +"Famille par défaut de la police utilisée pour les formules chimiques Valeur " +"utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." +msgstr "" +"Taille par défaut de la police utilisée pour les formules chimiques. Valeur " +"utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "" +"Taille par défaut de la police utilisée pour le texte. Valeur utilisée dans " +"le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." +msgstr "" +"Étirement de la police utilisée par les formules chimiques (0 = ultra-" +"condensé ; 1 = extra-condensé ; 2 = condensé ; 3 = semi-condensé ; 4 = " +"normal ; 5 = semi-étiré ; 6 = étiré ; 7 = extra-étiré ; 8 = ultra-étiré). " +"Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "" +"Style par défaut de la police utilisée pour les formules chimiques (0 = " +"normal ; 1 = oblique ; 2 =italique). Valeur utilisée dans le thème par " +"défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." +msgstr "" +"Variante par défaut de la police utilisée pour les formules chimiques (0 = " +"normal ; 1 = petites capitales). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." +msgstr "" +"Graisse par défaut de la police utilisée pour les formules chimiques (2 = " +"ultra-fine ; 3 = fine ; 4 =normale 6 = semi-grasse ; 7 = grasse ; 8 = ultra-" +"grasse ; 9 = lourde). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "" +"Si la valeur est ``TRUE'', STRING_UTF8 and STRING sont ajoutés dans les " +"formats du presse-papier." + +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." +msgstr "Si VRAI, le tableau périodique peut être détaché de la boite à outils." + +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Espace en pixels ajouté autour des objets de texte comme les symboles " +"chimiques, les textes et autres signes typographiques (à 100% " +"d'agrandissement). Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "Échelle (pm par pixel)." + +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." +msgstr "" +"Échelle utilisée pour convertir les distances réelles en distances dans le " +"dessin, exprimée en pm par pixel.Valeur utilisée dans le thème par défaut." + +#: ../programs/paint/gchempaint.schemas.in.h:88 +msgid "Whether the periodic table is tearable." +msgstr "Rendre la classification périodique des éléments détachable" + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "Exporter du texte simple ou non lors d'une copie." + +#: ../programs/paint/main.cc:46 +msgid "GChemPaint version: " +msgstr "Version de GChemPaint : " + +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" +msgstr "GSpectrum" + +#: ../programs/spectra/gspectrum.desktop.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "Une visionneuse de spectre pour le bureau de GNOME" + +#: ../programs/spectra/gspectrum.desktop.in.h:2 +msgid "Spectrum viewer " +msgstr "Visionneuse de spectres" + +#: ../programs/spectra/window.cc:124 +msgid "GSpectrum is a spectrum viewer for Gnome" +msgstr "GSpoectrum est une visionneuse de spectres pour Gnome" #. const gchar * documentors[] = {NULL}; -#: ../programs/table/gchemtable-app.cc:104 -msgid "Copyright © 2005-2007 Jean Bréfort" -msgstr "Copyright © 2005-2007 par Jean Bréfort" +#: ../programs/spectra/window.cc:126 +msgid "Copyright © 2007-2008 Jean Bréfort\n" +msgstr "Copyright © 2007-2008 par Jean Bréfort\n" + +#: ../programs/spectra/window.cc:180 +msgid "Quit GSpectrum" +msgstr "Quiiter GSpectrum" + +#: ../programs/spectra/window.cc:186 +msgid "View help for the Spectra Viewer" +msgstr "Voir l'aide pour la Visionneuse de Spectres" + +#: ../programs/spectra/window.cc:196 +msgid "About GSpectrum" +msgstr "À propos de GSpectrum" + +#: ../programs/table/gchemtable-app.cc:135 +msgid "New _Chart" +msgstr "Nouveau _Graphique" + +#: ../programs/table/gchemtable-app.cc:136 +msgid "Create a new chart" +msgstr "Créer un nouveau graphique" -#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-app.cc:138 +#: ../programs/table/gchemtable-curve.cc:224 msgid "Quit GChemTable" msgstr "Quitter GChemTable" -#: ../programs/table/gchemtable-app.cc:145 +#: ../programs/table/gchemtable-app.cc:140 msgid "Color scheme" msgstr "Mode de choix des couleurs" -#: ../programs/table/gchemtable-app.cc:146 +#: ../programs/table/gchemtable-app.cc:141 msgid "No colors" msgstr "Aucune couleur" -#: ../programs/table/gchemtable-app.cc:147 +#: ../programs/table/gchemtable-app.cc:142 msgid "Use default Gtk theme colors" msgstr "Utilise les couleurs du thème par défaut de Gtk" -#: ../programs/table/gchemtable-app.cc:148 -msgid "Default" -msgstr "Défaut" - -#: ../programs/table/gchemtable-app.cc:149 +#: ../programs/table/gchemtable-app.cc:144 msgid "Use default symbolic element colors" msgstr "Utilise les couleurs symboliques des éléments" -#: ../programs/table/gchemtable-app.cc:150 +#: ../programs/table/gchemtable-app.cc:145 msgid "Physical states" msgstr "États physiques" -#: ../programs/table/gchemtable-app.cc:151 +#: ../programs/table/gchemtable-app.cc:146 msgid "Use colors to display physical state at a given temperature" msgstr "" "Utilise des couleurs pour indiquer l'état physique à une température donnée" -#: ../programs/table/gchemtable-app.cc:153 -msgid "Family" -msgstr "Famille" - -#: ../programs/table/gchemtable-app.cc:154 +#: ../programs/table/gchemtable-app.cc:149 msgid "Use colors to display the family grouping of the elements" msgstr "" "Utilise des couleurs pour indiquer la famille à laquelle appartient l'élément" -#: ../programs/table/gchemtable-app.cc:156 +#: ../programs/table/gchemtable-app.cc:151 msgid "Acidity" msgstr "Acidité" -#: ../programs/table/gchemtable-app.cc:157 +#: ../programs/table/gchemtable-app.cc:152 msgid "Use colors to display the acidity of the elements" msgstr "" "Utilise des couleurs pour indiquer le comportement acido-basique des éléments" +#: ../programs/table/gchemtable-app.cc:154 +msgid "Electronegativity" +msgstr "Électronégativité" + +#: ../programs/table/gchemtable-app.cc:155 +msgid "Use colors to display the electronegativity of the elements" +msgstr "Utilise des couleurs pour indiquer l'électronégativité des éléments" + +#: ../programs/table/gchemtable-app.cc:157 +msgid "Atomic radius" +msgstr "Rayon atomique" + +#: ../programs/table/gchemtable-app.cc:158 +msgid "Use colors to display the covalent radii of the elements" +msgstr "Utilise des couleurs pour indiquer le rayon covalent des éléments" + +#: ../programs/table/gchemtable-app.cc:160 +msgid "Block" +msgstr "Bloc" + #: ../programs/table/gchemtable-app.cc:161 +msgid "Use colors to display the blocks elements belong to" +msgstr "" +"Utilise des couleurs pour indiquer le bloc auquel chaque élément appartient" + +#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/table/gchemtable-curve.cc:230 msgid "View help for the Periodic Table" msgstr "Consulter l'aide du Tableau Périodique" -#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:242 msgid "About GChemTable" msgstr "À propos de GChemTable" +#: ../programs/table/gchemtable-app.cc:343 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "GChemTable est une application de tableau périodique des éléments" + #. The markup at the end of the chain is there to ensure that #. things will be correcly aligned, add the same to the translated string -#: ../programs/table/gchemtable-elt.cc:64 +#: ../programs/table/gchemtable-elt.cc:61 msgid "Electronic configuration: " msgstr "Configuration électronique : " -#: ../programs/table/gchemtable-elt.cc:76 +#: ../programs/table/gchemtable-elt.cc:73 msgid "Lang" msgstr "Langue" -#: ../programs/table/gchemtable-elt.cc:83 +#: ../programs/table/gchemtable-elt.cc:80 msgid "Name" msgstr "Nom" -#: ../programs/table/gchemtable-elt.cc:109 -#: ../programs/table/gchemtable-elt.cc:152 -#: ../programs/table/gchemtable-elt.cc:188 -#: ../programs/table/gchemtable-elt.cc:211 -#: ../programs/table/gchemtable-elt.cc:225 -#: ../programs/table/gchemtable-elt.cc:239 -#: ../programs/table/gchemtable-elt.cc:261 +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 msgid "n.a." msgstr "n.d." -#: ../programs/table/gchemtable-elt.cc:121 -#: ../programs/table/gchemtable-elt.cc:162 +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 #, c-format msgid "%d:" msgstr "%d :" -#: ../programs/table/gchemtable-elt.cc:273 +#: ../programs/table/gchemtable-elt.cc:271 msgid "Ion" msgstr "Ion" #. C.N. stands for coordination number -#: ../programs/table/gchemtable-elt.cc:280 +#: ../programs/table/gchemtable-elt.cc:278 msgid "C.N." msgstr "I.C." -#: ../programs/table/gchemtable-elt.cc:285 +#: ../programs/table/gchemtable-elt.cc:283 msgid "Spin" msgstr "Spin" -#: ../programs/table/gchemtable-elt.cc:292 +#: ../programs/table/gchemtable-elt.cc:290 msgid "Value" msgstr "Valeur" -#: ../programs/table/gchemtable-elt.cc:311 +#: ../programs/table/gchemtable-elt.cc:310 msgid "Low" msgstr "Bas" -#: ../programs/table/gchemtable-elt.cc:314 +#: ../programs/table/gchemtable-elt.cc:313 msgid "High" msgstr "Haut" -#: ../programs/table/gchemtable-curve.cc:183 -#: ../programs/table/gchemtable-curve.cc:187 +#: ../programs/table/gchemtable-curve.cc:220 +msgid "Modify the graph properties" +msgstr "Édite le graphe" + +#: ../programs/table/gchemtable-curve.cc:232 +msgid "View help for the Curve Window" +msgstr "Voir l'aide pour la fenêtre graphique" + +#: ../programs/table/gchemtable-curve.cc:324 +#: ../programs/table/gchemtable-curve.cc:328 +#: ../programs/table/gchemtable-data.cc:524 msgid "Pauling electronegativity" msgstr "Électronégaivité de Pauling" -#: ../programs/table/gchemtable-curve.cc:199 +#: ../programs/table/gchemtable-curve.cc:340 msgid "Electron affinity (kJ/mol)" msgstr "Affinité électronique (kJ/mol)" -#: ../programs/table/gchemtable-curve.cc:203 +#: ../programs/table/gchemtable-curve.cc:344 msgid "Electron affinity" msgstr "Affinité électronique" -#: ../programs/table/gchemtable-curve.cc:217 +#: ../programs/table/gchemtable-curve.cc:358 msgid "1st. " msgstr "1ère " -#: ../programs/table/gchemtable-curve.cc:220 +#: ../programs/table/gchemtable-curve.cc:361 msgid "2nd. " msgstr "2ème " -#: ../programs/table/gchemtable-curve.cc:223 +#: ../programs/table/gchemtable-curve.cc:364 msgid "3rd. " -msgstr "3ème<" +msgstr "3ème " -#: ../programs/table/gchemtable-curve.cc:226 +#: ../programs/table/gchemtable-curve.cc:367 #, c-format msgid "%dth. " -msgstr "%ème " +msgstr "%dème " -#: ../programs/table/gchemtable-curve.cc:229 +#: ../programs/table/gchemtable-curve.cc:370 msgid "ionization energy (MJ/mol)" msgstr "Énergie d'ionisation (MJ/mol)" -#: ../programs/table/gchemtable-curve.cc:236 +#: ../programs/table/gchemtable-curve.cc:377 msgid "ionization energy" msgstr "Énergie d'ionisation" -#: ../programs/table/gchemtable-curve.cc:255 -#: ../programs/table/gchemtable-curve.cc:259 +#: ../programs/table/gchemtable-curve.cc:396 +#: ../programs/table/gchemtable-curve.cc:400 msgid "Covalent radii" msgstr "Rayons covalents" -#: ../programs/table/gchemtable-curve.cc:275 -#: ../programs/table/gchemtable-curve.cc:279 +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 msgid "Van der Waals radii" msgstr "Rayons de van der Waals" -#: ../programs/table/gchemtable-curve.cc:295 -#: ../programs/table/gchemtable-curve.cc:299 +#: ../programs/table/gchemtable-curve.cc:436 +#: ../programs/table/gchemtable-curve.cc:440 msgid "Metallic radii" msgstr "Rayons métalliques" -#: ../programs/table/gchemtable-curve.cc:310 -#: ../programs/table/gchemtable-curve.cc:314 +#: ../programs/table/gchemtable-curve.cc:451 +#: ../programs/table/gchemtable-curve.cc:455 msgid "Melting point" msgstr "Température de fusion" -#: ../programs/table/gchemtable-curve.cc:325 -#: ../programs/table/gchemtable-curve.cc:329 +#: ../programs/table/gchemtable-curve.cc:466 +#: ../programs/table/gchemtable-curve.cc:470 msgid "Boiling point" msgstr "Température d'ébullition" +#: ../programs/table/gchemtable-curve.cc:485 +#: ../programs/table/gchemtable-data.cc:522 +msgid "Atomic number" +msgstr "Numéro atomique" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +msgid "Invalid data" +msgstr "Donnée invalide" + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "Non supporté" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +msgid "None" +msgstr "Aucun" + +#: ../programs/table/gchemtable-data.cc:523 +msgid "Atomic mass" +msgstr "Masse atomique" + +#: ../programs/table/gchemtable-data.cc:525 +msgid "First ionization energy" +msgstr "Première énergie d'ionisation" + +#: ../programs/table/gchemtable-data.cc:526 +msgid "Second ionization energy" +msgstr "Seconde énergie d'ionisation" + +#: ../programs/table/gchemtable-data.cc:527 +msgid "Third ionization energy" +msgstr "Troisième énergie d'ionisation" + +#: ../programs/table/gchemtable-data.cc:528 +msgid "Electronic affinity" +msgstr "Affinité électronique" + +#: ../programs/table/gchemtable-data.cc:529 +msgid "Covalent radius" +msgstr "Rayon covalent" + +#: ../programs/table/gchemtable-data.cc:530 +msgid "Van der Waals radius" +msgstr "Rayon de van der Waals" + +#: ../programs/table/gchemtable-data.cc:531 +msgid "Metallic radius" +msgstr "Rayon métallique" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Fusion temperature" +msgstr "Température de fusion" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Ebullition temperature" +msgstr "Température d'ébullition" + #: ../programs/table/gchemtable.desktop.in.h:1 msgid "A Mendeleiev table of the chemical elements" msgstr "Tableau de Mendeleiev des éléments chimiques" + +#: ../programs/table/gchemtable.desktop.in.h:2 +msgid "Periodic table of the elements " +msgstr "Tableau périodique des éléments" + +#: ../templates/paint/haworth.xml.in.h:1 +msgid "Saccharides" +msgstr "Saccharides" + +#: ../templates/paint/haworth.xml.in.h:2 +msgid "α-D-deoxyribofuranose" +msgstr "α-D-désoxyribofuranose" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "α-D-fructofuranose" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "α-D-galactopyranose" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "α-D-glucopyranose" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "α-D-ribofuranose" + +#: ../templates/paint/haworth.xml.in.h:7 +msgid "β-D-deoxyribofuranose" +msgstr "β-D-désoxyribofuranose" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "β-D-fructofuranose" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "β-D-galactopyranose" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "β-D-glucopyranose" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "β-D-ribofuranose" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "Adénine" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "Adénosine" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "Alanine" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "Acides aminés" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "Anthracène" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "Arginine" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "Hydrocarbures aromatiques" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "Asparagine" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "Acide aspartique" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "Azulène" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "Benzène" + +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "Cystéine" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "Cytidine" + +#: ../templates/paint/templates.xml.in.h:14 +msgid "Cytosine" +msgstr "Cytosine" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "Désoxyadénosine" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "Désoxycytidine" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "Désoxyguanosine" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "Désoxythymidine" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "Acide glutamique" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "Glutamine" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "Glycine" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "Guanine" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "Guanosine" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "Histidine" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "Isoleucine" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "Leucine" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "Lysine" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "Méthionine" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "Naphtalène" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "Bases nucléiques" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "Nucléosides" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "Phénanthrène" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "Phénylalanine" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "Proline" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "Pyrène" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "Sérine" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "Thréonine" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "Thymine" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "Tryptophane" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "Tyrosine" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "Uracile" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "Uridine" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "Valine" + +#~ msgid "Chemical calculator@" +#~ msgstr "Calculatrice chimique@" + +#~ msgid "Periodic table of the elements@" +#~ msgstr "Tableau périodique des éléments@" diff -Nru gnome-chemistry-utils-0.8.6/po/it.po gnome-chemistry-utils-0.10.9/po/it.po --- gnome-chemistry-utils-0.8.6/po/it.po 2007-05-10 14:07:17.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/it.po 2009-11-14 11:30:40.000000000 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gnome-chemistry-utils-0.7.90it\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-05-09 09:18+0200\n" +"POT-Creation-Date: 2008-08-24 22:25+0200\n" "PO-Revision-Date: 2007-04-08 17:50+0200\n" "Last-Translator: Kostantino \n" "Language-Team: italiano \n" @@ -17,12 +17,183 @@ "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.10.2\n" -#: ../gchemutils.xml.in.h:1 ../programs/crystal/x-gcrystal.desktop.in.h:1 +#: ../gchemutils.schemas.in.h:1 +#, fuzzy +msgid "Default Bottom Margin" +msgstr "Nutazione prestabilita" + +#: ../gchemutils.schemas.in.h:2 +#, fuzzy +msgid "Default Left Margin" +msgstr "Nutazione prestabilita" + +#: ../gchemutils.schemas.in.h:3 +#, fuzzy +msgid "Default Top Margin" +msgstr "Spin prestabilito" + +#: ../gchemutils.schemas.in.h:4 +#, fuzzy +msgid "Default Top Outside Margin" +msgstr "Nutazione prestabilita" + +#: ../gchemutils.schemas.in.h:5 +#, fuzzy +msgid "Footer height" +msgstr "Peso molecolare:" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "" + +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "" + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +#, fuzzy +msgid "2D Chemical structure" +msgstr "Modifica le strutture chimiche 2D" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 #, fuzzy msgid "Crystalline structure model" msgstr "Modifica e mostra le strutture cristalline" -#: ../glade/gchemcalc.glade.h:1 ../programs/calc/gchemcalc.desktop.in.h:2 +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "" + +#: ../database/residues.xml.in.h:5 +#, fuzzy +msgid "Benzyl" +msgstr "Benzene" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "" + +#: ../database/residues.xml.in.h:8 +#, fuzzy +msgid "Halogen" +msgstr "Idrogeno" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "" + +#: ../database/residues.xml.in.h:12 +#, fuzzy +msgid "Metal" +msgstr "Metallico" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "" + +#: ../database/residues.xml.in.h:14 +#, fuzzy +msgid "Phenyl" +msgstr "Fenilalanina" + +#: ../database/residues.xml.in.h:15 +#, fuzzy +msgid "Propyl" +msgstr "Prolina" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "" + +#: ../glade/gchemcalc.glade.h:1 msgid "Chemical calculator" msgstr "Calcolatore chimico" @@ -30,7 +201,7 @@ msgid "Composition" msgstr "Composizione" -#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:166 +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 msgid "Formula:" msgstr "Formula:" @@ -46,7 +217,7 @@ msgid "Monoisotopic mass:" msgstr "Massa monoisotopica:" -#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:169 +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 msgid "Raw formula:" msgstr "Formula grezza:" @@ -72,6 +243,164 @@ msgid "Image resolution:" msgstr "Risoluzione di stampa:" +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "" + +#: ../glade/print-setup.glade.h:4 +#, fuzzy +msgid "O_rientation:" +msgstr "Orientazione: %g" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "" + +#: ../glade/print-setup.glade.h:7 +#, fuzzy +msgid "Bottom margin:" +msgstr "In giù" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "" + +#: ../glade/print-setup.glade.h:11 +#, fuzzy +msgid "Footer:" +msgstr "colore:" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:16 +#, fuzzy +msgid "Page" +msgstr "_Incolla" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "" + +#: ../glade/print-setup.glade.h:18 +#, fuzzy +msgid "Portrait" +msgstr "Stampa" + +#: ../glade/print-setup.glade.h:19 +#, fuzzy +msgid "Reload defaults" +msgstr "Imposta come predefinito" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:23 +#, fuzzy +msgid "Save as defaults" +msgstr "Imposta come predefinito" + +#: ../glade/print-setup.glade.h:24 +#, fuzzy +msgid "Scale" +msgstr "_Salva" + +#: ../glade/print-setup.glade.h:25 +#, fuzzy +msgid "Scale to fit _horizontally on" +msgstr "Ribalta la selezione orizzontalmente" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "" + +#: ../glade/print-setup.glade.h:29 +#, fuzzy +msgid "_Automatic scaling:" +msgstr "Atomo" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:33 +#, fuzzy +msgid "_Horizontally" +msgstr "Ribaltamento orizzontale" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "" + +#: ../glade/print-setup.glade.h:35 +#, fuzzy +msgid "_Vertically" +msgstr "Ribaltamento verticale" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:407 +#: ../libs/gcp/preferences.cc:481 ../libs/gcp/preferences.cc:531 +msgid "Bonds" +msgstr "Legami" + #: ../glade/crystal/cell.glade.h:1 msgid "Cell" msgstr "Cella" @@ -140,6 +469,43 @@ msgid "γ (°):" msgstr "γ (°):" +#: ../glade/crystal/docprop.glade.h:1 ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 +msgid "*" +msgstr "*" + +#: ../glade/crystal/docprop.glade.h:2 +msgid "Author" +msgstr "Autore" + +#: ../glade/crystal/docprop.glade.h:3 +msgid "Comments" +msgstr "Commenti" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "Data di creazione:" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "Proprietà del documento" + +#: ../glade/crystal/docprop.glade.h:6 +msgid "E-mail:" +msgstr "Posta elettronica:" + +#: ../glade/crystal/docprop.glade.h:7 +msgid "Name:" +msgstr "Nome:" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "Data di revisione:" + +#: ../glade/crystal/docprop.glade.h:9 +msgid "Title:" +msgstr "Titolo:" + #: ../glade/crystal/prefs.glade.h:1 msgid "" "300\n" @@ -173,7 +539,7 @@ #: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 #, fuzzy -msgid "Field of view (between 1° and 45°):" +msgid "Field of view (between 1 and 45°):" msgstr "Campo di vista (tra 1° e 45°):" #: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 @@ -201,41 +567,56 @@ msgstr "ψ (°):" #: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:395 +#: ../libs/gcp/preferences.cc:469 ../libs/gcp/preferences.cc:519 msgid "Atoms" msgstr "Atomi" -#: ../glade/crystal/atoms.glade.h:2 +#: ../glade/crystal/atoms.glade.h:3 msgid "Charge: " msgstr "Carica: " -#: ../glade/crystal/atoms.glade.h:3 +#: ../glade/crystal/atoms.glade.h:4 msgid "Custom" msgstr "Personalizzato" -#: ../glade/crystal/atoms.glade.h:4 +#: ../glade/crystal/atoms.glade.h:5 msgid "Custom color:" msgstr "Colore personalizzato:" -#: ../glade/crystal/atoms.glade.h:5 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 #: ../glade/crystal/lines.glade.h:2 msgid "Dele_te all" msgstr "Cance_lla tutto" -#: ../glade/crystal/atoms.glade.h:6 ../gcu/gtkcomboperiodic.c:96 -#: ../programs/table/gchemtable-app.cc:252 -#: ../programs/table/gchemtable.desktop.in.h:2 +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:261 msgid "Periodic table of the elements" msgstr "Tavola periodica degli elementi" -#: ../glade/crystal/atoms.glade.h:7 +#: ../glade/crystal/atoms.glade.h:8 msgid "Radius" msgstr "Raggio" -#: ../glade/crystal/atoms.glade.h:8 +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:13 msgid "Type:" msgstr "Tipo:" -#: ../glade/crystal/atoms.glade.h:9 +#: ../glade/crystal/atoms.glade.h:14 msgid "" "Unknown\n" "Ionic\n" @@ -244,20 +625,21 @@ "Van der Waals" msgstr "" -#: ../glade/crystal/atoms.glade.h:14 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/atoms.glade.h:19 +#, fuzzy +msgid "Value (pm):" +msgstr "valore (pm): " + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 #: ../glade/crystal/lines.glade.h:7 msgid "_Add" msgstr "_Aggiungi" -#: ../glade/crystal/atoms.glade.h:15 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 #: ../glade/crystal/lines.glade.h:8 msgid "_Delete" msgstr "_Cancella" -#: ../glade/crystal/atoms.glade.h:16 -msgid "value (pm):" -msgstr "valore (pm): " - #: ../glade/crystal/cleavages.glade.h:1 msgid "Cleavages" msgstr "Separazioni" @@ -298,10 +680,6 @@ msgid "radius (pm):" msgstr "raggio (pm):" -#: ../glade/crystal/size.glade.h:1 -msgid "*" -msgstr "*" - #: ../glade/crystal/size.glade.h:2 msgid "Crystal size" msgstr "Dimensione del cristallo" @@ -318,89 +696,409 @@ msgid "Minimum" msgstr "Minimo" -#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:143 +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 msgid "x" msgstr "x" -#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:153 +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 msgid "y" msgstr "y" -#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:163 +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 msgid "z" msgstr "z" -#: ../glade/table/eltpage.glade.h:1 -msgid "1:" -msgstr "1:" +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" +msgstr "" -#: ../glade/table/eltpage.glade.h:2 -msgid "Atomic number:" -msgstr "Numero atomico:" +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" +msgstr "" -#: ../glade/table/eltpage.glade.h:3 -msgid "Atomic weight:" -msgstr "Peso atomico:" +#: ../glade/paint/arrow-object.glade.h:3 +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-close" +msgstr "" -#: ../glade/table/eltpage.glade.h:4 -msgid "Boiling point:" +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +#: ../plugins/paint/residues/residues.glade.h:10 +msgid "gtk-help" msgstr "" -#: ../glade/table/eltpage.glade.h:5 -msgid "Covalent:" -msgstr "Covalente:" +#: ../glade/paint/docprop.glade.h:1 +#, fuzzy +msgid "Author:" +msgstr "Autore" -#: ../glade/table/eltpage.glade.h:6 -msgid "Electronic affinities:" -msgstr "Affinità elettroniche:" +#: ../glade/paint/docprop.glade.h:2 +msgid "History" +msgstr "" -#: ../glade/table/eltpage.glade.h:7 -msgid "Electronic properties" -msgstr "Proprietà elettroniche" +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "" -#: ../glade/table/eltpage.glade.h:8 -msgid "Ionic radii (Shannon and Prewitt):" -msgstr "Raggi ionici (Shannon e Prewitt):" +#: ../glade/paint/docprop.glade.h:4 +#, fuzzy +msgid "_Comments:" +msgstr "Commenti" -#: ../glade/table/eltpage.glade.h:9 -msgid "Ionization energies:" -msgstr "Energie di ionizzazione:" +#: ../glade/paint/docprop.glade.h:7 +#, fuzzy +msgid "E-_mail:" +msgstr "Posta elettronica:" -#: ../glade/table/eltpage.glade.h:10 -msgid "Isotopes" -msgstr "Isotopi" +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +#, fuzzy +msgid "Theme:" +msgstr "Timina" -#: ../glade/table/eltpage.glade.h:11 -msgid "Main" -msgstr "Principale" +#: ../glade/paint/docprop.glade.h:10 +#: ../plugins/paint/residues/residues.glade.h:6 +#, fuzzy +msgid "_Name:" +msgstr "_Nome" -#: ../glade/table/eltpage.glade.h:12 -msgid "Melting point:" -msgstr "" +#: ../glade/paint/docprop.glade.h:11 +#, fuzzy +msgid "_Title:" +msgstr "Titolo:" -#: ../glade/table/eltpage.glade.h:13 -msgid "Metallic:" -msgstr "Metallico:" +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1879 +#, fuzzy +msgid "Hydrogen atoms position" +msgstr "Posizione delle linguette del notebook" -#: ../glade/table/eltpage.glade.h:14 -msgid "Pauling electronegativity:" -msgstr "Elettronegatività di Pauling:" +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" +msgstr "" -#: ../glade/table/eltpage.glade.h:15 -msgid "Radii" -msgstr "Raggi" +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" +msgstr "" -#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:133 -msgid "Show curve" -msgstr "Mostra curva" +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "" -#: ../glade/table/eltpage.glade.h:17 -msgid "Thermodynamics" +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" msgstr "" -#: ../glade/table/eltpage.glade.h:18 -msgid "Van der Waals:" -msgstr "Van der Waals:" +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" +msgstr "" + +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" +msgstr "" + +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" +msgstr "" + +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "" + +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:6 +#, fuzzy +msgid "Angl_e:" +msgstr "Singolo" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "" + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:16 +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" + +#: ../glade/paint/preferences.glade.h:17 +#, fuzzy +msgid "Dist_ance:" +msgstr "Distanza:" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "" + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:23 +msgid "" +"Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:25 +#, fuzzy +msgid "GChemPaint Preferences" +msgstr "Preferenze" + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:28 +#, fuzzy +msgid "Ha_ve a tearable table of the elements" +msgstr "Tavola periodica degli elementi" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:30 +#, fuzzy +msgid "N_ame:" +msgstr "Nome:" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "" + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:41 +#, fuzzy +msgid "_Default theme:" +msgstr "Spin prestabilito" + +#: ../glade/paint/preferences.glade.h:42 +#, fuzzy +msgid "_Distance:" +msgstr "Distanza:" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:45 +#, fuzzy +msgid "_Scale:" +msgstr "_Salva" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "" + +#: ../glade/paint/zoom.glade.h:1 +#, fuzzy +msgid "Zoom" +msgstr "In giù" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr "" + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr "" + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr "" + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr "" + +#: ../glade/table/eltpage.glade.h:1 +msgid "1:" +msgstr "1:" + +#: ../glade/table/eltpage.glade.h:2 +msgid "Atomic number:" +msgstr "Numero atomico:" + +#: ../glade/table/eltpage.glade.h:3 +msgid "Atomic weight:" +msgstr "Peso atomico:" + +#: ../glade/table/eltpage.glade.h:4 +msgid "Boiling point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:5 +msgid "Covalent:" +msgstr "Covalente:" + +#: ../glade/table/eltpage.glade.h:6 +msgid "Electronic affinities:" +msgstr "Affinità elettroniche:" + +#: ../glade/table/eltpage.glade.h:7 +msgid "Electronic properties" +msgstr "Proprietà elettroniche" + +#: ../glade/table/eltpage.glade.h:8 +msgid "Ionic radii (Shannon and Prewitt):" +msgstr "Raggi ionici (Shannon e Prewitt):" + +#: ../glade/table/eltpage.glade.h:9 +msgid "Ionization energies:" +msgstr "Energie di ionizzazione:" + +#: ../glade/table/eltpage.glade.h:10 +msgid "Isotopes" +msgstr "Isotopi" + +#: ../glade/table/eltpage.glade.h:11 +msgid "Main" +msgstr "Principale" + +#: ../glade/table/eltpage.glade.h:12 +msgid "Melting point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:13 +msgid "Metallic:" +msgstr "Metallico:" + +#: ../glade/table/eltpage.glade.h:14 +msgid "Pauling electronegativity:" +msgstr "Elettronegatività di Pauling:" + +#: ../glade/table/eltpage.glade.h:15 +msgid "Radii" +msgstr "Raggi" + +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 +msgid "Show curve" +msgstr "Mostra curva" + +#: ../glade/table/eltpage.glade.h:17 +msgid "Thermodynamics" +msgstr "" + +#: ../glade/table/eltpage.glade.h:18 +msgid "Van der Waals:" +msgstr "Van der Waals:" #: ../glade/table/state-thermometer.glade.h:1 msgid " Solid " @@ -418,6 +1116,11 @@ msgid "Temperature (K):" msgstr "" +#: ../glade/table/curve.glade.h:1 +#, fuzzy +msgid "GChemTable Graph" +msgstr "Chiudi GChemTable" + #: ../glade/table/family.glade.h:1 msgid "" "All\n" @@ -436,6 +1139,30 @@ msgid "Selected Family:" msgstr "" +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" + #: ../database/elements.xml.in.h:1 msgid "Actinium" msgstr "Attinio" @@ -912,991 +1639,3441 @@ msgid "tritium" msgstr "trizio" -#: ../gcu/application.cc:181 -#, c-format -msgid "(screen resolution is %u)" -msgstr "" - -#: ../gcu/crystaldoc.cc:403 -msgid "Everything has been cleaved" -msgstr "Ogni cosa è stata separata" +#: ../goffice/plugin.xml.in.h:1 +#, fuzzy +msgid "2D Chemical Structures Viewer/Editor" +msgstr "Editore di strutture chimiche di GChemPaint (instabile)" -#: ../gcu/dialog.cc:125 -msgid "Type a number" -msgstr "Immetti un numero" +#: ../goffice/plugin.xml.in.h:2 +#, fuzzy +msgid "Chemical structures" +msgstr "Modifica le strutture chimiche 2D" -#: ../gcu/dialog.cc:134 -#, c-format -msgid "Type a number greater than or equal %g and lower than to %g" -msgstr "Immetti un numero maggiore o uguale a %g e minore di %g" +#: ../goffice/plugin.xml.in.h:3 +msgid "Chemical structures component engine" +msgstr "" -#: ../gcu/dialog.cc:144 -#, c-format -msgid "Type a number greater than %g and lower than or equal to %g" -msgstr "Immetti un numero maggiore di %g e minore o uguale a %g" +#: ../goffice/plugin.xml.in.h:4 +#, fuzzy +msgid "Component : GChemPaint" +msgstr "Riguardo a GChemPaint" -#: ../gcu/dialog.cc:154 +#: ../goffice/gogcpapp.cc:182 ../programs/paint/standaloneapp.cc:46 #, c-format -msgid "Type a number between %g and %g, the limits are valid." -msgstr "Immetti un numero tra %g e %g, estremi compresi." +msgid "Untitled %d" +msgstr "Senza titolo %d" -#: ../gcu/dialog.cc:164 -#, c-format -msgid "Type a number greater than %g and lower than %g" -msgstr "Immetti un numero maggiore di %g e minore di %g" +#: ../goffice/gogcpwin.cc:88 +#, fuzzy +msgid "Embedded GChemPaint Object" +msgstr "Fabbrica oggetto di GChemPaint" -#: ../gcu/dialog.cc:174 -#, c-format -msgid "Type a number lower than %g" -msgstr "Immetti un numero minore di %g" +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" +msgstr "" -#: ../gcu/dialog.cc:184 -#, c-format -msgid "Type a number greater than %g" -msgstr "Immetti un numero maggiore di %g" +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" +msgstr "" -#: ../gcu/dialog.cc:194 -#, c-format -msgid "Type a number lower than or equal to %g" -msgstr "Immetti un numero minore o uguale a %g" +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" +msgstr "" -#: ../gcu/dialog.cc:204 -#, c-format -msgid "Type a number greater than or equal to %g" -msgstr "Immetti un numero maggiore o uguale a %g" +#: ../libs/canvas/gcp-canvas-pango.c:376 +#, fuzzy +msgid "X position" +msgstr "Composizione" -#: ../gcu/element.cc:99 -msgid "German" -msgstr "Tedesco" +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" +msgstr "" -#: ../gcu/element.cc:100 -msgid "French" -msgstr "Francese" +#: ../libs/canvas/gcp-canvas-pango.c:384 +#, fuzzy +msgid "Y position" +msgstr "Composizione" -#: ../gcu/element.cc:101 -msgid "Italian" -msgstr "Italiano" +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" +msgstr "" -#: ../gcu/element.cc:102 -msgid "Polish" -msgstr "Polacco" +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" +msgstr "" -#: ../gcu/element.cc:103 -msgid "Russian" -msgstr "Russo" - -#: ../gcu/element.cc:106 -msgid "Can't find and read elements.xml" -msgstr "Non riesco a trovare e a leggere il file elements.xml" - -#: ../gcu/element.cc:111 ../gcu/element.cc:118 -msgid "Incorrect file format: elements.xml" -msgstr "Il formato del file non è corretto: elements.xml" - -#: ../gcu/element.cc:151 -msgid "English" -msgstr "Inglese" - -#: ../gcu/element.cc:430 -msgid "Can't find and read radii.xml" -msgstr "Non riesco a trovare e a leggere il file radii.xml" +#: ../libs/canvas/gcp-canvas-pango.c:399 +#, fuzzy +msgid "Height" +msgstr "Altro" -#: ../gcu/element.cc:435 ../gcu/element.cc:446 -msgid "Incorrect file format: radii.xml" -msgstr "Il formato del file non è corretto: radii.xml" +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "" -#: ../gcu/element.cc:530 -msgid "Can't find and read elecprops.xml" -msgstr "Non riesco a trovare e a leggere elecprops.xml" +#: ../libs/canvas/gcp-canvas-pango.c:407 +#, fuzzy +msgid "Anchor" +msgstr "Autore" -#: ../gcu/element.cc:535 ../gcu/element.cc:540 -msgid "Incorrect file format: elecprops.xml" -msgstr "Il formato del file non è corretto: elecprops.xml" +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "" -#: ../gcu/element.cc:688 -msgid "Can't find and read isotopes.xml" -msgstr "Non riesco a trovare e a leggere il file isotopes.xml" +#: ../libs/canvas/gcp-canvas-pango.c:416 +#, fuzzy +msgid "Color" +msgstr "colore:" -#: ../gcu/element.cc:693 ../gcu/element.cc:700 -msgid "Incorrect file format: isotopes.xml" -msgstr "Il formato del file non è corretto: isotopes.xml" +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" +msgstr "" -#: ../gcu/filechooser.cc:40 +#: ../libs/canvas/gcp-canvas-pango.c:424 #, fuzzy -msgid "Save as" -msgstr "_Salva" - -#: ../gcu/filechooser.cc:40 -msgid "Open" -msgstr "Apri" +msgid "Editing" +msgstr "Stampa" -#: ../gcu/filechooser.cc:59 -msgid "File _type:" +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" msgstr "" -#: ../gcu/filechooser.cc:61 -#, fuzzy -msgid "Automatic" -msgstr "Atomo" +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:139 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:363 +msgid "translator_credits" +msgstr "Traduzione italiana a cura di: Ceoldo Costantino ciclope10ATaliceDOTit" -#: ../gcu/formula.cc:391 ../gcu/formula.cc:429 -msgid "Unmatched parenthesis" -msgstr "Parentesi non corrispondenti" +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "" +"GChemPaint è un programma per la scrittura di strutture chimiche 2D per Gnome" -#: ../gcu/formula.cc:417 -msgid "Could not interpret the symbol list" -msgstr "Non riesco ad interpretare la lista dei simboli" +#: ../libs/gcp/about.cc:56 +#, fuzzy +msgid "Copyright © 2001-2007 by Jean Bréfort" +msgstr "(C) 2005-2006 by Jean Bréfort" -#: ../gcu/formula.cc:423 -msgid "Parser failed, please fill a bug report." -msgstr "L'analisi è fallita, per favore invia un rapporto d'errore." +#: ../libs/gcp/application.cc:303 +msgid "Create a new reaction" +msgstr "Crea una nuova reazione" + +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" +msgstr "Crea una nuova relazione mesomera" -#: ../gcu/formula.cc:431 -msgid "Invalid character" -msgstr "Carattere non valido" +#: ../libs/gcp/application.cc:504 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" +"Per favore, immetti il nome di \n" +"un file e non quello di una cartella" -#: ../gcu/glview.cc:486 +#: ../libs/gcp/application.cc:546 +#, fuzzy, c-format +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "Spiacente: il formato non è supportato!" + +#: ../libs/gcp/application.cc:575 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 #, c-format -msgid "Unable to save image file: %s\n" +msgid "" +"File %s\n" +"exists, overwrite?" msgstr "" +"Il file %s\n" +"esiste già! Lo sovrascrivo?" -#: ../gcu/gtkchem3dviewer.cc:154 -msgid "Background Color" -msgstr "Colore dello sfondo" +#: ../libs/gcp/application.cc:588 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 +#, c-format +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" -#: ../gcu/gtkchem3dviewer.cc:155 -msgid "Color used to paint the background" -msgstr "Colore usato per colorare lo sfondo" +#: ../libs/gcp/application.cc:796 ../libs/gcp/application.cc:924 +msgid "No filename" +msgstr "Nessun nome di file" -#: ../gcu/gtkperiodic.c:334 +#: ../libs/gcp/application.cc:799 #, c-format msgid "" -"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" -"p\n" +"Could not open file\n" +"%s" msgstr "" +"Non posso aprire il file\n" +"%s" -#: ../programs/3d/application.cc:35 ../programs/3d/application.cc:46 -#, fuzzy -msgid "GChem3D Viewer" -msgstr "Versione del visualizzatore GChem3d:" +#: ../libs/gcp/application.cc:802 ../libs/gcp/application.cc:936 +#, c-format +msgid "%s: parse error." +msgstr "%s: errore d'analisi." -#: ../programs/3d/application.cc:92 -msgid "Sorry, format not supported!" +#: ../libs/gcp/application.cc:927 ../programs/crystal/document.cc:274 +#, c-format +msgid "" +"Could not load file\n" +"%s" msgstr "" +"Non posso caricare il file\n" +"%s" -#: ../programs/3d/application.cc:102 ../programs/crystal/application.cc:214 +#: ../libs/gcp/application.cc:930 ../programs/crystal/document.cc:277 #, c-format msgid "" -"File %s\n" -"exists, overwrite?" +"%s: invalid xml file.\n" +"Tree is empty?" msgstr "" +"%s: il file xml non è valido.\n" +"L'albero è vuoto?" + +#: ../libs/gcp/application.cc:933 ../programs/crystal/document.cc:280 +#, c-format +msgid "%s: invalid file format." +msgstr "%s: il formato del file non è valido." -#: ../programs/3d/application.cc:147 ../programs/crystal/application.cc:145 +#: ../libs/gcp/application.cc:968 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 msgid "Save as image" -msgstr "" +msgstr "Salva come immagine" -#: ../programs/3d/main.cc:40 -msgid "GChem3d Viewer version: " -msgstr "Versione del visualizzatore GChem3d:" +#: ../libs/gcp/atom.cc:1861 ../libs/gcp/atom.cc:1875 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "Atomo" -#: ../programs/3d/main.cc:51 -msgid "Prints GChem3d Viewer version" -msgstr "Stampo la versione del visualizzatore GChem3d" +#: ../libs/gcp/atom.cc:1864 +msgid "Display symbol" +msgstr "" -#: ../programs/3d/main.cc:52 -msgid "Background color: white, black or #rrggbb (default is black)" +#: ../libs/gcp/atom.cc:1864 +msgid "Whether to display carbon atom symbol or not" msgstr "" -"Colore dello sfondo: bianco, nero o #rrggbb (quello predefinito e il nero)" -#: ../programs/3d/main.cc:53 -msgid "" -"How molecules are displayed; possible values are BallnStick (the default) " -"and SpaceFill" +#: ../libs/gcp/bond.cc:980 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "Legame" + +#: ../libs/gcp/bond.cc:984 +msgid "Move to back" msgstr "" -"Come le molecole sono disposte; possibili valori sono Sfere & Legami (quello " -"prestabilito) e Riempimento Spaziale" -#: ../programs/3d/main.cc:75 -msgid " [file]" -msgstr " [file]" +#: ../libs/gcp/bond.cc:991 +msgid "Bring to front" +msgstr "" -#: ../programs/3d/main.cc:97 ../programs/crystal/main.cc:145 -#, c-format -msgid "Invalid or misplaced argument: %s\n" -msgstr "Argomento non valido o malposto: %s\n" +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +msgid "%A, %B %d, %Y" +msgstr "%A, %B %d, %Y" -#: ../programs/3d/window.cc:119 -msgid "GChem3D is a molecular structures viewer for Gnome" -msgstr "GChem3D è un visualizzatore di strutture molecolari per Gnome" +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:148 +msgid "Family" +msgstr "" -#. const gchar * documentors[] = {NULL}; -#: ../programs/3d/window.cc:121 -#, fuzzy -msgid "Copyright © 2004-2007 Jean Bréfort\n" -msgstr "(C) 2004-2006 by Jean Bréfort" +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "" -#. Note to translators: replace the following string with the appropriate credits for you lang -#: ../programs/3d/window.cc:139 ../programs/calc/gchemcalc.cc:146 -#: ../programs/crystal/window.cc:120 ../programs/table/gchemtable-app.cc:122 -msgid "translator_credits" -msgstr "Traduzione italiana a cura di: Ceoldo Costantino ciclope10ATaliceDOTit" +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "" -#: ../programs/3d/window.cc:161 ../programs/calc/gchemcalc.cc:406 -#: ../programs/crystal/window.cc:247 ../programs/table/gchemtable-app.cc:141 -msgid "_File" -msgstr "_File" +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "" -#: ../programs/3d/window.cc:162 ../programs/crystal/window.cc:250 -msgid "_Open..." -msgstr "_Apri..." +#: ../libs/gcp/fontsel.cc:296 +#, fuzzy +msgid "Weight" +msgstr "Altro" -#: ../programs/3d/window.cc:163 ../programs/crystal/window.cc:251 -msgid "Open a file" -msgstr "Apri un file" +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "" -#: ../programs/3d/window.cc:164 ../programs/crystal/window.cc:256 +#: ../libs/gcp/fontsel.cc:301 #, fuzzy -msgid "Save As _Image..." -msgstr "Salva come..." +msgid "Variant" +msgstr "Stampa" + +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" +msgstr "" -#: ../programs/3d/window.cc:165 ../programs/crystal/window.cc:257 +#: ../libs/gcp/fontsel.cc:306 #, fuzzy -msgid "Save the current file as an image" -msgstr "Salva il file corrente" +msgid "Stretch" +msgstr "Francese" -#: ../programs/3d/window.cc:166 ../programs/crystal/window.cc:258 -msgid "_Print..." -msgstr "_Stampa..." +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" +msgstr "" -#: ../programs/3d/window.cc:167 -msgid "Print the current scene" -msgstr "Stampa la scena corrente" +#: ../libs/gcp/fontsel.cc:311 +#, fuzzy +msgid "Size" +msgstr "_Dimensione..." -#: ../programs/3d/window.cc:168 ../programs/crystal/window.cc:260 -msgid "_Close" -msgstr "_Chiudi" +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" +msgstr "" -#: ../programs/3d/window.cc:169 ../programs/crystal/window.cc:261 -msgid "Close the current file" -msgstr "Chiudi il file corrente" +#: ../libs/gcp/fragment.cc:685 ../libs/gcp/fragment.cc:1209 +msgid "Invalid charge." +msgstr "Carica non valida." -#: ../programs/3d/window.cc:170 ../programs/calc/gchemcalc.cc:407 -#: ../programs/crystal/window.cc:262 ../programs/table/gchemtable-app.cc:142 -msgid "_Quit" -msgstr "_Chiudi" +#: ../libs/gcp/fragment.cc:1182 +msgid "Invalid symbol." +msgstr "Simbolo non valido." -#: ../programs/3d/window.cc:171 -msgid "Quit GChem3D" -msgstr "Chiudi GChem3D" +#: ../libs/gcp/mesomer.cc:76 +#, fuzzy +msgid "Only one arrow can link two given mesomers." +msgstr "Solo una sola freccia può collegare due passaggi dati." -#: ../programs/3d/window.cc:172 ../programs/crystal/window.cc:278 -#: ../programs/table/gchemtable-app.cc:144 -msgid "_View" -msgstr "_Vista" +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "Qualcosa è andato storto: per favore, invia una segnalazione d'errore." -#: ../programs/3d/window.cc:173 ../programs/calc/gchemcalc.cc:409 -#: ../programs/crystal/window.cc:286 ../programs/table/gchemtable-app.cc:159 -msgid "_Help" -msgstr "_Aiuto" +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "" -#: ../programs/3d/window.cc:174 ../programs/calc/gchemcalc.cc:410 -#: ../programs/crystal/window.cc:287 ../programs/table/gchemtable-app.cc:160 -msgid "_Contents" -msgstr "_Contenuti" +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "Le frecce isolate non sono permesse!" -#: ../programs/3d/window.cc:175 -msgid "View help for the Molecules Viewer" +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." msgstr "" +"Una molecola isolata!\n" +"Per favore, aggiungi le frecce mancanti." + +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "Per favore, aggiungi le frecce mancanti." -#: ../programs/3d/window.cc:176 ../programs/calc/gchemcalc.cc:412 -#: ../programs/crystal/window.cc:289 ../programs/table/gchemtable-app.cc:162 +#: ../libs/gcp/mesomery.cc:751 #, fuzzy -msgid "Gnome Chemistry Utils on the _web" -msgstr "Versione di Gnome Chemistry Utils:" +msgid "Destroy the mesomery relationship" +msgstr "Crea una nuova relazione mesomera" -#: ../programs/3d/window.cc:177 ../programs/calc/gchemcalc.cc:413 -#: ../programs/crystal/window.cc:290 ../programs/table/gchemtable-app.cc:163 +#: ../libs/gcp/molecule.cc:515 #, fuzzy -msgid "Browse the Gnome Chemistry Utils's web site" -msgstr "Versione di Gnome Chemistry Utils:" +msgid "Molecule" +msgstr "Visualizzatore molecolare (instabile)" -#: ../programs/3d/window.cc:178 ../programs/calc/gchemcalc.cc:414 -#: ../programs/crystal/window.cc:291 ../programs/table/gchemtable-app.cc:164 -msgid "_Ask a question" +#: ../libs/gcp/molecule.cc:520 +msgid "Export molecule to Ghemical" +msgstr "Esporta molecola in Ghemical" + +#: ../libs/gcp/molecule.cc:527 +msgid "Generate InChI" msgstr "" -#: ../programs/3d/window.cc:179 ../programs/calc/gchemcalc.cc:415 -#: ../programs/crystal/window.cc:292 ../programs/table/gchemtable-app.cc:165 -msgid "Ask a question about the Gnome Chemistry Utils" +#: ../libs/gcp/molecule.cc:532 +msgid "NIST WebBook page for this molecule" msgstr "" -#: ../programs/3d/window.cc:180 ../programs/calc/gchemcalc.cc:416 -#: ../programs/crystal/window.cc:293 ../programs/table/gchemtable-app.cc:166 -msgid "Report _Bugs" +#: ../libs/gcp/molecule.cc:537 +msgid "PubChem page for this molecule" msgstr "" -#: ../programs/3d/window.cc:181 ../programs/calc/gchemcalc.cc:417 -#: ../programs/crystal/window.cc:294 ../programs/table/gchemtable-app.cc:167 -msgid "Submit a bug report for the Gnome Chemistry Utils" +#: ../libs/gcp/molecule.cc:543 +msgid "Generate SMILES" msgstr "" -#: ../programs/3d/window.cc:182 ../programs/calc/gchemcalc.cc:418 -#: ../programs/crystal/window.cc:295 ../programs/table/gchemtable-app.cc:168 -msgid "_About" -msgstr "_Informazioni" +#: ../libs/gcp/molecule.cc:549 +#, fuzzy +msgid "Open in Calculator" +msgstr "Calcolatore chimico" -#: ../programs/3d/window.cc:183 -msgid "About GChem3D" -msgstr "Informazioni su GChem3D" +#: ../libs/gcp/molecule.cc:555 +msgid "Select alignment item" +msgstr "Seleziona voce di allineamento" + +#: ../libs/gcp/preferences.cc:349 ../libs/gcp/preferences.cc:368 +#: ../libs/gcp/preferences.cc:497 ../libs/gcp/theme.cc:336 +#: ../libs/gcp/theme.cc:343 ../programs/table/gchemtable-app.cc:143 +#, fuzzy +msgid "Default" +msgstr "Spin prestabilito" -#: ../programs/3d/window.cc:187 -msgid "Balls and sticks" -msgstr "Sfere e legami" +#: ../libs/gcp/preferences.cc:389 ../libs/gcp/preferences.cc:458 +#: ../libs/gcp/preferences.cc:525 +#, fuzzy +msgid "General" +msgstr "Tedesco" -#: ../programs/3d/window.cc:188 -msgid "Display a balls and sticks model" -msgstr "Mostra un modello a sfere e legami" +#: ../libs/gcp/preferences.cc:399 ../libs/gcp/preferences.cc:473 +#: ../libs/gcp/preferences.cc:527 +msgid "Font" +msgstr "Carattere" + +#: ../libs/gcp/preferences.cc:403 ../libs/gcp/preferences.cc:477 +#: ../libs/gcp/preferences.cc:529 +msgid "Other" +msgstr "Altro" -#: ../programs/3d/window.cc:190 -msgid "Space filling" -msgstr "Riempimento spaziale" +#: ../libs/gcp/preferences.cc:411 ../libs/gcp/preferences.cc:485 +#: ../libs/gcp/preferences.cc:533 +msgid "Arrows" +msgstr "Frecce" + +#: ../libs/gcp/preferences.cc:415 ../libs/gcp/preferences.cc:489 +#: ../libs/gcp/preferences.cc:535 ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "Testo" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" +msgstr "Aggiungi un coefficiente stechiometrico" -#: ../programs/3d/window.cc:191 -msgid "Display a space filling model" -msgstr "Mostra un modello a riempimento spaziale" +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" +"Errore: non è possibile costruire una reazione\n" +"a partire dagli oggetti selezionati." -#: ../programs/3d/window.cc:268 -msgid "Background color" -msgstr "Colore dello sfondo" +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "Distruggi la reazione" -#: ../programs/3d/window.cc:269 -msgid "Choose a new background color" -msgstr "Sciegli un nuovo colore dello sfondo" +#: ../libs/gcp/reaction-arrow.cc:380 +#, fuzzy +msgid "Arrow" +msgstr "Frecce" -#: ../programs/3d/window.cc:299 ../programs/crystal/window.cc:425 -msgid "Open recent" +#: ../libs/gcp/reaction-arrow.cc:386 +msgid "Attach selection to arrow..." msgstr "" -#: ../programs/3d/window.cc:359 ../programs/crystal/application.cc:126 -msgid "Preview" -msgstr "Anteprima" +#: ../libs/gcp/reaction-prop.cc:39 +#, fuzzy +msgid "Unkown" +msgstr "Sconosciuto" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:1 -msgid "Display chemical 3D structures" -msgstr "Visualizza le strutture chimiche 3D" +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" +msgstr "" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:2 -#, fuzzy -msgid "Molecules Viewer" -msgstr "Visualizzatore molecolare (instabile)" +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" +msgstr "" -#: ../programs/calc/gchemcalc.cc:126 -msgid "GChemCalc is a simple calculator for chemists" -msgstr "GchemCalc è un semplice calcolatore per chimici" +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "" -#. const gchar * documentors[] = {NULL}; -#: ../programs/calc/gchemcalc.cc:128 +#: ../libs/gcp/reaction-prop.cc:43 #, fuzzy -msgid "Copyright © 2005-2007 Jean Bréfort\n" -msgstr "(C) 2005-2006 by Jean Bréfort" - -#: ../programs/calc/gchemcalc.cc:408 -msgid "Quit GChemCalc" -msgstr "Esci da GChemCalc" +msgid "Solvent" +msgstr "Covalente" -#: ../programs/calc/gchemcalc.cc:411 +#: ../libs/gcp/reaction-prop.cc:44 #, fuzzy -msgid "View help for the Chemical Calculator" -msgstr "Calcolatore chimico" +msgid "Temperature" +msgstr "Modelli" -#: ../programs/calc/gchemcalc.cc:419 -msgid "About GChemCalc" -msgstr "Informazioni su GChemCalc" +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" +msgstr "" -#: ../programs/calc/gchemcalc.cc:465 +#: ../libs/gcp/reaction-prop.cc:46 #, fuzzy -msgid "GChemCalc Calculator version: " -msgstr "Calcolatore chimico" - -#: ../programs/calc/gchemcalc.cc:486 -msgid " [formula]" -msgstr " [formula]" +msgid "Time" +msgstr "Titolo:" -#: ../programs/calc/gchemcalc.cc:502 -msgid "For usage see: gchemcalc [-?|--help]" +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" msgstr "" -#: ../programs/calc/gchemcalc.cc:556 -msgid "Element" -msgstr "Elemento" +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 +msgid "Save as" +msgstr "Salva come" -#: ../programs/calc/gchemcalc.cc:563 -msgid "Mass %" -msgstr "Massa %" +#: ../libs/gcp/stringdlg.cc:145 +#, fuzzy, c-format +msgid "" +"Could not open file %s, error was:\n" +"%s" +msgstr "" +"Non posso aprire il file\n" +"%s" -#: ../programs/calc/gchemcalc.desktop.in.h:1 -msgid "A simple calculator for chemistry" -msgstr "Un semplice calcolatore per chimica" +#: ../libs/gcp/stringdlg.cc:161 +#, c-format +msgid "" +"Could not write to file %s, error was:\n" +"%s." +msgstr "" -#: ../programs/crystal/gcrystal.desktop.in.h:1 -msgid "Edit and display crystalline structures" -msgstr "Modifica e mostra le strutture cristalline" +#: ../libs/gcp/stringdlg.cc:175 +#, fuzzy, c-format +msgid "" +"Could not close file %s, error was:\n" +"%s" +msgstr "" +"Non posso salvare il file\n" +"%s" + +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +#, fuzzy +msgid "This should not have occured, please file a bug record." +msgstr "Qualcosa è andato storto: per favore, invia una segnalazione d'errore." + +#: ../libs/gcp/theme.cc:449 +msgid "NewTheme1" +msgstr "" + +#: ../libs/gcp/theme.cc:453 +#, c-format +msgid "NewTheme%d" +msgstr "" + +#: ../libs/gcp/theme.cc:550 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "Sconosciuto" + +#: ../libs/gcp/view.cc:1015 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, fuzzy, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" +"Non posso salvare il file\n" +"%s" + +#: ../libs/gcp/view.cc:1051 ../libs/gcu/glview.cc:394 +#, c-format +msgid "Unable to save image file: %s\n" +msgstr "" + +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:274 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:134 +#: ../programs/table/gchemtable-curve.cc:212 +msgid "_File" +msgstr "_File" + +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:275 +msgid "_New File" +msgstr "_Nuovo File" + +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:276 +msgid "Create a new file" +msgstr "Crea un nuovo file" + +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." +msgstr "" + +#: ../libs/gcp/window.cc:284 +#, fuzzy +msgid "Create a new file using a theme" +msgstr "Crea un nuovo file" + +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:277 ../programs/spectra/window.cc:167 +msgid "_Open..." +msgstr "_Apri..." + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:278 ../programs/spectra/window.cc:168 +msgid "Open a file" +msgstr "Apri un file" + +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:279 +msgid "_Save" +msgstr "_Salva" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:280 +msgid "Save the current file" +msgstr "Salva il file corrente" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:281 +msgid "Save _As..." +msgstr "Salva come..." + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:282 +msgid "Save the current file with a different name" +msgstr "Salva il file corrente con un differente nome" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:283 +#: ../programs/spectra/window.cc:169 +msgid "Save As _Image..." +msgstr "Salva come _Immagine..." + +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:284 +#: ../programs/spectra/window.cc:170 +msgid "Save the current file as an image" +msgstr "Salva il file corrente come un'immagine" + +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:285 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:213 +msgid "Page Set_up..." +msgstr "" + +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:286 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:214 +msgid "Setup the page settings for your current printer" +msgstr "" + +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:287 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:215 +#, fuzzy +msgid "Print Pre_view" +msgstr "Anteprima" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:288 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:216 +#, fuzzy +msgid "Print preview" +msgstr "Anteprima" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:217 +msgid "_Print..." +msgstr "_Stampa..." + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:290 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "Print the current file" +msgstr "Stampa il file corrente" + +#: ../libs/gcp/window.cc:299 ../programs/table/gchemtable-curve.cc:219 +msgid "Prope_rties..." +msgstr "Propri_età..." + +#: ../libs/gcp/window.cc:300 +msgid "Modify the file's properties" +msgstr "Modifica le proprietà del file" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:291 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:221 +msgid "_Close" +msgstr "_Chiudi" + +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:292 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:222 +msgid "Close the current file" +msgstr "Chiudi il file corrente" + +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:137 +#: ../programs/table/gchemtable-curve.cc:223 +msgid "_Quit" +msgstr "_Esci" + +#: ../libs/gcp/window.cc:304 +msgid "Quit GChemPaint" +msgstr "Chiudi GChemPaint" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:295 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:225 +msgid "_Edit" +msgstr "_Modifica" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "_Annulla" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "Annulla l'ultima azione" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "_Rifai" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "Rifai l'azione annullata" + +#: ../libs/gcp/window.cc:310 +msgid "Cu_t" +msgstr "Tag_lia" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "Taglia la selezione" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:226 +msgid "_Copy" +msgstr "_Copia" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:227 +msgid "Copy the selection" +msgstr "Copia la selezione" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "_Incolla" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "Incolla dagli appunti" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "C_ancella" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "Cancella la selezione" + +#: ../libs/gcp/window.cc:318 +msgid "Select _All" +msgstr "Seleziona _tutto" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "Seleziona ogni cosa" + +#: ../libs/gcp/window.cc:320 +#, fuzzy +msgid "Pr_eferences..." +msgstr "Prefere_nze..." + +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:297 +msgid "Configure the application" +msgstr "" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:309 ../programs/table/gchemtable-app.cc:139 +msgid "_View" +msgstr "_Vista" + +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "" + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "" + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "" + +#: ../libs/gcp/window.cc:342 +#, fuzzy +msgid "_Tools" +msgstr "_Barre degli strumenti" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:312 +msgid "_Windows" +msgstr "_Finestre" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:317 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:163 +#: ../programs/table/gchemtable-curve.cc:228 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "_Help" +msgstr "_Aiuto" + +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:318 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:164 +#: ../programs/table/gchemtable-curve.cc:229 +msgid "_Contents" +msgstr "_Contenuti" + +#: ../libs/gcp/window.cc:346 +msgid "View help for GChemPaint" +msgstr "Sfoglia la guida di GChemPaint" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "GChemPaint sul _web" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "Naviga il sito web di GChemPaint" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:322 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:168 +#: ../programs/table/gchemtable-curve.cc:235 +msgid "Live assistance" +msgstr "" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:323 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +#, fuzzy +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "Versione di Gnome Chemistry Utils:" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:324 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Ask a question" +msgstr "_Poni una domanda" + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "Poni una domanda riguardo GChemPaint" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "Report _Bugs" +msgstr "Riporta gli _errori" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "Invia una notifica d'errore su GChemPaint" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:328 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "_About" +msgstr "_Informazioni" + +#: ../libs/gcp/window.cc:356 +msgid "About GChemPaint" +msgstr "Riguardo a GChemPaint" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:449 +msgid "Ready" +msgstr " Pronto!" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "GChemPaint" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:639 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "\"%s\" è stato modificato. Vuoi davvero salvarlo?" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "Ogni cosa è stata separata" + +#: ../libs/gcu/dialog.cc:131 +msgid "Type a number" +msgstr "Immetti un numero" + +#: ../libs/gcu/dialog.cc:140 +#, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "Immetti un numero maggiore o uguale a %g e minore di %g" + +#: ../libs/gcu/dialog.cc:150 +#, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "Immetti un numero maggiore di %g e minore o uguale a %g" + +#: ../libs/gcu/dialog.cc:160 +#, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "Immetti un numero tra %g e %g, estremi compresi." + +#: ../libs/gcu/dialog.cc:170 +#, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "Immetti un numero maggiore di %g e minore di %g" + +#: ../libs/gcu/dialog.cc:180 +#, c-format +msgid "Type a number lower than %g" +msgstr "Immetti un numero minore di %g" + +#: ../libs/gcu/dialog.cc:190 +#, c-format +msgid "Type a number greater than %g" +msgstr "Immetti un numero maggiore di %g" + +#: ../libs/gcu/dialog.cc:200 +#, c-format +msgid "Type a number lower than or equal to %g" +msgstr "Immetti un numero minore o uguale a %g" + +#: ../libs/gcu/dialog.cc:210 +#, c-format +msgid "Type a number greater than or equal to %g" +msgstr "Immetti un numero maggiore o uguale a %g" + +#: ../libs/gcu/element.cc:97 +msgid "German" +msgstr "Tedesco" + +#: ../libs/gcu/element.cc:98 +msgid "French" +msgstr "Francese" + +#: ../libs/gcu/element.cc:99 +msgid "Italian" +msgstr "Italiano" + +#: ../libs/gcu/element.cc:100 +msgid "Polish" +msgstr "Polacco" + +#: ../libs/gcu/element.cc:101 +msgid "Russian" +msgstr "Russo" + +#: ../libs/gcu/element.cc:103 +msgid "Can't find and read elements.xml" +msgstr "Non riesco a trovare e a leggere il file elements.xml" + +#: ../libs/gcu/element.cc:109 ../libs/gcu/element.cc:118 +msgid "Incorrect file format: elements.xml" +msgstr "Il formato del file non è corretto: elements.xml" + +#: ../libs/gcu/element.cc:154 +msgid "English" +msgstr "Inglese" + +#: ../libs/gcu/element.cc:406 +msgid "Can't find and read radii.xml" +msgstr "Non riesco a trovare e a leggere il file radii.xml" + +#: ../libs/gcu/element.cc:412 ../libs/gcu/element.cc:425 +msgid "Incorrect file format: radii.xml" +msgstr "Il formato del file non è corretto: radii.xml" + +#: ../libs/gcu/element.cc:513 +msgid "Can't find and read elecprops.xml" +msgstr "Non riesco a trovare e a leggere elecprops.xml" + +#: ../libs/gcu/element.cc:519 ../libs/gcu/element.cc:526 +msgid "Incorrect file format: elecprops.xml" +msgstr "Il formato del file non è corretto: elecprops.xml" + +#: ../libs/gcu/element.cc:675 +msgid "Can't find and read isotopes.xml" +msgstr "Non riesco a trovare e a leggere il file isotopes.xml" + +#: ../libs/gcu/element.cc:681 ../libs/gcu/element.cc:690 +msgid "Incorrect file format: isotopes.xml" +msgstr "Il formato del file non è corretto: isotopes.xml" + +#: ../libs/gcu/filechooser.cc:43 +msgid "Open" +msgstr "Apri" + +#: ../libs/gcu/filechooser.cc:62 +msgid "File _type:" +msgstr "" + +#: ../libs/gcu/filechooser.cc:64 +#, fuzzy +msgid "Automatic" +msgstr "Atomo" + +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "Parentesi non corrispondenti" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "Non riesco ad interpretare la lista dei simboli" + +#: ../libs/gcu/formula.cc:546 +msgid "Parser failed, please fill a bug report." +msgstr "L'analisi è fallita, per favore invia un rapporto d'errore." + +#: ../libs/gcu/formula.cc:554 +msgid "Invalid character" +msgstr "Carattere non valido" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +msgid "Background Color" +msgstr "Colore dello sfondo" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "Colore usato per colorare lo sfondo" + +#: ../libs/gcu/gtkperiodic.c:331 +#, c-format +msgid "" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" +msgstr "" + +#: ../libs/gcu/loader.cc:106 +msgid "Chemical file loader type." +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "" + +#: ../libs/gcu/printable.cc:35 +#, fuzzy +msgid "points" +msgstr "Spin" + +#: ../libs/gcu/printable.cc:36 +#, fuzzy +msgid "inches" +msgstr "Linee" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1321 +msgid "Transmittance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1320 +#, fuzzy +msgid "Absorbance" +msgstr "Asparagina" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1256 +msgid "Chemical shift (ppm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1257 +msgid "Frequency (Hz)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 ../libs/gcu/spectrumdoc.cc:1263 +msgid "Show integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 +msgid "Hide integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:706 ../libs/gcu/spectrumdoc.cc:1593 +msgid "Found too many data!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1253 ../libs/gcu/spectrumdoc.cc:1300 +msgid "X unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1304 +msgid "Wave length (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1306 +msgid "Wave length (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1307 +msgid "Wave number (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1312 +msgid "Invert X Axis" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1317 +msgid "Y unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1488 ../libs/gcu/spectrumdoc.cc:1518 +#, fuzzy +msgid "Constant too long" +msgstr "Pulsante di rotazione" + +#: ../libs/gcu/spectrumdoc.cc:1511 +#, fuzzy +msgid "Invalid character in data block" +msgstr "Carattere non valido" + +#: ../libs/gcu/spectrumdoc.cc:1615 +msgid "Data check failed!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1632 +msgid "Data check failed: FIRSTX!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1637 +msgid "Data check failed: FIRSTY!" +msgstr "" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1641 +msgid "Found too many data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1947 +msgid "Integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2068 +msgid "Real transformed data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2085 +msgid "Imaginary transformed data" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:80 +#, fuzzy +msgid "Minimum X value:" +msgstr "Minimo" + +#: ../libs/gcu/spectrumview.cc:85 +#, fuzzy +msgid "Maximum X value:" +msgstr "Massimo" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "" + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:502 ../plugins/loaders/cdx/cdx.cc:506 +#: ../plugins/loaders/cdx/cdx.cc:631 ../plugins/loaders/cdx/cdx.cc:636 +msgid "Unsupported feature, please report!" +msgstr "" + +#: ../plugins/loaders/cdx/cdx.cc:593 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:169 +#: ../plugins/paint/bonds/bondtool.cc:279 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "Orientazione: %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +#, fuzzy +msgid "H_alf heads" +msgstr "_Mezze punte" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +#, fuzzy +msgid "Set _default" +msgstr "Imposta come predefinito" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "_Punte piene" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +#, fuzzy +msgid "Use full arrows heads for reversible reactions" +msgstr "Aggiungi una coppia di frecce per una reazione reversibile" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "Crea un nuovo percorso di retrosintesi" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "Freccia semplice" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "Aggiungi una freccia per una reazione irreversibile" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "Doppia freccia" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "Aggiungi una coppia di frecce per una reazione reversibile" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "Freccia della retrosintesi" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "Aggiungi una freccia per un passaggio di retrosintesi" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "Freccia mesomera" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "Aggiungi una freccia a doppia punta per rappresentare la mesomeria" + +#: ../plugins/paint/arrows/plugin.cc:92 +msgid "Electron pair move arrow" +msgstr "Freccia del movimento di una coppia di elettroni" + +#: ../plugins/paint/arrows/plugin.cc:93 +msgid "Add a curved arrow to represent an electron pair move" +msgstr "" +"Aggiungi una freccia curva per rappresentare il moto di una coppia di " +"elettroni" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "Freccia del movimento del singolo elettrone" + +#: ../plugins/paint/arrows/plugin.cc:96 +msgid "Add a curved arrow to represent an single electron move" +msgstr "" +"Aggiungi una freccia curva per rappresentare il moto di un singolo elettrone" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "Nessuna molecola bersaglio!" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "Molecole bersaglio multiple o frecce mancanti." + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "Spiacente: i percorsi di retrosintesi ciclici non sono supportati." + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "Distruggi il percorso di retrosintesi" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "Solo una sola freccia può collegare due passaggi dati." + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "Aggiungi o modifica un atomo" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "Carica positiva" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "Aumenta la carica di un atomo" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "Carica negativa" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "Diminuisci la carica di un atomo" + +#: ../plugins/paint/atoms/plugin.cc:64 +#, fuzzy +msgid "Electron Pair" +msgstr "Pulsante della coppia di elettroni" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "Aggiungi una coppia di elettroni ad un atomo" + +#: ../plugins/paint/atoms/plugin.cc:67 +#, fuzzy +msgid "Unpaired Electron" +msgstr "Pulsante dell'elettrone spaiato" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "Aggiungi un elettrone spaiato ad un atomo" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "" + +#: ../plugins/paint/bonds/bondtool.cc:354 +msgid "Invalid document tree, please file a bug report" +msgstr "" +"Albero di documenti non valido: per favore, invia una segnalazione d'errore." + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:7 +#, fuzzy +msgid "Bonds _number:" +msgstr "Numero atomico:" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "" +"If set, the number of new bonds will be evaluated from the mouse position" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "" + +#: ../plugins/paint/bonds/chaintool.cc:125 +#: ../plugins/paint/bonds/chaintool.cc:247 +#, fuzzy, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "Orientazione: %g" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "Aggiungi un legame o cambia la molteplicità di uno esistente" + +#: ../plugins/paint/bonds/plugin.cc:59 +#, fuzzy +msgid "Chain" +msgstr "Principale" + +#: ../plugins/paint/bonds/plugin.cc:60 +#, fuzzy +msgid "Add a chain" +msgstr "Aggiungi un legame all'indietro" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "Pulsante del legame in avanti" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "Aggiungi un legame in avanti" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "Pulsante del legame all'indietro" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "Aggiungi un legame all'indietro" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "Pulsante del legame indeterminato" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "Aggiungi un legame indeterminato" + +#: ../plugins/paint/bonds/plugin.cc:71 +#, fuzzy +msgid "Fore bond tool" +msgstr "Pulsante del legame in avanti" + +#: ../plugins/paint/bonds/plugin.cc:72 +#, fuzzy +msgid "Add a fore bond" +msgstr "Aggiungi un legame in avanti" + +#: ../plugins/paint/bonds/plugin.cc:74 +msgid "Delocalized bond tool" +msgstr "Pulsante del legame delocalizzato" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "Aggiungi un sistema di legami delocalizzati" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +#, fuzzy +msgid "Cycle _Size" +msgstr "Dimensione del ciclo:" + +#: ../plugins/paint/cycles/plugin.cc:54 +#, fuzzy +msgid "Three atoms cycle" +msgstr "Pulsante del ciclo di tre atomi" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "Aggiungi un ciclo di tre membri" + +#: ../plugins/paint/cycles/plugin.cc:57 +#, fuzzy +msgid "Four atoms cycle" +msgstr "Pulsante del ciclo di quattro atomi" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "Aggiungi un ciclo di quattro membri" + +#: ../plugins/paint/cycles/plugin.cc:60 +#, fuzzy +msgid "Five atoms cycle" +msgstr "Pulsante del ciclo di quattro atomi" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "Aggiungi un ciclo di cinque membri" + +#: ../plugins/paint/cycles/plugin.cc:63 +#, fuzzy +msgid "Six atoms cycle" +msgstr "Pulsante del ciclo di quattro atomi" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "Aggiungi un ciclo di sei membri" + +#: ../plugins/paint/cycles/plugin.cc:66 +#, fuzzy +msgid "Seven atoms cycle" +msgstr "Pulsante del ciclo di tre atomi" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "Aggiungi un ciclo di sette membri" + +#: ../plugins/paint/cycles/plugin.cc:69 +#, fuzzy +msgid "Eight atoms cycle" +msgstr "Pulsante del ciclo di tre atomi" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "Aggiungi un ciclo di otto membri" + +#: ../plugins/paint/cycles/plugin.cc:72 +#, fuzzy +msgid "Variable sized cycle" +msgstr "Pulsante del ciclo di dimensione variabile" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "Aggiungi un ciclo" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "" + +#: ../plugins/paint/residues/plugin.cc:105 +#, fuzzy +msgid "Create new abbreviations" +msgstr "Crea una nuova reazione" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +#, fuzzy +msgid "Please, provide only one molecule." +msgstr "Per favore, provvedi un oggetto." + +#: ../plugins/paint/residues/residues-dlg.cc:232 +#, fuzzy +msgid "Please, provide a name for the residue" +msgstr "Per favore, provvedi un oggetto." + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "New" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +#, fuzzy +msgid "\"New\" is not a valid symbol" +msgstr "Simbolo non valido." + +#: ../plugins/paint/residues/residues-dlg.cc:265 +#, fuzzy +msgid "Please provide at least one symbol" +msgstr "Per favore, provvedi un oggetto." + +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:287 +#, fuzzy +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "Qualcosa è andato storto: per favore, invia una segnalazione d'errore." + +#: ../plugins/paint/residues/residues.glade.h:1 +#, fuzzy +msgid "Formula" +msgstr "Formula:" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:4 +#, fuzzy +msgid "Residues" +msgstr "Nucleosidi" + +#: ../plugins/paint/residues/residues.glade.h:5 +msgid "_Generic" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-delete" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:11 +msgid "gtk-save" +msgstr "" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "Proprietà del gruppo..." + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "Al_linea" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "Distanza:" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "Raggruppa e/o allinea gli oggetti selezionati" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" +"Normale\n" +"In alto\n" +"Giustificato\n" +"In basso\n" +"A sinistra\n" +"Centrato\n" +"A destra" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "_Raggruppa" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "_Spazia uniformemente" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "Seleziona" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "Seleziona uno o più oggetti" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "Cancella" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "Cancellino" + +#: ../plugins/paint/selection/selectiontool.cc:368 +msgid "Creation failed!" +msgstr "La creazione è fallita!" + +#: ../plugins/paint/selection/selectiontool.cc:392 +msgid "Group and/or align objects" +msgstr "Raggruppa e/o allinea oggetti" + +#: ../plugins/paint/selection/selectiontool.cc:430 +msgid "Horizontal flip" +msgstr "Ribaltamento orizzontale" + +#: ../plugins/paint/selection/selectiontool.cc:431 +msgid "Flip the selection horizontally" +msgstr "Ribalta la selezione orizzontalmente" + +#: ../plugins/paint/selection/selectiontool.cc:432 +msgid "Vertical flip" +msgstr "Ribaltamento verticale" + +#: ../plugins/paint/selection/selectiontool.cc:433 +msgid "Flip the selection vertically" +msgstr "Ribalta la selezione verticalmente" + +#: ../plugins/paint/selection/selectiontool.cc:434 +msgid "Merge" +msgstr "Aggrega" + +#: ../plugins/paint/selection/selectiontool.cc:435 +msgid "Merge two molecules" +msgstr "Aggrega due molecole" + +#: ../plugins/paint/selection/selectiontool.cc:439 +#, fuzzy +msgid "_Rotate" +msgstr "Ruota" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Rotate the selection" +msgstr "Ruota la selezione" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "Nuovo modello" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "_Categoria:" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "_Nome" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "Modelli" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "Usa o amministra i modelli" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "" + +#: ../plugins/paint/templates/templates.glade.h:1 +#, fuzzy +msgid "No selected template" +msgstr "Nuovo modello" + +#: ../plugins/paint/templates/templates.glade.h:2 +#, fuzzy +msgid "_Templates" +msgstr "Modelli" + +#: ../plugins/paint/templates/templates.glade.h:3 +#, fuzzy +msgid "category" +msgstr "_Categoria:" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "Per favore, provvedi un oggetto." + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "Per favore, fornisci un nome." + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "Per favore, scegli una categoria." + +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:6 +#, fuzzy +msgid "Stri_kethrough" +msgstr "Cancella" + +#: ../plugins/paint/text/fontsel.glade.h:7 +#, fuzzy +msgid "_Color:" +msgstr "colore:" + +#: ../plugins/paint/text/fontsel.glade.h:8 +#, fuzzy +msgid "_Family:" +msgstr "_File" + +#: ../plugins/paint/text/fontsel.glade.h:9 +#, fuzzy +msgid "_Position:" +msgstr "Composizione" + +#: ../plugins/paint/text/fontsel.glade.h:10 +#, fuzzy +msgid "_Style:" +msgstr "Titolo:" + +#: ../plugins/paint/text/fontsel.glade.h:11 +#, fuzzy +msgid "_Underline:" +msgstr "Sottolineato" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "Aggiungi o modifica un testo" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "Aggiungi o modifica un gruppo di atomi" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "" + +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +#, fuzzy +msgid "GChem3D Viewer" +msgstr "Versione del visualizzatore GChem3d:" + +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "Spiacente: il formato non è supportato!" + +#: ../programs/3d/main.cc:44 +msgid "GChem3d Viewer version: " +msgstr "Versione del visualizzatore GChem3d:" + +#: ../programs/3d/main.cc:55 +msgid "Prints GChem3d Viewer version" +msgstr "Stampo la versione del visualizzatore GChem3d" + +#: ../programs/3d/main.cc:56 +msgid "Background color: white, black or #rrggbb (default is black)" +msgstr "" +"Colore dello sfondo: bianco, nero o #rrggbb (quello predefinito e il nero)" + +#: ../programs/3d/main.cc:57 +#, fuzzy +msgid "" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" +msgstr "" +"Come le molecole sono disposte; possibili valori sono Sfere & Legami (quello " +"prestabilito) e Riempimento Spaziale" + +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 +msgid " [file]" +msgstr " [file]" + +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 +#, c-format +msgid "Invalid or misplaced argument: %s\n" +msgstr "Argomento non valido o malposto: %s\n" + +#: ../programs/3d/window.cc:129 +msgid "GChem3D is a molecular structures viewer for Gnome" +msgstr "GChem3D è un visualizzatore di strutture molecolari per Gnome" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/3d/window.cc:131 +#, fuzzy +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "(C) 2004-2006 by Jean Bréfort" + +#: ../programs/3d/window.cc:181 +msgid "Print the current scene" +msgstr "Stampa la scena corrente" + +#: ../programs/3d/window.cc:185 +msgid "Quit GChem3D" +msgstr "Chiudi GChem3D" + +#: ../programs/3d/window.cc:189 +msgid "View help for the Molecules Viewer" +msgstr "" + +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:320 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:166 +#: ../programs/table/gchemtable-curve.cc:233 +#, fuzzy +msgid "Gnome Chemistry Utils on the _web" +msgstr "Versione di Gnome Chemistry Utils:" + +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:321 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/table/gchemtable-curve.cc:234 +#, fuzzy +msgid "Browse the Gnome Chemistry Utils's web site" +msgstr "Versione di Gnome Chemistry Utils:" + +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:325 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 +#, fuzzy +msgid "Ask a question about the Gnome Chemistry Utils" +msgstr "Poni una domanda riguardo GChemPaint" + +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:327 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:240 +#, fuzzy +msgid "Submit a bug report for the Gnome Chemistry Utils" +msgstr "Invia una notifica d'errore su GChemPaint" + +#: ../programs/3d/window.cc:199 +msgid "About GChem3D" +msgstr "Informazioni su GChem3D" + +#: ../programs/3d/window.cc:203 +msgid "Balls and sticks" +msgstr "Sfere e legami" + +#: ../programs/3d/window.cc:204 +msgid "Display a balls and sticks model" +msgstr "Mostra un modello a sfere e legami" + +#: ../programs/3d/window.cc:206 +msgid "Space filling" +msgstr "Riempimento spaziale" + +#: ../programs/3d/window.cc:207 +msgid "Display a space filling model" +msgstr "Mostra un modello a riempimento spaziale" + +#: ../programs/3d/window.cc:209 +#, fuzzy +msgid "Cylinders" +msgstr "Cicli" + +#: ../programs/3d/window.cc:210 +#, fuzzy +msgid "Display a cylinders model" +msgstr "Mostra un modello a riempimento spaziale" + +#: ../programs/3d/window.cc:212 +msgid "Wireframe" +msgstr "" + +#: ../programs/3d/window.cc:213 +#, fuzzy +msgid "Display a wireframe model" +msgstr "Mostra un modello a riempimento spaziale" + +#: ../programs/3d/window.cc:271 +msgid "Background color" +msgstr "Colore dello sfondo" + +#: ../programs/3d/window.cc:272 +msgid "Choose a new background color" +msgstr "Sciegli un nuovo colore dello sfondo" + +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:429 +#: ../programs/spectra/window.cc:257 +msgid "Open recent" +msgstr "" + +#: ../programs/3d/gchem3d.desktop.in.in.h:1 +msgid "Display chemical 3D structures" +msgstr "Visualizza le strutture chimiche 3D" + +#: ../programs/3d/gchem3d.desktop.in.in.h:2 +#, fuzzy +msgid "Molecules Viewer @STABILITY_POSTFIX@" +msgstr "Visualizzatore molecolare (instabile)" + +#: ../programs/calc/gchemcalc.cc:301 +msgid "GChemCalc is a simple calculator for chemists" +msgstr "GchemCalc è un semplice calcolatore per chimici" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/calc/gchemcalc.cc:303 +#, fuzzy +msgid "Copyright © 2005-2007 Jean Bréfort\n" +msgstr "(C) 2005-2006 by Jean Bréfort" + +#: ../programs/calc/gchemcalc.cc:619 +msgid "Quit GChemCalc" +msgstr "Esci da GChemCalc" + +#: ../programs/calc/gchemcalc.cc:623 +msgid "_Mode" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:626 +#, fuzzy +msgid "View help for the Chemical Calculator" +msgstr "Calcolatore chimico" + +#: ../programs/calc/gchemcalc.cc:636 +msgid "About GChemCalc" +msgstr "Informazioni su GChemCalc" + +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:643 +#, fuzzy +msgid "_Atom" +msgstr "Atomo" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:646 +#, fuzzy +msgid "_Nickname" +msgstr "_Nome" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:688 +#, fuzzy +msgid "GChemCalc Calculator version: " +msgstr "Calcolatore chimico" -#: ../programs/crystal/gcrystal.desktop.in.h:2 +#: ../programs/calc/gchemcalc.cc:714 +msgid " [formula]" +msgstr " [formula]" + +#: ../programs/calc/gchemcalc.cc:731 +#, fuzzy +msgid "For usage see: gchemcalc-unstable [-?|--help]" +msgstr "Uso: gchemcalc-unstable [OPZIONE...] [formula]" + +#: ../programs/calc/gchemcalc.cc:777 +msgid "Element" +msgstr "Elemento" + +#: ../programs/calc/gchemcalc.cc:784 +msgid "Mass %" +msgstr "Massa %" + +#: ../programs/calc/gchemcalc.desktop.in.in.h:1 +msgid "A simple calculator for chemistry" +msgstr "Un semplice calcolatore per chimica" + +#: ../programs/calc/gchemcalc.desktop.in.in.h:2 +#, fuzzy +msgid "Chemical calculator @STABILITY_POSTFIX@" +msgstr "Calcolatore chimico" + +#: ../programs/crystal/gcrystal.desktop.in.in.h:1 +msgid "Edit and display crystalline structures" +msgstr "Modifica e mostra le strutture cristalline" + +#: ../programs/crystal/gcrystal.desktop.in.in.h:2 #, fuzzy -msgid "Gnome Crystal Crystalline Structures Viewer " +msgid "Gnome Crystal Crystalline Structures Viewer @STABILITY_POSTFIX@" msgstr "Visualizzatore di strutture cristalline di Gnome Crystal (instabile)" -#: ../programs/crystal/gcrystal.schemas.in.h:1 -#, fuzzy -msgid "Background color blue value" -msgstr "Valore del colore blu dello sfondo" +#: ../programs/crystal/gcrystal.schemas.in.h:1 +#, fuzzy +msgid "Background color blue value" +msgstr "Valore del colore blu dello sfondo" + +#: ../programs/crystal/gcrystal.schemas.in.h:2 +#, fuzzy +msgid "Background color green value" +msgstr "Valore del colore verde dello sfondo" + +#: ../programs/crystal/gcrystal.schemas.in.h:3 +#, fuzzy +msgid "Background color red value" +msgstr "Valore del colore rosso dello sfondo" + +#: ../programs/crystal/gcrystal.schemas.in.h:4 +msgid "" +"Blue value for the default background color. Acceptable values are 0. to 1." +msgstr "" +"Valore del blu per il colore prestabilito dello sfondo. I valori accettabili " +"sono tra 0. e 1." + +#: ../programs/crystal/gcrystal.schemas.in.h:5 +msgid "" +"Default Euler's nutation angle for model display. Acceptable values are 0. " +"to + 180." +msgstr "" +"Angolo di nutazione di Eulero prestabilito per mostrare il modello. I valori " +"accettabili sono tra 0. e +180." + +#: ../programs/crystal/gcrystal.schemas.in.h:6 +msgid "" +"Default Euler's precession angle for model display. Acceptable values are -" +"180. to + 180." +msgstr "" +"Angolo di precessione di Eulero prestabilito per mostrare il modello. I " +"valori accettabili sono tra -180 e +180." + +#: ../programs/crystal/gcrystal.schemas.in.h:7 +msgid "" +"Default Euler's spin angle for model display. Acceptable values are -180. to " +"+ 180." +msgstr "" +"Angolo di spin prestabilito per mostrare il modello. I valori accettabili " +"sono tra -180 e +180." + +#: ../programs/crystal/gcrystal.schemas.in.h:8 +msgid "Default field of view" +msgstr "Campo di vista prestabilito" + +#: ../programs/crystal/gcrystal.schemas.in.h:9 +msgid "Default nutation" +msgstr "Nutazione prestabilita" + +#: ../programs/crystal/gcrystal.schemas.in.h:10 +msgid "Default precession" +msgstr "Precessione prestabilita" + +#: ../programs/crystal/gcrystal.schemas.in.h:11 +msgid "Default spin" +msgstr "Spin prestabilito" + +#: ../programs/crystal/gcrystal.schemas.in.h:12 +msgid "Field of view used by default for the model display." +msgstr "Campo di vista prestabilito usato per mostrare il modello." + +#: ../programs/crystal/gcrystal.schemas.in.h:13 +msgid "" +"Green value for the default background color. Acceptable values are 0. to 1." +msgstr "" +"Valore del verde per il colore prestabilito dello sfondo. I valori " +"accettabili sono tra 0. e 1." + +#: ../programs/crystal/gcrystal.schemas.in.h:14 +msgid "Printing resolution" +msgstr "Risoluzione di stampa" + +#: ../programs/crystal/gcrystal.schemas.in.h:15 +msgid "Printing resolution if not automatically detected." +msgstr "Risoluzione di stampa se non rilevata automaticamente." + +#: ../programs/crystal/gcrystal.schemas.in.h:16 +msgid "" +"Red value for the default background color. Acceptable values are 0. to 1." +msgstr "" +"Valore del rosso per il colore prestabilito dello sfondo. I valori " +"accettabili sono tra 0. e 1." + +#: ../programs/crystal/application.cc:58 +#, c-format +msgid "Untitled%d" +msgstr "Senza titolo%d" + +#: ../programs/crystal/application.cc:318 +#, c-format +msgid "" +"\"%s\" has been modified since last saving. Do you wish to come back to " +"saved version?" +msgstr "" +"\"%s\" è stato modificato dall'ultimo salvataggio. Vuoi ritornare alla " +"versione salvata?Mendeleiev" + +#. Note for translators: c.n. is for coordination number +#: ../programs/crystal/atomsdlg.cc:624 +msgid " c.n.=" +msgstr " c.n.=" + +#: ../programs/crystal/atomsdlg.cc:630 +msgid "low spin" +msgstr "Spin giù" + +#: ../programs/crystal/atomsdlg.cc:630 +msgid "high spin" +msgstr "Spin sù" + +#: ../programs/crystal/atomsdlg.cc:632 +msgid "Database" +msgstr "Archivio" + +#: ../programs/crystal/celldlg.cc:141 +msgid "The sum of the three angles must be less than 360°" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "h" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "k" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "l" + +#: ../programs/crystal/cleavagesdlg.cc:128 +msgid "Planes cleaved" +msgstr "Piani separati" + +#: ../programs/crystal/document.cc:271 +#, c-format +msgid "" +"Could not save file\n" +"%s" +msgstr "" +"Non posso salvare il file\n" +"%s" + +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" +msgstr "x1" + +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" +msgstr "y1" + +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" +msgstr "z1" + +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "x2" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "y2" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" +msgstr "z2" + +#: ../programs/crystal/linesdlg.cc:180 +msgid "Single" +msgstr "Singolo" + +#: ../programs/crystal/main.cc:88 +msgid "Gnome Chemistry Utils version: " +msgstr "Versione di Gnome Chemistry Utils:" + +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 +msgid " [file...]" +msgstr " [file...]" + +#: ../programs/crystal/window.cc:142 ../programs/crystal/window.cc:394 +msgid "Gnome Crystal" +msgstr "Gnome Crystal" + +#: ../programs/crystal/window.cc:145 +msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" +msgstr "" +"Gnome Crystal è un visualizzatore leggero di strutture cristalline per Gnome" + +#: ../programs/crystal/window.cc:146 +#, fuzzy +msgid "Copyright © 1999-2007 by Jean Bréfort" +msgstr "(C) 1999-2006 by Jean Bréfort" + +#: ../programs/crystal/window.cc:294 +msgid "Quit Gnome Crystal" +msgstr "Esci da Gnome Crystal" + +#: ../programs/crystal/window.cc:296 +msgid "Prefere_nces..." +msgstr "Prefere_nze..." + +#: ../programs/crystal/window.cc:298 +msgid "_Crystal" +msgstr "_Cristallo" + +#: ../programs/crystal/window.cc:299 +msgid "_Lattice..." +msgstr "_Reticolo..." + +#: ../programs/crystal/window.cc:300 +msgid "Define the lattice" +msgstr "Definisci il reticolo" + +#: ../programs/crystal/window.cc:301 +msgid "_Atoms..." +msgstr "_Atomi..." + +#: ../programs/crystal/window.cc:302 +msgid "Add or edit atoms" +msgstr "Aggiungi o modifica atomi" + +#: ../programs/crystal/window.cc:303 +msgid "_Bonds and lines..." +msgstr "_Legami e linee..." + +#: ../programs/crystal/window.cc:304 +msgid "Add or edit bonds and lines" +msgstr "Aggiungi o modifica legami e linee" + +#: ../programs/crystal/window.cc:305 +msgid "_Size..." +msgstr "_Dimensione..." + +#: ../programs/crystal/window.cc:306 +msgid "Define size" +msgstr "Definisci la dimensione" + +#: ../programs/crystal/window.cc:307 +msgid "_Cleavages..." +msgstr "_Separazioni..." + +#: ../programs/crystal/window.cc:308 +msgid "Add or edit cleavages to remove some planes" +msgstr "Aggiungi o modifcia divisioni per rimuovere alcuni piani" + +#: ../programs/crystal/window.cc:310 +msgid "View _settings..." +msgstr "Impostazioni della _vista..." + +#: ../programs/crystal/window.cc:311 +msgid "Choose background color and model position" +msgstr "Scegli il colore dello sfondo e la posizione del modello" + +#: ../programs/crystal/window.cc:313 +#, fuzzy +msgid "Create new _window" +msgstr "Crea una nuova finestra" + +#: ../programs/crystal/window.cc:314 +msgid "Create a new window" +msgstr "Crea una nuova finestra" + +#: ../programs/crystal/window.cc:315 +msgid "_Close this window" +msgstr "_Chiudi questa finestra" + +#: ../programs/crystal/window.cc:316 +msgid "Close the current window" +msgstr "Chiudi la finestra corrente" + +#: ../programs/crystal/window.cc:319 +msgid "View help for Gnome Crystal" +msgstr "Mostra la guida di Gnome Crystal" + +#: ../programs/crystal/window.cc:329 +msgid "About Gnome Crystal" +msgstr "Informazioni su Gnome Crystal" + +#: ../programs/paint/gchempaint.desktop.in.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "Modifica le strutture chimiche 2D" + +#: ../programs/paint/gchempaint.desktop.in.in.h:2 +#, fuzzy +msgid "GChemPaint Chemical Structures Editor @STABILITY_POSTFIX@" +msgstr "Editore di strutture chimiche di GChemPaint (instabile)" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:4 +#, fuzzy +msgid "Chemical formula font style." +msgstr "Calcolatore chimico (instabile)" + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "" +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:2 +#: ../programs/paint/gchempaint.schemas.in.h:10 #, fuzzy -msgid "Background color green value" -msgstr "Valore del colore verde dello sfondo" +msgid "Default arrow length" +msgstr "Impostazioni predefinite della vista" -#: ../programs/crystal/gcrystal.schemas.in.h:3 -#, fuzzy -msgid "Background color red value" -msgstr "Valore del colore rosso dello sfondo" +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:4 +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format msgid "" -"Blue value for the default background color. Acceptable values are 0. to 1." +"Default arrow line width in pixels (at 100% zoom). Used in the default theme." msgstr "" -"Valore del blu per il colore prestabilito dello sfondo. I valori accettabili " -"sono tra 0. e 1." -#: ../programs/crystal/gcrystal.schemas.in.h:5 -msgid "" -"Default Euler's nutation angle for model display. Acceptable values are 0. " -"to + 180." +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." msgstr "" -"Angolo di nutazione di Eulero prestabilito per mostrare il modello. I valori " -"accettabili sono tra 0. e +180." -#: ../programs/crystal/gcrystal.schemas.in.h:6 -msgid "" -"Default Euler's precession angle for model display. Acceptable values are -" -"180. to + 180." +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" msgstr "" -"Angolo di precessione di Eulero prestabilito per mostrare il modello. I " -"valori accettabili sono tra -180 e +180." -#: ../programs/crystal/gcrystal.schemas.in.h:7 -msgid "" -"Default Euler's spin angle for model display. Acceptable values are -180. to " -"+ 180." +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." msgstr "" -"Angolo di spin prestabilito per mostrare il modello. I valori accettabili " -"sono tra -180 e +180." -#: ../programs/crystal/gcrystal.schemas.in.h:8 -msgid "Default field of view" -msgstr "Campo di vista prestabilito" +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "" +"Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:9 -msgid "Default nutation" -msgstr "Nutazione prestabilita" +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:10 -msgid "Default precession" +#: ../programs/paint/gchempaint.schemas.in.h:20 +#, fuzzy +msgid "Default charge sign size." msgstr "Precessione prestabilita" -#: ../programs/crystal/gcrystal.schemas.in.h:11 -msgid "Default spin" -msgstr "Spin prestabilito" +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:12 -msgid "Field of view used by default for the model display." -msgstr "Campo di vista prestabilito usato per mostrare il modello." +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:13 +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format msgid "" -"Green value for the default background color. Acceptable values are 0. to 1." +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." msgstr "" -"Valore del verde per il colore prestabilito dello sfondo. I valori " -"accettabili sono tra 0. e 1." -#: ../programs/crystal/gcrystal.schemas.in.h:14 -msgid "Printing resolution" -msgstr "Risoluzione di stampa" +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:15 -msgid "Printing resolution if not automatically detected." -msgstr "Risoluzione di stampa se non rilevata automaticamente." +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format +msgid "" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." +msgstr "" -#: ../programs/crystal/gcrystal.schemas.in.h:16 +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format msgid "" -"Red value for the default background color. Acceptable values are 0. to 1." +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." msgstr "" -"Valore del rosso per il colore prestabilito dello sfondo. I valori " -"accettabili sono tra 0. e 1." -#: ../programs/crystal/application.cc:55 -#, c-format -msgid "Untitled%d" -msgstr "Senza titolo%d" +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "" -#: ../programs/crystal/application.cc:261 -#, c-format +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format msgid "" -"\"%s\" has been modified since last saving. Do you wish to come back to " -"saved version?" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." msgstr "" -"\"%s\" è stato modificato dall'ultimo salvataggio. Vuoi ritornare alla " -"versione salvata?Mendeleiev" -#: ../programs/crystal/atomsdlg.cc:133 -msgid "Atom" -msgstr "Atomo" +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" -#: ../programs/crystal/atomsdlg.cc:187 ../programs/crystal/atomsdlg.cc:282 -#: ../programs/crystal/atomsdlg.cc:415 -msgid "Unknown" -msgstr "Sconosciuto" +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" -#. Note for translators: c.n. is for coordination number -#: ../programs/crystal/atomsdlg.cc:555 -msgid " c.n.=" -msgstr " c.n.=" +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "" -#: ../programs/crystal/atomsdlg.cc:561 -msgid "low spin" -msgstr "Spin giù" +#: ../programs/paint/gchempaint.schemas.in.h:38 +#, fuzzy +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "Aggiungi un coefficiente stechiometrico" -#: ../programs/crystal/atomsdlg.cc:561 -msgid "high spin" -msgstr "Spin sù" +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/atomsdlg.cc:563 -msgid "Database" -msgstr "Archivio" +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "" -#: ../programs/crystal/celldlg.cc:141 -msgid "The sum of the three angles must be less than 360°" +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." msgstr "" -#: ../programs/crystal/cleavagesdlg.cc:128 -msgid "Planes cleaved" -msgstr "Piani separati" +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" -#: ../programs/crystal/document.cc:237 -#, c-format +#: ../programs/paint/gchempaint.schemas.in.h:44 msgid "" -"Could not save file\n" -"%s" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." msgstr "" -"Non posso salvare il file\n" -"%s" -#: ../programs/crystal/document.cc:240 -#, c-format +#: ../programs/paint/gchempaint.schemas.in.h:45 msgid "" -"Could not load file\n" -"%s" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." msgstr "" -"Non posso caricare il file\n" -"%s" -#: ../programs/crystal/document.cc:243 -#, c-format +#: ../programs/paint/gchempaint.schemas.in.h:46 +#, fuzzy +msgid "Default hash line width." +msgstr "Spin prestabilito" + +#: ../programs/paint/gchempaint.schemas.in.h:47 +#, fuzzy +msgid "Default hash lines distance." +msgstr "Impostazioni predefinite della vista" + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format msgid "" -"%s: invalid xml file.\n" -"Tree is empty?" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." msgstr "" -"%s: il file xml non è valido.\n" -"L'albero è vuoto?" -#: ../programs/crystal/document.cc:246 -#, c-format -msgid "%s: invalid file format." -msgstr "%s: il formato del file non è valido." +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "" -#: ../programs/crystal/document.cc:594 -#, c-format -msgid "\"%s\" has been modified. Do you wish to save it?" -msgstr "\"%s\" è stato modificato. Vuoi davvero salvarlo?" +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" -#: ../programs/crystal/linesdlg.cc:178 -msgid "Single" -msgstr "Singolo" +#: ../programs/paint/gchempaint.schemas.in.h:53 +#, fuzzy +msgid "Default padding around arrows." +msgstr "Per favore, aggiungi le frecce mancanti." -#: ../programs/crystal/main.cc:76 -msgid "Gnome Chemistry Utils version: " -msgstr "Versione di Gnome Chemistry Utils:" +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/main.cc:104 -msgid " [file...]" -msgstr " [file...]" +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "" -#: ../programs/crystal/window.cc:122 ../programs/crystal/window.cc:383 -msgid "Gnome Crystal" -msgstr "Gnome Crystal" +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "" -#: ../programs/crystal/window.cc:125 -msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." msgstr "" -"Gnome Crystal è un visualizzatore leggero di strutture cristalline per Gnome" -#: ../programs/crystal/window.cc:126 -#, fuzzy -msgid "Copyright © 1999-2007 by Jean Bréfort" -msgstr "(C) 1999-2006 by Jean Bréfort" +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "" -#: ../programs/crystal/window.cc:248 -msgid "_New File" -msgstr "_Nuovo File" +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:249 -msgid "Create a new file" -msgstr "Crea un nuovo file" +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." +msgstr "" -#: ../programs/crystal/window.cc:252 -msgid "_Save" -msgstr "_Salva" +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "" -#: ../programs/crystal/window.cc:253 -msgid "Save the current file" -msgstr "Salva il file corrente" +#: ../programs/paint/gchempaint.schemas.in.h:66 +#, fuzzy +msgid "Default text font size." +msgstr "Campo di vista prestabilito" -#: ../programs/crystal/window.cc:254 -msgid "Save _As..." -msgstr "Salva come..." +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "" -#: ../programs/crystal/window.cc:255 -msgid "Save the current file with a different name" -msgstr "Salva il file corrente con un differente nome" +#: ../programs/paint/gchempaint.schemas.in.h:68 +#, fuzzy +msgid "Default text font style." +msgstr "Nutazione prestabilita" -#: ../programs/crystal/window.cc:259 -msgid "Print the current file" -msgstr "Stampa il file corrente" +#: ../programs/paint/gchempaint.schemas.in.h:69 +#, fuzzy +msgid "Default text font variant." +msgstr "Nutazione prestabilita" -#: ../programs/crystal/window.cc:263 -msgid "Quit Gnome Crystal" -msgstr "Esci da Gnome Crystal" +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "" -#: ../programs/crystal/window.cc:264 -msgid "_Edit" -msgstr "_Modifica" +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "" -#: ../programs/crystal/window.cc:265 -msgid "Prefere_nces..." -msgstr "Prefere_nze..." +#: ../programs/paint/gchempaint.schemas.in.h:72 +#, fuzzy +msgid "Default theme." +msgstr "Spin prestabilito" -#: ../programs/crystal/window.cc:266 -msgid "Configure the application" +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." msgstr "" -#: ../programs/crystal/window.cc:267 -msgid "_Crystal" -msgstr "_Cristallo" +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." +msgstr "" -#: ../programs/crystal/window.cc:268 -msgid "_Lattice..." -msgstr "_Reticolo..." +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." +msgstr "" -#: ../programs/crystal/window.cc:269 -msgid "Define the lattice" -msgstr "Definisci il reticolo" +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:270 -msgid "_Atoms..." -msgstr "_Atomi..." +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:271 -msgid "Add or edit atoms" -msgstr "Aggiungi o modifica atomi" +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:272 -msgid "_Bonds and lines..." -msgstr "_Legami e linee..." +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:273 -msgid "Add or edit bonds and lines" -msgstr "Aggiungi o modifica legami e linee" +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:274 -msgid "_Size..." -msgstr "_Dimensione..." +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "" -#: ../programs/crystal/window.cc:275 -msgid "Define size" -msgstr "Definisci la dimensione" +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." +msgstr "" -#: ../programs/crystal/window.cc:276 -msgid "_Cleavages..." -msgstr "_Separazioni..." +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:277 -msgid "Add or edit cleavages to remove some planes" -msgstr "Aggiungi o modifcia divisioni per rimuovere alcuni piani" +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "" -#: ../programs/crystal/window.cc:279 -msgid "View _settings..." -msgstr "Impostazioni della _vista..." +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:280 -msgid "Choose background color and model position" -msgstr "Scegli il colore dello sfondo e la posizione del modello" +#: ../programs/paint/gchempaint.schemas.in.h:88 +#, fuzzy +msgid "Whether the periodic table is tearable." +msgstr "Mostra la tavola periodica degli elementi" + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "" + +#: ../programs/paint/main.cc:46 +msgid "GChemPaint version: " +msgstr "Versione di GChemPaint" + +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" +msgstr "" -#: ../programs/crystal/window.cc:281 -msgid "_Windows" -msgstr "_Windows" +#: ../programs/spectra/gspectrum.desktop.in.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "" -#: ../programs/crystal/window.cc:282 -#, fuzzy -msgid "Create new _window" -msgstr "Crea una nuova finestra" +#: ../programs/spectra/gspectrum.desktop.in.in.h:2 +msgid "Spectrum viewer @STABILITY_POSTFIX@" +msgstr "" -#: ../programs/crystal/window.cc:283 -msgid "Create a new window" -msgstr "Crea una nuova finestra" +#: ../programs/spectra/window.cc:124 +#, fuzzy +msgid "GSpectrum is a spectrum viewer for Gnome" +msgstr "GChem3D è un visualizzatore di strutture molecolari per Gnome" -#: ../programs/crystal/window.cc:284 -msgid "_Close this window" -msgstr "_Chiudi questa finestra" +#. const gchar * documentors[] = {NULL}; +#: ../programs/spectra/window.cc:126 +#, fuzzy +msgid "Copyright © 2007 Jean Bréfort\n" +msgstr "(C) 2004-2006 by Jean Bréfort" -#: ../programs/crystal/window.cc:285 -msgid "Close the current window" -msgstr "Chiudi la finestra corrente" +#: ../programs/spectra/window.cc:180 +#, fuzzy +msgid "Quit GSpectrum" +msgstr "Chiudi GChem3D" -#: ../programs/crystal/window.cc:288 -msgid "View help for Gnome Crystal" +#: ../programs/spectra/window.cc:186 +#, fuzzy +msgid "View help for the Spetra Viewer" msgstr "Mostra la guida di Gnome Crystal" -#: ../programs/crystal/window.cc:296 -msgid "About Gnome Crystal" -msgstr "Informazioni su Gnome Crystal" - -#: ../programs/crystal/window.cc:445 -msgid "Ready" -msgstr " Pronto!" +#: ../programs/spectra/window.cc:196 +#, fuzzy +msgid "About GSpectrum" +msgstr "Informazioni su GChem3D" -#: ../programs/table/gchemtable-app.cc:102 -msgid "GChemTable is a chemical periodic table of the elements application" +#: ../programs/table/gchemtable-app.cc:135 +msgid "New _Chart" msgstr "" -"GChemTable è un programma di chimica per un tavola periodica degli elementi" -#. const gchar * documentors[] = {NULL}; -#: ../programs/table/gchemtable-app.cc:104 +#: ../programs/table/gchemtable-app.cc:136 #, fuzzy -msgid "Copyright © 2005-2007 Jean Bréfort" -msgstr "(C) 2005-2006 by Jean Bréfort" +msgid "Create a new chart" +msgstr "Crea una nuova reazione" -#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-app.cc:138 +#: ../programs/table/gchemtable-curve.cc:224 msgid "Quit GChemTable" msgstr "Chiudi GChemTable" -#: ../programs/table/gchemtable-app.cc:145 +#: ../programs/table/gchemtable-app.cc:140 msgid "Color scheme" msgstr "" -#: ../programs/table/gchemtable-app.cc:146 +#: ../programs/table/gchemtable-app.cc:141 #, fuzzy msgid "No colors" msgstr "colore:" -#: ../programs/table/gchemtable-app.cc:147 +#: ../programs/table/gchemtable-app.cc:142 msgid "Use default Gtk theme colors" msgstr "" -#: ../programs/table/gchemtable-app.cc:148 -#, fuzzy -msgid "Default" -msgstr "Spin prestabilito" - -#: ../programs/table/gchemtable-app.cc:149 +#: ../programs/table/gchemtable-app.cc:144 msgid "Use default symbolic element colors" msgstr "" -#: ../programs/table/gchemtable-app.cc:150 +#: ../programs/table/gchemtable-app.cc:145 msgid "Physical states" msgstr "" -#: ../programs/table/gchemtable-app.cc:151 +#: ../programs/table/gchemtable-app.cc:146 msgid "Use colors to display physical state at a given temperature" msgstr "" -#: ../programs/table/gchemtable-app.cc:153 -msgid "Family" -msgstr "" - -#: ../programs/table/gchemtable-app.cc:154 +#: ../programs/table/gchemtable-app.cc:149 msgid "Use colors to display the family grouping of the elements" msgstr "" -#: ../programs/table/gchemtable-app.cc:156 +#: ../programs/table/gchemtable-app.cc:151 msgid "Acidity" msgstr "" -#: ../programs/table/gchemtable-app.cc:157 +#: ../programs/table/gchemtable-app.cc:152 #, fuzzy msgid "Use colors to display the acidity of the elements" msgstr "Tavola periodica degli elementi" +#: ../programs/table/gchemtable-app.cc:154 +#, fuzzy +msgid "Electronegativity" +msgstr "Affinità elettronica" + +#: ../programs/table/gchemtable-app.cc:155 +#, fuzzy +msgid "Use colors to display the electronegativity of the elements" +msgstr "Tavola periodica degli elementi" + +#: ../programs/table/gchemtable-app.cc:157 +msgid "Atomic radius" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:158 +#, fuzzy +msgid "Use colors to display the covalent radii of the elements" +msgstr "Tavola periodica degli elementi" + +#: ../programs/table/gchemtable-app.cc:160 +msgid "Block" +msgstr "" + #: ../programs/table/gchemtable-app.cc:161 #, fuzzy +msgid "Use colors to display the blocks elements belong to" +msgstr "Tavola periodica degli elementi" + +#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/table/gchemtable-curve.cc:230 +#, fuzzy msgid "View help for the Periodic Table" msgstr "Mostra la guida di Gnome Crystal" -#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:242 msgid "About GChemTable" msgstr "Informazioni su GChemTable" +#: ../programs/table/gchemtable-app.cc:343 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "" +"GChemTable è un programma di chimica per un tavola periodica degli elementi" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/table/gchemtable-app.cc:345 +#, fuzzy +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "(C) 2005-2006 by Jean Bréfort" + #. The markup at the end of the chain is there to ensure that #. things will be correcly aligned, add the same to the translated string -#: ../programs/table/gchemtable-elt.cc:64 +#: ../programs/table/gchemtable-elt.cc:61 msgid "Electronic configuration: " msgstr "Configurazione elettronica: " -#: ../programs/table/gchemtable-elt.cc:76 +#: ../programs/table/gchemtable-elt.cc:73 msgid "Lang" msgstr "Lingua" -#: ../programs/table/gchemtable-elt.cc:83 +#: ../programs/table/gchemtable-elt.cc:80 msgid "Name" msgstr "Nome" -#: ../programs/table/gchemtable-elt.cc:109 -#: ../programs/table/gchemtable-elt.cc:152 -#: ../programs/table/gchemtable-elt.cc:188 -#: ../programs/table/gchemtable-elt.cc:211 -#: ../programs/table/gchemtable-elt.cc:225 -#: ../programs/table/gchemtable-elt.cc:239 -#: ../programs/table/gchemtable-elt.cc:261 +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 msgid "n.a." msgstr "n.a." -#: ../programs/table/gchemtable-elt.cc:121 -#: ../programs/table/gchemtable-elt.cc:162 +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 #, c-format msgid "%d:" msgstr "%d:" -#: ../programs/table/gchemtable-elt.cc:273 +#: ../programs/table/gchemtable-elt.cc:271 msgid "Ion" msgstr "Ione" #. C.N. stands for coordination number -#: ../programs/table/gchemtable-elt.cc:280 +#: ../programs/table/gchemtable-elt.cc:278 msgid "C.N." msgstr "C.N" -#: ../programs/table/gchemtable-elt.cc:285 +#: ../programs/table/gchemtable-elt.cc:283 msgid "Spin" msgstr "Spin" -#: ../programs/table/gchemtable-elt.cc:292 +#: ../programs/table/gchemtable-elt.cc:290 msgid "Value" msgstr "Valore" -#: ../programs/table/gchemtable-elt.cc:311 +#: ../programs/table/gchemtable-elt.cc:310 msgid "Low" msgstr "Basso" -#: ../programs/table/gchemtable-elt.cc:314 +#: ../programs/table/gchemtable-elt.cc:313 msgid "High" msgstr "Altro" -#: ../programs/table/gchemtable-curve.cc:183 -#: ../programs/table/gchemtable-curve.cc:187 +#: ../programs/table/gchemtable-curve.cc:220 +#, fuzzy +msgid "Modify the graph properties" +msgstr "Modifica le proprietà del file" + +#: ../programs/table/gchemtable-curve.cc:232 +#, fuzzy +msgid "View help for the Curve Window" +msgstr "Mostra la guida di Gnome Crystal" + +#: ../programs/table/gchemtable-curve.cc:324 +#: ../programs/table/gchemtable-curve.cc:328 +#: ../programs/table/gchemtable-data.cc:524 msgid "Pauling electronegativity" msgstr "Elettronegatività di Pauling" -#: ../programs/table/gchemtable-curve.cc:199 +#: ../programs/table/gchemtable-curve.cc:340 msgid "Electron affinity (kJ/mol)" msgstr "Affinità elettronica (kJ/mol)" -#: ../programs/table/gchemtable-curve.cc:203 +#: ../programs/table/gchemtable-curve.cc:344 msgid "Electron affinity" msgstr "Affinità elettronica" -#: ../programs/table/gchemtable-curve.cc:217 +#: ../programs/table/gchemtable-curve.cc:358 msgid "1st. " msgstr "1°" -#: ../programs/table/gchemtable-curve.cc:220 +#: ../programs/table/gchemtable-curve.cc:361 msgid "2nd. " msgstr "2°" -#: ../programs/table/gchemtable-curve.cc:223 +#: ../programs/table/gchemtable-curve.cc:364 msgid "3rd. " msgstr "3°" -#: ../programs/table/gchemtable-curve.cc:226 +#: ../programs/table/gchemtable-curve.cc:367 #, c-format msgid "%dth. " msgstr "%d-esimo." -#: ../programs/table/gchemtable-curve.cc:229 +#: ../programs/table/gchemtable-curve.cc:370 msgid "ionization energy (MJ/mol)" msgstr "Energia di ionizzazione (MJ/mol)" -#: ../programs/table/gchemtable-curve.cc:236 +#: ../programs/table/gchemtable-curve.cc:377 msgid "ionization energy" msgstr "energia di ionizzazione" -#: ../programs/table/gchemtable-curve.cc:255 -#: ../programs/table/gchemtable-curve.cc:259 +#: ../programs/table/gchemtable-curve.cc:396 +#: ../programs/table/gchemtable-curve.cc:400 msgid "Covalent radii" msgstr "Raggi covalenti" -#: ../programs/table/gchemtable-curve.cc:275 -#: ../programs/table/gchemtable-curve.cc:279 +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 msgid "Van der Waals radii" msgstr "Raggi di Van der Waals" -#: ../programs/table/gchemtable-curve.cc:295 -#: ../programs/table/gchemtable-curve.cc:299 +#: ../programs/table/gchemtable-curve.cc:436 +#: ../programs/table/gchemtable-curve.cc:440 msgid "Metallic radii" msgstr "Raggi metallici" -#: ../programs/table/gchemtable-curve.cc:310 -#: ../programs/table/gchemtable-curve.cc:314 +#: ../programs/table/gchemtable-curve.cc:451 +#: ../programs/table/gchemtable-curve.cc:455 msgid "Melting point" msgstr "" -#: ../programs/table/gchemtable-curve.cc:325 -#: ../programs/table/gchemtable-curve.cc:329 +#: ../programs/table/gchemtable-curve.cc:466 +#: ../programs/table/gchemtable-curve.cc:470 msgid "Boiling point" msgstr "" -#: ../programs/table/gchemtable.desktop.in.h:1 +#: ../programs/table/gchemtable-curve.cc:485 +#: ../programs/table/gchemtable-data.cc:522 +#, fuzzy +msgid "Atomic number" +msgstr "Numero atomico:" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +#, fuzzy +msgid "Invalide data" +msgstr "Carattere non valido" + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +#, fuzzy +msgid "None" +msgstr "Neon" + +#: ../programs/table/gchemtable-data.cc:523 +#, fuzzy +msgid "Atomic mass" +msgstr "Numero atomico:" + +#: ../programs/table/gchemtable-data.cc:525 +#, fuzzy +msgid "First ionization energy" +msgstr "energia di ionizzazione" + +#: ../programs/table/gchemtable-data.cc:526 +#, fuzzy +msgid "Second ionization energy" +msgstr "energia di ionizzazione" + +#: ../programs/table/gchemtable-data.cc:527 +#, fuzzy +msgid "Third ionization energy" +msgstr "energia di ionizzazione" + +#: ../programs/table/gchemtable-data.cc:528 +#, fuzzy +msgid "Electronic affinity" +msgstr "Affinità elettronica" + +#: ../programs/table/gchemtable-data.cc:529 +#, fuzzy +msgid "Covalent radius" +msgstr "Raggi covalenti" + +#: ../programs/table/gchemtable-data.cc:530 +#, fuzzy +msgid "Van der Waals radius" +msgstr "Raggi di Van der Waals" + +#: ../programs/table/gchemtable-data.cc:531 +#, fuzzy +msgid "Metallic radius" +msgstr "Raggi metallici" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Fusion temperature" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Ebullition temperature" +msgstr "" + +#: ../programs/table/gchemtable.desktop.in.in.h:1 msgid "A Mendeleiev table of the chemical elements" msgstr "U tavola di Mendeleiev di elementi chimici" -#~ msgid "h" -#~ msgstr "h" +#: ../programs/table/gchemtable.desktop.in.in.h:2 +#, fuzzy +msgid "Periodic table of the elements @STABILITY_POSTFIX@" +msgstr "Tavola periodica degli elementi" + +#: ../templates/paint/haworth.xml.in.h:1 +#, fuzzy +msgid "Saccharides" +msgstr "Lantanidi" + +#: ../templates/paint/haworth.xml.in.h:2 +#, fuzzy +msgid "α-D-deoxyribofuranose" +msgstr "Deoassiguanosina" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:7 +#, fuzzy +msgid "β-D-deoxyribofuranose" +msgstr "Deoassiguanosina" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "Adenina" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "Adenosina" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "Alanina" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "Amminoacidi" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "Antracene" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "Arginina" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "Idrocarburi aromatici" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "Asparagina" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "Acido aspartico" -#~ msgid "k" -#~ msgstr "k" +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "Azulene" -#~ msgid "l" -#~ msgstr "l" +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "Benzene" -#~ msgid "x1" -#~ msgstr "x1" +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "Cisteina" -#~ msgid "y1" -#~ msgstr "y1" +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "Citidina" -#~ msgid "z1" -#~ msgstr "z1" +#: ../templates/paint/templates.xml.in.h:14 +msgid "Cytosine" +msgstr "Citosina" -#~ msgid "x2" -#~ msgstr "x2" +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "Deossiadenosina" -#~ msgid "y2" -#~ msgstr "y2" +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "Deoassicitidina" -#~ msgid "z2" -#~ msgstr "z2" +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "Deoassiguanosina" -#~ msgid "Bottom" -#~ msgstr "In giù" +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "Deossitimidina" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "Acido glutammico" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "Glutammina" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "Glicina" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "Guanina" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "Guanosina" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "Istidina" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "Isoleucina" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "Leucina" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "Lisina" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "Metionina" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "Naftalene" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "Basi nucleiche" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "Nucleosidi" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "Fenantrene" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "Fenilalanina" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "Prolina" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "Pirene" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "Serina" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "Treonina" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "Timina" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "Triptofano" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "Tirosina" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "Uracile" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "Uridina" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "Valina" #~ msgid "Documents" #~ msgstr "Documenti" @@ -1913,12 +5090,6 @@ #~ msgid "Notebook tab position:" #~ msgstr "Posizione della linguetta del notebook:" -#~ msgid "Other" -#~ msgstr "Altro" - -#~ msgid "Preferences" -#~ msgstr "Preferenze" - #~ msgid "Right" #~ msgstr "Destra" @@ -1928,15 +5099,9 @@ #~ msgid "View settings" #~ msgstr "Impostazioni della vista" -#~ msgid "Covalent" -#~ msgstr "Covalente" - #~ msgid "Ionic" #~ msgstr "Ionico" -#~ msgid "Metallic" -#~ msgstr "Metallico" - #~ msgid "Van der Waals" #~ msgstr "Van der Waals" @@ -1946,15 +5111,6 @@ #~ msgid "Unknown display mode" #~ msgstr "Modalità di visualizzazione sconosciuta" -#~ msgid "Usage: gchemcalc-unstable [OPTION...] [formula]" -#~ msgstr "Uso: gchemcalc-unstable [OPZIONE...] [formula]" - -#~ msgid "Chemical calculator (unstable)" -#~ msgstr "Calcolatore chimico (instabile)" - -#~ msgid "Notebook tabs position" -#~ msgstr "Posizione delle linguette del notebook" - #~ msgid "" #~ "Whether to display or not the notebook tabs and where. Possible values " #~ "are: 0: hide, 1: left, 2: right, 3: top, and 4:bottom." @@ -2001,5 +5157,197 @@ #~ msgid "Export model as a VRML file..." #~ msgstr "Esporta il modello come file VRML..." -#~ msgid "Periodic table of the elements (unstable)" -#~ msgstr "Tavola periodica degli elementi (instabile)" +#~ msgid "GChemPaint component" +#~ msgstr "Componente di GChemPaint" + +#~ msgid "GChemPaint component to draw 2D chemical formulas" +#~ msgstr "Componente di GChemPaint per disegnare formule chimiche 2D" + +#~ msgid "GChemPaint control" +#~ msgstr "Controllo di GChemPaint" + +#~ msgid "GChemPaint control to display 2D chemical formulas" +#~ msgstr "Controllo di GChemPaint per mostrare formule chimiche 2D" + +#~ msgid "GChemPaint document" +#~ msgstr "Documento di GChemPaint" + +#~ msgid "GChemPaint embeddable factory" +#~ msgstr "Fabbrica integrabile di GChemPaint" + +#~ msgid "(C) 2001-2005 by Jean Bréfort" +#~ msgstr "(C) 2001-2005 by Jean Bréfort" + +#~ msgid "Type a number between %g and %g" +#~ msgstr "Immetti un numero tra %g e %g" + +#~ msgid "Sorry, not yet implemented!" +#~ msgstr "Spiacente: non è stato ancora implementato!" + +#~ msgid "GChemPaint help contents" +#~ msgstr "Contenuti della guida di GChemPaint" + +#~ msgid "Editable file flag" +#~ msgstr "Attributo modificabile del file" + +#~ msgid "Paste the clipborad" +#~ msgstr "Incolla dagli appunti" + +#~ msgid "_Save All" +#~ msgstr "_Salva tutto" + +#~ msgid "Save all open files" +#~ msgstr "Salva tutti i file aperti" + +#~ msgid "_Close All" +#~ msgstr "_Chiudi tutto" + +#~ msgid "Close all open files" +#~ msgstr "Chiudi tutti i file aperti" + +#~ msgid "_Periodic table" +#~ msgstr "_Tavola periodica" + +#~ msgid "Reversible reaction arrows heads" +#~ msgstr "Punte delle frecce della reazione reversibile" + +#~ msgid "Tools Options" +#~ msgstr "Opzioni degli strumenti" + +#~ msgid "GChemPaint Templates" +#~ msgstr "Modelli di GChemPaint" + +#~ msgid "Arrows toolbar" +#~ msgstr "Barra degli strumenti delle frecce" + +#~ msgid "Double arrow tool" +#~ msgstr "Pulsante della doppia freccia" + +#~ msgid "Electron pair move arrow tool" +#~ msgstr "Pulsante della freccia del movimento di una coppia di elettroni" + +#~ msgid "Mesomery arrow tool" +#~ msgstr "Pulsante della freccia mesomera" + +#~ msgid "Retrosynthesis arrow tool" +#~ msgstr "Pulsante della freccia della retrosintesi" + +#~ msgid "Simple arrow tool" +#~ msgstr "Pulsante della freccia semplice" + +#~ msgid "Single electron move arrow tool" +#~ msgstr "Pulsante della freccia del movimento del singolo elettrone" + +#~ msgid "Atoms toolbar" +#~ msgstr "Barra degli strumenti degli atomi" + +#~ msgid "Element tool" +#~ msgstr "Pulsante dell'elemento" + +#~ msgid "Negative Charge tool" +#~ msgstr "Pulsante della carica negativa" + +#~ msgid "Positive Charge tool" +#~ msgstr "Pulsante della carica positiva" + +#~ msgid "Bond tool" +#~ msgstr "Pulsante di legame" + +#~ msgid "Bonds toolbar" +#~ msgstr "Barra degli strumenti dei legami" + +#~ msgid "Delocalized bonds" +#~ msgstr "Legami delocalizzati" + +#~ msgid "Hash bond" +#~ msgstr "Legame all'indietro" + +#~ msgid "Squiggle bond" +#~ msgstr "Legame indeterminato" + +#~ msgid "Wedge bond" +#~ msgstr "Legame in avanti" + +#~ msgid "Cycles toolbar" +#~ msgstr "Barra degli strumenti dei cicli" + +#~ msgid "Eraser tool" +#~ msgstr "Pulsante del cancellino" + +#~ msgid "Horizontal flip tool" +#~ msgstr "Pulsante per il ribaltamento orizzontale" + +#~ msgid "Merge molecules tool" +#~ msgstr "Pulsante dell'aggregazione di molecole" + +#~ msgid "Selection" +#~ msgstr "Selezione" + +#~ msgid "Selection tool" +#~ msgstr "Pulsante di selezione" + +#~ msgid "Selection toolbar" +#~ msgstr "Barra degli strumenti di selezione" + +#~ msgid "Vertical flip tool" +#~ msgstr "Pulsante per il ribaltamento verticale" + +#~ msgid "Change current template" +#~ msgstr "Cambia il modello corrente" + +#~ msgid "Templates selector" +#~ msgstr "Selettore dei modelli" + +#~ msgid "Templates tool" +#~ msgstr "Pulsante dei modelli" + +#~ msgid "Templates toolbar" +#~ msgstr "Barra degli strumenti dei modelli" + +#~ msgid "Bold" +#~ msgstr "Grassetto" + +#~ msgid "Fragment" +#~ msgstr "Frammento" + +#~ msgid "Fragment tool" +#~ msgstr "Pulsante del frammento" + +#~ msgid "Italic" +#~ msgstr "Italico" + +#~ msgid "Subscript" +#~ msgstr "Sottoscritto" + +#~ msgid "Superscript" +#~ msgstr "Soprascritto" + +#~ msgid "Text tool" +#~ msgstr "Pulsante di testo" + +#~ msgid "Text toolbar" +#~ msgstr "Barra degli strumenti di testo" + +#~ msgid "About GChemPaint..." +#~ msgstr "Riguardo a GChemPaint..." + +#~ msgid "Displays copyright and contributors of GChemPaint" +#~ msgstr "Mostra i diritti d'autore e i collaboratori di GChemPaint" + +#~ msgid "Edit file propeties" +#~ msgstr "Modifica le proprietà del file" + +#~ msgid "GChemPaint T_ools" +#~ msgstr "S_trumenti di GChemPaint" + +#~ msgid "Print file to the printer" +#~ msgstr "Invia il file alla stampante" + +#~ msgid "Proper_ties" +#~ msgstr "Propri_età" + +#~ msgid "Show tools window" +#~ msgstr "Mostra la finestra degli strumenti" + +#~ msgid "_Print" +#~ msgstr "_Stampa" diff -Nru gnome-chemistry-utils-0.8.6/po/LINGUAS gnome-chemistry-utils-0.10.9/po/LINGUAS --- gnome-chemistry-utils-0.8.6/po/LINGUAS 2007-10-25 07:07:22.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/LINGUAS 2009-11-14 11:30:40.000000000 +0100 @@ -7,3 +7,5 @@ pl pt_BR ru +zh_CN +zh_TW diff -Nru gnome-chemistry-utils-0.8.6/po/Makefile.in.in gnome-chemistry-utils-0.10.9/po/Makefile.in.in --- gnome-chemistry-utils-0.8.6/po/Makefile.in.in 2007-12-17 22:02:38.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/po/Makefile.in.in 2009-05-10 09:00:52.000000000 +0200 @@ -1,10 +1,10 @@ # Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# Copyright (C) 2004-2008 Rodney Dawes # -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License +# This file may be copied and used freely without restrictions. It may +# be used in projects which are not available under a GNU Public License, # but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ @@ -12,7 +12,7 @@ # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # -# - Modified by Rodney Dawes for use with intltool +# - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE @@ -21,7 +21,7 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ -SHELL = /bin/sh +SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -54,16 +54,16 @@ ALL_LINGUAS = @ALL_LINGUAS@ -PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi) +PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) -USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi) +USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) -USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) +USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) -POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) +POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) -DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES) -EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS +DISTFILES = Makefile.in.in POTFILES.in $(POFILES) +EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out @@ -101,7 +101,6 @@ install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all - $(mkdir_p) $(DESTDIR)$(itlocaledir) linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ diff -Nru gnome-chemistry-utils-0.8.6/po/pl.po gnome-chemistry-utils-0.10.9/po/pl.po --- gnome-chemistry-utils-0.8.6/po/pl.po 2007-05-10 20:08:53.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/pl.po 2009-11-14 11:30:40.000000000 +0100 @@ -6,27 +6,202 @@ # # Michał Sałaban , 2003. # Nikodem Kuznik , 2004. -# Julian Sikorski , 2006, 2007. +# Julian Sikorski , 2006, 2007, 2008. msgid "" msgstr "" "Project-Id-Version: pl\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-05-10 10:39+0100\n" -"PO-Revision-Date: 2007-05-09 13:23+0100\n" +"POT-Creation-Date: 2008-09-18 12:18+0200\n" +"PO-Revision-Date: 2008-09-18 12:26+0200\n" "Last-Translator: Julian Sikorski \n" -"Language-Team: Polish \n" +"Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%" -"100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%X-Generator: " +"Lokalize 0.2\n" +"X-Generator: Lokalize 0.2\n" + +#: ../gchemutils.schemas.in.h:1 +msgid "Default Bottom Margin" +msgstr "Domyślny dolny margines" + +#: ../gchemutils.schemas.in.h:2 +msgid "Default Left Margin" +msgstr "Domyślny lewy margines" + +#: ../gchemutils.schemas.in.h:3 +msgid "Default Top Margin" +msgstr "Domyślny górny margines" + +#: ../gchemutils.schemas.in.h:4 +msgid "Default Top Outside Margin" +msgstr "Domyślny zewnętrzny górny margines" + +#: ../gchemutils.schemas.in.h:5 +msgid "Footer height" +msgstr "Wysokość stopki" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "Renderowanie pozaekranowe" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "Papier" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "Preferowana jednostka wyświetlania" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "To jest domyślna orientacja papieru." -#: ../gchemutils.xml.in.h:1 ../programs/crystal/x-gcrystal.desktop.in.h:1 +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" +"To jest domyślna specyfikacja papieru jak iso_a4 lub na_letter, czyli nazwa " +"papieru PWG 5101.1-2002." + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "" +"Ten ciąg określa domyślną jednostkę używaną w oknie dialogowym ustawień " +"strony." + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "Ta wartość określa domyślną wysokość stopki w punktach drukarskich." + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "Ta wartość określa domyślną wysokość nagłówka w punktach drukarskich." + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" +"Ta wartość określa domyślną odległość w punktach drukarskich od dołu strony " +"do końca tekstu. " + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" +"Ta wartość określa domyślną odległość w punktach drukarskich od lewej " +"krawędzi strony do lewego brzegu tekstu. " + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" +"Ta wartość określa domyślną odległość w punktach drukarskich od prawej " +"krawędzi strony do prawego brzegu tekstu. " + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" +"Ta wartość określa domyślną odległość w punktach drukarskich od góry strony " +"do początku tekstu. " + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" +"Czy używać renderowania pozaekranowego podczas drukowania lub eksportowania " +"obrazu. Włączenie może prowadzić do wywrotki z niektórymi sterownikami karty " +"graficznej." + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +msgid "2D Chemical structure" +msgstr "Dwuwymiarowe strukturalne wzory chemiczne" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 msgid "Crystalline structure model" msgstr "Model struktury krystalicznej" -#: ../glade/gchemcalc.glade.h:1 ../programs/calc/gchemcalc.desktop.in.h:2 +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "Acetyl" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "Alkil" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "Aryl" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "Benzoil" + +#: ../database/residues.xml.in.h:5 +msgid "Benzyl" +msgstr "Benzyl" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "Butyl" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "Etyl" + +#: ../database/residues.xml.in.h:8 +msgid "Halogen" +msgstr "Halogen" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "Izobutyl" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "Izopropyl" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "Mesyl" + +#: ../database/residues.xml.in.h:12 +msgid "Metal" +msgstr "Metal" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "Metyl" + +#: ../database/residues.xml.in.h:14 +msgid "Phenyl" +msgstr "Fenyl" + +#: ../database/residues.xml.in.h:15 +msgid "Propyl" +msgstr "Propyl" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "Tosyl" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "Triflyl" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "sec-Butyl" + +#: ../glade/gchemcalc.glade.h:1 msgid "Chemical calculator" msgstr "Kalkulator chemiczny" @@ -34,7 +209,7 @@ msgid "Composition" msgstr "Skład" -#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:166 +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 msgid "Formula:" msgstr "Wzór:" @@ -50,7 +225,7 @@ msgid "Monoisotopic mass:" msgstr "Masa monoizotopowa:" -#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:169 +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 msgid "Raw formula:" msgstr "Surowy wzór:" @@ -74,6 +249,152 @@ msgid "Image resolution:" msgstr "Rozdzielczość obrazu:" +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "% normalnego rozmiaru" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "Wyśrodkuj na stronie" + +#: ../glade/print-setup.glade.h:4 +msgid "O_rientation:" +msgstr "O_rientacja:" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "Papier:" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "Skalowanie" + +#: ../glade/print-setup.glade.h:7 +msgid "Bottom margin:" +msgstr "Dolny margines:" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "Zmień rodzaj papieru" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "Konfiguruj" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "Numer _pierwszej strony:" + +#: ../glade/print-setup.glade.h:11 +msgid "Footer:" +msgstr "Stopka:" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "Nagłówek" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "Nagłówki i stopki" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "Pozioma" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "Lewy margines" + +#: ../glade/print-setup.glade.h:16 +msgid "Page" +msgstr "Strona" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "Ustawienia strony" + +#: ../glade/print-setup.glade.h:18 +msgid "Portrait" +msgstr "Pionowa" + +#: ../glade/print-setup.glade.h:19 +msgid "Reload defaults" +msgstr "Przywróć domyślne" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "Odwrócona pozioma" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "Odwrócona pionowa" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "Prawy margines" + +#: ../glade/print-setup.glade.h:23 +msgid "Save as defaults" +msgstr "Zapisz jako domyślne" + +#: ../glade/print-setup.glade.h:24 +msgid "Scale" +msgstr "Skalowanie" + +#: ../glade/print-setup.glade.h:25 +msgid "Scale to fit _horizontally on" +msgstr "Skaluj aby zmieścić w poziomie na" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "Skaluj aby zmieścić w pio_nie na" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "Górny margines:" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "Jednostka:" + +#: ../glade/print-setup.glade.h:29 +msgid "_Automatic scaling:" +msgstr "Skalowanie _automatyczne" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "Skalowanie _ustalone" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "_Stopka:" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "_Nagłówek:" + +#: ../glade/print-setup.glade.h:33 +msgid "_Horizontally" +msgstr "W po_ziomie" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "_Nie skaluj" + +#: ../glade/print-setup.glade.h:35 +msgid "_Vertically" +msgstr "W pio_nie" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "stronach" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:407 +#: ../libs/gcp/preferences.cc:481 ../libs/gcp/preferences.cc:531 +msgid "Bonds" +msgstr "Wiązania" + #: ../glade/crystal/cell.glade.h:1 msgid "Cell" msgstr "Komórka" @@ -84,7 +405,7 @@ #: ../glade/crystal/cell.glade.h:3 msgid "Lattice:" -msgstr "" +msgstr "Sieć:" #: ../glade/crystal/cell.glade.h:4 msgid "" @@ -103,6 +424,20 @@ "Base-centered monoclinic\n" "Triclinic" msgstr "" +"Regularna prymitywna\n" +"Regularna przestrzennie centrowana\n" +"Regularna ściennie centrowana\n" +"Heksagonalna\n" +"Tetragonalna\n" +"Tetragonalna przestrzennie centrowana\n" +"Rombowa\n" +"Rombowa dwustronnie centrowana\n" +"Rombowa przestrzennie centrowana\n" +"Rombowa ściennie centrowana\n" +"Romboedryczna\n" +"Jednoskośna\n" +"Jednoskośna dwustronnie centrowana\n" +"Trójskośna" #: ../glade/crystal/cell.glade.h:18 msgid "a (pm): " @@ -128,6 +463,42 @@ msgid "γ (°):" msgstr "γ (°):" +#: ../glade/crystal/docprop.glade.h:1 ../glade/paint/docprop.glade.h:1 +msgid "Author:" +msgstr "Autor:" + +#: ../glade/crystal/docprop.glade.h:2 ../glade/paint/docprop.glade.h:2 +msgid "History" +msgstr "Historia" + +#: ../glade/crystal/docprop.glade.h:3 ../glade/paint/docprop.glade.h:4 +msgid "_Comments:" +msgstr "_Komentarze:" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "Data utworzenia:" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "Właściwości dokumentu" + +#: ../glade/crystal/docprop.glade.h:6 ../glade/paint/docprop.glade.h:7 +msgid "E-_mail:" +msgstr "E-_mail:" + +#: ../glade/crystal/docprop.glade.h:7 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "Ostatnia zmiana:" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:10 +msgid "_Name:" +msgstr "Imię i _nazwisko:" + +#: ../glade/crystal/docprop.glade.h:9 ../glade/paint/docprop.glade.h:11 +msgid "_Title:" +msgstr "_Tytuł:" + #: ../glade/crystal/prefs.glade.h:1 msgid "" "300\n" @@ -172,7 +543,7 @@ msgstr "Kąty Eulera" #: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 -msgid "Field of view (between 1° and 45°):" +msgid "Field of view (between 1 and 45°):" msgstr "Kąt widzenia (pomiędzy 1° a 45°):" #: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 @@ -200,41 +571,59 @@ msgstr "ψ (°):" #: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "Zastosuj zmiany do:" + +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:395 +#: ../libs/gcp/preferences.cc:469 ../libs/gcp/preferences.cc:519 msgid "Atoms" msgstr "Atomy" -#: ../glade/crystal/atoms.glade.h:2 +#: ../glade/crystal/atoms.glade.h:3 msgid "Charge: " msgstr "Ładunek: " -#: ../glade/crystal/atoms.glade.h:3 +#: ../glade/crystal/atoms.glade.h:4 msgid "Custom" msgstr "Użytkownika" -#: ../glade/crystal/atoms.glade.h:4 +#: ../glade/crystal/atoms.glade.h:5 msgid "Custom color:" msgstr "Kolor użytkownika:" -#: ../glade/crystal/atoms.glade.h:5 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 #: ../glade/crystal/lines.glade.h:2 msgid "Dele_te all" msgstr "Usuń wszys_tkie" -#: ../glade/crystal/atoms.glade.h:6 ../gcu/gtkcomboperiodic.c:96 -#: ../programs/table/gchemtable-app.cc:252 -#: ../programs/table/gchemtable.desktop.in.h:2 +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:261 msgid "Periodic table of the elements" msgstr "Układ okresowy pierwiastków" -#: ../glade/crystal/atoms.glade.h:7 +#: ../glade/crystal/atoms.glade.h:8 msgid "Radius" msgstr "Promień" -#: ../glade/crystal/atoms.glade.h:8 +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "Współczynnik skali:" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" +"Wybrany pierwiastek\n" +"Wybrany atom\n" +"Wszystkie atomy" + +#: ../glade/crystal/atoms.glade.h:13 msgid "Type:" msgstr "Typ:" -#: ../glade/crystal/atoms.glade.h:9 +#: ../glade/crystal/atoms.glade.h:14 msgid "" "Unknown\n" "Ionic\n" @@ -248,23 +637,23 @@ "Kowalencyjny\n" "Van der Waalsa" -#: ../glade/crystal/atoms.glade.h:14 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/atoms.glade.h:19 +msgid "Value (pm):" +msgstr "Wartość (pm):" + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 #: ../glade/crystal/lines.glade.h:7 msgid "_Add" msgstr "_Dodaj" -#: ../glade/crystal/atoms.glade.h:15 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 #: ../glade/crystal/lines.glade.h:8 msgid "_Delete" msgstr "_Usuń" -#: ../glade/crystal/atoms.glade.h:16 -msgid "value (pm):" -msgstr "wartość (pm):" - #: ../glade/crystal/cleavages.glade.h:1 msgid "Cleavages" -msgstr "" +msgstr "Przekroje" #: ../glade/crystal/cleavages.glade.h:3 msgid "Fixed model size" @@ -272,11 +661,11 @@ #: ../glade/crystal/cleavages.glade.h:4 msgid "List of defined cleavages (h, k, and l are the Miller indices)" -msgstr "" +msgstr "Lista określonych przekroi (h, k oraz l są wskaźnikami Millera)" #: ../glade/crystal/lines.glade.h:1 msgid "Cell edges" -msgstr "" +msgstr "Krawędzie komórki" #: ../glade/crystal/lines.glade.h:3 msgid "Diagonals" @@ -288,7 +677,7 @@ #: ../glade/crystal/lines.glade.h:5 msgid "Medians" -msgstr "" +msgstr "Środkowe" #: ../glade/crystal/lines.glade.h:6 msgid "Other lines" @@ -303,6 +692,7 @@ msgstr "promień (pm):" #: ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 msgid "*" msgstr "*" @@ -312,7 +702,7 @@ #: ../glade/crystal/size.glade.h:3 msgid "Give minimum and maximum coordinates in cell units" -msgstr "" +msgstr "Podaj minimalne i maksymalne współrzędne w komórkach" #: ../glade/crystal/size.glade.h:4 msgid "Maximum" @@ -322,18 +712,320 @@ msgid "Minimum" msgstr "Minimum" -#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:143 +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 msgid "x" msgstr "x" -#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:153 +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 msgid "y" msgstr "y" -#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:163 +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 msgid "z" msgstr "z" +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" +msgstr "Obiekt powiązany ze strzałką" + +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" +msgstr "_Rola:" + +#: ../glade/paint/arrow-object.glade.h:3 +msgid "gtk-close" +msgstr "gtk-close" + +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +msgid "gtk-help" +msgstr "gtk-help" + +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "Motyw" + +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +msgid "Theme:" +msgstr "Motyw:" + +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1879 +msgid "Hydrogen atoms position" +msgstr "Położenie atomów wodoru" + +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" +msgstr "" +"Z lewej\n" +"Z prawej\n" +"Na górze\n" +"Na dole\n" +"Automatyczne" + +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" +msgstr "Nowy plik z motywem" + +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "gtk-apply" + +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" +msgstr "gtk-cancel" + +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" +msgstr "Groty strzałek" + +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" +msgstr "Zwykłe wiązania" + +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" +msgstr "Wiązania stereochemiczne" + +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "Motywy" + +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "A:" + +#: ../glade/paint/preferences.glade.h:6 +msgid "Angl_e:" +msgstr "_Kąt:" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "Grubość linii strzałki (w pikselach)." + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "B:" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "Grubość linii wiązania (w pikselach)." + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "C:" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "Rozmiar _znaku ładunku:" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "Domyślny _poziom kompresji dla plików GChemPainta:" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "Domyślny kąt pomiędzy dwoma kolejnymi wiązaniami w łańcuchu." + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "Domyślna długość strzałki (w pm, tak samo jak długość wiązania)." + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "Domyślna długość wiązania (pm)." + +#: ../glade/paint/preferences.glade.h:16 +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" +"Domyślny odstęp pomiędzy obiektami dodawany podczas operacji wyrównywania, w " +"pikselach." + +#: ../glade/paint/preferences.glade.h:17 +msgid "Dist_ance:" +msgstr "Odle_głość:" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "Odległość między liniami klina przerywanego, w pikselach." + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" +"Odległość pomiędzy dwiema liniami reprezentującymi wiązanie wielokrotne, w " +"pikselach." + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" +"Odległość między dwiema równoległymi liniami, w pikselach (albo dwiema " +"strzałkami czy też jednej strzałki z dwiema liniami)." + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "" +"Odległość pomiędzy punktem początkowym grota strzałki a punktem, którym " +"łączy się z osią, w pikselach." + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" +"Odległość pomiędzy punktem początkowym a punktami końcowymi grota strzałki, " +"mierzona wzdłuż osi w pikselach." + +#: ../glade/paint/preferences.glade.h:23 +msgid "Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "" +"Odległość pomiędzy punktami końcowymi grota strzałki a brzegiem osi, w " +"pikselach." + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" +"Dodatkowy odstęp pomiędzy współczynnikiem stechiometrycznym a powiązaną z " +"nim cząsteczką, w pikselach." + +#: ../glade/paint/preferences.glade.h:25 +msgid "GChemPaint Preferences" +msgstr "Preferencje GChemPaint" + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "O_gólne odstępy:" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "Gru_bość linii:" + +#: ../glade/paint/preferences.glade.h:28 +msgid "Ha_ve a tearable table of the elements" +msgstr "Układ okresowy daje się o_derwać" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "_Długość:" + +#: ../glade/paint/preferences.glade.h:30 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "N_ame:" +msgstr "_Nazwa:" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "Odstęp dodawany na każdym końcu strzałki (w pikselach)." + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" +"Odstęp pomiędzy znakiem '+' w równaniu reakcji a symbolami reagentów w " +"pikselach." + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" +"Odstęp używany wokoło obiektów tekstowych takich jak atomy, teksty i inne " +"znaki typograficzne, w pikselach." + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" +"Skala używana do konwersji rozmiaru rzeczywistego do rozmiaru na płótnie " +"wyrażona w pm na piksel." + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "Odstępy _znaków:" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "Rozmiar znaku ładunku, w pikselach." + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "Odstępy _stechiometrii:" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "S_zerokość" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "Szerokość na największym końcu, w pikselach." + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "Grubość linii tworzących klin przerywany, w pikselach." + +#: ../glade/paint/preferences.glade.h:41 +msgid "_Default theme:" +msgstr "_Domyślny motyw:" + +#: ../glade/paint/preferences.glade.h:42 +msgid "_Distance:" +msgstr "D_ystans:" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "Odstępy o_biektów:" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "_Odstępy:" + +#: ../glade/paint/preferences.glade.h:45 +msgid "_Scale:" +msgstr "S_kala:" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "_Szerokość:" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "_Bieżący pierwiastek:" + +#: ../glade/paint/zoom.glade.h:1 +msgid "Zoom" +msgstr "Powiększenie" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "Współczynnik powiększenia (%):" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr " Zasadowe " + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr " Obojętne " + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr " Amfoteryczne " + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr " Kwasowe " + #: ../glade/table/eltpage.glade.h:1 msgid "1:" msgstr "1:" @@ -394,7 +1086,7 @@ msgid "Radii" msgstr "Promienie" -#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:133 +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 msgid "Show curve" msgstr "Pokaż krzywą" @@ -422,6 +1114,10 @@ msgid "Temperature (K):" msgstr "Temperatura (K):" +#: ../glade/table/curve.glade.h:1 +msgid "GChemTable Graph" +msgstr "Wykres GChemTable" + #: ../glade/table/family.glade.h:1 msgid "" "All\n" @@ -450,6 +1146,38 @@ msgid "Selected Family:" msgstr "Wybrana rodzina:" +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" +" blok s " + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" +" blok d " + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" +" blok p " + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" +" blok f " + #: ../database/elements.xml.in.h:1 msgid "Actinium" msgstr "Aktyn" @@ -926,419 +1654,2100 @@ msgid "tritium" msgstr "tryt" -#: ../gcu/application.cc:181 +#: ../goffice/plugin.xml.in.h:1 +msgid "2D Chemical Structures Viewer/Editor" +msgstr "Przeglądarka/Edytor dwuwymiarowych struktur chemicznych" + +#: ../goffice/plugin.xml.in.h:2 +msgid "Chemical structures" +msgstr "Wzory strukturalne" + +#: ../goffice/plugin.xml.in.h:3 +msgid "Chemical structures component engine" +msgstr "Silnik składnika wzorów strukturalnych" + +#: ../goffice/plugin.xml.in.h:4 +msgid "Component : GChemPaint" +msgstr "Składnik : GChemPaint" + +#: ../goffice/gogcpapp.cc:182 ../programs/paint/standaloneapp.cc:46 #, c-format -msgid "(screen resolution is %u)" -msgstr "(rozdzielczość ekranu to %u)" +msgid "Untitled %d" +msgstr "Bez_nazwy %d" -#: ../gcu/crystaldoc.cc:403 -msgid "Everything has been cleaved" -msgstr "Wszystko zostało odcięte" +#: ../goffice/gogcpwin.cc:88 +msgid "Embedded GChemPaint Object" +msgstr "Osadzony obiekt GChemPaint" + +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" +msgstr "Układ" + +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" +msgstr "Układ pango" + +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" +msgstr "X" + +#: ../libs/canvas/gcp-canvas-pango.c:376 +msgid "X position" +msgstr "Pozycja X" + +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" +msgstr "Y" + +#: ../libs/canvas/gcp-canvas-pango.c:384 +msgid "Y position" +msgstr "Pozycja y" + +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" +msgstr "Szerokość" + +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" +msgstr "Szerokość pola tekstowego" + +#: ../libs/canvas/gcp-canvas-pango.c:399 +msgid "Height" +msgstr "Wysokość" + +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "Wysokość pola tekstowego" + +#: ../libs/canvas/gcp-canvas-pango.c:407 +msgid "Anchor" +msgstr "Kotwica" + +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "Punkt zakotwiczenia dla tekstu" + +#: ../libs/canvas/gcp-canvas-pango.c:416 +msgid "Color" +msgstr "Kolor" + +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" +msgstr "Kolor tekstu, jako ciąg znaków" + +#: ../libs/canvas/gcp-canvas-pango.c:424 +msgid "Editing" +msgstr "Edytowanie" + +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" +msgstr "Czy ten tekst sformatowany jest obecnie edytowany?" -#: ../gcu/dialog.cc:125 -msgid "Type a number" -msgstr "Wpisz liczbę" +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:145 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:363 +msgid "translator_credits" +msgstr "" +"Julian Sikorski\n" +"Nikodem Kuznik\n" +"Michał Sałaban" -#: ../gcu/dialog.cc:134 -#, c-format -msgid "Type a number greater than or equal %g and lower than to %g" -msgstr "Wpisz liczbę większą lub równą %g i mniejszą niż %g" +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "GChemPaint jest edytorem dwuwymiarowych wzorów chemicznych dla Gnome" + +#: ../libs/gcp/about.cc:56 +msgid "Copyright © 2001-2008 by Jean Bréfort" +msgstr "Prawa autorskie © 2001-2008 Jean Bréfort" + +#: ../libs/gcp/application.cc:303 +msgid "Create a new reaction" +msgstr "Utwórz nową reakcję" + +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" +msgstr "Utwórz nowe struktury mezomeryczne" -#: ../gcu/dialog.cc:144 -#, c-format -msgid "Type a number greater than %g and lower than or equal to %g" -msgstr "Wpisz liczbę większą %g i mniejszą niż lub równą %g" +#: ../libs/gcp/application.cc:504 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" +"Podaj nazwę pliku,\n" +"nie katalogu" -#: ../gcu/dialog.cc:154 +#: ../libs/gcp/application.cc:546 #, c-format -msgid "Type a number between %g and %g, the limits are valid." -msgstr "Wpisz liczbę pomiędzy%g a %g włącznie." +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "" +"Przykro mi, format %s nieobsługiwany!\n" +"Nie udało się załadować %s." -#: ../gcu/dialog.cc:164 +#: ../libs/gcp/application.cc:575 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 #, c-format -msgid "Type a number greater than %g and lower than %g" -msgstr "Wpisz liczbę większą niż %g i mniejszą niż %g" +msgid "" +"File %s\n" +"exists, overwrite?" +msgstr "" +"Plik %s\n" +"istnieje, nadpisać?" -#: ../gcu/dialog.cc:174 +#: ../libs/gcp/application.cc:588 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 #, c-format -msgid "Type a number lower than %g" -msgstr "Wpisz liczbę mniejszą niż %g" +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" +"Błąd podczas przetwarzania %s:\n" +"%s" -#: ../gcu/dialog.cc:184 -#, c-format -msgid "Type a number greater than %g" -msgstr "Wpisz liczbę większą niż %g" +#: ../libs/gcp/application.cc:796 ../libs/gcp/application.cc:924 +msgid "No filename" +msgstr "Brak nazwy pliku" -#: ../gcu/dialog.cc:194 +#: ../libs/gcp/application.cc:799 #, c-format -msgid "Type a number lower than or equal to %g" -msgstr "Wpisz liczbę mniejszą niż lub równą %g" +msgid "" +"Could not open file\n" +"%s" +msgstr "" +"Nie można otworzyć pliku\n" +"%s" -#: ../gcu/dialog.cc:204 +#: ../libs/gcp/application.cc:802 ../libs/gcp/application.cc:936 #, c-format -msgid "Type a number greater than or equal to %g" -msgstr "Wpisz liczbę większą niż lub równą %g" - -#: ../gcu/element.cc:99 -msgid "German" -msgstr "Niemiecki" +msgid "%s: parse error." +msgstr "%s: błąd przetwarzania." -#: ../gcu/element.cc:100 -msgid "French" -msgstr "Francuski" +#: ../libs/gcp/application.cc:927 ../programs/crystal/document.cc:316 +#, c-format +msgid "" +"Could not load file\n" +"%s" +msgstr "" +"Nie można wczytać pliku\n" +"%s" -#: ../gcu/element.cc:101 -msgid "Italian" -msgstr "Włoski" +#: ../libs/gcp/application.cc:930 ../programs/crystal/document.cc:319 +#, c-format +msgid "" +"%s: invalid xml file.\n" +"Tree is empty?" +msgstr "" +"%s: nieprawidłowy plik xml. \n" +"Drzewo jest puste?" -#: ../gcu/element.cc:102 -msgid "Polish" -msgstr "Polski" +#: ../libs/gcp/application.cc:933 ../programs/crystal/document.cc:322 +#, c-format +msgid "%s: invalid file format." +msgstr "%s: nieprawidłowy format pliku." -#: ../gcu/element.cc:103 -msgid "Russian" -msgstr "Rosyjski" +#: ../libs/gcp/application.cc:968 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 +msgid "Save as image" +msgstr "Zapisz jako obraz" -#: ../gcu/element.cc:106 -msgid "Can't find and read elements.xml" -msgstr "Nie można odnaleźć i odczytać elements.xml" +#: ../libs/gcp/atom.cc:1861 ../libs/gcp/atom.cc:1875 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "Atom" -#: ../gcu/element.cc:111 ../gcu/element.cc:118 -msgid "Incorrect file format: elements.xml" -msgstr "NIeprawidłowy format pliku: elements.xml" +#: ../libs/gcp/atom.cc:1864 +msgid "Display symbol" +msgstr "Wyświetlaj symbol" + +#: ../libs/gcp/atom.cc:1864 +msgid "Whether to display carbon atom symbol or not" +msgstr "Wyświetlać symbol atomu węgla czy nie" + +#: ../libs/gcp/bond.cc:980 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "Wiązanie" + +#: ../libs/gcp/bond.cc:984 +msgid "Move to back" +msgstr "Przesuń do tyłu" + +#: ../libs/gcp/bond.cc:991 +msgid "Bring to front" +msgstr "Przesuń na przód" + +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +#: ../programs/crystal/docprop.cc:109 ../programs/crystal/docprop.cc:116 +msgid "%A, %B %d, %Y" +msgstr "%A %B %d, %Y" -#: ../gcu/element.cc:151 -msgid "English" -msgstr "Angielski" +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:148 +msgid "Family" +msgstr "Rodzina" -#: ../gcu/element.cc:430 -msgid "Can't find and read radii.xml" -msgstr "Nie można odnaleźć i odczytać radii.xml" +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "Rodzina czcionek" + +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "Styl" + +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "Styl czcionki (normalny, pochyły lub kursywa)" + +#: ../libs/gcp/fontsel.cc:296 +msgid "Weight" +msgstr "Ciężar" + +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "Ciężar czcionki" + +#: ../libs/gcp/fontsel.cc:301 +msgid "Variant" +msgstr "Wariant" + +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" +msgstr "Wariant czcionki" + +#: ../libs/gcp/fontsel.cc:306 +msgid "Stretch" +msgstr "Rozciągnięcie" + +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" +msgstr "Rozciągnięcie czcionki (sciśnięte, normalne lub rozszerzone)" + +#: ../libs/gcp/fontsel.cc:311 +msgid "Size" +msgstr "Rozmiar" + +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" +msgstr "Rozmiar czcionki (w jednostkach pango)" + +#: ../libs/gcp/fragment.cc:709 ../libs/gcp/fragment.cc:1233 +msgid "Invalid charge." +msgstr "Nieprawidłowy ładunek." + +#: ../libs/gcp/fragment.cc:1206 +msgid "Invalid symbol." +msgstr "Nieprawidłowy symbol." + +#: ../libs/gcp/mesomer.cc:76 +msgid "Only one arrow can link two given mesomers." +msgstr "Tylko jedna strzałka może łączyć dwa dane mezomery." + +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "Stało się coś złego, proszę zgłosić raport o błędzie" + +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "Nie ma miejsca pomiędzy cząsteczką a strzałką!" + +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "Samotne strzałki nie są dozwolone!" -#: ../gcu/element.cc:435 ../gcu/element.cc:446 -msgid "Incorrect file format: radii.xml" -msgstr "NIeprawidłowy format pliku: radii.xml" +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." +msgstr "" +"Samotna cząsteczka!\n" +" Proszę dodać brakujące strzałki." -#: ../gcu/element.cc:530 -msgid "Can't find and read elecprops.xml" -msgstr "Nie można odnaleźć i odczytać elecprops.xml" +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "Proszę dodać brakujące strzałki." + +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" +msgstr "Zniszcz zależność mezomeryczną" + +#: ../libs/gcp/molecule.cc:515 +msgid "Molecule" +msgstr "Cząsteczka" + +#: ../libs/gcp/molecule.cc:520 +msgid "Export molecule to Ghemical" +msgstr "Wyeksportuj cząsteczkę do Ghemical" + +#: ../libs/gcp/molecule.cc:527 +msgid "Generate InChI" +msgstr "Wygeneruj InChI" + +#: ../libs/gcp/molecule.cc:532 +msgid "NIST WebBook page for this molecule" +msgstr "Strona NIST WebBook dla tej cząsteczki" + +#: ../libs/gcp/molecule.cc:537 +msgid "PubChem page for this molecule" +msgstr "Strona PubChem dla tej cząsteczki" + +#: ../libs/gcp/molecule.cc:543 +msgid "Generate SMILES" +msgstr "Wygeneruj SMILES" + +#: ../libs/gcp/molecule.cc:549 +msgid "Open in Calculator" +msgstr "Otwórz w Kalkulatorze" + +#: ../libs/gcp/molecule.cc:555 +msgid "Select alignment item" +msgstr "Wybierz element wyrównania" + +#: ../libs/gcp/preferences.cc:349 ../libs/gcp/preferences.cc:368 +#: ../libs/gcp/preferences.cc:497 ../libs/gcp/theme.cc:336 +#: ../libs/gcp/theme.cc:343 ../programs/table/gchemtable-app.cc:143 +msgid "Default" +msgstr "Domyślny" -#: ../gcu/element.cc:535 ../gcu/element.cc:540 -msgid "Incorrect file format: elecprops.xml" -msgstr "NIeprawidłowy format pliku: elecprops.xml" +#: ../libs/gcp/preferences.cc:389 ../libs/gcp/preferences.cc:458 +#: ../libs/gcp/preferences.cc:525 +msgid "General" +msgstr "Ogólne" + +#: ../libs/gcp/preferences.cc:399 ../libs/gcp/preferences.cc:473 +#: ../libs/gcp/preferences.cc:527 +msgid "Font" +msgstr "Czcionka" + +#: ../libs/gcp/preferences.cc:403 ../libs/gcp/preferences.cc:477 +#: ../libs/gcp/preferences.cc:529 +msgid "Other" +msgstr "Inne" + +#: ../libs/gcp/preferences.cc:411 ../libs/gcp/preferences.cc:485 +#: ../libs/gcp/preferences.cc:533 +msgid "Arrows" +msgstr "Strzałki" + +#: ../libs/gcp/preferences.cc:415 ../libs/gcp/preferences.cc:489 +#: ../libs/gcp/preferences.cc:535 ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "Tekst" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" +msgstr "Dodaj współczynnik stechiometryczny" -#: ../gcu/element.cc:688 -msgid "Can't find and read isotopes.xml" -msgstr "Nie można odnaleźć i odczytać isotopes.xml" +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" +"Błąd nie można stworzyć reakcji\n" +"z wybranych obiektów." -#: ../gcu/element.cc:693 ../gcu/element.cc:700 -msgid "Incorrect file format: isotopes.xml" -msgstr "Nieprawidłowy format pliku: isotopes.xml" +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "Zniszcz reakcję" + +#: ../libs/gcp/reaction-arrow.cc:380 +msgid "Arrow" +msgstr "Strzałka" + +#: ../libs/gcp/reaction-arrow.cc:386 +msgid "Attach selection to arrow..." +msgstr "Dołącz wybór do strzałki..." + +#: ../libs/gcp/reaction-prop.cc:39 +msgid "Unkown" +msgstr "Nieznana" + +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" +msgstr "Katalizator" + +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" +msgstr "Reagent" + +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "Produkt" + +#: ../libs/gcp/reaction-prop.cc:43 +msgid "Solvent" +msgstr "Rozpuszczalnik" + +#: ../libs/gcp/reaction-prop.cc:44 +msgid "Temperature" +msgstr "Temperatura" + +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" +msgstr "Ciśnienie" + +#: ../libs/gcp/reaction-prop.cc:46 +msgid "Time" +msgstr "Czas" + +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" +msgstr "Entalpia" -#: ../gcu/filechooser.cc:40 +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 msgid "Save as" msgstr "Zapisz jako" -#: ../gcu/filechooser.cc:40 -msgid "Open" -msgstr "Otwórz" +#: ../libs/gcp/stringdlg.cc:145 +#, c-format +msgid "" +"Could not open file %s, error was:\n" +"%s" +msgstr "" +"Nie można otworzyć pliku %s, błąd to:\n" +"%s" -#: ../gcu/filechooser.cc:59 -msgid "File _type:" -msgstr "_Typ pliku:" +#: ../libs/gcp/stringdlg.cc:161 +#, c-format +msgid "" +"Could not write to file %s, error was:\n" +"%s." +msgstr "" +"Nie można pisać do pliku %s, błąd to:\n" +"%s." -#: ../gcu/filechooser.cc:61 -msgid "Automatic" -msgstr "Automatyczny" +#: ../libs/gcp/stringdlg.cc:175 +#, c-format +msgid "" +"Could not close file %s, error was:\n" +"%s" +msgstr "" +"Nie można zamknąć pliku %s, błąd to:\n" +"%s" -#: ../gcu/formula.cc:391 ../gcu/formula.cc:429 -msgid "Unmatched parenthesis" -msgstr "Niedopasowany nawias" +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +msgid "This should not have occured, please file a bug record." +msgstr "To nie powinno się stać, proszę zgłosić raport o błędzie" + +#: ../libs/gcp/theme.cc:449 +msgid "NewTheme1" +msgstr "NowyMotyw1" -#: ../gcu/formula.cc:417 -msgid "Could not interpret the symbol list" -msgstr "Nie można zinterpretować listy symboli" +#: ../libs/gcp/theme.cc:453 +#, c-format +msgid "NewTheme%d" +msgstr "NowyMotyw%d" -#: ../gcu/formula.cc:423 -msgid "Parser failed, please fill a bug report." -msgstr "Parser zawiódł, proszę zgłosić raport o błędzie." +#: ../libs/gcp/theme.cc:550 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "Nieznany" -#: ../gcu/formula.cc:431 -msgid "Invalid character" -msgstr "Nieprawidłowy znak" +#: ../libs/gcp/view.cc:1015 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" +"Nie można stworzyć strumienia!\n" +"%s" -#: ../gcu/glview.cc:486 +#: ../libs/gcp/view.cc:1051 ../libs/gcu/glview.cc:394 #, c-format msgid "Unable to save image file: %s\n" msgstr "Nie można zapisać pliku obrazu: %s\n" -#: ../gcu/gtkchem3dviewer.cc:154 -msgid "Background Color" -msgstr "Kolor tła" +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:280 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:134 +#: ../programs/table/gchemtable-curve.cc:212 +msgid "_File" +msgstr "_Plik" -#: ../gcu/gtkchem3dviewer.cc:155 -msgid "Color used to paint the background" -msgstr "Kolor używany do rysowania tła" +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:281 +msgid "_New File" +msgstr "_Nowy plik" -#: ../gcu/gtkperiodic.c:334 -#, c-format -msgid "" -"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" -"p\n" -msgstr "" -"Wartość %d poza zakresem dla właściwości \"color-style\" dla instancji " -"GtkPeriodic %p\n" +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:282 +msgid "Create a new file" +msgstr "Stwórz nowy plik" -#: ../programs/3d/application.cc:35 ../programs/3d/application.cc:46 -msgid "GChem3D Viewer" -msgstr "Przeglądarka GChem3D" +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." +msgstr "Nowy plik wg _motywu..." + +#: ../libs/gcp/window.cc:284 +msgid "Create a new file using a theme" +msgstr "Utwórz nowy plik używając motywu" -#: ../programs/3d/application.cc:92 -msgid "Sorry, format not supported!" -msgstr "Przykro mi, format nie jest obsługiwany!" +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:283 ../programs/spectra/window.cc:167 +msgid "_Open..." +msgstr "_Otwórz..." + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:284 ../programs/spectra/window.cc:168 +msgid "Open a file" +msgstr "Otwórz plik" + +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:285 +msgid "_Save" +msgstr "_Zapisz" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:286 +msgid "Save the current file" +msgstr "Zapisz bieżący plik" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:287 +msgid "Save _As..." +msgstr "Zapisz _jako..." + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:288 +msgid "Save the current file with a different name" +msgstr "Zapisz bieżący plik pod inną nazwą" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:169 +msgid "Save As _Image..." +msgstr "Zapisz jako o_braz..." + +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:290 +#: ../programs/spectra/window.cc:170 +msgid "Save the current file as an image" +msgstr "Zapisz bieżący plik jako obraz" + +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:291 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:213 +msgid "Page Set_up..." +msgstr "Ustawienia _strony..." + +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:292 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:214 +msgid "Setup the page settings for your current printer" +msgstr "Ustaw parametry strony dla swojej bieżącej drukarki" + +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:215 +msgid "Print Pre_view" +msgstr "_Podgląd wydruku" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:294 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:216 +msgid "Print preview" +msgstr "Podgląd wydruku" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:295 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:217 +msgid "_Print..." +msgstr "_Drukuj..." + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:296 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "Print the current file" +msgstr "Wydrukuj bieżący plik" + +#: ../libs/gcp/window.cc:299 ../programs/crystal/window.cc:297 +#: ../programs/table/gchemtable-curve.cc:219 +msgid "Prope_rties..." +msgstr "Właściw_ości..." + +#: ../libs/gcp/window.cc:300 ../programs/crystal/window.cc:298 +msgid "Modify the file's properties" +msgstr "Zmień właściwości dokumentu" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:299 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:221 +msgid "_Close" +msgstr "Za_mknij" + +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:300 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:222 +msgid "Close the current file" +msgstr "Zamknij bieżący plik" + +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:301 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:137 +#: ../programs/table/gchemtable-curve.cc:223 +msgid "_Quit" +msgstr "Za_kończ" + +#: ../libs/gcp/window.cc:304 +msgid "Quit GChemPaint" +msgstr "Wyjdź z GChemPaint" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:303 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:225 +msgid "_Edit" +msgstr "_Edycja" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "_Cofnij" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "Cofnij ostatnią czynność" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "Przyw_róć" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "Przywróć czynność, która została cofnięta" + +#: ../libs/gcp/window.cc:310 +msgid "Cu_t" +msgstr "Wy_tnij" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "Wytnij zaznaczenie" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:226 +msgid "_Copy" +msgstr "_Kopiuj" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:227 +msgid "Copy the selection" +msgstr "Kopiuj zaznaczenie" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "_Wklej" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "Wklej" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "U_suń" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "Usuń zaznaczenie" + +#: ../libs/gcp/window.cc:318 +msgid "Select _All" +msgstr "_Zaznacz wszystko" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "Zaznacza wszystkie obiekty" + +#: ../libs/gcp/window.cc:320 +msgid "Pr_eferences..." +msgstr "P_referencje..." -#: ../programs/3d/application.cc:102 ../programs/crystal/application.cc:214 +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:305 +msgid "Configure the application" +msgstr "Skonfiguruj aplikację" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:317 ../programs/table/gchemtable-app.cc:139 +msgid "_View" +msgstr "_Widok" + +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "_Powiększ" + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "_400%" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "Powiększ do 400%" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "_300%" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "Powiększ do 300%" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "_200%" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "Powiększ do 200%" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "150%" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "Powiększ do 150%" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "_100%" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "Powiększ do 100%" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "_75%" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "Powiększ do 75%" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "_50%" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "Powiększ do 50%" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "25%" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "Powiększ do 25%" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "_Powiększ do...%" + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "Otwórz okno dialogowe powiększania" + +#: ../libs/gcp/window.cc:342 +msgid "_Tools" +msgstr "_Narzędzia" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:320 +msgid "_Windows" +msgstr "_Okna" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:325 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:163 +#: ../programs/table/gchemtable-curve.cc:228 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "_Help" +msgstr "Pomo_c" + +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:164 +#: ../programs/table/gchemtable-curve.cc:229 +msgid "_Contents" +msgstr "Za_wartość" + +#: ../libs/gcp/window.cc:346 +msgid "View help for GChemPaint" +msgstr "Otwórz plik pomocy dla programu GChemPaint" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "GChemPaint w _sieci" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "Przeglądaj stronę GChemPaint" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:330 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:168 +#: ../programs/table/gchemtable-curve.cc:235 +msgid "Live assistance" +msgstr "Pomoc na żywo" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:331 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "Otwórz kanał IRC Gnome Chemistry Utils" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:332 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Ask a question" +msgstr "_Zadaj pytanie " + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "Zadaj pytanie dotyczące GChemPaint" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:334 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "Report _Bugs" +msgstr "Zgłoś _błąd" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "Zgłoś błąd w programie GChemPaint" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:336 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "_About" +msgstr "_Informacje o" + +#: ../libs/gcp/window.cc:356 +msgid "About GChemPaint" +msgstr "O programie GChemPaint" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "Otwórz _poprzedni" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:459 +msgid "Ready" +msgstr "Gotowy" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "GChemPaint" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:740 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "\"%s\" został zmodyfikowany. Czy chcesz go zapisać?" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "(rozdzielczość ekranu to %u)" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "Wszystko zostało odcięte" + +#: ../libs/gcu/dialog.cc:135 +msgid "Type a number" +msgstr "Wpisz liczbę" + +#: ../libs/gcu/dialog.cc:144 +#, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "Wpisz liczbę większą lub równą %g i mniejszą niż %g" + +#: ../libs/gcu/dialog.cc:154 +#, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "Wpisz liczbę większą %g i mniejszą niż lub równą %g" + +#: ../libs/gcu/dialog.cc:164 +#, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "Wpisz liczbę pomiędzy%g a %g włącznie." + +#: ../libs/gcu/dialog.cc:174 +#, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "Wpisz liczbę większą niż %g i mniejszą niż %g" + +#: ../libs/gcu/dialog.cc:184 +#, c-format +msgid "Type a number lower than %g" +msgstr "Wpisz liczbę mniejszą niż %g" + +#: ../libs/gcu/dialog.cc:194 +#, c-format +msgid "Type a number greater than %g" +msgstr "Wpisz liczbę większą niż %g" + +#: ../libs/gcu/dialog.cc:204 +#, c-format +msgid "Type a number lower than or equal to %g" +msgstr "Wpisz liczbę mniejszą niż lub równą %g" + +#: ../libs/gcu/dialog.cc:214 +#, c-format +msgid "Type a number greater than or equal to %g" +msgstr "Wpisz liczbę większą niż lub równą %g" + +#: ../libs/gcu/element.cc:97 +msgid "German" +msgstr "Niemiecki" + +#: ../libs/gcu/element.cc:98 +msgid "French" +msgstr "Francuski" + +#: ../libs/gcu/element.cc:99 +msgid "Italian" +msgstr "Włoski" + +#: ../libs/gcu/element.cc:100 +msgid "Polish" +msgstr "Polski" + +#: ../libs/gcu/element.cc:101 +msgid "Brazilian" +msgstr "Brazylijski" + +#: ../libs/gcu/element.cc:102 +msgid "Russian" +msgstr "Rosyjski" + +#: ../libs/gcu/element.cc:104 +msgid "Can't find and read elements.xml" +msgstr "Nie można odnaleźć i odczytać elements.xml" + +#: ../libs/gcu/element.cc:110 ../libs/gcu/element.cc:119 +msgid "Incorrect file format: elements.xml" +msgstr "NIeprawidłowy format pliku: elements.xml" + +#: ../libs/gcu/element.cc:155 +msgid "English" +msgstr "Angielski" + +#: ../libs/gcu/element.cc:407 +msgid "Can't find and read radii.xml" +msgstr "Nie można odnaleźć i odczytać radii.xml" + +#: ../libs/gcu/element.cc:413 ../libs/gcu/element.cc:426 +msgid "Incorrect file format: radii.xml" +msgstr "NIeprawidłowy format pliku: radii.xml" + +#: ../libs/gcu/element.cc:514 +msgid "Can't find and read elecprops.xml" +msgstr "Nie można odnaleźć i odczytać elecprops.xml" + +#: ../libs/gcu/element.cc:520 ../libs/gcu/element.cc:527 +msgid "Incorrect file format: elecprops.xml" +msgstr "NIeprawidłowy format pliku: elecprops.xml" + +#: ../libs/gcu/element.cc:676 +msgid "Can't find and read isotopes.xml" +msgstr "Nie można odnaleźć i odczytać isotopes.xml" + +#: ../libs/gcu/element.cc:682 ../libs/gcu/element.cc:691 +msgid "Incorrect file format: isotopes.xml" +msgstr "Nieprawidłowy format pliku: isotopes.xml" + +#: ../libs/gcu/filechooser.cc:43 +msgid "Open" +msgstr "Otwórz" + +#: ../libs/gcu/filechooser.cc:62 +msgid "File _type:" +msgstr "_Typ pliku:" + +#: ../libs/gcu/filechooser.cc:64 +msgid "Automatic" +msgstr "Automatyczny" + +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "Niedopasowany nawias" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "Nie można zinterpretować listy symboli" + +#: ../libs/gcu/formula.cc:546 +msgid "Parser failed, please fill a bug report." +msgstr "Parser zawiódł, proszę zgłosić raport o błędzie." + +#: ../libs/gcu/formula.cc:554 +msgid "Invalid character" +msgstr "Nieprawidłowy znak" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +msgid "Background Color" +msgstr "Kolor tła" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "Kolor używany do rysowania tła" + +#: ../libs/gcu/gtkperiodic.c:331 #, c-format msgid "" -"File %s\n" -"exists, overwrite?" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" msgstr "" -"Plik %s\n" -"istnieje, nadpisać?" +"Wartość %d poza zakresem dla właściwości \"color-style\" dla instancji " +"GtkPeriodic %p\n" -#: ../programs/3d/application.cc:147 ../programs/crystal/application.cc:145 -msgid "Save as image" -msgstr "Zapisz jako obraz" +#: ../libs/gcu/loader.cc:106 +msgid "Chemical file loader type." +msgstr "Rodzaj programu ładującego pliki chemiczne." + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "%.1f %s szerokości na %.1f %s wysokości" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "%.0f %s szerokości na %.0f %s wysokości" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "piksele" + +#: ../libs/gcu/printable.cc:35 +msgid "points" +msgstr "punkty" + +#: ../libs/gcu/printable.cc:36 +msgid "inches" +msgstr "cale" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "mm" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "Liczba falowa (1/cm)" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1321 +msgid "Transmittance" +msgstr "Transmitancja" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1320 +msgid "Absorbance" +msgstr "Absorbancja" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1256 +msgid "Chemical shift (ppm)" +msgstr "Przesunięcie chemiczne (ppm)" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "Długość fali (nm)" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "Długość fali (µm)" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "Czas (s)" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1257 +msgid "Frequency (Hz)" +msgstr "Częstotliwość (Hz)" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "Stosunek masa/ładunek" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "Względna abundancja" + +#: ../libs/gcu/spectrumdoc.cc:616 ../libs/gcu/spectrumdoc.cc:1263 +msgid "Show integral" +msgstr "Pokaż całkę" + +#: ../libs/gcu/spectrumdoc.cc:616 +msgid "Hide integral" +msgstr "Ukryj całkę" + +#: ../libs/gcu/spectrumdoc.cc:706 ../libs/gcu/spectrumdoc.cc:1593 +msgid "Found too many data!" +msgstr "Znaleziono zbyt wiele danych!" + +#: ../libs/gcu/spectrumdoc.cc:1253 ../libs/gcu/spectrumdoc.cc:1300 +msgid "X unit:" +msgstr "Jednostka X:" + +#: ../libs/gcu/spectrumdoc.cc:1304 +msgid "Wave length (nm)" +msgstr "Długość fali (nm)" + +#: ../libs/gcu/spectrumdoc.cc:1306 +msgid "Wave length (µm)" +msgstr "Długość fali (µm)" + +#: ../libs/gcu/spectrumdoc.cc:1307 +msgid "Wave number (1/cm)" +msgstr "Liczba falowa (1/cm)" + +#: ../libs/gcu/spectrumdoc.cc:1312 +msgid "Invert X Axis" +msgstr "Odwróć oś X" + +#: ../libs/gcu/spectrumdoc.cc:1317 +msgid "Y unit:" +msgstr "Jednostka Y:" + +#: ../libs/gcu/spectrumdoc.cc:1488 ../libs/gcu/spectrumdoc.cc:1518 +msgid "Constant too long" +msgstr "Stała zbyt długa" + +#: ../libs/gcu/spectrumdoc.cc:1511 +msgid "Invalid character in data block" +msgstr "Nieprawidłowy znak w bloku danych" + +#: ../libs/gcu/spectrumdoc.cc:1615 +msgid "Data check failed!" +msgstr "Sprawdzanie danych nie powiodło się!" + +#: ../libs/gcu/spectrumdoc.cc:1632 +msgid "Data check failed: FIRSTX!" +msgstr "Sprawdzanie danych nie powiodło się: FIRSTX!" + +#: ../libs/gcu/spectrumdoc.cc:1637 +msgid "Data check failed: FIRSTY!" +msgstr "Sprawdzanie danych nie powiodło się: FIRSTY!" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1641 +msgid "Found too many data" +msgstr "Znaleziono zbyt wiele danych" + +#: ../libs/gcu/spectrumdoc.cc:1947 +msgid "Integral" +msgstr "Całka" + +#: ../libs/gcu/spectrumdoc.cc:2068 +msgid "Real transformed data" +msgstr "Rzeczywiste dane transformowane" + +#: ../libs/gcu/spectrumdoc.cc:2085 +msgid "Imaginary transformed data" +msgstr "Urojone dane transformowane" + +#: ../libs/gcu/spectrumview.cc:80 +msgid "Minimum X value:" +msgstr "Minimalna wartość X:" + +#: ../libs/gcu/spectrumview.cc:85 +msgid "Maximum X value:" +msgstr "Maksymalna wartość X:" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "Spróbuj dodać dwie wartości o różnych jednostkach." + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:503 ../plugins/loaders/cdx/cdx.cc:507 +#: ../plugins/loaders/cdx/cdx.cc:632 ../plugins/loaders/cdx/cdx.cc:637 +msgid "Unsupported feature, please report!" +msgstr "Niewspierana funkcja, proszę zgłosić!" + +#: ../plugins/loaders/cdx/cdx.cc:594 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "nieudane dla %s\n" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "Program ładujący pliki Chemdraw cdx" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "Program ładujący pliki Chemdraw cdx." + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "Program ładujący : cdx" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "'%s' jest uszkodzony!" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "Program ładujący pliki Chemdraw XML" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "Program ładujący pliki Chemdraw XML." + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "Program ładujący : cdxml" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:169 +#: ../plugins/paint/bonds/bondtool.cc:279 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "Orientacja: %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "Dłu_gość strzałki:" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +msgid "H_alf heads" +msgstr "_Połówki grotów" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +msgid "Set _default" +msgstr "Ustaw _domyślne" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "P_ełne groty" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." +msgstr "" +"Jeśli ustawione jako prawda, strzałki etapów reakcji odwracalnych będą " +"używać pełnych grotów zamiast domyślnych połówkowych." + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +msgid "Use full arrows heads for reversible reactions" +msgstr "Używaj pełnych grotów dla reakcji odwracalnych" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "Stwórz nowy szlak retrosyntezy" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "Strzałka prosta" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "Dodaj strzałkę dla reakcjinieodwracalnej" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "Podwójna strzałka" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "Dodaj parę strzałek dla reakcji odwracalnej" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "Strzałka retrosyntezy" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "Dodaj strzałkę dla etapu retrosyntezy" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "Strzałka mezomerii" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "Dodaj strzałkę z podwójnymi grotami dla mezomerii" + +#: ../plugins/paint/arrows/plugin.cc:92 +msgid "Electron pair move arrow" +msgstr "Strzałka ruchu pary elektronów" + +#: ../plugins/paint/arrows/plugin.cc:93 +msgid "Add a curved arrow to represent an electron pair move" +msgstr "Dodaj zakrzywioną strzałkę aby zareprezentować ruch pary elektronów" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "Strzałka ruchu pojedynczego elektronu" + +#: ../plugins/paint/arrows/plugin.cc:96 +msgid "Add a curved arrow to represent an single electron move" +msgstr "Dodaj zakrzywioną strzałkę aby zareprezentować ruch pojedynczego elektronu" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "Brak cząsteczki docelowej!" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "Wiele cząsteczek docelowych lub brakujące strzałki." + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "Przykro mi, cykliczne szlaki retrosyntezy nie są wspierane." + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "Zniszcz szlak retrosyntezy" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "Tylko jedna strzałka może łączyć dwa dane etapy." + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "Dodaj lub modyfikuj atom" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "Ładunek dodatni" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "Podwyższ ładunek atomu" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "Ładunek ujemny" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "Obniż ładunek atomu" + +#: ../plugins/paint/atoms/plugin.cc:64 +msgid "Electron Pair" +msgstr "Para elektronów" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "Dodaj parę elektronów do atomu" + +#: ../plugins/paint/atoms/plugin.cc:67 +msgid "Unpaired Electron" +msgstr "Niesparowany elektron" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "Dodaj niesparowany elektron do atomu" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "Właściwość" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "Wartość" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "Kąt między dwoma wiązaniami w otwartym łańcuchu" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "_Kąt wiązania:" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "Dłu_gość wiązania:" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "Domyślna długość dla nowych wiązań" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "Użyj istniejących atomów dla końców wiązań" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "_Scal z istniejącymi atomami" + +#: ../plugins/paint/bonds/bondtool.cc:354 +msgid "Invalid document tree, please file a bug report" +msgstr "Nieprawidłowe drzewo dokumentu, proszę zgłosić raport o błędzie" + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "Automatycznie" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "_Liczba wiązań:" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "If set, the number of new bonds will be evaluated from the mouse position" +msgstr "Jeśli ustawione, liczba nowych wiązań będzie wyprowadzona z pozycji myszy" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "Liczba nowych wiązań" + +#: ../plugins/paint/bonds/chaintool.cc:125 +#: ../plugins/paint/bonds/chaintool.cc:247 +#, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "Wiązania: %d, Orientacja: %g" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "Dodaj wiązania lub zmień krotność wybranego wiązania" + +#: ../plugins/paint/bonds/plugin.cc:59 +msgid "Chain" +msgstr "Łańcuch" + +#: ../plugins/paint/bonds/plugin.cc:60 +msgid "Add a chain" +msgstr "Dodaj łańcuch" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "Narzędzie rysowania klina wypełnionego" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "Dodaj klin wypełniony" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "Narzędzie rysowania klina przerywanego" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "Dodaj klin przerywany" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "Narzędzie rysowania wiązania falowanego" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "Dodaj wiązanie falowane" + +#: ../plugins/paint/bonds/plugin.cc:71 +msgid "Fore bond tool" +msgstr "Narzędzie rysowania wiązania wysuniętego" + +#: ../plugins/paint/bonds/plugin.cc:72 +msgid "Add a fore bond" +msgstr "Dodaj wiązanie wysunięte" + +#: ../plugins/paint/bonds/plugin.cc:74 +msgid "Delocalized bond tool" +msgstr "Narzędzie rysowania wiązania zdelokalizowanego" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "Dodaj układ wiązań zdelokalizowanych" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +msgid "Cycle _Size" +msgstr "Rozmiar _pierścienia:" + +#: ../plugins/paint/cycles/plugin.cc:54 +msgid "Three atoms cycle" +msgstr "Pierścień trójczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "Dodaj pierścień trójczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:57 +msgid "Four atoms cycle" +msgstr "Pierścień czteroczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "Dodaj pierścień czteroczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:60 +msgid "Five atoms cycle" +msgstr "Pierścień pięcioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "Dodaj pierścień pięcioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:63 +msgid "Six atoms cycle" +msgstr "Pierścień sześcioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "Dodaj pierścień sześcioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:66 +msgid "Seven atoms cycle" +msgstr "Pierścień siedmioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "Dodaj pierścień siedmioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:69 +msgid "Eight atoms cycle" +msgstr "Pierścień ośmioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "Dodaj pierścień ośmioczłonowy" + +#: ../plugins/paint/cycles/plugin.cc:72 +msgid "Variable sized cycle" +msgstr "Pierścień o zmiennym rozmiarze" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "Dodaj pierścień" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "_Edytuj reszty..." + +#: ../plugins/paint/residues/plugin.cc:105 +msgid "Create new abbreviations" +msgstr "Utwórz nowe skróty" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +msgid "Please, provide only one molecule." +msgstr "Proszę podać tylko jedną cząsteczkę." + +#: ../plugins/paint/residues/residues-dlg.cc:232 +msgid "Please, provide a name for the residue" +msgstr "Proszę nadać nazwę reszcie" + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "Symbole zawierające więcej niż osiem znaków nie są dozwolone." + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:4 +msgid "New" +msgstr "Nowa" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +msgid "\"New\" is not a valid symbol" +msgstr "\"New\" nie jest poprawnym symbolem" + +#: ../plugins/paint/residues/residues-dlg.cc:265 +msgid "Please provide at least one symbol" +msgstr "Proszę podać co najmniej jeden symbol" + +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "%s jest już używane przez inną resztę." + +#: ../plugins/paint/residues/residues-dlg.cc:287 +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "" +"Pusty wzór, to nie powinno było się wydarzyć.\n" +"Proszę zgłosić błąd" + +#: ../plugins/paint/residues/residues.glade.h:1 +msgid "Formula" +msgstr "Wzór" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "Tożsamość" + +#: ../plugins/paint/residues/residues.glade.h:5 +msgid "Residues" +msgstr "Reszty" + +#: ../plugins/paint/residues/residues.glade.h:6 +msgid "_Generic" +msgstr "_Ogólna" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "_Symbol(e):" + +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-delete" +msgstr "gtk-delete" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-save" +msgstr "gtk-save" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "Właściwości grupy..." + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "W_yrównaj" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "Odległość:" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "Grupuj i/lub wyrównaj wybrane obiekty" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" +"Normalnie\n" +"Góra\n" +"Połowa wysokości\n" +"Dół\n" +"Lewo\n" +"Środek\n" +"Prawo" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "_Grupuj" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "_Rozmieść równomiernie" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "Zaznacz" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "Zaznacz jeden lub więcej obiektów" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "Wymaż" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "Gumka" + +#: ../plugins/paint/selection/selectiontool.cc:368 +msgid "Creation failed!" +msgstr "Tworzenie się nie powiodło!" + +#: ../plugins/paint/selection/selectiontool.cc:392 +msgid "Group and/or align objects" +msgstr "Grupuj i/lub wyrównaj obiekty" + +#: ../plugins/paint/selection/selectiontool.cc:430 +msgid "Horizontal flip" +msgstr "Odbij w poziomie" + +#: ../plugins/paint/selection/selectiontool.cc:431 +msgid "Flip the selection horizontally" +msgstr "Odbij poziomo zaznaczony fragment" + +#: ../plugins/paint/selection/selectiontool.cc:432 +msgid "Vertical flip" +msgstr "Odbij w pionie" + +#: ../plugins/paint/selection/selectiontool.cc:433 +msgid "Flip the selection vertically" +msgstr "Odbij pionowo zaznaczony fragment" + +#: ../plugins/paint/selection/selectiontool.cc:434 +msgid "Merge" +msgstr "Połącz" + +#: ../plugins/paint/selection/selectiontool.cc:435 +msgid "Merge two molecules" +msgstr "Połącz dwie cząsteczki" + +#: ../plugins/paint/selection/selectiontool.cc:439 +msgid "_Rotate" +msgstr "Ob_róć" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Rotate the selection" +msgstr "Obróć zaznaczony fragment" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "Nowy szablon" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "_Kategoria:" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "_Nazwa" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "Szablony" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "Użyj szablonów lub zarządzaj nimi" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "Różne" + +#: ../plugins/paint/templates/templates.glade.h:1 +msgid "No selected template" +msgstr "Brak wybranego szablonu" + +#: ../plugins/paint/templates/templates.glade.h:2 +msgid "_Templates" +msgstr "_Szablony" + +#: ../plugins/paint/templates/templates.glade.h:3 +msgid "category" +msgstr "kategoria" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "Proszę wprowadzić obiekt." + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "Proszę podać nazwę." + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "Proszę wybrać kategorię." + +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" +"Brak\n" +"Pojedyncze\n" +"Podwójne\n" +"Niskie" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "_Rozmiar:" + +#: ../plugins/paint/text/fontsel.glade.h:6 +msgid "Stri_kethrough" +msgstr "Pr_zekreślenie" + +#: ../plugins/paint/text/fontsel.glade.h:7 +msgid "_Color:" +msgstr "_Kolor:" + +#: ../plugins/paint/text/fontsel.glade.h:8 +msgid "_Family:" +msgstr "R_odzina:" + +#: ../plugins/paint/text/fontsel.glade.h:9 +msgid "_Position:" +msgstr "Poz_ycja:" + +#: ../plugins/paint/text/fontsel.glade.h:10 +msgid "_Style:" +msgstr "_Styl:" + +#: ../plugins/paint/text/fontsel.glade.h:11 +msgid "_Underline:" +msgstr "_Podkreślenie" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "Dodaj lub modyfikuj tekst" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "Dodaj lub modyfikuj grupę atomów" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "Eksport do Wikipedii" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "Wyeksportuj do publikacji w Wikipedii" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "Wygeneruj obraz PNG zgodny z Wikipedią" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "Nie można zapisać pliku obrazu: " -#: ../programs/3d/main.cc:40 +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +msgid "GChem3D Viewer" +msgstr "Przeglądarka GChem3D" + +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "Przykro mi, format nie jest obsługiwany!" + +#: ../programs/3d/main.cc:44 msgid "GChem3d Viewer version: " msgstr "Wersja przeglądarki GChem3D" -#: ../programs/3d/main.cc:51 +#: ../programs/3d/main.cc:55 msgid "Prints GChem3d Viewer version" msgstr "Pokazuje wersję przeglądarki GChem3D" -#: ../programs/3d/main.cc:52 +#: ../programs/3d/main.cc:56 msgid "Background color: white, black or #rrggbb (default is black)" msgstr "Kolor tła: biały, czarny albo #rrggbb (domyślnym jest czarny)" -#: ../programs/3d/main.cc:53 +#: ../programs/3d/main.cc:57 msgid "" -"How molecules are displayed; possible values are BallnStick (the default) " -"and SpaceFill" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" msgstr "" "Jak są wyświetlane cząsteczki: możliwe wartości to BallnStick (model " -"kulkowy, domyśny) i SpaceFill (model przestrzenny)" +"kulkowy, domyśny), SpaceFill (model przestrzenny), Cylinders (model walcowy) " +"oraz Wireframe (model siatkowy)" -#: ../programs/3d/main.cc:75 +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 msgid " [file]" msgstr "[plik]" -#: ../programs/3d/main.cc:97 ../programs/crystal/main.cc:145 +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 #, c-format msgid "Invalid or misplaced argument: %s\n" msgstr "Błędny lub źle umieszczony argument: %s\n" -#: ../programs/3d/window.cc:119 +#: ../programs/3d/window.cc:129 msgid "GChem3D is a molecular structures viewer for Gnome" msgstr "GChem3D jest przeglądarką struktur molekularnych dla Gnome" #. const gchar * documentors[] = {NULL}; -#: ../programs/3d/window.cc:121 -msgid "Copyright © 2004-2007 Jean Bréfort\n" -msgstr "Prawa autorskie © 2004-2007 Jean Bréfort\n" +#: ../programs/3d/window.cc:131 +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "Prawa autorskie © 2004-2008 Jean Bréfort\n" -#. Note to translators: replace the following string with the appropriate credits for you lang -#: ../programs/3d/window.cc:139 ../programs/calc/gchemcalc.cc:146 -#: ../programs/crystal/window.cc:120 ../programs/table/gchemtable-app.cc:122 -msgid "translator_credits" -msgstr "" -"Julian Sikorski\n" -"Nikodem Kuznik\n" -"Michał Sałaban" - -#: ../programs/3d/window.cc:161 ../programs/calc/gchemcalc.cc:406 -#: ../programs/crystal/window.cc:247 ../programs/table/gchemtable-app.cc:141 -msgid "_File" -msgstr "_Plik" - -#: ../programs/3d/window.cc:162 ../programs/crystal/window.cc:250 -msgid "_Open..." -msgstr "_Otwórz..." - -#: ../programs/3d/window.cc:163 ../programs/crystal/window.cc:251 -msgid "Open a file" -msgstr "Otwórz plik" - -#: ../programs/3d/window.cc:164 ../programs/crystal/window.cc:256 -msgid "Save As _Image..." -msgstr "Zapisz jako o_braz..." - -#: ../programs/3d/window.cc:165 ../programs/crystal/window.cc:257 -msgid "Save the current file as an image" -msgstr "Zapisz bieżący plik jako obraz" - -#: ../programs/3d/window.cc:166 ../programs/crystal/window.cc:258 -msgid "_Print..." -msgstr "_Drukuj..." - -#: ../programs/3d/window.cc:167 +#: ../programs/3d/window.cc:181 msgid "Print the current scene" msgstr "Wydrukuj bieżący układ" -#: ../programs/3d/window.cc:168 ../programs/crystal/window.cc:260 -msgid "_Close" -msgstr "Za_mknij" - -#: ../programs/3d/window.cc:169 ../programs/crystal/window.cc:261 -msgid "Close the current file" -msgstr "Zamknij bieżący plik" - -#: ../programs/3d/window.cc:170 ../programs/calc/gchemcalc.cc:407 -#: ../programs/crystal/window.cc:262 ../programs/table/gchemtable-app.cc:142 -msgid "_Quit" -msgstr "Za_kończ" - -#: ../programs/3d/window.cc:171 +#: ../programs/3d/window.cc:185 msgid "Quit GChem3D" msgstr "Zakończ GChem3D" -#: ../programs/3d/window.cc:172 ../programs/crystal/window.cc:278 -#: ../programs/table/gchemtable-app.cc:144 -msgid "_View" -msgstr "_Widok" - -#: ../programs/3d/window.cc:173 ../programs/calc/gchemcalc.cc:409 -#: ../programs/crystal/window.cc:286 ../programs/table/gchemtable-app.cc:159 -msgid "_Help" -msgstr "Pomo_c" - -#: ../programs/3d/window.cc:174 ../programs/calc/gchemcalc.cc:410 -#: ../programs/crystal/window.cc:287 ../programs/table/gchemtable-app.cc:160 -msgid "_Contents" -msgstr "Za_wartość" - -#: ../programs/3d/window.cc:175 +#: ../programs/3d/window.cc:189 msgid "View help for the Molecules Viewer" msgstr "Zobacz pomoc dla Przeglądarki Cząsteczek" -#: ../programs/3d/window.cc:176 ../programs/calc/gchemcalc.cc:412 -#: ../programs/crystal/window.cc:289 ../programs/table/gchemtable-app.cc:162 +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:328 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:166 +#: ../programs/table/gchemtable-curve.cc:233 msgid "Gnome Chemistry Utils on the _web" msgstr "Gnome Chemistry Utils w _sieci" -#: ../programs/3d/window.cc:177 ../programs/calc/gchemcalc.cc:413 -#: ../programs/crystal/window.cc:290 ../programs/table/gchemtable-app.cc:163 +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:329 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/table/gchemtable-curve.cc:234 msgid "Browse the Gnome Chemistry Utils's web site" msgstr "Przeglądaj stronę internetową Gnome Chemistry Utils" -#: ../programs/3d/window.cc:178 ../programs/calc/gchemcalc.cc:414 -#: ../programs/crystal/window.cc:291 ../programs/table/gchemtable-app.cc:164 -msgid "_Ask a question" -msgstr "_Zadaj pytanie " - -#: ../programs/3d/window.cc:179 ../programs/calc/gchemcalc.cc:415 -#: ../programs/crystal/window.cc:292 ../programs/table/gchemtable-app.cc:165 +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:333 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 msgid "Ask a question about the Gnome Chemistry Utils" msgstr "Zadaj pytanie o Gnome Chemistry Utils" -#: ../programs/3d/window.cc:180 ../programs/calc/gchemcalc.cc:416 -#: ../programs/crystal/window.cc:293 ../programs/table/gchemtable-app.cc:166 -msgid "Report _Bugs" -msgstr "Zgłoś _błąd" - -#: ../programs/3d/window.cc:181 ../programs/calc/gchemcalc.cc:417 -#: ../programs/crystal/window.cc:294 ../programs/table/gchemtable-app.cc:167 +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:335 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:240 msgid "Submit a bug report for the Gnome Chemistry Utils" msgstr "Zgłoś raport o błędzie w Gnome Chemistry Utils" -#: ../programs/3d/window.cc:182 ../programs/calc/gchemcalc.cc:418 -#: ../programs/crystal/window.cc:295 ../programs/table/gchemtable-app.cc:168 -msgid "_About" -msgstr "_Informacje o" - -#: ../programs/3d/window.cc:183 +#: ../programs/3d/window.cc:199 msgid "About GChem3D" msgstr "Informacje o GChem3D" -#: ../programs/3d/window.cc:187 +#: ../programs/3d/window.cc:203 msgid "Balls and sticks" msgstr "Model kulkowy" -#: ../programs/3d/window.cc:188 +#: ../programs/3d/window.cc:204 msgid "Display a balls and sticks model" msgstr "Wyświetl model kulkowy" -#: ../programs/3d/window.cc:190 +#: ../programs/3d/window.cc:206 msgid "Space filling" msgstr "Model przestrzenny" -#: ../programs/3d/window.cc:191 +#: ../programs/3d/window.cc:207 msgid "Display a space filling model" msgstr "Wyświetl model przestrzenny" -#: ../programs/3d/window.cc:268 +#: ../programs/3d/window.cc:209 +msgid "Cylinders" +msgstr "Model walcowy" + +#: ../programs/3d/window.cc:210 +msgid "Display a cylinders model" +msgstr "Wyświetl model walcowy" + +#: ../programs/3d/window.cc:212 +msgid "Wireframe" +msgstr "Model siatkowy" + +#: ../programs/3d/window.cc:213 +msgid "Display a wireframe model" +msgstr "Wyświetl model siatkowy" + +#: ../programs/3d/window.cc:271 msgid "Background color" msgstr "Kolor tła" -#: ../programs/3d/window.cc:269 +#: ../programs/3d/window.cc:272 msgid "Choose a new background color" msgstr "Wybierz nowy kolor tła" -#: ../programs/3d/window.cc:299 ../programs/crystal/window.cc:425 +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:439 +#: ../programs/spectra/window.cc:257 msgid "Open recent" msgstr "Otwórz poprzedni" -#: ../programs/3d/window.cc:359 ../programs/crystal/application.cc:126 -msgid "Preview" -msgstr "Podgląd" - -#: ../programs/3d/gchem3d-viewer.desktop.in.h:1 +#: ../programs/3d/gchem3d.desktop.in.h:1 msgid "Display chemical 3D structures" msgstr "Wyświetl trójwymiarowe struktury chemiczne" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:2 -msgid "Molecules Viewer" +#: ../programs/3d/gchem3d.desktop.in.h:2 +msgid "Molecules Viewer " msgstr "Przeglądarka cząsteczek" -#: ../programs/calc/gchemcalc.cc:126 +#: ../programs/calc/gchemcalc.cc:301 msgid "GChemCalc is a simple calculator for chemists" msgstr "GChemCalc jest prostym kalkulatorem dla chemików" #. const gchar * documentors[] = {NULL}; -#: ../programs/calc/gchemcalc.cc:128 -msgid "Copyright © 2005-2007 Jean Bréfort\n" -msgstr "Prawa autorskie © 2005-2007 Jean Bréfort\n" +#: ../programs/calc/gchemcalc.cc:303 ../programs/table/gchemtable-app.cc:345 +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "Prawa autorskie © 2005-2008 Jean Bréfort" -#: ../programs/calc/gchemcalc.cc:408 +#: ../programs/calc/gchemcalc.cc:619 msgid "Quit GChemCalc" msgstr "Zakończ GChemCalc" -#: ../programs/calc/gchemcalc.cc:411 +#: ../programs/calc/gchemcalc.cc:623 +msgid "_Mode" +msgstr "_Tryb" + +#: ../programs/calc/gchemcalc.cc:626 msgid "View help for the Chemical Calculator" msgstr "Zobacz pomoc dla Kalkulatora chemicznego" -#: ../programs/calc/gchemcalc.cc:419 +#: ../programs/calc/gchemcalc.cc:636 msgid "About GChemCalc" msgstr "Informacje o GChemCalc" -#: ../programs/calc/gchemcalc.cc:465 +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "_Zgaduj" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "" +"Spróbuj zgadnąć co jest prawidłowe podczas interpretacji niejednoznacznych " +"symboli" + +#: ../programs/calc/gchemcalc.cc:643 +msgid "_Atom" +msgstr "_Atom" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "Interpretuj niejednoznaczne symbole jako atomy" + +#: ../programs/calc/gchemcalc.cc:646 +msgid "_Nickname" +msgstr "_Określenie" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "Interpretuj niejednoznaczne symbole jako określenia grup" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "_Pytaj" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "Pytaj użytkownika o prawidłową interpretację niejednoznacznych symboli" + +#: ../programs/calc/gchemcalc.cc:688 msgid "GChemCalc Calculator version: " msgstr "Wersja kalkulatora GChemCalc" -#: ../programs/calc/gchemcalc.cc:486 +#: ../programs/calc/gchemcalc.cc:714 msgid " [formula]" msgstr "[wzór]" -#: ../programs/calc/gchemcalc.cc:502 +#: ../programs/calc/gchemcalc.cc:730 msgid "For usage see: gchemcalc [-?|--help]" msgstr "Dla informacji o użytkowaniu zobacz: gchemcalc [-?|--help]" -#: ../programs/calc/gchemcalc.cc:556 +#: ../programs/calc/gchemcalc.cc:776 msgid "Element" msgstr "Pierwiastek" -#: ../programs/calc/gchemcalc.cc:563 +#: ../programs/calc/gchemcalc.cc:783 msgid "Mass %" msgstr "Masa %" @@ -1346,13 +3755,17 @@ msgid "A simple calculator for chemistry" msgstr "Prosty kalkulator chemiczny" +#: ../programs/calc/gchemcalc.desktop.in.h:2 +msgid "Chemical calculator " +msgstr "Kalkulator chemiczny" + #: ../programs/crystal/gcrystal.desktop.in.h:1 msgid "Edit and display crystalline structures" msgstr "Edytuj i wyświetlaj struktury krystaliczne" #: ../programs/crystal/gcrystal.desktop.in.h:2 msgid "Gnome Crystal Crystalline Structures Viewer " -msgstr "Przeglądarka struktur krystalicznych Gnome Crystal " +msgstr "Przeglądarka struktur krystalicznych Gnome Crystal" #: ../programs/crystal/gcrystal.schemas.in.h:1 msgid "Background color blue value" @@ -1367,8 +3780,7 @@ msgstr "Wartość składowej czerwonej koloru tła" #: ../programs/crystal/gcrystal.schemas.in.h:4 -msgid "" -"Blue value for the default background color. Acceptable values are 0. to 1." +msgid "Blue value for the default background color. Acceptable values are 0. to 1." msgstr "" "Wartość składowej niebieskiej domyślnego koloru tła. Akceptowalne wartości " "zawierają się w przedziale od 0 do 1." @@ -1378,18 +3790,24 @@ "Default Euler's nutation angle for model display. Acceptable values are 0. " "to + 180." msgstr "" +"Domyślny kąt nutacji Eulera dla wyświetlania modelu. Akceptowane wartości od " +"0 do +180." #: ../programs/crystal/gcrystal.schemas.in.h:6 msgid "" "Default Euler's precession angle for model display. Acceptable values are -" "180. to + 180." msgstr "" +"Domyślny kąt precesji Eulera dla wyświetlania modelu. Akceptowane wartości " +"od - 180 do + 180." #: ../programs/crystal/gcrystal.schemas.in.h:7 msgid "" "Default Euler's spin angle for model display. Acceptable values are -180. to " "+ 180." msgstr "" +"Domyślny kąt obrotu Eulera dla wyświetlania modelu. Akceptowane wartości od -" +"180 do +180." #: ../programs/crystal/gcrystal.schemas.in.h:8 msgid "Default field of view" @@ -1397,23 +3815,22 @@ #: ../programs/crystal/gcrystal.schemas.in.h:9 msgid "Default nutation" -msgstr "" +msgstr "Domyślna nutacja" #: ../programs/crystal/gcrystal.schemas.in.h:10 msgid "Default precession" -msgstr "" +msgstr "Domyślna precesja" #: ../programs/crystal/gcrystal.schemas.in.h:11 msgid "Default spin" -msgstr "" +msgstr "Domyślny obrót" #: ../programs/crystal/gcrystal.schemas.in.h:12 msgid "Field of view used by default for the model display." msgstr "Kąt widzenia używany do pokazywania modelu." #: ../programs/crystal/gcrystal.schemas.in.h:13 -msgid "" -"Green value for the default background color. Acceptable values are 0. to 1." +msgid "Green value for the default background color. Acceptable values are 0. to 1." msgstr "" "Wartość składowej zielonej domyślnego koloru tła. Akceptowalne wartości " "zawierają się w przedziale od 0 do 1." @@ -1427,18 +3844,17 @@ msgstr "Rozdzielczość drukowania jeśli nie wykryta automatycznie." #: ../programs/crystal/gcrystal.schemas.in.h:16 -msgid "" -"Red value for the default background color. Acceptable values are 0. to 1." +msgid "Red value for the default background color. Acceptable values are 0. to 1." msgstr "" "Wartość składowej czerwonej domyślnego koloru tła. Akceptowalne wartości " "zawierają się w przedziale od 0 do 1." -#: ../programs/crystal/application.cc:55 +#: ../programs/crystal/application.cc:58 #, c-format msgid "Untitled%d" msgstr "BezTytułu%d" -#: ../programs/crystal/application.cc:261 +#: ../programs/crystal/application.cc:318 #, c-format msgid "" "\"%s\" has been modified since last saving. Do you wish to come back to " @@ -1447,29 +3863,20 @@ "\"%s\" został zmodyfikowany od ostatniego zapisu. Czy chcesz wrócić do " "zapisanej wersji?" -#: ../programs/crystal/atomsdlg.cc:133 -msgid "Atom" -msgstr "Atom" - -#: ../programs/crystal/atomsdlg.cc:187 ../programs/crystal/atomsdlg.cc:282 -#: ../programs/crystal/atomsdlg.cc:415 -msgid "Unknown" -msgstr "Nieznany" - #. Note for translators: c.n. is for coordination number -#: ../programs/crystal/atomsdlg.cc:555 +#: ../programs/crystal/atomsdlg.cc:624 msgid " c.n.=" msgstr " l. k.=" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "low spin" msgstr "spin niski" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "high spin" msgstr "spin wysoki" -#: ../programs/crystal/atomsdlg.cc:563 +#: ../programs/crystal/atomsdlg.cc:632 msgid "Database" msgstr "Baza danych" @@ -1477,11 +3884,23 @@ msgid "The sum of the three angles must be less than 360°" msgstr "Suma trzech kątów musi być mniejsza niż 360°" +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "h" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "k" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "l" + #: ../programs/crystal/cleavagesdlg.cc:128 msgid "Planes cleaved" -msgstr "" +msgstr "Przecinane płaszczyzny" -#: ../programs/crystal/document.cc:237 +#: ../programs/crystal/document.cc:313 #, c-format msgid "" "Could not save file\n" @@ -1490,370 +3909,1196 @@ "Nie można zapisać pliku\n" "%s" -#: ../programs/crystal/document.cc:240 -#, c-format -msgid "" -"Could not load file\n" -"%s" -msgstr "" -"Nie można wczytać pliku\n" -"%s" +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" +msgstr "x1" + +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" +msgstr "y1" + +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" +msgstr "z1" + +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "x2" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "y2" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" +msgstr "z2" -#: ../programs/crystal/document.cc:243 -#, c-format -msgid "" -"%s: invalid xml file.\n" -"Tree is empty?" -msgstr "" -"%s: nieprawidłowy plik xml. \n" -"Drzewo jest puste?" - -#: ../programs/crystal/document.cc:246 -#, c-format -msgid "%s: invalid file format." -msgstr "%s: nieprawidłowy format pliku." - -#: ../programs/crystal/document.cc:594 -#, c-format -msgid "\"%s\" has been modified. Do you wish to save it?" -msgstr "\"%s\" został zmodyfikowany. Czy chcesz go zapisać?" - -#: ../programs/crystal/linesdlg.cc:178 +#: ../programs/crystal/linesdlg.cc:180 msgid "Single" msgstr "Pojedynczy" -#: ../programs/crystal/main.cc:76 -msgid "Gnome Chemistry Utils version: " -msgstr "Wersja Gnome Chemistry Utils: " - -#: ../programs/crystal/main.cc:104 -msgid " [file...]" -msgstr " [plik...]" - -#: ../programs/crystal/window.cc:122 ../programs/crystal/window.cc:383 -msgid "Gnome Crystal" -msgstr "Gnome Crystal" - -#: ../programs/crystal/window.cc:125 -msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" -msgstr "GChem3D jest lekką przeglądarką struktur krystalicznych dla Gnome" - -#: ../programs/crystal/window.cc:126 -msgid "Copyright © 1999-2007 by Jean Bréfort" -msgstr "Prawa autorskie © 1999-2007 Jean Bréfort" - -#: ../programs/crystal/window.cc:248 -msgid "_New File" -msgstr "_Nowy plik" - -#: ../programs/crystal/window.cc:249 -msgid "Create a new file" -msgstr "Stwórz nowy plik" - -#: ../programs/crystal/window.cc:252 -msgid "_Save" -msgstr "_Zapisz" +#: ../programs/crystal/main.cc:88 +msgid "Gnome Chemistry Utils version: " +msgstr "Wersja Gnome Chemistry Utils: " -#: ../programs/crystal/window.cc:253 -msgid "Save the current file" -msgstr "Zapisz bieżący plik" +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 +msgid " [file...]" +msgstr " [plik...]" -#: ../programs/crystal/window.cc:254 -msgid "Save _As..." -msgstr "Zapisz _jako..." +#: ../programs/crystal/window.cc:148 ../programs/crystal/window.cc:404 +msgid "Gnome Crystal" +msgstr "Gnome Crystal" -#: ../programs/crystal/window.cc:255 -msgid "Save the current file with a different name" -msgstr "Zapisz bieżący plik pod inną nazwą" +#: ../programs/crystal/window.cc:151 +msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" +msgstr "GChem3D jest lekką przeglądarką struktur krystalicznych dla Gnome" -#: ../programs/crystal/window.cc:259 -msgid "Print the current file" -msgstr "Wydrukuj bieżący plik" +#: ../programs/crystal/window.cc:152 +msgid "Copyright © 1999-2008 by Jean Bréfort" +msgstr "Prawa autorskie © 1999-2008 Jean Bréfort" -#: ../programs/crystal/window.cc:263 +#: ../programs/crystal/window.cc:302 msgid "Quit Gnome Crystal" msgstr "Zakończ Gnome Crystal" -#: ../programs/crystal/window.cc:264 -msgid "_Edit" -msgstr "_Edycja" - -#: ../programs/crystal/window.cc:265 +#: ../programs/crystal/window.cc:304 msgid "Prefere_nces..." msgstr "P_referencje..." -#: ../programs/crystal/window.cc:266 -msgid "Configure the application" -msgstr "Skonfiguruj aplikację" - -#: ../programs/crystal/window.cc:267 +#: ../programs/crystal/window.cc:306 msgid "_Crystal" msgstr "_Kryształ" -#: ../programs/crystal/window.cc:268 +#: ../programs/crystal/window.cc:307 msgid "_Lattice..." -msgstr "" +msgstr "_Sieć..." -#: ../programs/crystal/window.cc:269 +#: ../programs/crystal/window.cc:308 msgid "Define the lattice" -msgstr "" +msgstr "Zdefiniuj sieć" -#: ../programs/crystal/window.cc:270 +#: ../programs/crystal/window.cc:309 msgid "_Atoms..." msgstr "_Atomy..." -#: ../programs/crystal/window.cc:271 +#: ../programs/crystal/window.cc:310 msgid "Add or edit atoms" msgstr "Dodaj lub edytuj atomy" -#: ../programs/crystal/window.cc:272 +#: ../programs/crystal/window.cc:311 msgid "_Bonds and lines..." msgstr "_Wiązania i linie..." -#: ../programs/crystal/window.cc:273 +#: ../programs/crystal/window.cc:312 msgid "Add or edit bonds and lines" msgstr "Dodaj lub edytuj wiązania i linie" -#: ../programs/crystal/window.cc:274 +#: ../programs/crystal/window.cc:313 msgid "_Size..." msgstr "_Rozmiar" -#: ../programs/crystal/window.cc:275 +#: ../programs/crystal/window.cc:314 msgid "Define size" msgstr "Zdefiniuj rozmiar" -#: ../programs/crystal/window.cc:276 +#: ../programs/crystal/window.cc:315 msgid "_Cleavages..." -msgstr "" +msgstr "_Przekroje..." -#: ../programs/crystal/window.cc:277 +#: ../programs/crystal/window.cc:316 msgid "Add or edit cleavages to remove some planes" -msgstr "" +msgstr "Dodaj lub edytuj przekroje aby usunąć pewne płaszczyzny" -#: ../programs/crystal/window.cc:279 +#: ../programs/crystal/window.cc:318 msgid "View _settings..." msgstr "_Ustawienia widoku..." -#: ../programs/crystal/window.cc:280 +#: ../programs/crystal/window.cc:319 msgid "Choose background color and model position" msgstr "Wybierz kolor tła i pozycję modelu" -#: ../programs/crystal/window.cc:281 -msgid "_Windows" -msgstr "_Okna" - -#: ../programs/crystal/window.cc:282 +#: ../programs/crystal/window.cc:321 msgid "Create new _window" msgstr "Stwórz nowe _okno" -#: ../programs/crystal/window.cc:283 +#: ../programs/crystal/window.cc:322 msgid "Create a new window" msgstr "Stwórz nowe okno" -#: ../programs/crystal/window.cc:284 +#: ../programs/crystal/window.cc:323 msgid "_Close this window" msgstr "Za_mknij to okno" -#: ../programs/crystal/window.cc:285 +#: ../programs/crystal/window.cc:324 msgid "Close the current window" msgstr "Zamknij bieżące okno" -#: ../programs/crystal/window.cc:288 +#: ../programs/crystal/window.cc:327 msgid "View help for Gnome Crystal" msgstr "Zobacz pomoc dla Gnome Crystal" -#: ../programs/crystal/window.cc:296 +#: ../programs/crystal/window.cc:337 msgid "About Gnome Crystal" msgstr "Informacje o Gnome Crystal" -#: ../programs/crystal/window.cc:445 -msgid "Ready" -msgstr "Gotowy" +#: ../programs/paint/gchempaint.desktop.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "Edytuj dwuwymiarowe wzory chemiczne" + +#: ../programs/paint/gchempaint.desktop.in.h:2 +msgid "GChemPaint Chemical Structures Editor " +msgstr "Edytor wzorów strukturalnych GChemPaint" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "Rodzina czcionek wzoru chemicznego." + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "Rozmiar czcionki wzoru chemicznego." + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "Rozciągnięcie czcionki wzoru chemicznego." + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "Styl czcionki wzoru chemicznego." + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "Wariant czcionki wzoru chemicznego." + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "Ciężar czcionki wzoru chemicznego." -#: ../programs/table/gchemtable-app.cc:102 -msgid "GChemTable is a chemical periodic table of the elements application" +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "" +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." +msgstr "" +"Współczynnik kompresji podczas zapisywania plików. Poprawne wartości to 0 " +"(brak kompresji) do 9." + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "Domyślny kąt między dwoma wiązaniami." + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." +msgstr "" +"Domyślny kąt między dwoma kolejnymi wiązaniami w łańcuchy w stopniach. " +"Używany przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:10 +msgid "Default arrow length" +msgstr "Domyślna długość strzałki" + +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "Domyślna długość strzałki w pikometrach. Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Domyślna grubość linii strzałki, w pikselach (dla powiększenia 100%). " +"Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "Domyślna grubość linii strzałki." + +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" +msgstr "Domyślna długość wiązania" + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "Domyślna długość wiązania w pikometrach. Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Domyślna grubość linii wiązania, w pikselach (dla powiększenia 100%). " +"Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "Domyślna grubość linii wiązania." + +#: ../programs/paint/gchempaint.schemas.in.h:20 +msgid "Default charge sign size." +msgstr "Domyślny rozmiar znaku ładunku." + +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "Domyślna odległość pomiędzy dwiema liniami dla podwójnych strzałek." + +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "Domyślna odległość pomiędzy dwiema liniami w wiązaniu wielokrotnym." + +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "" +"Domyślna odległość pomiędzy dwiema liniami dla podwójnych strzałek lub dla " +"strzałek retrosyntezy, w pikselach (dla powiększenia 100%). Używana przez " +"domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" +"Domyślna odległość pomiędzy dwiema liniami w wiązaniu wielokrotnym, w " +"pikselach (dla powiększenia 100%). Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format +msgid "" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." +msgstr "" +"Domyślna odległość pomiędzy dwiema liniami dla klinów przerywanych, w " +"pikselach (dla powiększenia 100%). Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." +msgstr "" +"Domyślna odległość pomiędzy punktem początkowym grota strzałki a punktem, " +"którym łączy się z osią, w pikselach (dla powiększenia 100%). Używana przez " +"domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "" +"Domyślna odległość pomiędzy punktem początkowym grota strzałki a punktem, " +"którym łączy się z osią." + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Domyślna odległość pomiędzy punktem początkowym a punktami końcowymi grota " +"strzałki, mierzona wzdłuż osi w pikselach (dla powiększenia 100%). Używana " +"przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" +"Domyślna odległość pomiędzy punktem początkowym a punktami końcowymi grota " +"strzałki, mierzona wzdłuż osi." + +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Domyślna odległość pomiędzy punktami końcowymi grota strzałki a brzegiem " +"osi, w pikselach (dla powiększenia 100%). Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "Domyślna odległość pomiędzy punktami końcowymi grota strzałki a brzegiem osi." + +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "Domyślny dodatkowy odstęp po współczynniku stechiometrycznym." + +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Domyślny dodatkowy odstęp pomiędzy współczynnikiem stechiometrycznym a " +"powiązaną z nim cząsteczką, w pikselach (dla powiększenia 100%). Używany " +"przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "Domyślna rodzina czcionek używana dla tekstu. Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." +msgstr "" +"Domyślne rozciągnięcie czcionki tekstu (0 = ultra-skondensowana; 1 = ekstra-" +"skondensowana; 3 = półskondensowana; 4 = normalna; 5= półrozciągnięta; 6 = " +"rozciągnięta; 7 = ekstra-rozciągnięta; 8 = ultra-rozciągnięta). Używana w " +"domyślnym motywie." + +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" +"Domyślny styl czcionki używanej przez tekst (0 = normalny; 1 = pochyły; 2 = " +"kursywa). Używany przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." +msgstr "" +"Domyślny wariant czcionki używanej przez tekst (0 = normalny; 1 = " +"kapitaliki). Używany przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." +msgstr "" +"Domyślny ciężar czcionki używanej przez tekst (2 = ultralekka; 3 = lekka; 4 " +"= normalna; 6 = półpogrubiona; 7 = pogrubiona; 8 = ultrapogrubiona; 9 = " +"ciężka). Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:46 +msgid "Default hash line width." +msgstr "Domyślna grubość linii klina przerywanego." + +#: ../programs/paint/gchempaint.schemas.in.h:47 +msgid "Default hash lines distance." +msgstr "Domyślna odległość między liniami klina przerywanego." + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Domyślna największa grubość klinów wypełnionych i przerywanych (dla " +"powiększenia 100%. Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "Domyślna największa grubość klinów wypełnionych i przerywanych." + +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Domyślna grubość linii dla klinów przerywanych, w pikselach (dla " +"powiększenia 100%). Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:53 +msgid "Default padding around arrows." +msgstr "Domyślny odstęp wokół strzałek." + +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Domyślny odstęp między znakiem '+' w równaniu reakcji a symbolami reagentów, " +"w pikselach (dla powiększenia 100%). Używany przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "Domyślny odstęp między znakiem '+' w równaniu reakcji a symbolami reagentów." + +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "Domyślny odstęp między wyrównanymi obiektami." + +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." +msgstr "" +"Domyślny odstęp między strzałkami a powiązanymi obiektami, w pikselach (dla " +"powiększenia 100%). Używany przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "Domyślny odstęp dla tekstu." + +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." +msgstr "" +"Domyślny odstęp dodawany pomiędzy kolejnymi obiektami podcas operacji " +"wyrównywania, w pikselach (dla powiększenia 100%). Używany przez domyślny " +"motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Domyślny rozmiar znaku ładunku, w pikselach (dla powiększenia 100%). Używany " +"przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "Domyślna rodzina czcionki tekstu." + +#: ../programs/paint/gchempaint.schemas.in.h:66 +msgid "Default text font size." +msgstr "Domyślny rozmiar czcionki tekstu." + +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "Domyślnie rozciągnięcie czcionki tekstu." + +#: ../programs/paint/gchempaint.schemas.in.h:68 +msgid "Default text font style." +msgstr "Domyślny styl czcionki tekstu." + +#: ../programs/paint/gchempaint.schemas.in.h:69 +msgid "Default text font variant." +msgstr "Domyślny wariant czcionki tekstu." + +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "Domyślny ciężar czcionki tekstu." + +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "Domyślny motyw używany podczas tworzenia nowego pliku." + +#: ../programs/paint/gchempaint.schemas.in.h:72 +msgid "Default theme." +msgstr "Domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." +msgstr "Współczynnik kompresji pliku." + +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." +msgstr "" +"Rodzina czcionek używana przez wzory chemiczne (atomy i fragmenty). Używana " +"przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." +msgstr "" +"Rozmiar czcionek używana przez wzory chemiczne (atomy i fragmenty). Używana " +"przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "Rozmiar czcionki używanej przez tekst. Używany przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." +msgstr "" +"Rozciągnięcie czcionki wzorów, takiej jak atomy i fragmenty (0 = ultra-" +"skondensowana; 1 = ekstra-skondensowana; 3 = półskondensowana; 4 = normalna; " +"5= półrozciągnięta; 6 = rozciągnięta; 7 = ekstra-rozciągnięta; 8 = ultra-" +"rozciągnięta). Używane przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "" +"Styl czcionki używanej przez wzory chemiczne, jak atomy i fragmenty (0 = " +"normalny; 1 = pochyły; 2 = kursywa). Używany przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." +msgstr "" +"Wariant czcionki używany przez wzory chemiczne, jak atomy i fragmenty (0 = " +"normalny; 1 = kapitaliki). Używany przez domyślny motyw," + +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." +msgstr "" +"Domyślny ciężar czcionki używanej przez wzory chemiczne takie jak atomy i " +"fragmenty (2 = ultralekka; 3 = lekka; 4 = normalna; 6 = półpogrubiona; 7 = " +"pogrubiona; 8 = ultrapogrubiona; 9 = ciężka). Używana przez domyślny motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "Jeśli PRAWDA, STRING_UTF8 oraz STRING są dodawane do formatów schowka." + +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." +msgstr "" +"Jeśli włączone, okienko wyskakujące układu okresowego będzie można oderwać " +"od paska narzędzi." + +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." msgstr "" -"GChemTable jest aplikacją zawierającą układ okresowy pierwiastów chemicznych" +"Odstęp używany wokoło obiektów tekstowych, takich jak atomy, teksty i inne " +"znaki typograficzne, w pikselach (dla powiększenia 100%). Używany w " +"domyślnym motywie." + +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "Skala (pm na piksel)." + +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." +msgstr "" +"Skala używana do konwersji rzeczywistego dystansu na dystans na płótnie " +"wyrażona w pm na piksel (dla powiększenia 100%). Używana przez domyślny " +"motyw." + +#: ../programs/paint/gchempaint.schemas.in.h:88 +msgid "Whether the periodic table is tearable." +msgstr "Czy układ okresowy da się oderwać." + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "Czy eksportować prosty tekst podczas kopiowania" + +#: ../programs/paint/main.cc:46 +msgid "GChemPaint version: " +msgstr "Wersja GChemPaint: " + +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" +msgstr "GSpectrum" + +#: ../programs/spectra/gspectrum.desktop.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "Przeglądarka widm dla pulpitu GNOME" + +#: ../programs/spectra/gspectrum.desktop.in.h:2 +msgid "Spectrum viewer " +msgstr "Przeglądarka widm" + +#: ../programs/spectra/window.cc:124 +msgid "GSpectrum is a spectrum viewer for Gnome" +msgstr "GSpectrum jest przeglądarką widm dla Gnome" #. const gchar * documentors[] = {NULL}; -#: ../programs/table/gchemtable-app.cc:104 -msgid "Copyright © 2005-2007 Jean Bréfort" -msgstr "Prawa autorskie © 2005-2007 Jean Bréfort" +#: ../programs/spectra/window.cc:126 +msgid "Copyright © 2007-2008 Jean Bréfort\n" +msgstr "Prawa autorskie © 2007-2008 Jean Bréfort\n" + +#: ../programs/spectra/window.cc:180 +msgid "Quit GSpectrum" +msgstr "Zakończ GSpectrum" + +#: ../programs/spectra/window.cc:186 +msgid "View help for the Spectra Viewer" +msgstr "Zobacz pomoc dla Przeglądarki Widm" + +#: ../programs/spectra/window.cc:196 +msgid "About GSpectrum" +msgstr "Informacje o GSpectrum" + +#: ../programs/table/gchemtable-app.cc:135 +msgid "New _Chart" +msgstr "Nowy _wykres" + +#: ../programs/table/gchemtable-app.cc:136 +msgid "Create a new chart" +msgstr "Utwórz nowy wykres" -#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-app.cc:138 +#: ../programs/table/gchemtable-curve.cc:224 msgid "Quit GChemTable" msgstr "Zakończ GChemTable" -#: ../programs/table/gchemtable-app.cc:145 +#: ../programs/table/gchemtable-app.cc:140 msgid "Color scheme" msgstr "Schemat kolorów" -#: ../programs/table/gchemtable-app.cc:146 +#: ../programs/table/gchemtable-app.cc:141 msgid "No colors" msgstr "Brak kolorów" -#: ../programs/table/gchemtable-app.cc:147 +#: ../programs/table/gchemtable-app.cc:142 msgid "Use default Gtk theme colors" msgstr "Użyj domyślnych kolorów Gtk" -#: ../programs/table/gchemtable-app.cc:148 -msgid "Default" -msgstr "Domyślny" - -#: ../programs/table/gchemtable-app.cc:149 +#: ../programs/table/gchemtable-app.cc:144 msgid "Use default symbolic element colors" msgstr "Użyj domyślnych kolorów pierwiastków" -#: ../programs/table/gchemtable-app.cc:150 +#: ../programs/table/gchemtable-app.cc:145 msgid "Physical states" msgstr "Stany skupienia" -#: ../programs/table/gchemtable-app.cc:151 +#: ../programs/table/gchemtable-app.cc:146 msgid "Use colors to display physical state at a given temperature" msgstr "Użyj kolorów do wyświetlenia stanu skupienia w danej temperaturze" -#: ../programs/table/gchemtable-app.cc:153 -msgid "Family" -msgstr "Rodzina" - -#: ../programs/table/gchemtable-app.cc:154 +#: ../programs/table/gchemtable-app.cc:149 msgid "Use colors to display the family grouping of the elements" msgstr "Użyj kolorów do wyświetlenia rodzinnego grupowania pierwiastków" -#: ../programs/table/gchemtable-app.cc:156 +#: ../programs/table/gchemtable-app.cc:151 msgid "Acidity" msgstr "Kwasowość" -#: ../programs/table/gchemtable-app.cc:157 +#: ../programs/table/gchemtable-app.cc:152 msgid "Use colors to display the acidity of the elements" msgstr "Użyj kolorów do wyświetlenia kwasowości pierwiastków" +#: ../programs/table/gchemtable-app.cc:154 +msgid "Electronegativity" +msgstr "Elektroujemność" + +#: ../programs/table/gchemtable-app.cc:155 +msgid "Use colors to display the electronegativity of the elements" +msgstr "Użyj kolorów do wyświetlenia elektroujemności pierwiastków" + +#: ../programs/table/gchemtable-app.cc:157 +msgid "Atomic radius" +msgstr "Promień atomowy" + +#: ../programs/table/gchemtable-app.cc:158 +msgid "Use colors to display the covalent radii of the elements" +msgstr "Użyj kolorów do wyświetlenia promieni kowalencyjnych pierwiastków" + +#: ../programs/table/gchemtable-app.cc:160 +msgid "Block" +msgstr "Blok" + #: ../programs/table/gchemtable-app.cc:161 +msgid "Use colors to display the blocks elements belong to" +msgstr "Użyj kolorów do wyświetlenia bloków do których należą pierwiastki" + +#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/table/gchemtable-curve.cc:230 msgid "View help for the Periodic Table" msgstr "Zobacz pomoc dla Układu okresowego" -#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:242 msgid "About GChemTable" msgstr "Informacje o GChemTable" +#: ../programs/table/gchemtable-app.cc:343 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "GChemTable jest aplikacją zawierającą układ okresowy pierwiastów chemicznych" + #. The markup at the end of the chain is there to ensure that #. things will be correcly aligned, add the same to the translated string -#: ../programs/table/gchemtable-elt.cc:64 +#: ../programs/table/gchemtable-elt.cc:61 msgid "Electronic configuration: " msgstr "Konfiguracja elektronowa: " -#: ../programs/table/gchemtable-elt.cc:76 +#: ../programs/table/gchemtable-elt.cc:73 msgid "Lang" msgstr "Język" -#: ../programs/table/gchemtable-elt.cc:83 +#: ../programs/table/gchemtable-elt.cc:80 msgid "Name" msgstr "Nazwa" -#: ../programs/table/gchemtable-elt.cc:109 -#: ../programs/table/gchemtable-elt.cc:152 -#: ../programs/table/gchemtable-elt.cc:188 -#: ../programs/table/gchemtable-elt.cc:211 -#: ../programs/table/gchemtable-elt.cc:225 -#: ../programs/table/gchemtable-elt.cc:239 -#: ../programs/table/gchemtable-elt.cc:261 +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 msgid "n.a." msgstr "b.d." -#: ../programs/table/gchemtable-elt.cc:121 -#: ../programs/table/gchemtable-elt.cc:162 +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 #, c-format msgid "%d:" msgstr "%d:" -#: ../programs/table/gchemtable-elt.cc:273 +#: ../programs/table/gchemtable-elt.cc:271 msgid "Ion" msgstr "Jon" #. C.N. stands for coordination number -#: ../programs/table/gchemtable-elt.cc:280 +#: ../programs/table/gchemtable-elt.cc:278 msgid "C.N." msgstr "L.K." -#: ../programs/table/gchemtable-elt.cc:285 +#: ../programs/table/gchemtable-elt.cc:283 msgid "Spin" msgstr "Spin" -#: ../programs/table/gchemtable-elt.cc:292 +#: ../programs/table/gchemtable-elt.cc:290 msgid "Value" msgstr "Wartość" -#: ../programs/table/gchemtable-elt.cc:311 +#: ../programs/table/gchemtable-elt.cc:310 msgid "Low" msgstr "Niski" -#: ../programs/table/gchemtable-elt.cc:314 +#: ../programs/table/gchemtable-elt.cc:313 msgid "High" msgstr "Wysoki" -#: ../programs/table/gchemtable-curve.cc:183 -#: ../programs/table/gchemtable-curve.cc:187 +#: ../programs/table/gchemtable-curve.cc:220 +msgid "Modify the graph properties" +msgstr "Zmień właściwości wykresu" + +#: ../programs/table/gchemtable-curve.cc:232 +msgid "View help for the Curve Window" +msgstr "Zobacz pomoc dla okna krzywych" + +#: ../programs/table/gchemtable-curve.cc:324 +#: ../programs/table/gchemtable-curve.cc:328 +#: ../programs/table/gchemtable-data.cc:524 msgid "Pauling electronegativity" msgstr "Elektroujemność wg Paulinga" -#: ../programs/table/gchemtable-curve.cc:199 +#: ../programs/table/gchemtable-curve.cc:340 msgid "Electron affinity (kJ/mol)" msgstr "Powinowactwo elektronowe (kJ/mol)" -#: ../programs/table/gchemtable-curve.cc:203 +#: ../programs/table/gchemtable-curve.cc:344 msgid "Electron affinity" msgstr "Powinowactwo elektronowe" -#: ../programs/table/gchemtable-curve.cc:217 +#: ../programs/table/gchemtable-curve.cc:358 msgid "1st. " msgstr "Pierwsza " -#: ../programs/table/gchemtable-curve.cc:220 +#: ../programs/table/gchemtable-curve.cc:361 msgid "2nd. " msgstr "Druga " -#: ../programs/table/gchemtable-curve.cc:223 +#: ../programs/table/gchemtable-curve.cc:364 msgid "3rd. " msgstr "Trzecia " -#: ../programs/table/gchemtable-curve.cc:226 +#: ../programs/table/gchemtable-curve.cc:367 #, c-format msgid "%dth. " msgstr "%d-ta" -#: ../programs/table/gchemtable-curve.cc:229 +#: ../programs/table/gchemtable-curve.cc:370 msgid "ionization energy (MJ/mol)" msgstr "energia jonizacji (MJ/mol)" -#: ../programs/table/gchemtable-curve.cc:236 +#: ../programs/table/gchemtable-curve.cc:377 msgid "ionization energy" msgstr "energia jonizacji" -#: ../programs/table/gchemtable-curve.cc:255 -#: ../programs/table/gchemtable-curve.cc:259 +#: ../programs/table/gchemtable-curve.cc:396 +#: ../programs/table/gchemtable-curve.cc:400 msgid "Covalent radii" msgstr "Promienie kowalencyjne" -#: ../programs/table/gchemtable-curve.cc:275 -#: ../programs/table/gchemtable-curve.cc:279 +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 msgid "Van der Waals radii" msgstr "Promienie van der Waalsa" -#: ../programs/table/gchemtable-curve.cc:295 -#: ../programs/table/gchemtable-curve.cc:299 +#: ../programs/table/gchemtable-curve.cc:436 +#: ../programs/table/gchemtable-curve.cc:440 msgid "Metallic radii" msgstr "Promienie metaliczne" -#: ../programs/table/gchemtable-curve.cc:310 -#: ../programs/table/gchemtable-curve.cc:314 +#: ../programs/table/gchemtable-curve.cc:451 +#: ../programs/table/gchemtable-curve.cc:455 msgid "Melting point" msgstr "Temperatura topnienia" -#: ../programs/table/gchemtable-curve.cc:325 -#: ../programs/table/gchemtable-curve.cc:329 +#: ../programs/table/gchemtable-curve.cc:466 +#: ../programs/table/gchemtable-curve.cc:470 msgid "Boiling point" msgstr "Temperatura wrzenia" +#: ../programs/table/gchemtable-curve.cc:485 +#: ../programs/table/gchemtable-data.cc:522 +msgid "Atomic number" +msgstr "Liczba atomowa" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +msgid "Invalid data" +msgstr "Nieprawidłowe dane" + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "Niewspierane" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +msgid "None" +msgstr "Brak" + +#: ../programs/table/gchemtable-data.cc:523 +msgid "Atomic mass" +msgstr "Masa atomowa" + +#: ../programs/table/gchemtable-data.cc:525 +msgid "First ionization energy" +msgstr "Pierwsza energia jonizacji" + +#: ../programs/table/gchemtable-data.cc:526 +msgid "Second ionization energy" +msgstr "Druga energia jonizacji" + +#: ../programs/table/gchemtable-data.cc:527 +msgid "Third ionization energy" +msgstr "Trzecia energia jonizacji" + +#: ../programs/table/gchemtable-data.cc:528 +msgid "Electronic affinity" +msgstr "Powinowactwo elektronowe" + +#: ../programs/table/gchemtable-data.cc:529 +msgid "Covalent radius" +msgstr "Promień kowalencyjny" + +#: ../programs/table/gchemtable-data.cc:530 +msgid "Van der Waals radius" +msgstr "Promień van der Waalsa" + +#: ../programs/table/gchemtable-data.cc:531 +msgid "Metallic radius" +msgstr "Promień metaliczny" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Fusion temperature" +msgstr "Temperatura krzepnięcia" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Ebullition temperature" +msgstr "Temperatura wrzenia" + #: ../programs/table/gchemtable.desktop.in.h:1 msgid "A Mendeleiev table of the chemical elements" msgstr "Układ okresowy pierwiastków Mendelejewa" + +#: ../programs/table/gchemtable.desktop.in.h:2 +msgid "Periodic table of the elements " +msgstr "Układ okresowy pierwiastków" + +#: ../templates/paint/haworth.xml.in.h:1 +msgid "Saccharides" +msgstr "Sacharydy" + +#: ../templates/paint/haworth.xml.in.h:2 +msgid "α-D-deoxyribofuranose" +msgstr "α-D-deoksyrybofuranoza" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "α-D-fruktofuranoza" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "α-D-galaktopiranoza" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "α-D-glukopiranoza" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "α-D-rybofuranoza" + +#: ../templates/paint/haworth.xml.in.h:7 +msgid "β-D-deoxyribofuranose" +msgstr "α-D-deoksyrybofuranoza" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "α-D-fruktofuranoza" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "β-D-galaktopiranoza" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "β-D-glukopiranoza" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "β-D-rybofuranoza" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "Adenina" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "Adenozyna" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "Alanina" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "Aminokwasy" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "Antracen" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "Arginina" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "Węglowodory aromatyczne" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "Asparagina" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "Kwas asparaginowy" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "Azulen" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "Benzen" + +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "Cysteina" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "Cytydyna" + +#: ../templates/paint/templates.xml.in.h:14 +msgid "Cytosine" +msgstr "Cytozyna" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "Deoksyadenozyna" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "Deoksycytydna" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "Deoksyguanozyna" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "Deoksytymina" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "Kwas glutaminowy" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "Glutamina" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "Glicyna" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "Guanina" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "Guanozyna" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "Histydyna" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "Izoleucyna" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "Leucyna" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "Lizyna" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "Metionina" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "Naftalen" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "Zasady azotowe" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "Nukleozydy" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "Fenantren" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "Fenyloalanina" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "Prolina" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "Piren" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "Seryna" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "Treonina" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "Tymina" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "Tryptofan" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "Tyrozyna" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "Uracyl" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "Urydyna" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "Walina" + +#~ msgid "Author" +#~ msgstr "Autor" + +#~ msgid "Comments" +#~ msgstr "Komentarze" + +#~ msgid "E-mail:" +#~ msgstr "E-mail:" + +#, fuzzy +#~ msgid "Name:" +#~ msgstr "Imię i _nazwisko:" + +#~ msgid "Title:" +#~ msgstr "Tytuł:" + +#~ msgid "Copyright © 2005-2007 Jean Bréfort\n" +#~ msgstr "Prawa autorskie © 2005-2007 Jean Bréfort\n" + +#~ msgid "Chemical calculator @STABILITY_POSTFIX@" +#~ msgstr "Kalkulator chemiczny @STABILITY_POSTFIX@" + +#~ msgid "Spectrum viewer @STABILITY_POSTFIX@" +#~ msgstr "Przeglądarka widm @STABILITY_POSTFIX@" + +#~ msgid "Copyright © 2007 Jean Bréfort\n" +#~ msgstr "Prawa autorskie © 2007 Jean Bréfort\n" + +#~ msgid "Periodic table of the elements @STABILITY_POSTFIX@" +#~ msgstr "Układ okresowy pierwiastków @STABILITY_POSTFIX@" + +#~ msgid "2D chemical structures types" +#~ msgstr "Rodzaje dwuwymiarowych struktur chemicznych" + +#~ msgid "Generate Smiles" +#~ msgstr "Wygeneruj SMILES" + +#~ msgid "Could not open file %s." +#~ msgstr "Nie można otworzyć pliku %s." + +#~ msgid "About GChemPaint..." +#~ msgstr "O programie GChemPaint..." + +#~ msgid "Displays copyright and contributors of GChemPaint" +#~ msgstr "" +#~ "Powoduje wyświetlenie informacji o twórcach i prawach autorskich dla " +#~ "programu GChemPaint" + +#~ msgid "Edit file propeties" +#~ msgstr "Edycja właściwości pliku" + +#~ msgid "GChemPaint T_ools" +#~ msgstr "_Narzędzia GChemPaint" + +#~ msgid "Print file to the printer" +#~ msgstr "Drukuj plik" + +#~ msgid "Proper_ties" +#~ msgstr "Właściw_ości dokumentu" + +#~ msgid "Show the periodic table of the elements" +#~ msgstr "Pokaż układ okresowy pierwiastków" + +#~ msgid "Show tools window" +#~ msgstr "Pokaż okno narzędzi" + +#~ msgid "_Periodic table" +#~ msgstr "_Układ okresowy" + +#~ msgid "_Print" +#~ msgstr "_Drukuj" + diff -Nru gnome-chemistry-utils-0.8.6/po/POTFILES.in gnome-chemistry-utils-0.10.9/po/POTFILES.in --- gnome-chemistry-utils-0.8.6/po/POTFILES.in 2007-05-09 09:17:36.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/POTFILES.in 2009-11-14 11:30:40.000000000 +0100 @@ -1,39 +1,120 @@ [encoding: UTF-8] +gchemutils.schemas.in gchemutils.xml.in +database/residues.xml.in glade/gchemcalc.glade glade/gtkperiodic.glade glade/image-size.glade glade/image-resolution.glade +glade/print-setup.glade +glade/crystal/bonds.glade glade/crystal/cell.glade +glade/crystal/docprop.glade glade/crystal/prefs.glade glade/crystal/view-settings.glade glade/crystal/atoms.glade glade/crystal/cleavages.glade glade/crystal/lines.glade glade/crystal/size.glade +glade/paint/arrow-object.glade +glade/paint/docprop.glade +glade/paint/H-pos.glade +glade/paint/newfiledlg.glade +glade/paint/preferences.glade +glade/paint/tools.glade +glade/paint/zoom.glade +glade/table/acidity.glade glade/table/eltpage.glade glade/table/state-thermometer.glade glade/table/curve.glade glade/table/family.glade +glade/table/block.glade database/elements.xml.in database/elecprops.xml.in database/isotopes.xml.in database/radii.xml.in -gcu/application.cc -gcu/crystaldoc.cc -gcu/crystalview.cc -gcu/dialog.cc -gcu/element.cc -gcu/filechooser.cc -gcu/formula.cc -gcu/glview.cc -gcu/gtkchem3dviewer.cc -gcu/gtkcomboperiodic.c -gcu/gtkperiodic.c +goffice/plugin.xml.in +goffice/gogcpapp.cc +goffice/gogcpwin.cc +libs/canvas/gcp-canvas-pango.c +libs/gcp/about.cc +libs/gcp/application.cc +libs/gcp/atom.cc +libs/gcp/bond.cc +libs/gcp/docprop.cc +libs/gcp/fontsel.cc +libs/gcp/fragment.cc +libs/gcp/mesomer.cc +libs/gcp/mesomery.cc +libs/gcp/molecule.cc +libs/gcp/preferences.cc +libs/gcp/reactant.cc +libs/gcp/reaction.cc +libs/gcp/reaction-arrow.cc +libs/gcp/reaction-prop.cc +libs/gcp/stringdlg.cc +libs/gcp/text.cc +libs/gcp/theme.cc +libs/gcp/view.cc +libs/gcp/window.cc +libs/gcu/application.cc +libs/gcu/crystaldoc.cc +libs/gcu/crystalview.cc +libs/gcu/dialog.cc +libs/gcu/element.cc +libs/gcu/filechooser.cc +libs/gcu/formula.cc +libs/gcu/glview.cc +libs/gcu/gtkchem3dviewer.cc +libs/gcu/gtkcomboperiodic.c +libs/gcu/gtkperiodic.c +libs/gcu/loader.cc +libs/gcu/print-setup-dlg.cc +libs/gcu/printable.cc +libs/gcu/spectrumdoc.cc +libs/gcu/spectrumview.cc +libs/gcu/value.cc +plugins/loaders/cdx/cdx.cc +plugins/loaders/cdx/plugin.xml.in +plugins/loaders/cdxml/cdxml.cc +plugins/loaders/cdxml/plugin.xml.in +plugins/paint/arrows/arrowtool.cc +plugins/paint/arrows/arrowtool.glade +plugins/paint/arrows/gchempaint-arrows.schemas.in +plugins/paint/arrows/plugin.cc +plugins/paint/arrows/retrosynthesis.cc +plugins/paint/arrows/retrosynthesisstep.cc +plugins/paint/atoms/chargetool.cc +plugins/paint/atoms/electrontool.cc +plugins/paint/atoms/plugin.cc +plugins/paint/bonds/bond.glade +plugins/paint/bonds/bondtool.cc +plugins/paint/bonds/chain.glade +plugins/paint/bonds/chaintool.cc +plugins/paint/bonds/plugin.cc +plugins/paint/cycles/cycle.glade +plugins/paint/cycles/cyclen.glade +plugins/paint/cycles/cycletool.cc +plugins/paint/cycles/plugin.cc +plugins/paint/residues/plugin.cc +plugins/paint/residues/residues-dlg.cc +plugins/paint/residues/residues.glade +plugins/paint/selection/group.cc +plugins/paint/selection/group.glade +plugins/paint/selection/plugin.cc +plugins/paint/selection/selectiontool.cc +plugins/paint/templates/new-template.glade +plugins/paint/templates/plugin.cc +plugins/paint/templates/templates.glade +plugins/paint/templates/templatetool.cc +plugins/paint/text/fontsel.glade +plugins/paint/text/plugin.cc +plugins/paint/wikipedia/plugin.cc +plugins/paint/wikipedia/wikipediatool.cc programs/3d/application.cc programs/3d/main.cc programs/3d/window.cc -programs/3d/gchem3d-viewer.desktop.in +programs/3d/gchem3d.desktop.in programs/calc/gchemcalc.cc programs/calc/gchemcalc.desktop.in programs/crystal/gcrystal.desktop.in @@ -42,12 +123,26 @@ programs/crystal/atomsdlg.cc programs/crystal/celldlg.cc programs/crystal/cleavagesdlg.cc +programs/crystal/docprop.cc programs/crystal/document.cc programs/crystal/linesdlg.cc programs/crystal/main.cc programs/crystal/window.cc programs/crystal/x-gcrystal.desktop.in +programs/paint/gchempaint.desktop.in +programs/paint/gchempaint.schemas.in +programs/paint/main.cc +programs/paint/standaloneapp.cc +programs/paint/x-gchempaint.desktop.in +programs/spectra/application.cc +programs/spectra/gspectrum.desktop.in +programs/spectra/gspectrum.cc +programs/spectra/window.cc programs/table/gchemtable-app.cc programs/table/gchemtable-elt.cc programs/table/gchemtable-curve.cc +programs/table/gchemtable-data-allocator.cc +programs/table/gchemtable-data.cc programs/table/gchemtable.desktop.in +templates/paint/haworth.xml.in +templates/paint/templates.xml.in diff -Nru gnome-chemistry-utils-0.8.6/po/POTFILES.skip gnome-chemistry-utils-0.10.9/po/POTFILES.skip --- gnome-chemistry-utils-0.8.6/po/POTFILES.skip 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/po/POTFILES.skip 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,6 @@ +programs/3d/gchem3d.desktop.in.in +programs/calc/gchemcalc.desktop.in.in +programs/crystal/gcrystal.desktop.in.in +programs/paint/gchempaint.desktop.in.in +programs/spectra/gspectrum.desktop.in.in +programs/table/gchemtable.desktop.in.in diff -Nru gnome-chemistry-utils-0.8.6/po/pt_BR.po gnome-chemistry-utils-0.10.9/po/pt_BR.po --- gnome-chemistry-utils-0.8.6/po/pt_BR.po 2007-10-25 07:07:22.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/pt_BR.po 2009-11-14 11:30:40.000000000 +0100 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gnome-chemistry-utils-0.3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-02-28 18:18+0100\n" +"POT-Creation-Date: 2008-08-24 22:25+0200\n" "PO-Revision-Date: 2007-10-23 12:05-0300\n" "Last-Translator: Grégoire Jean-François Demets \n" "Language-Team: Brasileiro \n" @@ -18,6 +18,183 @@ "X-Poedit-SourceCharset: utf-8\n" "X-Poedit-Bookmarks: 286,243,-1,-1,-1,-1,-1,-1,-1,-1\n" +#: ../gchemutils.schemas.in.h:1 +#, fuzzy +msgid "Default Bottom Margin" +msgstr "Variante padrão da fonte utlizada para o texto." + +#: ../gchemutils.schemas.in.h:2 +#, fuzzy +msgid "Default Left Margin" +msgstr "Variante padrão da fonte utlizada para o texto." + +#: ../gchemutils.schemas.in.h:3 +#, fuzzy +msgid "Default Top Margin" +msgstr "Valor padrão de rotação própria" + +#: ../gchemutils.schemas.in.h:4 +#, fuzzy +msgid "Default Top Outside Margin" +msgstr "Valor padrão de nutação" + +#: ../gchemutils.schemas.in.h:5 +#, fuzzy +msgid "Footer height" +msgstr "Massa molar :" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "" + +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "" + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +msgid "2D Chemical structure" +msgstr "Estrutura Química 2D" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 +msgid "Crystalline structure model" +msgstr "modelo de structure cristalline" + +#: ../database/residues.xml.in.h:1 +#, fuzzy +msgid "Acetyl" +msgstr "Acidez" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "" + +#: ../database/residues.xml.in.h:5 +#, fuzzy +msgid "Benzyl" +msgstr "Benzeno" + +#: ../database/residues.xml.in.h:6 +#, fuzzy +msgid "Butyl" +msgstr "Estilo" + +#: ../database/residues.xml.in.h:7 +#, fuzzy +msgid "Ethyl" +msgstr "Estilo" + +#: ../database/residues.xml.in.h:8 +#, fuzzy +msgid "Halogen" +msgstr "Hidrogênio" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "" + +#: ../database/residues.xml.in.h:12 +#, fuzzy +msgid "Metal" +msgstr "Metálico" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "" + +#: ../database/residues.xml.in.h:14 +#, fuzzy +msgid "Phenyl" +msgstr "Fenilalanina" + +#: ../database/residues.xml.in.h:15 +#, fuzzy +msgid "Propyl" +msgstr "Prolina" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "" + #: ../glade/gchemcalc.glade.h:1 msgid "Chemical calculator" msgstr "Calculadora química" @@ -26,8 +203,7 @@ msgid "Composition" msgstr "Composição" -#: ../glade/gchemcalc.glade.h:3 -#: ../programs/calc/gchemcalc.cc:169 +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 msgid "Formula:" msgstr "Fórmula :" @@ -43,8 +219,7 @@ msgid "Monoisotopic mass:" msgstr "Massa monoisotópica :" -#: ../glade/gchemcalc.glade.h:7 -#: ../programs/calc/gchemcalc.cc:172 +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 msgid "Raw formula:" msgstr "Fórmula bruta :" @@ -68,6 +243,167 @@ msgid "Image resolution:" msgstr "Resolução da imagem" +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "" + +#: ../glade/print-setup.glade.h:3 +#, fuzzy +msgid "Center on page:" +msgstr "_Comentários:" + +#: ../glade/print-setup.glade.h:4 +#, fuzzy +msgid "O_rientation:" +msgstr "Orientação : %g" + +#: ../glade/print-setup.glade.h:5 +#, fuzzy +msgid "Paper:" +msgstr "Propriedade" + +#: ../glade/print-setup.glade.h:6 +#, fuzzy +msgid "Scale" +msgstr "Valor" + +#: ../glade/print-setup.glade.h:7 +msgid "Bottom margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "" + +#: ../glade/print-setup.glade.h:11 +#, fuzzy +msgid "Footer:" +msgstr "Cor :" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:16 +#, fuzzy +msgid "Page" +msgstr "C_olar" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "" + +#: ../glade/print-setup.glade.h:18 +#, fuzzy +msgid "Portrait" +msgstr "Imprimir" + +#: ../glade/print-setup.glade.h:19 +#, fuzzy +msgid "Reload defaults" +msgstr "_Por padrão" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:23 +#, fuzzy +msgid "Save as defaults" +msgstr "_Por padrão" + +#: ../glade/print-setup.glade.h:24 +#, fuzzy +msgid "Scale" +msgstr "Esc_ala:" + +#: ../glade/print-setup.glade.h:25 +#, fuzzy +msgid "Scale to fit _horizontally on" +msgstr "Gira a seleção horizontalmente" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "" + +#: ../glade/print-setup.glade.h:29 +#, fuzzy +msgid "_Automatic scaling:" +msgstr "Automático" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "" + +#: ../glade/print-setup.glade.h:31 +#, fuzzy +msgid "_Footer:" +msgstr "_Cor :" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:33 +#, fuzzy +msgid "_Horizontally" +msgstr "Giro horizontal" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "" + +#: ../glade/print-setup.glade.h:35 +#, fuzzy +msgid "_Vertically" +msgstr "Giro vertical" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:407 +#: ../libs/gcp/preferences.cc:481 ../libs/gcp/preferences.cc:531 +msgid "Bonds" +msgstr "Ligações" + #: ../glade/crystal/cell.glade.h:1 msgid "Cell" msgstr "Malha" @@ -136,6 +472,48 @@ msgid "γ (°):" msgstr "γ (°) :" +#: ../glade/crystal/docprop.glade.h:1 ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 +msgid "*" +msgstr "*" + +#: ../glade/crystal/docprop.glade.h:2 +#, fuzzy +msgid "Author" +msgstr "Âncora" + +#: ../glade/crystal/docprop.glade.h:3 +#, fuzzy +msgid "Comments" +msgstr "_Conteúdo" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "Data de criação :" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "Propriedades do documento" + +#: ../glade/crystal/docprop.glade.h:6 +#, fuzzy +msgid "E-mail:" +msgstr "E-_mail:" + +#: ../glade/crystal/docprop.glade.h:7 +#, fuzzy +msgid "Name:" +msgstr "_Nome :" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "Data de revisão:" + +#: ../glade/crystal/docprop.glade.h:9 +#, fuzzy +msgid "Title:" +msgstr "_Título :" + #: ../glade/crystal/prefs.glade.h:1 msgid "" "300\n" @@ -159,11 +537,15 @@ "Outro" #: ../glade/crystal/prefs.glade.h:10 -msgid "A printer resolution of 300 dpi generally gives a quite acceptable result. Changing to a higher value can lead to a much longer processing time." -msgstr "Uma resolução de impressão de de 300 ppp dá geralmente um resultado aceitável. Alterar para uma resolução maior aumenta consideravelmente o tempo de execução." +msgid "" +"A printer resolution of 300 dpi generally gives a quite acceptable result. " +"Changing to a higher value can lead to a much longer processing time." +msgstr "" +"Uma resolução de impressão de de 300 ppp dá geralmente um resultado " +"aceitável. Alterar para uma resolução maior aumenta consideravelmente o " +"tempo de execução." -#: ../glade/crystal/prefs.glade.h:11 -#: ../glade/crystal/view-settings.glade.h:1 +#: ../glade/crystal/prefs.glade.h:11 ../glade/crystal/view-settings.glade.h:1 msgid "Background color:" msgstr "Cor de fundo :" @@ -171,18 +553,16 @@ msgid "Default views settings" msgstr "Parâmetros de visão padrão" -#: ../glade/crystal/prefs.glade.h:13 -#: ../glade/crystal/view-settings.glade.h:2 +#: ../glade/crystal/prefs.glade.h:13 ../glade/crystal/view-settings.glade.h:2 msgid "Euler's angles" msgstr "Ângulos de Euler" -#: ../glade/crystal/prefs.glade.h:14 -#: ../glade/crystal/view-settings.glade.h:3 +#: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 +#, fuzzy msgid "Field of view (between 1 and 45°):" msgstr "Ângulo do cone de visão (entre 1 e 45°) :" -#: ../glade/crystal/prefs.glade.h:15 -#: ../glade/crystal/view-settings.glade.h:4 +#: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 msgid "Model orientation in space:" msgstr "Orientação do modelo no espaço :" @@ -194,58 +574,70 @@ msgid "Printing" msgstr "Impressão" -#: ../glade/crystal/prefs.glade.h:18 -#: ../glade/crystal/view-settings.glade.h:5 +#: ../glade/crystal/prefs.glade.h:18 ../glade/crystal/view-settings.glade.h:5 msgid "θ (°):" msgstr "θ (°) :" -#: ../glade/crystal/prefs.glade.h:19 -#: ../glade/crystal/view-settings.glade.h:6 +#: ../glade/crystal/prefs.glade.h:19 ../glade/crystal/view-settings.glade.h:6 msgid "φ (°):" msgstr "φ (°) :" -#: ../glade/crystal/prefs.glade.h:20 -#: ../glade/crystal/view-settings.glade.h:7 +#: ../glade/crystal/prefs.glade.h:20 ../glade/crystal/view-settings.glade.h:7 msgid "ψ (°):" msgstr "ψ (°) :" #: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:395 +#: ../libs/gcp/preferences.cc:469 ../libs/gcp/preferences.cc:519 msgid "Atoms" msgstr "Átomos" -#: ../glade/crystal/atoms.glade.h:2 +#: ../glade/crystal/atoms.glade.h:3 msgid "Charge: " msgstr "Carga : " -#: ../glade/crystal/atoms.glade.h:3 +#: ../glade/crystal/atoms.glade.h:4 msgid "Custom" msgstr "Personalizado" -#: ../glade/crystal/atoms.glade.h:4 +#: ../glade/crystal/atoms.glade.h:5 msgid "Custom color:" msgstr "Cor personalizada:" -#: ../glade/crystal/atoms.glade.h:5 -#: ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 #: ../glade/crystal/lines.glade.h:2 msgid "Dele_te all" msgstr "Apagar _tudo" -#: ../glade/crystal/atoms.glade.h:6 -#: ../gcu/gtkcomboperiodic.c:96 -#: ../programs/table/gchemtable-app.cc:253 +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:261 msgid "Periodic table of the elements" msgstr "Tabela periódica dos elementos" -#: ../glade/crystal/atoms.glade.h:7 +#: ../glade/crystal/atoms.glade.h:8 msgid "Radius" msgstr "Raio" -#: ../glade/crystal/atoms.glade.h:8 +#: ../glade/crystal/atoms.glade.h:9 +#, fuzzy +msgid "Scale factor:" +msgstr "Esc_ala:" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:13 msgid "Type:" msgstr "Tipo :" -#: ../glade/crystal/atoms.glade.h:9 +#: ../glade/crystal/atoms.glade.h:14 msgid "" "Unknown\n" "Ionic\n" @@ -259,22 +651,21 @@ "Covalente\n" "Van der Waals" -#: ../glade/crystal/atoms.glade.h:14 -#: ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/atoms.glade.h:19 +#, fuzzy +msgid "Value (pm):" +msgstr "Valor (pm) :" + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 #: ../glade/crystal/lines.glade.h:7 msgid "_Add" msgstr "_Adicionar" -#: ../glade/crystal/atoms.glade.h:15 -#: ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 #: ../glade/crystal/lines.glade.h:8 msgid "_Delete" msgstr "_Remover" -#: ../glade/crystal/atoms.glade.h:16 -msgid "value (pm):" -msgstr "Valor (pm) :" - #: ../glade/crystal/cleavages.glade.h:1 msgid "Cleavages" msgstr "Clivagens" @@ -315,10 +706,6 @@ msgid "radius (pm):" msgstr "Raio (pm) :" -#: ../glade/crystal/size.glade.h:1 -msgid "*" -msgstr "*" - #: ../glade/crystal/size.glade.h:2 msgid "Crystal size" msgstr "Tamanho do cristal" @@ -335,21 +722,351 @@ msgid "Minimum" msgstr "Mínimo" -#: ../glade/crystal/size.glade.h:6 -#: ../programs/crystal/atomsdlg.cc:143 +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 msgid "x" msgstr "x" -#: ../glade/crystal/size.glade.h:7 -#: ../programs/crystal/atomsdlg.cc:153 +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 msgid "y" msgstr "y" -#: ../glade/crystal/size.glade.h:8 -#: ../programs/crystal/atomsdlg.cc:163 +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 msgid "z" msgstr "z" +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" +msgstr "" + +#: ../glade/paint/arrow-object.glade.h:2 +#, fuzzy +msgid "_Role:" +msgstr "_Rotação" + +#: ../glade/paint/arrow-object.glade.h:3 +#: ../plugins/paint/residues/residues.glade.h:8 +#, fuzzy +msgid "gtk-close" +msgstr "gtk-cancel" + +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +#: ../plugins/paint/residues/residues.glade.h:10 +msgid "gtk-help" +msgstr "gtk-help" + +#: ../glade/paint/docprop.glade.h:1 +msgid "Author:" +msgstr "Autor:" + +#: ../glade/paint/docprop.glade.h:2 +msgid "History" +msgstr "Histórico" + +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "Tema" + +#: ../glade/paint/docprop.glade.h:4 +msgid "_Comments:" +msgstr "_Comentários:" + +#: ../glade/paint/docprop.glade.h:7 +msgid "E-_mail:" +msgstr "E-_mail:" + +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +msgid "Theme:" +msgstr "tema :" + +#: ../glade/paint/docprop.glade.h:10 +#: ../plugins/paint/residues/residues.glade.h:6 +msgid "_Name:" +msgstr "_Nome :" + +#: ../glade/paint/docprop.glade.h:11 +msgid "_Title:" +msgstr "_Título :" + +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1879 +msgid "Hydrogen atoms position" +msgstr "Posição dos átomos de hidrogênio" + +#: ../glade/paint/H-pos.glade.h:2 +#, fuzzy +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" +msgstr "" +"Esquerda\n" +"Direita\n" +"Auto" + +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" +msgstr "Novo arquivo usando tema" + +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "gtk-apply" + +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" +msgstr "gtk-cancel" + +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" +msgstr "Pontas de flecha" + +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" +msgstr "Ligações normais" + +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" +msgstr "Ligações de estereoquímica" + +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "Temas" + +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "A :" + +#: ../glade/paint/preferences.glade.h:6 +msgid "Angl_e:" +msgstr "Ân_gulo:" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "Largura da cauda de flecha (em pixels)." + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "B :" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "Largura de linha das ligações (em pixels)." + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "C :" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "_Tamanho de sinais de carga:" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "Nível de _compressão padrão dos arquivos do GChemPaint :" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "Ângulo padrão entre duas ligações consecutivas numa cadeia." + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "Tamanho padrão de flecha (em pm como para as ligações)" + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "Tamanho padrão de ligação (pm)." + +#: ../glade/paint/preferences.glade.h:16 +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" +"Espaçamento padrão em pixels entre dois objetos consecutivos numa operação " +"de alinhamento." + +#: ../glade/paint/preferences.glade.h:17 +msgid "Dist_ance:" +msgstr "Distânc_ia :" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "Distância entre as hachuras em pixels" + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" +"Distância em pixels entre duas linhas representando uma ligação múltipla." + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" +"Distância em pixels entre duas linhas paralelas (sejam duas flechas, seja " +"uma flecha com duas linhas)." + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "Distância em pixels da ponta da flecha ao centro." + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" +"Distância entre a ponta da flecha e seu ponto de fuga, medida paralelamente " +"à cauda." + +#: ../glade/paint/preferences.glade.h:23 +msgid "" +"Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "Distância entre o ponto de fuga da ponta da flecha e da cauda." + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" +"Espaço adicional entre um coeficiente estequiométrico e sua molécula " +"associada em pixels." + +#: ../glade/paint/preferences.glade.h:25 +msgid "GChemPaint Preferences" +msgstr "Preferências do GChemPaint" + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "Enchimento _geral :" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "Largura de _hachura :" + +#: ../glade/paint/preferences.glade.h:28 +msgid "Ha_ve a tearable table of the elements" +msgstr "Tabela periódica dos elementos _destacável" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "_Tamanho :" + +#: ../glade/paint/preferences.glade.h:30 +msgid "N_ame:" +msgstr "N_ome :" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "Espaço adicionado a cada extremidade de uma flecha (em pixels)." + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" +"Espaço em pixels entre um sinal '+' e os símbolos de reagentes em uma reação " +"química." + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" +"Espaço em pixels adicionado em torno dos objetos de texto como os símbolos " +"químicos, os textos e outros sinais tipográficos." + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" +"Escala utlizada para converter uma distância real em distância no desenho " +"expressa em pm por pixel." + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "Enchimento do _sinal :" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "Tamanho do sinal de carga em pixels." + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "Enchimento de estequiom_etria:" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "Larg_ura" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "Largura en pixels na extremidade mais larga." + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "Largura das hachuras em pixels." + +#: ../glade/paint/preferences.glade.h:41 +#, fuzzy +msgid "_Default theme:" +msgstr "Padrão" + +#: ../glade/paint/preferences.glade.h:42 +msgid "_Distance:" +msgstr "Di_stância :" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "Enchimento de objet_o:" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "_Enchimento :" + +#: ../glade/paint/preferences.glade.h:45 +msgid "_Scale:" +msgstr "Esc_ala:" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "La_rgura" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "Elemento _atual:" + +#: ../glade/paint/zoom.glade.h:1 +msgid "Zoom" +msgstr "Zoom" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "Fator de zoom (%) :" + +#: ../glade/table/acidity.glade.h:1 +#, fuzzy +msgid "Basic" +msgstr "" +"<span background=\"blue\"> <b>Sólido</b> </span>" + +#: ../glade/table/acidity.glade.h:2 +#, fuzzy +msgid "Neutral" +msgstr "" +"<span background=\"green\"> <b>Líquido</b> </span>" + +#: ../glade/table/acidity.glade.h:3 +#, fuzzy +msgid "Amphoteric" +msgstr "" +"<span background=\"green\"> <b>Líquido</b> </span>" + +#: ../glade/table/acidity.glade.h:4 +#, fuzzy +msgid "Acidic" +msgstr "<span background=\"red\"> <b>Gás</b> </span>" + #: ../glade/table/eltpage.glade.h:1 msgid "1:" msgstr "1 :" @@ -410,8 +1127,7 @@ msgid "Radii" msgstr "Raios" -#: ../glade/table/eltpage.glade.h:16 -#: ../programs/table/gchemtable-elt.cc:137 +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 msgid "Show curve" msgstr "Mostrar curva" @@ -424,31 +1140,42 @@ msgstr "Van der Waals :" #: ../glade/table/state-thermometer.glade.h:1 -msgid "<span background=\"blue\"> <b>Solid</b> </span>" -msgstr "<span background=\"blue\"> <b>Sólido</b> </span>" +#, fuzzy +msgid " Solid " +msgstr "" +"<span background=\"blue\"> <b>Sólido</b> </span>" #: ../glade/table/state-thermometer.glade.h:2 -msgid "<span background=\"green\"> <b>Liquid</b> </span>" -msgstr "<span background=\"green\"> <b>Líquido</b> </span>" +#, fuzzy +msgid " Liquid " +msgstr "" +"<span background=\"green\"> <b>Líquido</b> </span>" #: ../glade/table/state-thermometer.glade.h:3 -msgid "<span background=\"red\"> <b>Gas</b> </span>" +#, fuzzy +msgid " Gas " msgstr "<span background=\"red\"> <b>Gás</b> </span>" #: ../glade/table/state-thermometer.glade.h:4 msgid "Temperature (K):" msgstr "Temperatura (K) :" +#: ../glade/table/curve.glade.h:1 +#, fuzzy +msgid "GChemTable Graph" +msgstr "Sair do GChemTable" + #: ../glade/table/family.glade.h:1 +#, fuzzy msgid "" "All\n" -"Alkali Earths\n" -"Alkaline Earths\n" +"Alkali Metals\n" +"Alkaline Earths Metals\n" "Halogenes\n" "Metalloids\n" "Noble Gases\n" "Non-Metals\n" -"Rare Earths\n" +"Rare Earths Metals\n" "Transition Metals\n" "Other Metals\n" msgstr "" @@ -467,6 +1194,30 @@ msgid "Selected Family:" msgstr "Família escolhida :" +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" + #: ../database/elements.xml.in.h:1 msgid "Actinium" msgstr "Actínio" @@ -943,502 +1694,2204 @@ msgid "tritium" msgstr "trítio" -#: ../gcu/application.cc:180 +#: ../goffice/plugin.xml.in.h:1 +msgid "2D Chemical Structures Viewer/Editor" +msgstr "Visualizador/editor de Estrutura Química 2D" + +#: ../goffice/plugin.xml.in.h:2 +#, fuzzy +msgid "Chemical structures" +msgstr "Estrutura Química 2D" + +#: ../goffice/plugin.xml.in.h:3 +#, fuzzy +msgid "Chemical structures component engine" +msgstr "Motor de componentes de estruturas químicas 2D" + +#: ../goffice/plugin.xml.in.h:4 +#, fuzzy +msgid "Component : GChemPaint" +msgstr "Componente: GChemPaint" + +#: ../goffice/gogcpapp.cc:182 ../programs/paint/standaloneapp.cc:46 #, c-format -msgid "(screen resolution is %u)" -msgstr "(a resolução da tela é %u)" +msgid "Untitled %d" +msgstr "Sem título %d" -#: ../gcu/crystaldoc.cc:401 -msgid "Everything has been cleaved" -msgstr "Tudo foi clivado" +#: ../goffice/gogcpwin.cc:88 +msgid "Embedded GChemPaint Object" +msgstr "Objeto GChemPaint encapsulado" + +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" +msgstr "Formato" + +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" +msgstr "Formato Pango" + +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" +msgstr "X" + +#: ../libs/canvas/gcp-canvas-pango.c:376 +msgid "X position" +msgstr "Posição _X:" + +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" +msgstr "Y" + +#: ../libs/canvas/gcp-canvas-pango.c:384 +msgid "Y position" +msgstr "Posição _Y:" + +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" +msgstr "Largura" + +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" +msgstr "Largura da caixa de texto" + +#: ../libs/canvas/gcp-canvas-pango.c:399 +msgid "Height" +msgstr "Altura" + +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "Altura da caixa de texto" + +#: ../libs/canvas/gcp-canvas-pango.c:407 +msgid "Anchor" +msgstr "Âncora" + +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "Ponto de âncora para o texto" + +#: ../libs/canvas/gcp-canvas-pango.c:416 +msgid "Color" +msgstr "Cor" + +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" +msgstr "Cor de texto, como string" + +#: ../libs/canvas/gcp-canvas-pango.c:424 +msgid "Editing" +msgstr "Editar" + +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" +msgstr "Este item rich text está sendo editado?" -#: ../gcu/dialog.cc:124 -msgid "Type a number" -msgstr "Entre um número" +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:139 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:363 +msgid "translator_credits" +msgstr "Grégoire Jean-François Demets" -#: ../gcu/dialog.cc:133 -#, c-format -msgid "Type a number greater than or equal %g and lower than to %g" -msgstr "Entre um número maior ou igual à %g e menor que %g" +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "GChemPaint é um editor de estruturas químicas em 2D para Gnome" + +#: ../libs/gcp/about.cc:56 +msgid "Copyright © 2001-2007 by Jean Bréfort" +msgstr "Copyright © 2001-2007 por Jean Bréfort" + +#: ../libs/gcp/application.cc:303 +msgid "Create a new reaction" +msgstr "Criar uma nova reação" + +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" +msgstr "Criar uma nova relação de mesomeria" -#: ../gcu/dialog.cc:143 -#, c-format -msgid "Type a number greater than %g and lower than or equal to %g" -msgstr "Entre um número maior que %g e menor ou igual a %g" +#: ../libs/gcp/application.cc:504 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" +"Dê um nome de arquivo,\n" +"não um nome de diretório" -#: ../gcu/dialog.cc:153 +#: ../libs/gcp/application.cc:546 #, c-format -msgid "Type a number between %g and %g, the limits are valid." -msgstr "Entre um número entre %g e %g, os limites são válidos" +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "" +"Lamento, o formato de arquivo %s não é suportado!\n" +"Falha ao carregar %s." -#: ../gcu/dialog.cc:163 +#: ../libs/gcp/application.cc:575 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 #, c-format -msgid "Type a number greater than %g and lower than %g" -msgstr "Entre um número maior que %g e menor que %g" +msgid "" +"File %s\n" +"exists, overwrite?" +msgstr "" +"O arquivo %s\n" +"já existe, sobreescrever ?" -#: ../gcu/dialog.cc:173 +#: ../libs/gcp/application.cc:588 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 #, c-format -msgid "Type a number lower than %g" -msgstr "Entre um número menor que %g" +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" -#: ../gcu/dialog.cc:183 -#, c-format -msgid "Type a number greater than %g" -msgstr "Entre um número maior que %g" +#: ../libs/gcp/application.cc:796 ../libs/gcp/application.cc:924 +msgid "No filename" +msgstr "Sem nome de arquivo" -#: ../gcu/dialog.cc:193 +#: ../libs/gcp/application.cc:799 #, c-format -msgid "Type a number lower than or equal to %g" -msgstr "Entre um número menor ou igual a %g" +msgid "" +"Could not open file\n" +"%s" +msgstr "" +"Impossível abrir o arquivo\n" +"%s" -#: ../gcu/dialog.cc:203 +#: ../libs/gcp/application.cc:802 ../libs/gcp/application.cc:936 #, c-format -msgid "Type a number greater than or equal to %g" -msgstr "Entre um número maior ou igual a %g" +msgid "%s: parse error." +msgstr "%s: erro de análise." -#: ../gcu/element.cc:99 +#: ../libs/gcp/application.cc:927 ../programs/crystal/document.cc:274 +#, c-format +msgid "" +"Could not load file\n" +"%s" +msgstr "" +"Erro ao carregar o arquivo\n" +"%s" + +#: ../libs/gcp/application.cc:930 ../programs/crystal/document.cc:277 +#, c-format +msgid "" +"%s: invalid xml file.\n" +"Tree is empty?" +msgstr "" +"%s: arquivo xml incorreto.\n" +"Arvore de diretórios vazia ?" + +#: ../libs/gcp/application.cc:933 ../programs/crystal/document.cc:280 +#, c-format +msgid "%s: invalid file format." +msgstr "%s: formato de arquivo incorreto." + +#: ../libs/gcp/application.cc:968 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 +msgid "Save as image" +msgstr "Salvar como imagem" + +#: ../libs/gcp/atom.cc:1861 ../libs/gcp/atom.cc:1875 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "Átomo" + +#: ../libs/gcp/atom.cc:1864 +msgid "Display symbol" +msgstr "Mostrar símbolo" + +#: ../libs/gcp/atom.cc:1864 +msgid "Whether to display carbon atom symbol or not" +msgstr "Mostrar ou não o símbolo de átomos de carbono" + +#: ../libs/gcp/bond.cc:980 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "Ligação" + +#: ../libs/gcp/bond.cc:984 +msgid "Move to back" +msgstr "Mover para o plano de trás" + +#: ../libs/gcp/bond.cc:991 +msgid "Bring to front" +msgstr "Mover para o plano da frente" + +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +msgid "%A, %B %d, %Y" +msgstr "%A %d %B %Y" + +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:148 +msgid "Family" +msgstr "Família" + +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "Família de fontes" + +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "Estilo" + +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "Estilo da fonte (normal, oblíquo ou itálico)" + +#: ../libs/gcp/fontsel.cc:296 +msgid "Weight" +msgstr "Largura" + +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "Largura da fonte" + +#: ../libs/gcp/fontsel.cc:301 +msgid "Variant" +msgstr "Variante" + +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" +msgstr "Variante da fonte" + +#: ../libs/gcp/fontsel.cc:306 +msgid "Stretch" +msgstr "Estiramento" + +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" +msgstr "Estiramento da fonte (condensado, normal ou estirada)" + +#: ../libs/gcp/fontsel.cc:311 +msgid "Size" +msgstr "Tamanho" + +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" +msgstr "Tamnho da fonte (em unidades pango)" + +#: ../libs/gcp/fragment.cc:685 ../libs/gcp/fragment.cc:1209 +msgid "Invalid charge." +msgstr "Carga incorreta." + +#: ../libs/gcp/fragment.cc:1182 +msgid "Invalid symbol." +msgstr "Símbolo inválido." + +#: ../libs/gcp/mesomer.cc:76 +msgid "Only one arrow can link two given mesomers." +msgstr "Duas formas mesoméricas só podem ser ligadas por uma só flecha." + +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "Algo inesperado ocorreu, por favor cominique o bug." + +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "Não há espaço disponível entre a molécula e a flecha!" + +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "Flechas isoladas não são autorizadas!" + +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." +msgstr "" +"Molécula isolada!\n" +"Adicione as flechas que faltam." + +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "Adicione as flechas que faltam." + +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" +msgstr "Destruir a relação de mesomeria" + +#: ../libs/gcp/molecule.cc:515 +msgid "Molecule" +msgstr "Molécula" + +#: ../libs/gcp/molecule.cc:520 +msgid "Export molecule to Ghemical" +msgstr "Exportar a molécula para o Ghemical" + +#: ../libs/gcp/molecule.cc:527 +msgid "Generate InChI" +msgstr "Gerar o InChI" + +#: ../libs/gcp/molecule.cc:532 +msgid "NIST WebBook page for this molecule" +msgstr "A página do NIST WebBook para esta molécula" + +#: ../libs/gcp/molecule.cc:537 +msgid "PubChem page for this molecule" +msgstr "A página do PubChem para esta molécula" + +#: ../libs/gcp/molecule.cc:543 +#, fuzzy +msgid "Generate SMILES" +msgstr "Gerar o InChI" + +#: ../libs/gcp/molecule.cc:549 +msgid "Open in Calculator" +msgstr "Abrir na calculadora" + +#: ../libs/gcp/molecule.cc:555 +msgid "Select alignment item" +msgstr "Selecionar o elemento para alinhamento" + +#: ../libs/gcp/preferences.cc:349 ../libs/gcp/preferences.cc:368 +#: ../libs/gcp/preferences.cc:497 ../libs/gcp/theme.cc:336 +#: ../libs/gcp/theme.cc:343 ../programs/table/gchemtable-app.cc:143 +msgid "Default" +msgstr "Padrão" + +#: ../libs/gcp/preferences.cc:389 ../libs/gcp/preferences.cc:458 +#: ../libs/gcp/preferences.cc:525 +msgid "General" +msgstr "Geral" + +#: ../libs/gcp/preferences.cc:399 ../libs/gcp/preferences.cc:473 +#: ../libs/gcp/preferences.cc:527 +msgid "Font" +msgstr "Fonte" + +#: ../libs/gcp/preferences.cc:403 ../libs/gcp/preferences.cc:477 +#: ../libs/gcp/preferences.cc:529 +msgid "Other" +msgstr "Outro" + +#: ../libs/gcp/preferences.cc:411 ../libs/gcp/preferences.cc:485 +#: ../libs/gcp/preferences.cc:533 +msgid "Arrows" +msgstr "Flechas" + +#: ../libs/gcp/preferences.cc:415 ../libs/gcp/preferences.cc:489 +#: ../libs/gcp/preferences.cc:535 ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "Texto" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" +msgstr "Adicionar um coeficiente estequiométrico" + +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" +"Erro, não é possível construir uma reação a partir dos objetos\n" +"selecionados." + +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "Destrói a reação" + +#: ../libs/gcp/reaction-arrow.cc:380 +#, fuzzy +msgid "Arrow" +msgstr "Flechas" + +#: ../libs/gcp/reaction-arrow.cc:386 +msgid "Attach selection to arrow..." +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:39 +#, fuzzy +msgid "Unkown" +msgstr "Desconhecido" + +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:43 +#, fuzzy +msgid "Solvent" +msgstr "Covalent" + +#: ../libs/gcp/reaction-prop.cc:44 +#, fuzzy +msgid "Temperature" +msgstr "Temperatura (K) :" + +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:46 +#, fuzzy +msgid "Time" +msgstr "tema :" + +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" +msgstr "" + +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 +msgid "Save as" +msgstr "Gravar _como" + +#: ../libs/gcp/stringdlg.cc:145 +#, fuzzy, c-format +msgid "" +"Could not open file %s, error was:\n" +"%s" +msgstr "" +"Impossível abrir o arquivo\n" +"%s" + +#: ../libs/gcp/stringdlg.cc:161 +#, fuzzy, c-format +msgid "" +"Could not write to file %s, error was:\n" +"%s." +msgstr "" +"Impossível gravar no arquivo\n" +"%s" + +#: ../libs/gcp/stringdlg.cc:175 +#, fuzzy, c-format +msgid "" +"Could not close file %s, error was:\n" +"%s" +msgstr "" +"Erro ao salvar o arquivo\n" +"%s" + +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +msgid "This should not have occured, please file a bug record." +msgstr "Algo inesperado ocorreu, por favor cominique o bug." + +#: ../libs/gcp/theme.cc:449 +msgid "NewTheme1" +msgstr "NovoTema1" + +#: ../libs/gcp/theme.cc:453 +#, c-format +msgid "NewTheme%d" +msgstr "Novo tema%d" + +#: ../libs/gcp/theme.cc:550 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "Desconhecido" + +#: ../libs/gcp/view.cc:1015 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, fuzzy, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" +"Erro ao salvar o arquivo\n" +"%s" + +#: ../libs/gcp/view.cc:1051 ../libs/gcu/glview.cc:394 +#, c-format +msgid "Unable to save image file: %s\n" +msgstr "Impossível salvar a imagem : %s\n" + +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:274 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:134 +#: ../programs/table/gchemtable-curve.cc:212 +msgid "_File" +msgstr "_Arquivo" + +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:275 +msgid "_New File" +msgstr "_Novo arquivo" + +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:276 +msgid "Create a new file" +msgstr "Criar um novo arquivo" + +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." +msgstr "Novo _arquivo com tema..." + +#: ../libs/gcp/window.cc:284 +msgid "Create a new file using a theme" +msgstr "Criar um novo arquivo utilizando um tema" + +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:277 ../programs/spectra/window.cc:167 +msgid "_Open..." +msgstr "_Abrir..." + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:278 ../programs/spectra/window.cc:168 +msgid "Open a file" +msgstr "Abrir um arquivo" + +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:279 +msgid "_Save" +msgstr "_Salvar" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:280 +msgid "Save the current file" +msgstr "Salvar o arquivo ativo" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:281 +msgid "Save _As..." +msgstr "Salvar _como..." + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:282 +msgid "Save the current file with a different name" +msgstr "Salvar o arquivo com um novo nome" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:283 +#: ../programs/spectra/window.cc:169 +msgid "Save As _Image..." +msgstr "Salvar como imagem..." + +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:284 +#: ../programs/spectra/window.cc:170 +msgid "Save the current file as an image" +msgstr "Salvar o arquivo ativo como imagem" + +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:285 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:213 +msgid "Page Set_up..." +msgstr "" + +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:286 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:214 +msgid "Setup the page settings for your current printer" +msgstr "" + +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:287 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:215 +#, fuzzy +msgid "Print Pre_view" +msgstr "Prévisualização" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:288 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:216 +#, fuzzy +msgid "Print preview" +msgstr "Prévisualização" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:217 +msgid "_Print..." +msgstr "Im_primir..." + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:290 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "Print the current file" +msgstr "Imprimir a tela" + +#: ../libs/gcp/window.cc:299 ../programs/table/gchemtable-curve.cc:219 +msgid "Prope_rties..." +msgstr "P_ropriedades..." + +#: ../libs/gcp/window.cc:300 +msgid "Modify the file's properties" +msgstr "Edita as propriedades do arquivo" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:291 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:221 +msgid "_Close" +msgstr "_Fechar" + +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:292 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:222 +msgid "Close the current file" +msgstr "Fechar o arquivo ativo" + +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:137 +#: ../programs/table/gchemtable-curve.cc:223 +msgid "_Quit" +msgstr "_Sair" + +#: ../libs/gcp/window.cc:304 +msgid "Quit GChemPaint" +msgstr "Sair do GChemPaint" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:295 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:225 +msgid "_Edit" +msgstr "_Editar" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "D_esfazer" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "Desfaz a última operação" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "_Repetir" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "Repetir a última operação" + +#: ../libs/gcp/window.cc:310 +msgid "Cu_t" +msgstr "Reco_rtar" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "Recorta a seleção" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:226 +msgid "_Copy" +msgstr "_Copiar" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:227 +msgid "Copy the selection" +msgstr "Copia a seleção" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "C_olar" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "Cola o conteúdo da área de transferência" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "_Apagar" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "Apaga a seleção" + +#: ../libs/gcp/window.cc:318 +msgid "Select _All" +msgstr "Selecionar _tudo" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "Seleciona o documento inteiro" + +#: ../libs/gcp/window.cc:320 +msgid "Pr_eferences..." +msgstr "P_referências..." + +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:297 +msgid "Configure the application" +msgstr "Configurar o aplicativo" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:309 ../programs/table/gchemtable-app.cc:139 +msgid "_View" +msgstr "_Ver" + +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "_Zoom" + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "_400%" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "Zoom em 400%" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "_300%" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "Zoom em 300%" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "_200%" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "Zoom em 200%" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "150%" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "Zoom em 150%" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "_100%" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "Zoom em 100%" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "_75%" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "Zoom em 75%" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "_50%" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "Zoom em 50%" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "25%" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "Zoom em 25%" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "_Zoom em...%" + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "Abrir a caixa de diálogo de zoom" + +#: ../libs/gcp/window.cc:342 +#, fuzzy +msgid "_Tools" +msgstr "_Barras de ferramentas" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:312 +msgid "_Windows" +msgstr "Ja_nelas" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:317 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:163 +#: ../programs/table/gchemtable-curve.cc:228 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "_Help" +msgstr "_Ajuda" + +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:318 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:164 +#: ../programs/table/gchemtable-curve.cc:229 +msgid "_Contents" +msgstr "_Conteúdo" + +#: ../libs/gcp/window.cc:346 +msgid "View help for GChemPaint" +msgstr "Consultar a ajuda do GChemPaint" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "Página internet do GChemPaint" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "Abre um navegador internet na página do GChemPaint" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:322 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:168 +#: ../programs/table/gchemtable-curve.cc:235 +msgid "Live assistance" +msgstr "" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:323 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +#, fuzzy +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "Navegar no site do Gnome Chemistry Utils" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:324 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Ask a question" +msgstr "_Fazer uma pergunta" + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "Envia uma mensagem para a lista de difusão do GChemPaint" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "Report _Bugs" +msgstr "_Relatar um erro" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "Abre um navegador internet para comunicar um problema via Bugzilla" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:328 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "_About" +msgstr "S_obre..." + +#: ../libs/gcp/window.cc:356 +msgid "About GChemPaint" +msgstr "Sobre o GChemPain" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "Abrir _recentes" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:449 +msgid "Ready" +msgstr "Pronto" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "GChemPaint" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:639 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "``%s'' foi modificado. Gostaria de salvar ?" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "(a resolução da tela é %u)" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "Tudo foi clivado" + +#: ../libs/gcu/dialog.cc:131 +msgid "Type a number" +msgstr "Entre um número" + +#: ../libs/gcu/dialog.cc:140 +#, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "Entre um número maior ou igual à %g e menor que %g" + +#: ../libs/gcu/dialog.cc:150 +#, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "Entre um número maior que %g e menor ou igual a %g" + +#: ../libs/gcu/dialog.cc:160 +#, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "Entre um número entre %g e %g, os limites são válidos" + +#: ../libs/gcu/dialog.cc:170 +#, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "Entre um número maior que %g e menor que %g" + +#: ../libs/gcu/dialog.cc:180 +#, c-format +msgid "Type a number lower than %g" +msgstr "Entre um número menor que %g" + +#: ../libs/gcu/dialog.cc:190 +#, c-format +msgid "Type a number greater than %g" +msgstr "Entre um número maior que %g" + +#: ../libs/gcu/dialog.cc:200 +#, c-format +msgid "Type a number lower than or equal to %g" +msgstr "Entre um número menor ou igual a %g" + +#: ../libs/gcu/dialog.cc:210 +#, c-format +msgid "Type a number greater than or equal to %g" +msgstr "Entre um número maior ou igual a %g" + +#: ../libs/gcu/element.cc:97 msgid "German" msgstr "Alemão" -#: ../gcu/element.cc:100 +#: ../libs/gcu/element.cc:98 msgid "French" msgstr "Francês" -#: ../gcu/element.cc:101 +#: ../libs/gcu/element.cc:99 msgid "Italian" msgstr "Italiano" -#: ../gcu/element.cc:102 +#: ../libs/gcu/element.cc:100 msgid "Polish" msgstr "Polonês" -#: ../gcu/element.cc:103 +#: ../libs/gcu/element.cc:101 msgid "Russian" msgstr "Russo" -#: ../gcu/element.cc:106 +#: ../libs/gcu/element.cc:103 msgid "Can't find and read elements.xml" msgstr "Impossível encontrar e ler elements.xml" -#: ../gcu/element.cc:111 -#: ../gcu/element.cc:118 +#: ../libs/gcu/element.cc:109 ../libs/gcu/element.cc:118 msgid "Incorrect file format: elements.xml" msgstr "Formato de arquivo incorreto : elements.xml" -#: ../gcu/element.cc:151 +#: ../libs/gcu/element.cc:154 msgid "English" msgstr "Inglês" -#: ../gcu/element.cc:430 +#: ../libs/gcu/element.cc:406 msgid "Can't find and read radii.xml" msgstr "Impossível encontrar e ler radii.xml" -#: ../gcu/element.cc:435 -#: ../gcu/element.cc:446 +#: ../libs/gcu/element.cc:412 ../libs/gcu/element.cc:425 msgid "Incorrect file format: radii.xml" msgstr "Formato de arquivo incorreto : radii.xml" -#: ../gcu/element.cc:530 +#: ../libs/gcu/element.cc:513 msgid "Can't find and read elecprops.xml" msgstr "Impossível encontrar e ler elecprops.xml" -#: ../gcu/element.cc:535 -#: ../gcu/element.cc:540 +#: ../libs/gcu/element.cc:519 ../libs/gcu/element.cc:526 msgid "Incorrect file format: elecprops.xml" msgstr "Formato de arquivo incorreto : elecprops.xml" -#: ../gcu/element.cc:688 +#: ../libs/gcu/element.cc:675 msgid "Can't find and read isotopes.xml" msgstr "Impossível encontrar e ler isotopes.xml" -#: ../gcu/element.cc:693 -#: ../gcu/element.cc:700 +#: ../libs/gcu/element.cc:681 ../libs/gcu/element.cc:690 msgid "Incorrect file format: isotopes.xml" msgstr "Formato de arquivo incorreto : isotopes.xml" -#. amu stands for "atomic mass units" -#: ../gcu/element.cc:867 -msgid "amu" -msgstr "uma" - -#: ../gcu/filechooser.cc:40 -msgid "Save as" -msgstr "Gravar _como" - -#: ../gcu/filechooser.cc:40 +#: ../libs/gcu/filechooser.cc:43 msgid "Open" msgstr "Abrir" -#: ../gcu/filechooser.cc:59 +#: ../libs/gcu/filechooser.cc:62 msgid "File _type:" msgstr "_Tipo de arquivo :" -#: ../gcu/filechooser.cc:61 +#: ../libs/gcu/filechooser.cc:64 msgid "Automatic" msgstr "Automático" -#: ../gcu/formula.cc:390 -#: ../gcu/formula.cc:428 +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 msgid "Unmatched parenthesis" msgstr "Parênteses órfãos" -#: ../gcu/formula.cc:416 +#: ../libs/gcu/formula.cc:540 msgid "Could not interpret the symbol list" msgstr "Impossível interpretar a lista de símbolos" -#: ../gcu/formula.cc:422 +#: ../libs/gcu/formula.cc:546 msgid "Parser failed, please fill a bug report." msgstr "O analisador falhou, queira enviar um relatório de bug." -#: ../gcu/formula.cc:430 +#: ../libs/gcu/formula.cc:554 msgid "Invalid character" msgstr "Caractere inválido" -#: ../gcu/glview.cc:486 -#, c-format -msgid "Unable to save image file: %s\n" -msgstr "Impossível salvar a imagem : %s\n" - -#: ../gcu/gtkchem3dviewer.cc:154 +#: ../libs/gcu/gtkchem3dviewer.cc:157 msgid "Background Color" msgstr "Cor de fundo" -#: ../gcu/gtkchem3dviewer.cc:155 +#: ../libs/gcu/gtkchem3dviewer.cc:158 msgid "Color used to paint the background" msgstr "Cor utilizada para o fundo" -#: ../gcu/gtkperiodic.c:334 +#: ../libs/gcu/gtkperiodic.c:331 #, c-format -msgid "Out of range value %d for property \"color-style\" for GtkPeriodic instance %p\n" -msgstr "O Valor %d não está na faixa válida para a instância do GtkPeriodic %p\n" +msgid "" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" +msgstr "" +"O Valor %d não está na faixa válida para a instância do GtkPeriodic %p\n" -#: ../programs/3d/application.cc:35 -#: ../programs/3d/application.cc:46 -msgid "GChem3D Viewer" -msgstr "Visualizador de moléculas GChem3D" +#: ../libs/gcu/loader.cc:106 +#, fuzzy +msgid "Chemical file loader type." +msgstr "Estilo da fonte utlizado nas fórmulas químicas." -#: ../programs/3d/application.cc:92 -msgid "Sorry, format not supported!" -msgstr "Lamento, formato não suportado !" +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "" -#: ../programs/3d/application.cc:102 -#: ../programs/crystal/application.cc:214 +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "" + +#: ../libs/gcu/printable.cc:35 +#, fuzzy +msgid "points" +msgstr "Spin" + +#: ../libs/gcu/printable.cc:36 +#, fuzzy +msgid "inches" +msgstr "Linhas" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1321 +msgid "Transmittance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1320 +#, fuzzy +msgid "Absorbance" +msgstr "Asparagina" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1256 +msgid "Chemical shift (ppm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1257 +msgid "Frequency (Hz)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 ../libs/gcu/spectrumdoc.cc:1263 +msgid "Show integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 +#, fuzzy +msgid "Hide integral" +msgstr "Geral" + +#: ../libs/gcu/spectrumdoc.cc:706 ../libs/gcu/spectrumdoc.cc:1593 +msgid "Found too many data!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1253 ../libs/gcu/spectrumdoc.cc:1300 +msgid "X unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1304 +msgid "Wave length (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1306 +msgid "Wave length (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1307 +msgid "Wave number (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1312 +msgid "Invert X Axis" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1317 +msgid "Y unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1488 ../libs/gcu/spectrumdoc.cc:1518 +#, fuzzy +msgid "Constant too long" +msgstr "Ferramenta Rotação" + +#: ../libs/gcu/spectrumdoc.cc:1511 +#, fuzzy +msgid "Invalid character in data block" +msgstr "Caractere inválido" + +#: ../libs/gcu/spectrumdoc.cc:1615 +msgid "Data check failed!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1632 +msgid "Data check failed: FIRSTX!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1637 +msgid "Data check failed: FIRSTY!" +msgstr "" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1641 +msgid "Found too many data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1947 +#, fuzzy +msgid "Integral" +msgstr "Geral" + +#: ../libs/gcu/spectrumdoc.cc:2068 +msgid "Real transformed data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2085 +msgid "Imaginary transformed data" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:80 +#, fuzzy +msgid "Minimum X value:" +msgstr "Mínimo" + +#: ../libs/gcu/spectrumview.cc:85 +#, fuzzy +msgid "Maximum X value:" +msgstr "Máximo" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "" + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:502 ../plugins/loaders/cdx/cdx.cc:506 +#: ../plugins/loaders/cdx/cdx.cc:631 ../plugins/loaders/cdx/cdx.cc:636 +msgid "Unsupported feature, please report!" +msgstr "" + +#: ../plugins/loaders/cdx/cdx.cc:593 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:169 +#: ../plugins/paint/bonds/bondtool.cc:279 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "Orientação : %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "_Tamanho da flecha" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +msgid "H_alf heads" +msgstr "_Meias pontas" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +msgid "Set _default" +msgstr "_Por padrão" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "Pontas _inteiras" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." +msgstr "" +"Se VERDADEIRO, as flechas de reações reversíveis usarão pontas cheias por " +"padrão ao invés de meias-pontas." + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +msgid "Use full arrows heads for reversible reactions" +msgstr "Adicionar um par de flechas para uma reação reversível" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "Criar um caminho de retrossíntese" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "Flecha simples" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "Adicionar uma flecha para uma reação irreversível" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "Flecha dupla" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "Adicionar um par de flechas para uma reação reversível" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "Flecha de retrossíntese" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "Adicionar uma flecha de retrossíntese" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "flecha de mesomeria" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "Adicionar uma flecha de duas pontas para representar uma mesomeria" + +#: ../plugins/paint/arrows/plugin.cc:92 +msgid "Electron pair move arrow" +msgstr "Flecha de deslocamento de um par de elétrons" + +#: ../plugins/paint/arrows/plugin.cc:93 +msgid "Add a curved arrow to represent an electron pair move" +msgstr "" +"Adicionar uma flecha curva para representar o deslocamento de um par de " +"elétrons" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "Flecha de deslocamento de elétron desemparelhado" + +#: ../plugins/paint/arrows/plugin.cc:96 +msgid "Add a curved arrow to represent an single electron move" +msgstr "" +"Adicionar uma flecha curva para representar o deslocamento de um só elétron" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "Ausência de molécula alvo !" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "Presença de alvos múltiplos ou flechas faltando." + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "Lamento, os caminhos de retrossíntese cíclicos não são suportados." + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "Destruir o caminho de retrossíntese" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "Uma só flecha pode ligar duas etapas definidas." + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "Adiciona ou modifica um átomo" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "Carga positiva" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "Incrementa a carga de um átomo" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "Carga negativa" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "Diminui a carga de um átomo" + +#: ../plugins/paint/atoms/plugin.cc:64 +msgid "Electron Pair" +msgstr "Par de elétrons" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "Adiciona uma par de elétrons a um átomo" + +#: ../plugins/paint/atoms/plugin.cc:67 +msgid "Unpaired Electron" +msgstr "Elétron desemparelhado" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "Adiciona um elétron desemparelhado a um átomo" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "Propriedade" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "Valor" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "Ângulo entre duas novas ligações em uma cadeia aberta" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "Ângul_o de ligação :" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "_Tamanho de ligação :" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "Tamanho padrão para as novas ligações" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "Utilizar os átomos existentes ao fim das ligações" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "_Utilizar os átomos existentes" + +#: ../plugins/paint/bonds/bondtool.cc:354 +msgid "Invalid document tree, please file a bug report" +msgstr "" +"O diretório do documento não é válido,\n" +"queira relatar o bug." + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "Auto" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "_Número de ligações :" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "" +"If set, the number of new bonds will be evaluated from the mouse position" +msgstr "" +"Se a case está selecionada, o número de ligações será calculado a partir da " +"posição do mouse" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "Número de novas ligações" + +#: ../plugins/paint/bonds/chaintool.cc:125 +#: ../plugins/paint/bonds/chaintool.cc:247 +#, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "ligações: %d, Orientação : %g" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "" +"Adiciona uma ligação ou altera a multiplicidade de uma ligação existente" + +#: ../plugins/paint/bonds/plugin.cc:59 +msgid "Chain" +msgstr "Cadeia" + +#: ../plugins/paint/bonds/plugin.cc:60 +msgid "Add a chain" +msgstr "Adiciona uma cadeia" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "Ferramenta ligação para frente" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "Adiciona uma ligação para frente" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "Ferramenta ligação para trás" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "Adiciona uma ligação para trás" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "Ferramenta ligação de estereoquímica indeterminada" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "Adiciona uma ligação de estereoquímica indeterminada" + +#: ../plugins/paint/bonds/plugin.cc:71 +msgid "Fore bond tool" +msgstr "Ferramenta ligação larga" + +#: ../plugins/paint/bonds/plugin.cc:72 +msgid "Add a fore bond" +msgstr "Adiciona uma ligação larga" + +#: ../plugins/paint/bonds/plugin.cc:74 +msgid "Delocalized bond tool" +msgstr "Ferramenta ligação deslocalizada" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "Adiciona um sistema de ligações deslocalizadas" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +msgid "Cycle _Size" +msgstr "_Tamanho do ciclo :" + +#: ../plugins/paint/cycles/plugin.cc:54 +msgid "Three atoms cycle" +msgstr "Ciclo de três átomos" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "Adiciona um ciclo de três átomos" + +#: ../plugins/paint/cycles/plugin.cc:57 +msgid "Four atoms cycle" +msgstr "Ciclo de quatro átomos" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "Adiciona um ciclo de quatro átomos" + +#: ../plugins/paint/cycles/plugin.cc:60 +msgid "Five atoms cycle" +msgstr "Ciclo de cinco átomos" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "Adiciona um ciclo de cinco átomos" + +#: ../plugins/paint/cycles/plugin.cc:63 +msgid "Six atoms cycle" +msgstr "Ciclo de seis átomos" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "Adiciona um ciclo de seis átomos" + +#: ../plugins/paint/cycles/plugin.cc:66 +msgid "Seven atoms cycle" +msgstr "Ciclo de sete átomos" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "Adiciona um ciclo de sete átomos" + +#: ../plugins/paint/cycles/plugin.cc:69 +msgid "Eight atoms cycle" +msgstr "Ferramenta de ciclo de oito átomos" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "Adiciona um ciclo de oito átomos" + +#: ../plugins/paint/cycles/plugin.cc:72 +msgid "Variable sized cycle" +msgstr "Ciclo de tamanho variável" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "Adiciona um ciclo" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "" + +#: ../plugins/paint/residues/plugin.cc:105 +#, fuzzy +msgid "Create new abbreviations" +msgstr "Criar uma nova reação" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +#, fuzzy +msgid "Please, provide only one molecule." +msgstr "Queira fornecer um objeto." + +#: ../plugins/paint/residues/residues-dlg.cc:232 +#, fuzzy +msgid "Please, provide a name for the residue" +msgstr "Queira fornecer um objeto." + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "New" +msgstr "Novo" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +#, fuzzy +msgid "\"New\" is not a valid symbol" +msgstr "Símbolo inválido." + +#: ../plugins/paint/residues/residues-dlg.cc:265 +#, fuzzy +msgid "Please provide at least one symbol" +msgstr "Queira fornecer um objeto." + +#: ../plugins/paint/residues/residues-dlg.cc:275 #, c-format +msgid "%s is already used by another residue." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:287 +#, fuzzy msgid "" -"File %s\n" -"exists, overwrite?" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "Algo inesperado ocorreu, por favor cominique o bug." + +#: ../plugins/paint/residues/residues.glade.h:1 +#, fuzzy +msgid "Formula" +msgstr "Fórmula :" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" msgstr "" -"O arquivo %s\n" -"já existe, sobreescrever ?" -#: ../programs/3d/application.cc:147 -#: ../programs/crystal/application.cc:145 -msgid "Save as image" -msgstr "Salvar como imagem" +#: ../plugins/paint/residues/residues.glade.h:4 +#, fuzzy +msgid "Residues" +msgstr "Nucleosídeos" + +#: ../plugins/paint/residues/residues.glade.h:5 +#, fuzzy +msgid "_Generic" +msgstr "Geral" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:9 +#, fuzzy +msgid "gtk-delete" +msgstr "gtk-help" + +#: ../plugins/paint/residues/residues.glade.h:11 +#, fuzzy +msgid "gtk-save" +msgstr "gtk-cancel" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "Propriedades do grupo..." + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "A_linhar" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "Distância :" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "Agrupar e/ou alinhar os objetos selecionados" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" +"Normal\n" +"Topo\n" +"Meia-altura\n" +"Baixo\n" +"Esquerda\n" +"Centro\n" +"Direita" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "A_grupar" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "E_spaçar regularmente" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "Selecionar" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "Selecionar um ou vários objetos" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "Apaga" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "Borracha" + +#: ../plugins/paint/selection/selectiontool.cc:368 +msgid "Creation failed!" +msgstr "A criação falhou!" + +#: ../plugins/paint/selection/selectiontool.cc:392 +msgid "Group and/or align objects" +msgstr "Agrupar e/ou alinhar objetos" + +#: ../plugins/paint/selection/selectiontool.cc:430 +msgid "Horizontal flip" +msgstr "Giro horizontal" + +#: ../plugins/paint/selection/selectiontool.cc:431 +msgid "Flip the selection horizontally" +msgstr "Gira a seleção horizontalmente" + +#: ../plugins/paint/selection/selectiontool.cc:432 +msgid "Vertical flip" +msgstr "Giro vertical" + +#: ../plugins/paint/selection/selectiontool.cc:433 +msgid "Flip the selection vertically" +msgstr "Gira a seleção verticalmente" + +#: ../plugins/paint/selection/selectiontool.cc:434 +msgid "Merge" +msgstr "Funde" + +#: ../plugins/paint/selection/selectiontool.cc:435 +msgid "Merge two molecules" +msgstr "Fundir duas moléculas" + +#: ../plugins/paint/selection/selectiontool.cc:439 +msgid "_Rotate" +msgstr "_Rotação" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Rotate the selection" +msgstr "Gira a seleção" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "Novo modelo" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "_Categoria :" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "_Nome" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "Modelos" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "Utiliza ou gera os modelos" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "Diversos" + +#: ../plugins/paint/templates/templates.glade.h:1 +msgid "No selected template" +msgstr "Nenhum modelo selecionado" + +#: ../plugins/paint/templates/templates.glade.h:2 +msgid "_Templates" +msgstr "_Modelos" + +#: ../plugins/paint/templates/templates.glade.h:3 +msgid "category" +msgstr "categoria" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "Queira fornecer um objeto." + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "Queira escolher um nome." + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "Queira escolher uma categoria." + +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" +"Nenhum\n" +"Simples\n" +"Duplo\n" +"Abaixo" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "_Tamanho" + +#: ../plugins/paint/text/fontsel.glade.h:6 +msgid "Stri_kethrough" +msgstr "_Riscado" + +#: ../plugins/paint/text/fontsel.glade.h:7 +msgid "_Color:" +msgstr "_Cor :" + +#: ../plugins/paint/text/fontsel.glade.h:8 +msgid "_Family:" +msgstr "_Família" + +#: ../plugins/paint/text/fontsel.glade.h:9 +msgid "_Position:" +msgstr "_Posição :" + +#: ../plugins/paint/text/fontsel.glade.h:10 +msgid "_Style:" +msgstr "E_stilo :" + +#: ../plugins/paint/text/fontsel.glade.h:11 +msgid "_Underline:" +msgstr "S_ublinhado" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "Adiciona ou modifica um texto" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "Adiciona ou modifica um groupo de átomos" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "Impossível salvar a imagem: " + +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +msgid "GChem3D Viewer" +msgstr "Visualizador de moléculas GChem3D" -#: ../programs/3d/main.cc:40 +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "Lamento, formato não suportado !" + +#: ../programs/3d/main.cc:44 msgid "GChem3d Viewer version: " msgstr "Versão do visualizador GChem3D :" -#: ../programs/3d/main.cc:51 +#: ../programs/3d/main.cc:55 msgid "Prints GChem3d Viewer version" msgstr "Imprime a versão do visualizador GChem3D" -#: ../programs/3d/main.cc:52 +#: ../programs/3d/main.cc:56 msgid "Background color: white, black or #rrggbb (default is black)" msgstr "Cor de fundo : branco, preto ou #rrvvbb (preto padrão)" -#: ../programs/3d/main.cc:53 -msgid "How molecules are displayed; possible values are BallnStick (the default) and SpaceFill" -msgstr "Como as moléculas são desenhadas; Os valores possíveis são BallnStick (Valor padrão) e SpaceFill" +#: ../programs/3d/main.cc:57 +#, fuzzy +msgid "" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" +msgstr "" +"Como as moléculas são desenhadas; Os valores possíveis são BallnStick (Valor " +"padrão) e SpaceFill" -#: ../programs/3d/main.cc:75 +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 msgid " [file]" msgstr " [arquivo]" -#: ../programs/3d/main.cc:97 -#: ../programs/crystal/main.cc:168 +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 #, c-format msgid "Invalid or misplaced argument: %s\n" msgstr "Argumento inválido ou mal colocado : %s\n" -#: ../programs/3d/window.cc:119 +#: ../programs/3d/window.cc:129 msgid "GChem3D is a molecular structures viewer for Gnome" msgstr "GChem3D é um visualizador de estruturas moleculares para Gnome" #. const gchar * documentors[] = {NULL}; -#: ../programs/3d/window.cc:121 -msgid "Copyright © 2004-2007 Jean Bréfort\n" +#: ../programs/3d/window.cc:131 +#, fuzzy +msgid "Copyright © 2004-2008 Jean Bréfort\n" msgstr "Copyright © 2004-2007 por Jean Bréfort\n" -#. Note to translators: replace the following string with the appropriate credits for you lang -#: ../programs/3d/window.cc:139 -#: ../programs/calc/gchemcalc.cc:149 -#: ../programs/crystal/window.cc:120 -#: ../programs/table/gchemtable-app.cc:122 -msgid "translator_credits" -msgstr "Grégoire Jean-François Demets" - -#: ../programs/3d/window.cc:161 -#: ../programs/calc/gchemcalc.cc:409 -#: ../programs/crystal/window.cc:247 -#: ../programs/table/gchemtable-app.cc:141 -msgid "_File" -msgstr "_Arquivo" - -#: ../programs/3d/window.cc:162 -#: ../programs/crystal/window.cc:250 -msgid "_Open..." -msgstr "_Abrir..." - -#: ../programs/3d/window.cc:163 -#: ../programs/crystal/window.cc:251 -msgid "Open a file" -msgstr "Abrir um arquivo" - -#: ../programs/3d/window.cc:164 -#: ../programs/crystal/window.cc:256 -msgid "Save As _Image..." -msgstr "Salvar como imagem..." - -#: ../programs/3d/window.cc:165 -#: ../programs/crystal/window.cc:257 -msgid "Save the current file as an image" -msgstr "Salvar o arquivo ativo como imagem" - -#: ../programs/3d/window.cc:166 -#: ../programs/crystal/window.cc:258 -msgid "_Print..." -msgstr "Im_primir..." - -#: ../programs/3d/window.cc:167 +#: ../programs/3d/window.cc:181 msgid "Print the current scene" msgstr "Imprimir a tela" -#: ../programs/3d/window.cc:168 -#: ../programs/crystal/window.cc:260 -msgid "_Close" -msgstr "_Fechar" - -#: ../programs/3d/window.cc:169 -#: ../programs/crystal/window.cc:261 -msgid "Close the current file" -msgstr "Fechar o arquivo ativo" - -#: ../programs/3d/window.cc:170 -#: ../programs/calc/gchemcalc.cc:410 -#: ../programs/crystal/window.cc:262 -#: ../programs/table/gchemtable-app.cc:142 -msgid "_Quit" -msgstr "_Sair" - -#: ../programs/3d/window.cc:171 +#: ../programs/3d/window.cc:185 msgid "Quit GChem3D" msgstr "Sair do GChem3D" -#: ../programs/3d/window.cc:172 -#: ../programs/crystal/window.cc:278 -#: ../programs/table/gchemtable-app.cc:144 -msgid "_View" -msgstr "_Ver" - -#: ../programs/3d/window.cc:173 -#: ../programs/calc/gchemcalc.cc:412 -#: ../programs/crystal/window.cc:286 -#: ../programs/table/gchemtable-app.cc:159 -msgid "_Help" -msgstr "_Ajuda" - -#: ../programs/3d/window.cc:174 -#: ../programs/calc/gchemcalc.cc:413 -#: ../programs/crystal/window.cc:287 -#: ../programs/table/gchemtable-app.cc:160 -msgid "_Contents" -msgstr "_Conteúdo" - -#: ../programs/3d/window.cc:175 +#: ../programs/3d/window.cc:189 msgid "View help for the Molecules Viewer" msgstr "Ver a ajuda para o visualizador de moléculas" -#: ../programs/3d/window.cc:176 -#: ../programs/calc/gchemcalc.cc:415 -#: ../programs/crystal/window.cc:289 -#: ../programs/table/gchemtable-app.cc:162 +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:320 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:166 +#: ../programs/table/gchemtable-curve.cc:233 msgid "Gnome Chemistry Utils on the _web" msgstr "Gnome Chemistry Utils na _Tela" -#: ../programs/3d/window.cc:177 -#: ../programs/calc/gchemcalc.cc:416 -#: ../programs/crystal/window.cc:290 -#: ../programs/table/gchemtable-app.cc:163 +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:321 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/table/gchemtable-curve.cc:234 msgid "Browse the Gnome Chemistry Utils's web site" -msgstr "Navegar no site do Gnome Chemistry Utils" - -#: ../programs/3d/window.cc:178 -#: ../programs/calc/gchemcalc.cc:417 -#: ../programs/crystal/window.cc:291 -#: ../programs/table/gchemtable-app.cc:164 -msgid "_Ask a question" -msgstr "_Fazer uma pergunta" +msgstr "Navegar no site do Gnome Chemistry Utils" -#: ../programs/3d/window.cc:179 -#: ../programs/calc/gchemcalc.cc:418 -#: ../programs/crystal/window.cc:292 -#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:325 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 msgid "Ask a question about the Gnome Chemistry Utils" msgstr "Fazer uma pergunta sobre o Gnome Chemistry Utils" -#: ../programs/3d/window.cc:180 -#: ../programs/calc/gchemcalc.cc:419 -#: ../programs/crystal/window.cc:293 -#: ../programs/table/gchemtable-app.cc:166 -msgid "Report _Bugs" -msgstr "_Relatar um erro" - -#: ../programs/3d/window.cc:181 -#: ../programs/calc/gchemcalc.cc:420 -#: ../programs/crystal/window.cc:294 -#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:327 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:240 msgid "Submit a bug report for the Gnome Chemistry Utils" msgstr "Relatar um erro no Gnome Chemistry Utils" -#: ../programs/3d/window.cc:182 -#: ../programs/calc/gchemcalc.cc:421 -#: ../programs/crystal/window.cc:295 -#: ../programs/table/gchemtable-app.cc:168 -msgid "_About" -msgstr "S_obre..." - -#: ../programs/3d/window.cc:183 +#: ../programs/3d/window.cc:199 msgid "About GChem3D" msgstr "Sobre o GChem3D" -#: ../programs/3d/window.cc:187 +#: ../programs/3d/window.cc:203 msgid "Balls and sticks" msgstr "Esferas e varetas" -#: ../programs/3d/window.cc:188 +#: ../programs/3d/window.cc:204 msgid "Display a balls and sticks model" msgstr "Mostra um modelo de esferas e varetas" -#: ../programs/3d/window.cc:190 +#: ../programs/3d/window.cc:206 msgid "Space filling" msgstr "Compacto" -#: ../programs/3d/window.cc:191 +#: ../programs/3d/window.cc:207 msgid "Display a space filling model" msgstr "Mostra um modelo compacto" -#: ../programs/3d/window.cc:268 +#: ../programs/3d/window.cc:209 +#, fuzzy +msgid "Cylinders" +msgstr "Ciclos" + +#: ../programs/3d/window.cc:210 +#, fuzzy +msgid "Display a cylinders model" +msgstr "Mostra um modelo compacto" + +#: ../programs/3d/window.cc:212 +msgid "Wireframe" +msgstr "" + +#: ../programs/3d/window.cc:213 +#, fuzzy +msgid "Display a wireframe model" +msgstr "Mostra um modelo compacto" + +#: ../programs/3d/window.cc:271 msgid "Background color" msgstr "Cor de fundo" -#: ../programs/3d/window.cc:269 +#: ../programs/3d/window.cc:272 msgid "Choose a new background color" msgstr "Escolher uma nova cor de fundo" -#: ../programs/3d/window.cc:299 -#: ../programs/crystal/window.cc:425 +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:429 +#: ../programs/spectra/window.cc:257 msgid "Open recent" msgstr "Abrir recente" -#: ../programs/3d/window.cc:359 -#: ../programs/crystal/application.cc:126 -msgid "Preview" -msgstr "Prévisualização" - -#: ../programs/3d/gchem3d-viewer-unstable.desktop.in.h:1 +#: ../programs/3d/gchem3d.desktop.in.in.h:1 msgid "Display chemical 3D structures" msgstr "Mostra estruturas químicas em três dimensões" -#: ../programs/3d/gchem3d-viewer-unstable.desktop.in.h:2 -msgid "Molecules Viewer (unstable)" +#: ../programs/3d/gchem3d.desktop.in.in.h:2 +#, fuzzy +msgid "Molecules Viewer @STABILITY_POSTFIX@" msgstr "Visualizador de moléculas (instável)" -#: ../programs/calc/gchemcalc.cc:129 +#: ../programs/calc/gchemcalc.cc:301 msgid "GChemCalc is a simple calculator for chemists" msgstr "GChemCalc é uma calculadora simples para químicos" #. const gchar * documentors[] = {NULL}; -#: ../programs/calc/gchemcalc.cc:131 +#: ../programs/calc/gchemcalc.cc:303 msgid "Copyright © 2005-2007 Jean Bréfort\n" msgstr "Copyright © 2005-2007 por Jean Bréfort\n" -#: ../programs/calc/gchemcalc.cc:411 +#: ../programs/calc/gchemcalc.cc:619 msgid "Quit GChemCalc" msgstr "Sair do GChemCalc" -#: ../programs/calc/gchemcalc.cc:414 +#: ../programs/calc/gchemcalc.cc:623 +msgid "_Mode" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:626 msgid "View help for the Chemical Calculator" msgstr "Ver a ajuda da calculadora química" -#: ../programs/calc/gchemcalc.cc:422 +#: ../programs/calc/gchemcalc.cc:636 msgid "About GChemCalc" msgstr "Sobre o GChemCalc" -#: ../programs/calc/gchemcalc.cc:468 +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:643 +#, fuzzy +msgid "_Atom" +msgstr "Átomo" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:646 +#, fuzzy +msgid "_Nickname" +msgstr "_Nome" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:688 msgid "GChemCalc Calculator version: " msgstr "Versão da calculadora química :" -#: ../programs/calc/gchemcalc.cc:489 +#: ../programs/calc/gchemcalc.cc:714 msgid " [formula]" msgstr "[fórmula]" -#: ../programs/calc/gchemcalc.cc:506 +#: ../programs/calc/gchemcalc.cc:731 +#, fuzzy msgid "For usage see: gchemcalc-unstable [-?|--help]" msgstr "Para a utilização, ver : gchemcalc-unstable [-?|--help]" -#: ../programs/calc/gchemcalc.cc:560 +#: ../programs/calc/gchemcalc.cc:777 msgid "Element" msgstr "Elemento" -#: ../programs/calc/gchemcalc.cc:567 +#: ../programs/calc/gchemcalc.cc:784 msgid "Mass %" msgstr "% Massa" -#: ../programs/calc/gchemcalc-unstable.desktop.in.h:1 +#: ../programs/calc/gchemcalc.desktop.in.in.h:1 msgid "A simple calculator for chemistry" msgstr "Uma calculadora simples para químicos" -#: ../programs/calc/gchemcalc-unstable.desktop.in.h:2 -msgid "Chemical calculator (unstable)" -msgstr "Calculadora química (instável)" +#: ../programs/calc/gchemcalc.desktop.in.in.h:2 +#, fuzzy +msgid "Chemical calculator @STABILITY_POSTFIX@" +msgstr "Calculadora química" -#: ../programs/crystal/gcrystal-unstable.desktop.in.h:1 +#: ../programs/crystal/gcrystal.desktop.in.in.h:1 msgid "Edit and display crystalline structures" msgstr "Edita e representa estruturas cristalinas" -#: ../programs/crystal/gcrystal-unstable.desktop.in.h:2 -msgid "Gnome Crystal Crystalline Structures Viewer (unstable)" +#: ../programs/crystal/gcrystal.desktop.in.in.h:2 +#, fuzzy +msgid "Gnome Crystal Crystalline Structures Viewer @STABILITY_POSTFIX@" msgstr "Visualizador de estruturas cristalinas Gnome Cristal (instável)" #: ../programs/crystal/gcrystal.schemas.in.h:1 -msgid "Backgroud color blue value" +#, fuzzy +msgid "Background color blue value" msgstr "Componente azul da cor do plano de fundo" #: ../programs/crystal/gcrystal.schemas.in.h:2 -msgid "Backgroud color green value" +#, fuzzy +msgid "Background color green value" msgstr "Componente verde da cor do plano de fundo" #: ../programs/crystal/gcrystal.schemas.in.h:3 -msgid "Backgroud color red value" +#, fuzzy +msgid "Background color red value" msgstr "Componente vermelha da cor do plano de fundo" #: ../programs/crystal/gcrystal.schemas.in.h:4 -msgid "Blue value for the default background color. Acceptable values are 0. to 1." -msgstr "Valor padrão da componente azul da cor do plano de fundo. Os valores aceitáveis estão entre 0 e 1." +msgid "" +"Blue value for the default background color. Acceptable values are 0. to 1." +msgstr "" +"Valor padrão da componente azul da cor do plano de fundo. Os valores " +"aceitáveis estão entre 0 e 1." #: ../programs/crystal/gcrystal.schemas.in.h:5 -msgid "Default Euler's nutation ângulo for model display. Acceptable values are 0. to + 180." -msgstr "Valor padrão do ângulo de Euler de nutação θ. Os valores aceitáveis estão entre 0 e 180." +#, fuzzy +msgid "" +"Default Euler's nutation angle for model display. Acceptable values are 0. " +"to + 180." +msgstr "" +"Valor padrão do ângulo de Euler de nutação θ. Os valores aceitáveis estão " +"entre 0 e 180." #: ../programs/crystal/gcrystal.schemas.in.h:6 -msgid "Default Euler's precession ângulo for model display. Acceptable values are -180. to + 180." -msgstr "Valor padrão do ângulo de Euler de precessão ψ. Os valores aceitáveis estão entre -180 e 180." +#, fuzzy +msgid "" +"Default Euler's precession angle for model display. Acceptable values are -" +"180. to + 180." +msgstr "" +"Valor padrão do ângulo de Euler de precessão ψ. Os valores aceitáveis estão " +"entre -180 e 180." #: ../programs/crystal/gcrystal.schemas.in.h:7 -msgid "Default Euler's spin ângulo for model display. Acceptable values are -180. to + 180." -msgstr "Valor padrão do ângulo de Euler de rotação própria φ. Os valores aceitáveis estão entre -180 e 180" +#, fuzzy +msgid "" +"Default Euler's spin angle for model display. Acceptable values are -180. to " +"+ 180." +msgstr "" +"Valor padrão do ângulo de Euler de rotação própria φ. Os valores aceitáveis " +"estão entre -180 e 180" #: ../programs/crystal/gcrystal.schemas.in.h:8 msgid "Default field of view" @@ -1461,8 +3914,11 @@ msgstr "Ângulo de visão padrão para a representação do modelo." #: ../programs/crystal/gcrystal.schemas.in.h:13 -msgid "Green value for the default background color. Acceptable values are 0. to 1." -msgstr "Valor padrão da componente verde da cor do plano de fundo. Os valores aceitáveis estão entre 0 e 1." +msgid "" +"Green value for the default background color. Acceptable values are 0. to 1." +msgstr "" +"Valor padrão da componente verde da cor do plano de fundo. Os valores " +"aceitáveis estão entre 0 e 1." #: ../programs/crystal/gcrystal.schemas.in.h:14 msgid "Printing resolution" @@ -1470,48 +3926,45 @@ #: ../programs/crystal/gcrystal.schemas.in.h:15 msgid "Printing resolution if not automatically detected." -msgstr "Resolução da impressora no caso em que esta não tenha sido detectada automaticamente." +msgstr "" +"Resolução da impressora no caso em que esta não tenha sido detectada " +"automaticamente." #: ../programs/crystal/gcrystal.schemas.in.h:16 -msgid "Red value for the default background color. Acceptable values are 0. to 1." -msgstr "Valor padrão da componente vermelha da cor do plano de fundo. Os valores aceitáveis estão entre 0 e 1." +msgid "" +"Red value for the default background color. Acceptable values are 0. to 1." +msgstr "" +"Valor padrão da componente vermelha da cor do plano de fundo. Os valores " +"aceitáveis estão entre 0 e 1." -#: ../programs/crystal/application.cc:55 +#: ../programs/crystal/application.cc:58 #, c-format msgid "Untitled%d" msgstr "SemTítulo%d" -#: ../programs/crystal/application.cc:261 +#: ../programs/crystal/application.cc:318 #, c-format -msgid "\"%s\" has been modified since last saving. Do you wish to come back to saved version?" +msgid "" +"\"%s\" has been modified since last saving. Do you wish to come back to " +"saved version?" msgstr "" "``%s'' foi modificado desde a última gravação.\n" " Deseja voltar à última gravação ?" -#: ../programs/crystal/atomsdlg.cc:133 -msgid "Atom" -msgstr "Átomo" - -#: ../programs/crystal/atomsdlg.cc:187 -#: ../programs/crystal/atomsdlg.cc:282 -#: ../programs/crystal/atomsdlg.cc:415 -msgid "Unknown" -msgstr "Desconhecido" - #. Note for translators: c.n. is for coordination number -#: ../programs/crystal/atomsdlg.cc:555 +#: ../programs/crystal/atomsdlg.cc:624 msgid " c.n.=" msgstr " n.c. =" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "low spin" msgstr "baixo spin" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "high spin" msgstr "alto spin" -#: ../programs/crystal/atomsdlg.cc:563 +#: ../programs/crystal/atomsdlg.cc:632 msgid "Database" msgstr "Base de dados" @@ -1535,7 +3988,7 @@ msgid "Planes cleaved" msgstr "Planos clivados" -#: ../programs/crystal/document.cc:252 +#: ../programs/crystal/document.cc:271 #, c-format msgid "" "Could not save file\n" @@ -1544,509 +3997,1523 @@ "Erro ao salvar o arquivo\n" "%s" -#: ../programs/crystal/document.cc:255 -#, c-format -msgid "" -"Could not load file\n" -"%s" -msgstr "" -"Erro ao carregar o arquivo\n" -"%s" - -#: ../programs/crystal/document.cc:258 -#, c-format -msgid "" -"%s: invalid xml file.\n" -"Tree is empty?" -msgstr "" -"%s: arquivo xml incorreto.\n" -"Arvore de diretórios vazia ?" - -#: ../programs/crystal/document.cc:261 -#, c-format -msgid "%s: invalid file format." -msgstr "%s: formato de arquivo incorreto." - -#: ../programs/crystal/document.cc:609 -#, c-format -msgid "\"%s\" has been modified. Do you wish to save it?" -msgstr "``%s'' foi modificado. Gostaria de salvar ?" - -#: ../programs/crystal/linesdlg.cc:119 +#: ../programs/crystal/linesdlg.cc:121 msgid "x1" msgstr "x1" -#: ../programs/crystal/linesdlg.cc:129 +#: ../programs/crystal/linesdlg.cc:131 msgid "y1" msgstr "y1" -#: ../programs/crystal/linesdlg.cc:139 +#: ../programs/crystal/linesdlg.cc:141 msgid "z1" msgstr "z1" -#: ../programs/crystal/linesdlg.cc:149 +#: ../programs/crystal/linesdlg.cc:151 msgid "x2" msgstr "x2" -#: ../programs/crystal/linesdlg.cc:159 +#: ../programs/crystal/linesdlg.cc:161 msgid "y2" msgstr "y2" -#: ../programs/crystal/linesdlg.cc:169 +#: ../programs/crystal/linesdlg.cc:171 msgid "z2" msgstr "z2" -#: ../programs/crystal/linesdlg.cc:178 +#: ../programs/crystal/linesdlg.cc:180 msgid "Single" msgstr "Único" -#: ../programs/crystal/main.cc:98 +#: ../programs/crystal/main.cc:88 msgid "Gnome Chemistry Utils version: " msgstr "Versão do Gnome Chemistry Utils :" -#: ../programs/crystal/main.cc:127 +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 msgid " [file...]" msgstr " [arquivo...]" -#: ../programs/crystal/window.cc:122 -#: ../programs/crystal/window.cc:383 +#: ../programs/crystal/window.cc:142 ../programs/crystal/window.cc:394 msgid "Gnome Crystal" msgstr "Gnome Cristal" -#: ../programs/crystal/window.cc:125 +#: ../programs/crystal/window.cc:145 msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" -msgstr "Gnome Cristal é um Visualizador simples de estruturas cristalinas para Gnome" +msgstr "" +"Gnome Cristal é um Visualizador simples de estruturas cristalinas para Gnome" -#: ../programs/crystal/window.cc:126 +#: ../programs/crystal/window.cc:146 msgid "Copyright © 1999-2007 by Jean Bréfort" msgstr "Copyright © 1999-2007 por Jean Bréfort" -#: ../programs/crystal/window.cc:248 -msgid "_New File" -msgstr "_Novo arquivo" - -#: ../programs/crystal/window.cc:249 -msgid "Create a new file" -msgstr "Criar um novo arquivo" - -#: ../programs/crystal/window.cc:252 -msgid "_Save" -msgstr "_Salvar" - -#: ../programs/crystal/window.cc:253 -msgid "Save the current file" -msgstr "Salvar o arquivo ativo" - -#: ../programs/crystal/window.cc:254 -msgid "Save _As..." -msgstr "Salvar _como..." - -#: ../programs/crystal/window.cc:255 -msgid "Save the current file with a different name" -msgstr "Salvar o arquivo com um novo nome" - -#: ../programs/crystal/window.cc:259 -msgid "Print the current file" -msgstr "Imprimir a tela" - -#: ../programs/crystal/window.cc:263 +#: ../programs/crystal/window.cc:294 msgid "Quit Gnome Crystal" msgstr "Sair do Gnome Cristal" -#: ../programs/crystal/window.cc:264 -msgid "_Edit" -msgstr "_Editar" - -#: ../programs/crystal/window.cc:265 +#: ../programs/crystal/window.cc:296 msgid "Prefere_nces..." msgstr "_Preferências" -#: ../programs/crystal/window.cc:266 -msgid "Configure the application" -msgstr "Configurar o aplicativo" - -#: ../programs/crystal/window.cc:267 +#: ../programs/crystal/window.cc:298 msgid "_Crystal" msgstr "_Cristal" -#: ../programs/crystal/window.cc:268 +#: ../programs/crystal/window.cc:299 msgid "_Lattice..." msgstr "_Retículo..." -#: ../programs/crystal/window.cc:269 +#: ../programs/crystal/window.cc:300 msgid "Define the lattice" msgstr "Definir o retículo" -#: ../programs/crystal/window.cc:270 +#: ../programs/crystal/window.cc:301 msgid "_Atoms..." msgstr "_Átomos..." -#: ../programs/crystal/window.cc:271 +#: ../programs/crystal/window.cc:302 msgid "Add or edit atoms" msgstr "Adicionar ou editar átomos" -#: ../programs/crystal/window.cc:272 +#: ../programs/crystal/window.cc:303 msgid "_Bonds and lines..." msgstr "_Ligações e linhas..." -#: ../programs/crystal/window.cc:273 +#: ../programs/crystal/window.cc:304 msgid "Add or edit bonds and lines" msgstr "Adicionar ligações e linhas" -#: ../programs/crystal/window.cc:274 +#: ../programs/crystal/window.cc:305 msgid "_Size..." msgstr "_Tamanho..." -#: ../programs/crystal/window.cc:275 -msgid "Define size" -msgstr "Definir o tamanho" +#: ../programs/crystal/window.cc:306 +msgid "Define size" +msgstr "Definir o tamanho" + +#: ../programs/crystal/window.cc:307 +msgid "_Cleavages..." +msgstr "_Clivagens..." + +#: ../programs/crystal/window.cc:308 +msgid "Add or edit cleavages to remove some planes" +msgstr "Adicionar clivagens para eliminar planos" + +#: ../programs/crystal/window.cc:310 +msgid "View _settings..." +msgstr "_Parâmetros de visualização..." + +#: ../programs/crystal/window.cc:311 +msgid "Choose background color and model position" +msgstr "Escolher a cor de fundo e a posição do modelo" + +#: ../programs/crystal/window.cc:313 +msgid "Create new _window" +msgstr "_Nova Janela" + +#: ../programs/crystal/window.cc:314 +msgid "Create a new window" +msgstr "Criar uma nova Janela" + +#: ../programs/crystal/window.cc:315 +msgid "_Close this window" +msgstr "_Fecha esta Janela" + +#: ../programs/crystal/window.cc:316 +msgid "Close the current window" +msgstr "Fecha a Janela ativa" + +#: ../programs/crystal/window.cc:319 +msgid "View help for Gnome Crystal" +msgstr "Consultar a ajuda do Gnome Cristal" + +#: ../programs/crystal/window.cc:329 +msgid "About Gnome Crystal" +msgstr "Sobre o Gnome Cristal" + +#: ../programs/paint/gchempaint.desktop.in.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "Edita estruturas químicas 2D" + +#: ../programs/paint/gchempaint.desktop.in.in.h:2 +#, fuzzy +msgid "GChemPaint Chemical Structures Editor @STABILITY_POSTFIX@" +msgstr "Editor de estruturas químicas GChemPaint" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "Família de fontes das fórmulas químicas." + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "Tamanho da fonte das fórmulas químicas." + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "Alargamento da fonte utlizada nas fórmulas químicas." + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "Estilo da fonte utlizado nas fórmulas químicas." + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "Variante da fonte utlizada nas fórmulas químicas." + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "Grossura da fonte utlizada nas fórmulas químicas." + +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "" +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." +msgstr "" +"Fator de compressão dos arquivos salvos. Os valores aceitos vão de 0 (sem " +"compressão) a 9." + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "Ângulo padrão entre duas ligações." + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." +msgstr "" +"Ângulo padrão entre duas ligações consecutivas em uma cadeia em graus. Valor " +"utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:10 +#, fuzzy +msgid "Default arrow length" +msgstr "Tamanho padrão das flechas" + +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "" +"Tamanho padrão das flechas em picometros. Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "" +"Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Largura padrão da cauda de uma flecha (em 100% de zoom). Valor utlizado no " +"tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "Largura padrão da cauda de uma flecha." + +#: ../programs/paint/gchempaint.schemas.in.h:15 +#, fuzzy +msgid "Default bond length" +msgstr "Tamanho de ligação padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "" +"Tamanho padrão das ligações em picometros. Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "" +"Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Largura padrão da linha representando uma ligação (a 100% de zoom). Valor " +"utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "Largura padrão da linha representando uma ligação." + +#: ../programs/paint/gchempaint.schemas.in.h:20 +msgid "Default charge sign size." +msgstr "Tamanho padrão do sinal de carga." + +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "Distância padrão entre duas linhas de uma flecha dupla." + +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "Distância padrão entre duas linhas de uma ligação múltipla." + +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "" +"Distância padrão entre duas linhas (a 100% de zoom) de uma flecha dupla ou " +"de uma flecha de retossíntese. Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" +"Distância padrão entre duas linhas (em 100% de zoom) de uma ligação " +"múltipla. Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format +msgid "" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." +msgstr "" +"Distância padrão entre duas hachuras (em 100% de zoom) de uma ligação. Valor " +"utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." +msgstr "" +"Distância padrão em pixels da ponta da flecha ao centro (em 100% de zoom). " +"Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "Distância padrão em pixels da ponta da flecha ao centro." + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Distância padrão entre a ponta da flecha e seu ponto de fuga, medida " +"paralelamente à cauda, em pixels (em 100% de zoom). Valor utlizado no tema " +"por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" +"Distância padrão entre a ponta da flecha e seu ponto de fuga, medida " +"paralelamente à cauda." + +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Distância padrão entre o ponto de fuga da ponta da flecha e da cauda (em " +"100% de zoom). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "Distância padrão entre o ponto de fuga da ponta da flecha e dacauda." + +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "Espaço adicional padrão após um coeficiente estequiométrico." + +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Espaço adicional padrão entre um coeficiente estequiométrico e amolécula " +"associada (em 100% de zoom). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "" +"Família padrão de fontes utlizadas para o texto. Valor utlizado no tema por " +"padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." +msgstr "" +"Estiramento da fonte utlizada para o texto (0 = ultra-condensado ; 1 = extra-" +"condensado ; 2 = condensado ; 3 = semi-condensado ; 4 = normal ; 5 = semi-" +"esticado ; 6 = esticado ; 7 = extra-esticado ; 8 = ultra-esticado). Valor " +"utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" +"Estilo padrão da fonte utlizada para o texto (0 = normal ; 1 = oblíquo ; 2 " +"=itálico). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." +msgstr "" +"Variante padrão da fonte utlizada para o texto (0 = normal ; 1 = caps " +"pequenas). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." +msgstr "" +"Grossura padrão da fonte utlizada para o texto (2 = ultra-fino ; 3 = fino ; " +"4 =normal 6 = semi-grossa ; 7 = grossa ; 8 = ultra-grossa ; 9 = pesada). " +"Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:46 +msgid "Default hash line width." +msgstr "Largura padrão das hachuras." + +#: ../programs/paint/gchempaint.schemas.in.h:47 +msgid "Default hash lines distance." +msgstr "Distância padrão entre duas hachuras." + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Largura padrão das ligações estereoquímicas na extremidade mais larga (em " +"100% de zoom). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "Largura padrão das ligações estereoquímicas." + +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Largura padrão das hachuras (em 100% de zoom). Valor utlizado no tema por " +"padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:53 +msgid "Default padding around arrows." +msgstr "Espaço padrão em torno das flechas." + +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Espaço padrão antes e depois um sinal '+' de uma reação química (em 100% de " +"zoom). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "Espaço padrão antes e depois um sinal '+' de uma reação." + +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "Espaço padrão entre objetos alinhados." + +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." +msgstr "" +"Espaço padrão entre as flechas e os objetos associados (em 100% de zoom). " +"Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "Espaço padrão em torno dos textos." + +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." +msgstr "" +"Espaço padrão em pixels adicionado entre dois objetos consecutivos em uma " +"operação de alinhamento (em 100% de zoom). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." +msgstr "" +"Tamanho padrão em pixels de sinais de carga (em 100% de zoom). Valor " +"utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "Família padrão de fontes utlizadas para o texto." + +#: ../programs/paint/gchempaint.schemas.in.h:66 +msgid "Default text font size." +msgstr "Tamanho padrão da fonte utlizada para o texto." + +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "Estiramento padrão da fonte utlizada para o texto." + +#: ../programs/paint/gchempaint.schemas.in.h:68 +msgid "Default text font style." +msgstr "Estilo padrão da fonte utlizado para o texto." + +#: ../programs/paint/gchempaint.schemas.in.h:69 +msgid "Default text font variant." +msgstr "Variante padrão da fonte utlizada para o texto." + +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "Espessura padrão da fonte utlizada para o texto." + +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:72 +#, fuzzy +msgid "Default theme." +msgstr "Padrão" + +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." +msgstr "Fator de compressão dos arquivos." + +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." +msgstr "" +"Família padrão de fontes utlizadas para as fórmulas químicas. Valor utlizado " +"no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." +msgstr "" +"Tamanho padrão da fonte utlizado para as fórmulas químicas. Valor utlizado " +"no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "" +"Tamanho padrão da fonte utlizado para o texto. Valor utlizado no tema por " +"padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." +msgstr "" +"Estiramento da fonte utlizada para as fórmulas químicas (0 = ultra-" +"condensado ; 1 = extra-condensado ; 2 = condensado ; 3 = semi-condensado ; 4 " +"= normal ; 5 = semi-esticado ; 6 = esticado ; 7 = extra-esticado ; 8 = ultra-" +"esticado). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "" +"Estilo padrão da fonte utlizado para as fórmulas químicas (0 = normal ; 1 = " +"oblíquo ; 2 =itálico). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." +msgstr "" +"Variante padrão da fonte utlizada para as fórmulas químicas (0 = normal ; 1 " +"= caps pequenas). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." +msgstr "" +"Espessura padrão da fonte utlizada para as fórmulas químicas (2 = ultra-" +"fino ; 3 = fino ; 4 =normal 6 = semi-grossa ; 7 = grosse ; 8 = ultra-" +"grosse ; 9 = pesada). Valor utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "" +"Se VERDADEIRO, STRING_UTF8 e STRING serão adicionados aos formatos da área " +"de transferência" -#: ../programs/crystal/window.cc:276 -msgid "_Cleavages..." -msgstr "_Clivagens..." +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." +msgstr "" +"Se VERDADEIRO, a tabela periódica pode ser destacada da caixa de ferramentas." -#: ../programs/crystal/window.cc:277 -msgid "Add or edit cleavages to remove some planes" -msgstr "Adicionar clivagens para eliminar planos" +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." +msgstr "" +"Espaço en pixels adicionado em torno dos objetos de texto como os símbolos " +"químicos, os textos e outros sinais tipográficos (em 100% de zoom). Valor " +"utlizado no tema por padrão." + +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "Escala (pm por pixel)." -#: ../programs/crystal/window.cc:279 -msgid "View _settings..." -msgstr "_Parâmetros de visualização..." +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." +msgstr "" +"Escala utlizada para converter as distâncias reais em distâncias no desenho, " +"expressa em pm por pixel.Valor utlizado no tema por padrão." -#: ../programs/crystal/window.cc:280 -msgid "Choose background color and model position" -msgstr "Escolher a cor de fundo e a posição do modelo" +#: ../programs/paint/gchempaint.schemas.in.h:88 +msgid "Whether the periodic table is tearable." +msgstr "Destacar a classificação periódica dos elementos" + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "Exportar texto simples ao copiar." + +#: ../programs/paint/main.cc:46 +msgid "GChemPaint version: " +msgstr "Versão do GChemPaint : " -#: ../programs/crystal/window.cc:281 -msgid "_Windows" -msgstr "Ja_nelas" +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" +msgstr "" -#: ../programs/crystal/window.cc:282 -msgid "Create new _window" -msgstr "_Nova Janela" +#: ../programs/spectra/gspectrum.desktop.in.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "" -#: ../programs/crystal/window.cc:283 -msgid "Create a new window" -msgstr "Criar uma nova Janela" +#: ../programs/spectra/gspectrum.desktop.in.in.h:2 +msgid "Spectrum viewer @STABILITY_POSTFIX@" +msgstr "" -#: ../programs/crystal/window.cc:284 -msgid "_Close this window" -msgstr "_Fecha esta Janela" +#: ../programs/spectra/window.cc:124 +#, fuzzy +msgid "GSpectrum is a spectrum viewer for Gnome" +msgstr "GChem3D é um visualizador de estruturas moleculares para Gnome" -#: ../programs/crystal/window.cc:285 -msgid "Close the current window" -msgstr "Fecha a Janela ativa" +#. const gchar * documentors[] = {NULL}; +#: ../programs/spectra/window.cc:126 +#, fuzzy +msgid "Copyright © 2007 Jean Bréfort\n" +msgstr "Copyright © 2004-2007 por Jean Bréfort\n" -#: ../programs/crystal/window.cc:288 -msgid "View help for Gnome Crystal" -msgstr "Consultar a ajuda do Gnome Cristal" +#: ../programs/spectra/window.cc:180 +#, fuzzy +msgid "Quit GSpectrum" +msgstr "Sair do GChem3D" -#: ../programs/crystal/window.cc:296 -msgid "About Gnome Crystal" -msgstr "Sobre o Gnome Cristal" +#: ../programs/spectra/window.cc:186 +#, fuzzy +msgid "View help for the Spetra Viewer" +msgstr "Ver a ajuda para o visualizador de moléculas" -#: ../programs/crystal/window.cc:445 -msgid "Ready" -msgstr "Pronto" +#: ../programs/spectra/window.cc:196 +#, fuzzy +msgid "About GSpectrum" +msgstr "Sobre o GChem3D" -#: ../programs/table/gchemtable-app.cc:102 -msgid "GChemTable is a chemical periodic table of the elements application" -msgstr "GChemTable é uma aplicação da tabela periódica dos elementos" +#: ../programs/table/gchemtable-app.cc:135 +msgid "New _Chart" +msgstr "" -#. const gchar * documentors[] = {NULL}; -#: ../programs/table/gchemtable-app.cc:104 -msgid "Copyright © 2005-2007 Jean Bréfort" -msgstr "Copyright © 2005-2007 por Jean Bréfort" +#: ../programs/table/gchemtable-app.cc:136 +#, fuzzy +msgid "Create a new chart" +msgstr "Criar uma nova reação" -#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-app.cc:138 +#: ../programs/table/gchemtable-curve.cc:224 msgid "Quit GChemTable" msgstr "Sair do GChemTable" -#: ../programs/table/gchemtable-app.cc:145 +#: ../programs/table/gchemtable-app.cc:140 msgid "Color scheme" msgstr "Esquema de cores" -#: ../programs/table/gchemtable-app.cc:146 +#: ../programs/table/gchemtable-app.cc:141 msgid "No colors" msgstr "Sem Cor" -#: ../programs/table/gchemtable-app.cc:147 +#: ../programs/table/gchemtable-app.cc:142 msgid "Use default Gtk theme colors" msgstr "Utiliza as cores do tema padrão do Gtk" -#: ../programs/table/gchemtable-app.cc:148 -msgid "Default" -msgstr "Padrão" - -#: ../programs/table/gchemtable-app.cc:149 +#: ../programs/table/gchemtable-app.cc:144 msgid "Use default symbolic element colors" msgstr "Utiliza as cores simbólicas dos elementos" -#: ../programs/table/gchemtable-app.cc:150 +#: ../programs/table/gchemtable-app.cc:145 msgid "Physical states" msgstr "Estados físicos" -#: ../programs/table/gchemtable-app.cc:151 +#: ../programs/table/gchemtable-app.cc:146 msgid "Use colors to display physical state at a given temperature" -msgstr "Utiliza as cores para indicar o estado físico em determinada temperatura" - -#: ../programs/table/gchemtable-app.cc:153 -msgid "Family" -msgstr "Família" +msgstr "" +"Utiliza as cores para indicar o estado físico em determinada temperatura" -#: ../programs/table/gchemtable-app.cc:154 +#: ../programs/table/gchemtable-app.cc:149 msgid "Use colors to display the family grouping of the elements" msgstr "Utiliza cores para indicar a família à qual pertence o elemento" -#: ../programs/table/gchemtable-app.cc:156 +#: ../programs/table/gchemtable-app.cc:151 msgid "Acidity" msgstr "Acidez" -#: ../programs/table/gchemtable-app.cc:157 +#: ../programs/table/gchemtable-app.cc:152 msgid "Use colors to display the acidity of the elements" msgstr "Utiliza cores para indicar o comportamento ácido-base dos elementos" +#: ../programs/table/gchemtable-app.cc:154 +#, fuzzy +msgid "Electronegativity" +msgstr "Afinidade eletrônica" + +#: ../programs/table/gchemtable-app.cc:155 +#, fuzzy +msgid "Use colors to display the electronegativity of the elements" +msgstr "Utiliza cores para indicar o comportamento ácido-base dos elementos" + +#: ../programs/table/gchemtable-app.cc:157 +msgid "Atomic radius" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:158 +#, fuzzy +msgid "Use colors to display the covalent radii of the elements" +msgstr "Utiliza cores para indicar o comportamento ácido-base dos elementos" + +#: ../programs/table/gchemtable-app.cc:160 +msgid "Block" +msgstr "" + #: ../programs/table/gchemtable-app.cc:161 +#, fuzzy +msgid "Use colors to display the blocks elements belong to" +msgstr "Utiliza cores para indicar o comportamento ácido-base dos elementos" + +#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/table/gchemtable-curve.cc:230 msgid "View help for the Periodic Table" msgstr "Consultar a ajuda da tabela periódica" -#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:242 msgid "About GChemTable" msgstr "Sobre o GChemTable" -#. The <sup> </sup> markup at the end of the chain is there to ensure that +#: ../programs/table/gchemtable-app.cc:343 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "GChemTable é uma aplicação da tabela periódica dos elementos" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/table/gchemtable-app.cc:345 +#, fuzzy +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "Copyright © 2005-2007 por Jean Bréfort" + +#. The markup at the end of the chain is there to ensure that #. things will be correcly aligned, add the same to the translated string -#: ../programs/table/gchemtable-elt.cc:68 -msgid "Electronic configuration:<sup> </sup>" +#: ../programs/table/gchemtable-elt.cc:61 +#, fuzzy +msgid "Electronic configuration: " msgstr "Configuração eletrônica :<sup> </sup>" -#: ../programs/table/gchemtable-elt.cc:80 +#: ../programs/table/gchemtable-elt.cc:73 msgid "Lang" msgstr "Língua" -#: ../programs/table/gchemtable-elt.cc:87 +#: ../programs/table/gchemtable-elt.cc:80 msgid "Name" msgstr "Nome" -#: ../programs/table/gchemtable-elt.cc:113 -#: ../programs/table/gchemtable-elt.cc:157 -#: ../programs/table/gchemtable-elt.cc:193 -#: ../programs/table/gchemtable-elt.cc:216 -#: ../programs/table/gchemtable-elt.cc:230 -#: ../programs/table/gchemtable-elt.cc:244 -#: ../programs/table/gchemtable-elt.cc:266 +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 msgid "n.a." msgstr "n.d." -#: ../programs/table/gchemtable-elt.cc:125 -#: ../programs/table/gchemtable-elt.cc:167 +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 #, c-format msgid "%d:" msgstr "%d :" -#: ../programs/table/gchemtable-elt.cc:278 +#: ../programs/table/gchemtable-elt.cc:271 msgid "Ion" msgstr "Íon" #. C.N. stands for coordination number -#: ../programs/table/gchemtable-elt.cc:285 +#: ../programs/table/gchemtable-elt.cc:278 msgid "C.N." msgstr "N.C." -#: ../programs/table/gchemtable-elt.cc:290 +#: ../programs/table/gchemtable-elt.cc:283 msgid "Spin" msgstr "Spin" -#: ../programs/table/gchemtable-elt.cc:297 +#: ../programs/table/gchemtable-elt.cc:290 msgid "Value" msgstr "Valor" -#: ../programs/table/gchemtable-elt.cc:316 +#: ../programs/table/gchemtable-elt.cc:310 msgid "Low" msgstr "Baixo" -#: ../programs/table/gchemtable-elt.cc:319 +#: ../programs/table/gchemtable-elt.cc:313 msgid "High" msgstr "Alto" -#: ../programs/table/gchemtable-curve.cc:187 -#: ../programs/table/gchemtable-curve.cc:191 +#: ../programs/table/gchemtable-curve.cc:220 +#, fuzzy +msgid "Modify the graph properties" +msgstr "Edita as propriedades do arquivo" + +#: ../programs/table/gchemtable-curve.cc:232 +#, fuzzy +msgid "View help for the Curve Window" +msgstr "Ver a ajuda para o visualizador de moléculas" + +#: ../programs/table/gchemtable-curve.cc:324 +#: ../programs/table/gchemtable-curve.cc:328 +#: ../programs/table/gchemtable-data.cc:524 msgid "Pauling electronegativity" msgstr "Eletronegatividade de Pauling" -#: ../programs/table/gchemtable-curve.cc:203 +#: ../programs/table/gchemtable-curve.cc:340 msgid "Electron affinity (kJ/mol)" msgstr "Afinidade eletrônica (kJ/mol)" -#: ../programs/table/gchemtable-curve.cc:207 +#: ../programs/table/gchemtable-curve.cc:344 msgid "Electron affinity" msgstr "Afinidade eletrônica" -#: ../programs/table/gchemtable-curve.cc:221 +#: ../programs/table/gchemtable-curve.cc:358 msgid "1st. " msgstr "1o" -#: ../programs/table/gchemtable-curve.cc:224 +#: ../programs/table/gchemtable-curve.cc:361 msgid "2nd. " msgstr "2o " -#: ../programs/table/gchemtable-curve.cc:227 +#: ../programs/table/gchemtable-curve.cc:364 msgid "3rd. " msgstr "3o " -#: ../programs/table/gchemtable-curve.cc:230 +#: ../programs/table/gchemtable-curve.cc:367 #, c-format msgid "%dth. " msgstr "%do" -#: ../programs/table/gchemtable-curve.cc:233 +#: ../programs/table/gchemtable-curve.cc:370 msgid "ionization energy (MJ/mol)" msgstr "Energia de ionização (MJ/mol)" -#: ../programs/table/gchemtable-curve.cc:240 +#: ../programs/table/gchemtable-curve.cc:377 msgid "ionization energy" msgstr "Energia de ionização" -#: ../programs/table/gchemtable-curve.cc:259 -#: ../programs/table/gchemtable-curve.cc:263 +#: ../programs/table/gchemtable-curve.cc:396 +#: ../programs/table/gchemtable-curve.cc:400 msgid "Covalent radii" msgstr "Raios covalentes" -#: ../programs/table/gchemtable-curve.cc:279 -#: ../programs/table/gchemtable-curve.cc:283 +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 msgid "Van der Waals radii" msgstr "Raios de van der Waals" -#: ../programs/table/gchemtable-curve.cc:299 -#: ../programs/table/gchemtable-curve.cc:303 +#: ../programs/table/gchemtable-curve.cc:436 +#: ../programs/table/gchemtable-curve.cc:440 msgid "Metallic radii" msgstr "Raios metálicos" -#: ../programs/table/gchemtable-curve.cc:314 -#: ../programs/table/gchemtable-curve.cc:318 +#: ../programs/table/gchemtable-curve.cc:451 +#: ../programs/table/gchemtable-curve.cc:455 msgid "Melting point" msgstr "Temperatura de fusão" -#: ../programs/table/gchemtable-curve.cc:329 -#: ../programs/table/gchemtable-curve.cc:333 +#: ../programs/table/gchemtable-curve.cc:466 +#: ../programs/table/gchemtable-curve.cc:470 msgid "Boiling point" msgstr "Temperatura de ebulição" -#: ../programs/table/gchemtable-unstable.desktop.in.h:1 +#: ../programs/table/gchemtable-curve.cc:485 +#: ../programs/table/gchemtable-data.cc:522 +#, fuzzy +msgid "Atomic number" +msgstr "Número atômico :" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +#, fuzzy +msgid "Invalide data" +msgstr "Caractere inválido" + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +#, fuzzy +msgid "None" +msgstr "Neônio" + +#: ../programs/table/gchemtable-data.cc:523 +#, fuzzy +msgid "Atomic mass" +msgstr "Número atômico :" + +#: ../programs/table/gchemtable-data.cc:525 +#, fuzzy +msgid "First ionization energy" +msgstr "Energia de ionização" + +#: ../programs/table/gchemtable-data.cc:526 +#, fuzzy +msgid "Second ionization energy" +msgstr "Energia de ionização" + +#: ../programs/table/gchemtable-data.cc:527 +#, fuzzy +msgid "Third ionization energy" +msgstr "Energia de ionização" + +#: ../programs/table/gchemtable-data.cc:528 +#, fuzzy +msgid "Electronic affinity" +msgstr "Afinidade eletrônica" + +#: ../programs/table/gchemtable-data.cc:529 +#, fuzzy +msgid "Covalent radius" +msgstr "Raios covalentes" + +#: ../programs/table/gchemtable-data.cc:530 +#, fuzzy +msgid "Van der Waals radius" +msgstr "Raios de van der Waals" + +#: ../programs/table/gchemtable-data.cc:531 +#, fuzzy +msgid "Metallic radius" +msgstr "Raios metálicos" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Fusion temperature" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Ebullition temperature" +msgstr "" + +#: ../programs/table/gchemtable.desktop.in.in.h:1 msgid "A Mendeleiev table of the chemical elements" msgstr "Tabela de Mendeleiev dos elementos químicos" -#: ../programs/table/gchemtable-unstable.desktop.in.h:2 -msgid "Periodic table of the elements (unstable)" -msgstr "Tabela periódica dos elementos (instável)" +#: ../programs/table/gchemtable.desktop.in.in.h:2 +#, fuzzy +msgid "Periodic table of the elements @STABILITY_POSTFIX@" +msgstr "Tabela periódica dos elementos" + +#: ../templates/paint/haworth.xml.in.h:1 +msgid "Saccharides" +msgstr "Sacarídeos" + +#: ../templates/paint/haworth.xml.in.h:2 +msgid "α-D-deoxyribofuranose" +msgstr "α-D-deoxiribofuranose" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "α-D-fructofuranose" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "α-D-galactopiranose" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "α-D-glucopiranose" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "α-D-ribofuranose" + +#: ../templates/paint/haworth.xml.in.h:7 +msgid "β-D-deoxyribofuranose" +msgstr "β-D-deoxiribofuranose" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "β-D-fructofuranose" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "β-D-galactopiranose" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "β-D-glucopiranose" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "β-D-ribofuranose" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "Adenina" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "Adenosina" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "Alanina" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "Aminoácidos" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "Antraceno" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "Arginina" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "Hidrocarbonetos aromáticos" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "Asparagina" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "Ácido aspártico" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "Azuleno" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "Benzeno" + +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "Sisteína" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "Citidina" + +#: ../templates/paint/templates.xml.in.h:14 +msgid "Cytosine" +msgstr "Citosina" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "Desoxiadenosina" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "Desoxicitidina" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "Desoxiguanosina" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "Desoxitimidina" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "Ácido glutâmico" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "Glutamina" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "Glicina" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "Guanina" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "Guanosina" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "Histidina" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "Isoleucina" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "Leucina" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "Lisina" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "Metionina" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "Naftaleno" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "Bases nuclêicas" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "Nucleosídeos" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "Fenantreno" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "Fenilalanina" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "Prolina" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "Pireno" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "Serina" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "Treonina" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "Timina" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "Triptofano" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "Tirosina" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "Uracila" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "Uridina" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "Valina" + +#~ msgid "amu" +#~ msgstr "uma" + +#~ msgid "Chemical calculator (unstable)" +#~ msgstr "Calculadora química (instável)" + +#~ msgid "Periodic table of the elements (unstable)" +#~ msgstr "Tabela periódica dos elementos (instável)" -#~ msgid "Bottom" -#~ msgstr "Bas" -#~ msgid "Documents" -#~ msgstr "Documents" -#~ msgid "Hidden" -#~ msgstr "Cachés" #~ msgid "Left" #~ msgstr "Esquerda" + #~ msgid "MDI configuation" #~ msgstr "Configuration MDI" + #~ msgid "Notebook tab position:" #~ msgstr "Posição des onglets" -#~ msgid "Other" -#~ msgstr "Outro" -#~ msgid "Preferences" -#~ msgstr "Préférences" + #~ msgid "Right" #~ msgstr "Direita" -#~ msgid "Top" -#~ msgstr "Haut" -#~ msgid "View settings" -#~ msgstr "Paramètres de la vue" -#~ msgid "Covalent" -#~ msgstr "Covalent" + #~ msgid "Ionic" #~ msgstr "Iônico" -#~ msgid "Metallic" -#~ msgstr "Metálico" + #~ msgid "Van der Waals" #~ msgstr "Van der Waals" + #~ msgid "Choose a color" #~ msgstr "Escolha uma cor" -#~ msgid "Unknown display mode" -#~ msgstr "Mode d'affichage inconnu" + #~ msgid "Notebook tabs position" #~ msgstr "Posição des onglets" + #~ msgid "" #~ "Whether to display or not the notebook tabs and where. Possible values " #~ "are: 0: hide, 1: left, 2: right, 3: top, and 4:bottom." #~ msgstr "" #~ "Posição des onglets. Les valores possíveis sont : 0: cachés, 1: esquerda, " #~ "2: direita, 3: haut, and 4:bas." + #~ msgid "Can't create file %s" #~ msgstr "" #~ "Impossível criar o arquivo\n" #~ "%s" + #~ msgid "O_pen in a new window..." #~ msgstr "O_uvrir dans uma nova Janela..." + #~ msgid "Open a file in a new window" #~ msgstr "Ouvrir un arquivo dans uma nova Janela..." -#~ msgid "_Export" -#~ msgstr "_Exporter" + #~ msgid "VRML" #~ msgstr "VRML" + #~ msgid "Export to VRML" #~ msgstr "Exporter un arquivo VRML" + #~ msgid "PNG" #~ msgstr "PNG" -#~ msgid "Export view to png file" -#~ msgstr "Exporter la vue en temps qu'image png" + #~ msgid "Jpeg" #~ msgstr "Jpeg" -#~ msgid "Export view to jpeg file" -#~ msgstr "Exporter la vue en temps qu'image jpeg" + #~ msgid "Export model as a Jpeg file..." #~ msgstr "Exporter le modelo en temps qu'image Jpeg..." + #~ msgid "Export model as a PNG file..." #~ msgstr "Exporter le modelo en temps qu'image PNG..." + #~ msgid "Export model as a VRML file..." #~ msgstr "Exporter le modelo en temps que arquivo VRML..." + #~ msgid "Crystal Model" #~ msgstr "modelo Cristallin" -#~ msgid "Gnome Crystal component" -#~ msgstr "Composant Gnome Cristal" + #~ msgid "Gnome Crystal component to display crystalline structures" #~ msgstr "" #~ "Composant Gnome Cristal plara la représentation de structure cristallines" -#~ msgid "Gnome Crystal embeddable factory" -#~ msgstr "Fabrique de modèles cristallins incorporés" -#~ msgid "Gnome Crystal object factory" -#~ msgstr "Fabrique d'objets de Gnome Cristal" -#~ msgid "Crystalline structure model" -#~ msgstr "modelo de structure cristalline" -#~ msgid "Documents/Chemistry" -#~ msgstr "Documents/Chimie" -#~ msgid "Allow Gnome Crystal to act as a Bonobo server." -#~ msgstr "Permet d'utiliser Gnome Cristal en temps que serveur Bonobo" -#~ msgid "Jean Bréfort: French" -#~ msgstr "Jean Bréfort: Français" -#~ msgid "Tigrux: Spanish" -#~ msgstr "Tigrux: Espagnol" -#~ msgid "Costantino Ceoldo: Italian" -#~ msgstr "Costantino Ceoldo: Italien" -#~ msgid "Nikodem Kuznik: Polish" -#~ msgstr "Nikodem Kuznik: Polonais" -#~ msgid "Export data or graphics" -#~ msgstr "Exporter des données ou un dessin" -#~ msgid "New" -#~ msgstr "Nouveau" -#~ msgid "Print" -#~ msgstr "Imprimer" -#~ msgid "Print active view" -#~ msgstr "Imprimer la vue active" -#~ msgid "Quit" -#~ msgstr "Quitter" + #~ msgid "Load a model..." #~ msgstr "Charger un modelo..." + #~ msgid "Gnome Crystal help contents" #~ msgstr "Sommaire de l'aide de Gnome Cristal" +#~ msgid "2D chemical structures types" +#~ msgstr "Tipos de estruturas Química 2D" + +#~ msgid "Generate Smiles" +#~ msgstr "Gerar o Smiles" + +#~ msgid "Could not open file %s." +#~ msgstr "" +#~ "Impossível abrir o arquivo\n" +#~ "%s" + +#~ msgid "About GChemPaint..." +#~ msgstr "Sobre o GChemPaint..." + +#~ msgid "Displays copyright and contributors of GChemPaint" +#~ msgstr "Mostra o copyright e os nomes dos colaboradores do GChemPaint" + +#~ msgid "Edit file propeties" +#~ msgstr "Edita as propriedades do arquivo" + +#~ msgid "GChemPaint T_ools" +#~ msgstr "_Ferramentas do GChemPaint" + +#~ msgid "Print file to the printer" +#~ msgstr "Imprimir o arquivo em impressora" + +#~ msgid "Proper_ties" +#~ msgstr "Propriedades" + +#~ msgid "Show the periodic table of the elements" +#~ msgstr "Mostrar a classificação periódica dos elementos" + +#~ msgid "Show tools window" +#~ msgstr "Mostrar a janela de ferramentas" + +#~ msgid "_Periodic table" +#~ msgstr "Tabela _periódica" + +#~ msgid "_Print" +#~ msgstr "Im_primir" + +#~ msgid "<b>Property</b>" +#~ msgstr "<b>Propriedade</b>" + +#~ msgid "<b>Value</b>" +#~ msgstr "<b>Valor</b>" + +#~ msgid "<b>Auto</b>" +#~ msgstr "<b>Auto</b>" + +#~ msgid "<b>Author:</b>" +#~ msgstr "<b>Autor :</b>" + +#~ msgid "<b>History</b>" +#~ msgstr "<b>Histórico</b>" + +#~ msgid "<b>Theme</b>" +#~ msgstr "<b>tema</b>" + +#~ msgid "<b>_Comments:</b>" +#~ msgstr "<b>_Comentários :</b>" + +#~ msgid "<b>Arrow heads</b>" +#~ msgstr "<b>Pontas de flechas</b>" + +#~ msgid "<b>Themes</b>" +#~ msgstr "<b>Temas</b>" + +#~ msgid "<<b>Theme</b>b>Theme</b>" +#~ msgstr "<b>tema</b>" + +#~ msgid "Distan_ce:" +#~ msgstr "Distân_cia:" + +#~ msgid "Lengt_h:" +#~ msgstr "Com_primento:" + +#~ msgid "GChemPaint component" +#~ msgstr "Componente GChemPaint" + +#~ msgid "GChemPaint component to draw 2D chemical formulas" +#~ msgstr "Componente GChemPaint para criar estruturas químicas 2D" + +#~ msgid "GChemPaint control" +#~ msgstr "Controle GChemPaint" + +#~ msgid "GChemPaint control to display 2D chemical formulas" +#~ msgstr "Controle GChemPaint para mostrar estruturas químicas 2D" + +#~ msgid "GChemPaint embeddable factory" +#~ msgstr "Gerador de componentes do GChemPaint" + +#~ msgid "GChemPaint object factory" +#~ msgstr "Fábrica de objetos do GChemPaint" + +#~ msgid "GChemPaint help contents" +#~ msgstr "Sumário de ajuda do GChemPaint" + +#~ msgid "_Save All" +#~ msgstr "_Salvar tudo" + +#~ msgid "Save all open files" +#~ msgstr "Salvar todos arquivos abertos" + +#~ msgid "_Close All" +#~ msgstr "Fechar _Tudo" + +#~ msgid "Close all open files" +#~ msgstr "Fechar todos os arquivos abertos" + +#~ msgid "Reversible reaction arrows heads" +#~ msgstr "Pontas de flechas para as reações reversíveis" + +#~ msgid "Tools Options" +#~ msgstr "Opções das ferramentas" + +#~ msgid "Variable size cycle tool" +#~ msgstr "Ferramenta ciclo de tamanho variável" + +#~ msgid "GChemPaint Templates" +#~ msgstr "Modelos do GChemPaint" + +#~ msgid "Arrows toolbar" +#~ msgstr "Barra de ferramentas Flechas" + +#~ msgid "Double arrow tool" +#~ msgstr "Ferramenta flecha dupla" + +#~ msgid "Mesomery arrow tool" +#~ msgstr "Ferramenta flecha de mesomeria" + +#~ msgid "Retrosynthesis arrow tool" +#~ msgstr "Ferramenta flecha de retrossíntese" + +#~ msgid "Simple arrow tool" +#~ msgstr "Ferramenta flecha simples" + +#~ msgid "Atoms toolbar" +#~ msgstr "Barra de ferramentas Átomos" + +#~ msgid "Electron pair tool" +#~ msgstr "Ferramenta par de elétrons" + +#~ msgid "Element tool" +#~ msgstr "Ferramenta elemento" + +#~ msgid "Negative Charge tool" +#~ msgstr "Ferramenta carga negativa" + +#~ msgid "Positive Charge tool" +#~ msgstr "Ferramenta carga positiva" + +#~ msgid "Unpaired electron tool" +#~ msgstr "Ferramenta elétron desemparelhado" + +#~ msgid "Bond tool" +#~ msgstr "Ferramenta Ligação" + +#~ msgid "Bonds toolbar" +#~ msgstr "Barra de ferramentas Ligações" + +#~ msgid "Fore bond" +#~ msgstr "Ligação para frente" + +#~ msgid "Hash bond" +#~ msgstr "Ligação para trás" + +#~ msgid "Squiggle bond" +#~ msgstr "Ligação estereoquímica indeterminada" + +#~ msgid "Wedge bond" +#~ msgstr "Ligação para frente" + +#~ msgid "Cycles toolbar" +#~ msgstr "Barra de ferramentas Ciclos" + +#~ msgid "Four atoms cycle tool" +#~ msgstr "Ferramenta de ciclo de quatro átomos" + +#~ msgid "Three atoms cycle tool" +#~ msgstr "Ferramenta de ciclo de três átomos" + +#~ msgid "Eraser tool" +#~ msgstr "Ferramenta borracha" + +#~ msgid "Horizontal flip tool" +#~ msgstr "Ferramenta de giro horizontal" + +#~ msgid "Merge molecules tool" +#~ msgstr "Ferramenta fusão de moléculas" + +#~ msgid "Rotate" +#~ msgstr "Rotação" + +#~ msgid "Selection" +#~ msgstr "Seleciona um ou mais objetos" + +#~ msgid "Selection tool" +#~ msgstr "Ferramenta Seleção" + +#~ msgid "Selection toolbar" +#~ msgstr "Barra de ferramentas de Seleção" + +#~ msgid "Vertical flip tool" +#~ msgstr "Ferramenta de giro vertical" + +#~ msgid "Change current template" +#~ msgstr "Altera o modelo atual" + +#~ msgid "Templates selector" +#~ msgstr "Seletor de modelos" + +#~ msgid "Templates tool" +#~ msgstr "Ferrmenta Modelos" + +#~ msgid "Templates toolbar" +#~ msgstr "Barra de ferramentas Modelos" + +#~ msgid "Bold" +#~ msgstr "Negrito" + +#~ msgid "Fragment" +#~ msgstr "Fragmento" + +#~ msgid "Fragment tool" +#~ msgstr "Ferramenta fragmento" + +#~ msgid "Italic" +#~ msgstr "Itálico" + +#~ msgid "Subscript" +#~ msgstr "Subescrito" + +#~ msgid "Superscript" +#~ msgstr "Sobrescrito" + +#~ msgid "Text tool" +#~ msgstr "Ferramenta texto" + +#~ msgid "Text toolbar" +#~ msgstr "Barra de ferramentas de Texto" + +#~ msgid "GChemPaint document" +#~ msgstr "Documento GChemPaint" + +#~ msgid "Type a number between %g and %g" +#~ msgstr "Entre um número entre %g e %g" + +#~ msgid "Sorry, not yet implemented!" +#~ msgstr "Lamento, esta função ainda não foi implementada!" + +#~ msgid "Editable file flag" +#~ msgstr "Indicador de autorização de edição do arquivo" + +#~ msgid "Paste the clipborad" +#~ msgstr "Cola o conteúdo da área de transferência" + +#~ msgid "Electron pair move arrow tool" +#~ msgstr "Ferramenta flecha de deslocamento de par de elétrons" + +#~ msgid "Single electron move arrow tool" +#~ msgstr "Ferramenta flecha de deslocamento de elétron desemparelhado" + +#~ msgid "Delocalized bonds" +#~ msgstr "Ligação deslocalizada" + +#~ msgid "Documents" +#~ msgstr "Documentos" + +#~ msgid "Save _As" +#~ msgstr "Salvar _como..." + +#~ msgid "Undo the lase action" +#~ msgstr "Desfaz a última operação" diff -Nru gnome-chemistry-utils-0.8.6/po/ru.po gnome-chemistry-utils-0.10.9/po/ru.po --- gnome-chemistry-utils-0.8.6/po/ru.po 2007-05-10 14:07:17.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/po/ru.po 2009-11-14 11:30:40.000000000 +0100 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gnome-chemistry-utils\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-05-09 09:18+0200\n" +"POT-Creation-Date: 2008-08-24 22:25+0200\n" "PO-Revision-Date: 2005-11-20 23:58+0300\n" "Last-Translator: Valek Filippov \n" "Language-Team: Russian \n" @@ -14,11 +14,177 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../gchemutils.xml.in.h:1 ../programs/crystal/x-gcrystal.desktop.in.h:1 +#: ../gchemutils.schemas.in.h:1 +msgid "Default Bottom Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:2 +msgid "Default Left Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:3 +msgid "Default Top Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:4 +msgid "Default Top Outside Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:5 +#, fuzzy +msgid "Footer height" +msgstr "Молекулярный вес:" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "" + +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "" + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +#, fuzzy +msgid "2D Chemical structure" +msgstr "Редактирование химических структур" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 msgid "Crystalline structure model" msgstr "" -#: ../glade/gchemcalc.glade.h:1 ../programs/calc/gchemcalc.desktop.in.h:2 +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "" + +#: ../database/residues.xml.in.h:5 +#, fuzzy +msgid "Benzyl" +msgstr "Бензол" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "" + +#: ../database/residues.xml.in.h:8 +#, fuzzy +msgid "Halogen" +msgstr "Водород" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "" + +#: ../database/residues.xml.in.h:12 +msgid "Metal" +msgstr "" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "" + +#: ../database/residues.xml.in.h:14 +#, fuzzy +msgid "Phenyl" +msgstr "Фенилаланин" + +#: ../database/residues.xml.in.h:15 +#, fuzzy +msgid "Propyl" +msgstr "Пролин" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "" + +#: ../glade/gchemcalc.glade.h:1 msgid "Chemical calculator" msgstr "Химический калькулятор" @@ -26,7 +192,7 @@ msgid "Composition" msgstr "Соединение" -#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:166 +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 msgid "Formula:" msgstr "Формула:" @@ -43,7 +209,7 @@ msgid "Monoisotopic mass:" msgstr "Моноизотопная масса:" -#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:169 +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 msgid "Raw formula:" msgstr "" @@ -67,6 +233,161 @@ msgid "Image resolution:" msgstr "" +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "" + +#: ../glade/print-setup.glade.h:4 +#, fuzzy +msgid "O_rientation:" +msgstr "Ориентация: %g" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "" + +#: ../glade/print-setup.glade.h:7 +msgid "Bottom margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "" + +#: ../glade/print-setup.glade.h:11 +msgid "Footer:" +msgstr "" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:16 +#, fuzzy +msgid "Page" +msgstr "Вст_авить" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "" + +#: ../glade/print-setup.glade.h:18 +#, fuzzy +msgid "Portrait" +msgstr "Печать" + +#: ../glade/print-setup.glade.h:19 +msgid "Reload defaults" +msgstr "" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:23 +#, fuzzy +msgid "Save as defaults" +msgstr "Сохранить все открытые файлы" + +#: ../glade/print-setup.glade.h:24 +#, fuzzy +msgid "Scale" +msgstr "Со_хранить" + +#: ../glade/print-setup.glade.h:25 +#, fuzzy +msgid "Scale to fit _horizontally on" +msgstr "Отразить выделение горизонтально" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "" + +#: ../glade/print-setup.glade.h:29 +#, fuzzy +msgid "_Automatic scaling:" +msgstr "Молекулярный вес:" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:33 +#, fuzzy +msgid "_Horizontally" +msgstr "Горизонтальное отражение" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "" + +#: ../glade/print-setup.glade.h:35 +#, fuzzy +msgid "_Vertically" +msgstr "Вертикальное отражение" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:407 +#: ../libs/gcp/preferences.cc:481 ../libs/gcp/preferences.cc:531 +msgid "Bonds" +msgstr "Связи" + #: ../glade/crystal/cell.glade.h:1 msgid "Cell" msgstr "" @@ -121,6 +442,43 @@ msgid "γ (°):" msgstr "" +#: ../glade/crystal/docprop.glade.h:1 ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 +msgid "*" +msgstr "*" + +#: ../glade/crystal/docprop.glade.h:2 +msgid "Author" +msgstr "Автор" + +#: ../glade/crystal/docprop.glade.h:3 +msgid "Comments" +msgstr "Комментарий" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "Дата создания:" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "Свойства документа" + +#: ../glade/crystal/docprop.glade.h:6 +msgid "E-mail:" +msgstr "Адрес эл.почты:" + +#: ../glade/crystal/docprop.glade.h:7 +msgid "Name:" +msgstr "Название:" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "Дата обновления:" + +#: ../glade/crystal/docprop.glade.h:9 +msgid "Title:" +msgstr "Заголовок:" + #: ../glade/crystal/prefs.glade.h:1 msgid "" "300\n" @@ -153,7 +511,7 @@ msgstr "" #: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 -msgid "Field of view (between 1° and 45°):" +msgid "Field of view (between 1 and 45°):" msgstr "" #: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 @@ -181,42 +539,58 @@ msgstr "" #: ../glade/crystal/atoms.glade.h:1 -msgid "Atoms" +msgid "Apply changes to:" msgstr "" -#: ../glade/crystal/atoms.glade.h:2 -msgid "Charge: " -msgstr "" +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:395 +#: ../libs/gcp/preferences.cc:469 ../libs/gcp/preferences.cc:519 +msgid "Atoms" +msgstr "Атомы" #: ../glade/crystal/atoms.glade.h:3 -msgid "Custom" +msgid "Charge: " msgstr "" #: ../glade/crystal/atoms.glade.h:4 +#, fuzzy +msgid "Custom" +msgstr "_Вырезать" + +#: ../glade/crystal/atoms.glade.h:5 msgid "Custom color:" msgstr "" -#: ../glade/crystal/atoms.glade.h:5 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 #: ../glade/crystal/lines.glade.h:2 msgid "Dele_te all" msgstr "" -#: ../glade/crystal/atoms.glade.h:6 ../gcu/gtkcomboperiodic.c:96 -#: ../programs/table/gchemtable-app.cc:252 -#: ../programs/table/gchemtable.desktop.in.h:2 +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:261 msgid "Periodic table of the elements" msgstr "Периодическая таблица элементов" -#: ../glade/crystal/atoms.glade.h:7 +#: ../glade/crystal/atoms.glade.h:8 #, fuzzy msgid "Radius" msgstr "Радий" -#: ../glade/crystal/atoms.glade.h:8 +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:13 msgid "Type:" msgstr "" -#: ../glade/crystal/atoms.glade.h:9 +#: ../glade/crystal/atoms.glade.h:14 msgid "" "Unknown\n" "Ionic\n" @@ -225,20 +599,20 @@ "Van der Waals" msgstr "" -#: ../glade/crystal/atoms.glade.h:14 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/atoms.glade.h:19 +msgid "Value (pm):" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 #: ../glade/crystal/lines.glade.h:7 msgid "_Add" msgstr "" -#: ../glade/crystal/atoms.glade.h:15 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 #: ../glade/crystal/lines.glade.h:8 msgid "_Delete" msgstr "" -#: ../glade/crystal/atoms.glade.h:16 -msgid "value (pm):" -msgstr "" - #: ../glade/crystal/cleavages.glade.h:1 msgid "Cleavages" msgstr "" @@ -279,10 +653,6 @@ msgid "radius (pm):" msgstr "" -#: ../glade/crystal/size.glade.h:1 -msgid "*" -msgstr "" - #: ../glade/crystal/size.glade.h:2 msgid "Crystal size" msgstr "" @@ -301,113 +671,435 @@ msgid "Minimum" msgstr "Экаиридий" -#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:143 +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 msgid "x" msgstr "" -#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:153 +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 msgid "y" msgstr "" -#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:163 +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 msgid "z" msgstr "" -#: ../glade/table/eltpage.glade.h:1 -msgid "1:" +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" msgstr "" -#: ../glade/table/eltpage.glade.h:2 -msgid "Atomic number:" +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" msgstr "" -#: ../glade/table/eltpage.glade.h:3 +#: ../glade/paint/arrow-object.glade.h:3 +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-close" +msgstr "" + +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +#: ../plugins/paint/residues/residues.glade.h:10 +msgid "gtk-help" +msgstr "" + +#: ../glade/paint/docprop.glade.h:1 #, fuzzy -msgid "Atomic weight:" -msgstr "Молекулярный вес:" +msgid "Author:" +msgstr "Автор" -#: ../glade/table/eltpage.glade.h:4 -msgid "Boiling point:" +#: ../glade/paint/docprop.glade.h:2 +msgid "History" msgstr "" -#: ../glade/table/eltpage.glade.h:5 +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "" + +#: ../glade/paint/docprop.glade.h:4 #, fuzzy -msgid "Covalent:" -msgstr "Кобальт" +msgid "_Comments:" +msgstr "Комментарий" -#: ../glade/table/eltpage.glade.h:6 -msgid "Electronic affinities:" +#: ../glade/paint/docprop.glade.h:7 +#, fuzzy +msgid "E-_mail:" +msgstr "Адрес эл.почты:" + +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +#, fuzzy +msgid "Theme:" +msgstr "Тимин" + +#: ../glade/paint/docprop.glade.h:10 +#: ../plugins/paint/residues/residues.glade.h:6 +#, fuzzy +msgid "_Name:" +msgstr "Название" + +#: ../glade/paint/docprop.glade.h:11 +#, fuzzy +msgid "_Title:" +msgstr "Заголовок:" + +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1879 +msgid "Hydrogen atoms position" msgstr "" -#: ../glade/table/eltpage.glade.h:7 -msgid "Electronic properties" +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" msgstr "" -#: ../glade/table/eltpage.glade.h:8 -msgid "Ionic radii (Shannon and Prewitt):" +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" msgstr "" -#: ../glade/table/eltpage.glade.h:9 -msgid "Ionization energies:" +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" msgstr "" -#: ../glade/table/eltpage.glade.h:10 -msgid "Isotopes" +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" msgstr "" -#: ../glade/table/eltpage.glade.h:11 -msgid "Main" +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" msgstr "" -#: ../glade/table/eltpage.glade.h:12 -msgid "Melting point:" +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" msgstr "" -#: ../glade/table/eltpage.glade.h:13 -msgid "Metallic:" +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" msgstr "" -#: ../glade/table/eltpage.glade.h:14 -#, fuzzy -msgid "Pauling electronegativity:" -msgstr "Электроотрицательность Паули" +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "" -#: ../glade/table/eltpage.glade.h:15 +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:6 #, fuzzy -msgid "Radii" -msgstr "Радий" +msgid "Angl_e:" +msgstr "Серебро" -#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:133 -msgid "Show curve" +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." msgstr "" -#: ../glade/table/eltpage.glade.h:17 -msgid "Thermodynamics" +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" msgstr "" -#: ../glade/table/eltpage.glade.h:18 -msgid "Van der Waals:" +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." msgstr "" -#: ../glade/table/state-thermometer.glade.h:1 -msgid " Solid " +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" msgstr "" -#: ../glade/table/state-thermometer.glade.h:2 -msgid " Liquid " +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" msgstr "" -#: ../glade/table/state-thermometer.glade.h:3 -msgid " Gas " +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" msgstr "" -#: ../glade/table/state-thermometer.glade.h:4 -msgid "Temperature (K):" +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." msgstr "" -#: ../glade/table/family.glade.h:1 +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:16 msgid "" -"All\n" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" + +#: ../glade/paint/preferences.glade.h:17 +#, fuzzy +msgid "Dist_ance:" +msgstr "Дистанция:" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "" + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:23 +msgid "" +"Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:25 +#, fuzzy +msgid "GChemPaint Preferences" +msgstr "Версия GChemPaint: " + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:28 +#, fuzzy +msgid "Ha_ve a tearable table of the elements" +msgstr "Периодическая таблица элементов" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:30 +#, fuzzy +msgid "N_ame:" +msgstr "Название:" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "" + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:41 +msgid "_Default theme:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:42 +#, fuzzy +msgid "_Distance:" +msgstr "Дистанция:" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:45 +#, fuzzy +msgid "_Scale:" +msgstr "Со_хранить" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "" + +#: ../glade/paint/zoom.glade.h:1 +msgid "Zoom" +msgstr "Масштаб" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "Масштаб (%):" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr "" + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr "" + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr "" + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr "" + +#: ../glade/table/eltpage.glade.h:1 +msgid "1:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:2 +msgid "Atomic number:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:3 +#, fuzzy +msgid "Atomic weight:" +msgstr "Молекулярный вес:" + +#: ../glade/table/eltpage.glade.h:4 +msgid "Boiling point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:5 +#, fuzzy +msgid "Covalent:" +msgstr "Кобальт" + +#: ../glade/table/eltpage.glade.h:6 +msgid "Electronic affinities:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:7 +msgid "Electronic properties" +msgstr "" + +#: ../glade/table/eltpage.glade.h:8 +msgid "Ionic radii (Shannon and Prewitt):" +msgstr "" + +#: ../glade/table/eltpage.glade.h:9 +msgid "Ionization energies:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:10 +msgid "Isotopes" +msgstr "" + +#: ../glade/table/eltpage.glade.h:11 +msgid "Main" +msgstr "Главное" + +#: ../glade/table/eltpage.glade.h:12 +msgid "Melting point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:13 +msgid "Metallic:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:14 +#, fuzzy +msgid "Pauling electronegativity:" +msgstr "Электроотрицательность Паули" + +#: ../glade/table/eltpage.glade.h:15 +#, fuzzy +msgid "Radii" +msgstr "Радий" + +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 +msgid "Show curve" +msgstr "" + +#: ../glade/table/eltpage.glade.h:17 +msgid "Thermodynamics" +msgstr "" + +#: ../glade/table/eltpage.glade.h:18 +msgid "Van der Waals:" +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:1 +msgid " Solid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:2 +msgid " Liquid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:3 +msgid " Gas " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:4 +msgid "Temperature (K):" +msgstr "" + +#: ../glade/table/curve.glade.h:1 +#, fuzzy +msgid "GChemTable Graph" +msgstr "Выйти из GChemTable" + +#: ../glade/table/family.glade.h:1 +msgid "" +"All\n" "Alkali Metals\n" "Alkaline Earths Metals\n" "Halogenes\n" @@ -423,6 +1115,30 @@ msgid "Selected Family:" msgstr "" +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" + #: ../database/elements.xml.in.h:1 msgid "Actinium" msgstr "Актиний" @@ -899,437 +1615,2169 @@ msgid "tritium" msgstr "тритий" -#: ../gcu/application.cc:181 -#, c-format -msgid "(screen resolution is %u)" +#: ../goffice/plugin.xml.in.h:1 +msgid "2D Chemical Structures Viewer/Editor" msgstr "" -#: ../gcu/crystaldoc.cc:403 -msgid "Everything has been cleaved" -msgstr "" +#: ../goffice/plugin.xml.in.h:2 +#, fuzzy +msgid "Chemical structures" +msgstr "Редактирование химических структур" -#: ../gcu/dialog.cc:125 -msgid "Type a number" +#: ../goffice/plugin.xml.in.h:3 +msgid "Chemical structures component engine" msgstr "" -#: ../gcu/dialog.cc:134 +#: ../goffice/plugin.xml.in.h:4 +#, fuzzy +msgid "Component : GChemPaint" +msgstr "О программе GChemPaint" + +#: ../goffice/gogcpapp.cc:182 ../programs/paint/standaloneapp.cc:46 #, c-format -msgid "Type a number greater than or equal %g and lower than to %g" +msgid "Untitled %d" +msgstr "Безымянное %d" + +#: ../goffice/gogcpwin.cc:88 +msgid "Embedded GChemPaint Object" msgstr "" -#: ../gcu/dialog.cc:144 -#, c-format -msgid "Type a number greater than %g and lower than or equal to %g" +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" msgstr "" -#: ../gcu/dialog.cc:154 -#, c-format -msgid "Type a number between %g and %g, the limits are valid." +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" msgstr "" -#: ../gcu/dialog.cc:164 -#, c-format -msgid "Type a number greater than %g and lower than %g" +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" msgstr "" -#: ../gcu/dialog.cc:174 -#, c-format -msgid "Type a number lower than %g" +#: ../libs/canvas/gcp-canvas-pango.c:376 +#, fuzzy +msgid "X position" +msgstr "Соединение" + +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" msgstr "" -#: ../gcu/dialog.cc:184 -#, c-format -msgid "Type a number greater than %g" +#: ../libs/canvas/gcp-canvas-pango.c:384 +#, fuzzy +msgid "Y position" +msgstr "Соединение" + +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" msgstr "" -#: ../gcu/dialog.cc:194 -#, c-format -msgid "Type a number lower than or equal to %g" +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" msgstr "" -#: ../gcu/dialog.cc:204 -#, c-format -msgid "Type a number greater than or equal to %g" +#: ../libs/canvas/gcp-canvas-pango.c:399 +msgid "Height" msgstr "" -#: ../gcu/element.cc:99 -msgid "German" -msgstr "Немецкий" +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "" -#: ../gcu/element.cc:100 -msgid "French" -msgstr "Французский" +#: ../libs/canvas/gcp-canvas-pango.c:407 +#, fuzzy +msgid "Anchor" +msgstr "Автор" -#: ../gcu/element.cc:101 -msgid "Italian" -msgstr "Итальянский" +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "" -#: ../gcu/element.cc:102 -msgid "Polish" -msgstr "Польский" +#: ../libs/canvas/gcp-canvas-pango.c:416 +#, fuzzy +msgid "Color" +msgstr "Хлор" -#: ../gcu/element.cc:103 -msgid "Russian" +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" msgstr "" -#: ../gcu/element.cc:106 -msgid "Can't find and read elements.xml" -msgstr "Не удалось найти и прочитать elements.xml " - -#: ../gcu/element.cc:111 ../gcu/element.cc:118 +#: ../libs/canvas/gcp-canvas-pango.c:424 #, fuzzy -msgid "Incorrect file format: elements.xml" -msgstr "Неправильный формат файла: elements.xml" - -#: ../gcu/element.cc:151 -msgid "English" -msgstr "Английский" +msgid "Editing" +msgstr "_Правка" -#: ../gcu/element.cc:430 -msgid "Can't find and read radii.xml" -msgstr "Не удалось найти и прочитать radii.xml" +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" +msgstr "" -#: ../gcu/element.cc:435 ../gcu/element.cc:446 -#, fuzzy -msgid "Incorrect file format: radii.xml" -msgstr "Неправильный формат файла: radii.xml" +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:139 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:363 +msgid "translator_credits" +msgstr "Перевод на русский: Валек Филиппов" -#: ../gcu/element.cc:530 -msgid "Can't find and read elecprops.xml" -msgstr "Не удалось найти и прочитать elecprops.xml" +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "GChemPaint - редактор химических структур для GNOME" -#: ../gcu/element.cc:535 ../gcu/element.cc:540 +#: ../libs/gcp/about.cc:56 #, fuzzy -msgid "Incorrect file format: elecprops.xml" -msgstr "Неправильный формат файла: elecprops.xml" +msgid "Copyright © 2001-2007 by Jean Bréfort" +msgstr "(C) 2005 by Jean Bréfort" -#: ../gcu/element.cc:688 -msgid "Can't find and read isotopes.xml" -msgstr "Не удалось найти и прочитать isotopes.xml" +#: ../libs/gcp/application.cc:303 +msgid "Create a new reaction" +msgstr "Создать новую реакцию" + +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" +msgstr "Создать новое мезомерное отношение" + +#: ../libs/gcp/application.cc:504 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" +"Введите название файла,\n" +"а не каталога" + +#: ../libs/gcp/application.cc:546 +#, fuzzy, c-format +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "Извините, формат не поддерживается!" + +#: ../libs/gcp/application.cc:575 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 +#, c-format +msgid "" +"File %s\n" +"exists, overwrite?" +msgstr "" +"Файл %s\n" +"существует, переписать?" + +#: ../libs/gcp/application.cc:588 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 +#, c-format +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" + +#: ../libs/gcp/application.cc:796 ../libs/gcp/application.cc:924 +msgid "No filename" +msgstr "Нет названия файла" + +#: ../libs/gcp/application.cc:799 +#, c-format +msgid "" +"Could not open file\n" +"%s" +msgstr "" +"Не удалось открыть файл\n" +"%s" + +#: ../libs/gcp/application.cc:802 ../libs/gcp/application.cc:936 +#, c-format +msgid "%s: parse error." +msgstr "%s: ошибка синтаксического анализа." + +#: ../libs/gcp/application.cc:927 ../programs/crystal/document.cc:274 +#, c-format +msgid "" +"Could not load file\n" +"%s" +msgstr "" +"Не удалось загрузить файл\n" +"%s" + +#: ../libs/gcp/application.cc:930 ../programs/crystal/document.cc:277 +#, c-format +msgid "" +"%s: invalid xml file.\n" +"Tree is empty?" +msgstr "" +"%s: испорченный файл xml.\n" +"Пустое дерево?" + +#: ../libs/gcp/application.cc:933 ../programs/crystal/document.cc:280 +#, c-format +msgid "%s: invalid file format." +msgstr "%s: недопустимый формат файла." + +#: ../libs/gcp/application.cc:968 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 +msgid "Save as image" +msgstr "Сохранить как изображение" + +#: ../libs/gcp/atom.cc:1861 ../libs/gcp/atom.cc:1875 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "Атом" + +#: ../libs/gcp/atom.cc:1864 +msgid "Display symbol" +msgstr "" + +#: ../libs/gcp/atom.cc:1864 +msgid "Whether to display carbon atom symbol or not" +msgstr "" + +#: ../libs/gcp/bond.cc:980 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "Связь" + +#: ../libs/gcp/bond.cc:984 +msgid "Move to back" +msgstr "" + +#: ../libs/gcp/bond.cc:991 +msgid "Bring to front" +msgstr "" + +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +msgid "%A, %B %d, %Y" +msgstr "%A, %d %B, %Y" + +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:148 +msgid "Family" +msgstr "" + +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "" + +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "" + +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "" + +#: ../libs/gcp/fontsel.cc:296 +msgid "Weight" +msgstr "" + +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "" -#: ../gcu/element.cc:693 ../gcu/element.cc:700 +#: ../libs/gcp/fontsel.cc:301 #, fuzzy -msgid "Incorrect file format: isotopes.xml" -msgstr "Неправильный формат файла: isotopes.xml" +msgid "Variant" +msgstr "Печать" -#: ../gcu/filechooser.cc:40 -msgid "Save as" +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" msgstr "" -#: ../gcu/filechooser.cc:40 +#: ../libs/gcp/fontsel.cc:306 #, fuzzy -msgid "Open" -msgstr "Кислород" +msgid "Stretch" +msgstr "Французский" -#: ../gcu/filechooser.cc:59 -msgid "File _type:" +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" msgstr "" -#: ../gcu/filechooser.cc:61 -msgid "Automatic" +#: ../libs/gcp/fontsel.cc:311 +#, fuzzy +msgid "Size" +msgstr "Серебро" + +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" msgstr "" -#: ../gcu/formula.cc:391 ../gcu/formula.cc:429 -msgid "Unmatched parenthesis" +#: ../libs/gcp/fragment.cc:685 ../libs/gcp/fragment.cc:1209 +msgid "Invalid charge." +msgstr "Недопустимый заряд." + +#: ../libs/gcp/fragment.cc:1182 +msgid "Invalid symbol." +msgstr "Недопустимый символ." + +#: ../libs/gcp/mesomer.cc:76 +#, fuzzy +msgid "Only one arrow can link two given mesomers." +msgstr "Только одна стрелка может связывать два заданных шага." + +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "Случилось что-то страшное, пожалуйста, отправьте сообщение об ошибке." + +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "Не осталось места между молекулой и стрелкой!" + +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "Изолированные стрелки недопустимы!" + +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." msgstr "" +"Изолированная молекула!\n" +"Добавьте пропущенные стрелки." -#: ../gcu/formula.cc:417 -msgid "Could not interpret the symbol list" +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "Добавьте пропущенные стрелки." + +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" +msgstr "Разрушить мезомерное отношение" + +#: ../libs/gcp/molecule.cc:515 +msgid "Molecule" +msgstr "Молекула" + +#: ../libs/gcp/molecule.cc:520 +msgid "Export molecule to Ghemical" +msgstr "Экспортировать молекулу в Ghemical" + +#: ../libs/gcp/molecule.cc:527 +msgid "Generate InChI" msgstr "" -#: ../gcu/formula.cc:423 -msgid "Parser failed, please fill a bug report." +#: ../libs/gcp/molecule.cc:532 +msgid "NIST WebBook page for this molecule" +msgstr "Открыть страницу NIST WebBook для этой молекулы" + +#: ../libs/gcp/molecule.cc:537 +#, fuzzy +msgid "PubChem page for this molecule" +msgstr "Открыть страницу NIST WebBook для этой молекулы" + +#: ../libs/gcp/molecule.cc:543 +msgid "Generate SMILES" msgstr "" -#: ../gcu/formula.cc:431 -msgid "Invalid character" +#: ../libs/gcp/molecule.cc:549 +#, fuzzy +msgid "Open in Calculator" +msgstr "Химический калькулятор" + +#: ../libs/gcp/molecule.cc:555 +msgid "Select alignment item" msgstr "" -#: ../gcu/glview.cc:486 -#, c-format -msgid "Unable to save image file: %s\n" +#: ../libs/gcp/preferences.cc:349 ../libs/gcp/preferences.cc:368 +#: ../libs/gcp/preferences.cc:497 ../libs/gcp/theme.cc:336 +#: ../libs/gcp/theme.cc:343 ../programs/table/gchemtable-app.cc:143 +msgid "Default" msgstr "" -#: ../gcu/gtkchem3dviewer.cc:154 -msgid "Background Color" +#: ../libs/gcp/preferences.cc:389 ../libs/gcp/preferences.cc:458 +#: ../libs/gcp/preferences.cc:525 +#, fuzzy +msgid "General" +msgstr "Немецкий" + +#: ../libs/gcp/preferences.cc:399 ../libs/gcp/preferences.cc:473 +#: ../libs/gcp/preferences.cc:527 +msgid "Font" +msgstr "Шрифт" + +#: ../libs/gcp/preferences.cc:403 ../libs/gcp/preferences.cc:477 +#: ../libs/gcp/preferences.cc:529 +msgid "Other" msgstr "" -#: ../gcu/gtkchem3dviewer.cc:155 -msgid "Color used to paint the background" +#: ../libs/gcp/preferences.cc:411 ../libs/gcp/preferences.cc:485 +#: ../libs/gcp/preferences.cc:533 +msgid "Arrows" +msgstr "Стрелки" + +#: ../libs/gcp/preferences.cc:415 ../libs/gcp/preferences.cc:489 +#: ../libs/gcp/preferences.cc:535 ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "Текст" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" msgstr "" -#: ../gcu/gtkperiodic.c:334 -#, c-format +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 msgid "" -"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" -"p\n" +"Error could not build a reaction\n" +"from the selected objects." msgstr "" +"Ошибка: невозможно создать реакцию\n" +"из выбранных объектов." -#: ../programs/3d/application.cc:35 ../programs/3d/application.cc:46 -msgid "GChem3D Viewer" +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "Разрушить реакцию" + +#: ../libs/gcp/reaction-arrow.cc:380 +#, fuzzy +msgid "Arrow" +msgstr "Стрелки" + +#: ../libs/gcp/reaction-arrow.cc:386 +msgid "Attach selection to arrow..." msgstr "" -#: ../programs/3d/application.cc:92 -msgid "Sorry, format not supported!" +#: ../libs/gcp/reaction-prop.cc:39 +msgid "Unkown" msgstr "" -#: ../programs/3d/application.cc:102 ../programs/crystal/application.cc:214 -#, c-format -msgid "" -"File %s\n" -"exists, overwrite?" +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" msgstr "" -#: ../programs/3d/application.cc:147 ../programs/crystal/application.cc:145 -msgid "Save as image" +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" msgstr "" -#: ../programs/3d/main.cc:40 -msgid "GChem3d Viewer version: " +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" msgstr "" -#: ../programs/3d/main.cc:51 -msgid "Prints GChem3d Viewer version" +#: ../libs/gcp/reaction-prop.cc:43 +#, fuzzy +msgid "Solvent" +msgstr "Кобальт" + +#: ../libs/gcp/reaction-prop.cc:44 +#, fuzzy +msgid "Temperature" +msgstr "Шаблоны" + +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" msgstr "" -#: ../programs/3d/main.cc:52 -msgid "Background color: white, black or #rrggbb (default is black)" +#: ../libs/gcp/reaction-prop.cc:46 +#, fuzzy +msgid "Time" +msgstr "Заголовок:" + +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" +msgstr "" + +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 +msgid "Save as" +msgstr "Сохранить как..." + +#: ../libs/gcp/stringdlg.cc:145 +#, fuzzy, c-format +msgid "" +"Could not open file %s, error was:\n" +"%s" msgstr "" +"Не удалось открыть файл\n" +"%s" -#: ../programs/3d/main.cc:53 +#: ../libs/gcp/stringdlg.cc:161 +#, c-format msgid "" -"How molecules are displayed; possible values are BallnStick (the default) " -"and SpaceFill" +"Could not write to file %s, error was:\n" +"%s." msgstr "" -#: ../programs/3d/main.cc:75 -msgid " [file]" +#: ../libs/gcp/stringdlg.cc:175 +#, fuzzy, c-format +msgid "" +"Could not close file %s, error was:\n" +"%s" +msgstr "" +"Не удалось открыть файл\n" +"%s" + +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +#, fuzzy +msgid "This should not have occured, please file a bug record." +msgstr "Случилось что-то страшное, пожалуйста, отправьте сообщение об ошибке." + +#: ../libs/gcp/theme.cc:449 +msgid "NewTheme1" msgstr "" -#: ../programs/3d/main.cc:97 ../programs/crystal/main.cc:145 +#: ../libs/gcp/theme.cc:453 #, c-format -msgid "Invalid or misplaced argument: %s\n" +msgid "NewTheme%d" msgstr "" -#: ../programs/3d/window.cc:119 -msgid "GChem3D is a molecular structures viewer for Gnome" +#: ../libs/gcp/theme.cc:550 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" msgstr "" -#. const gchar * documentors[] = {NULL}; -#: ../programs/3d/window.cc:121 -#, fuzzy -msgid "Copyright © 2004-2007 Jean Bréfort\n" -msgstr "(C) 2005 by Jean Bréfort" +#: ../libs/gcp/view.cc:1015 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, fuzzy, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" +"Не удалось открыть файл\n" +"%s" -#. Note to translators: replace the following string with the appropriate credits for you lang -#: ../programs/3d/window.cc:139 ../programs/calc/gchemcalc.cc:146 -#: ../programs/crystal/window.cc:120 ../programs/table/gchemtable-app.cc:122 -msgid "translator_credits" -msgstr "Перевод на русский: Валек Филиппов" +#: ../libs/gcp/view.cc:1051 ../libs/gcu/glview.cc:394 +#, c-format +msgid "Unable to save image file: %s\n" +msgstr "" -#: ../programs/3d/window.cc:161 ../programs/calc/gchemcalc.cc:406 -#: ../programs/crystal/window.cc:247 ../programs/table/gchemtable-app.cc:141 +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:274 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:134 +#: ../programs/table/gchemtable-curve.cc:212 msgid "_File" msgstr "_Файл" -#: ../programs/3d/window.cc:162 ../programs/crystal/window.cc:250 -msgid "_Open..." +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:275 +msgid "_New File" +msgstr "_Создать файл" + +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:276 +msgid "Create a new file" +msgstr "Создать новый файл" + +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." msgstr "" -#: ../programs/3d/window.cc:163 ../programs/crystal/window.cc:251 +#: ../libs/gcp/window.cc:284 +#, fuzzy +msgid "Create a new file using a theme" +msgstr "Создать новый файл" + +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:277 ../programs/spectra/window.cc:167 +msgid "_Open..." +msgstr "_Открыть..." + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:278 ../programs/spectra/window.cc:168 msgid "Open a file" -msgstr "" +msgstr "Открыть файл" -#: ../programs/3d/window.cc:164 ../programs/crystal/window.cc:256 +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:279 +msgid "_Save" +msgstr "Со_хранить" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:280 +msgid "Save the current file" +msgstr "Сохранить текущий файл" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:281 +msgid "Save _As..." +msgstr "Сохранить _как..." + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:282 +msgid "Save the current file with a different name" +msgstr "Сохранить текущий файл используя другое название" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:283 +#: ../programs/spectra/window.cc:169 msgid "Save As _Image..." -msgstr "" +msgstr "Сохранить как изображение..." -#: ../programs/3d/window.cc:165 ../programs/crystal/window.cc:257 +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:284 +#: ../programs/spectra/window.cc:170 msgid "Save the current file as an image" -msgstr "" +msgstr "Сохранить текущий файл как изображение" -#: ../programs/3d/window.cc:166 ../programs/crystal/window.cc:258 -msgid "_Print..." +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:285 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:213 +msgid "Page Set_up..." msgstr "" -#: ../programs/3d/window.cc:167 -msgid "Print the current scene" +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:286 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:214 +msgid "Setup the page settings for your current printer" msgstr "" -#: ../programs/3d/window.cc:168 ../programs/crystal/window.cc:260 +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:287 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:215 +#, fuzzy +msgid "Print Pre_view" +msgstr "Просмотр" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:288 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:216 +#, fuzzy +msgid "Print preview" +msgstr "Просмотр" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:217 +msgid "_Print..." +msgstr "Пе_чать..." + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:290 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "Print the current file" +msgstr "Напечатать текущий файл" + +#: ../libs/gcp/window.cc:299 ../programs/table/gchemtable-curve.cc:219 +msgid "Prope_rties..." +msgstr "Свойства..." + +#: ../libs/gcp/window.cc:300 +msgid "Modify the file's properties" +msgstr "Изменить свойства файла" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:291 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:221 msgid "_Close" -msgstr "" +msgstr "_Закрыть" -#: ../programs/3d/window.cc:169 ../programs/crystal/window.cc:261 +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:292 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:222 msgid "Close the current file" -msgstr "" +msgstr "Закрыть текущий файл" -#: ../programs/3d/window.cc:170 ../programs/calc/gchemcalc.cc:407 -#: ../programs/crystal/window.cc:262 ../programs/table/gchemtable-app.cc:142 +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:137 +#: ../programs/table/gchemtable-curve.cc:223 msgid "_Quit" msgstr "В_ыход" -#: ../programs/3d/window.cc:171 +#: ../libs/gcp/window.cc:304 +msgid "Quit GChemPaint" +msgstr "Выйти из GChemPaint" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:295 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:225 +msgid "_Edit" +msgstr "_Правка" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "Откат" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "Отменить последнее действие" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "Возврат" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "Повторить отменённое действие" + +#: ../libs/gcp/window.cc:310 +msgid "Cu_t" +msgstr "_Вырезать" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "Вырезать выделение" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:226 +msgid "_Copy" +msgstr "_Копировать" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:227 +msgid "Copy the selection" +msgstr "Скопировать выделение" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "Вст_авить" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "Вставить в буфер обмена" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "О_чистить" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "Очистить выделение" + +#: ../libs/gcp/window.cc:318 +msgid "Select _All" +msgstr "Выбрать всё" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "Выбрать всё" + +#: ../libs/gcp/window.cc:320 #, fuzzy -msgid "Quit GChem3D" -msgstr "Выйти из GChemCalc" +msgid "Pr_eferences..." +msgstr "Свойства..." -#: ../programs/3d/window.cc:172 ../programs/crystal/window.cc:278 -#: ../programs/table/gchemtable-app.cc:144 +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:297 +msgid "Configure the application" +msgstr "" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:309 ../programs/table/gchemtable-app.cc:139 #, fuzzy msgid "_View" msgstr "_Файл" -#: ../programs/3d/window.cc:173 ../programs/calc/gchemcalc.cc:409 -#: ../programs/crystal/window.cc:286 ../programs/table/gchemtable-app.cc:159 +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "Масштаб..." + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "_400%" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "Масштаб 400%" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "_300%" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "Масштаб 300%" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "_200%" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "Масштаб 200%" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "150%" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "Масштаб 150%" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "_100%" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "Масштаб 100%" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "_75%" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "Масштаб 75%" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "_50%" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "Масштаб 50%" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "25%" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "Масштаб 25%" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "Масштаб по выбору..." + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "Открыть диалог выбора масштаба" + +#: ../libs/gcp/window.cc:342 +#, fuzzy +msgid "_Tools" +msgstr "_Панели" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:312 +msgid "_Windows" +msgstr "Окна" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:317 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:163 +#: ../programs/table/gchemtable-curve.cc:228 +#: ../programs/table/gchemtable-curve.cc:231 msgid "_Help" msgstr "_Справка" -#: ../programs/3d/window.cc:174 ../programs/calc/gchemcalc.cc:410 -#: ../programs/crystal/window.cc:287 ../programs/table/gchemtable-app.cc:160 -msgid "_Contents" -msgstr "" +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:318 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:164 +#: ../programs/table/gchemtable-curve.cc:229 +msgid "_Contents" +msgstr "Содержимое" + +#: ../libs/gcp/window.cc:346 +msgid "View help for GChemPaint" +msgstr "Просмотр справки для GChemPaint" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "GChemPaint в Интернет" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "Просмотреть сайт GChemPaint" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:322 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:168 +#: ../programs/table/gchemtable-curve.cc:235 +msgid "Live assistance" +msgstr "" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:323 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:324 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Ask a question" +msgstr "Задать вопрос" + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "Задать вопрос о GChemPaint" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "Report _Bugs" +msgstr "Сообщить об ошибке" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "Отправить сообщение об ошибке в GChemPaint" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:328 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "_About" +msgstr "О программе" + +#: ../libs/gcp/window.cc:356 +msgid "About GChemPaint" +msgstr "О программе GChemPaint" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:449 +msgid "Ready" +msgstr "Готово" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "GChemPaint" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:639 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "" + +#: ../libs/gcu/dialog.cc:131 +msgid "Type a number" +msgstr "" + +#: ../libs/gcu/dialog.cc:140 +#, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:150 +#, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:160 +#, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "" + +#: ../libs/gcu/dialog.cc:170 +#, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:180 +#, c-format +msgid "Type a number lower than %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:190 +#, c-format +msgid "Type a number greater than %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:200 +#, c-format +msgid "Type a number lower than or equal to %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:210 +#, c-format +msgid "Type a number greater than or equal to %g" +msgstr "" + +#: ../libs/gcu/element.cc:97 +msgid "German" +msgstr "Немецкий" + +#: ../libs/gcu/element.cc:98 +msgid "French" +msgstr "Французский" + +#: ../libs/gcu/element.cc:99 +msgid "Italian" +msgstr "Итальянский" + +#: ../libs/gcu/element.cc:100 +msgid "Polish" +msgstr "Польский" + +#: ../libs/gcu/element.cc:101 +msgid "Russian" +msgstr "" + +#: ../libs/gcu/element.cc:103 +msgid "Can't find and read elements.xml" +msgstr "Не удалось найти и прочитать elements.xml " + +#: ../libs/gcu/element.cc:109 ../libs/gcu/element.cc:118 +#, fuzzy +msgid "Incorrect file format: elements.xml" +msgstr "Неправильный формат файла: elements.xml" + +#: ../libs/gcu/element.cc:154 +msgid "English" +msgstr "Английский" + +#: ../libs/gcu/element.cc:406 +msgid "Can't find and read radii.xml" +msgstr "Не удалось найти и прочитать radii.xml" + +#: ../libs/gcu/element.cc:412 ../libs/gcu/element.cc:425 +#, fuzzy +msgid "Incorrect file format: radii.xml" +msgstr "Неправильный формат файла: radii.xml" + +#: ../libs/gcu/element.cc:513 +msgid "Can't find and read elecprops.xml" +msgstr "Не удалось найти и прочитать elecprops.xml" + +#: ../libs/gcu/element.cc:519 ../libs/gcu/element.cc:526 +#, fuzzy +msgid "Incorrect file format: elecprops.xml" +msgstr "Неправильный формат файла: elecprops.xml" + +#: ../libs/gcu/element.cc:675 +msgid "Can't find and read isotopes.xml" +msgstr "Не удалось найти и прочитать isotopes.xml" + +#: ../libs/gcu/element.cc:681 ../libs/gcu/element.cc:690 +#, fuzzy +msgid "Incorrect file format: isotopes.xml" +msgstr "Неправильный формат файла: isotopes.xml" + +#: ../libs/gcu/filechooser.cc:43 +msgid "Open" +msgstr "Открыть" + +#: ../libs/gcu/filechooser.cc:62 +msgid "File _type:" +msgstr "" + +#: ../libs/gcu/filechooser.cc:64 +msgid "Automatic" +msgstr "" + +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "" + +#: ../libs/gcu/formula.cc:546 +msgid "Parser failed, please fill a bug report." +msgstr "" + +#: ../libs/gcu/formula.cc:554 +msgid "Invalid character" +msgstr "" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +#, fuzzy +msgid "Background Color" +msgstr "Цвет фона" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "" + +#: ../libs/gcu/gtkperiodic.c:331 +#, c-format +msgid "" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" +msgstr "" + +#: ../libs/gcu/loader.cc:106 +msgid "Chemical file loader type." +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "" + +#: ../libs/gcu/printable.cc:35 +#, fuzzy +msgid "points" +msgstr "Шрифт" + +#: ../libs/gcu/printable.cc:36 +#, fuzzy +msgid "inches" +msgstr "Цинк" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1321 +msgid "Transmittance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1320 +#, fuzzy +msgid "Absorbance" +msgstr "Аспарагин" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1256 +msgid "Chemical shift (ppm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1257 +msgid "Frequency (Hz)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 ../libs/gcu/spectrumdoc.cc:1263 +msgid "Show integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 +msgid "Hide integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:706 ../libs/gcu/spectrumdoc.cc:1593 +msgid "Found too many data!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1253 ../libs/gcu/spectrumdoc.cc:1300 +msgid "X unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1304 +msgid "Wave length (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1306 +msgid "Wave length (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1307 +msgid "Wave number (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1312 +msgid "Invert X Axis" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1317 +msgid "Y unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1488 ../libs/gcu/spectrumdoc.cc:1518 +#, fuzzy +msgid "Constant too long" +msgstr "Вращение" + +#: ../libs/gcu/spectrumdoc.cc:1511 +msgid "Invalid character in data block" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1615 +msgid "Data check failed!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1632 +msgid "Data check failed: FIRSTX!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1637 +msgid "Data check failed: FIRSTY!" +msgstr "" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1641 +msgid "Found too many data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1947 +msgid "Integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2068 +msgid "Real transformed data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2085 +msgid "Imaginary transformed data" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:80 +#, fuzzy +msgid "Minimum X value:" +msgstr "Экаиридий" + +#: ../libs/gcu/spectrumview.cc:85 +#, fuzzy +msgid "Maximum X value:" +msgstr "Магний" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "" + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:502 ../plugins/loaders/cdx/cdx.cc:506 +#: ../plugins/loaders/cdx/cdx.cc:631 ../plugins/loaders/cdx/cdx.cc:636 +msgid "Unsupported feature, please report!" +msgstr "" + +#: ../plugins/loaders/cdx/cdx.cc:593 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:169 +#: ../plugins/paint/bonds/bondtool.cc:279 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "Ориентация: %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +msgid "H_alf heads" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +msgid "Set _default" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +#, fuzzy +msgid "Use full arrows heads for reversible reactions" +msgstr "Добавить пару стрелок для обратимой реакции" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "Создать новый ретросинтетический путь" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "Простая стрелка" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "Добавить стрелку для необратимой реакции" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "Двойная стрелка" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "Добавить пару стрелок для обратимой реакции" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "Добавить стрелку для ретросинтетического шага" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "Мезомерная стрелка" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "Добавить двунаправленную стрелку для мезомеров" + +#: ../plugins/paint/arrows/plugin.cc:92 +#, fuzzy +msgid "Electron pair move arrow" +msgstr "Пара электронов" + +#: ../plugins/paint/arrows/plugin.cc:93 +#, fuzzy +msgid "Add a curved arrow to represent an electron pair move" +msgstr "Добавить двунаправленную стрелку для мезомеров" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:96 +#, fuzzy +msgid "Add a curved arrow to represent an single electron move" +msgstr "Добавить двунаправленную стрелку для мезомеров" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "Нет целевой молекулы!" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "Множественные целевые молекулы или пропущенные стрелки." + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "Только одна стрелка может связывать два заданных шага." + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "Добавить или изменить атом" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "Положительный заряд" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "Увеличить заряд атома" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "Отрицательный заряд" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "Уменьшить заряд атома" + +#: ../plugins/paint/atoms/plugin.cc:64 +#, fuzzy +msgid "Electron Pair" +msgstr "Пара электронов" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "Добавить пару электронов к атому" + +#: ../plugins/paint/atoms/plugin.cc:67 +msgid "Unpaired Electron" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "Добавить не парный электрон к атому" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "" + +#: ../plugins/paint/bonds/bondtool.cc:354 +msgid "Invalid document tree, please file a bug report" +msgstr "" +"Недопустимое дерево документа, пожалуйста, отправьте сообщение об ошибке." + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "" +"If set, the number of new bonds will be evaluated from the mouse position" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "" + +#: ../plugins/paint/bonds/chaintool.cc:125 +#: ../plugins/paint/bonds/chaintool.cc:247 +#, fuzzy, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "Ориентация: %g" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "Добавить связь или изменить насыщенность связи" + +#: ../plugins/paint/bonds/plugin.cc:59 +#, fuzzy +msgid "Chain" +msgstr "GChemPaint" + +#: ../plugins/paint/bonds/plugin.cc:60 +#, fuzzy +msgid "Add a chain" +msgstr "Добавить цикл" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:71 +msgid "Fore bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:72 +msgid "Add a fore bond" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:74 +#, fuzzy +msgid "Delocalized bond tool" +msgstr "Выделение" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +#, fuzzy +msgid "Cycle _Size" +msgstr "Размер цикла:" + +#: ../plugins/paint/cycles/plugin.cc:54 +msgid "Three atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "Добавить трехчленный цикл" + +#: ../plugins/paint/cycles/plugin.cc:57 +msgid "Four atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "Добавить четырёхчленный цикл" + +#: ../plugins/paint/cycles/plugin.cc:60 +msgid "Five atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "Добавить пятичленный цикл" + +#: ../plugins/paint/cycles/plugin.cc:63 +#, fuzzy +msgid "Six atoms cycle" +msgstr "Добавить цикл" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "Добавить шестичленный цикл" + +#: ../plugins/paint/cycles/plugin.cc:66 +msgid "Seven atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "Добавить семичленный цикл" + +#: ../plugins/paint/cycles/plugin.cc:69 +msgid "Eight atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "Добавить восьмичленный цикл" + +#: ../plugins/paint/cycles/plugin.cc:72 +#, fuzzy +msgid "Variable sized cycle" +msgstr "Инструмент цикла переменного размера" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "Добавить цикл" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "" + +#: ../plugins/paint/residues/plugin.cc:105 +#, fuzzy +msgid "Create new abbreviations" +msgstr "Создать новую реакцию" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +#, fuzzy +msgid "Please, provide only one molecule." +msgstr "Укажите объект." + +#: ../plugins/paint/residues/residues-dlg.cc:232 +#, fuzzy +msgid "Please, provide a name for the residue" +msgstr "Укажите объект." + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "New" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +#, fuzzy +msgid "\"New\" is not a valid symbol" +msgstr "Недопустимый символ." + +#: ../plugins/paint/residues/residues-dlg.cc:265 +#, fuzzy +msgid "Please provide at least one symbol" +msgstr "Укажите объект." + +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:287 +#, fuzzy +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "Случилось что-то страшное, пожалуйста, отправьте сообщение об ошибке." + +#: ../plugins/paint/residues/residues.glade.h:1 +#, fuzzy +msgid "Formula" +msgstr "Формула:" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:4 +#, fuzzy +msgid "Residues" +msgstr "Нуклеозиды" + +#: ../plugins/paint/residues/residues.glade.h:5 +msgid "_Generic" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-delete" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:11 +msgid "gtk-save" +msgstr "" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "Свойства группы..." + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "Выравнивание" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "Дистанция:" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "Группирование и/или выравнивание выбранных объектов" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" +"Нормальное\n" +"По верху\n" +"По середине высоты\n" +"По низу\n" +"По левому краю\n" +"По центру\n" +"По правому краю" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "Группа" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "Выбрать" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "Выбор одного или нескольких объектов" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "Очистить" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "Ластик" + +#: ../plugins/paint/selection/selectiontool.cc:368 +msgid "Creation failed!" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:392 +msgid "Group and/or align objects" +msgstr "Группирование и/или выравнивание объектов" + +#: ../plugins/paint/selection/selectiontool.cc:430 +msgid "Horizontal flip" +msgstr "Горизонтальное отражение" + +#: ../plugins/paint/selection/selectiontool.cc:431 +msgid "Flip the selection horizontally" +msgstr "Отразить выделение горизонтально" + +#: ../plugins/paint/selection/selectiontool.cc:432 +msgid "Vertical flip" +msgstr "Вертикальное отражение" + +#: ../plugins/paint/selection/selectiontool.cc:433 +msgid "Flip the selection vertically" +msgstr "Отразить выделение вертикально" + +#: ../plugins/paint/selection/selectiontool.cc:434 +msgid "Merge" +msgstr "Объединить" + +#: ../plugins/paint/selection/selectiontool.cc:435 +msgid "Merge two molecules" +msgstr "Объединить две молекулы" + +#: ../plugins/paint/selection/selectiontool.cc:439 +#, fuzzy +msgid "_Rotate" +msgstr "Повернуть" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Rotate the selection" +msgstr "Поворот выделения" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "Новый шаблон" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "Категория:" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "Название" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "Шаблоны" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "Использование и управление шаблонами" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "" + +#: ../plugins/paint/templates/templates.glade.h:1 +#, fuzzy +msgid "No selected template" +msgstr "Новый шаблон" + +#: ../plugins/paint/templates/templates.glade.h:2 +#, fuzzy +msgid "_Templates" +msgstr "Шаблоны" + +#: ../plugins/paint/templates/templates.glade.h:3 +#, fuzzy +msgid "category" +msgstr "Категория:" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "Укажите объект." + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "Задайте название." + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "Выберите категорию." + +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:6 +#, fuzzy +msgid "Stri_kethrough" +msgstr "Зачёркнутый" + +#: ../plugins/paint/text/fontsel.glade.h:7 +#, fuzzy +msgid "_Color:" +msgstr "_Закрыть" + +#: ../plugins/paint/text/fontsel.glade.h:8 +#, fuzzy +msgid "_Family:" +msgstr "_Файл" + +#: ../plugins/paint/text/fontsel.glade.h:9 +#, fuzzy +msgid "_Position:" +msgstr "Соединение" + +#: ../plugins/paint/text/fontsel.glade.h:10 +#, fuzzy +msgid "_Style:" +msgstr "Заголовок:" + +#: ../plugins/paint/text/fontsel.glade.h:11 +#, fuzzy +msgid "_Underline:" +msgstr "Подчёркивание" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "Добавить или изменить текст" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "Добавить или изменить группу атомов" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "" + +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +msgid "GChem3D Viewer" +msgstr "" + +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "Извините, формат не поддерживается!" + +#: ../programs/3d/main.cc:44 +msgid "GChem3d Viewer version: " +msgstr "" + +#: ../programs/3d/main.cc:55 +msgid "Prints GChem3d Viewer version" +msgstr "" + +#: ../programs/3d/main.cc:56 +msgid "Background color: white, black or #rrggbb (default is black)" +msgstr "" + +#: ../programs/3d/main.cc:57 +msgid "" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" +msgstr "" + +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 +#, fuzzy +msgid " [file]" +msgstr "[файл...]" + +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 +#, c-format +msgid "Invalid or misplaced argument: %s\n" +msgstr "" + +#: ../programs/3d/window.cc:129 +msgid "GChem3D is a molecular structures viewer for Gnome" +msgstr "" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/3d/window.cc:131 +#, fuzzy +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "(C) 2005 by Jean Bréfort" + +#: ../programs/3d/window.cc:181 +#, fuzzy +msgid "Print the current scene" +msgstr "Напечатать текущий файл" + +#: ../programs/3d/window.cc:185 +#, fuzzy +msgid "Quit GChem3D" +msgstr "Выйти из GChemCalc" -#: ../programs/3d/window.cc:175 +#: ../programs/3d/window.cc:189 msgid "View help for the Molecules Viewer" msgstr "" -#: ../programs/3d/window.cc:176 ../programs/calc/gchemcalc.cc:412 -#: ../programs/crystal/window.cc:289 ../programs/table/gchemtable-app.cc:162 +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:320 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:166 +#: ../programs/table/gchemtable-curve.cc:233 msgid "Gnome Chemistry Utils on the _web" msgstr "" -#: ../programs/3d/window.cc:177 ../programs/calc/gchemcalc.cc:413 -#: ../programs/crystal/window.cc:290 ../programs/table/gchemtable-app.cc:163 +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:321 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/table/gchemtable-curve.cc:234 msgid "Browse the Gnome Chemistry Utils's web site" msgstr "" -#: ../programs/3d/window.cc:178 ../programs/calc/gchemcalc.cc:414 -#: ../programs/crystal/window.cc:291 ../programs/table/gchemtable-app.cc:164 -msgid "_Ask a question" -msgstr "" - -#: ../programs/3d/window.cc:179 ../programs/calc/gchemcalc.cc:415 -#: ../programs/crystal/window.cc:292 ../programs/table/gchemtable-app.cc:165 +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:325 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 msgid "Ask a question about the Gnome Chemistry Utils" msgstr "" -#: ../programs/3d/window.cc:180 ../programs/calc/gchemcalc.cc:416 -#: ../programs/crystal/window.cc:293 ../programs/table/gchemtable-app.cc:166 -msgid "Report _Bugs" -msgstr "" - -#: ../programs/3d/window.cc:181 ../programs/calc/gchemcalc.cc:417 -#: ../programs/crystal/window.cc:294 ../programs/table/gchemtable-app.cc:167 +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:327 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:240 msgid "Submit a bug report for the Gnome Chemistry Utils" msgstr "" -#: ../programs/3d/window.cc:182 ../programs/calc/gchemcalc.cc:418 -#: ../programs/crystal/window.cc:295 ../programs/table/gchemtable-app.cc:168 -msgid "_About" -msgstr "О программе" - -#: ../programs/3d/window.cc:183 +#: ../programs/3d/window.cc:199 #, fuzzy msgid "About GChem3D" msgstr "О программе GChemCalc" -#: ../programs/3d/window.cc:187 +#: ../programs/3d/window.cc:203 msgid "Balls and sticks" msgstr "" -#: ../programs/3d/window.cc:188 +#: ../programs/3d/window.cc:204 msgid "Display a balls and sticks model" msgstr "" -#: ../programs/3d/window.cc:190 +#: ../programs/3d/window.cc:206 msgid "Space filling" msgstr "" -#: ../programs/3d/window.cc:191 +#: ../programs/3d/window.cc:207 msgid "Display a space filling model" msgstr "" -#: ../programs/3d/window.cc:268 -msgid "Background color" +#: ../programs/3d/window.cc:209 +#, fuzzy +msgid "Cylinders" +msgstr "Циклы" + +#: ../programs/3d/window.cc:210 +msgid "Display a cylinders model" msgstr "" -#: ../programs/3d/window.cc:269 -msgid "Choose a new background color" +#: ../programs/3d/window.cc:212 +msgid "Wireframe" msgstr "" -#: ../programs/3d/window.cc:299 ../programs/crystal/window.cc:425 -msgid "Open recent" +#: ../programs/3d/window.cc:213 +msgid "Display a wireframe model" +msgstr "" + +#: ../programs/3d/window.cc:271 +msgid "Background color" +msgstr "Цвет фона" + +#: ../programs/3d/window.cc:272 +msgid "Choose a new background color" msgstr "" -#: ../programs/3d/window.cc:359 ../programs/crystal/application.cc:126 -msgid "Preview" +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:429 +#: ../programs/spectra/window.cc:257 +msgid "Open recent" msgstr "" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:1 +#: ../programs/3d/gchem3d.desktop.in.in.h:1 msgid "Display chemical 3D structures" msgstr "" -#: ../programs/3d/gchem3d-viewer.desktop.in.h:2 +#: ../programs/3d/gchem3d.desktop.in.in.h:2 #, fuzzy -msgid "Molecules Viewer" +msgid "Molecules Viewer @STABILITY_POSTFIX@" msgstr "Молекулярный вес:" -#: ../programs/calc/gchemcalc.cc:126 +#: ../programs/calc/gchemcalc.cc:301 msgid "GChemCalc is a simple calculator for chemists" msgstr "GChemCalc - простой калькулятор для химиков" #. const gchar * documentors[] = {NULL}; -#: ../programs/calc/gchemcalc.cc:128 +#: ../programs/calc/gchemcalc.cc:303 #, fuzzy msgid "Copyright © 2005-2007 Jean Bréfort\n" msgstr "(C) 2005 by Jean Bréfort" -#: ../programs/calc/gchemcalc.cc:408 +#: ../programs/calc/gchemcalc.cc:619 msgid "Quit GChemCalc" msgstr "Выйти из GChemCalc" -#: ../programs/calc/gchemcalc.cc:411 +#: ../programs/calc/gchemcalc.cc:623 +msgid "_Mode" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:626 #, fuzzy msgid "View help for the Chemical Calculator" msgstr "Химический калькулятор" -#: ../programs/calc/gchemcalc.cc:419 +#: ../programs/calc/gchemcalc.cc:636 msgid "About GChemCalc" msgstr "О программе GChemCalc" -#: ../programs/calc/gchemcalc.cc:465 +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:643 +#, fuzzy +msgid "_Atom" +msgstr "Атом" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:646 +#, fuzzy +msgid "_Nickname" +msgstr "Название" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:688 #, fuzzy msgid "GChemCalc Calculator version: " msgstr "Химический калькулятор" -#: ../programs/calc/gchemcalc.cc:486 +#: ../programs/calc/gchemcalc.cc:714 #, fuzzy msgid " [formula]" msgstr "Формула:" -#: ../programs/calc/gchemcalc.cc:502 -msgid "For usage see: gchemcalc [-?|--help]" +#: ../programs/calc/gchemcalc.cc:731 +msgid "For usage see: gchemcalc-unstable [-?|--help]" msgstr "" -#: ../programs/calc/gchemcalc.cc:556 +#: ../programs/calc/gchemcalc.cc:777 msgid "Element" msgstr "Элемент" -#: ../programs/calc/gchemcalc.cc:563 +#: ../programs/calc/gchemcalc.cc:784 msgid "Mass %" msgstr "Масса %" -#: ../programs/calc/gchemcalc.desktop.in.h:1 +#: ../programs/calc/gchemcalc.desktop.in.in.h:1 msgid "A simple calculator for chemistry" msgstr "Простой химический калькулятор" -#: ../programs/crystal/gcrystal.desktop.in.h:1 +#: ../programs/calc/gchemcalc.desktop.in.in.h:2 +#, fuzzy +msgid "Chemical calculator @STABILITY_POSTFIX@" +msgstr "Химический калькулятор" + +#: ../programs/crystal/gcrystal.desktop.in.in.h:1 msgid "Edit and display crystalline structures" msgstr "" -#: ../programs/crystal/gcrystal.desktop.in.h:2 -msgid "Gnome Crystal Crystalline Structures Viewer " +#: ../programs/crystal/gcrystal.desktop.in.in.h:2 +msgid "Gnome Crystal Crystalline Structures Viewer @STABILITY_POSTFIX@" msgstr "" #: ../programs/crystal/gcrystal.schemas.in.h:1 @@ -1405,41 +3853,32 @@ "Red value for the default background color. Acceptable values are 0. to 1." msgstr "" -#: ../programs/crystal/application.cc:55 +#: ../programs/crystal/application.cc:58 #, c-format msgid "Untitled%d" msgstr "" -#: ../programs/crystal/application.cc:261 +#: ../programs/crystal/application.cc:318 #, c-format msgid "" "\"%s\" has been modified since last saving. Do you wish to come back to " "saved version?" msgstr "" -#: ../programs/crystal/atomsdlg.cc:133 -msgid "Atom" -msgstr "" - -#: ../programs/crystal/atomsdlg.cc:187 ../programs/crystal/atomsdlg.cc:282 -#: ../programs/crystal/atomsdlg.cc:415 -msgid "Unknown" -msgstr "" - #. Note for translators: c.n. is for coordination number -#: ../programs/crystal/atomsdlg.cc:555 +#: ../programs/crystal/atomsdlg.cc:624 msgid " c.n.=" msgstr "" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "low spin" msgstr "" -#: ../programs/crystal/atomsdlg.cc:561 +#: ../programs/crystal/atomsdlg.cc:630 msgid "high spin" msgstr "" -#: ../programs/crystal/atomsdlg.cc:563 +#: ../programs/crystal/atomsdlg.cc:632 msgid "Database" msgstr "" @@ -1447,406 +3886,1228 @@ msgid "The sum of the three angles must be less than 360°" msgstr "" +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "" + #: ../programs/crystal/cleavagesdlg.cc:128 msgid "Planes cleaved" msgstr "" -#: ../programs/crystal/document.cc:237 +#: ../programs/crystal/document.cc:271 #, c-format msgid "" "Could not save file\n" "%s" msgstr "" -#: ../programs/crystal/document.cc:240 -#, c-format -msgid "" -"Could not load file\n" -"%s" +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" msgstr "" -#: ../programs/crystal/document.cc:243 -#, c-format -msgid "" -"%s: invalid xml file.\n" -"Tree is empty?" +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" msgstr "" -#: ../programs/crystal/document.cc:246 -#, c-format -msgid "%s: invalid file format." +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" msgstr "" -#: ../programs/crystal/document.cc:594 -#, c-format -msgid "\"%s\" has been modified. Do you wish to save it?" +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" msgstr "" -#: ../programs/crystal/linesdlg.cc:178 +#: ../programs/crystal/linesdlg.cc:180 #, fuzzy msgid "Single" msgstr "Серебро" -#: ../programs/crystal/main.cc:76 +#: ../programs/crystal/main.cc:88 msgid "Gnome Chemistry Utils version: " msgstr "" -#: ../programs/crystal/main.cc:104 +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 msgid " [file...]" -msgstr "" +msgstr "[файл...]" -#: ../programs/crystal/window.cc:122 ../programs/crystal/window.cc:383 +#: ../programs/crystal/window.cc:142 ../programs/crystal/window.cc:394 msgid "Gnome Crystal" msgstr "" -#: ../programs/crystal/window.cc:125 +#: ../programs/crystal/window.cc:145 msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" msgstr "" -#: ../programs/crystal/window.cc:126 +#: ../programs/crystal/window.cc:146 #, fuzzy msgid "Copyright © 1999-2007 by Jean Bréfort" msgstr "(C) 2005 by Jean Bréfort" -#: ../programs/crystal/window.cc:248 -#, fuzzy -msgid "_New File" -msgstr "_Файл" +#: ../programs/crystal/window.cc:294 +#, fuzzy +msgid "Quit Gnome Crystal" +msgstr "Выйти из GChemCalc" + +#: ../programs/crystal/window.cc:296 +msgid "Prefere_nces..." +msgstr "" + +#: ../programs/crystal/window.cc:298 +msgid "_Crystal" +msgstr "" + +#: ../programs/crystal/window.cc:299 +msgid "_Lattice..." +msgstr "" + +#: ../programs/crystal/window.cc:300 +msgid "Define the lattice" +msgstr "" + +#: ../programs/crystal/window.cc:301 +msgid "_Atoms..." +msgstr "" + +#: ../programs/crystal/window.cc:302 +msgid "Add or edit atoms" +msgstr "" + +#: ../programs/crystal/window.cc:303 +msgid "_Bonds and lines..." +msgstr "" + +#: ../programs/crystal/window.cc:304 +msgid "Add or edit bonds and lines" +msgstr "" + +#: ../programs/crystal/window.cc:305 +msgid "_Size..." +msgstr "" + +#: ../programs/crystal/window.cc:306 +msgid "Define size" +msgstr "" + +#: ../programs/crystal/window.cc:307 +msgid "_Cleavages..." +msgstr "" + +#: ../programs/crystal/window.cc:308 +msgid "Add or edit cleavages to remove some planes" +msgstr "" + +#: ../programs/crystal/window.cc:310 +msgid "View _settings..." +msgstr "" + +#: ../programs/crystal/window.cc:311 +msgid "Choose background color and model position" +msgstr "" + +#: ../programs/crystal/window.cc:313 +#, fuzzy +msgid "Create new _window" +msgstr "Создать новый файл" + +#: ../programs/crystal/window.cc:314 +#, fuzzy +msgid "Create a new window" +msgstr "Создать новый файл" + +#: ../programs/crystal/window.cc:315 +msgid "_Close this window" +msgstr "" + +#: ../programs/crystal/window.cc:316 +#, fuzzy +msgid "Close the current window" +msgstr "Закрыть текущий файл" + +#: ../programs/crystal/window.cc:319 +msgid "View help for Gnome Crystal" +msgstr "" + +#: ../programs/crystal/window.cc:329 +#, fuzzy +msgid "About Gnome Crystal" +msgstr "О программе GChemCalc" + +#: ../programs/paint/gchempaint.desktop.in.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "Редактирование химических структур" + +#: ../programs/paint/gchempaint.desktop.in.in.h:2 +#, fuzzy +msgid "GChemPaint Chemical Structures Editor @STABILITY_POSTFIX@" +msgstr "GChemPaint - редактор химических структур для GNOME" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "" +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:10 +msgid "Default arrow length" +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "" +"Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "" +"Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:20 +msgid "Default charge sign size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format +msgid "" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:46 +msgid "Default hash line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:47 +msgid "Default hash lines distance." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:53 +#, fuzzy +msgid "Default padding around arrows." +msgstr "Добавьте пропущенные стрелки." + +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." +msgstr "" -#: ../programs/crystal/window.cc:249 -msgid "Create a new file" +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." msgstr "" -#: ../programs/crystal/window.cc:252 -msgid "_Save" +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:253 -msgid "Save the current file" +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." msgstr "" -#: ../programs/crystal/window.cc:254 -msgid "Save _As..." +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." msgstr "" -#: ../programs/crystal/window.cc:255 -msgid "Save the current file with a different name" +#: ../programs/paint/gchempaint.schemas.in.h:66 +msgid "Default text font size." msgstr "" -#: ../programs/crystal/window.cc:259 -msgid "Print the current file" +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." msgstr "" -#: ../programs/crystal/window.cc:263 -#, fuzzy -msgid "Quit Gnome Crystal" -msgstr "Выйти из GChemCalc" +#: ../programs/paint/gchempaint.schemas.in.h:68 +msgid "Default text font style." +msgstr "" -#: ../programs/crystal/window.cc:264 -#, fuzzy -msgid "_Edit" -msgstr "В_ыход" +#: ../programs/paint/gchempaint.schemas.in.h:69 +msgid "Default text font variant." +msgstr "" -#: ../programs/crystal/window.cc:265 -msgid "Prefere_nces..." +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." msgstr "" -#: ../programs/crystal/window.cc:266 -msgid "Configure the application" +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." msgstr "" -#: ../programs/crystal/window.cc:267 -msgid "_Crystal" +#: ../programs/paint/gchempaint.schemas.in.h:72 +msgid "Default theme." msgstr "" -#: ../programs/crystal/window.cc:268 -msgid "_Lattice..." +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." msgstr "" -#: ../programs/crystal/window.cc:269 -msgid "Define the lattice" +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." msgstr "" -#: ../programs/crystal/window.cc:270 -msgid "_Atoms..." +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." msgstr "" -#: ../programs/crystal/window.cc:271 -msgid "Add or edit atoms" +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:272 -msgid "_Bonds and lines..." +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:273 -msgid "Add or edit bonds and lines" +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:274 -msgid "_Size..." +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:275 -msgid "Define size" +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:276 -msgid "_Cleavages..." +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." msgstr "" -#: ../programs/crystal/window.cc:277 -msgid "Add or edit cleavages to remove some planes" +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." msgstr "" -#: ../programs/crystal/window.cc:279 -msgid "View _settings..." +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:280 -msgid "Choose background color and model position" +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." msgstr "" -#: ../programs/crystal/window.cc:281 -msgid "_Windows" +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." msgstr "" -#: ../programs/crystal/window.cc:282 -msgid "Create new _window" +#: ../programs/paint/gchempaint.schemas.in.h:88 +#, fuzzy +msgid "Whether the periodic table is tearable." +msgstr "Показать периодическую таблицу элементов" + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." msgstr "" -#: ../programs/crystal/window.cc:283 -msgid "Create a new window" +#: ../programs/paint/main.cc:46 +msgid "GChemPaint version: " +msgstr "Версия GChemPaint: " + +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" msgstr "" -#: ../programs/crystal/window.cc:284 -msgid "_Close this window" +#: ../programs/spectra/gspectrum.desktop.in.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" msgstr "" -#: ../programs/crystal/window.cc:285 -msgid "Close the current window" +#: ../programs/spectra/gspectrum.desktop.in.in.h:2 +msgid "Spectrum viewer @STABILITY_POSTFIX@" msgstr "" -#: ../programs/crystal/window.cc:288 -msgid "View help for Gnome Crystal" +#: ../programs/spectra/window.cc:124 +msgid "GSpectrum is a spectrum viewer for Gnome" msgstr "" -#: ../programs/crystal/window.cc:296 +#. const gchar * documentors[] = {NULL}; +#: ../programs/spectra/window.cc:126 #, fuzzy -msgid "About Gnome Crystal" -msgstr "О программе GChemCalc" +msgid "Copyright © 2007 Jean Bréfort\n" +msgstr "(C) 2005 by Jean Bréfort" -#: ../programs/crystal/window.cc:445 +#: ../programs/spectra/window.cc:180 #, fuzzy -msgid "Ready" -msgstr "Свинец" +msgid "Quit GSpectrum" +msgstr "Выйти из GChemCalc" -#: ../programs/table/gchemtable-app.cc:102 -msgid "GChemTable is a chemical periodic table of the elements application" -msgstr "GChemTable - периодическая таблица химических элементов" +#: ../programs/spectra/window.cc:186 +#, fuzzy +msgid "View help for the Spetra Viewer" +msgstr "Просмотр справки для GChemPaint" -#. const gchar * documentors[] = {NULL}; -#: ../programs/table/gchemtable-app.cc:104 +#: ../programs/spectra/window.cc:196 #, fuzzy -msgid "Copyright © 2005-2007 Jean Bréfort" -msgstr "(C) 2005 by Jean Bréfort" +msgid "About GSpectrum" +msgstr "О программе GChemCalc" + +#: ../programs/table/gchemtable-app.cc:135 +msgid "New _Chart" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:136 +#, fuzzy +msgid "Create a new chart" +msgstr "Создать новую реакцию" -#: ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-app.cc:138 +#: ../programs/table/gchemtable-curve.cc:224 msgid "Quit GChemTable" msgstr "Выйти из GChemTable" -#: ../programs/table/gchemtable-app.cc:145 +#: ../programs/table/gchemtable-app.cc:140 msgid "Color scheme" msgstr "" -#: ../programs/table/gchemtable-app.cc:146 +#: ../programs/table/gchemtable-app.cc:141 msgid "No colors" msgstr "" -#: ../programs/table/gchemtable-app.cc:147 +#: ../programs/table/gchemtable-app.cc:142 msgid "Use default Gtk theme colors" msgstr "" -#: ../programs/table/gchemtable-app.cc:148 -msgid "Default" -msgstr "" - -#: ../programs/table/gchemtable-app.cc:149 +#: ../programs/table/gchemtable-app.cc:144 msgid "Use default symbolic element colors" msgstr "" -#: ../programs/table/gchemtable-app.cc:150 +#: ../programs/table/gchemtable-app.cc:145 msgid "Physical states" msgstr "" -#: ../programs/table/gchemtable-app.cc:151 +#: ../programs/table/gchemtable-app.cc:146 msgid "Use colors to display physical state at a given temperature" msgstr "" -#: ../programs/table/gchemtable-app.cc:153 -msgid "Family" -msgstr "" - -#: ../programs/table/gchemtable-app.cc:154 +#: ../programs/table/gchemtable-app.cc:149 msgid "Use colors to display the family grouping of the elements" msgstr "" -#: ../programs/table/gchemtable-app.cc:156 +#: ../programs/table/gchemtable-app.cc:151 msgid "Acidity" msgstr "" -#: ../programs/table/gchemtable-app.cc:157 +#: ../programs/table/gchemtable-app.cc:152 #, fuzzy msgid "Use colors to display the acidity of the elements" msgstr "Периодическая таблица элементов" +#: ../programs/table/gchemtable-app.cc:154 +#, fuzzy +msgid "Electronegativity" +msgstr "Электроотрицательность Паули" + +#: ../programs/table/gchemtable-app.cc:155 +#, fuzzy +msgid "Use colors to display the electronegativity of the elements" +msgstr "Периодическая таблица элементов" + +#: ../programs/table/gchemtable-app.cc:157 +msgid "Atomic radius" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:158 +#, fuzzy +msgid "Use colors to display the covalent radii of the elements" +msgstr "Периодическая таблица элементов" + +#: ../programs/table/gchemtable-app.cc:160 +msgid "Block" +msgstr "" + #: ../programs/table/gchemtable-app.cc:161 +#, fuzzy +msgid "Use colors to display the blocks elements belong to" +msgstr "Периодическая таблица элементов" + +#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/table/gchemtable-curve.cc:230 msgid "View help for the Periodic Table" msgstr "" -#: ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:242 msgid "About GChemTable" msgstr "О программе GChemTable" +#: ../programs/table/gchemtable-app.cc:343 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "GChemTable - периодическая таблица химических элементов" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/table/gchemtable-app.cc:345 +#, fuzzy +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "(C) 2005 by Jean Bréfort" + #. The markup at the end of the chain is there to ensure that #. things will be correcly aligned, add the same to the translated string -#: ../programs/table/gchemtable-elt.cc:64 +#: ../programs/table/gchemtable-elt.cc:61 msgid "Electronic configuration: " msgstr "Электронная конфигурация: " -#: ../programs/table/gchemtable-elt.cc:76 +#: ../programs/table/gchemtable-elt.cc:73 msgid "Lang" msgstr "Язык" -#: ../programs/table/gchemtable-elt.cc:83 +#: ../programs/table/gchemtable-elt.cc:80 msgid "Name" msgstr "Название" -#: ../programs/table/gchemtable-elt.cc:109 -#: ../programs/table/gchemtable-elt.cc:152 -#: ../programs/table/gchemtable-elt.cc:188 -#: ../programs/table/gchemtable-elt.cc:211 -#: ../programs/table/gchemtable-elt.cc:225 -#: ../programs/table/gchemtable-elt.cc:239 -#: ../programs/table/gchemtable-elt.cc:261 +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 msgid "n.a." msgstr "н.д." -#: ../programs/table/gchemtable-elt.cc:121 -#: ../programs/table/gchemtable-elt.cc:162 +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 #, c-format msgid "%d:" msgstr "" -#: ../programs/table/gchemtable-elt.cc:273 +#: ../programs/table/gchemtable-elt.cc:271 #, fuzzy msgid "Ion" msgstr "Железо" #. C.N. stands for coordination number -#: ../programs/table/gchemtable-elt.cc:280 +#: ../programs/table/gchemtable-elt.cc:278 msgid "C.N." msgstr "" -#: ../programs/table/gchemtable-elt.cc:285 +#: ../programs/table/gchemtable-elt.cc:283 msgid "Spin" msgstr "" -#: ../programs/table/gchemtable-elt.cc:292 +#: ../programs/table/gchemtable-elt.cc:290 msgid "Value" msgstr "" -#: ../programs/table/gchemtable-elt.cc:311 +#: ../programs/table/gchemtable-elt.cc:310 msgid "Low" msgstr "" -#: ../programs/table/gchemtable-elt.cc:314 +#: ../programs/table/gchemtable-elt.cc:313 msgid "High" msgstr "" -#: ../programs/table/gchemtable-curve.cc:183 -#: ../programs/table/gchemtable-curve.cc:187 +#: ../programs/table/gchemtable-curve.cc:220 +#, fuzzy +msgid "Modify the graph properties" +msgstr "Изменить свойства файла" + +#: ../programs/table/gchemtable-curve.cc:232 +#, fuzzy +msgid "View help for the Curve Window" +msgstr "Просмотр справки для GChemPaint" + +#: ../programs/table/gchemtable-curve.cc:324 +#: ../programs/table/gchemtable-curve.cc:328 +#: ../programs/table/gchemtable-data.cc:524 msgid "Pauling electronegativity" msgstr "Электроотрицательность Паули" -#: ../programs/table/gchemtable-curve.cc:199 +#: ../programs/table/gchemtable-curve.cc:340 msgid "Electron affinity (kJ/mol)" msgstr "" -#: ../programs/table/gchemtable-curve.cc:203 +#: ../programs/table/gchemtable-curve.cc:344 msgid "Electron affinity" msgstr "" -#: ../programs/table/gchemtable-curve.cc:217 +#: ../programs/table/gchemtable-curve.cc:358 msgid "1st. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:220 +#: ../programs/table/gchemtable-curve.cc:361 msgid "2nd. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:223 +#: ../programs/table/gchemtable-curve.cc:364 msgid "3rd. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:226 +#: ../programs/table/gchemtable-curve.cc:367 #, c-format msgid "%dth. " msgstr "" -#: ../programs/table/gchemtable-curve.cc:229 +#: ../programs/table/gchemtable-curve.cc:370 msgid "ionization energy (MJ/mol)" msgstr "" -#: ../programs/table/gchemtable-curve.cc:236 +#: ../programs/table/gchemtable-curve.cc:377 msgid "ionization energy" msgstr "" -#: ../programs/table/gchemtable-curve.cc:255 -#: ../programs/table/gchemtable-curve.cc:259 +#: ../programs/table/gchemtable-curve.cc:396 +#: ../programs/table/gchemtable-curve.cc:400 msgid "Covalent radii" msgstr "" -#: ../programs/table/gchemtable-curve.cc:275 -#: ../programs/table/gchemtable-curve.cc:279 +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 msgid "Van der Waals radii" msgstr "" -#: ../programs/table/gchemtable-curve.cc:295 -#: ../programs/table/gchemtable-curve.cc:299 +#: ../programs/table/gchemtable-curve.cc:436 +#: ../programs/table/gchemtable-curve.cc:440 msgid "Metallic radii" msgstr "" -#: ../programs/table/gchemtable-curve.cc:310 -#: ../programs/table/gchemtable-curve.cc:314 +#: ../programs/table/gchemtable-curve.cc:451 +#: ../programs/table/gchemtable-curve.cc:455 msgid "Melting point" msgstr "" -#: ../programs/table/gchemtable-curve.cc:325 -#: ../programs/table/gchemtable-curve.cc:329 +#: ../programs/table/gchemtable-curve.cc:466 +#: ../programs/table/gchemtable-curve.cc:470 msgid "Boiling point" msgstr "" -#: ../programs/table/gchemtable.desktop.in.h:1 +#: ../programs/table/gchemtable-curve.cc:485 +#: ../programs/table/gchemtable-data.cc:522 +msgid "Atomic number" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +#, fuzzy +msgid "Invalide data" +msgstr "Недопустимый заряд." + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +#, fuzzy +msgid "None" +msgstr "Неон" + +#: ../programs/table/gchemtable-data.cc:523 +#, fuzzy +msgid "Atomic mass" +msgstr "Атомы" + +#: ../programs/table/gchemtable-data.cc:525 +msgid "First ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:526 +msgid "Second ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:527 +msgid "Third ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:528 +#, fuzzy +msgid "Electronic affinity" +msgstr "Пара электронов" + +#: ../programs/table/gchemtable-data.cc:529 +#, fuzzy +msgid "Covalent radius" +msgstr "Кобальт" + +#: ../programs/table/gchemtable-data.cc:530 +msgid "Van der Waals radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:531 +msgid "Metallic radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Fusion temperature" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Ebullition temperature" +msgstr "" + +#: ../programs/table/gchemtable.desktop.in.in.h:1 msgid "A Mendeleiev table of the chemical elements" msgstr "Периодическая таблица химических элементов Д.И.Менделеева" +#: ../programs/table/gchemtable.desktop.in.in.h:2 #, fuzzy -#~ msgid "Covalent" -#~ msgstr "Кобальт" +msgid "Periodic table of the elements @STABILITY_POSTFIX@" +msgstr "Периодическая таблица элементов" +#: ../templates/paint/haworth.xml.in.h:1 #, fuzzy -#~ msgid "Ionic" -#~ msgstr "Железо" +msgid "Saccharides" +msgstr "Лантаноиды" +#: ../templates/paint/haworth.xml.in.h:2 #, fuzzy -#~ msgid "Chemical calculator (unstable)" -#~ msgstr "Химический калькулятор" +msgid "α-D-deoxyribofuranose" +msgstr "Дезоксигуанозин" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "" +#: ../templates/paint/haworth.xml.in.h:7 #, fuzzy -#~ msgid "Periodic table of the elements (unstable)" -#~ msgstr "Периодическая таблица элементов" +msgid "β-D-deoxyribofuranose" +msgstr "Дезоксигуанозин" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "Аденин" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "Аденозин" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "Аланин" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "Аминокислоты" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "Антрацен" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "Аргинин" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "Ароматические углеводороды" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "Аспарагин" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "Аспартановая кислота" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "Азулен" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "Бензол" + +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "Цистеин" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "Цитидин" + +#: ../templates/paint/templates.xml.in.h:14 +msgid "Cytosine" +msgstr "Цитозин" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "Дезоксиаденозин" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "Дезоксицитидин" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "Дезоксигуанозин" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "Дезокситимидин" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "Глутаминовая кислота" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "Глутамин" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "Глицин" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "Гуанин" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "Гуанозин" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "Гистидин" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "Изолейцин" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "Лейцин" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "Лизин" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "Метионин" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "Нафталин" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "Нуклеиновые основания" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "Нуклеозиды" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "Фенантрен" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "Фенилаланин" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "Пролин" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "Пирен" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "Серин" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "Треонин" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "Тимин" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "Триптофан" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "Тирозин" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "Урацил" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "Уридин" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "Валин" #, fuzzy -#~ msgid "GChemPaint" -#~ msgstr "Немецкий" +#~ msgid "Ionic" +#~ msgstr "Железо" + +#~ msgid "(C) 2001-2005 by Jean Bréfort" +#~ msgstr "(C) 2001-2005 Jean Bréfort" + +#~ msgid "GChemPaint help contents" +#~ msgstr "Содержание справки GChemPaint" + +#~ msgid "_Save All" +#~ msgstr "Сохранить все" + +#~ msgid "_Close All" +#~ msgstr "Закрыть все" + +#~ msgid "Close all open files" +#~ msgstr "Закрыть все открытые файлы" + +#~ msgid "_Periodic table" +#~ msgstr "Периодическая таблица" + +#~ msgid "Tools Options" +#~ msgstr "Параметры инструментов" + +#~ msgid "GChemPaint Templates" +#~ msgstr "Шаблоны GChemPaint" + +#~ msgid "Arrows toolbar" +#~ msgstr "Панель стрелок" + +#~ msgid "Atoms toolbar" +#~ msgstr "Панель атомов" + +#~ msgid "Bonds toolbar" +#~ msgstr "Панель связей" + +#~ msgid "Cycles toolbar" +#~ msgstr "Панель циклов" + +#~ msgid "Eraser tool" +#~ msgstr "Ластик" + +#~ msgid "Horizontal flip tool" +#~ msgstr "Горизонтальное отражение" + +#~ msgid "Merge molecules tool" +#~ msgstr "Объединение молекул" + +#~ msgid "Selection" +#~ msgstr "Выделение" + +#~ msgid "Selection toolbar" +#~ msgstr "Панель выделения" + +#~ msgid "Vertical flip tool" +#~ msgstr "Вертикальное отражение" + +#~ msgid "Change current template" +#~ msgstr "Изменить текущий шаблон" + +#~ msgid "Templates selector" +#~ msgstr "Переключатель шаблонов" + +#~ msgid "Templates tool" +#~ msgstr "Шаблоны" + +#~ msgid "Templates toolbar" +#~ msgstr "Панель шаблонов" + +#~ msgid "Bold" +#~ msgstr "Полужирный" + +#~ msgid "Fragment" +#~ msgstr "Фрагмент" + +#~ msgid "Fragment tool" +#~ msgstr "Фрагмент" + +#~ msgid "Italic" +#~ msgstr "Наклонный" + +#~ msgid "Subscript" +#~ msgstr "Нижний индекс" + +#~ msgid "Superscript" +#~ msgstr "Верхний индекс" + +#~ msgid "Text tool" +#~ msgstr "Текст" + +#~ msgid "Text toolbar" +#~ msgstr "Панель текста" + +#~ msgid "About GChemPaint..." +#~ msgstr "О программе GChemPaint..." + +#~ msgid "Displays copyright and contributors of GChemPaint" +#~ msgstr "Показывает сведения об авторских правах и разработчиках GChemPaint" + +#~ msgid "Edit file propeties" +#~ msgstr "Правка свойств файла" + +#~ msgid "GChemPaint T_ools" +#~ msgstr "Инструменты GChemPaint" + +#~ msgid "Print file to the printer" +#~ msgstr "Распечатать файл на принтер" + +#~ msgid "Proper_ties" +#~ msgstr "Свойства" + +#~ msgid "Show tools window" +#~ msgstr "Показать окно инструментов" + +#~ msgid "_Print" +#~ msgstr "Печать" diff -Nru gnome-chemistry-utils-0.8.6/po/zh_CN.po gnome-chemistry-utils-0.10.9/po/zh_CN.po --- gnome-chemistry-utils-0.8.6/po/zh_CN.po 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/po/zh_CN.po 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,5190 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: GChemPaint-0.5.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-08-23 13:53+0200\n" +"PO-Revision-Date: 2006-01-03 16:47+0800\n" +"Last-Translator: Ben Luo \n" +"Language-Team: simplified Chinese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gchemutils.schemas.in.h:1 +msgid "Default Bottom Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:2 +msgid "Default Left Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:3 +msgid "Default Top Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:4 +msgid "Default Top Outside Margin" +msgstr "" + +#: ../gchemutils.schemas.in.h:5 +msgid "Footer height" +msgstr "" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "" + +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "" + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "" + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +#, fuzzy +msgid "2D Chemical structure" +msgstr "编辑 2D 化学结构" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 +msgid "Crystalline structure model" +msgstr "" + +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "" + +#: ../database/residues.xml.in.h:5 +#, fuzzy +msgid "Benzyl" +msgstr "苯" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "" + +#: ../database/residues.xml.in.h:8 +msgid "Halogen" +msgstr "" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "" + +#: ../database/residues.xml.in.h:12 +msgid "Metal" +msgstr "" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "" + +#: ../database/residues.xml.in.h:14 +#, fuzzy +msgid "Phenyl" +msgstr "苯丙氨酸" + +#: ../database/residues.xml.in.h:15 +#, fuzzy +msgid "Propyl" +msgstr "脯氨酸" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "" + +#: ../glade/gchemcalc.glade.h:1 +msgid "Chemical calculator" +msgstr "" + +#: ../glade/gchemcalc.glade.h:2 +msgid "Composition" +msgstr "" + +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 +msgid "Formula:" +msgstr "" + +#: ../glade/gchemcalc.glade.h:4 +msgid "Isotopic Pattern" +msgstr "" + +#: ../glade/gchemcalc.glade.h:5 +msgid "Molecular weight:" +msgstr "" + +#: ../glade/gchemcalc.glade.h:6 +msgid "Monoisotopic mass:" +msgstr "" + +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 +msgid "Raw formula:" +msgstr "" + +#: ../glade/gtkperiodic.glade.h:1 +#, fuzzy +msgid "Actinides" +msgstr "氨基酸" + +#: ../glade/gtkperiodic.glade.h:2 +msgid "Lanthanides" +msgstr "" + +#: ../glade/image-size.glade.h:1 +msgid "Height:" +msgstr "" + +#: ../glade/image-size.glade.h:2 +msgid "Width:" +msgstr "" + +#: ../glade/image-resolution.glade.h:1 +msgid "Image resolution:" +msgstr "" + +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "" + +#: ../glade/print-setup.glade.h:4 +#, fuzzy +msgid "O_rientation:" +msgstr "方位: %g" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "" + +#: ../glade/print-setup.glade.h:7 +msgid "Bottom margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "" + +#: ../glade/print-setup.glade.h:11 +msgid "Footer:" +msgstr "" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:16 +#, fuzzy +msgid "Page" +msgstr "粘贴(_P)" + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "" + +#: ../glade/print-setup.glade.h:18 +#, fuzzy +msgid "Portrait" +msgstr "打印" + +#: ../glade/print-setup.glade.h:19 +#, fuzzy +msgid "Reload defaults" +msgstr "设置缺省" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:23 +#, fuzzy +msgid "Save as defaults" +msgstr "设置缺省" + +#: ../glade/print-setup.glade.h:24 +#, fuzzy +msgid "Scale" +msgstr "保存(_S)" + +#: ../glade/print-setup.glade.h:25 +#, fuzzy +msgid "Scale to fit _horizontally on" +msgstr "对选择做水平翻转" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "" + +#: ../glade/print-setup.glade.h:29 +msgid "_Automatic scaling:" +msgstr "" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "" + +#: ../glade/print-setup.glade.h:33 +#, fuzzy +msgid "_Horizontally" +msgstr "水平翻转" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "" + +#: ../glade/print-setup.glade.h:35 +#, fuzzy +msgid "_Vertically" +msgstr "垂直翻转" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:407 +#: ../libs/gcp/preferences.cc:481 ../libs/gcp/preferences.cc:531 +msgid "Bonds" +msgstr "键" + +#: ../glade/crystal/cell.glade.h:1 +msgid "Cell" +msgstr "" + +#: ../glade/crystal/cell.glade.h:2 +msgid "Cell parameters" +msgstr "" + +#: ../glade/crystal/cell.glade.h:3 +msgid "Lattice:" +msgstr "" + +#: ../glade/crystal/cell.glade.h:4 +msgid "" +"Simple cubic\n" +"Body-centered cubic\n" +"Face-centered cubic\n" +"Hexagonal\n" +"Tetragonal\n" +"Body-centered tetragonal\n" +"Orthorhombic\n" +"Base-centered orthorhombic\n" +"Body-centered orthorhombic\n" +"Face-centered orthorhombic\n" +"Rhombohedral\n" +"Monoclinic\n" +"Base-centered monoclinic\n" +"Triclinic" +msgstr "" + +#: ../glade/crystal/cell.glade.h:18 +msgid "a (pm): " +msgstr "" + +#: ../glade/crystal/cell.glade.h:19 +msgid "b (pm):" +msgstr "" + +#: ../glade/crystal/cell.glade.h:20 +msgid "c (pm):" +msgstr "" + +#: ../glade/crystal/cell.glade.h:21 +msgid "α (°):" +msgstr "" + +#: ../glade/crystal/cell.glade.h:22 +msgid "β (°):" +msgstr "" + +#: ../glade/crystal/cell.glade.h:23 +msgid "γ (°):" +msgstr "" + +#: ../glade/crystal/docprop.glade.h:1 ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 +msgid "*" +msgstr "" + +#: ../glade/crystal/docprop.glade.h:2 +msgid "Author" +msgstr "作者" + +#: ../glade/crystal/docprop.glade.h:3 +msgid "Comments" +msgstr "注释" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "创建日期:" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "文档属性" + +#: ../glade/crystal/docprop.glade.h:6 +msgid "E-mail:" +msgstr "" + +#: ../glade/crystal/docprop.glade.h:7 +msgid "Name:" +msgstr "姓名:" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "修订日期:" + +#: ../glade/crystal/docprop.glade.h:9 +msgid "Title:" +msgstr "标题:" + +#: ../glade/crystal/prefs.glade.h:1 +msgid "" +"300\n" +"360\n" +"600\n" +"720\n" +"1200\n" +"1440\n" +"2400\n" +"2880\n" +"Other" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:10 +msgid "" +"A printer resolution of 300 dpi generally gives a quite acceptable result. " +"Changing to a higher value can lead to a much longer processing time." +msgstr "" + +#: ../glade/crystal/prefs.glade.h:11 ../glade/crystal/view-settings.glade.h:1 +#, fuzzy +msgid "Background color:" +msgstr "背景色" + +#: ../glade/crystal/prefs.glade.h:12 +msgid "Default views settings" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:13 ../glade/crystal/view-settings.glade.h:2 +msgid "Euler's angles" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 +msgid "Field of view (between 1 and 45°):" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 +msgid "Model orientation in space:" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:16 +msgid "Printer resolution:" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:17 +#, fuzzy +msgid "Printing" +msgstr "打印" + +#: ../glade/crystal/prefs.glade.h:18 ../glade/crystal/view-settings.glade.h:5 +msgid "θ (°):" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:19 ../glade/crystal/view-settings.glade.h:6 +msgid "φ (°):" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:20 ../glade/crystal/view-settings.glade.h:7 +msgid "ψ (°):" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:395 +#: ../libs/gcp/preferences.cc:469 ../libs/gcp/preferences.cc:519 +msgid "Atoms" +msgstr "原子" + +#: ../glade/crystal/atoms.glade.h:3 +msgid "Charge: " +msgstr "" + +#: ../glade/crystal/atoms.glade.h:4 +#, fuzzy +msgid "Custom" +msgstr "剪切(_t)" + +#: ../glade/crystal/atoms.glade.h:5 +msgid "Custom color:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/lines.glade.h:2 +#, fuzzy +msgid "Dele_te all" +msgstr "全选(_A)" + +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:261 +msgid "Periodic table of the elements" +msgstr "元素周期表" + +#: ../glade/crystal/atoms.glade.h:8 +msgid "Radius" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:13 +msgid "Type:" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:14 +msgid "" +"Unknown\n" +"Ionic\n" +"Metallic\n" +"Covalent\n" +"Van der Waals" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:19 +msgid "Value (pm):" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/lines.glade.h:7 +msgid "_Add" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/lines.glade.h:8 +#, fuzzy +msgid "_Delete" +msgstr "选择" + +#: ../glade/crystal/cleavages.glade.h:1 +msgid "Cleavages" +msgstr "" + +#: ../glade/crystal/cleavages.glade.h:3 +msgid "Fixed model size" +msgstr "" + +#: ../glade/crystal/cleavages.glade.h:4 +msgid "List of defined cleavages (h, k, and l are the Miller indices)" +msgstr "" + +#: ../glade/crystal/lines.glade.h:1 +msgid "Cell edges" +msgstr "" + +#: ../glade/crystal/lines.glade.h:3 +msgid "Diagonals" +msgstr "" + +#: ../glade/crystal/lines.glade.h:4 +#, fuzzy +msgid "Lines" +msgstr "赖氨酸" + +#: ../glade/crystal/lines.glade.h:5 +msgid "Medians" +msgstr "" + +#: ../glade/crystal/lines.glade.h:6 +#, fuzzy +msgid "Other lines" +msgstr "下划线" + +#: ../glade/crystal/lines.glade.h:9 +msgid "color:" +msgstr "" + +#: ../glade/crystal/lines.glade.h:10 +msgid "radius (pm):" +msgstr "" + +#: ../glade/crystal/size.glade.h:2 +#, fuzzy +msgid "Crystal size" +msgstr "环大小:" + +#: ../glade/crystal/size.glade.h:3 +msgid "Give minimum and maximum coordinates in cell units" +msgstr "" + +#: ../glade/crystal/size.glade.h:4 +msgid "Maximum" +msgstr "" + +#: ../glade/crystal/size.glade.h:5 +msgid "Minimum" +msgstr "" + +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 +msgid "x" +msgstr "" + +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 +msgid "y" +msgstr "" + +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 +msgid "z" +msgstr "" + +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" +msgstr "" + +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" +msgstr "" + +#: ../glade/paint/arrow-object.glade.h:3 +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-close" +msgstr "" + +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +#: ../plugins/paint/residues/residues.glade.h:10 +msgid "gtk-help" +msgstr "" + +#: ../glade/paint/docprop.glade.h:1 +#, fuzzy +msgid "Author:" +msgstr "作者" + +#: ../glade/paint/docprop.glade.h:2 +msgid "History" +msgstr "" + +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "" + +#: ../glade/paint/docprop.glade.h:4 +#, fuzzy +msgid "_Comments:" +msgstr "注释" + +#: ../glade/paint/docprop.glade.h:7 +msgid "E-_mail:" +msgstr "" + +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +#, fuzzy +msgid "Theme:" +msgstr "胸腺嘧啶" + +#: ../glade/paint/docprop.glade.h:10 +#: ../plugins/paint/residues/residues.glade.h:6 +#, fuzzy +msgid "_Name:" +msgstr "姓名(_N)" + +#: ../glade/paint/docprop.glade.h:11 +#, fuzzy +msgid "_Title:" +msgstr "标题:" + +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1879 +msgid "Hydrogen atoms position" +msgstr "" + +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" +msgstr "" + +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" +msgstr "" + +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "" + +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" +msgstr "" + +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" +msgstr "" + +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" +msgstr "" + +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" +msgstr "" + +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "" + +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:6 +msgid "Angl_e:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "" + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:16 +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" + +#: ../glade/paint/preferences.glade.h:17 +#, fuzzy +msgid "Dist_ance:" +msgstr "距离" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "" + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:23 +msgid "" +"Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:25 +#, fuzzy +msgid "GChemPaint Preferences" +msgstr "GChemPaint 控件" + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:28 +#, fuzzy +msgid "Ha_ve a tearable table of the elements" +msgstr "元素周期表" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:30 +#, fuzzy +msgid "N_ame:" +msgstr "姓名:" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "" + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:41 +msgid "_Default theme:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:42 +#, fuzzy +msgid "_Distance:" +msgstr "距离" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:45 +#, fuzzy +msgid "_Scale:" +msgstr "保存(_S)" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "" + +#: ../glade/paint/zoom.glade.h:1 +msgid "Zoom" +msgstr "" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr "" + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr "" + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr "" + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr "" + +#: ../glade/table/eltpage.glade.h:1 +msgid "1:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:2 +msgid "Atomic number:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:3 +msgid "Atomic weight:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:4 +msgid "Boiling point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:5 +msgid "Covalent:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:6 +#, fuzzy +msgid "Electronic affinities:" +msgstr "电子对工具" + +#: ../glade/table/eltpage.glade.h:7 +#, fuzzy +msgid "Electronic properties" +msgstr "组属性..." + +#: ../glade/table/eltpage.glade.h:8 +msgid "Ionic radii (Shannon and Prewitt):" +msgstr "" + +#: ../glade/table/eltpage.glade.h:9 +msgid "Ionization energies:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:10 +msgid "Isotopes" +msgstr "" + +#: ../glade/table/eltpage.glade.h:11 +msgid "Main" +msgstr "主要" + +#: ../glade/table/eltpage.glade.h:12 +msgid "Melting point:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:13 +#, fuzzy +msgid "Metallic:" +msgstr "斜体" + +#: ../glade/table/eltpage.glade.h:14 +msgid "Pauling electronegativity:" +msgstr "" + +#: ../glade/table/eltpage.glade.h:15 +#, fuzzy +msgid "Radii" +msgstr "就绪" + +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 +msgid "Show curve" +msgstr "" + +#: ../glade/table/eltpage.glade.h:17 +msgid "Thermodynamics" +msgstr "" + +#: ../glade/table/eltpage.glade.h:18 +msgid "Van der Waals:" +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:1 +msgid " Solid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:2 +msgid " Liquid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:3 +msgid " Gas " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:4 +msgid "Temperature (K):" +msgstr "" + +#: ../glade/table/curve.glade.h:1 +msgid "GChemTable Graph" +msgstr "" + +#: ../glade/table/family.glade.h:1 +msgid "" +"All\n" +"Alkali Metals\n" +"Alkaline Earths Metals\n" +"Halogenes\n" +"Metalloids\n" +"Noble Gases\n" +"Non-Metals\n" +"Rare Earths Metals\n" +"Transition Metals\n" +"Other Metals\n" +msgstr "" + +#: ../glade/table/family.glade.h:12 +msgid "Selected Family:" +msgstr "" + +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" + +#: ../database/elements.xml.in.h:1 +msgid "Actinium" +msgstr "" + +#: ../database/elements.xml.in.h:2 +msgid "Aluminum" +msgstr "" + +#: ../database/elements.xml.in.h:3 +msgid "Americium" +msgstr "" + +#: ../database/elements.xml.in.h:4 +msgid "Antimony" +msgstr "" + +#: ../database/elements.xml.in.h:5 +#, fuzzy +msgid "Argon" +msgstr "精氨酸" + +#: ../database/elements.xml.in.h:6 +msgid "Arsenic" +msgstr "" + +#: ../database/elements.xml.in.h:7 +#, fuzzy +msgid "Astatine" +msgstr "天冬酰胺" + +#: ../database/elements.xml.in.h:8 +msgid "Barium" +msgstr "" + +#: ../database/elements.xml.in.h:9 +msgid "Berkelium" +msgstr "" + +#: ../database/elements.xml.in.h:10 +msgid "Beryllium" +msgstr "" + +#: ../database/elements.xml.in.h:11 +msgid "Bismuth" +msgstr "" + +#: ../database/elements.xml.in.h:12 +msgid "Bohrium" +msgstr "" + +#: ../database/elements.xml.in.h:13 +#, fuzzy +msgid "Boron" +msgstr "键" + +#: ../database/elements.xml.in.h:14 +#, fuzzy +msgid "Bromine" +msgstr "脯氨酸" + +#: ../database/elements.xml.in.h:15 +msgid "Cadmium" +msgstr "" + +#: ../database/elements.xml.in.h:16 +msgid "Caesium" +msgstr "" + +#: ../database/elements.xml.in.h:17 +msgid "Calcium" +msgstr "" + +#: ../database/elements.xml.in.h:18 +msgid "Californium" +msgstr "" + +#: ../database/elements.xml.in.h:19 +msgid "Carbon" +msgstr "" + +#: ../database/elements.xml.in.h:20 +msgid "Cerium" +msgstr "" + +#: ../database/elements.xml.in.h:21 +#, fuzzy +msgid "Chlorine" +msgstr "胞嘧啶" + +#: ../database/elements.xml.in.h:22 +msgid "Chromium" +msgstr "" + +#: ../database/elements.xml.in.h:23 +msgid "Cobalt" +msgstr "" + +#: ../database/elements.xml.in.h:24 +msgid "Copper" +msgstr "" + +#: ../database/elements.xml.in.h:25 +msgid "Curium" +msgstr "" + +#: ../database/elements.xml.in.h:26 +msgid "Darmstadtium" +msgstr "" + +#: ../database/elements.xml.in.h:27 +msgid "Dubnium" +msgstr "" + +#: ../database/elements.xml.in.h:28 +msgid "Dysprosium" +msgstr "" + +#: ../database/elements.xml.in.h:29 +msgid "Einsteinium" +msgstr "" + +#: ../database/elements.xml.in.h:30 +msgid "Erbium" +msgstr "" + +#: ../database/elements.xml.in.h:31 +msgid "Europium" +msgstr "" + +#: ../database/elements.xml.in.h:32 +msgid "Fermium" +msgstr "" + +#: ../database/elements.xml.in.h:33 +msgid "Fluorine" +msgstr "" + +#: ../database/elements.xml.in.h:34 +msgid "Francium" +msgstr "" + +#: ../database/elements.xml.in.h:35 +msgid "Gadolinium" +msgstr "" + +#: ../database/elements.xml.in.h:36 +msgid "Gallium" +msgstr "" + +#: ../database/elements.xml.in.h:37 +msgid "Germanium" +msgstr "" + +#: ../database/elements.xml.in.h:38 +#, fuzzy +msgid "Gold" +msgstr "粗体" + +#: ../database/elements.xml.in.h:39 +msgid "Hafnium" +msgstr "" + +#: ../database/elements.xml.in.h:40 +msgid "Hassium" +msgstr "" + +#: ../database/elements.xml.in.h:41 +msgid "Helium" +msgstr "" + +#: ../database/elements.xml.in.h:42 +msgid "Holmium" +msgstr "" + +#: ../database/elements.xml.in.h:43 +msgid "Hydrogen" +msgstr "" + +#: ../database/elements.xml.in.h:44 +msgid "Indium" +msgstr "" + +#: ../database/elements.xml.in.h:45 +#, fuzzy +msgid "Iodine" +msgstr "异亮氨酸" + +#: ../database/elements.xml.in.h:46 +msgid "Iridium" +msgstr "" + +#: ../database/elements.xml.in.h:47 +msgid "Iron" +msgstr "" + +#: ../database/elements.xml.in.h:48 +#, fuzzy +msgid "Krypton" +msgstr "色氨酸" + +#: ../database/elements.xml.in.h:49 +msgid "Lanthanum" +msgstr "" + +#: ../database/elements.xml.in.h:50 +msgid "Lawrencium" +msgstr "" + +#: ../database/elements.xml.in.h:51 +#, fuzzy +msgid "Lead" +msgstr "就绪" + +#: ../database/elements.xml.in.h:52 +msgid "Lithium" +msgstr "" + +#: ../database/elements.xml.in.h:53 +msgid "Lutetium" +msgstr "" + +#: ../database/elements.xml.in.h:54 +msgid "Magnesium" +msgstr "" + +#: ../database/elements.xml.in.h:55 +msgid "Manganese" +msgstr "" + +#: ../database/elements.xml.in.h:56 +msgid "Meitnerium" +msgstr "" + +#: ../database/elements.xml.in.h:57 +msgid "Mendelevium" +msgstr "" + +#: ../database/elements.xml.in.h:58 +msgid "Mercury" +msgstr "" + +#: ../database/elements.xml.in.h:59 +msgid "Molybdenum" +msgstr "" + +#: ../database/elements.xml.in.h:60 +msgid "Neodymium" +msgstr "" + +#: ../database/elements.xml.in.h:61 +msgid "Neon" +msgstr "" + +#: ../database/elements.xml.in.h:62 +msgid "Neptunium" +msgstr "" + +#: ../database/elements.xml.in.h:63 +msgid "Nickel" +msgstr "" + +#: ../database/elements.xml.in.h:64 +msgid "Niobium" +msgstr "" + +#: ../database/elements.xml.in.h:65 +msgid "Nitrogen" +msgstr "" + +#: ../database/elements.xml.in.h:66 +msgid "Nobelium" +msgstr "" + +#: ../database/elements.xml.in.h:67 +msgid "Osmium" +msgstr "" + +#: ../database/elements.xml.in.h:68 +#, fuzzy +msgid "Oxygen" +msgstr "打开" + +#: ../database/elements.xml.in.h:69 +msgid "Palladium" +msgstr "" + +#: ../database/elements.xml.in.h:70 +msgid "Phosphorus" +msgstr "" + +#: ../database/elements.xml.in.h:71 +msgid "Platinum" +msgstr "" + +#: ../database/elements.xml.in.h:72 +msgid "Plutonium" +msgstr "" + +#: ../database/elements.xml.in.h:73 +msgid "Polonium" +msgstr "" + +#: ../database/elements.xml.in.h:74 +msgid "Potassium" +msgstr "" + +#: ../database/elements.xml.in.h:75 +msgid "Praseodymium" +msgstr "" + +#: ../database/elements.xml.in.h:76 +msgid "Promethium" +msgstr "" + +#: ../database/elements.xml.in.h:77 +msgid "Protactinium" +msgstr "" + +#: ../database/elements.xml.in.h:78 +msgid "Radium" +msgstr "" + +#: ../database/elements.xml.in.h:79 +#, fuzzy +msgid "Radon" +msgstr "再次做(_R)" + +#: ../database/elements.xml.in.h:80 +msgid "Rhenium" +msgstr "" + +#: ../database/elements.xml.in.h:81 +msgid "Rhodium" +msgstr "" + +#: ../database/elements.xml.in.h:82 +msgid "Roentgenium" +msgstr "" + +#: ../database/elements.xml.in.h:83 +msgid "Rubidium" +msgstr "" + +#: ../database/elements.xml.in.h:84 +msgid "Ruthenium" +msgstr "" + +#: ../database/elements.xml.in.h:85 +msgid "Rutherfordium" +msgstr "" + +#: ../database/elements.xml.in.h:86 +msgid "Samarium" +msgstr "" + +#: ../database/elements.xml.in.h:87 +msgid "Scandium" +msgstr "" + +#: ../database/elements.xml.in.h:88 +msgid "Seaborgium" +msgstr "" + +#: ../database/elements.xml.in.h:89 +msgid "Selenium" +msgstr "" + +#: ../database/elements.xml.in.h:90 +#, fuzzy +msgid "Silicon" +msgstr "选择" + +#: ../database/elements.xml.in.h:91 +msgid "Silver" +msgstr "" + +#: ../database/elements.xml.in.h:92 +msgid "Sodium" +msgstr "" + +#: ../database/elements.xml.in.h:93 +msgid "Strontium" +msgstr "" + +#: ../database/elements.xml.in.h:94 +msgid "Sulfur" +msgstr "" + +#: ../database/elements.xml.in.h:95 +msgid "Tantalum" +msgstr "" + +#: ../database/elements.xml.in.h:96 +msgid "Technetium" +msgstr "" + +#: ../database/elements.xml.in.h:97 +msgid "Tellurium" +msgstr "" + +#: ../database/elements.xml.in.h:98 +msgid "Terbium" +msgstr "" + +#: ../database/elements.xml.in.h:99 +msgid "Thallium" +msgstr "" + +#: ../database/elements.xml.in.h:100 +msgid "Thorium" +msgstr "" + +#: ../database/elements.xml.in.h:101 +msgid "Thulium" +msgstr "" + +#: ../database/elements.xml.in.h:102 +#, fuzzy +msgid "Tin" +msgstr "胸腺嘧啶" + +#: ../database/elements.xml.in.h:103 +msgid "Titanium" +msgstr "" + +#: ../database/elements.xml.in.h:104 +msgid "Tungsten" +msgstr "" + +#: ../database/elements.xml.in.h:105 +msgid "Ununbium" +msgstr "" + +#: ../database/elements.xml.in.h:106 +msgid "Ununhexium" +msgstr "" + +#: ../database/elements.xml.in.h:107 +msgid "Ununpentium" +msgstr "" + +#: ../database/elements.xml.in.h:108 +msgid "Ununquadium" +msgstr "" + +#: ../database/elements.xml.in.h:109 +msgid "Ununtrium" +msgstr "" + +#: ../database/elements.xml.in.h:110 +#, fuzzy +msgid "Uranium" +msgstr "尿嘧啶" + +#: ../database/elements.xml.in.h:111 +msgid "Vanadium" +msgstr "" + +#: ../database/elements.xml.in.h:112 +msgid "Xenon" +msgstr "" + +#: ../database/elements.xml.in.h:113 +msgid "Ytterbium" +msgstr "" + +#: ../database/elements.xml.in.h:114 +msgid "Yttrium" +msgstr "" + +#: ../database/elements.xml.in.h:115 +msgid "Zinc" +msgstr "" + +#: ../database/elements.xml.in.h:116 +msgid "Zirconium" +msgstr "" + +#: ../database/isotopes.xml.in.h:1 +msgid "deuterium" +msgstr "" + +#: ../database/isotopes.xml.in.h:2 +msgid "protium" +msgstr "" + +#: ../database/isotopes.xml.in.h:3 +msgid "tritium" +msgstr "" + +#: ../goffice/plugin.xml.in.h:1 +#, fuzzy +msgid "2D Chemical Structures Viewer/Editor" +msgstr "GChemPaint 是一个在 Gnome 下的 2D 化学结构式编辑器 (不稳定)" + +#: ../goffice/plugin.xml.in.h:2 +#, fuzzy +msgid "Chemical structures" +msgstr "编辑 2D 化学结构" + +#: ../goffice/plugin.xml.in.h:3 +msgid "Chemical structures component engine" +msgstr "" + +#: ../goffice/plugin.xml.in.h:4 +#, fuzzy +msgid "Component : GChemPaint" +msgstr "关于 GchemPaint" + +#: ../goffice/gogcpapp.cc:182 ../programs/paint/standaloneapp.cc:46 +#, c-format +msgid "Untitled %d" +msgstr "无标题 %d" + +#: ../goffice/gogcpwin.cc:88 +#, fuzzy +msgid "Embedded GChemPaint Object" +msgstr "GChemPaint 对象工厂" + +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:376 +msgid "X position" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:384 +msgid "Y position" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:399 +msgid "Height" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:407 +#, fuzzy +msgid "Anchor" +msgstr "作者" + +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:416 +msgid "Color" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:424 +#, fuzzy +msgid "Editing" +msgstr "编辑(_E)" + +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" +msgstr "" + +#. Note to translators: replace the following string with the appropriate credits for you lang +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:139 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:363 +msgid "translator_credits" +msgstr "Ben Luo" + +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "GChemPaint 是一个在 Gnome 下的 2D 化学结构式编辑器" + +#: ../libs/gcp/about.cc:56 +#, fuzzy +msgid "Copyright © 2001-2007 by Jean Bréfort" +msgstr "(C) 2001-2005 Jean Bréfort" + +#: ../libs/gcp/application.cc:303 +msgid "Create a new reaction" +msgstr "创建一个新反应" + +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" +msgstr "创建一个新" + +#: ../libs/gcp/application.cc:504 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" +"请输入文件名,\n" +"不是目录" + +#: ../libs/gcp/application.cc:546 +#, fuzzy, c-format +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "对不起,格式不支持!" + +#: ../libs/gcp/application.cc:575 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 +#, c-format +msgid "" +"File %s\n" +"exists, overwrite?" +msgstr "" +"文件 %s\n" +"已存在,覆盖吗?" + +#: ../libs/gcp/application.cc:588 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 +#, c-format +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" + +#: ../libs/gcp/application.cc:796 ../libs/gcp/application.cc:924 +msgid "No filename" +msgstr "没有文件名" + +#: ../libs/gcp/application.cc:799 +#, c-format +msgid "" +"Could not open file\n" +"%s" +msgstr "" +"不能打开文件\n" +"%s" + +#: ../libs/gcp/application.cc:802 ../libs/gcp/application.cc:936 +#, c-format +msgid "%s: parse error." +msgstr "%s: 解析错误。" + +#: ../libs/gcp/application.cc:927 ../programs/crystal/document.cc:274 +#, c-format +msgid "" +"Could not load file\n" +"%s" +msgstr "" +"不能载入文件\n" +"%s" + +#: ../libs/gcp/application.cc:930 ../programs/crystal/document.cc:277 +#, c-format +msgid "" +"%s: invalid xml file.\n" +"Tree is empty?" +msgstr "" +"%s: 不可用的 xml 文件。\n" +"xml 树是空的?" + +#: ../libs/gcp/application.cc:933 ../programs/crystal/document.cc:280 +#, c-format +msgid "%s: invalid file format." +msgstr "%s: 不可用的文件格式。" + +#: ../libs/gcp/application.cc:968 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 +msgid "Save as image" +msgstr "另存图像为" + +#: ../libs/gcp/atom.cc:1861 ../libs/gcp/atom.cc:1875 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "原子" + +#: ../libs/gcp/atom.cc:1864 +msgid "Display symbol" +msgstr "" + +#: ../libs/gcp/atom.cc:1864 +msgid "Whether to display carbon atom symbol or not" +msgstr "" + +#: ../libs/gcp/bond.cc:980 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "键" + +#: ../libs/gcp/bond.cc:984 +msgid "Move to back" +msgstr "" + +#: ../libs/gcp/bond.cc:991 +msgid "Bring to front" +msgstr "" + +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +msgid "%A, %B %d, %Y" +msgstr "" + +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:148 +msgid "Family" +msgstr "" + +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "" + +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "" + +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "" + +#: ../libs/gcp/fontsel.cc:296 +msgid "Weight" +msgstr "" + +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "" + +#: ../libs/gcp/fontsel.cc:301 +#, fuzzy +msgid "Variant" +msgstr "打印" + +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" +msgstr "" + +#: ../libs/gcp/fontsel.cc:306 +#, fuzzy +msgid "Stretch" +msgstr "删除线" + +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" +msgstr "" + +#: ../libs/gcp/fontsel.cc:311 +#, fuzzy +msgid "Size" +msgstr "丝氨酸" + +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" +msgstr "" + +#: ../libs/gcp/fragment.cc:685 ../libs/gcp/fragment.cc:1209 +msgid "Invalid charge." +msgstr "不存在的电荷。" + +#: ../libs/gcp/fragment.cc:1182 +msgid "Invalid symbol." +msgstr "不存在的符号。" + +#: ../libs/gcp/mesomer.cc:76 +#, fuzzy +msgid "Only one arrow can link two given mesomers." +msgstr "一个箭头只能连接两个步骤。" + +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "有错误发生,请写错误报告。" + +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "在分子和箭头之间没有空间了!" + +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "不能有孤立的箭头!" + +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." +msgstr "" +"孤立的分子\n" +"请添加缺少的箭头。" + +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "请添加缺少的箭头。" + +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" +msgstr "" + +#: ../libs/gcp/molecule.cc:515 +msgid "Molecule" +msgstr "" + +#: ../libs/gcp/molecule.cc:520 +msgid "Export molecule to Ghemical" +msgstr "向 Ghemical 导出分子" + +#: ../libs/gcp/molecule.cc:527 +msgid "Generate InChI" +msgstr "" + +#: ../libs/gcp/molecule.cc:532 +msgid "NIST WebBook page for this molecule" +msgstr "" + +#: ../libs/gcp/molecule.cc:537 +msgid "PubChem page for this molecule" +msgstr "" + +#: ../libs/gcp/molecule.cc:543 +msgid "Generate SMILES" +msgstr "" + +#: ../libs/gcp/molecule.cc:549 +msgid "Open in Calculator" +msgstr "" + +#: ../libs/gcp/molecule.cc:555 +msgid "Select alignment item" +msgstr "选择对齐的项目" + +#: ../libs/gcp/preferences.cc:349 ../libs/gcp/preferences.cc:368 +#: ../libs/gcp/preferences.cc:497 ../libs/gcp/theme.cc:336 +#: ../libs/gcp/theme.cc:343 ../programs/table/gchemtable-app.cc:143 +#, fuzzy +msgid "Default" +msgstr "设置缺省" + +#: ../libs/gcp/preferences.cc:389 ../libs/gcp/preferences.cc:458 +#: ../libs/gcp/preferences.cc:525 +msgid "General" +msgstr "" + +#: ../libs/gcp/preferences.cc:399 ../libs/gcp/preferences.cc:473 +#: ../libs/gcp/preferences.cc:527 +msgid "Font" +msgstr "字体" + +#: ../libs/gcp/preferences.cc:403 ../libs/gcp/preferences.cc:477 +#: ../libs/gcp/preferences.cc:529 +msgid "Other" +msgstr "" + +#: ../libs/gcp/preferences.cc:411 ../libs/gcp/preferences.cc:485 +#: ../libs/gcp/preferences.cc:533 +msgid "Arrows" +msgstr "箭头" + +#: ../libs/gcp/preferences.cc:415 ../libs/gcp/preferences.cc:489 +#: ../libs/gcp/preferences.cc:535 ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "文本" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" +msgstr "" + +#. Object too far from the arrow direction +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" +"错误 不能从选定的对象\n" +"建立反应式。" + +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "销毁反应式" + +#: ../libs/gcp/reaction-arrow.cc:380 +#, fuzzy +msgid "Arrow" +msgstr "箭头" + +#: ../libs/gcp/reaction-arrow.cc:386 +msgid "Attach selection to arrow..." +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:39 +msgid "Unkown" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:43 +#, fuzzy +msgid "Solvent" +msgstr "选择" + +#: ../libs/gcp/reaction-prop.cc:44 +#, fuzzy +msgid "Temperature" +msgstr "模板" + +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:46 +#, fuzzy +msgid "Time" +msgstr "标题:" + +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" +msgstr "" + +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 +msgid "Save as" +msgstr "另存为" + +#: ../libs/gcp/stringdlg.cc:145 +#, fuzzy, c-format +msgid "" +"Could not open file %s, error was:\n" +"%s" +msgstr "" +"不能打开文件\n" +"%s" + +#: ../libs/gcp/stringdlg.cc:161 +#, c-format +msgid "" +"Could not write to file %s, error was:\n" +"%s." +msgstr "" + +#: ../libs/gcp/stringdlg.cc:175 +#, fuzzy, c-format +msgid "" +"Could not close file %s, error was:\n" +"%s" +msgstr "" +"不能打开文件\n" +"%s" + +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +#, fuzzy +msgid "This should not have occured, please file a bug record." +msgstr "有错误发生,请写错误报告。" + +#: ../libs/gcp/theme.cc:449 +msgid "NewTheme1" +msgstr "" + +#: ../libs/gcp/theme.cc:453 +#, c-format +msgid "NewTheme%d" +msgstr "" + +#: ../libs/gcp/theme.cc:550 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "" + +#: ../libs/gcp/view.cc:1015 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, fuzzy, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" +"不能打开文件\n" +"%s" + +#: ../libs/gcp/view.cc:1051 ../libs/gcu/glview.cc:394 +#, c-format +msgid "Unable to save image file: %s\n" +msgstr "" + +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:274 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:134 +#: ../programs/table/gchemtable-curve.cc:212 +msgid "_File" +msgstr "文件(_F)" + +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:275 +msgid "_New File" +msgstr "新文件(_N)" + +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:276 +msgid "Create a new file" +msgstr "创建一个新文件" + +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." +msgstr "" + +#: ../libs/gcp/window.cc:284 +#, fuzzy +msgid "Create a new file using a theme" +msgstr "创建一个新文件" + +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:277 ../programs/spectra/window.cc:167 +msgid "_Open..." +msgstr "打开...(_O)" + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:278 ../programs/spectra/window.cc:168 +msgid "Open a file" +msgstr "打开一个文件" + +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:279 +msgid "_Save" +msgstr "保存(_S)" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:280 +msgid "Save the current file" +msgstr "保存当前文件" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:281 +msgid "Save _As..." +msgstr "另存为...(_S)" + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:282 +msgid "Save the current file with a different name" +msgstr "用不同的名字保存当前文件" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:283 +#: ../programs/spectra/window.cc:169 +msgid "Save As _Image..." +msgstr "另存图像为...(_S)" + +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:284 +#: ../programs/spectra/window.cc:170 +msgid "Save the current file as an image" +msgstr "保存当前文件为图像" + +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:285 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:213 +msgid "Page Set_up..." +msgstr "" + +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:286 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:214 +msgid "Setup the page settings for your current printer" +msgstr "" + +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:287 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:215 +#, fuzzy +msgid "Print Pre_view" +msgstr "预览" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:288 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:216 +#, fuzzy +msgid "Print preview" +msgstr "预览" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:217 +msgid "_Print..." +msgstr "打印...(_P)" + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:290 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "Print the current file" +msgstr "打印当前文件" + +#: ../libs/gcp/window.cc:299 ../programs/table/gchemtable-curve.cc:219 +msgid "Prope_rties..." +msgstr "属性...(_r)" + +#: ../libs/gcp/window.cc:300 +msgid "Modify the file's properties" +msgstr "改变文件的属性" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:291 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:221 +msgid "_Close" +msgstr "关闭(_C)" + +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:292 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:222 +msgid "Close the current file" +msgstr "关闭当前文件" + +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:137 +#: ../programs/table/gchemtable-curve.cc:223 +msgid "_Quit" +msgstr "退出(_Q)" + +#: ../libs/gcp/window.cc:304 +msgid "Quit GChemPaint" +msgstr "退出 GchemPaint" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:295 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:225 +msgid "_Edit" +msgstr "编辑(_E)" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "取消(_U)" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "取消最后一次动作" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "再次做(_R)" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "再次做没有做完的动作" + +#: ../libs/gcp/window.cc:310 +msgid "Cu_t" +msgstr "剪切(_t)" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "剪切已选择的" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:226 +msgid "_Copy" +msgstr "复制(_C)" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:227 +msgid "Copy the selection" +msgstr "复制已选择的" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "粘贴(_P)" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "从剪贴板粘贴" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "清除(_l)" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "清除已选择的" + +#: ../libs/gcp/window.cc:318 +msgid "Select _All" +msgstr "全选(_A)" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "全选" + +#: ../libs/gcp/window.cc:320 +#, fuzzy +msgid "Pr_eferences..." +msgstr "属性...(_r)" + +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:297 +#, fuzzy +msgid "Configure the application" +msgstr "剪切已选择的" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:309 ../programs/table/gchemtable-app.cc:139 +msgid "_View" +msgstr "视图(_V)" + +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "" + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "" + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "" + +#: ../libs/gcp/window.cc:342 +#, fuzzy +msgid "_Tools" +msgstr "工具条(_T)" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:312 +msgid "_Windows" +msgstr "窗口(_W)" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:317 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:163 +#: ../programs/table/gchemtable-curve.cc:228 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "_Help" +msgstr "帮助(_H)" + +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:318 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:164 +#: ../programs/table/gchemtable-curve.cc:229 +msgid "_Contents" +msgstr "注释(_C)" + +#: ../libs/gcp/window.cc:346 +msgid "View help for GChemPaint" +msgstr "查看 GchemPaint 的帮助文件" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "网上 GChemPaint(_w)" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "浏览 GChemPaint 网站" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:322 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:168 +#: ../programs/table/gchemtable-curve.cc:235 +msgid "Live assistance" +msgstr "" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:323 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:324 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Ask a question" +msgstr "提问(_A)" + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "提有关 GchemPaint 的问题" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "Report _Bugs" +msgstr "报告错误(_B)" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "向 GchemPaint 提错误报告" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:328 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "_About" +msgstr "关于(_A)" + +#: ../libs/gcp/window.cc:356 +msgid "About GChemPaint" +msgstr "关于 GchemPaint" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:449 +msgid "Ready" +msgstr "就绪" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:639 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "" + +#: ../libs/gcu/dialog.cc:131 +msgid "Type a number" +msgstr "输入一个数字" + +#: ../libs/gcu/dialog.cc:140 +#, fuzzy, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "输入一个大于 %g 的数字" + +#: ../libs/gcu/dialog.cc:150 +#, fuzzy, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "输入一个大于 %g 的数字" + +#: ../libs/gcu/dialog.cc:160 +#, fuzzy, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "输入一个在 %g 和 %g 之间的数字" + +#: ../libs/gcu/dialog.cc:170 +#, fuzzy, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "输入一个大于 %g 的数字" + +#: ../libs/gcu/dialog.cc:180 +#, fuzzy, c-format +msgid "Type a number lower than %g" +msgstr "输入一个大于 %g 的数字" + +#: ../libs/gcu/dialog.cc:190 +#, c-format +msgid "Type a number greater than %g" +msgstr "输入一个大于 %g 的数字" + +#: ../libs/gcu/dialog.cc:200 +#, fuzzy, c-format +msgid "Type a number lower than or equal to %g" +msgstr "输入一个大于 %g 的数字" + +#: ../libs/gcu/dialog.cc:210 +#, fuzzy, c-format +msgid "Type a number greater than or equal to %g" +msgstr "输入一个大于 %g 的数字" + +#: ../libs/gcu/element.cc:97 +msgid "German" +msgstr "" + +#: ../libs/gcu/element.cc:98 +msgid "French" +msgstr "" + +#: ../libs/gcu/element.cc:99 +#, fuzzy +msgid "Italian" +msgstr "斜体" + +#: ../libs/gcu/element.cc:100 +#, fuzzy +msgid "Polish" +msgstr "脯氨酸" + +#: ../libs/gcu/element.cc:101 +msgid "Russian" +msgstr "" + +#: ../libs/gcu/element.cc:103 +msgid "Can't find and read elements.xml" +msgstr "" + +#: ../libs/gcu/element.cc:109 ../libs/gcu/element.cc:118 +msgid "Incorrect file format: elements.xml" +msgstr "" + +#: ../libs/gcu/element.cc:154 +msgid "English" +msgstr "" + +#: ../libs/gcu/element.cc:406 +msgid "Can't find and read radii.xml" +msgstr "" + +#: ../libs/gcu/element.cc:412 ../libs/gcu/element.cc:425 +msgid "Incorrect file format: radii.xml" +msgstr "" + +#: ../libs/gcu/element.cc:513 +msgid "Can't find and read elecprops.xml" +msgstr "" + +#: ../libs/gcu/element.cc:519 ../libs/gcu/element.cc:526 +msgid "Incorrect file format: elecprops.xml" +msgstr "" + +#: ../libs/gcu/element.cc:675 +msgid "Can't find and read isotopes.xml" +msgstr "" + +#: ../libs/gcu/element.cc:681 ../libs/gcu/element.cc:690 +msgid "Incorrect file format: isotopes.xml" +msgstr "" + +#: ../libs/gcu/filechooser.cc:43 +msgid "Open" +msgstr "打开" + +#: ../libs/gcu/filechooser.cc:62 +msgid "File _type:" +msgstr "" + +#: ../libs/gcu/filechooser.cc:64 +#, fuzzy +msgid "Automatic" +msgstr "原子" + +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "" + +#: ../libs/gcu/formula.cc:546 +#, fuzzy +msgid "Parser failed, please fill a bug report." +msgstr "有错误发生,请写错误报告。" + +#: ../libs/gcu/formula.cc:554 +#, fuzzy +msgid "Invalid character" +msgstr "不存在的电荷。" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +#, fuzzy +msgid "Background Color" +msgstr "背景色" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "" + +#: ../libs/gcu/gtkperiodic.c:331 +#, c-format +msgid "" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" +msgstr "" + +#: ../libs/gcu/loader.cc:106 +msgid "Chemical file loader type." +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "" + +#: ../libs/gcu/printable.cc:35 +#, fuzzy +msgid "points" +msgstr "字体" + +#: ../libs/gcu/printable.cc:36 +msgid "inches" +msgstr "" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1321 +msgid "Transmittance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1320 +#, fuzzy +msgid "Absorbance" +msgstr "天冬酰胺" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1256 +msgid "Chemical shift (ppm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1257 +msgid "Frequency (Hz)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 ../libs/gcu/spectrumdoc.cc:1263 +msgid "Show integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:616 +msgid "Hide integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:706 ../libs/gcu/spectrumdoc.cc:1593 +msgid "Found too many data!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1253 ../libs/gcu/spectrumdoc.cc:1300 +msgid "X unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1304 +msgid "Wave length (nm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1306 +msgid "Wave length (µm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1307 +msgid "Wave number (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1312 +msgid "Invert X Axis" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1317 +msgid "Y unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1488 ../libs/gcu/spectrumdoc.cc:1518 +#, fuzzy +msgid "Constant too long" +msgstr "旋转工具" + +#: ../libs/gcu/spectrumdoc.cc:1511 +msgid "Invalid character in data block" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1615 +msgid "Data check failed!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1632 +msgid "Data check failed: FIRSTX!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1637 +msgid "Data check failed: FIRSTY!" +msgstr "" + +#. FIXME: Throw an exception +#: ../libs/gcu/spectrumdoc.cc:1641 +msgid "Found too many data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1947 +msgid "Integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2068 +msgid "Real transformed data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2085 +msgid "Imaginary transformed data" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:80 +msgid "Minimum X value:" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:85 +msgid "Maximum X value:" +msgstr "" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "" + +#. FIXME: should the document care with the residues? +#. FIXME: Unkown residue: add it to the database? or just to the document? +#. TODO: import it in the document +#: ../plugins/loaders/cdx/cdx.cc:502 ../plugins/loaders/cdx/cdx.cc:506 +#: ../plugins/loaders/cdx/cdx.cc:631 ../plugins/loaders/cdx/cdx.cc:636 +msgid "Unsupported feature, please report!" +msgstr "" + +#: ../plugins/loaders/cdx/cdx.cc:593 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:169 +#: ../plugins/paint/bonds/bondtool.cc:279 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "方位: %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +#, fuzzy +msgid "H_alf heads" +msgstr "半箭头(_f)" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +#, fuzzy +msgid "Set _default" +msgstr "设置缺省" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "全箭头(_F)" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +#, fuzzy +msgid "Use full arrows heads for reversible reactions" +msgstr "为可逆反应加一对箭头" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "单箭头" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "为不可逆反应加一个箭头" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "双箭头" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "为可逆反应加一对箭头" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "逆合成箭头" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "为逆合成添加一个箭头" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "内消旋箭头" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "添加双箭头代表消旋体" + +#: ../plugins/paint/arrows/plugin.cc:92 +#, fuzzy +msgid "Electron pair move arrow" +msgstr "电子对工具" + +#: ../plugins/paint/arrows/plugin.cc:93 +#, fuzzy +msgid "Add a curved arrow to represent an electron pair move" +msgstr "添加双箭头代表消旋体" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:96 +#, fuzzy +msgid "Add a curved arrow to represent an single electron move" +msgstr "添加双箭头代表消旋体" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "没有目标分子" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "多个目标分子或者缺少箭头。" + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "对不起,不支持连续反合成路径。" + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "销毁反合成路径" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "一个箭头只能连接两个步骤。" + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "增加或修改一个原子" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "正电荷" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "增加一个原子的电荷" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "负电荷" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "减少一个原子的电荷" + +#: ../plugins/paint/atoms/plugin.cc:64 +#, fuzzy +msgid "Electron Pair" +msgstr "电子对工具" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "为原子增加一对电子" + +#: ../plugins/paint/atoms/plugin.cc:67 +#, fuzzy +msgid "Unpaired Electron" +msgstr "不成对电子工具" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "为原子增加一个不成对电子" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "" + +#: ../plugins/paint/bonds/bondtool.cc:354 +msgid "Invalid document tree, please file a bug report" +msgstr "文档树不存在,请写错误报告" + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "" +"If set, the number of new bonds will be evaluated from the mouse position" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "" + +#: ../plugins/paint/bonds/chaintool.cc:125 +#: ../plugins/paint/bonds/chaintool.cc:247 +#, fuzzy, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "方位: %g" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "在现有的基础上添加一个键或电荷" + +#: ../plugins/paint/bonds/plugin.cc:59 +#, fuzzy +msgid "Chain" +msgstr "主要" + +#: ../plugins/paint/bonds/plugin.cc:60 +#, fuzzy +msgid "Add a chain" +msgstr "增加一个环" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "楔形键工具" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "添加一个楔形键" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:71 +#, fuzzy +msgid "Fore bond tool" +msgstr "楔形键工具" + +#: ../plugins/paint/bonds/plugin.cc:72 +#, fuzzy +msgid "Add a fore bond" +msgstr "添加一个楔形键" + +#: ../plugins/paint/bonds/plugin.cc:74 +#, fuzzy +msgid "Delocalized bond tool" +msgstr "楔形键工具" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +#, fuzzy +msgid "Cycle _Size" +msgstr "环大小:" + +#: ../plugins/paint/cycles/plugin.cc:54 +#, fuzzy +msgid "Three atoms cycle" +msgstr "三元环工具" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "增加一个三元环" + +#: ../plugins/paint/cycles/plugin.cc:57 +#, fuzzy +msgid "Four atoms cycle" +msgstr "四元环工具" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "增加一个四元环" + +#: ../plugins/paint/cycles/plugin.cc:60 +#, fuzzy +msgid "Five atoms cycle" +msgstr "四元环工具" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "增加一个五元环" + +#: ../plugins/paint/cycles/plugin.cc:63 +#, fuzzy +msgid "Six atoms cycle" +msgstr "四元环工具" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "增加一个六元环" + +#: ../plugins/paint/cycles/plugin.cc:66 +#, fuzzy +msgid "Seven atoms cycle" +msgstr "三元环工具" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "增加一个七元环" + +#: ../plugins/paint/cycles/plugin.cc:69 +#, fuzzy +msgid "Eight atoms cycle" +msgstr "三元环工具" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "增加一个八元环" + +#: ../plugins/paint/cycles/plugin.cc:72 +#, fuzzy +msgid "Variable sized cycle" +msgstr "不同大小的环工具" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "增加一个环" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "" + +#: ../plugins/paint/residues/plugin.cc:105 +#, fuzzy +msgid "Create new abbreviations" +msgstr "创建一个新反应" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +#, fuzzy +msgid "Please, provide only one molecule." +msgstr "请提供一个对象。" + +#: ../plugins/paint/residues/residues-dlg.cc:232 +#, fuzzy +msgid "Please, provide a name for the residue" +msgstr "请提供一个对象。" + +#. Symbols longer than 8 chars are not currently allowed +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "New" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +#, fuzzy +msgid "\"New\" is not a valid symbol" +msgstr "不存在的符号。" + +#: ../plugins/paint/residues/residues-dlg.cc:265 +#, fuzzy +msgid "Please provide at least one symbol" +msgstr "请提供一个对象。" + +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:287 +#, fuzzy +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "有错误发生,请写错误报告。" + +#: ../plugins/paint/residues/residues.glade.h:1 +msgid "Formula" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:4 +#, fuzzy +msgid "Residues" +msgstr "核苷" + +#: ../plugins/paint/residues/residues.glade.h:5 +msgid "_Generic" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-delete" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:11 +msgid "gtk-save" +msgstr "" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "组属性..." + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "对齐" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "距离" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "组合或对齐选择的对象" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" +"普通\n" +"向上\n" +"垂直中间\n" +"向下\n" +"向左\n" +"中间\n" +"向右" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "组合(_G)" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "选择" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "选择一个或多个对象" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "删除" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "橡皮" + +#: ../plugins/paint/selection/selectiontool.cc:368 +msgid "Creation failed!" +msgstr "创建失败!" + +#: ../plugins/paint/selection/selectiontool.cc:392 +msgid "Group and/or align objects" +msgstr "给对象分组或对齐" + +#: ../plugins/paint/selection/selectiontool.cc:430 +msgid "Horizontal flip" +msgstr "水平翻转" + +#: ../plugins/paint/selection/selectiontool.cc:431 +msgid "Flip the selection horizontally" +msgstr "对选择做水平翻转" + +#: ../plugins/paint/selection/selectiontool.cc:432 +msgid "Vertical flip" +msgstr "垂直翻转" + +#: ../plugins/paint/selection/selectiontool.cc:433 +msgid "Flip the selection vertically" +msgstr "对选择做垂直翻转" + +#: ../plugins/paint/selection/selectiontool.cc:434 +msgid "Merge" +msgstr "合并" + +#: ../plugins/paint/selection/selectiontool.cc:435 +msgid "Merge two molecules" +msgstr "合并两个分子" + +#: ../plugins/paint/selection/selectiontool.cc:439 +#, fuzzy +msgid "_Rotate" +msgstr "旋转" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Rotate the selection" +msgstr "旋转所选部分" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "新模板" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "目录(_C)" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "姓名(_N)" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "模板" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "使用或管理模板" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "" + +#: ../plugins/paint/templates/templates.glade.h:1 +#, fuzzy +msgid "No selected template" +msgstr "新模板" + +#: ../plugins/paint/templates/templates.glade.h:2 +#, fuzzy +msgid "_Templates" +msgstr "模板" + +#: ../plugins/paint/templates/templates.glade.h:3 +#, fuzzy +msgid "category" +msgstr "目录(_C)" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "请提供一个对象。" + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "请给一个名字。" + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "请选择一个目录。" + +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:6 +#, fuzzy +msgid "Stri_kethrough" +msgstr "删除线" + +#: ../plugins/paint/text/fontsel.glade.h:7 +#, fuzzy +msgid "_Color:" +msgstr "关闭(_C)" + +#: ../plugins/paint/text/fontsel.glade.h:8 +#, fuzzy +msgid "_Family:" +msgstr "文件(_F)" + +#: ../plugins/paint/text/fontsel.glade.h:9 +msgid "_Position:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:10 +#, fuzzy +msgid "_Style:" +msgstr "标题:" + +#: ../plugins/paint/text/fontsel.glade.h:11 +#, fuzzy +msgid "_Underline:" +msgstr "下划线" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "增加或修改一个文本" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "增加或修改一组原子" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "" + +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +msgid "GChem3D Viewer" +msgstr "" + +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "对不起,格式不支持!" + +#: ../programs/3d/main.cc:44 +#, fuzzy +msgid "GChem3d Viewer version: " +msgstr "GChemPaint 控件" + +#: ../programs/3d/main.cc:55 +msgid "Prints GChem3d Viewer version" +msgstr "" + +#: ../programs/3d/main.cc:56 +msgid "Background color: white, black or #rrggbb (default is black)" +msgstr "" + +#: ../programs/3d/main.cc:57 +msgid "" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" +msgstr "" + +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 +#, fuzzy +msgid " [file]" +msgstr "[文件...]" + +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 +#, c-format +msgid "Invalid or misplaced argument: %s\n" +msgstr "参数不存在或位置有误:%s\n" + +#: ../programs/3d/window.cc:129 +#, fuzzy +msgid "GChem3D is a molecular structures viewer for Gnome" +msgstr "GChemPaint 是一个在 Gnome 下的 2D 化学结构式编辑器" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/3d/window.cc:131 +#, fuzzy +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "(C) 2001-2005 Jean Bréfort" + +#: ../programs/3d/window.cc:181 +#, fuzzy +msgid "Print the current scene" +msgstr "打印当前文件" + +#: ../programs/3d/window.cc:185 +#, fuzzy +msgid "Quit GChem3D" +msgstr "退出 GchemPaint" + +#: ../programs/3d/window.cc:189 +msgid "View help for the Molecules Viewer" +msgstr "" + +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:320 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:166 +#: ../programs/table/gchemtable-curve.cc:233 +#, fuzzy +msgid "Gnome Chemistry Utils on the _web" +msgstr "网上 GChemPaint(_w)" + +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:321 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:167 +#: ../programs/table/gchemtable-curve.cc:234 +#, fuzzy +msgid "Browse the Gnome Chemistry Utils's web site" +msgstr "浏览 GChemPaint 网站" + +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:325 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 +#, fuzzy +msgid "Ask a question about the Gnome Chemistry Utils" +msgstr "提有关 GchemPaint 的问题" + +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:327 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:240 +#, fuzzy +msgid "Submit a bug report for the Gnome Chemistry Utils" +msgstr "向 GchemPaint 提错误报告" + +#: ../programs/3d/window.cc:199 +#, fuzzy +msgid "About GChem3D" +msgstr "关于 GchemPaint" + +#: ../programs/3d/window.cc:203 +msgid "Balls and sticks" +msgstr "" + +#: ../programs/3d/window.cc:204 +msgid "Display a balls and sticks model" +msgstr "" + +#: ../programs/3d/window.cc:206 +msgid "Space filling" +msgstr "" + +#: ../programs/3d/window.cc:207 +msgid "Display a space filling model" +msgstr "" + +#: ../programs/3d/window.cc:209 +#, fuzzy +msgid "Cylinders" +msgstr "环" + +#: ../programs/3d/window.cc:210 +msgid "Display a cylinders model" +msgstr "" + +#: ../programs/3d/window.cc:212 +msgid "Wireframe" +msgstr "" + +#: ../programs/3d/window.cc:213 +msgid "Display a wireframe model" +msgstr "" + +#: ../programs/3d/window.cc:271 +msgid "Background color" +msgstr "背景色" + +#: ../programs/3d/window.cc:272 +#, fuzzy +msgid "Choose a new background color" +msgstr "背景色" + +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:429 +#: ../programs/spectra/window.cc:257 +msgid "Open recent" +msgstr "" + +#: ../programs/3d/gchem3d.desktop.in.in.h:1 +#, fuzzy +msgid "Display chemical 3D structures" +msgstr "编辑 2D 化学结构" + +#: ../programs/3d/gchem3d.desktop.in.in.h:2 +msgid "Molecules Viewer @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:301 +msgid "GChemCalc is a simple calculator for chemists" +msgstr "" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/calc/gchemcalc.cc:303 +#, fuzzy +msgid "Copyright © 2005-2007 Jean Bréfort\n" +msgstr "(C) 2001-2005 Jean Bréfort" + +#: ../programs/calc/gchemcalc.cc:619 +#, fuzzy +msgid "Quit GChemCalc" +msgstr "退出 GchemPaint" + +#: ../programs/calc/gchemcalc.cc:623 +msgid "_Mode" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:626 +#, fuzzy +msgid "View help for the Chemical Calculator" +msgstr "查看 GchemPaint 的帮助文件" + +#: ../programs/calc/gchemcalc.cc:636 +#, fuzzy +msgid "About GChemCalc" +msgstr "关于 GchemPaint" + +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:643 +#, fuzzy +msgid "_Atom" +msgstr "原子" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:646 +#, fuzzy +msgid "_Nickname" +msgstr "姓名(_N)" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:688 +#, fuzzy +msgid "GChemCalc Calculator version: " +msgstr "GChemPaint 控件" + +#: ../programs/calc/gchemcalc.cc:714 +msgid " [formula]" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:731 +msgid "For usage see: gchemcalc-unstable [-?|--help]" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:777 +#, fuzzy +msgid "Element" +msgstr "元素工具" + +#: ../programs/calc/gchemcalc.cc:784 +msgid "Mass %" +msgstr "" + +#: ../programs/calc/gchemcalc.desktop.in.in.h:1 +msgid "A simple calculator for chemistry" +msgstr "" + +#: ../programs/calc/gchemcalc.desktop.in.in.h:2 +msgid "Chemical calculator @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/crystal/gcrystal.desktop.in.in.h:1 +#, fuzzy +msgid "Edit and display crystalline structures" +msgstr "编辑 2D 化学结构" + +#: ../programs/crystal/gcrystal.desktop.in.in.h:2 +msgid "Gnome Crystal Crystalline Structures Viewer @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:1 +#, fuzzy +msgid "Background color blue value" +msgstr "背景色" + +#: ../programs/crystal/gcrystal.schemas.in.h:2 +#, fuzzy +msgid "Background color green value" +msgstr "背景色" + +#: ../programs/crystal/gcrystal.schemas.in.h:3 +#, fuzzy +msgid "Background color red value" +msgstr "背景色" + +#: ../programs/crystal/gcrystal.schemas.in.h:4 +msgid "" +"Blue value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:5 +msgid "" +"Default Euler's nutation angle for model display. Acceptable values are 0. " +"to + 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:6 +msgid "" +"Default Euler's precession angle for model display. Acceptable values are -" +"180. to + 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:7 +msgid "" +"Default Euler's spin angle for model display. Acceptable values are -180. to " +"+ 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:8 +msgid "Default field of view" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:9 +msgid "Default nutation" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:10 +msgid "Default precession" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:11 +msgid "Default spin" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:12 +msgid "Field of view used by default for the model display." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:13 +msgid "" +"Green value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:14 +msgid "Printing resolution" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:15 +msgid "Printing resolution if not automatically detected." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:16 +msgid "" +"Red value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/application.cc:58 +#, fuzzy, c-format +msgid "Untitled%d" +msgstr "无标题 %d" + +#: ../programs/crystal/application.cc:318 +#, c-format +msgid "" +"\"%s\" has been modified since last saving. Do you wish to come back to " +"saved version?" +msgstr "" + +#. Note for translators: c.n. is for coordination number +#: ../programs/crystal/atomsdlg.cc:624 +msgid " c.n.=" +msgstr "" + +#: ../programs/crystal/atomsdlg.cc:630 +msgid "low spin" +msgstr "" + +#: ../programs/crystal/atomsdlg.cc:630 +msgid "high spin" +msgstr "" + +#: ../programs/crystal/atomsdlg.cc:632 +msgid "Database" +msgstr "" + +#: ../programs/crystal/celldlg.cc:141 +msgid "The sum of the three angles must be less than 360°" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:128 +msgid "Planes cleaved" +msgstr "" + +#: ../programs/crystal/document.cc:271 +#, fuzzy, c-format +msgid "" +"Could not save file\n" +"%s" +msgstr "" +"不能打开文件\n" +"%s" + +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:180 +#, fuzzy +msgid "Single" +msgstr "丝氨酸" + +#: ../programs/crystal/main.cc:88 +#, fuzzy +msgid "Gnome Chemistry Utils version: " +msgstr "GChemPaint 控件" + +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 +msgid " [file...]" +msgstr "[文件...]" + +#: ../programs/crystal/window.cc:142 ../programs/crystal/window.cc:394 +msgid "Gnome Crystal" +msgstr "" + +#: ../programs/crystal/window.cc:145 +#, fuzzy +msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" +msgstr "GChemPaint 是一个在 Gnome 下的 2D 化学结构式编辑器" + +#: ../programs/crystal/window.cc:146 +#, fuzzy +msgid "Copyright © 1999-2007 by Jean Bréfort" +msgstr "(C) 2001-2005 Jean Bréfort" + +#: ../programs/crystal/window.cc:294 +msgid "Quit Gnome Crystal" +msgstr "" + +#: ../programs/crystal/window.cc:296 +#, fuzzy +msgid "Prefere_nces..." +msgstr "属性...(_r)" + +#: ../programs/crystal/window.cc:298 +msgid "_Crystal" +msgstr "" + +#: ../programs/crystal/window.cc:299 +msgid "_Lattice..." +msgstr "" + +#: ../programs/crystal/window.cc:300 +msgid "Define the lattice" +msgstr "" + +#: ../programs/crystal/window.cc:301 +#, fuzzy +msgid "_Atoms..." +msgstr "原子" + +#: ../programs/crystal/window.cc:302 +#, fuzzy +msgid "Add or edit atoms" +msgstr "增加或修改一个原子" + +#: ../programs/crystal/window.cc:303 +msgid "_Bonds and lines..." +msgstr "" + +#: ../programs/crystal/window.cc:304 +msgid "Add or edit bonds and lines" +msgstr "" + +#: ../programs/crystal/window.cc:305 +#, fuzzy +msgid "_Size..." +msgstr "打开...(_O)" + +#: ../programs/crystal/window.cc:306 +msgid "Define size" +msgstr "" + +#: ../programs/crystal/window.cc:307 +msgid "_Cleavages..." +msgstr "" + +#: ../programs/crystal/window.cc:308 +msgid "Add or edit cleavages to remove some planes" +msgstr "" + +#: ../programs/crystal/window.cc:310 +msgid "View _settings..." +msgstr "" + +#: ../programs/crystal/window.cc:311 +msgid "Choose background color and model position" +msgstr "" + +#: ../programs/crystal/window.cc:313 +#, fuzzy +msgid "Create new _window" +msgstr "创建一个新文件" + +#: ../programs/crystal/window.cc:314 +#, fuzzy +msgid "Create a new window" +msgstr "创建一个新文件" + +#: ../programs/crystal/window.cc:315 +#, fuzzy +msgid "_Close this window" +msgstr "显示工具窗口" + +#: ../programs/crystal/window.cc:316 +#, fuzzy +msgid "Close the current window" +msgstr "关闭当前文件" + +#: ../programs/crystal/window.cc:319 +#, fuzzy +msgid "View help for Gnome Crystal" +msgstr "查看 GchemPaint 的帮助文件" + +#: ../programs/crystal/window.cc:329 +msgid "About Gnome Crystal" +msgstr "" + +#: ../programs/paint/gchempaint.desktop.in.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "编辑 2D 化学结构" + +#: ../programs/paint/gchempaint.desktop.in.in.h:2 +#, fuzzy +msgid "GChemPaint Chemical Structures Editor @STABILITY_POSTFIX@" +msgstr "GChemPaint 是一个在 Gnome 下的 2D 化学结构式编辑器 (不稳定)" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "" +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:10 +msgid "Default arrow length" +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "" +"Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "" +"Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:20 +msgid "Default charge sign size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format +msgid "" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:46 +msgid "Default hash line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:47 +msgid "Default hash lines distance." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:53 +#, fuzzy +msgid "Default padding around arrows." +msgstr "请添加缺少的箭头。" + +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:66 +msgid "Default text font size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:68 +msgid "Default text font style." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:69 +msgid "Default text font variant." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:72 +msgid "Default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:88 +#, fuzzy +msgid "Whether the periodic table is tearable." +msgstr "显示元素周期表" + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "" + +#: ../programs/paint/main.cc:46 +#, fuzzy +msgid "GChemPaint version: " +msgstr "GChemPaint 控件" + +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" +msgstr "" + +#: ../programs/spectra/gspectrum.desktop.in.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "" + +#: ../programs/spectra/gspectrum.desktop.in.in.h:2 +msgid "Spectrum viewer @STABILITY_POSTFIX@" +msgstr "" + +#: ../programs/spectra/window.cc:124 +msgid "GSpectrum is a spectrum viewer for Gnome" +msgstr "" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/spectra/window.cc:126 +#, fuzzy +msgid "Copyright © 2007 Jean Bréfort\n" +msgstr "(C) 2001-2005 Jean Bréfort" + +#: ../programs/spectra/window.cc:180 +msgid "Quit GSpectrum" +msgstr "" + +#: ../programs/spectra/window.cc:186 +#, fuzzy +msgid "View help for the Spetra Viewer" +msgstr "查看 GchemPaint 的帮助文件" + +#: ../programs/spectra/window.cc:196 +msgid "About GSpectrum" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:135 +msgid "New _Chart" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:136 +#, fuzzy +msgid "Create a new chart" +msgstr "创建一个新反应" + +#: ../programs/table/gchemtable-app.cc:138 +#: ../programs/table/gchemtable-curve.cc:224 +#, fuzzy +msgid "Quit GChemTable" +msgstr "退出 GchemPaint" + +#: ../programs/table/gchemtable-app.cc:140 +msgid "Color scheme" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:141 +msgid "No colors" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:142 +msgid "Use default Gtk theme colors" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:144 +msgid "Use default symbolic element colors" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:145 +msgid "Physical states" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:146 +msgid "Use colors to display physical state at a given temperature" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:149 +msgid "Use colors to display the family grouping of the elements" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:151 +msgid "Acidity" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:152 +#, fuzzy +msgid "Use colors to display the acidity of the elements" +msgstr "元素周期表" + +#: ../programs/table/gchemtable-app.cc:154 +#, fuzzy +msgid "Electronegativity" +msgstr "电子对工具" + +#: ../programs/table/gchemtable-app.cc:155 +msgid "Use colors to display the electronegativity of the elements" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:157 +msgid "Atomic radius" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:158 +#, fuzzy +msgid "Use colors to display the covalent radii of the elements" +msgstr "元素周期表" + +#: ../programs/table/gchemtable-app.cc:160 +msgid "Block" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:161 +msgid "Use colors to display the blocks elements belong to" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:165 +#: ../programs/table/gchemtable-curve.cc:230 +#, fuzzy +msgid "View help for the Periodic Table" +msgstr "查看 GchemPaint 的帮助文件" + +#: ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:242 +#, fuzzy +msgid "About GChemTable" +msgstr "关于 GchemPaint" + +#: ../programs/table/gchemtable-app.cc:343 +#, fuzzy +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "显示元素周期表" + +#. const gchar * documentors[] = {NULL}; +#: ../programs/table/gchemtable-app.cc:345 +#, fuzzy +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "(C) 2001-2005 Jean Bréfort" + +#. The markup at the end of the chain is there to ensure that +#. things will be correcly aligned, add the same to the translated string +#: ../programs/table/gchemtable-elt.cc:61 +msgid "Electronic configuration: " +msgstr "" + +#: ../programs/table/gchemtable-elt.cc:73 +msgid "Lang" +msgstr "" + +#: ../programs/table/gchemtable-elt.cc:80 +#, fuzzy +msgid "Name" +msgstr "姓名(_N)" + +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 +msgid "n.a." +msgstr "" + +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 +#, c-format +msgid "%d:" +msgstr "" + +#: ../programs/table/gchemtable-elt.cc:271 +msgid "Ion" +msgstr "" + +#. C.N. stands for coordination number +#: ../programs/table/gchemtable-elt.cc:278 +msgid "C.N." +msgstr "" + +#: ../programs/table/gchemtable-elt.cc:283 +#, fuzzy +msgid "Spin" +msgstr "丝氨酸" + +#: ../programs/table/gchemtable-elt.cc:290 +#, fuzzy +msgid "Value" +msgstr "缬氨酸" + +#: ../programs/table/gchemtable-elt.cc:310 +msgid "Low" +msgstr "" + +#: ../programs/table/gchemtable-elt.cc:313 +msgid "High" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:220 +#, fuzzy +msgid "Modify the graph properties" +msgstr "改变文件的属性" + +#: ../programs/table/gchemtable-curve.cc:232 +#, fuzzy +msgid "View help for the Curve Window" +msgstr "查看 GchemPaint 的帮助文件" + +#: ../programs/table/gchemtable-curve.cc:324 +#: ../programs/table/gchemtable-curve.cc:328 +#: ../programs/table/gchemtable-data.cc:524 +msgid "Pauling electronegativity" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:340 +#, fuzzy +msgid "Electron affinity (kJ/mol)" +msgstr "电子对工具" + +#: ../programs/table/gchemtable-curve.cc:344 +#, fuzzy +msgid "Electron affinity" +msgstr "电子对工具" + +#: ../programs/table/gchemtable-curve.cc:358 +msgid "1st. " +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:361 +msgid "2nd. " +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:364 +msgid "3rd. " +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:367 +#, c-format +msgid "%dth. " +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:370 +msgid "ionization energy (MJ/mol)" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:377 +msgid "ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:396 +#: ../programs/table/gchemtable-curve.cc:400 +msgid "Covalent radii" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:416 +#: ../programs/table/gchemtable-curve.cc:420 +msgid "Van der Waals radii" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:436 +#: ../programs/table/gchemtable-curve.cc:440 +msgid "Metallic radii" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:451 +#: ../programs/table/gchemtable-curve.cc:455 +#, fuzzy +msgid "Melting point" +msgstr "蛋氨酸" + +#: ../programs/table/gchemtable-curve.cc:466 +#: ../programs/table/gchemtable-curve.cc:470 +msgid "Boiling point" +msgstr "" + +#: ../programs/table/gchemtable-curve.cc:485 +#: ../programs/table/gchemtable-data.cc:522 +msgid "Atomic number" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +#, fuzzy +msgid "Invalide data" +msgstr "不存在的电荷。" + +#. FIXME: we might know the errors +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +msgid "None" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:523 +#, fuzzy +msgid "Atomic mass" +msgstr "原子" + +#: ../programs/table/gchemtable-data.cc:525 +msgid "First ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:526 +msgid "Second ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:527 +msgid "Third ionization energy" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:528 +#, fuzzy +msgid "Electronic affinity" +msgstr "电子对工具" + +#: ../programs/table/gchemtable-data.cc:529 +msgid "Covalent radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:530 +msgid "Van der Waals radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:531 +msgid "Metallic radius" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Fusion temperature" +msgstr "" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Ebullition temperature" +msgstr "" + +#: ../programs/table/gchemtable.desktop.in.in.h:1 +#, fuzzy +msgid "A Mendeleiev table of the chemical elements" +msgstr "元素周期表" + +#: ../programs/table/gchemtable.desktop.in.in.h:2 +#, fuzzy +msgid "Periodic table of the elements @STABILITY_POSTFIX@" +msgstr "元素周期表" + +#: ../templates/paint/haworth.xml.in.h:1 +msgid "Saccharides" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:2 +#, fuzzy +msgid "α-D-deoxyribofuranose" +msgstr "脱氧鸟苷" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:7 +#, fuzzy +msgid "β-D-deoxyribofuranose" +msgstr "脱氧鸟苷" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:1 +#, fuzzy +msgid "Adenine" +msgstr "下划线" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "氨基酸" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "蒽" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "精氨酸" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "芳烃" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "天冬酰胺" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "天冬胺酸" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "甘菊环" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "苯" + +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "半胱氨酸" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "胞苷" + +#: ../templates/paint/templates.xml.in.h:14 +#, fuzzy +msgid "Cytosine" +msgstr "胞嘧啶" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "脱氧腺苷" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "脱氧胞苷" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "脱氧鸟苷" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "脱氧胸苷" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "谷氨酸" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "谷氨酰胺" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "甘氨酸" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "鸟嘌呤" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "鸟苷" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "组氨酸" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "异亮氨酸" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "亮氨酸" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "赖氨酸" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "蛋氨酸" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "萘" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "核苷" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "菲" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "苯丙氨酸" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "脯氨酸" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "芘" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "丝氨酸" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "苏氨酸" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "胸腺嘧啶" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "色氨酸" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "酪氨酸" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "尿嘧啶" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "尿苷" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "缬氨酸" + +#~ msgid "GChemPaint component" +#~ msgstr "GChemPaint 组件" + +#~ msgid "GChemPaint component to draw 2D chemical formulas" +#~ msgstr "画 2D 化学式的 GchemPaint 组件" + +#~ msgid "GChemPaint control" +#~ msgstr "GChemPaint 控件" + +#~ msgid "GChemPaint control to display 2D chemical formulas" +#~ msgstr "显示 2D 化学式的 GChemPaint" + +#~ msgid "GChemPaint document" +#~ msgstr "GChemPaint 文档" + +#~ msgid "GChemPaint embeddable factory" +#~ msgstr "GChemPaint 嵌入式工厂" + +#~ msgid "GChemPaint help contents" +#~ msgstr "GChemPaint 帮助内容" + +#~ msgid "Paste the clipborad" +#~ msgstr "从剪贴板粘贴" + +#~ msgid "_Save All" +#~ msgstr "全部保存(_S)" + +#~ msgid "Save all open files" +#~ msgstr "保存所有打开的文件" + +#~ msgid "_Close All" +#~ msgstr "全部关闭(_C)" + +#~ msgid "Close all open files" +#~ msgstr "关闭所有打开的文件" + +#~ msgid "_Periodic table" +#~ msgstr "周期表(_P)" + +#~ msgid "Reversible reaction arrows heads" +#~ msgstr "可逆反应箭头" + +#~ msgid "Tools Options" +#~ msgstr "工具选项" + +#~ msgid "GChemPaint Templates" +#~ msgstr "GChemPaint 模板" + +#~ msgid "Arrows toolbar" +#~ msgstr "箭头工具条" + +#~ msgid "Double arrow tool" +#~ msgstr "双箭头工具" + +#~ msgid "Mesomery arrow tool" +#~ msgstr "内消旋箭头工具" + +#~ msgid "Retrosynthesis arrow tool" +#~ msgstr "逆合成箭头工具" + +#~ msgid "Simple arrow tool" +#~ msgstr "单箭头工具" + +#~ msgid "Atoms toolbar" +#~ msgstr "原子工具条" + +#~ msgid "Negative Charge tool" +#~ msgstr "负电荷工具" + +#~ msgid "Positive Charge tool" +#~ msgstr "正电荷工具" + +#~ msgid "Bond tool" +#~ msgstr "键工具" + +#~ msgid "Bonds toolbar" +#~ msgstr "键工具条" + +#~ msgid "Wedge bond" +#~ msgstr "楔形键" + +#~ msgid "Cycles toolbar" +#~ msgstr "环工具" + +#~ msgid "Eraser tool" +#~ msgstr "橡皮工具" + +#~ msgid "Horizontal flip tool" +#~ msgstr "水平翻转工具" + +#~ msgid "Merge molecules tool" +#~ msgstr "合并分子工具" + +#~ msgid "Selection tool" +#~ msgstr "选择工具" + +#~ msgid "Selection toolbar" +#~ msgstr "选择工具条" + +#~ msgid "Vertical flip tool" +#~ msgstr "垂直翻转工具" + +#~ msgid "Change current template" +#~ msgstr "改变当前模板" + +#~ msgid "Templates selector" +#~ msgstr "模板选择器" + +#~ msgid "Templates tool" +#~ msgstr "模板工具" + +#~ msgid "Templates toolbar" +#~ msgstr "模板工具条" + +#~ msgid "Fragment" +#~ msgstr "片断" + +#~ msgid "Fragment tool" +#~ msgstr "片断工具" + +#~ msgid "Subscript" +#~ msgstr "下标" + +#~ msgid "Superscript" +#~ msgstr "上标" + +#~ msgid "Text tool" +#~ msgstr "文本工具" + +#~ msgid "Text toolbar" +#~ msgstr "文本工具条" + +#~ msgid "About GChemPaint..." +#~ msgstr "关于 GchemPaint" + +#~ msgid "Displays copyright and contributors of GChemPaint" +#~ msgstr "显示 GChemPaint 版权信息和参与人" + +#~ msgid "Edit file propeties" +#~ msgstr "编辑文件属性" + +#~ msgid "GChemPaint T_ools" +#~ msgstr "GChemPaint 工具(_o)" + +#~ msgid "Print file to the printer" +#~ msgstr "打印文件" + +#~ msgid "Proper_ties" +#~ msgstr "属性(_t)" + +#~ msgid "_Print" +#~ msgstr "打印(_P)" diff -Nru gnome-chemistry-utils-0.8.6/po/zh_TW.po gnome-chemistry-utils-0.10.9/po/zh_TW.po --- gnome-chemistry-utils-0.8.6/po/zh_TW.po 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/po/zh_TW.po 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,4804 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-11-18 07:22+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Traditional Chinese in Taiwan\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gchemutils.schemas.in.h:1 +msgid "Default Bottom Margin" +msgstr "預設下端邊界" + +#: ../gchemutils.schemas.in.h:2 +msgid "Default Left Margin" +msgstr "預設左邊邊界" + +#: ../gchemutils.schemas.in.h:3 +msgid "Default Top Margin" +msgstr "預設上端邊界" + +#: ../gchemutils.schemas.in.h:4 +msgid "Default Top Outside Margin" +msgstr "預設上邊界 " + +#: ../gchemutils.schemas.in.h:5 +msgid "Footer height" +msgstr "頁尾高度" + +#: ../gchemutils.schemas.in.h:6 +msgid "Off screen rendering" +msgstr "離開編譯螢幕" + +#: ../gchemutils.schemas.in.h:7 +msgid "Paper" +msgstr "紙張" + +#: ../gchemutils.schemas.in.h:8 +msgid "Preferred Display Unit" +msgstr "首選的顯示裝置" + +#: ../gchemutils.schemas.in.h:9 +msgid "This is the default paper orientation." +msgstr "這是預設紙張的方向" + +#: ../gchemutils.schemas.in.h:10 +msgid "" +"This is the default paper specification like iso_a4 or na_letter, i.e. a PWG " +"5101.1-2002 paper name." +msgstr "" + +#: ../gchemutils.schemas.in.h:11 +msgid "This string gives the default unit to be used in the page setup dialog." +msgstr "這個附加條件傳達預設裝置在這個頁面被使用的設定" + +#: ../gchemutils.schemas.in.h:12 +msgid "This value gives the default footer height number of points." +msgstr "這個數值傳達預設頁尾高度的位置" + +#: ../gchemutils.schemas.in.h:13 +msgid "This value gives the default header height number of points." +msgstr "這個數值傳達預設頁首高度的位置" + +#: ../gchemutils.schemas.in.h:14 +msgid "" +"This value gives the default number of points from the bottom of a page to " +"the end of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:15 +msgid "" +"This value gives the default number of points from the left of a page to the " +"left of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:16 +msgid "" +"This value gives the default number of points from the right of a page to " +"the right of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:17 +msgid "" +"This value gives the default number of points from the top of a page to the " +"start of the body." +msgstr "" + +#: ../gchemutils.schemas.in.h:18 +msgid "" +"Whether to use off-screen rendering when printing or exporting as an image. " +"Setting it to true might lead to a crash with some video cards drivers." +msgstr "" + +#: ../gchemutils.xml.in.h:1 ../programs/paint/x-gchempaint.desktop.in.h:1 +msgid "2D Chemical structure" +msgstr "2D Chemical structure (平面化學結構檔)" + +#: ../gchemutils.xml.in.h:2 ../programs/crystal/x-gcrystal.desktop.in.h:1 +msgid "Crystalline structure model" +msgstr "晶體結構模型" + +#: ../database/residues.xml.in.h:1 +msgid "Acetyl" +msgstr "Acetyl 乙醯基" + +#: ../database/residues.xml.in.h:2 +msgid "Alkyl" +msgstr "Alkyl 烴基" + +#: ../database/residues.xml.in.h:3 +msgid "Aryl" +msgstr "Aryl 芳香基" + +#: ../database/residues.xml.in.h:4 +msgid "Benzoyl" +msgstr "Benzoyl 苯甲醯基" + +#: ../database/residues.xml.in.h:5 +msgid "Benzyl" +msgstr "Benzyl 苯甲基" + +#: ../database/residues.xml.in.h:6 +msgid "Butyl" +msgstr "Butyl 丁基" + +#: ../database/residues.xml.in.h:7 +msgid "Ethyl" +msgstr "Ethyl 乙基" + +#: ../database/residues.xml.in.h:8 +msgid "Halogen" +msgstr "Halogen 鹵素" + +#: ../database/residues.xml.in.h:9 +msgid "Isobutyl" +msgstr "Isobutyl 異丁基" + +#: ../database/residues.xml.in.h:10 +msgid "Isopropyl" +msgstr "Isopropyl 異丙基" + +#: ../database/residues.xml.in.h:11 +msgid "Mesyl" +msgstr "Mesyl 甲磺醯基" + +#: ../database/residues.xml.in.h:12 +msgid "Metal" +msgstr "Metal 金屬" + +#: ../database/residues.xml.in.h:13 +msgid "Methyl" +msgstr "Methyl 甲基" + +#: ../database/residues.xml.in.h:14 +msgid "Phenyl" +msgstr "Phenyl 苯基" + +#: ../database/residues.xml.in.h:15 +msgid "Propyl" +msgstr "Propyl 丙基" + +#: ../database/residues.xml.in.h:16 +msgid "Tosyl" +msgstr "Tosyl 甲苯磺醯基" + +#: ../database/residues.xml.in.h:17 +msgid "Triflyl" +msgstr "Triflyl" + +#: ../database/residues.xml.in.h:18 +msgid "sec-Butyl" +msgstr "sec-Butyl 第二丁基/二級丁基" + +#: ../glade/gchemcalc.glade.h:1 +msgid "Chemical calculator" +msgstr "化學計算機" + +#: ../glade/gchemcalc.glade.h:2 +msgid "Composition" +msgstr "化學組成" + +#: ../glade/gchemcalc.glade.h:3 ../programs/calc/gchemcalc.cc:341 +msgid "Formula:" +msgstr "化學式:" + +#: ../glade/gchemcalc.glade.h:4 +msgid "Isotopic Pattern" +msgstr "同位素組成" + +#: ../glade/gchemcalc.glade.h:5 +msgid "Molecular weight:" +msgstr "分子量" + +#: ../glade/gchemcalc.glade.h:6 +msgid "Monoisotopic mass:" +msgstr "單同位素質量" + +#: ../glade/gchemcalc.glade.h:7 ../programs/calc/gchemcalc.cc:344 +msgid "Raw formula:" +msgstr "簡單式" + +#: ../glade/gtkperiodic.glade.h:1 +msgid "Actinides" +msgstr "Actinides 錒族元素" + +#: ../glade/gtkperiodic.glade.h:2 +msgid "Lanthanides" +msgstr "Lanthanides 鑭系元素" + +#: ../glade/image-size.glade.h:1 +msgid "Height:" +msgstr "高度:" + +#: ../glade/image-size.glade.h:2 +msgid "Width:" +msgstr "寬度:" + +#: ../glade/image-resolution.glade.h:1 +msgid "Image resolution:" +msgstr "影像解析度:" + +#: ../glade/print-setup.glade.h:2 +#, no-c-format +msgid "% of normal size" +msgstr "% 的正常大小" + +#: ../glade/print-setup.glade.h:3 +msgid "Center on page:" +msgstr "置於頁面中央:" + +#: ../glade/print-setup.glade.h:4 +msgid "O_rientation:" +msgstr "方向(_R):" + +#: ../glade/print-setup.glade.h:5 +msgid "Paper:" +msgstr "紙張:" + +#: ../glade/print-setup.glade.h:6 +msgid "Scale" +msgstr "調整大小" + +#: ../glade/print-setup.glade.h:7 +msgid "Bottom margin:" +msgstr "底緣:" + +#: ../glade/print-setup.glade.h:8 +msgid "Change Paper Type" +msgstr "更改紙張類型" + +#: ../glade/print-setup.glade.h:9 +msgid "Configure" +msgstr "設定" + +#: ../glade/print-setup.glade.h:10 +msgid "Fi_rst page number:" +msgstr "第一頁頁碼(_R):" + +#: ../glade/print-setup.glade.h:11 +msgid "Footer:" +msgstr "頁尾" + +#: ../glade/print-setup.glade.h:12 +msgid "Header:" +msgstr "標頭:" + +#: ../glade/print-setup.glade.h:13 +msgid "Headers and Footers" +msgstr "頁頭與頁尾" + +#: ../glade/print-setup.glade.h:14 +msgid "Landscape" +msgstr "景色" + +#: ../glade/print-setup.glade.h:15 +msgid "Left margin:" +msgstr "左邊距:" + +#: ../glade/print-setup.glade.h:16 +msgid "Page" +msgstr "頁 " + +#: ../glade/print-setup.glade.h:17 +msgid "Page Setup" +msgstr "頁面設定" + +#: ../glade/print-setup.glade.h:18 +msgid "Portrait" +msgstr "頁面設定為直向" + +#: ../glade/print-setup.glade.h:19 +msgid "Reload defaults" +msgstr "重新預設" + +#: ../glade/print-setup.glade.h:20 +msgid "Reverse landscape" +msgstr "景色相反" + +#: ../glade/print-setup.glade.h:21 +msgid "Reverse portrait" +msgstr "畫像相反" + +#: ../glade/print-setup.glade.h:22 +msgid "Right margin:" +msgstr "右邊界" + +#: ../glade/print-setup.glade.h:23 +msgid "Save as defaults" +msgstr "保留預設" + +#: ../glade/print-setup.glade.h:24 +msgid "Scale" +msgstr "比例" + +#: ../glade/print-setup.glade.h:25 +msgid "Scale to fit _horizontally on" +msgstr "在適合的水平比例上" + +#: ../glade/print-setup.glade.h:26 +msgid "Scale to fit _vertically on" +msgstr "在適合的垂直比例上" + +#: ../glade/print-setup.glade.h:27 +msgid "Top margin:" +msgstr "上邊界" + +#: ../glade/print-setup.glade.h:28 +msgid "Unit:" +msgstr "裝置:" + +#: ../glade/print-setup.glade.h:29 +msgid "_Automatic scaling:" +msgstr "自動縮放比例" + +#: ../glade/print-setup.glade.h:30 +msgid "_Fixed scaling:" +msgstr "固定的縮放比例" + +#: ../glade/print-setup.glade.h:31 +msgid "_Footer:" +msgstr "頁尾:" + +#: ../glade/print-setup.glade.h:32 +msgid "_Header:" +msgstr "頁首:" + +#: ../glade/print-setup.glade.h:33 +msgid "_Horizontally" +msgstr "水平地" + +#: ../glade/print-setup.glade.h:34 +msgid "_No scaling" +msgstr "不縮放" + +#: ../glade/print-setup.glade.h:35 +msgid "_Vertically" +msgstr "垂直地" + +#: ../glade/print-setup.glade.h:36 +msgid "page(s)" +msgstr "頁" + +#: ../glade/crystal/bonds.glade.h:1 ../libs/gcp/preferences.cc:439 +#: ../libs/gcp/preferences.cc:513 ../libs/gcp/preferences.cc:563 +msgid "Bonds" +msgstr "Bonds 鍵" + +#: ../glade/crystal/cell.glade.h:1 +msgid "Cell" +msgstr "晶格" + +#: ../glade/crystal/cell.glade.h:2 +msgid "Cell parameters" +msgstr "晶格參數" + +#: ../glade/crystal/cell.glade.h:3 +msgid "Lattice:" +msgstr "晶格" + +#: ../glade/crystal/cell.glade.h:4 +msgid "" +"Simple cubic\n" +"Body-centered cubic\n" +"Face-centered cubic\n" +"Hexagonal\n" +"Tetragonal\n" +"Body-centered tetragonal\n" +"Orthorhombic\n" +"Base-centered orthorhombic\n" +"Body-centered orthorhombic\n" +"Face-centered orthorhombic\n" +"Rhombohedral\n" +"Monoclinic\n" +"Base-centered monoclinic\n" +"Triclinic" +msgstr "" +"Simple cubic (簡單立方)\n " +"Body-centered cubic (體心立方)\n " +"Face-centered cubic (面心立方)\n " +"Hexagonal (六方堆積/六方最密堆積)\n " +"Tetragonal (四方晶系)\n " +"Body-centered tetragonal (體心四方)\n " +"Orthorhombic (斜方晶系)\n " +"Base-centered orthorhombic (底心斜方)\n " +"Body-centered orthorhombic (體心斜方)\n " +"Face-centered orthorhombic (面心斜方)\n " +"Rhombohedral (菱形晶系)\n " +"Monoclinic (單斜晶系)\n " +"Base-centered monoclinic (底心單斜)\n " +"Triclinic (三斜晶系)" + +#: ../glade/crystal/cell.glade.h:18 +msgid "a (pm): " +msgstr "a (pm): " + +#: ../glade/crystal/cell.glade.h:19 +msgid "b (pm):" +msgstr "b (pm):" + +#: ../glade/crystal/cell.glade.h:20 +msgid "c (pm):" +msgstr "c (pm):" + +#: ../glade/crystal/cell.glade.h:21 +msgid "α (°):" +msgstr "α (°):" + +#: ../glade/crystal/cell.glade.h:22 +msgid "β (°):" +msgstr "β (°):" + +#: ../glade/crystal/cell.glade.h:23 +msgid "γ (°):" +msgstr "γ (°):" + +#: ../glade/crystal/docprop.glade.h:1 ../glade/paint/docprop.glade.h:1 +msgid "Author:" +msgstr "作者:" + +#: ../glade/crystal/docprop.glade.h:2 ../glade/paint/docprop.glade.h:2 +msgid "History" +msgstr "歷史記錄" + +#: ../glade/crystal/docprop.glade.h:3 ../glade/paint/docprop.glade.h:4 +msgid "_Comments:" +msgstr "評論:" + +#: ../glade/crystal/docprop.glade.h:4 ../glade/paint/docprop.glade.h:5 +msgid "Creation date:" +msgstr "建立日期" + +#: ../glade/crystal/docprop.glade.h:5 ../glade/paint/docprop.glade.h:6 +msgid "Document properties" +msgstr "檔案性質" + +#: ../glade/crystal/docprop.glade.h:6 ../glade/paint/docprop.glade.h:7 +msgid "E-_mail:" +msgstr "E-_mail:" + +#: ../glade/crystal/docprop.glade.h:7 ../glade/paint/docprop.glade.h:8 +msgid "Revision date:" +msgstr "修正日期:" + +#: ../glade/crystal/docprop.glade.h:8 ../glade/paint/docprop.glade.h:10 +msgid "_Name:" +msgstr "名稱:" + +#: ../glade/crystal/docprop.glade.h:9 ../glade/paint/docprop.glade.h:11 +msgid "_Title:" +msgstr "標題:" + +#: ../glade/crystal/prefs.glade.h:1 +msgid "" +"300\n" +"360\n" +"600\n" +"720\n" +"1200\n" +"1440\n" +"2400\n" +"2880\n" +"Other" +msgstr "" + +#: ../glade/crystal/prefs.glade.h:10 +msgid "" +"A printer resolution of 300 dpi generally gives a quite acceptable result. " +"Changing to a higher value can lead to a much longer processing time." +msgstr "基本上將列印品質設在 300 dpi 可得到可接受的結果. 若調高解析度將可能會需要更多的時間進行列印." + +#: ../glade/crystal/prefs.glade.h:11 ../glade/crystal/view-settings.glade.h:1 +msgid "Background color:" +msgstr "背景顏色:" + +#: ../glade/crystal/prefs.glade.h:12 +msgid "Default views settings" +msgstr "預設的瀏覽裝置:" + +#: ../glade/crystal/prefs.glade.h:13 ../glade/crystal/view-settings.glade.h:2 +msgid "Euler's angles" +msgstr "尤拉角" + +#: ../glade/crystal/prefs.glade.h:14 ../glade/crystal/view-settings.glade.h:3 +msgid "Field of view (between 1 and 45°):" +msgstr "視野角度(介於 1 到 45 度之間)" + +#: ../glade/crystal/prefs.glade.h:15 ../glade/crystal/view-settings.glade.h:4 +msgid "Model orientation in space:" +msgstr "空間中模型的位向" + +#: ../glade/crystal/prefs.glade.h:16 +msgid "Printer resolution:" +msgstr "列印解析度:" + +#: ../glade/crystal/prefs.glade.h:17 +msgid "Printing" +msgstr "列印數量" + +#: ../glade/crystal/prefs.glade.h:18 ../glade/crystal/view-settings.glade.h:5 +msgid "θ (°):" +msgstr "θ (°):" + +#: ../glade/crystal/prefs.glade.h:19 ../glade/crystal/view-settings.glade.h:6 +msgid "φ (°):" +msgstr "φ (°):" + +#: ../glade/crystal/prefs.glade.h:20 ../glade/crystal/view-settings.glade.h:7 +msgid "ψ (°):" +msgstr "ψ (°):" + +#: ../glade/crystal/atoms.glade.h:1 +msgid "Apply changes to:" +msgstr "申請變動:" + +#: ../glade/crystal/atoms.glade.h:2 ../libs/gcp/preferences.cc:427 +#: ../libs/gcp/preferences.cc:501 ../libs/gcp/preferences.cc:551 +msgid "Atoms" +msgstr "原子" + +#: ../glade/crystal/atoms.glade.h:3 +msgid "Charge: " +msgstr "電荷:" + +#: ../glade/crystal/atoms.glade.h:4 +msgid "Custom" +msgstr "自訂的" + +#: ../glade/crystal/atoms.glade.h:5 +msgid "Custom color:" +msgstr "自訂的色彩:" + +#: ../glade/crystal/atoms.glade.h:6 ../glade/crystal/cleavages.glade.h:2 +#: ../glade/crystal/lines.glade.h:2 +msgid "Dele_te all" +msgstr "刪除全部" + +#: ../glade/crystal/atoms.glade.h:7 ../libs/gcu/gtkcomboperiodic.c:96 +#: ../programs/table/gchemtable-app.cc:267 +msgid "Periodic table of the elements" +msgstr "週期表上的元素" + +#: ../glade/crystal/atoms.glade.h:8 +msgid "Radius" +msgstr "半徑" + +#: ../glade/crystal/atoms.glade.h:9 +msgid "Scale factor:" +msgstr "比例係數" + +#: ../glade/crystal/atoms.glade.h:10 +msgid "" +"Selected element\n" +"Selected atom\n" +"All atoms" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:13 +msgid "Type:" +msgstr "樣式:" + +#: ../glade/crystal/atoms.glade.h:14 +msgid "" +"Unknown\n" +"Ionic\n" +"Metallic\n" +"Covalent\n" +"Van der Waals" +msgstr "" + +#: ../glade/crystal/atoms.glade.h:19 +msgid "Value (pm):" +msgstr "計算結果(pm):" + +#: ../glade/crystal/atoms.glade.h:20 ../glade/crystal/cleavages.glade.h:5 +#: ../glade/crystal/lines.glade.h:7 +msgid "_Add" +msgstr "新增(_A)" + +#: ../glade/crystal/atoms.glade.h:21 ../glade/crystal/cleavages.glade.h:6 +#: ../glade/crystal/lines.glade.h:8 +msgid "_Delete" +msgstr "刪除(_D)" + +#: ../glade/crystal/cleavages.glade.h:1 +msgid "Cleavages" +msgstr "分裂" + +#: ../glade/crystal/cleavages.glade.h:3 +msgid "Fixed model size" +msgstr "固定的樣式大小" + +#: ../glade/crystal/cleavages.glade.h:4 +msgid "List of defined cleavages (h, k, and l are the Miller indices)" +msgstr "被定義的分裂名單(h,k,和l是 Miller 索引)" + +#: ../glade/crystal/lines.glade.h:1 +msgid "Cell edges" +msgstr "晶格邊" + +#: ../glade/crystal/lines.glade.h:3 +msgid "Diagonals" +msgstr "對角" + +#: ../glade/crystal/lines.glade.h:4 +msgid "Lines" +msgstr "線條" + +#: ../glade/crystal/lines.glade.h:5 +msgid "Medians" +msgstr "中線" + +#: ../glade/crystal/lines.glade.h:6 +msgid "Other lines" +msgstr "其他線條" + +#: ../glade/crystal/lines.glade.h:9 +msgid "color:" +msgstr "色彩:" + +#: ../glade/crystal/lines.glade.h:10 +msgid "radius (pm):" +msgstr "半徑 (pm):" + +#: ../glade/crystal/size.glade.h:1 +#: ../plugins/paint/templates/new-template.glade.h:1 +msgid "*" +msgstr "*" + +#: ../glade/crystal/size.glade.h:2 +msgid "Crystal size" +msgstr "晶體大小" + +#: ../glade/crystal/size.glade.h:3 +msgid "Give minimum and maximum coordinates in cell units" +msgstr "給單位晶格最小和最大的座標" + +#: ../glade/crystal/size.glade.h:4 +msgid "Maximum" +msgstr "最大" + +#: ../glade/crystal/size.glade.h:5 +msgid "Minimum" +msgstr "最小" + +#: ../glade/crystal/size.glade.h:6 ../programs/crystal/atomsdlg.cc:144 +msgid "x" +msgstr "x" + +#: ../glade/crystal/size.glade.h:7 ../programs/crystal/atomsdlg.cc:154 +msgid "y" +msgstr "y" + +#: ../glade/crystal/size.glade.h:8 ../programs/crystal/atomsdlg.cc:164 +msgid "z" +msgstr "z" + +#: ../glade/paint/arrow-object.glade.h:1 +msgid "Arrow associated object" +msgstr "箭頭關聯的物件" + +#: ../glade/paint/arrow-object.glade.h:2 +msgid "_Role:" +msgstr "作用:" + +#: ../glade/paint/arrow-object.glade.h:3 +msgid "gtk-close" +msgstr "gtk-關閉" + +#: ../glade/paint/arrow-object.glade.h:4 ../glade/paint/newfiledlg.glade.h:5 +msgid "gtk-help" +msgstr "gtk-求助" + +#: ../glade/paint/docprop.glade.h:3 +msgid "Theme" +msgstr "題目" + +#: ../glade/paint/docprop.glade.h:9 ../glade/paint/newfiledlg.glade.h:2 +msgid "Theme:" +msgstr "題目:" + +#: ../glade/paint/H-pos.glade.h:1 ../libs/gcp/atom.cc:1881 +msgid "Hydrogen atoms position" +msgstr "氫原子位置" + +#: ../glade/paint/H-pos.glade.h:2 +msgid "" +"Left\n" +"Right\n" +"Top\n" +"Bottom\n" +"Auto" +msgstr "" + +#: ../glade/paint/newfiledlg.glade.h:1 +msgid "New file with theme" +msgstr "新增檔案及主題" + +#: ../glade/paint/newfiledlg.glade.h:3 +msgid "gtk-apply" +msgstr "gtk-申請" + +#: ../glade/paint/newfiledlg.glade.h:4 +msgid "gtk-cancel" +msgstr "gtk-取消" + +#: ../glade/paint/preferences.glade.h:1 +msgid "Arrow heads" +msgstr "箭頭前端" + +#: ../glade/paint/preferences.glade.h:2 +msgid "Normal bonds" +msgstr "標準連結" + +#: ../glade/paint/preferences.glade.h:3 +msgid "Stereochemical bonds" +msgstr "立體化學的鍵" + +#: ../glade/paint/preferences.glade.h:4 +msgid "Themes" +msgstr "題目" + +#: ../glade/paint/preferences.glade.h:5 +msgid "A:" +msgstr "A:" + +#: ../glade/paint/preferences.glade.h:6 +msgid "Angl_e:" +msgstr "角度:" + +#: ../glade/paint/preferences.glade.h:7 +msgid "Arrow line width (in pixels)." +msgstr "箭頭線的寬度 (像素)." + +#: ../glade/paint/preferences.glade.h:8 +msgid "B:" +msgstr "B:" + +#: ../glade/paint/preferences.glade.h:9 +msgid "Bond line width (in pixels)." +msgstr "鍵的寬度 (像素)" + +#: ../glade/paint/preferences.glade.h:10 +msgid "C:" +msgstr "C:" + +#: ../glade/paint/preferences.glade.h:11 +msgid "Charge _sign size:" +msgstr "電荷符號大小:" + +#: ../glade/paint/preferences.glade.h:12 +msgid "Default Compression _Level For GChemPaint Files:" +msgstr "內設 GChemPaint 檔案的壓縮參數:" + +#: ../glade/paint/preferences.glade.h:13 +msgid "Default angle between two consecutive bonds in a chain." +msgstr "" + +#: ../glade/paint/preferences.glade.h:14 +msgid "Default arrow length (in pm just like bond lengths)." +msgstr "內設箭頭長度 (單位是 pm, 如同鍵的長度)." + +#: ../glade/paint/preferences.glade.h:15 +msgid "Default bond length (pm)." +msgstr "內設的鍵長度 (pm)." + +#: ../glade/paint/preferences.glade.h:16 +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation." +msgstr "" + +#: ../glade/paint/preferences.glade.h:17 +msgid "Dist_ance:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:18 +msgid "Distance between hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:19 +msgid "Distance in pixels between two lines representing a multiple bond." +msgstr "" + +#: ../glade/paint/preferences.glade.h:20 +msgid "" +"Distance in pixels between two parallel lines (either two arrows or one " +"arrow with two lines)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:21 +msgid "Distance in pixels from tip of arrowhead to center." +msgstr "" + +#: ../glade/paint/preferences.glade.h:22 +msgid "" +"Distance in pixels from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:23 +msgid "Distance in pixels of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../glade/paint/preferences.glade.h:24 +msgid "" +"Extra padding between a stoichiometric coefficient and its associated " +"molecule in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:25 +msgid "GChemPaint Preferences" +msgstr "GChemPaint 偏好設定" + +#: ../glade/paint/preferences.glade.h:26 +msgid "General _padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:27 +msgid "Ha_sh width:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:28 +msgid "Ha_ve a tearable table of the elements" +msgstr "" + +#: ../glade/paint/preferences.glade.h:29 +msgid "Len_gth:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:30 +#: ../plugins/paint/residues/residues.glade.h:3 +msgid "N_ame:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:31 +msgid "Padding added at each end of an arrow (in pixels)." +msgstr "" + +#: ../glade/paint/preferences.glade.h:32 +msgid "" +"Padding between a '+' sign in a reaction equation and reactants symbols in " +"pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:33 +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:34 +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel." +msgstr "" + +#: ../glade/paint/preferences.glade.h:35 +msgid "Si_gn padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:36 +msgid "Size of the charge sign in pixels." +msgstr "電荷符號的大小 (像素)" + +#: ../glade/paint/preferences.glade.h:37 +msgid "Stoichio_metry padding:" +msgstr "" + +#: ../glade/paint/preferences.glade.h:38 +msgid "Wid_th" +msgstr "" + +#: ../glade/paint/preferences.glade.h:39 +msgid "Width in pixels at the largest end." +msgstr "已達像素寬度的最大極限" + +#: ../glade/paint/preferences.glade.h:40 +msgid "Width of hashes in pixels." +msgstr "" + +#: ../glade/paint/preferences.glade.h:41 +msgid "_Default theme:" +msgstr "預設主題" + +#: ../glade/paint/preferences.glade.h:42 +msgid "_Distance:" +msgstr "距離;" + +#: ../glade/paint/preferences.glade.h:43 +msgid "_Object padding:" +msgstr "_填充目標:" + +#: ../glade/paint/preferences.glade.h:44 +msgid "_Padding:" +msgstr "_填充" + +#: ../glade/paint/preferences.glade.h:45 +msgid "_Scale:" +msgstr "縮放值 (數字越大圖形越小):" + +#: ../glade/paint/preferences.glade.h:46 +msgid "_Width:" +msgstr "寬度:" + +#: ../glade/paint/tools.glade.h:1 +msgid "_Current element:" +msgstr "目前設定為繪圖的元素" + +#: ../glade/paint/zoom.glade.h:1 +msgid "Zoom" +msgstr "" + +#: ../glade/paint/zoom.glade.h:3 +#, no-c-format +msgid "Zoom factor (%):" +msgstr "" + +#: ../glade/table/acidity.glade.h:1 +msgid "Basic" +msgstr "" + +#: ../glade/table/acidity.glade.h:2 +msgid "Neutral" +msgstr "" + +#: ../glade/table/acidity.glade.h:3 +msgid "Amphoteric" +msgstr "" + +#: ../glade/table/acidity.glade.h:4 +msgid "Acidic" +msgstr "" + +#: ../glade/table/eltpage.glade.h:1 +msgid "1:" +msgstr "1:" + +#: ../glade/table/eltpage.glade.h:2 +msgid "Atomic number:" +msgstr "Atomic number 原子序:" + +#: ../glade/table/eltpage.glade.h:3 +msgid "Atomic weight:" +msgstr "Atomic weight 原子量:" + +#: ../glade/table/eltpage.glade.h:4 +msgid "Boiling point:" +msgstr "Boiling point 沸點:" + +#: ../glade/table/eltpage.glade.h:5 +msgid "Covalent:" +msgstr "Covalent 共價:" + +#: ../glade/table/eltpage.glade.h:6 +msgid "Electronic affinities:" +msgstr "Electronic affinities 電子親和力:" + +#: ../glade/table/eltpage.glade.h:7 +msgid "Electronic properties" +msgstr "電子相關資訊" + +#: ../glade/table/eltpage.glade.h:8 +msgid "Ionic radii (Shannon and Prewitt):" +msgstr "Ionic radii (Shannon and Prewitt) 離子半徑:" + +#: ../glade/table/eltpage.glade.h:9 +msgid "Ionization energies:" +msgstr "Ionization energies 游離能:" + +#: ../glade/table/eltpage.glade.h:10 +msgid "Isotopes" +msgstr "Isotopes 同位素" + +#: ../glade/table/eltpage.glade.h:11 +msgid "Main" +msgstr "主要資訊" + +#: ../glade/table/eltpage.glade.h:12 +msgid "Melting point:" +msgstr "Melting point 熔點:" + +#: ../glade/table/eltpage.glade.h:13 +msgid "Metallic:" +msgstr "Metallic 金屬:" + +#: ../glade/table/eltpage.glade.h:14 +msgid "Pauling electronegativity:" +msgstr "Pauling electronegativity 鮑林電負度/陰電性 :" + +#: ../glade/table/eltpage.glade.h:15 +msgid "Radii" +msgstr "Radii 半徑" + +#: ../glade/table/eltpage.glade.h:16 ../programs/table/gchemtable-elt.cc:130 +msgid "Show curve" +msgstr "顯示趨勢圖" + +#: ../glade/table/eltpage.glade.h:17 +msgid "Thermodynamics" +msgstr "Thermodynamics 熱力學" + +#: ../glade/table/eltpage.glade.h:18 +msgid "Van der Waals:" +msgstr "Van der Waals 凡得瓦:" + +#: ../glade/table/state-thermometer.glade.h:1 +msgid " Solid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:2 +msgid " Liquid " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:3 +msgid " Gas " +msgstr "" + +#: ../glade/table/state-thermometer.glade.h:4 +msgid "Temperature (K):" +msgstr "Temperature 溫度 (K):" + +#: ../glade/table/curve.glade.h:1 +msgid "GChemTable Graph" +msgstr "" + +#: ../glade/table/family.glade.h:1 +msgid "" +"All\n" +"Alkali Metals\n" +"Alkaline Earths Metals\n" +"Halogenes\n" +"Metalloids\n" +"Noble Gases\n" +"Non-Metals\n" +"Rare Earths Metals\n" +"Transition Metals\n" +"Other Metals\n" +msgstr "" +"All 全部\n " +"Alkali Metals 鹼金族\n " +"Alkaline Earths Metals 鹼土族\n " +"Halogenes 鹵素\n " +"Metalloids 類金屬\n " +"Noble Gases\n " +"Non-Metals\n " +"Rare Earths Metals\n " +"Transition Metals\n " +"Other Metals\n" + +#: ../glade/table/family.glade.h:12 +msgid "Selected Family:" +msgstr "選擇的家族:" + +#: ../glade/table/block.glade.h:1 +msgid "" +" s block " +msgstr "" + +#: ../glade/table/block.glade.h:2 +msgid "" +" d block " +msgstr "" + +#: ../glade/table/block.glade.h:3 +msgid "" +" p block " +msgstr "" + +#: ../glade/table/block.glade.h:4 +msgid "" +" f block " +msgstr "" + +#: ../database/elements.xml.in.h:1 +msgid "Actinium" +msgstr "錒_Actinium" + +#: ../database/elements.xml.in.h:2 +msgid "Aluminum" +msgstr "鋁_Aluminum" + +#: ../database/elements.xml.in.h:3 +msgid "Americium" +msgstr "鋂_Americium" + +#: ../database/elements.xml.in.h:4 +msgid "Antimony" +msgstr "銻_Antimony" + +#: ../database/elements.xml.in.h:5 +msgid "Argon" +msgstr "氬_Argon" + +#: ../database/elements.xml.in.h:6 +msgid "Arsenic" +msgstr "砷_Arsenic" + +#: ../database/elements.xml.in.h:7 +msgid "Astatine" +msgstr "砈_Astatine" + +#: ../database/elements.xml.in.h:8 +msgid "Barium" +msgstr "鋇_Barium" + +#: ../database/elements.xml.in.h:9 +msgid "Berkelium" +msgstr "鉳_Berkelium" + +#: ../database/elements.xml.in.h:10 +msgid "Beryllium" +msgstr "鈹_Beryllium" + +#: ../database/elements.xml.in.h:11 +msgid "Bismuth" +msgstr "鉍_Bismuth" + +#: ../database/elements.xml.in.h:12 +msgid "Bohrium" +msgstr "" + +#: ../database/elements.xml.in.h:13 +msgid "Boron" +msgstr "硼_Boron" + +#: ../database/elements.xml.in.h:14 +msgid "Bromine" +msgstr "溴_Bromine" + +#: ../database/elements.xml.in.h:15 +msgid "Cadmium" +msgstr "鎘_Cadmium" + +#: ../database/elements.xml.in.h:16 +msgid "Caesium" +msgstr "銫_Caesium" + +#: ../database/elements.xml.in.h:17 +msgid "Calcium" +msgstr "鈣_Calcium" + +#: ../database/elements.xml.in.h:18 +msgid "Californium" +msgstr "鉲_Californium" + +#: ../database/elements.xml.in.h:19 +msgid "Carbon" +msgstr "碳_Carbon" + +#: ../database/elements.xml.in.h:20 +msgid "Cerium" +msgstr "鈰_Cerium" + +#: ../database/elements.xml.in.h:21 +msgid "Chlorine" +msgstr "氯_Chlorine" + +#: ../database/elements.xml.in.h:22 +msgid "Chromium" +msgstr "鉻_Chromium" + +#: ../database/elements.xml.in.h:23 +msgid "Cobalt" +msgstr "鈷_Cobalt" + +#: ../database/elements.xml.in.h:24 +msgid "Copper" +msgstr "銅_Copper" + +#: ../database/elements.xml.in.h:25 +msgid "Curium" +msgstr "鋦_Curium" + +#: ../database/elements.xml.in.h:26 +msgid "Darmstadtium" +msgstr "" + +#: ../database/elements.xml.in.h:27 +msgid "Dubnium" +msgstr "" + +#: ../database/elements.xml.in.h:28 +msgid "Dysprosium" +msgstr "鏑_Dysprosium" + +#: ../database/elements.xml.in.h:29 +msgid "Einsteinium" +msgstr "鑀_Einsteinium" + +#: ../database/elements.xml.in.h:30 +msgid "Erbium" +msgstr "鉺_Erbium" + +#: ../database/elements.xml.in.h:31 +msgid "Europium" +msgstr "銪_Europium" + +#: ../database/elements.xml.in.h:32 +msgid "Fermium" +msgstr "鐨_Fermium" + +#: ../database/elements.xml.in.h:33 +msgid "Fluorine" +msgstr "氟_Fluorine" + +#: ../database/elements.xml.in.h:34 +msgid "Francium" +msgstr "鍅_Francium" + +#: ../database/elements.xml.in.h:35 +msgid "Gadolinium" +msgstr "釓_Gadolinium" + +#: ../database/elements.xml.in.h:36 +msgid "Gallium" +msgstr "鎵_Gallium" + +#: ../database/elements.xml.in.h:37 +msgid "Germanium" +msgstr "鍺_Germanium" + +#: ../database/elements.xml.in.h:38 +msgid "Gold" +msgstr "金_Gold" + +#: ../database/elements.xml.in.h:39 +msgid "Hafnium" +msgstr "鉿_Hafnium" + +#: ../database/elements.xml.in.h:40 +msgid "Hassium" +msgstr "" + +#: ../database/elements.xml.in.h:41 +msgid "Helium" +msgstr "氦_Helium" + +#: ../database/elements.xml.in.h:42 +msgid "Holmium" +msgstr "鈥_Holmium" + +#: ../database/elements.xml.in.h:43 +msgid "Hydrogen" +msgstr "氫_Hydrogen" + +#: ../database/elements.xml.in.h:44 +msgid "Indium" +msgstr "銦_Indium" + +#: ../database/elements.xml.in.h:45 +msgid "Iodine" +msgstr "碘_Iodine" + +#: ../database/elements.xml.in.h:46 +msgid "Iridium" +msgstr "銥_Iridium" + +#: ../database/elements.xml.in.h:47 +msgid "Iron" +msgstr "鐵_Iron" + +#: ../database/elements.xml.in.h:48 +msgid "Krypton" +msgstr "氪_Krypton" + +#: ../database/elements.xml.in.h:49 +msgid "Lanthanum" +msgstr "鑭_Lanthanum" + +#: ../database/elements.xml.in.h:50 +msgid "Lawrencium" +msgstr "鐒_Lawrencium" + +#: ../database/elements.xml.in.h:51 +msgid "Lead" +msgstr "鉛_Lead" + +#: ../database/elements.xml.in.h:52 +msgid "Lithium" +msgstr "鋰_Lithium" + +#: ../database/elements.xml.in.h:53 +msgid "Lutetium" +msgstr "鎦_Lutetium" + +#: ../database/elements.xml.in.h:54 +msgid "Magnesium" +msgstr "鎂_Magnesium" + +#: ../database/elements.xml.in.h:55 +msgid "Manganese" +msgstr "錳_Manganese" + +#: ../database/elements.xml.in.h:56 +msgid "Meitnerium" +msgstr "" + +#: ../database/elements.xml.in.h:57 +msgid "Mendelevium" +msgstr "鍆_Mendelevium" + +#: ../database/elements.xml.in.h:58 +msgid "Mercury" +msgstr "汞_Mercury" + +#: ../database/elements.xml.in.h:59 +msgid "Molybdenum" +msgstr "鉬_Molybdenum" + +#: ../database/elements.xml.in.h:60 +msgid "Neodymium" +msgstr "釹_Neodymium" + +#: ../database/elements.xml.in.h:61 +msgid "Neon" +msgstr "氖_Neon" + +#: ../database/elements.xml.in.h:62 +msgid "Neptunium" +msgstr "錼_Neptunium" + +#: ../database/elements.xml.in.h:63 +msgid "Nickel" +msgstr "鎳_Nickel" + +#: ../database/elements.xml.in.h:64 +msgid "Niobium" +msgstr "鈮_Niobium" + +#: ../database/elements.xml.in.h:65 +msgid "Nitrogen" +msgstr "氮_Nitrogen" + +#: ../database/elements.xml.in.h:66 +msgid "Nobelium" +msgstr "鍩_Nobelium" + +#: ../database/elements.xml.in.h:67 +msgid "Osmium" +msgstr "鋨_Osmium" + +#: ../database/elements.xml.in.h:68 +msgid "Oxygen" +msgstr "氧_Oxygen" + +#: ../database/elements.xml.in.h:69 +msgid "Palladium" +msgstr "鈀_Palladium" + +#: ../database/elements.xml.in.h:70 +msgid "Phosphorus" +msgstr "磷_Phosphorus" + +#: ../database/elements.xml.in.h:71 +msgid "Platinum" +msgstr "鉑_Platinum" + +#: ../database/elements.xml.in.h:72 +msgid "Plutonium" +msgstr "鈽_Plutonium" + +#: ../database/elements.xml.in.h:73 +msgid "Polonium" +msgstr "釙_Polonium" + +#: ../database/elements.xml.in.h:74 +msgid "Potassium" +msgstr "鉀_Potassium" + +#: ../database/elements.xml.in.h:75 +msgid "Praseodymium" +msgstr "鐠_Praseodymium" + +#: ../database/elements.xml.in.h:76 +msgid "Promethium" +msgstr "鉅_Promethium" + +#: ../database/elements.xml.in.h:77 +msgid "Protactinium" +msgstr "鏷_Protactinium" + +#: ../database/elements.xml.in.h:78 +msgid "Radium" +msgstr "鐳_Radium" + +#: ../database/elements.xml.in.h:79 +msgid "Radon" +msgstr "氡_Radon" + +#: ../database/elements.xml.in.h:80 +msgid "Rhenium" +msgstr "錸_Rhenium" + +#: ../database/elements.xml.in.h:81 +msgid "Rhodium" +msgstr "銠_Rhodium" + +#: ../database/elements.xml.in.h:82 +msgid "Roentgenium" +msgstr "" + +#: ../database/elements.xml.in.h:83 +msgid "Rubidium" +msgstr "銣_Rubidium" + +#: ../database/elements.xml.in.h:84 +msgid "Ruthenium" +msgstr "釕_Ruthenium" + +#: ../database/elements.xml.in.h:85 +msgid "Rutherfordium" +msgstr "鑪_Rutherfordium" + +#: ../database/elements.xml.in.h:86 +msgid "Samarium" +msgstr "釤_Samarium" + +#: ../database/elements.xml.in.h:87 +msgid "Scandium" +msgstr "鈧_Scandium" + +#: ../database/elements.xml.in.h:88 +msgid "Seaborgium" +msgstr "" + +#: ../database/elements.xml.in.h:89 +msgid "Selenium" +msgstr "硒_Selenium" + +#: ../database/elements.xml.in.h:90 +msgid "Silicon" +msgstr "矽_Silicon" + +#: ../database/elements.xml.in.h:91 +msgid "Silver" +msgstr "銀_Silver" + +#: ../database/elements.xml.in.h:92 +msgid "Sodium" +msgstr "鈉_Sodium" + +#: ../database/elements.xml.in.h:93 +msgid "Strontium" +msgstr "鍶_Strontium" + +#: ../database/elements.xml.in.h:94 +msgid "Sulfur" +msgstr "硫_Sulfur" + +#: ../database/elements.xml.in.h:95 +msgid "Tantalum" +msgstr "鉭_Tantalum" + +#: ../database/elements.xml.in.h:96 +msgid "Technetium" +msgstr "鎝_Technetium" + +#: ../database/elements.xml.in.h:97 +msgid "Tellurium" +msgstr "碲_Tellurium" + +#: ../database/elements.xml.in.h:98 +msgid "Terbium" +msgstr "鋱_Terbium" + +#: ../database/elements.xml.in.h:99 +msgid "Thallium" +msgstr "鉈_Thallium" + +#: ../database/elements.xml.in.h:100 +msgid "Thorium" +msgstr "釷_Thorium" + +#: ../database/elements.xml.in.h:101 +msgid "Thulium" +msgstr "銩_Thulium" + +#: ../database/elements.xml.in.h:102 +msgid "Tin" +msgstr "錫_Tin" + +#: ../database/elements.xml.in.h:103 +msgid "Titanium" +msgstr "鈦_Titanium" + +#: ../database/elements.xml.in.h:104 +msgid "Tungsten" +msgstr "鎢_Tungsten" + +#: ../database/elements.xml.in.h:105 +msgid "Ununbium" +msgstr "" + +#: ../database/elements.xml.in.h:106 +msgid "Ununhexium" +msgstr "" + +#: ../database/elements.xml.in.h:107 +msgid "Ununpentium" +msgstr "" + +#: ../database/elements.xml.in.h:108 +msgid "Ununquadium" +msgstr "" + +#: ../database/elements.xml.in.h:109 +msgid "Ununtrium" +msgstr "" + +#: ../database/elements.xml.in.h:110 +msgid "Uranium" +msgstr "鈾 Uranium" + +#: ../database/elements.xml.in.h:111 +msgid "Vanadium" +msgstr "釩_Vanadium" + +#: ../database/elements.xml.in.h:112 +msgid "Xenon" +msgstr "氙_Xenon" + +#: ../database/elements.xml.in.h:113 +msgid "Ytterbium" +msgstr "鐿_Ytterbium" + +#: ../database/elements.xml.in.h:114 +msgid "Yttrium" +msgstr "釔_Yttrium" + +#: ../database/elements.xml.in.h:115 +msgid "Zinc" +msgstr "鋅_Zinc" + +#: ../database/elements.xml.in.h:116 +msgid "Zirconium" +msgstr "鋯_Zirconium" + +#: ../database/isotopes.xml.in.h:1 +msgid "deuterium" +msgstr "氘(重氫)_deuterium" + +#: ../database/isotopes.xml.in.h:2 +msgid "protium" +msgstr "氕 (氫)_protium" + +#: ../database/isotopes.xml.in.h:3 +msgid "tritium" +msgstr "氚(超重氫)_tritium" + +#: ../goffice/plugin.xml.in.h:1 +msgid "2D Chemical Structures Viewer/Editor" +msgstr "2D 化學結構編輯器" + +#: ../goffice/plugin.xml.in.h:2 +msgid "Chemical structures" +msgstr "化學結構" + +#: ../goffice/plugin.xml.in.h:3 +msgid "Chemical structures component engine" +msgstr "化學結構組合工具" + +#: ../goffice/plugin.xml.in.h:4 +msgid "Component : GChemPaint" +msgstr "" + +#: ../goffice/gogcpapp.cc:183 ../programs/paint/standaloneapp.cc:46 +#, c-format +msgid "Untitled %d" +msgstr "" + +#: ../goffice/gogcpwin.cc:88 +msgid "Embedded GChemPaint Object" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:367 +msgid "Layout" +msgstr "規劃" + +#: ../libs/canvas/gcp-canvas-pango.c:368 +msgid "Pango layout" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:375 +msgid "X" +msgstr "X" + +#: ../libs/canvas/gcp-canvas-pango.c:376 +msgid "X position" +msgstr "X 位置" + +#: ../libs/canvas/gcp-canvas-pango.c:383 +msgid "Y" +msgstr "Y" + +#: ../libs/canvas/gcp-canvas-pango.c:384 +msgid "Y position" +msgstr "Y 位置" + +#: ../libs/canvas/gcp-canvas-pango.c:391 +msgid "Width" +msgstr "寬度" + +#: ../libs/canvas/gcp-canvas-pango.c:392 +msgid "Width for text box" +msgstr "文字方塊的寬度" + +#: ../libs/canvas/gcp-canvas-pango.c:399 +msgid "Height" +msgstr "高度" + +#: ../libs/canvas/gcp-canvas-pango.c:400 +msgid "Height for text box" +msgstr "文字方塊的高度" + +#: ../libs/canvas/gcp-canvas-pango.c:407 +msgid "Anchor" +msgstr "固定" + +#: ../libs/canvas/gcp-canvas-pango.c:408 +msgid "Anchor point for text" +msgstr "本文的定位點" + +#: ../libs/canvas/gcp-canvas-pango.c:416 +msgid "Color" +msgstr "色彩" + +#: ../libs/canvas/gcp-canvas-pango.c:417 +msgid "Text color, as string" +msgstr "" + +#: ../libs/canvas/gcp-canvas-pango.c:424 +msgid "Editing" +msgstr "編輯" + +#: ../libs/canvas/gcp-canvas-pango.c:425 +msgid "Is this rich text item currently edited?" +msgstr "" + +#: ../libs/gcp/about.cc:49 ../programs/3d/window.cc:149 +#: ../programs/calc/gchemcalc.cc:321 ../programs/crystal/window.cc:145 +#: ../programs/spectra/window.cc:144 ../programs/table/gchemtable-app.cc:369 +msgid "translator_credits" +msgstr "" + +#: ../libs/gcp/about.cc:55 +msgid "GChemPaint is a 2D chemical structures editor for Gnome" +msgstr "GChempaint 是 Gnome 的平面化學繪圖軟體" + +#: ../libs/gcp/about.cc:56 +msgid "Copyright © 2001-2008 by Jean Bréfort" +msgstr "" + +#: ../libs/gcp/application.cc:303 +msgid "Create a new reaction" +msgstr "" + +#: ../libs/gcp/application.cc:310 +msgid "Create a new mesomery relationship" +msgstr "" + +#: ../libs/gcp/application.cc:512 ../libs/gcp/stringdlg.cc:102 +#: ../plugins/paint/wikipedia/wikipediatool.cc:79 +msgid "" +"Please enter a file name,\n" +"not a directory" +msgstr "" + +#: ../libs/gcp/application.cc:554 +#, c-format +msgid "" +"Sorry, format %s not supported!\n" +"Failed to load %s." +msgstr "" + +#: ../libs/gcp/application.cc:583 ../libs/gcp/stringdlg.cc:117 +#: ../plugins/paint/wikipedia/wikipediatool.cc:92 +#: ../programs/3d/application.cc:166 ../programs/calc/gchemcalc.cc:231 +#: ../programs/crystal/application.cc:214 +#: ../programs/spectra/application.cc:81 +#: ../programs/table/gchemtable-app.cc:683 +#, c-format +msgid "" +"File %s\n" +"exists, overwrite?" +msgstr "" + +#: ../libs/gcp/application.cc:596 ../libs/gcp/stringdlg.cc:131 +#: ../plugins/paint/wikipedia/wikipediatool.cc:104 +#: ../programs/crystal/application.cc:226 +#, c-format +msgid "" +"Error while processing %s:\n" +"%s" +msgstr "" + +#: ../libs/gcp/application.cc:804 ../libs/gcp/application.cc:932 +msgid "No filename" +msgstr "沒有檔名" + +#: ../libs/gcp/application.cc:807 +#, c-format +msgid "" +"Could not open file\n" +"%s" +msgstr "" + +#: ../libs/gcp/application.cc:810 ../libs/gcp/application.cc:944 +#, c-format +msgid "%s: parse error." +msgstr "" + +#: ../libs/gcp/application.cc:935 ../programs/crystal/document.cc:326 +#, c-format +msgid "" +"Could not load file\n" +"%s" +msgstr "" + +#: ../libs/gcp/application.cc:938 ../programs/crystal/document.cc:329 +#, c-format +msgid "" +"%s: invalid xml file.\n" +"Tree is empty?" +msgstr "" + +#: ../libs/gcp/application.cc:941 ../programs/crystal/document.cc:332 +#, c-format +msgid "%s: invalid file format." +msgstr "" + +#: ../libs/gcp/application.cc:976 ../programs/3d/application.cc:248 +#: ../programs/calc/gchemcalc.cc:221 ../programs/crystal/application.cc:112 +#: ../programs/spectra/application.cc:134 +#: ../programs/table/gchemtable-app.cc:672 +msgid "Save as image" +msgstr "存成影像檔" + +#: ../libs/gcp/atom.cc:1863 ../libs/gcp/atom.cc:1877 +#: ../plugins/paint/atoms/plugin.cc:55 ../programs/crystal/atomsdlg.cc:134 +msgid "Atom" +msgstr "原子" + +#: ../libs/gcp/atom.cc:1866 +msgid "Display symbol" +msgstr "顯示符號" + +#: ../libs/gcp/atom.cc:1866 +msgid "Whether to display carbon atom symbol or not" +msgstr "是否顯示碳原子符號? " + +#: ../libs/gcp/bond.cc:999 ../plugins/paint/bonds/plugin.cc:56 +msgid "Bond" +msgstr "" + +#: ../libs/gcp/bond.cc:1003 +msgid "Move to back" +msgstr "向後移動" + +#: ../libs/gcp/bond.cc:1010 +msgid "Bring to front" +msgstr "" + +#: ../libs/gcp/docprop.cc:118 ../libs/gcp/docprop.cc:125 +#: ../programs/crystal/docprop.cc:109 ../programs/crystal/docprop.cc:116 +msgid "%A, %B %d, %Y" +msgstr "" + +#: ../libs/gcp/fontsel.cc:287 ../programs/table/gchemtable-app.cc:154 +msgid "Family" +msgstr "族" + +#: ../libs/gcp/fontsel.cc:288 +msgid "Font family" +msgstr "字型系列" + +#: ../libs/gcp/fontsel.cc:291 +msgid "Style" +msgstr "樣式" + +#: ../libs/gcp/fontsel.cc:292 +msgid "The font style (normal, oblique or italic)" +msgstr "字型樣式(正常,斜體)" + +#: ../libs/gcp/fontsel.cc:296 +msgid "Weight" +msgstr "重量" + +#: ../libs/gcp/fontsel.cc:297 +msgid "The font weight" +msgstr "字型重量" + +#: ../libs/gcp/fontsel.cc:301 +msgid "Variant" +msgstr "變形" + +#: ../libs/gcp/fontsel.cc:302 +msgid "The font variant" +msgstr "字型變化" + +#: ../libs/gcp/fontsel.cc:306 +msgid "Stretch" +msgstr "伸展" + +#: ../libs/gcp/fontsel.cc:307 +msgid "The font stretch (condensed, normal or expanded)" +msgstr "字型伸縮(壓縮、正常、擴展)" + +#: ../libs/gcp/fontsel.cc:311 +msgid "Size" +msgstr "大小" + +#: ../libs/gcp/fontsel.cc:312 +msgid "The font size (in pango units)" +msgstr "" + +#: ../libs/gcp/fragment.cc:726 ../libs/gcp/fragment.cc:1316 +msgid "Invalid charge." +msgstr "無效的電荷" + +#: ../libs/gcp/fragment.cc:1289 +msgid "Invalid symbol." +msgstr "無效符號." + +#: ../libs/gcp/mesomer.cc:76 +msgid "Only one arrow can link two given mesomers." +msgstr "" + +#: ../libs/gcp/mesomery.cc:153 ../libs/gcp/mesomery.cc:531 +#: ../plugins/paint/arrows/retrosynthesis.cc:162 +msgid "Something wrong happened, please file a bug report." +msgstr "" + +#: ../libs/gcp/mesomery.cc:191 ../plugins/paint/arrows/retrosynthesis.cc:199 +msgid "No space left between molecule and arrow!" +msgstr "" + +#: ../libs/gcp/mesomery.cc:209 ../plugins/paint/arrows/retrosynthesis.cc:217 +msgid "Isolated arrows are not allowed!" +msgstr "" + +#: ../libs/gcp/mesomery.cc:223 ../plugins/paint/arrows/retrosynthesis.cc:232 +msgid "" +"Isolated molecule!\n" +" Please add missing arrows." +msgstr "" + +#: ../libs/gcp/mesomery.cc:228 +msgid "Please add missing arrows." +msgstr "" + +#: ../libs/gcp/mesomery.cc:751 +msgid "Destroy the mesomery relationship" +msgstr "" + +#: ../libs/gcp/molecule.cc:505 +msgid "Molecule" +msgstr "分子" + +#: ../libs/gcp/molecule.cc:511 +msgid "Export molecule to Ghemical" +msgstr "" + +#: ../libs/gcp/molecule.cc:518 +msgid "Generate InChI" +msgstr "" + +#: ../libs/gcp/molecule.cc:523 +msgid "NIST WebBook page for this molecule" +msgstr "" + +#: ../libs/gcp/molecule.cc:528 +msgid "PubChem page for this molecule" +msgstr "" + +#: ../libs/gcp/molecule.cc:534 +msgid "Generate SMILES" +msgstr "" + +#: ../libs/gcp/molecule.cc:539 +msgid "Open in Calculator" +msgstr "" + +#: ../libs/gcp/molecule.cc:547 +msgid "Select alignment item" +msgstr "" + +#: ../libs/gcp/preferences.cc:381 ../libs/gcp/preferences.cc:400 +#: ../libs/gcp/preferences.cc:529 ../libs/gcp/theme.cc:335 +#: ../libs/gcp/theme.cc:342 ../programs/table/gchemtable-app.cc:149 +msgid "Default" +msgstr "預設" + +#: ../libs/gcp/preferences.cc:421 ../libs/gcp/preferences.cc:490 +#: ../libs/gcp/preferences.cc:557 +msgid "General" +msgstr "一般的" + +#: ../libs/gcp/preferences.cc:431 ../libs/gcp/preferences.cc:505 +#: ../libs/gcp/preferences.cc:559 +msgid "Font" +msgstr "字型" + +#: ../libs/gcp/preferences.cc:435 ../libs/gcp/preferences.cc:509 +#: ../libs/gcp/preferences.cc:561 +msgid "Other" +msgstr "其他" + +#: ../libs/gcp/preferences.cc:443 ../libs/gcp/preferences.cc:517 +#: ../libs/gcp/preferences.cc:565 +msgid "Arrows" +msgstr "箭頭" + +#: ../libs/gcp/preferences.cc:447 ../libs/gcp/preferences.cc:521 +#: ../libs/gcp/preferences.cc:567 ../plugins/paint/text/plugin.cc:52 +msgid "Text" +msgstr "本文" + +#: ../libs/gcp/reactant.cc:80 +msgid "Add a stoichiometry coefficient" +msgstr "加入計量化學係數" + +#: ../libs/gcp/reaction.cc:135 ../libs/gcp/reaction.cc:208 +msgid "" +"Error could not build a reaction\n" +"from the selected objects." +msgstr "" + +#: ../libs/gcp/reaction.cc:376 +msgid "Destroy the reaction" +msgstr "" + +#: ../libs/gcp/reaction-arrow.cc:381 +msgid "Arrow" +msgstr "箭頭" + +#: ../libs/gcp/reaction-arrow.cc:387 +msgid "Attach selection to arrow..." +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:39 +msgid "Unkown" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:40 +msgid "Catalyst" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:41 +msgid "Reactant" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:42 +msgid "Product" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:43 +msgid "Solvent" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:44 +msgid "Temperature" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:45 +msgid "Pressure" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:46 +msgid "Time" +msgstr "" + +#: ../libs/gcp/reaction-prop.cc:47 +msgid "Enthalpy" +msgstr "" + +#: ../libs/gcp/stringdlg.cc:79 ../libs/gcu/filechooser.cc:43 +msgid "Save as" +msgstr "另存新檔" + +#: ../libs/gcp/stringdlg.cc:145 +#, c-format +msgid "" +"Could not open file %s, error was:\n" +"%s" +msgstr "" + +#: ../libs/gcp/stringdlg.cc:161 +#, c-format +msgid "" +"Could not write to file %s, error was:\n" +"%s." +msgstr "" + +#: ../libs/gcp/stringdlg.cc:175 +#, c-format +msgid "" +"Could not close file %s, error was:\n" +"%s" +msgstr "無法關閉檔案 %s, 錯誤訊息:\n %s" + +#: ../libs/gcp/text.cc:298 ../libs/gcp/text.cc:304 +msgid "This should not have occured, please file a bug record." +msgstr "" + +#: ../libs/gcp/theme.cc:448 +msgid "NewTheme1" +msgstr "" + +#: ../libs/gcp/theme.cc:452 +#, c-format +msgid "NewTheme%d" +msgstr "" + +#: ../libs/gcp/theme.cc:549 ../programs/crystal/atomsdlg.cc:189 +#: ../programs/crystal/atomsdlg.cc:319 ../programs/crystal/atomsdlg.cc:483 +msgid "Unknown" +msgstr "" + +#: ../libs/gcp/view.cc:1028 ../programs/3d/application.cc:186 +#: ../programs/crystal/application.cc:271 +#, c-format +msgid "" +"Could not create stream!\n" +"%s" +msgstr "" + +#: ../libs/gcp/view.cc:1064 ../libs/gcu/glview.cc:394 +#, c-format +msgid "Unable to save image file: %s\n" +msgstr "無法存成影像檔: %s\n" + +#: ../libs/gcp/window.cc:280 ../programs/3d/window.cc:171 +#: ../programs/calc/gchemcalc.cc:609 ../programs/crystal/window.cc:280 +#: ../programs/spectra/window.cc:166 ../programs/table/gchemtable-app.cc:140 +#: ../programs/table/gchemtable-curve.cc:218 +msgid "_File" +msgstr "檔案" + +#: ../libs/gcp/window.cc:281 ../programs/crystal/window.cc:281 +msgid "_New File" +msgstr "新檔案" + +#: ../libs/gcp/window.cc:282 ../programs/crystal/window.cc:282 +msgid "Create a new file" +msgstr "開新檔案" + +#: ../libs/gcp/window.cc:283 +msgid "Ne_w File with Theme..." +msgstr "新增檔案及主題" + +#: ../libs/gcp/window.cc:284 +msgid "Create a new file using a theme" +msgstr "以此主題新增一個檔案" + +#: ../libs/gcp/window.cc:285 ../programs/3d/window.cc:172 +#: ../programs/crystal/window.cc:283 ../programs/spectra/window.cc:167 +msgid "_Open..." +msgstr "開啟" + +#: ../libs/gcp/window.cc:286 ../programs/3d/window.cc:173 +#: ../programs/crystal/window.cc:284 ../programs/spectra/window.cc:168 +msgid "Open a file" +msgstr "開啟檔案" + +#: ../libs/gcp/window.cc:287 ../programs/crystal/window.cc:285 +msgid "_Save" +msgstr "存檔" + +#: ../libs/gcp/window.cc:288 ../programs/crystal/window.cc:286 +msgid "Save the current file" +msgstr "儲存目前的檔案" + +#: ../libs/gcp/window.cc:289 ../programs/crystal/window.cc:287 +msgid "Save _As..." +msgstr "另存新檔" + +#: ../libs/gcp/window.cc:290 ../programs/crystal/window.cc:288 +msgid "Save the current file with a different name" +msgstr "將目前的檔案存成不同檔名" + +#: ../libs/gcp/window.cc:291 ../programs/3d/window.cc:174 +#: ../programs/calc/gchemcalc.cc:610 ../programs/crystal/window.cc:289 +#: ../programs/spectra/window.cc:169 ../programs/table/gchemtable-curve.cc:219 +msgid "Save As _Image..." +msgstr "存成影像檔..." + +#: ../libs/gcp/window.cc:292 ../programs/3d/window.cc:175 +#: ../programs/calc/gchemcalc.cc:611 ../programs/crystal/window.cc:290 +#: ../programs/spectra/window.cc:170 ../programs/table/gchemtable-curve.cc:220 +msgid "Save the current file as an image" +msgstr "將目前的檔案存成影像檔" + +#: ../libs/gcp/window.cc:293 ../programs/3d/window.cc:176 +#: ../programs/calc/gchemcalc.cc:612 ../programs/crystal/window.cc:291 +#: ../programs/spectra/window.cc:171 ../programs/table/gchemtable-curve.cc:221 +msgid "Page Set_up..." +msgstr "" + +#: ../libs/gcp/window.cc:294 ../programs/3d/window.cc:177 +#: ../programs/calc/gchemcalc.cc:613 ../programs/crystal/window.cc:292 +#: ../programs/spectra/window.cc:172 ../programs/table/gchemtable-curve.cc:222 +msgid "Setup the page settings for your current printer" +msgstr "" + +#: ../libs/gcp/window.cc:295 ../programs/3d/window.cc:178 +#: ../programs/calc/gchemcalc.cc:614 ../programs/crystal/window.cc:293 +#: ../programs/spectra/window.cc:173 ../programs/table/gchemtable-curve.cc:223 +msgid "Print Pre_view" +msgstr "" + +#: ../libs/gcp/window.cc:296 ../programs/3d/window.cc:179 +#: ../programs/calc/gchemcalc.cc:615 ../programs/crystal/window.cc:294 +#: ../programs/spectra/window.cc:174 ../programs/table/gchemtable-curve.cc:224 +msgid "Print preview" +msgstr "" + +#: ../libs/gcp/window.cc:297 ../programs/3d/window.cc:180 +#: ../programs/calc/gchemcalc.cc:616 ../programs/crystal/window.cc:295 +#: ../programs/spectra/window.cc:175 ../programs/table/gchemtable-curve.cc:225 +msgid "_Print..." +msgstr "列印" + +#: ../libs/gcp/window.cc:298 ../programs/calc/gchemcalc.cc:617 +#: ../programs/crystal/window.cc:296 ../programs/spectra/window.cc:176 +#: ../programs/table/gchemtable-curve.cc:226 +msgid "Print the current file" +msgstr "列印目前的檔案" + +#: ../libs/gcp/window.cc:299 ../programs/crystal/window.cc:297 +#: ../programs/table/gchemtable-curve.cc:227 +msgid "Prope_rties..." +msgstr "" + +#: ../libs/gcp/window.cc:300 ../programs/crystal/window.cc:298 +msgid "Modify the file's properties" +msgstr "修改檔案的屬性" + +#: ../libs/gcp/window.cc:301 ../programs/3d/window.cc:182 +#: ../programs/crystal/window.cc:299 ../programs/spectra/window.cc:177 +#: ../programs/table/gchemtable-curve.cc:229 +msgid "_Close" +msgstr "關閉" + +#: ../libs/gcp/window.cc:302 ../programs/3d/window.cc:183 +#: ../programs/crystal/window.cc:300 ../programs/spectra/window.cc:178 +#: ../programs/table/gchemtable-curve.cc:230 +msgid "Close the current file" +msgstr "關閉目前的檔案" + +#: ../libs/gcp/window.cc:303 ../programs/3d/window.cc:184 +#: ../programs/calc/gchemcalc.cc:618 ../programs/crystal/window.cc:301 +#: ../programs/spectra/window.cc:179 ../programs/table/gchemtable-app.cc:143 +#: ../programs/table/gchemtable-curve.cc:231 +msgid "_Quit" +msgstr "關閉程式" + +#: ../libs/gcp/window.cc:304 +msgid "Quit GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:305 ../programs/calc/gchemcalc.cc:620 +#: ../programs/crystal/window.cc:303 ../programs/spectra/window.cc:181 +#: ../programs/table/gchemtable-curve.cc:233 +msgid "_Edit" +msgstr "編輯" + +#: ../libs/gcp/window.cc:306 +msgid "_Undo" +msgstr "" + +#: ../libs/gcp/window.cc:307 +msgid "Undo the last action" +msgstr "" + +#: ../libs/gcp/window.cc:308 +msgid "_Redo" +msgstr "" + +#: ../libs/gcp/window.cc:309 +msgid "Redo the undone action" +msgstr "" + +#: ../libs/gcp/window.cc:310 +msgid "Cu_t" +msgstr "" + +#: ../libs/gcp/window.cc:311 +msgid "Cut the selection" +msgstr "" + +#: ../libs/gcp/window.cc:312 ../programs/calc/gchemcalc.cc:621 +#: ../programs/spectra/window.cc:182 ../programs/table/gchemtable-curve.cc:234 +msgid "_Copy" +msgstr "" + +#: ../libs/gcp/window.cc:313 ../programs/calc/gchemcalc.cc:622 +#: ../programs/spectra/window.cc:183 ../programs/table/gchemtable-curve.cc:235 +msgid "Copy the selection" +msgstr "" + +#: ../libs/gcp/window.cc:314 +msgid "_Paste" +msgstr "" + +#: ../libs/gcp/window.cc:315 +msgid "Paste the clipboard" +msgstr "" + +#: ../libs/gcp/window.cc:316 +msgid "C_lear" +msgstr "" + +#: ../libs/gcp/window.cc:317 +msgid "Clear the selection" +msgstr "" + +#: ../libs/gcp/window.cc:318 +msgid "Select _All" +msgstr "" + +#: ../libs/gcp/window.cc:319 +msgid "Select everything" +msgstr "" + +#: ../libs/gcp/window.cc:320 +msgid "Pr_eferences..." +msgstr "" + +#: ../libs/gcp/window.cc:321 ../programs/crystal/window.cc:305 +msgid "Configure the application" +msgstr "" + +#: ../libs/gcp/window.cc:322 ../programs/3d/window.cc:186 +#: ../programs/crystal/window.cc:317 ../programs/table/gchemtable-app.cc:145 +msgid "_View" +msgstr "檢視" + +#: ../libs/gcp/window.cc:323 +msgid "_Zoom" +msgstr "" + +#: ../libs/gcp/window.cc:324 +msgid "_400%" +msgstr "" + +#: ../libs/gcp/window.cc:325 +msgid "Zoom to 400%" +msgstr "" + +#: ../libs/gcp/window.cc:326 +msgid "_300%" +msgstr "" + +#: ../libs/gcp/window.cc:327 +msgid "Zoom to 300%" +msgstr "" + +#: ../libs/gcp/window.cc:328 +msgid "_200%" +msgstr "" + +#: ../libs/gcp/window.cc:329 +msgid "Zoom to 200%" +msgstr "" + +#: ../libs/gcp/window.cc:330 +msgid "150%" +msgstr "" + +#: ../libs/gcp/window.cc:331 +msgid "Zoom to 150%" +msgstr "" + +#: ../libs/gcp/window.cc:332 +msgid "_100%" +msgstr "" + +#: ../libs/gcp/window.cc:333 +msgid "Zoom to 100%" +msgstr "" + +#: ../libs/gcp/window.cc:334 +msgid "_75%" +msgstr "" + +#: ../libs/gcp/window.cc:335 +msgid "Zoom to 75%" +msgstr "" + +#: ../libs/gcp/window.cc:336 +msgid "_50%" +msgstr "" + +#: ../libs/gcp/window.cc:337 +msgid "Zoom to 50%" +msgstr "" + +#: ../libs/gcp/window.cc:338 +msgid "25%" +msgstr "" + +#: ../libs/gcp/window.cc:339 +msgid "Zoom to 25%" +msgstr "" + +#: ../libs/gcp/window.cc:340 +msgid "_Zoom to...%" +msgstr "" + +#: ../libs/gcp/window.cc:341 +msgid "Open Zoom Dialog Box" +msgstr "" + +#: ../libs/gcp/window.cc:342 +msgid "_Tools" +msgstr "" + +#: ../libs/gcp/window.cc:343 ../programs/crystal/window.cc:320 +msgid "_Windows" +msgstr "視窗" + +#: ../libs/gcp/window.cc:344 ../programs/3d/window.cc:187 +#: ../programs/calc/gchemcalc.cc:624 ../programs/crystal/window.cc:325 +#: ../programs/spectra/window.cc:184 ../programs/table/gchemtable-app.cc:169 +#: ../programs/table/gchemtable-curve.cc:236 +#: ../programs/table/gchemtable-curve.cc:239 +msgid "_Help" +msgstr "求助" + +#: ../libs/gcp/window.cc:345 ../programs/3d/window.cc:188 +#: ../programs/calc/gchemcalc.cc:625 ../programs/crystal/window.cc:326 +#: ../programs/spectra/window.cc:185 ../programs/table/gchemtable-app.cc:170 +#: ../programs/table/gchemtable-curve.cc:237 +msgid "_Contents" +msgstr "說明的內容" + +#: ../libs/gcp/window.cc:346 +msgid "View help for GChemPaint" +msgstr "檢視 Gchempaint 的說明" + +#: ../libs/gcp/window.cc:347 +msgid "GChemPaint on the _web" +msgstr "" + +#: ../libs/gcp/window.cc:348 +msgid "Browse GChemPaint's web site" +msgstr "" + +#: ../libs/gcp/window.cc:349 ../programs/3d/window.cc:192 +#: ../programs/calc/gchemcalc.cc:629 ../programs/crystal/window.cc:330 +#: ../programs/spectra/window.cc:189 ../programs/table/gchemtable-app.cc:174 +#: ../programs/table/gchemtable-curve.cc:243 +msgid "Live assistance" +msgstr "" + +#: ../libs/gcp/window.cc:350 ../programs/3d/window.cc:193 +#: ../programs/calc/gchemcalc.cc:630 ../programs/crystal/window.cc:331 +#: ../programs/spectra/window.cc:190 ../programs/table/gchemtable-app.cc:175 +#: ../programs/table/gchemtable-curve.cc:244 +msgid "Open the Gnome Chemistry Utils IRC channel" +msgstr "" + +#: ../libs/gcp/window.cc:351 ../programs/3d/window.cc:194 +#: ../programs/calc/gchemcalc.cc:631 ../programs/crystal/window.cc:332 +#: ../programs/spectra/window.cc:191 ../programs/table/gchemtable-app.cc:176 +#: ../programs/table/gchemtable-curve.cc:245 +msgid "_Ask a question" +msgstr "我有問題" + +#: ../libs/gcp/window.cc:352 +msgid "Ask a question about GChemPaint" +msgstr "我有 GChenPaint 的問題" + +#: ../libs/gcp/window.cc:353 ../programs/3d/window.cc:196 +#: ../programs/calc/gchemcalc.cc:633 ../programs/crystal/window.cc:334 +#: ../programs/spectra/window.cc:193 ../programs/table/gchemtable-app.cc:178 +#: ../programs/table/gchemtable-curve.cc:247 +msgid "Report _Bugs" +msgstr "回報臭蟲" + +#: ../libs/gcp/window.cc:354 +msgid "Submit a bug report for GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:355 ../programs/3d/window.cc:198 +#: ../programs/calc/gchemcalc.cc:635 ../programs/crystal/window.cc:336 +#: ../programs/spectra/window.cc:195 ../programs/table/gchemtable-app.cc:180 +#: ../programs/table/gchemtable-curve.cc:249 +msgid "_About" +msgstr "" + +#: ../libs/gcp/window.cc:356 +msgid "About GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:499 +msgid "Open _recent" +msgstr "" + +#: ../libs/gcp/window.cc:523 ../programs/crystal/window.cc:459 +msgid "Ready" +msgstr "" + +#: ../libs/gcp/window.cc:691 +msgid "GChemPaint" +msgstr "" + +#: ../libs/gcp/window.cc:706 ../programs/crystal/document.cc:750 +#, c-format +msgid "\"%s\" has been modified. Do you wish to save it?" +msgstr "\"%s\" 已經修改過了. 您要存檔嗎?" + +#: ../libs/gcu/application.cc:193 +#, c-format +msgid "(screen resolution is %u)" +msgstr "" + +#: ../libs/gcu/crystaldoc.cc:467 +msgid "Everything has been cleaved" +msgstr "" + +#: ../libs/gcu/dialog.cc:135 +msgid "Type a number" +msgstr "" + +#: ../libs/gcu/dialog.cc:144 +#, c-format +msgid "Type a number greater than or equal %g and lower than to %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:154 +#, c-format +msgid "Type a number greater than %g and lower than or equal to %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:164 +#, c-format +msgid "Type a number between %g and %g, the limits are valid." +msgstr "" + +#: ../libs/gcu/dialog.cc:174 +#, c-format +msgid "Type a number greater than %g and lower than %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:184 +#, c-format +msgid "Type a number lower than %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:194 +#, c-format +msgid "Type a number greater than %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:204 +#, c-format +msgid "Type a number lower than or equal to %g" +msgstr "" + +#: ../libs/gcu/dialog.cc:214 +#, c-format +msgid "Type a number greater than or equal to %g" +msgstr "" + +#: ../libs/gcu/element.cc:97 +msgid "German" +msgstr "" + +#: ../libs/gcu/element.cc:98 +msgid "French" +msgstr "" + +#: ../libs/gcu/element.cc:99 +msgid "Italian" +msgstr "" + +#: ../libs/gcu/element.cc:100 +msgid "Polish" +msgstr "" + +#: ../libs/gcu/element.cc:101 +msgid "Brazilian" +msgstr "" + +#: ../libs/gcu/element.cc:102 +msgid "Russian" +msgstr "" + +#: ../libs/gcu/element.cc:104 +msgid "Can't find and read elements.xml" +msgstr "" + +#: ../libs/gcu/element.cc:110 ../libs/gcu/element.cc:119 +msgid "Incorrect file format: elements.xml" +msgstr "錯誤的檔案格式: elements.xml" + +#: ../libs/gcu/element.cc:155 +msgid "English" +msgstr "" + +#: ../libs/gcu/element.cc:407 +msgid "Can't find and read radii.xml" +msgstr "" + +#: ../libs/gcu/element.cc:413 ../libs/gcu/element.cc:426 +msgid "Incorrect file format: radii.xml" +msgstr "錯誤的檔案格式: radii.xml" + +#: ../libs/gcu/element.cc:514 +msgid "Can't find and read elecprops.xml" +msgstr "" + +#: ../libs/gcu/element.cc:520 ../libs/gcu/element.cc:527 +msgid "Incorrect file format: elecprops.xml" +msgstr "錯誤的檔案格式: elecprops.xml" + +#: ../libs/gcu/element.cc:676 +msgid "Can't find and read isotopes.xml" +msgstr "" + +#: ../libs/gcu/element.cc:682 ../libs/gcu/element.cc:691 +msgid "Incorrect file format: isotopes.xml" +msgstr "錯誤的檔案格式: isotopes.xml" + +#: ../libs/gcu/filechooser.cc:43 +msgid "Open" +msgstr "" + +#: ../libs/gcu/filechooser.cc:62 +msgid "File _type:" +msgstr "檔案種類:" + +#: ../libs/gcu/filechooser.cc:64 +msgid "Automatic" +msgstr "" + +#: ../libs/gcu/formula.cc:512 ../libs/gcu/formula.cc:552 +msgid "Unmatched parenthesis" +msgstr "" + +#: ../libs/gcu/formula.cc:540 +msgid "Could not interpret the symbol list" +msgstr "" + +#: ../libs/gcu/formula.cc:546 +msgid "Parser failed, please fill a bug report." +msgstr "" + +#: ../libs/gcu/formula.cc:554 +msgid "Invalid character" +msgstr "" + +#: ../libs/gcu/gtkchem3dviewer.cc:157 +msgid "Background Color" +msgstr "背景顏色" + +#: ../libs/gcu/gtkchem3dviewer.cc:158 +msgid "Color used to paint the background" +msgstr "" + +#: ../libs/gcu/gtkperiodic.c:331 +#, c-format +msgid "" +"Out of range value %d for property \"color-style\" for GtkPeriodic instance %" +"p\n" +msgstr "" + +#: ../libs/gcu/loader.cc:106 +msgid "Chemical file loader type." +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.1f %s wide by %.1f %s tall" +msgstr "" + +#: ../libs/gcu/print-setup-dlg.cc:328 +#, c-format +msgid "%.0f %s wide by %.0f %s tall" +msgstr "" + +#: ../libs/gcu/printable.cc:34 +msgid "pixels" +msgstr "" + +#: ../libs/gcu/printable.cc:35 +msgid "points" +msgstr "" + +#: ../libs/gcu/printable.cc:36 +msgid "inches" +msgstr "" + +#: ../libs/gcu/printable.cc:37 +msgid "mm" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:239 +msgid "Wavenumber (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:240 ../libs/gcu/spectrumdoc.cc:1344 +msgid "Transmittance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:241 ../libs/gcu/spectrumdoc.cc:1343 +msgid "Absorbance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:242 ../libs/gcu/spectrumdoc.cc:1279 +msgid "Chemical shift (ppm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:243 +msgid "Wavelength (nm)" +msgstr "波長 (nm)" + +#: ../libs/gcu/spectrumdoc.cc:244 +msgid "Wavelength (µm)" +msgstr "波長 (µm)" + +#: ../libs/gcu/spectrumdoc.cc:245 +msgid "Time (s)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:246 ../libs/gcu/spectrumdoc.cc:1280 +msgid "Frequency (Hz)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:247 +msgid "Mass/charge ratio" +msgstr "質量/電荷 比" + +#: ../libs/gcu/spectrumdoc.cc:248 +msgid "Relative abundance" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:618 ../libs/gcu/spectrumdoc.cc:1286 +msgid "Show integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:618 +msgid "Hide integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:708 ../libs/gcu/spectrumdoc.cc:1616 +msgid "Found too many data!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1276 ../libs/gcu/spectrumdoc.cc:1323 +msgid "X unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1327 +msgid "Wave length (nm)" +msgstr "波的長度 (nm)" + +#: ../libs/gcu/spectrumdoc.cc:1329 +msgid "Wave length (µm)" +msgstr "波的長度 (µm)" + +#: ../libs/gcu/spectrumdoc.cc:1330 +msgid "Wave number (1/cm)" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1335 +msgid "Invert X Axis" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1340 +msgid "Y unit:" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1511 ../libs/gcu/spectrumdoc.cc:1541 +msgid "Constant too long" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1534 +msgid "Invalid character in data block" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1638 +msgid "Data check failed!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1655 +msgid "Data check failed: FIRSTX!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1660 +msgid "Data check failed: FIRSTY!" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1664 +msgid "Found too many data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:1975 +msgid "Integral" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2096 +msgid "Real transformed data" +msgstr "" + +#: ../libs/gcu/spectrumdoc.cc:2113 +msgid "Imaginary transformed data" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:80 +msgid "Minimum X value:" +msgstr "" + +#: ../libs/gcu/spectrumview.cc:85 +msgid "Maximum X value:" +msgstr "" + +#: ../libs/gcu/value.cc:146 +msgid "Attempt to add two values with different units." +msgstr "" + +#: ../plugins/loaders/cdx/cdx.cc:503 ../plugins/loaders/cdx/cdx.cc:507 +#: ../plugins/loaders/cdx/cdx.cc:632 ../plugins/loaders/cdx/cdx.cc:637 +msgid "Unsupported feature, please report!" +msgstr "" + +#: ../plugins/loaders/cdx/cdx.cc:594 ../plugins/loaders/cdxml/cdxml.cc:473 +#, c-format +msgid "failed for %s\n" +msgstr "" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:1 +msgid "Chemdraw cdx files loader" +msgstr "Chemdraw cdx 檔案載入器" + +#: ../plugins/loaders/cdx/plugin.xml.in.h:2 +msgid "Chemdraw cdx files loader." +msgstr "Chemdraw cdx 檔案載入器." + +#: ../plugins/loaders/cdx/plugin.xml.in.h:3 +msgid "Loader : cdx" +msgstr "" + +#: ../plugins/loaders/cdxml/cdxml.cc:733 ../plugins/loaders/cdxml/cdxml.cc:748 +#, c-format +msgid "'%s' is corrupt!" +msgstr "" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:1 +msgid "Chemdraw XML files loader" +msgstr "Chemdraw XML 檔案載入器" + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:2 +msgid "Chemdraw XML files loader." +msgstr "Chemdraw XML 檔案載入器." + +#: ../plugins/loaders/cdxml/plugin.xml.in.h:3 +msgid "Loader : cdxml" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.cc:245 +#: ../plugins/paint/atoms/chargetool.cc:233 +#: ../plugins/paint/atoms/chargetool.cc:383 +#: ../plugins/paint/atoms/electrontool.cc:127 +#: ../plugins/paint/atoms/electrontool.cc:263 +#: ../plugins/paint/bonds/bondtool.cc:177 +#: ../plugins/paint/bonds/bondtool.cc:295 +#: ../plugins/paint/cycles/cycletool.cc:486 +#: ../plugins/paint/selection/selectiontool.cc:156 +#, c-format +msgid "Orientation: %g" +msgstr "位向: %g" + +#: ../plugins/paint/arrows/arrowtool.glade.h:1 +msgid "Arrow len_gth:" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:2 +msgid "H_alf heads" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:3 +msgid "Set _default" +msgstr "" + +#: ../plugins/paint/arrows/arrowtool.glade.h:4 +msgid "_Full heads" +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:1 +msgid "" +"If set to true, arrows for reversible reaction steps will use full arrows " +"heads by default instead of half heads." +msgstr "" + +#: ../plugins/paint/arrows/gchempaint-arrows.schemas.in.h:2 +msgid "Use full arrows heads for reversible reactions" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:60 +msgid "Create a new retrosynthesis pathway" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:80 +msgid "Simple arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:81 +msgid "Add an arrow for an irreversible reaction" +msgstr "加入單向箭頭 (表示不可逆的反應)" + +#: ../plugins/paint/arrows/plugin.cc:83 +msgid "Double arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:84 +msgid "Add a pair of arrows for a reversible reaction" +msgstr "加入一對箭頭 (表示可逆反應)" + +#: ../plugins/paint/arrows/plugin.cc:86 +msgid "Retrosynthesis arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:87 +msgid "Add an arrow for a retrosynthesis step" +msgstr "加入箭頭 (表示逆合成的步驟)" + +#: ../plugins/paint/arrows/plugin.cc:89 +msgid "Mesomery arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:90 +msgid "Add a double headed arrow to represent mesomery" +msgstr "加入雙向箭頭 (表示化學式互變或是共振等結構)" + +#: ../plugins/paint/arrows/plugin.cc:92 +msgid "Electron pair move arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:93 +msgid "Add a curved arrow to represent an electron pair move" +msgstr "加入曲線箭頭 (表示電子對的移動)" + +#: ../plugins/paint/arrows/plugin.cc:95 +msgid "Single electron move arrow" +msgstr "" + +#: ../plugins/paint/arrows/plugin.cc:96 +msgid "Add a curved arrow to represent an single electron move" +msgstr "加入曲線箭頭 (表示單電子的移動)" + +#: ../plugins/paint/arrows/retrosynthesis.cc:239 +msgid "No target molecule!" +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:241 +msgid "Multiple target molecules or missing arrows." +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:243 +msgid "Sorry, cyclic retrosynthesis paths are not supported." +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesis.cc:419 +msgid "Destroy the retrosynthesis path" +msgstr "" + +#: ../plugins/paint/arrows/retrosynthesisstep.cc:76 +msgid "Only one arrow can link two given steps." +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:56 +msgid "Add or modify an atom" +msgstr "新增或修改原子" + +#: ../plugins/paint/atoms/plugin.cc:58 +msgid "Positive Charge" +msgstr "正電荷" + +#: ../plugins/paint/atoms/plugin.cc:59 +msgid "Increment the charge of an atom" +msgstr "增加正電荷" + +#: ../plugins/paint/atoms/plugin.cc:61 +msgid "Negative Charge" +msgstr "負電荷" + +#: ../plugins/paint/atoms/plugin.cc:62 +msgid "Decrement the charge of an atom" +msgstr "增加負電荷" + +#: ../plugins/paint/atoms/plugin.cc:64 +msgid "Electron Pair" +msgstr "" + +#: ../plugins/paint/atoms/plugin.cc:65 +msgid "Add an electron pair to an atom" +msgstr "加入電子對" + +#: ../plugins/paint/atoms/plugin.cc:67 +msgid "Unpaired Electron" +msgstr "不成對電子" + +#: ../plugins/paint/atoms/plugin.cc:68 +msgid "Add an unpaired electron to an atom" +msgstr "加入不成對電子 (單電子)" + +#: ../plugins/paint/bonds/bond.glade.h:1 +#: ../plugins/paint/bonds/chain.glade.h:2 +#: ../plugins/paint/cycles/cycle.glade.h:1 +#: ../plugins/paint/cycles/cyclen.glade.h:1 +msgid "Property" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:2 +#: ../plugins/paint/bonds/chain.glade.h:3 +#: ../plugins/paint/cycles/cycle.glade.h:2 +#: ../plugins/paint/cycles/cyclen.glade.h:2 +msgid "Value" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:3 +#: ../plugins/paint/bonds/chain.glade.h:4 +msgid "Angle between two new bonds in an open chain" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:4 +#: ../plugins/paint/bonds/chain.glade.h:5 +msgid "Bond _angle:" +msgstr "鍵角:" + +#: ../plugins/paint/bonds/bond.glade.h:5 +#: ../plugins/paint/bonds/chain.glade.h:6 +#: ../plugins/paint/cycles/cycle.glade.h:3 +#: ../plugins/paint/cycles/cyclen.glade.h:3 +msgid "Bond len_gth:" +msgstr "鍵長:" + +#: ../plugins/paint/bonds/bond.glade.h:6 +#: ../plugins/paint/bonds/chain.glade.h:8 +#: ../plugins/paint/cycles/cycle.glade.h:4 +#: ../plugins/paint/cycles/cyclen.glade.h:5 +msgid "Default length for new bonds" +msgstr "新鍵的內設長度" + +#: ../plugins/paint/bonds/bond.glade.h:7 +#: ../plugins/paint/bonds/chain.glade.h:11 +#: ../plugins/paint/cycles/cycle.glade.h:5 +#: ../plugins/paint/cycles/cyclen.glade.h:6 +msgid "Use existing atoms for end of bonds" +msgstr "" + +#: ../plugins/paint/bonds/bond.glade.h:8 +#: ../plugins/paint/bonds/chain.glade.h:12 +#: ../plugins/paint/cycles/cycle.glade.h:6 +#: ../plugins/paint/cycles/cyclen.glade.h:7 +msgid "_Merge with existing atoms" +msgstr "併入已存在的原子" + +#: ../plugins/paint/bonds/bondtool.cc:423 +msgid "Invalid document tree, please file a bug report" +msgstr "無效的文件樹狀結構, 請回報臭蟲" + +#: ../plugins/paint/bonds/chain.glade.h:1 +msgid "Auto" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:7 +msgid "Bonds _number:" +msgstr "鍵的數目" + +#: ../plugins/paint/bonds/chain.glade.h:9 +msgid "If set, the number of new bonds will be evaluated from the mouse position" +msgstr "" + +#: ../plugins/paint/bonds/chain.glade.h:10 +msgid "Number of new bonds" +msgstr "" + +#: ../plugins/paint/bonds/chaintool.cc:128 +#: ../plugins/paint/bonds/chaintool.cc:250 +#, c-format +msgid "Bonds: %d, Orientation: %g" +msgstr "鍵: %d, 位向: %g" + +#: ../plugins/paint/bonds/plugin.cc:57 +msgid "Add a bond or change the multiplicity of an existing one" +msgstr "新增鍵或是增加已存在鍵的級數" + +#: ../plugins/paint/bonds/plugin.cc:59 +msgid "Chain" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:60 +msgid "Add a chain" +msgstr "加入長鍊" + +#: ../plugins/paint/bonds/plugin.cc:62 +msgid "Wedge bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:63 +msgid "Add a wedge bond" +msgstr "加入楔形鍵" + +#: ../plugins/paint/bonds/plugin.cc:65 +msgid "Hash bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:66 +msgid "Add a hash bond" +msgstr "加入虛線鍵" + +#: ../plugins/paint/bonds/plugin.cc:68 +msgid "Squiggle bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:69 +msgid "Add a squiggle bond" +msgstr "加入波浪線鍵" + +#: ../plugins/paint/bonds/plugin.cc:71 +msgid "Fore bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:72 +msgid "Add a fore bond" +msgstr "加入前方鍵" + +#: ../plugins/paint/bonds/plugin.cc:74 +msgid "Delocalized bond tool" +msgstr "" + +#: ../plugins/paint/bonds/plugin.cc:75 +msgid "Add a delocalized bonds system" +msgstr "加入非定域鍵系統" + +#: ../plugins/paint/cycles/cyclen.glade.h:4 +msgid "Cycle _Size" +msgstr "構成環的原子數目" + +#: ../plugins/paint/cycles/plugin.cc:54 +msgid "Three atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:55 +msgid "Add a three membered cycle" +msgstr "加入三員環" + +#: ../plugins/paint/cycles/plugin.cc:57 +msgid "Four atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:58 +msgid "Add a four membered cycle" +msgstr "加入四員環" + +#: ../plugins/paint/cycles/plugin.cc:60 +msgid "Five atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:61 +msgid "Add a five membered cycle" +msgstr "加入五員環" + +#: ../plugins/paint/cycles/plugin.cc:63 +msgid "Six atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:64 +msgid "Add a six membered cycle" +msgstr "加入六員環" + +#: ../plugins/paint/cycles/plugin.cc:66 +msgid "Seven atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:67 +msgid "Add a seven membered cycle" +msgstr "加入七員環" + +#: ../plugins/paint/cycles/plugin.cc:69 +msgid "Eight atoms cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:70 +msgid "Add an eight membered cycle" +msgstr "加入八員環" + +#: ../plugins/paint/cycles/plugin.cc:72 +msgid "Variable sized cycle" +msgstr "" + +#: ../plugins/paint/cycles/plugin.cc:73 +msgid "Add a cycle" +msgstr "加入環" + +#: ../plugins/paint/residues/plugin.cc:104 +msgid "_Edit residues..." +msgstr "編輯殘基..." + +#: ../plugins/paint/residues/plugin.cc:105 +msgid "Create new abbreviations" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:216 +msgid "Please, provide only one molecule." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:232 +msgid "Please, provide a name for the residue" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:250 +msgid "Symbols with more than eight characters are not allowed." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:255 +#: ../plugins/paint/residues/residues-dlg.cc:401 +#: ../plugins/paint/residues/residues.glade.h:4 +msgid "New" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:256 +msgid "\"New\" is not a valid symbol" +msgstr "\"New\" 不是個有效的符號" + +#: ../plugins/paint/residues/residues-dlg.cc:265 +msgid "Please provide at least one symbol" +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:275 +#, c-format +msgid "%s is already used by another residue." +msgstr "" + +#: ../plugins/paint/residues/residues-dlg.cc:287 +msgid "" +"Empty formula, this should never happen.\n" +"Please file a bug report" +msgstr "" +"空白的化學式, 這不應該發生的.\n " +"請回報臭蟲" + +#: ../plugins/paint/residues/residues.glade.h:1 +msgid "Formula" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:2 +msgid "Identity" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:5 +msgid "Residues" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:6 +msgid "_Generic" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:7 +msgid "_Symbol(s):" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:8 +msgid "gtk-delete" +msgstr "" + +#: ../plugins/paint/residues/residues.glade.h:9 +msgid "gtk-save" +msgstr "" + +#: ../plugins/paint/selection/group.cc:59 +msgid "Group properties..." +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:1 +msgid "A_lign" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:2 +msgid "Distance:" +msgstr "距離:" + +#: ../plugins/paint/selection/group.glade.h:3 +msgid "Group and/or align selected objects" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:4 +msgid "" +"Normal\n" +"Top\n" +"Mid-height\n" +"Bottom\n" +"Left\n" +"Center\n" +"Right" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:11 +msgid "_Group" +msgstr "" + +#: ../plugins/paint/selection/group.glade.h:12 +msgid "_Space evenly" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:64 +msgid "Select" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:65 +msgid "Select one or more objects" +msgstr "選取一個或多個物件" + +#: ../plugins/paint/selection/plugin.cc:67 ../plugins/paint/text/plugin.cc:55 +msgid "Erase" +msgstr "" + +#: ../plugins/paint/selection/plugin.cc:68 +msgid "Eraser" +msgstr "橡皮擦" + +#: ../plugins/paint/selection/selectiontool.cc:371 +msgid "Creation failed!" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:400 +msgid "Group and/or align objects" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:438 +msgid "Horizontal flip" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:439 +msgid "Flip the selection horizontally" +msgstr "水平翻動 (水平鏡像)" + +#: ../plugins/paint/selection/selectiontool.cc:440 +msgid "Vertical flip" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:441 +msgid "Flip the selection vertically" +msgstr "垂直翻動 (垂直鏡像)" + +#: ../plugins/paint/selection/selectiontool.cc:442 +msgid "Merge" +msgstr "" + +#: ../plugins/paint/selection/selectiontool.cc:443 +msgid "Merge two molecules" +msgstr "合併兩個分子" + +#: ../plugins/paint/selection/selectiontool.cc:447 +msgid "_Rotate" +msgstr "旋轉" + +#: ../plugins/paint/selection/selectiontool.cc:448 +msgid "Rotate the selection" +msgstr "旋轉所選的物件" + +#: ../plugins/paint/templates/new-template.glade.h:2 +msgid "New template" +msgstr "" + +#: ../plugins/paint/templates/new-template.glade.h:3 +msgid "_Category:" +msgstr "" + +#: ../plugins/paint/templates/new-template.glade.h:4 +msgid "_Name" +msgstr "" + +#: ../plugins/paint/templates/plugin.cc:106 +msgid "Templates" +msgstr "化學圖形範本" + +#: ../plugins/paint/templates/plugin.cc:107 +msgid "Use or manage templates" +msgstr "使用或管理化學圖形範本" + +#: ../plugins/paint/templates/plugin.cc:231 +#: ../plugins/paint/templates/plugin.cc:233 +msgid "Miscellaneous" +msgstr "其他" + +#: ../plugins/paint/templates/templates.glade.h:1 +msgid "No selected template" +msgstr "" + +#: ../plugins/paint/templates/templates.glade.h:2 +msgid "_Templates" +msgstr "化學圖形範本" + +#: ../plugins/paint/templates/templates.glade.h:3 +msgid "category" +msgstr "" + +#: ../plugins/paint/templates/templatetool.cc:331 +msgid "Please provide an object." +msgstr "" + +#: ../plugins/paint/templates/templatetool.cc:333 +msgid "Please give a name." +msgstr "" + +#: ../plugins/paint/templates/templatetool.cc:335 +msgid "Please choose a category." +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:1 +msgid "" +"None\n" +"Single\n" +"Double\n" +"Low" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:5 +msgid "Si_ze:" +msgstr "大小:" + +#: ../plugins/paint/text/fontsel.glade.h:6 +msgid "Stri_kethrough" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:7 +msgid "_Color:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:8 +msgid "_Family:" +msgstr "字型:" + +#: ../plugins/paint/text/fontsel.glade.h:9 +msgid "_Position:" +msgstr "" + +#: ../plugins/paint/text/fontsel.glade.h:10 +msgid "_Style:" +msgstr "字樣;" + +#: ../plugins/paint/text/fontsel.glade.h:11 +msgid "_Underline:" +msgstr "底線:" + +#: ../plugins/paint/text/plugin.cc:53 +msgid "Add or modify a text" +msgstr "新增或修改文字" + +#: ../plugins/paint/text/plugin.cc:56 +msgid "Add or modify a group of atoms" +msgstr "新增或修改一群原子" + +#: ../plugins/paint/wikipedia/plugin.cc:52 +msgid "Wikipedia export" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:53 +msgid "Export for Wikipedia publication" +msgstr "" + +#: ../plugins/paint/wikipedia/plugin.cc:99 +msgid "Generate Wikipedia conformant PNG image" +msgstr "" + +#: ../plugins/paint/wikipedia/wikipediatool.cc:178 +msgid "Unable to save image file: " +msgstr "無法存成影像檔:" + +#: ../programs/3d/application.cc:41 ../programs/3d/application.cc:78 +msgid "GChem3D Viewer" +msgstr "Gchem3D 立體分子展示軟體" + +#: ../programs/3d/application.cc:155 +msgid "Sorry, format not supported!" +msgstr "" + +#: ../programs/3d/main.cc:44 +msgid "GChem3d Viewer version: " +msgstr "" + +#: ../programs/3d/main.cc:55 +msgid "Prints GChem3d Viewer version" +msgstr "" + +#: ../programs/3d/main.cc:56 +msgid "Background color: white, black or #rrggbb (default is black)" +msgstr "" + +#: ../programs/3d/main.cc:57 +msgid "" +"How molecules are displayed; possible values are BallnStick (the default), " +"SpaceFill, Cylinders, and Wireframe" +msgstr "" + +#: ../programs/3d/main.cc:103 ../programs/spectra/gspectrum.cc:54 +msgid " [file]" +msgstr "[檔案]" + +#: ../programs/3d/main.cc:124 ../programs/crystal/main.cc:159 +#: ../programs/paint/main.cc:90 ../programs/spectra/gspectrum.cc:74 +#, c-format +msgid "Invalid or misplaced argument: %s\n" +msgstr "" + +#: ../programs/3d/window.cc:129 +msgid "GChem3D is a molecular structures viewer for Gnome" +msgstr "" + +#: ../programs/3d/window.cc:131 +msgid "Copyright © 2004-2008 Jean Bréfort\n" +msgstr "Copyright © 2004-2008 Jean Bréfort\n" + +#: ../programs/3d/window.cc:181 +msgid "Print the current scene" +msgstr "" + +#: ../programs/3d/window.cc:185 +msgid "Quit GChem3D" +msgstr "" + +#: ../programs/3d/window.cc:189 +msgid "View help for the Molecules Viewer" +msgstr "" + +#: ../programs/3d/window.cc:190 ../programs/calc/gchemcalc.cc:627 +#: ../programs/crystal/window.cc:328 ../programs/spectra/window.cc:187 +#: ../programs/table/gchemtable-app.cc:172 +#: ../programs/table/gchemtable-curve.cc:241 +msgid "Gnome Chemistry Utils on the _web" +msgstr "" + +#: ../programs/3d/window.cc:191 ../programs/calc/gchemcalc.cc:628 +#: ../programs/crystal/window.cc:329 ../programs/spectra/window.cc:188 +#: ../programs/table/gchemtable-app.cc:173 +#: ../programs/table/gchemtable-curve.cc:242 +msgid "Browse the Gnome Chemistry Utils's web site" +msgstr "" + +#: ../programs/3d/window.cc:195 ../programs/calc/gchemcalc.cc:632 +#: ../programs/crystal/window.cc:333 ../programs/spectra/window.cc:192 +#: ../programs/table/gchemtable-app.cc:177 +#: ../programs/table/gchemtable-curve.cc:246 +msgid "Ask a question about the Gnome Chemistry Utils" +msgstr "我有 Gnome Chemistry Utils 的問題" + +#: ../programs/3d/window.cc:197 ../programs/calc/gchemcalc.cc:634 +#: ../programs/crystal/window.cc:335 ../programs/spectra/window.cc:194 +#: ../programs/table/gchemtable-app.cc:179 +#: ../programs/table/gchemtable-curve.cc:248 +msgid "Submit a bug report for the Gnome Chemistry Utils" +msgstr "" + +#: ../programs/3d/window.cc:199 +msgid "About GChem3D" +msgstr "" + +#: ../programs/3d/window.cc:203 +msgid "Balls and sticks" +msgstr "球與棒的模式" + +#: ../programs/3d/window.cc:204 +msgid "Display a balls and sticks model" +msgstr "顯示球與棒的模型" + +#: ../programs/3d/window.cc:206 +msgid "Space filling" +msgstr "填滿空間模式" + +#: ../programs/3d/window.cc:207 +msgid "Display a space filling model" +msgstr "顯示填滿空間的模型" + +#: ../programs/3d/window.cc:209 +msgid "Cylinders" +msgstr "" + +#: ../programs/3d/window.cc:210 +msgid "Display a cylinders model" +msgstr "" + +#: ../programs/3d/window.cc:212 +msgid "Wireframe" +msgstr "" + +#: ../programs/3d/window.cc:213 +msgid "Display a wireframe model" +msgstr "" + +#: ../programs/3d/window.cc:271 +msgid "Background color" +msgstr "" + +#: ../programs/3d/window.cc:272 +msgid "Choose a new background color" +msgstr "選個新的背景顏色" + +#: ../programs/3d/window.cc:295 ../programs/crystal/window.cc:439 +#: ../programs/spectra/window.cc:257 +msgid "Open recent" +msgstr "最近開啟的" + +#: ../programs/3d/gchem3d.desktop.in.h:1 +msgid "Display chemical 3D structures" +msgstr "" + +#: ../programs/3d/gchem3d.desktop.in.h:2 +msgid "Molecules Viewer " +msgstr "" + +#: ../programs/calc/gchemcalc.cc:301 +msgid "GChemCalc is a simple calculator for chemists" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:303 ../programs/table/gchemtable-app.cc:351 +msgid "Copyright © 2005-2008 Jean Bréfort" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:619 +msgid "Quit GChemCalc" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:623 +msgid "_Mode" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:626 +msgid "View help for the Chemical Calculator" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:636 +msgid "About GChemCalc" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:640 +msgid "_Guess" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:641 +msgid "Try to guess what is correct when interpreting ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:643 +msgid "_Atom" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:644 +msgid "Interpreting ambiguous symbols as atoms" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:646 +msgid "_Nickname" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:647 +msgid "Interpret ambiguous symbols as atoms groups nicknames" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:649 +msgid "As_k" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:650 +msgid "Ask user for the correct interpretation of ambiguous symbols" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:688 +msgid "GChemCalc Calculator version: " +msgstr "" + +#: ../programs/calc/gchemcalc.cc:714 +msgid " [formula]" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:730 +msgid "For usage see: gchemcalc [-?|--help]" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:776 +msgid "Element" +msgstr "" + +#: ../programs/calc/gchemcalc.cc:783 +msgid "Mass %" +msgstr "" + +#: ../programs/calc/gchemcalc.desktop.in.h:1 +msgid "A simple calculator for chemistry" +msgstr "" + +#: ../programs/calc/gchemcalc.desktop.in.h:2 +msgid "Chemical calculator " +msgstr "" + +#: ../programs/crystal/gcrystal.desktop.in.h:1 +msgid "Edit and display crystalline structures" +msgstr "編輯及展示晶體結構" + +#: ../programs/crystal/gcrystal.desktop.in.h:2 +msgid "Gnome Crystal Crystalline Structures Viewer " +msgstr "Gnome Crystal 晶體結構展示軟體" + +#: ../programs/crystal/gcrystal.schemas.in.h:1 +msgid "Background color blue value" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:2 +msgid "Background color green value" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:3 +msgid "Background color red value" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:4 +msgid "Blue value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:5 +msgid "" +"Default Euler's nutation angle for model display. Acceptable values are 0. " +"to + 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:6 +msgid "" +"Default Euler's precession angle for model display. Acceptable values are -" +"180. to + 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:7 +msgid "" +"Default Euler's spin angle for model display. Acceptable values are -180. to " +"+ 180." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:8 +msgid "Default field of view" +msgstr "預設的可視範圍" + +#: ../programs/crystal/gcrystal.schemas.in.h:9 +msgid "Default nutation" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:10 +msgid "Default precession" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:11 +msgid "Default spin" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:12 +msgid "Field of view used by default for the model display." +msgstr "展示模型使用預設的可視範圍" + +#: ../programs/crystal/gcrystal.schemas.in.h:13 +msgid "Green value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:14 +msgid "Printing resolution" +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:15 +msgid "Printing resolution if not automatically detected." +msgstr "" + +#: ../programs/crystal/gcrystal.schemas.in.h:16 +msgid "Red value for the default background color. Acceptable values are 0. to 1." +msgstr "" + +#: ../programs/crystal/application.cc:58 +#, c-format +msgid "Untitled%d" +msgstr "" + +#: ../programs/crystal/application.cc:318 +#, c-format +msgid "" +"\"%s\" has been modified since last saving. Do you wish to come back to " +"saved version?" +msgstr "" + +#: ../programs/crystal/atomsdlg.cc:624 +msgid " c.n.=" +msgstr "" + +#: ../programs/crystal/atomsdlg.cc:630 +msgid "low spin" +msgstr "低自旋" + +#: ../programs/crystal/atomsdlg.cc:630 +msgid "high spin" +msgstr "高自旋" + +#: ../programs/crystal/atomsdlg.cc:632 +msgid "Database" +msgstr "" + +#: ../programs/crystal/celldlg.cc:141 +msgid "The sum of the three angles must be less than 360°" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:98 +msgid "h" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:108 +msgid "k" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:118 +msgid "l" +msgstr "" + +#: ../programs/crystal/cleavagesdlg.cc:128 +msgid "Planes cleaved" +msgstr "被分開的面" + +#: ../programs/crystal/document.cc:323 +#, c-format +msgid "" +"Could not save file\n" +"%s" +msgstr "" +"無法存檔\n " +"%s" + +#: ../programs/crystal/linesdlg.cc:121 +msgid "x1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:131 +msgid "y1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:141 +msgid "z1" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:151 +msgid "x2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:161 +msgid "y2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:171 +msgid "z2" +msgstr "" + +#: ../programs/crystal/linesdlg.cc:180 +msgid "Single" +msgstr "" + +#: ../programs/crystal/main.cc:88 +msgid "Gnome Chemistry Utils version: " +msgstr "" + +#: ../programs/crystal/main.cc:114 ../programs/paint/main.cc:72 +msgid " [file...]" +msgstr " [檔案...]" + +#: ../programs/crystal/window.cc:148 ../programs/crystal/window.cc:404 +msgid "Gnome Crystal" +msgstr "Gnome Crystal" + +#: ../programs/crystal/window.cc:151 +msgid "Gnome Crystal is a lightweight crystal structures viewer for Gnome" +msgstr "Gnome Crystal 是 Gnome 的輕量級的晶體結構看圖軟體" + +#: ../programs/crystal/window.cc:152 +msgid "Copyright © 1999-2008 by Jean Bréfort" +msgstr "" + +#: ../programs/crystal/window.cc:302 +msgid "Quit Gnome Crystal" +msgstr "關閉 Gnome Crystal" + +#: ../programs/crystal/window.cc:304 +msgid "Prefere_nces..." +msgstr "" + +#: ../programs/crystal/window.cc:306 +msgid "_Crystal" +msgstr "結晶" + +#: ../programs/crystal/window.cc:307 +msgid "_Lattice..." +msgstr "晶格..." + +#: ../programs/crystal/window.cc:308 +msgid "Define the lattice" +msgstr "定義該晶格" + +#: ../programs/crystal/window.cc:309 +msgid "_Atoms..." +msgstr "原子..." + +#: ../programs/crystal/window.cc:310 +msgid "Add or edit atoms" +msgstr "增加或是編輯原子" + +#: ../programs/crystal/window.cc:311 +msgid "_Bonds and lines..." +msgstr "鍵與線" + +#: ../programs/crystal/window.cc:312 +msgid "Add or edit bonds and lines" +msgstr "增加或是編輯鍵及線" + +#: ../programs/crystal/window.cc:313 +msgid "_Size..." +msgstr "大小..." + +#: ../programs/crystal/window.cc:314 +msgid "Define size" +msgstr "" + +#: ../programs/crystal/window.cc:315 +msgid "_Cleavages..." +msgstr "解理面..." + +#: ../programs/crystal/window.cc:316 +msgid "Add or edit cleavages to remove some planes" +msgstr "增加或是編輯裂面以移除部份平面" + +#: ../programs/crystal/window.cc:318 +msgid "View _settings..." +msgstr "檢視之設定..." + +#: ../programs/crystal/window.cc:319 +msgid "Choose background color and model position" +msgstr "" + +#: ../programs/crystal/window.cc:321 +msgid "Create new _window" +msgstr "開啟新視窗" + +#: ../programs/crystal/window.cc:322 +msgid "Create a new window" +msgstr "開啟一個新視窗" + +#: ../programs/crystal/window.cc:323 +msgid "_Close this window" +msgstr "關閉本視窗" + +#: ../programs/crystal/window.cc:324 +msgid "Close the current window" +msgstr "" + +#: ../programs/crystal/window.cc:327 +msgid "View help for Gnome Crystal" +msgstr "檢視 Gnome Crystal 的說明" + +#: ../programs/crystal/window.cc:337 +msgid "About Gnome Crystal" +msgstr "有關 Gnome Crystal" + +#: ../programs/paint/gchempaint.desktop.in.h:1 +msgid "Edit chemical 2D structures" +msgstr "編輯平面化學結構" + +#: ../programs/paint/gchempaint.desktop.in.h:2 +msgid "GChemPaint Chemical Structures Editor " +msgstr "GChempaint 化學結構編輯軟體" + +#: ../programs/paint/gchempaint.schemas.in.h:1 +msgid "Chemical formula font family." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:2 +msgid "Chemical formula font size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:3 +msgid "Chemical formula font stretch." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:4 +msgid "Chemical formula font style." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:5 +msgid "Chemical formula font variant." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:6 +msgid "Chemical formula font weight." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:7 +msgid "" +"Compression factor when saving files. Acceptable values are 0 (no " +"compression) to 9." +msgstr "存檔時的壓縮係數. 可接受的值是從 0 (沒有壓縮) 到 9." + +#: ../programs/paint/gchempaint.schemas.in.h:8 +msgid "Default angle between two bonds." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:9 +msgid "" +"Default angle between two consecutive bonds in a chain in degrees. Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:10 +msgid "Default arrow length" +msgstr "內設的箭頭長度" + +#: ../programs/paint/gchempaint.schemas.in.h:11 +msgid "Default arrow length in picometers. Used in the default theme." +msgstr "內設的箭頭長度 (單位: pm). 使用在內設的主題." + +#: ../programs/paint/gchempaint.schemas.in.h:13 +#, no-c-format +msgid "Default arrow line width in pixels (at 100% zoom). Used in the default theme." +msgstr "內設箭頭線的寬度 (單位: 像素). 使用在內設的主題." + +#: ../programs/paint/gchempaint.schemas.in.h:14 +msgid "Default arrow line width." +msgstr "內設箭頭線的寬度." + +#: ../programs/paint/gchempaint.schemas.in.h:15 +msgid "Default bond length" +msgstr "內設鍵的長度" + +#: ../programs/paint/gchempaint.schemas.in.h:16 +msgid "Default bond length in picometers. Used in the default theme." +msgstr "內設鍵的長度 (單位: pm). 使用在內設的主題 " + +#: ../programs/paint/gchempaint.schemas.in.h:18 +#, no-c-format +msgid "Default bond line width in pixels (at 100% zoom). Used in the default theme." +msgstr "內設鍵的寬度 (單位: 像素, 當縮放比 100% 時). 使用在內設的主題." + +#: ../programs/paint/gchempaint.schemas.in.h:19 +msgid "Default bond line width." +msgstr "內設鍵的寬度." + +#: ../programs/paint/gchempaint.schemas.in.h:20 +msgid "Default charge sign size." +msgstr "預設的電荷符號大小" + +#: ../programs/paint/gchempaint.schemas.in.h:21 +msgid "Default distance between two lines for double arrows." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:22 +msgid "Default distance between two lines in a multiple bond." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:24 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) for double " +"arrows or for retrosynthesis arrows. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:26 +#, no-c-format +msgid "" +"Default distance between two lines in pixels (at 100% zoom) in a multiple " +"bond. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:28 +#, no-c-format +msgid "" +"Default distance between two lines in pixels for hash bonds (at 100% zoom). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:30 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to center in pixels (at 100% zoom). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:31 +msgid "Default distance from tip of arrowhead to center." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:33 +#, no-c-format +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft, in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:34 +msgid "" +"Default distance from tip of arrowhead to trailing point, measured along " +"shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:36 +#, no-c-format +msgid "" +"Default distance of arrowhead trailing points from outside edge of shaft in " +"pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:37 +msgid "Default distance of arrowhead trailing points from outside edge of shaft." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:38 +msgid "Default extra padding after a stoichiometric coefficient." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:40 +#, no-c-format +msgid "" +"Default extra padding between a stoichiometric coefficient and its " +"associated molecule in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:41 +msgid "Default font family used for texts. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:42 +msgid "" +"Default font stretch used for texts (0 = ultra-condensed; 1 = extra-" +"condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; " +"6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default " +"theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:43 +msgid "" +"Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). " +"Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:44 +msgid "" +"Default font variant used for texts (0 = normal; 1 = small caps). Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:45 +msgid "" +"Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; " +"6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default " +"theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:46 +msgid "Default hash line width." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:47 +msgid "Default hash lines distance." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:49 +#, no-c-format +msgid "" +"Default largest width for hash or wedge bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:50 +msgid "Default largest width for hash or wedge bonds." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:52 +#, no-c-format +msgid "" +"Default line width in pixels for hash bonds (at 100% zoom). Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:53 +msgid "Default padding around arrows." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:55 +#, no-c-format +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:56 +msgid "" +"Default padding between a '+' sign in a reaction equation and reactants " +"symbols." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:57 +msgid "Default padding between aligned objects." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:59 +#, no-c-format +msgid "" +"Default padding between arrows and associated objects in pixels (at 100% " +"zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:60 +msgid "Default padding for texts." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:62 +#, no-c-format +msgid "" +"Default padding in pixels added between consecutive objects during an " +"alignment operation (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:64 +#, no-c-format +msgid "" +"Default size of the charge sign in pixels (at 100% zoom). Used in the " +"default theme." +msgstr "預設的電荷符號大小 (單位是像素, 在縮放比 100% 時). 用在預設的主題." + +#: ../programs/paint/gchempaint.schemas.in.h:65 +msgid "Default text font family." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:66 +msgid "Default text font size." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:67 +msgid "Default text font stretch." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:68 +msgid "Default text font style." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:69 +msgid "Default text font variant." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:70 +msgid "Default text font weight." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:71 +msgid "Default theme used when creating a new file." +msgstr "新增檔案時的內設主題" + +#: ../programs/paint/gchempaint.schemas.in.h:72 +msgid "Default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:73 +msgid "File compression factor." +msgstr "檔案壓縮係數." + +#: ../programs/paint/gchempaint.schemas.in.h:74 +msgid "" +"Font family used for chemical formula such as atoms and fragments. Used in " +"the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:75 +msgid "" +"Font size used for chemical formula such as atoms and fragments. Used in the " +"default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:76 +msgid "Font size used for texts. Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:77 +msgid "" +"Font stretch used for chemical formula such as atoms and fragments (0 = " +"ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = " +"normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-" +"expanded). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:78 +msgid "" +"Font style used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = oblique; 2 = italic). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:79 +msgid "" +"Font variant used for chemical formula such as atoms and fragments (0 = " +"normal; 1 = small caps). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:80 +msgid "" +"Font weight used for chemical formula such as atoms and fragments (2 = ultra-" +"light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = " +"heavy). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:81 +msgid "If TRUE, STRING_UTF8 and STRING are added to the clipboard formats." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:82 +msgid "" +"If TRUE, the periodic table popup widget will be tearable from the tools " +"dialog box." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:84 +#, no-c-format +msgid "" +"Padding used around text objects such as atoms, texts and other typographic " +"signs in pixels (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:85 +msgid "Scale (pm per pixel)." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:87 +#, no-c-format +msgid "" +"Scale used to convert real distance to canvas distance expressed in pm per " +"pixel (at 100% zoom). Used in the default theme." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:88 +msgid "Whether the periodic table is tearable." +msgstr "" + +#: ../programs/paint/gchempaint.schemas.in.h:89 +msgid "Whether to export simple text when copying." +msgstr "" + +#: ../programs/paint/main.cc:46 +msgid "GChemPaint version: " +msgstr "" + +#: ../programs/spectra/application.cc:40 ../programs/spectra/application.cc:52 +msgid "GSpectrum" +msgstr "" + +#: ../programs/spectra/gspectrum.desktop.in.h:1 +msgid "A spectrum viewer for the GNOME desktop" +msgstr "" + +#: ../programs/spectra/gspectrum.desktop.in.h:2 +msgid "Spectrum viewer " +msgstr "" + +#: ../programs/spectra/window.cc:124 +msgid "GSpectrum is a spectrum viewer for Gnome" +msgstr "" + +#: ../programs/spectra/window.cc:126 +msgid "Copyright © 2007-2008 Jean Bréfort\n" +msgstr "" + +#: ../programs/spectra/window.cc:180 +msgid "Quit GSpectrum" +msgstr "" + +#: ../programs/spectra/window.cc:186 +msgid "View help for the Spectra Viewer" +msgstr "" + +#: ../programs/spectra/window.cc:196 +msgid "About GSpectrum" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:141 +msgid "New _Chart" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:142 +msgid "Create a new chart" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:144 +#: ../programs/table/gchemtable-curve.cc:232 +msgid "Quit GChemTable" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:146 +msgid "Color scheme" +msgstr "色彩設定" + +#: ../programs/table/gchemtable-app.cc:147 +msgid "No colors" +msgstr "不設顏色" + +#: ../programs/table/gchemtable-app.cc:148 +msgid "Use default Gtk theme colors" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:150 +msgid "Use default symbolic element colors" +msgstr "" + +#: ../programs/table/gchemtable-app.cc:151 +msgid "Physical states" +msgstr "物理狀態" + +#: ../programs/table/gchemtable-app.cc:152 +msgid "Use colors to display physical state at a given temperature" +msgstr "使用不同顏色表示物理狀態 (在設定溫度下)" + +#: ../programs/table/gchemtable-app.cc:155 +msgid "Use colors to display the family grouping of the elements" +msgstr "使用不同顏色表示元素所屬的族" + +#: ../programs/table/gchemtable-app.cc:157 +msgid "Acidity" +msgstr "酸度" + +#: ../programs/table/gchemtable-app.cc:158 +msgid "Use colors to display the acidity of the elements" +msgstr "使用不同顏色表示元素的酸度" + +#: ../programs/table/gchemtable-app.cc:160 +msgid "Electronegativity" +msgstr "電負度/陰電性 " + +#: ../programs/table/gchemtable-app.cc:161 +msgid "Use colors to display the electronegativity of the elements" +msgstr "使用不同顏色表示元素的電負度" + +#: ../programs/table/gchemtable-app.cc:163 +msgid "Atomic radius" +msgstr "原子半徑" + +#: ../programs/table/gchemtable-app.cc:164 +msgid "Use colors to display the covalent radii of the elements" +msgstr "使用不同顏色表示元素的共價半徑" + +#: ../programs/table/gchemtable-app.cc:166 +msgid "Block" +msgstr "區塊" + +#: ../programs/table/gchemtable-app.cc:167 +msgid "Use colors to display the blocks elements belong to" +msgstr "使用不同顏色表示元素所屬的區塊" + +#: ../programs/table/gchemtable-app.cc:171 +#: ../programs/table/gchemtable-curve.cc:238 +msgid "View help for the Periodic Table" +msgstr "檢視週期表的求助" + +#: ../programs/table/gchemtable-app.cc:181 +#: ../programs/table/gchemtable-curve.cc:250 +msgid "About GChemTable" +msgstr "有關 GChemTable (週期表)" + +#: ../programs/table/gchemtable-app.cc:349 +msgid "GChemTable is a chemical periodic table of the elements application" +msgstr "GChemTable 是有關元素應用的化學週期表" + +#: ../programs/table/gchemtable-elt.cc:61 +msgid "Electronic configuration: " +msgstr "電子組態: " + +#: ../programs/table/gchemtable-elt.cc:73 +msgid "Lang" +msgstr "語言" + +#: ../programs/table/gchemtable-elt.cc:80 +msgid "Name" +msgstr "名稱" + +#: ../programs/table/gchemtable-elt.cc:106 +#: ../programs/table/gchemtable-elt.cc:150 +#: ../programs/table/gchemtable-elt.cc:186 +#: ../programs/table/gchemtable-elt.cc:209 +#: ../programs/table/gchemtable-elt.cc:223 +#: ../programs/table/gchemtable-elt.cc:237 +#: ../programs/table/gchemtable-elt.cc:259 +msgid "n.a." +msgstr "沒有資料" + +#: ../programs/table/gchemtable-elt.cc:118 +#: ../programs/table/gchemtable-elt.cc:160 +#, c-format +msgid "%d:" +msgstr "%d:" + +#: ../programs/table/gchemtable-elt.cc:271 +msgid "Ion" +msgstr "離子" + +#: ../programs/table/gchemtable-elt.cc:278 +msgid "C.N." +msgstr "" + +#: ../programs/table/gchemtable-elt.cc:283 +msgid "Spin" +msgstr "自旋" + +#: ../programs/table/gchemtable-elt.cc:290 +msgid "Value" +msgstr "數值" + +#: ../programs/table/gchemtable-elt.cc:310 +msgid "Low" +msgstr "低" + +#: ../programs/table/gchemtable-elt.cc:313 +msgid "High" +msgstr "高" + +#: ../programs/table/gchemtable-curve.cc:228 +msgid "Modify the graph properties" +msgstr "修改圖的屬性" + +#: ../programs/table/gchemtable-curve.cc:240 +msgid "View help for the Curve Window" +msgstr "檢視圖形視窗的求助功能" + +#: ../programs/table/gchemtable-curve.cc:334 +#: ../programs/table/gchemtable-curve.cc:338 +#: ../programs/table/gchemtable-data.cc:528 +msgid "Pauling electronegativity" +msgstr "鮑林電負度" + +#: ../programs/table/gchemtable-curve.cc:350 +msgid "Electron affinity (kJ/mol)" +msgstr "電子親和力 (KJ/mol)" + +#: ../programs/table/gchemtable-curve.cc:354 +msgid "Electron affinity" +msgstr "電子親合力" + +#: ../programs/table/gchemtable-curve.cc:368 +msgid "1st. " +msgstr "第一" + +#: ../programs/table/gchemtable-curve.cc:371 +msgid "2nd. " +msgstr "第二" + +#: ../programs/table/gchemtable-curve.cc:374 +msgid "3rd. " +msgstr "第三" + +#: ../programs/table/gchemtable-curve.cc:377 +#, c-format +msgid "%dth. " +msgstr "第 %d" + +#: ../programs/table/gchemtable-curve.cc:380 +msgid "ionization energy (MJ/mol)" +msgstr "游離能 (MJ/mol)" + +#: ../programs/table/gchemtable-curve.cc:387 +msgid "ionization energy" +msgstr "游離能" + +#: ../programs/table/gchemtable-curve.cc:406 +#: ../programs/table/gchemtable-curve.cc:410 +msgid "Covalent radii" +msgstr "共價半徑" + +#: ../programs/table/gchemtable-curve.cc:426 +#: ../programs/table/gchemtable-curve.cc:430 +msgid "Van der Waals radii" +msgstr "凡得瓦半徑" + +#: ../programs/table/gchemtable-curve.cc:446 +#: ../programs/table/gchemtable-curve.cc:450 +msgid "Metallic radii" +msgstr "金屬結合半徑/金屬原子半徑" + +#: ../programs/table/gchemtable-curve.cc:461 +#: ../programs/table/gchemtable-curve.cc:465 +msgid "Melting point" +msgstr "熔點" + +#: ../programs/table/gchemtable-curve.cc:476 +#: ../programs/table/gchemtable-curve.cc:480 +msgid "Boiling point" +msgstr "沸點" + +#: ../programs/table/gchemtable-curve.cc:495 +#: ../programs/table/gchemtable-data.cc:526 +msgid "Atomic number" +msgstr "原子序" + +#: ../programs/table/gchemtable-data-allocator.cc:69 +msgid "Invalid data" +msgstr "無效數值" + +#: ../programs/table/gchemtable-data-allocator.cc:113 +msgid "Not supported" +msgstr "不支援" + +#: ../programs/table/gchemtable-data-allocator.cc:122 +msgid "None" +msgstr "無" + +#: ../programs/table/gchemtable-data.cc:527 +msgid "Atomic mass" +msgstr "原子量" + +#: ../programs/table/gchemtable-data.cc:529 +msgid "First ionization energy" +msgstr "第一游離能" + +#: ../programs/table/gchemtable-data.cc:530 +msgid "Second ionization energy" +msgstr "第二游離能" + +#: ../programs/table/gchemtable-data.cc:531 +msgid "Third ionization energy" +msgstr "第三游離能" + +#: ../programs/table/gchemtable-data.cc:532 +msgid "Electronic affinity" +msgstr "電子親和力" + +#: ../programs/table/gchemtable-data.cc:533 +msgid "Covalent radius" +msgstr "共價半徑" + +#: ../programs/table/gchemtable-data.cc:534 +msgid "Van der Waals radius" +msgstr "凡得瓦半徑" + +#: ../programs/table/gchemtable-data.cc:535 +msgid "Metallic radius" +msgstr "金屬結合半徑/金屬原子半徑" + +#: ../programs/table/gchemtable-data.cc:536 +msgid "Fusion temperature" +msgstr "融合溫度" + +#: ../programs/table/gchemtable-data.cc:537 +msgid "Ebullition temperature" +msgstr "沸點" + +#: ../programs/table/gchemtable.desktop.in.h:1 +msgid "A Mendeleiev table of the chemical elements" +msgstr "門得列夫週期表" + +#: ../programs/table/gchemtable.desktop.in.h:2 +msgid "Periodic table of the elements " +msgstr "週期表上的元素" + +#: ../templates/paint/haworth.xml.in.h:1 +msgid "Saccharides" +msgstr "Saccharides 醣類" + +#: ../templates/paint/haworth.xml.in.h:2 +msgid "α-D-deoxyribofuranose" +msgstr "α-D-deoxyribofuranose 去氧夫喃糖" + +#: ../templates/paint/haworth.xml.in.h:3 +msgid "α-D-fructofuranose" +msgstr "α-D-fructofuranose 果夫喃糖" + +#: ../templates/paint/haworth.xml.in.h:4 +msgid "α-D-galactopyranose" +msgstr "α-D-galactopyranose 半乳呱喃糖" + +#: ../templates/paint/haworth.xml.in.h:5 +msgid "α-D-glucopyranose" +msgstr "α-D-glucopyranose 葡萄呱喃糖" + +#: ../templates/paint/haworth.xml.in.h:6 +msgid "α-D-ribofuranose" +msgstr "α-D-ribofuranose 核夫喃糖" + +#: ../templates/paint/haworth.xml.in.h:7 +msgid "β-D-deoxyribofuranose" +msgstr "β-D-deoxyribofuranose 去氧夫喃糖" + +#: ../templates/paint/haworth.xml.in.h:8 +msgid "β-D-fructofuranose" +msgstr "β-D-fructofuranose 果夫喃糖" + +#: ../templates/paint/haworth.xml.in.h:9 +msgid "β-D-galactopyranose" +msgstr "β-D-galactopyranose 半乳呱喃糖" + +#: ../templates/paint/haworth.xml.in.h:10 +msgid "β-D-glucopyranose" +msgstr "β-D-glucopyranose 葡萄呱喃糖" + +#: ../templates/paint/haworth.xml.in.h:11 +msgid "β-D-ribofuranose" +msgstr "β-D-ribofuranose 核夫喃糖" + +#: ../templates/paint/templates.xml.in.h:1 +msgid "Adenine" +msgstr "Adenine 腺嘌呤" + +#: ../templates/paint/templates.xml.in.h:2 +msgid "Adenosine" +msgstr "Adenosine 腺苷" + +#: ../templates/paint/templates.xml.in.h:3 +msgid "Alanine" +msgstr "Alanine 丙胺酸" + +#: ../templates/paint/templates.xml.in.h:4 +msgid "Amino acids" +msgstr "Amino acids 胺基酸" + +#: ../templates/paint/templates.xml.in.h:5 +msgid "Anthracene" +msgstr "Anthracene 蒽" + +#: ../templates/paint/templates.xml.in.h:6 +msgid "Arginine" +msgstr "Arginine 精胺酸" + +#: ../templates/paint/templates.xml.in.h:7 +msgid "Aromatic hydrocarbons" +msgstr "Aromatic hydrocarbons 芳香烴" + +#: ../templates/paint/templates.xml.in.h:8 +msgid "Asparagine" +msgstr "Asparagine 天門冬醯胺" + +#: ../templates/paint/templates.xml.in.h:9 +msgid "Aspartic acid" +msgstr "Aspartic acid 天門冬酸" + +#: ../templates/paint/templates.xml.in.h:10 +msgid "Azulene" +msgstr "Azulene 薁/甘菊藍" + +#: ../templates/paint/templates.xml.in.h:11 +msgid "Benzene" +msgstr "Benzene 苯" + +#: ../templates/paint/templates.xml.in.h:12 +msgid "Cysteine" +msgstr "Cysteine 半胱胺酸" + +#: ../templates/paint/templates.xml.in.h:13 +msgid "Cytidine" +msgstr "Cytidine 胞嘧啶核苷" + +#: ../templates/paint/templates.xml.in.h:14 +msgid "Cytosine" +msgstr "Cytosine 胞嘧啶" + +#: ../templates/paint/templates.xml.in.h:15 +msgid "Deoxyadenosine" +msgstr "Deoxyadenosine 去氧腺苷" + +#: ../templates/paint/templates.xml.in.h:16 +msgid "Deoxycytidine" +msgstr "Deoxycytidine 去氧胞嘧啶核苷" + +#: ../templates/paint/templates.xml.in.h:17 +msgid "Deoxyguanosine" +msgstr "Deoxyguanosine 去氧鳥嘌呤核苷" + +#: ../templates/paint/templates.xml.in.h:18 +msgid "Deoxythymidine" +msgstr "" + +#: ../templates/paint/templates.xml.in.h:19 +msgid "Glutamic acid" +msgstr "Glutamic acid 麩胺酸" + +#: ../templates/paint/templates.xml.in.h:20 +msgid "Glutamine" +msgstr "Glutamine 麩醯胺" + +#: ../templates/paint/templates.xml.in.h:21 +msgid "Glycine" +msgstr "Glycine 甘胺酸" + +#: ../templates/paint/templates.xml.in.h:22 +msgid "Guanine" +msgstr "Guanine 鳥嘌呤" + +#: ../templates/paint/templates.xml.in.h:23 +msgid "Guanosine" +msgstr "Guanosine 鳥嘌呤核苷" + +#: ../templates/paint/templates.xml.in.h:24 +msgid "Histidine" +msgstr "Histidine 組胺酸" + +#: ../templates/paint/templates.xml.in.h:25 +msgid "Isoleucine" +msgstr "Isoleucine 異白胺酸" + +#: ../templates/paint/templates.xml.in.h:26 +msgid "Leucine" +msgstr "Leucine 白胺酸" + +#: ../templates/paint/templates.xml.in.h:27 +msgid "Lysine" +msgstr "Lysine 離胺酸" + +#: ../templates/paint/templates.xml.in.h:28 +msgid "Methionine" +msgstr "Methionine 甲硫胺酸" + +#: ../templates/paint/templates.xml.in.h:29 +msgid "Naphtalene" +msgstr "Naphtalene 萘" + +#: ../templates/paint/templates.xml.in.h:30 +msgid "Nucleic bases" +msgstr "Nucleic bases 鹼基/核鹼基" + +#: ../templates/paint/templates.xml.in.h:31 +msgid "Nucleosides" +msgstr "Nucleosides 核苷" + +#: ../templates/paint/templates.xml.in.h:32 +msgid "Phenanthrene" +msgstr "Phenanthrene 菲" + +#: ../templates/paint/templates.xml.in.h:33 +msgid "Phenylalanine" +msgstr "Phenylalanine 苯丙胺酸" + +#: ../templates/paint/templates.xml.in.h:34 +msgid "Proline" +msgstr "Proline 脯胺酸" + +#: ../templates/paint/templates.xml.in.h:35 +msgid "Pyrene" +msgstr "Pyrene 焦油腦/蒎/苯甲菲" + +#: ../templates/paint/templates.xml.in.h:36 +msgid "Serine" +msgstr "Serine 絲胺酸" + +#: ../templates/paint/templates.xml.in.h:37 +msgid "Threonine" +msgstr "Threonine 蘇胺酸" + +#: ../templates/paint/templates.xml.in.h:38 +msgid "Thymine" +msgstr "Thymine 胸嘧啶" + +#: ../templates/paint/templates.xml.in.h:39 +msgid "Tryptophan" +msgstr "Tryptophan 色胺酸" + +#: ../templates/paint/templates.xml.in.h:40 +msgid "Tyrosine" +msgstr "Tyrosine 酪胺酸" + +#: ../templates/paint/templates.xml.in.h:41 +msgid "Uracil" +msgstr "Uracil 尿嘧啶" + +#: ../templates/paint/templates.xml.in.h:42 +msgid "Uridine" +msgstr "Uridine 尿核苷" + +#: ../templates/paint/templates.xml.in.h:43 +msgid "Valine" +msgstr "Valine 纈胺酸" diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/application.cc gnome-chemistry-utils-0.10.9/programs/3d/application.cc --- gnome-chemistry-utils-0.8.6/programs/3d/application.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/3d/application.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Chemistry Utils * programs/3d/application.cc * - * Copyright (C) 2006 Jean Bréfort + * Copyright (C) 2006-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -28,39 +28,47 @@ #include "view.h" #include "window.h" #include -#include -#include +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include +#include +#include #include #include +using namespace std; + gc3dApplication::gc3dApplication (Display3DMode display3d, char const *bg): - Application (_("GChem3D Viewer"), DATADIR, "gchem3d-viewer"), + Application (_("GChem3D Viewer"), DATADIR, "gchem3d"), m_Display3D (display3d) { - if (bg) { - if (!strcmp (bg, "black")) { - m_Red = 0.; - m_Green = 0.; - m_Blue = 0.; - } else if (!strcmp (bg, "white")) { - m_Red = 0.; - m_Green = 0.; - m_Blue = 0.; - } else { - if ((strlen (bg) != 7) || (*bg != '#')) { - g_warning ("Unrecognized color: %s\n", bg); - return; - } - int r, g, b; - r = strtoul (bg + 1, NULL, 16); - b = r & 0xff; - m_Blue = (float) b / 255.; - r >>= 8; - g = r & 0xff; - m_Green = (float) g / 255.; - r >>=8; - m_Red = (float) r / 255; + if (!bg) + bg = "black"; + if (!strcmp (bg, "black")) { + m_Red = 0.; + m_Green = 0.; + m_Blue = 0.; + } else if (!strcmp (bg, "white")) { + m_Red = 1.; + m_Green = 1.; + m_Blue = 1.; + } else { + if ((strlen (bg) != 7) || (*bg != '#')) { + g_warning ("Unrecognized color: %s\n", bg); + return; } + int r, g, b; + r = strtoul (bg + 1, NULL, 16); + b = r & 0xff; + m_Blue = (float) b / 255.; + r >>= 8; + g = r & 0xff; + m_Green = (float) g / 255.; + r >>=8; + m_Red = (float) r / 255; } } @@ -100,24 +108,50 @@ } } +static cairo_status_t cairo_write_func (void *closure, const unsigned char *data, unsigned int length) +{ + gboolean result; + GsfOutput *output = GSF_OUTPUT (closure); + + result = gsf_output_write (output, length, data); + + return result ? CAIRO_STATUS_SUCCESS : CAIRO_STATUS_WRITE_ERROR; +} + bool gc3dApplication::FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *Doc) { gc3dDocument *pDoc = dynamic_cast (Doc); if(bSave) { - bool supported = false, vrml = false; + bool supported = false, vrml = false, use_cairo = false; string filename2 = filename; char const *pixbuf_type = NULL; + GOImageFormat format = GO_IMAGE_FORMAT_UNKNOWN; int i; + cairo_t *cr = NULL; + if (mime_type) { - if (!strcmp (mime_type, "model/vrml")) { + char *fnm = go_mime_to_image_format (mime_type); + if (fnm) { + format = go_image_get_format_from_name (fnm); + switch (format) { + case GO_IMAGE_FORMAT_EPS: + case GO_IMAGE_FORMAT_PDF: + case GO_IMAGE_FORMAT_PS: { + supported = true; + use_cairo = true; + break; + } + default: + pixbuf_type = GetPixbufTypeName (filename2, mime_type); + supported = (pixbuf_type); + break; + } + } else if (!strcmp (mime_type, "model/vrml")) { supported = true; vrml = true; i = strlen (filename) - 4; if ((i <= 0) || (strcmp (filename + i, ".wrl"))) filename2 += ".wrl"; - } else { - pixbuf_type = GetPixbufTypeName (filename2, mime_type); - supported = (pixbuf_type); } } if (!supported) { @@ -127,25 +161,62 @@ gtk_widget_destroy (message); return true; } - GnomeVFSURI *uri = gnome_vfs_uri_new (filename2.c_str ()); - bool err = gnome_vfs_uri_exists (uri); - gnome_vfs_uri_unref (uri); + GVfs *vfs = g_vfs_get_default (); + GFile *file = g_vfs_get_file_for_uri (vfs, filename2.c_str ()); + GError *error = NULL; + bool err = g_file_query_exists (file, NULL); gint result = GTK_RESPONSE_YES; if (err) { - gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), filename2.c_str ()); + char *unescaped = g_uri_unescape_string (filename2.c_str (), NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), unescaped); + g_free (unescaped); GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); result = gtk_dialog_run (Box); gtk_widget_destroy (GTK_WIDGET (Box)); g_free (message); - if (result == GTK_RESPONSE_YES) - gnome_vfs_unlink (filename2.c_str ()); - else + if (result == GTK_RESPONSE_YES) { + g_file_delete (file, NULL, &error); + g_object_unref (file); + } else { + g_object_unref (file); return true; + } } map options; // not used at the moment if (result == GTK_RESPONSE_YES) { if (vrml) pDoc->OnExportVRML (filename2); + else if (use_cairo) { + GsfOutput *output = gsf_output_gio_new_for_uri (filename, &error); + if (error) { + gchar * mess = g_strdup_printf (_("Could not create stream!\n%s"), error->message); + GtkWidget* message = gtk_message_dialog_new (window, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, mess); + g_free (mess); + gtk_dialog_run (GTK_DIALOG (message)); + gtk_widget_destroy (message); + g_error_free (error); + return true; + } + cairo_surface_t *surface = NULL; + switch (format) { + case GO_IMAGE_FORMAT_EPS: + surface = cairo_ps_surface_create_for_stream (cairo_write_func, output, GetImageWidth (), GetImageHeight ()); + cairo_ps_surface_set_eps (surface, TRUE); + break; + case GO_IMAGE_FORMAT_PDF: + surface = cairo_pdf_surface_create_for_stream (cairo_write_func, output, GetImageWidth (), GetImageHeight ()); + break; + case GO_IMAGE_FORMAT_PS: + surface = cairo_ps_surface_create_for_stream (cairo_write_func, output, GetImageWidth (), GetImageHeight ()); + break; + default: + break; + } + cr = cairo_create (surface); + cairo_surface_destroy (surface); + pDoc->GetView ()->RenderToCairo (cr, GetImageWidth (), GetImageHeight ()); + cairo_destroy (cr); + } else pDoc->GetView ()->SaveAsImage (filename2, pixbuf_type, options, GetImageWidth (), GetImageHeight ()); } @@ -159,8 +230,8 @@ data.display_name = (char*) pDoc->GetTitle (); data.description = NULL; data.mime_type = (char*) mime_type; - data.app_name = (char*) "gchem3d-viewer"; - data.app_exec = (char*) "gchem3d-viewer %u"; + data.app_name = const_cast ("gchem3d-viewer"); + data.app_exec = const_cast ("gchem3d-viewer %u"); data.groups = NULL; data.is_private = FALSE; gtk_recent_manager_add_full (GetRecentManager (), filename, &data); @@ -176,6 +247,9 @@ map::iterator i, end = m_SupportedPixbufFormats.end (); for (i = m_SupportedPixbufFormats.begin (); i != end; i++) l.push_front ((*i).first.c_str ()); + l.push_front ("image/x-eps"); + l.push_front ("application/postscript"); + l.push_front ("application/pdf"); l.push_front ("model/vrml"); FileChooser (this, true, l, Doc, _("Save as image"), GetImageSizeWidget ()); } diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/document.cc gnome-chemistry-utils-0.10.9/programs/3d/document.cc --- gnome-chemistry-utils-0.8.6/programs/3d/document.cc 2006-09-08 14:06:26.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/3d/document.cc 2009-11-14 11:30:39.000000000 +0100 @@ -43,7 +43,9 @@ char *title = g_strdup (GetTitle ()); if (!title || !*title) title = g_path_get_basename (uri); - dynamic_cast (m_View)->GetWindow ()->SetTitle (title); + char *buf = g_uri_unescape_string (title, NULL); + dynamic_cast (m_View)->GetWindow ()->SetTitle (buf); + g_free (buf); g_free (title); char *dirname = g_path_get_dirname (uri); m_App->SetCurDir (dirname); diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/gchem3d.desktop.in gnome-chemistry-utils-0.10.9/programs/3d/gchem3d.desktop.in --- gnome-chemistry-utils-0.8.6/programs/3d/gchem3d.desktop.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/3d/gchem3d.desktop.in 2009-11-14 11:46:22.000000000 +0100 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Molecules Viewer +_Comment=Display chemical 3D structures +Exec=gchem3d-0.10 %u +Icon=gchem3d +Terminal=false +Type=Application +Categories=GTK;GNOME;Education;Science;Chemistry; +MimeType=chemical/x-xyz;chemical/x-mdl-molfile;chemical/x-pdb; diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/gchem3d.desktop.in.in gnome-chemistry-utils-0.10.9/programs/3d/gchem3d.desktop.in.in --- gnome-chemistry-utils-0.8.6/programs/3d/gchem3d.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/3d/gchem3d.desktop.in.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Molecules Viewer @STABILITY_POSTFIX@ +_Comment=Display chemical 3D structures +Exec=gchem3d-@GCU_API_VER@ %u +Icon=gchem3d +Terminal=false +Type=Application +Categories=GTK;GNOME;Education;Science;Chemistry; +MimeType=chemical/x-xyz;chemical/x-mdl-molfile;chemical/x-pdb; diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/gchem3d-viewer.desktop.in gnome-chemistry-utils-0.10.9/programs/3d/gchem3d-viewer.desktop.in --- gnome-chemistry-utils-0.8.6/programs/3d/gchem3d-viewer.desktop.in 2007-10-14 16:30:31.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/3d/gchem3d-viewer.desktop.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -_Name=Molecules Viewer -_Comment=Display chemical 3D structures -Exec=gchem3d-viewer %u -Icon=gchem3d-viewer -Terminal=false -Type=Application -Categories=GTK;GNOME;Education;Science;Chemistry; -MimeType=chemical/x-xyz;chemical/x-mdl-molfile;chemical/x-pdb; diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/main.cc gnome-chemistry-utils-0.10.9/programs/3d/main.cc --- gnome-chemistry-utils-0.8.6/programs/3d/main.cc 2007-12-13 13:18:30.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/3d/main.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Chemistry Utils * programs/3d/main.cc * - * Copyright (C) 2006-2007 Jean Bréfort + * Copyright (C) 2006-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -27,13 +27,17 @@ #include "document.h" #include #include -#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +#endif #include -#include -#include #include -#include -#include +#ifdef GOFFICE_IS_0_6 +# include +#endif #include #include @@ -52,13 +56,15 @@ { { "version", 'v', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (void*) cb_print_version, N_("Prints GChem3d Viewer version"), NULL }, { "bgcolor", 'b', 0, G_OPTION_ARG_STRING, &bgcolor, N_("Background color: white, black or #rrggbb (default is black)"), NULL }, - { "display3d", 'd', 0, G_OPTION_ARG_STRING, &display3d, N_("How molecules are displayed; possible values are BallnStick (the default) and SpaceFill"), NULL }, + { "display3d", 'd', 0, G_OPTION_ARG_STRING, &display3d, N_("How molecules are displayed; possible values are BallnStick (the default), SpaceFill, Cylinders, and Wireframe"), NULL }, { NULL } }; static char const *Display3DModeNames[] = { "ball&stick", "spacefill", + "cylinders", + "wireframe" }; static Display3DMode display3d_mode_from_string (char const *mode) @@ -67,7 +73,7 @@ return BALL_AND_STICK; // first ensure the string is in lower case char lcmode[16]; - int i, max = strlen (mode), res = SPACEFILL; + int i, max = strlen (mode), res = WIREFRAME; if (max > 15) return BALL_AND_STICK; for (i = 0; i < max; i++) @@ -78,22 +84,22 @@ return (Display3DMode) res; } + int main(int argc, char *argv[]) { - GnomeVFSURI *uri, *auri; - char *path, *dir; + char *path, *dir, *uri; GError *error = NULL; GOptionContext *context; textdomain (GETTEXT_PACKAGE); gtk_init (&argc, &argv); gtk_gl_init (&argc, &argv); +#ifdef GOFFICE_IS_0_6 if (!gnome_vfs_init ()) { printf ("Could not initialize GnomeVFS\n"); return 1; } - /* Initialize libgoffice */ - libgoffice_init (); +#endif if (argc > 1 && argv[1][0] == '-') { context = g_option_context_new (_(" [file]")); @@ -113,7 +119,6 @@ path = g_get_current_dir (); dir = g_strconcat (path, "/", NULL); g_free (path); - uri = gnome_vfs_uri_new (dir); bool bres = false; argv++; while (*argv) { @@ -121,16 +126,19 @@ printf (_("Invalid or misplaced argument: %s\n"), *argv); delete App; g_free (dir); - gnome_vfs_uri_unref (uri); exit (-1); } - auri = gnome_vfs_uri_resolve_relative (uri, *argv); - path = gnome_vfs_uri_to_string (auri, GNOME_VFS_URI_HIDE_NONE); if (bres) pDoc = App->OnFileNew (); - bres = App->FileProcess (path, go_get_mime_type (path), false, NULL, pDoc); - g_free (path); - gnome_vfs_uri_unref (auri); + if (strstr (*argv, "://")) + uri = g_strdup (*argv); + else { + path = g_path_is_absolute (*argv)? g_strdup (*argv): g_build_filename (g_get_current_dir (), *argv, NULL); + uri = g_filename_to_uri (path, NULL, NULL); + g_free (path); + } + bres = App->FileProcess (uri, go_get_mime_type (uri), false, NULL, pDoc); + g_free (uri); argv++; } diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/Makefile.am gnome-chemistry-utils-0.10.9/programs/3d/Makefile.am --- gnome-chemistry-utils-0.8.6/programs/3d/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/3d/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -1,31 +1,59 @@ -EXTRA_DIST = $(desktop_in_files) +EXTRA_DIST = $(desktop_in_files) -CLEANFILES = $(desktop_DATA) +CLEANFILES = $(desktop_DATA) gchem3d.desktop -MAINTAINERCLEANFILES = Makefile.in +MAINTAINERCLEANFILES = Makefile.in gchem3d.desktop.in -AM_CPPFLAGS = -I$(top_srcdir) +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif +DEFS += -DDATADIR=\"$(datadir)\" -LDADD = $(top_builddir)/gcu/libgcu.la +bin_PROGRAMS = gchem3d-@GCU_API_VER@ -DEFS += -DDATADIR=\"$(datadir)\" +gchem3d_@GCU_API_VER@_SOURCES = \ + application.cc \ + application.h \ + document.cc \ + document.h \ + main.cc \ + view.cc \ + view.h \ + window.cc \ + window.h -bin_PROGRAMS = gchem3d-viewer +desktop_in_files = gchem3d.desktop.in -gchem3d_viewer_SOURCES = \ - application.cc \ - document.cc \ - main.cc \ - view.cc \ - window.cc - -noinst_HEADERS = \ - application.h \ - document.h \ - view.h \ - window.h +gchem3d-@GCU_API_VER@.desktop: gchem3d.desktop + cp $< $@ -desktop_in_files = gchem3d-viewer.desktop.in desktopdir=$(datadir)/applications -desktop_DATA = gchem3d-viewer.desktop +desktop_DATA = gchem3d-@GCU_API_VER@.desktop @INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchem3d@STABILITY@ ]; then \ + rm -f gchem3d@STABILITY@; \ + fi && \ + $(LN_S) gchem3d-@GCU_API_VER@ gchem3d@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchem3d@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchem3d@STABILITY@; \ + fi diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/Makefile.in gnome-chemistry-utils-0.10.9/programs/3d/Makefile.in --- gnome-chemistry-utils-0.8.6/programs/3d/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/3d/Makefile.in 2009-11-14 11:46:04.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,11 +16,11 @@ @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -34,10 +35,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = gchem3d-viewer$(EXEEXT) +bin_PROGRAMS = gchem3d-@GCU_API_VER@$(EXEEXT) subdir = programs/3d -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gchem3d.desktop.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -45,38 +46,55 @@ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = gchem3d.desktop.in +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_gchem3d_viewer_OBJECTS = application.$(OBJEXT) document.$(OBJEXT) \ - main.$(OBJEXT) view.$(OBJEXT) window.$(OBJEXT) -gchem3d_viewer_OBJECTS = $(am_gchem3d_viewer_OBJECTS) -gchem3d_viewer_LDADD = $(LDADD) -gchem3d_viewer_DEPENDENCIES = $(top_builddir)/gcu/libgcu.la -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +am_gchem3d_@GCU_API_VER@_OBJECTS = application.$(OBJEXT) \ + document.$(OBJEXT) main.$(OBJEXT) view.$(OBJEXT) \ + window.$(OBJEXT) +gchem3d_@GCU_API_VER@_OBJECTS = $(am_gchem3d_@GCU_API_VER@_OBJECTS) +gchem3d_@GCU_API_VER@_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(gchem3d_viewer_SOURCES) -DIST_SOURCES = $(gchem3d_viewer_SOURCES) +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(gchem3d_@GCU_API_VER@_SOURCES) +DIST_SOURCES = $(gchem3d_@GCU_API_VER@_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -desktopDATA_INSTALL = $(INSTALL_DATA) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(desktop_DATA) -HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -84,7 +102,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -104,26 +121,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -133,35 +153,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -174,14 +180,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -193,6 +206,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -204,31 +219,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -242,43 +282,64 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -EXTRA_DIST = $(desktop_in_files) -CLEANFILES = $(desktop_DATA) -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I$(top_srcdir) -LDADD = $(top_builddir)/gcu/libgcu.la -gchem3d_viewer_SOURCES = \ - application.cc \ - document.cc \ - main.cc \ - view.cc \ - window.cc - -noinst_HEADERS = \ - application.h \ - document.h \ - view.h \ - window.h +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(desktop_in_files) +CLEANFILES = $(desktop_DATA) gchem3d.desktop +MAINTAINERCLEANFILES = Makefile.in gchem3d.desktop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_vfs_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +gchem3d_@GCU_API_VER@_SOURCES = \ + application.cc \ + application.h \ + document.cc \ + document.h \ + main.cc \ + view.cc \ + view.h \ + window.cc \ + window.h -desktop_in_files = gchem3d-viewer.desktop.in +desktop_in_files = gchem3d.desktop.in desktopdir = $(datadir)/applications -desktop_DATA = gchem3d-viewer.desktop +desktop_DATA = gchem3d-@GCU_API_VER@.desktop all: all-am .SUFFIXES: @@ -287,14 +348,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/3d/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu programs/3d/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/3d/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu programs/3d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -312,37 +373,55 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gchem3d.desktop.in: $(top_builddir)/config.status $(srcdir)/gchem3d.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -gchem3d-viewer$(EXEEXT): $(gchem3d_viewer_OBJECTS) $(gchem3d_viewer_DEPENDENCIES) - @rm -f gchem3d-viewer$(EXEEXT) - $(CXXLINK) $(gchem3d_viewer_OBJECTS) $(gchem3d_viewer_LDADD) $(LIBS) + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gchem3d-@GCU_API_VER@$(EXEEXT): $(gchem3d_@GCU_API_VER@_OBJECTS) $(gchem3d_@GCU_API_VER@_DEPENDENCIES) + @rm -f gchem3d-@GCU_API_VER@$(EXEEXT) + $(CXXLINK) $(gchem3d_@GCU_API_VER@_OBJECTS) $(gchem3d_@GCU_API_VER@_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -358,21 +437,21 @@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -385,65 +464,72 @@ install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" - @list='$(desktop_DATA)'; for p in $$list; do \ + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ - $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) - @list='$(desktop_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ - rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ - done + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -464,19 +550,23 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS) +all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -502,6 +592,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -523,6 +614,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -531,18 +624,29 @@ install-dvi: install-dvi-am -install-exec-am: install-binPROGRAMS +install-dvi-am: +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -564,8 +668,9 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA - -.MAKE: install-am install-strip + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ @@ -573,16 +678,32 @@ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-desktopDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-desktopDATA + uninstall-desktopDATA uninstall-hook + +gchem3d-@GCU_API_VER@.desktop: gchem3d.desktop + cp $< $@ @INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchem3d@STABILITY@ ]; then \ + rm -f gchem3d@STABILITY@; \ + fi && \ + $(LN_S) gchem3d-@GCU_API_VER@ gchem3d@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchem3d@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchem3d@STABILITY@; \ + fi + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/window.cc gnome-chemistry-utils-0.10.9/programs/3d/window.cc --- gnome-chemistry-utils-0.8.6/programs/3d/window.cc 2007-11-01 16:18:04.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/3d/window.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Chemistry Utils * programs/3d/window.cc * - * Copyright (C) 2006-2007 Jean Bréfort + * Copyright (C) 2006-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -27,42 +27,54 @@ #include "document.h" #include "view.h" #include "window.h" -#include -#include -#include -#include -#include -#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +#else +# include +#endif #include //Callbacks -static bool on_delete_event (GtkWidget* widget, GdkEvent *event, gc3dWindow* Win) +static bool on_delete_event (GtkWidget *widget, GdkEvent *event, gc3dWindow *Win) { delete Win; return false; } -static void on_file_open (GtkWidget *widget, gc3dWindow* Win) +static void on_file_open (GtkWidget *widget, gc3dWindow *Win) { Win->OnFileOpen (); } -static void on_file_save_as_image(GtkWidget* widget, gc3dWindow* Win) +static void on_file_save_as_image(GtkWidget *widget, gc3dWindow *Win) { Win->GetApp ()->OnSaveAsImage (Win->GetDoc ()); } -static void on_file_close (GtkWidget *widget, gc3dWindow* Win) +static void on_file_close (GtkWidget *widget, gc3dWindow *Win) { Win->OnFileClose (); } -static void on_file_print (GtkWidget *widget, gc3dWindow* Win) +static void on_page_setup (GtkWidget *widget, gc3dWindow *Win) { - Win->OnFilePrint (); + Win->OnPageSetup (); } -static void on_quit (GtkWidget *widget, gc3dWindow* Win) +static void on_print_preview (GtkWidget *widget, gc3dWindow *Win) +{ + Win->GetView ()->Print (true); +} + +static void on_file_print (GtkWidget *widget, gc3dWindow *Win) +{ + Win->GetView ()->Print (false); +} + +static void on_quit (GtkWidget *widget, gc3dWindow *Win) { gc3dApplication *App = Win->GetApp (); App->OnQuit (); @@ -85,40 +97,42 @@ window->GetView ()->Update (); } -static void on_help (GtkWidget *widget, gc3dWindow* window) +static void on_help (GtkWidget *widget, gc3dWindow *window) { window->GetApp ()->OnHelp (); } -static void on_web (GtkWidget *widget, gc3dWindow* window) +static void on_web (GtkWidget *widget, gc3dWindow *window) { window->GetApp ()->OnWeb (); } -static void on_mail (GtkWidget *widget, gc3dWindow* window) +static void on_mail (GtkWidget *widget, gc3dWindow *window) { window->GetApp ()->OnMail (); } -static void on_bug (GtkWidget *widget, gc3dWindow* window) +static void on_bug (GtkWidget *widget, gc3dWindow *window) { window->GetApp ()->OnBug (); } +static void on_live_assistance (GtkWidget *widget, gc3dWindow *window) +{ + window->GetApp ()->OnLiveAssistance (); +} + static void on_about_activate_url (GtkAboutDialog *about, const gchar *url, gpointer data) { - GnomeVFSResult error = gnome_vfs_url_show(url); - if (error != GNOME_VFS_OK) { - g_print("GnomeVFSResult while trying to launch URL in about dialog: error %u\n", error); - } + reinterpret_cast (data)->GetApp ()->OnWeb (url); } -static void on_about (GtkWidget *widget, void *data) +static void on_about (GtkWidget *widget, gc3dWindow *window) { const gchar * authors[] = {"Jean Bréfort", NULL}; const gchar * comments = _("GChem3D is a molecular structures viewer for Gnome"); /* const gchar * documentors[] = {NULL}; */ - const gchar * copyright = _("Copyright © 2004-2007 Jean Bréfort\n"); + const gchar * copyright = _("Copyright © 2004-2008 Jean Bréfort\n"); const gchar * license = "This program is free software; you can redistribute it and/or\n" "modify it under the terms of the GNU General Public License as\n" @@ -133,7 +147,7 @@ "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307\n" "USA"; - gtk_about_dialog_set_url_hook(on_about_activate_url, NULL, NULL); + gtk_about_dialog_set_url_hook (on_about_activate_url, window, NULL); /* Note to translators: replace the following string with the appropriate credits for you lang */ const gchar * translator_credits = _("translator_credits"); @@ -163,6 +177,10 @@ N_("Open a file"), G_CALLBACK (on_file_open) }, { "SaveAsImage", GTK_STOCK_SAVE_AS, N_("Save As _Image..."), "I", N_("Save the current file as an image"), G_CALLBACK (on_file_save_as_image) }, + { "PageSetup", NULL, N_("Page Set_up..."), NULL, + N_("Setup the page settings for your current printer"), G_CALLBACK (on_page_setup) }, + { "PrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), NULL, + N_("Print preview"), G_CALLBACK (on_print_preview) }, { "Print", GTK_STOCK_PRINT, N_("_Print..."), "P", N_("Print the current scene"), G_CALLBACK (on_file_print) }, { "Close", GTK_STOCK_CLOSE, N_("_Close"), "W", @@ -175,6 +193,8 @@ N_("View help for the Molecules Viewer"), G_CALLBACK (on_help) }, { "Web", NULL, N_("Gnome Chemistry Utils on the _web"), NULL, N_("Browse the Gnome Chemistry Utils's web site"), G_CALLBACK (on_web) }, + { "LiveAssistance", NULL, N_("Live assistance"), NULL, + N_("Open the Gnome Chemistry Utils IRC channel"), G_CALLBACK (on_live_assistance) }, { "Mail", NULL, N_("_Ask a question"), NULL, N_("Ask a question about the Gnome Chemistry Utils"), G_CALLBACK (on_mail) }, { "Bug", NULL, N_("Report _Bugs"), NULL, @@ -186,10 +206,16 @@ static GtkRadioActionEntry radios[] = { { "BallnStick", NULL, N_("Balls and sticks"), NULL, N_("Display a balls and sticks model"), - 0 }, + BALL_AND_STICK }, { "SpaceFill", "NULL", N_("Space filling"), NULL, N_("Display a space filling model"), - 1 }, + SPACEFILL }, + { "Cylinders", "NULL", N_("Cylinders"), NULL, + N_("Display a cylinders model"), + CYLINDERS }, + { "Wireframe", "NULL", N_("Wireframe"), NULL, + N_("Display a wireframe model"), + WIREFRAME }, }; static const char *ui_description = @@ -199,51 +225,32 @@ " " " " " " +" " +" " " " +" " " " " " " " " " " " " " +" " +" " " " " " " " " " " " -" " -" " -" " +" " +" " +" " +" " " " " " " " ""; -static const char *ui_mail_description = -"" -" " -" " -" " -" " -" " -" " -" " -""; - -static const char *ui_web_description = -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -""; - gc3dWindow::gc3dWindow (gc3dApplication *App, gc3dDocument *Doc) { m_App = App; @@ -279,16 +286,9 @@ g_error_free (error); exit (EXIT_FAILURE); } - if (App->HasWebBrowser () && !gtk_ui_manager_add_ui_from_string (ui_manager, ui_web_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } - if (App->HasMailAgent () && !gtk_ui_manager_add_ui_from_string (ui_manager, ui_mail_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager, "/MainMenu/FileMenu/Open"); GtkWidget *w = gtk_recent_chooser_menu_new_for_manager (App->GetRecentManager ()); + gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (w), GTK_RECENT_SORT_MRU); GtkRecentFilter *filter = gtk_recent_filter_new (); gtk_recent_filter_add_mime_type (filter, "chemical/x-cml"); gtk_recent_filter_add_mime_type (filter, "chemical/x-mdl-molfile"); @@ -312,6 +312,12 @@ case SPACEFILL: gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_action_group_get_action (action_group, "SpaceFill")), true); break; + case CYLINDERS: + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_action_group_get_action (action_group, "Cylinders")), true); + break; + case WIREFRAME: + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_action_group_get_action (action_group, "Wireframe")), true); + break; } gtk_widget_show_all (GTK_WIDGET (m_Window)); } @@ -332,45 +338,9 @@ delete this; } -void gc3dWindow::OnFilePrint () +void gc3dWindow::OnPageSetup () { - GnomePrintConfig* config = gnome_print_config_default (); - GnomePrintContext *pc; - GnomePrintJob *gpj = gnome_print_job_new (config); - int do_preview = 0, copies = 1, collate = 0; - GnomePrintDialog *gpd; - gpd = GNOME_PRINT_DIALOG (gnome_print_dialog_new (gpj, (const guchar*) "Print test", GNOME_PRINT_DIALOG_COPIES)); - gnome_print_dialog_set_copies (gpd, copies, collate); - switch (gtk_dialog_run (GTK_DIALOG (gpd))) - { - case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW: - do_preview = 1; - break; - case GNOME_PRINT_DIALOG_RESPONSE_CANCEL: - gtk_widget_destroy (GTK_WIDGET (gpd)); - g_object_unref (gpj); - gnome_print_config_unref (config); - return; - } - gtk_widget_destroy (GTK_WIDGET (gpd)); - pc = gnome_print_job_get_context (gpj); - gnome_print_beginpage (pc, (const guchar*)""); - gdouble width, height; - gnome_print_config_get_double (config, (const guchar*) GNOME_PRINT_KEY_PAPER_WIDTH, &width); - gnome_print_config_get_double (config, (const guchar*) GNOME_PRINT_KEY_PAPER_HEIGHT, &height); - m_View->Print (pc, width, height); - gnome_print_showpage (pc); - g_object_unref (pc); - gnome_print_job_close (gpj); - if (do_preview) - { - GtkWidget *preview = gnome_print_job_preview_new (gpj, (const guchar*) _("Preview")); - gtk_widget_show (preview); - } else { - gnome_print_job_print (gpj); - } - g_object_unref (gpj); - gnome_print_config_unref (config); + new PrintSetupDlg (m_App, m_View); } void gc3dWindow::SetTitle (char const *title) diff -Nru gnome-chemistry-utils-0.8.6/programs/3d/window.h gnome-chemistry-utils-0.10.9/programs/3d/window.h --- gnome-chemistry-utils-0.8.6/programs/3d/window.h 2006-06-18 15:35:07.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/3d/window.h 2009-11-14 11:30:39.000000000 +0100 @@ -38,9 +38,11 @@ virtual ~gc3dWindow (); void OnFileOpen (); - void OnFilePrint (); + void OnPageSetup (); void OnFileClose (); void SetTitle (char const *title); + void DoPrint (GtkPrintOperation *print, GtkPrintContext *context); + GtkWindow *GetWindow () {return m_Window;} private: GtkWindow* m_Window; diff -Nru gnome-chemistry-utils-0.8.6/programs/calc/gchemcalc.cc gnome-chemistry-utils-0.10.9/programs/calc/gchemcalc.cc --- gnome-chemistry-utils-0.8.6/programs/calc/gchemcalc.cc 2008-01-09 00:31:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/calc/gchemcalc.cc 2009-11-14 11:30:39.000000000 +0100 @@ -2,9 +2,9 @@ /* * Gnome Chemistry Utils - * programs/gchemcalc.cc + * programs/calc/gchemcalc.cc * - * Copyright (C) 2005-2007 Jean Bréfort + * Copyright (C) 2005-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -24,41 +24,66 @@ #include "config.h" #include +#include +#include +#include #include +#include #include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# ifndef GO_TYPE_PLUGIN_LOADER_MODULE +# define GO_TYPE_PLUGIN_LOADER_MODULE GO_PLUGIN_LOADER_MODULE_TYPE +# include +# include +# define GOStyle GogStyle +# define go_styled_object_get_style gog_styled_object_get_style +# define GO_STYLED_OBJECT GOG_STYLED_OBJECT +# else +# include +# include +# include +# endif +# include +# include +# include +# include +#endif #include #include -#include +#include +#ifdef GOFFICE_IS_0_6 +# include +#endif +#include #include #include #include @@ -67,30 +92,191 @@ using namespace std; -class GChemCalc: public Application +class GChemCalc: public Application, public Printable { public: GChemCalc (); Formula formula; GtkLabel *markup, *raw, *weight, *mono, *monomass; + GtkWidget *graph_widget; GtkWidget *pattern_page; + GtkWindow *window; + GogGraph *graph; GogChart *chart; GogLabel *label; GogPlot *plot; GogSeries *series; GtkListStore *pclist; + + GtkWindow *GetGtkWindow () {return window;} + void DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const; + void OnSaveAsImage (); + bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *pDoc = NULL); + +private: + void ParseNodes (xmlNodePtr node); +GCU_PROP (GtkUIManager *, UIManager) }; -GChemCalc::GChemCalc (): Application ("gchemcalc"), -formula ("") +// need a way to create atoms, bonds, and molecules for ambiguous symbols evaluation +static Object* CreateAtom () { + return new Atom (); +} + +static Object* CreateBond () +{ + return new Bond (); +} + +static Object* CreateMolecule () +{ + return new Molecule (); +} + +static Object* CreateDocument () +{ + return new Document (); +} + +GChemCalc::GChemCalc (): + Application ("gchemcalc"), + formula ("") +{ + Object::AddType ("atom", CreateAtom, AtomType); + Object::AddType ("pseudo-atom", CreateAtom); + Object::AddType ("bond", CreateBond, BondType); + Object::AddType ("molecule", CreateMolecule, MoleculeType); + Object::AddType ("document", CreateDocument, DocumentType); + // Load residues + xmlDocPtr doc; + char *name; + doc = xmlParseFile (PKGDATADIR"/residues.xml"); + if (doc) { + if (!strcmp ((char*) doc->children->name, "residues")) + ParseNodes (doc->children->children); + xmlFreeDoc (doc); + } + name = g_strconcat (getenv ("HOME"), "/.gchemutils/residues.xml", NULL); + if (g_file_test (name, G_FILE_TEST_EXISTS) && (doc = xmlParseFile (name))) { + if (!strcmp ((char*) doc->children->name, "residues")) + ParseNodes (doc->children->children); + xmlFreeDoc (doc); + } + g_free (name); +} + +void GChemCalc::ParseNodes (xmlNodePtr node) +{ + Residue* r; + while (node) { + if (!strcmp ((char*) node->name, "residue")) { + r = new Residue (); + r->Load (node); + } + node = node->next; + } +} + +void GChemCalc::DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const +{ + cairo_t *cr; + gdouble width, height; + + cr = gtk_print_context_get_cairo_context (context); + width = gtk_print_context_get_width (context); + height = gtk_print_context_get_height (context); + + int w, h; // size in points + w = graph_widget->allocation.width; + h = graph_widget->allocation.height; + switch (GetScaleType ()) { + case GCU_PRINT_SCALE_NONE: + break; + case GCU_PRINT_SCALE_FIXED: + w *= Printable::GetScale (); + h *= Printable::GetScale (); + break; + case GCU_PRINT_SCALE_AUTO: + if (GetHorizFit ()) + w = width; + if (GetVertFit ()) + h = height; + break; + } + double x = 0., y = 0.; + if (GetHorizCentered ()) + x = (width - w) / 2.; + if (GetVertCentered ()) + y = (height - h) / 2.; + cairo_save (cr); + cairo_translate (cr, x, y); + gog_graph_render_to_cairo (graph, cr, w, h); + cairo_restore (cr); +} + +void GChemCalc::OnSaveAsImage () +{ + list l; + char const *mime; + map::iterator i, end = m_SupportedPixbufFormats.end (); + for (i = m_SupportedPixbufFormats.begin (); i != end; i++) + l.push_front ((*i).first.c_str ()); + if (go_image_get_format_from_name ("eps") != GO_IMAGE_FORMAT_UNKNOWN) { + mime = go_image_format_to_mime ("eps"); + if (mime) + l.push_front (mime); + } + l.push_front ("application/postscript"); + l.push_front ("application/pdf"); + l.push_front ("image/svg+xml"); + FileChooser (this, true, l, NULL, _("Save as image"), GetImageSizeWidget ()); +} + +bool GChemCalc::FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *pDoc) +{ + if(bSave) { + GFile *file = g_file_new_for_uri (filename); + bool err = g_file_query_exists (file, NULL); + gint result = GTK_RESPONSE_YES; + if (err) { + char *unescaped = g_uri_unescape_string (filename, NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), unescaped); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gspectrum"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + } + if (result == GTK_RESPONSE_YES) { + g_file_delete (file, NULL, NULL); + char *fname = go_mime_to_image_format (mime_type); + GOImageFormat format = go_image_get_format_from_name ((fname)? fname: filename); + if (format == GO_IMAGE_FORMAT_UNKNOWN) + return true; + GError *error = NULL; + GsfOutput *output = gsf_output_gio_new_for_uri (filename, &error); + if (error) { + g_error_free (error); + return true; + } + GogGraph *gr = gog_graph_dup (graph); + gog_graph_set_size (gr, GetImageWidth (), GetImageHeight ()); + gog_graph_export_image (gr, format, output, -1., -1.); + g_object_unref (gr); + + } + g_object_unref (file); + } + return false; } GChemCalc *App; static void on_quit (GtkWidget *widget, void *data) { - gtk_main_quit(); + gtk_widget_destroy (GTK_WIDGET (App->window)); } static void on_help (GtkWidget *widget, gpointer data) @@ -108,6 +294,11 @@ App->OnMail (); } +static void on_live_assistance (GtkWidget *widget, gpointer dataw) +{ + App->OnLiveAssistance (); +} + static void on_bug (GtkWidget *widget, gpointer data) { App->OnBug (); @@ -115,10 +306,7 @@ static void on_about_activate_url (GtkAboutDialog *about, const gchar *url, gpointer data) { - GnomeVFSResult error = gnome_vfs_url_show(url); - if (error != GNOME_VFS_OK) { - g_print("GnomeVFSResult while trying to launch URL in about dialog: error %u\n", error); - } + App->OnWeb (url); } static void on_about (GtkWidget *widget, void *data) @@ -126,7 +314,7 @@ const gchar * authors[] = {"Jean Bréfort", NULL}; const gchar * comments = _("GChemCalc is a simple calculator for chemists"); /* const gchar * documentors[] = {NULL}; */ - const gchar * copyright = _("Copyright © 2005-2007 Jean Bréfort\n"); + const gchar * copyright = _("Copyright © 2005-2008 Jean Bréfort"); const gchar * license = "This program is free software; you can redistribute it and/or\n" "modify it under the terms of the GNU General Public License as\n" @@ -141,7 +329,7 @@ "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307\n" "USA"; - gtk_about_dialog_set_url_hook(on_about_activate_url, NULL, NULL); + gtk_about_dialog_set_url_hook (on_about_activate_url, NULL, NULL); /* Note to translators: replace the following string with the appropriate credits for you lang */ const gchar * translator_credits = _("translator_credits"); @@ -170,23 +358,13 @@ format = g_strconcat (_("Raw formula:"), " \t", App->formula.GetRawMarkup (), NULL); gtk_label_set_markup (App->raw, format); g_free (format); - int prec; bool artificial; - double weight = App->formula.GetMolecularWeight (prec, artificial); - if (prec > 0) { - format = g_strdup_printf ("%%0.%df",prec); - } else { - if (prec < 0) { - // round the value to replace not significant figures by 0s. - double offs = pow (10.0, (double) prec); - weight = rint (weight * offs) / offs; - } - format = artificial? g_strdup ("(%.0f)"): g_strdup ("%.0f"); - } - char *weightstr = g_strdup_printf (format, weight); - gtk_label_set_text (App->weight, weightstr); + DimensionalValue weight = App->formula.GetMolecularWeight (artificial); + char *weightstr = (artificial)? + g_strdup_printf ("(%.0f g.mol-1)",weight.GetAsDouble ()): + g_strdup (weight.GetAsString ()); + gtk_label_set_markup (App->weight, weightstr); g_free (weightstr); - g_free (format); // Composition gtk_list_store_clear (App->pclist); map &raw = App->formula.GetRawFormula (); @@ -212,7 +390,7 @@ Element *elt; if (nC > 0) { elt = Element::GetElement (6); - pcent = nC * elt->GetWeight (prec) / weight * 100.; + pcent = nC * elt->GetWeight ()->GetAsDouble () / weight.GetAsDouble () * 100.; weightstr = g_strdup_printf ((artificial)? "(%.0f)": "%.2f", pcent); gtk_list_store_append (App->pclist, &iter); gtk_list_store_set (App->pclist, &iter, @@ -223,7 +401,7 @@ } if (nH > 0) { elt = Element::GetElement (1); - pcent = nH * elt->GetWeight (prec) / weight * 100.; + pcent = nH * elt->GetWeight ()->GetAsDouble () / weight.GetAsDouble () * 100.; weightstr = g_strdup_printf ((artificial)? "(%.0f)": "%.2f", pcent); gtk_list_store_append (App->pclist, &iter); gtk_list_store_set (App->pclist, &iter, @@ -236,7 +414,7 @@ for (k = elts.begin (); k != kend; k++) { nC = (*k).second; elt = Element::GetElement ((*k).first.c_str ()); - pcent = nC * elt->GetWeight (prec) / weight * 100.; + pcent = nC * elt->GetWeight ()->GetAsDouble () / weight.GetAsDouble () * 100.; weightstr = g_strdup_printf ((artificial)? "(%.0f)": "%.2f", pcent); gtk_list_store_append (App->pclist, &iter); gtk_list_store_set (App->pclist, &iter, @@ -256,9 +434,7 @@ gtk_widget_hide (App->pattern_page); return; } else { - weightstr = g_strdup_printf ("%g", pattern.GetMonoMass ()); - gtk_label_set_text (App->monomass, weightstr); - g_free (weightstr); + gtk_label_set_text (App->monomass, pattern.GetMonoMass ().GetAsString ()); gtk_widget_show (App->pattern_page); nb = pattern.GetValues (&values); // correct mean mass (for high molecular weights) @@ -268,7 +444,7 @@ t += pcent; m += i * pcent; } - mass = (int) rint (weight - m / t); + mass = (int) rint (weight.GetAsDouble () - m / t); // do not display values < 0.1 min = 0; while (values[min] < 0.1) @@ -322,7 +498,9 @@ } } -static void on_get_data (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, GogGraph *graph) +static GogGraph *graph = NULL; + +static void on_get_data (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer data) { guchar *buffer = NULL; char *format = NULL; @@ -346,7 +524,11 @@ go_locale_untranslated_booleans (); xout = gsf_xml_out_new (output); +#ifdef HAVE_GO_DATA_SERIALIZE + gog_object_write_xml_sax (GOG_OBJECT (graph), xout, NULL); +#else gog_object_write_xml_sax (GOG_OBJECT (graph), xout); +#endif g_object_unref (xout); /* go_setlocale restores bools to locale translation */ @@ -383,9 +565,10 @@ } } -void on_clear_data(GtkClipboard *clipboard, GogGraph *graph) +void on_clear_data(GtkClipboard *clipboard, gpointer data) { g_object_unref (graph); + graph = NULL; } static GtkTargetEntry const targets[] = { @@ -395,23 +578,74 @@ {(char *) "image/png", 0, 3} }; -static void on_copy (GOGraphWidget *widget) +static void on_copy () { GtkClipboard* clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + if (graph) + g_object_unref (graph); + graph = (GogGraph*) gog_object_dup (GOG_OBJECT (go_graph_widget_get_graph (GO_GRAPH_WIDGET (App->graph_widget))), NULL, NULL); gtk_clipboard_set_with_data (clipboard, targets, 4, (GtkClipboardGetFunc) on_get_data, (GtkClipboardClearFunc) on_clear_data, - gog_object_dup (GOG_OBJECT (go_graph_widget_get_graph (widget)), NULL, NULL)); + NULL); +} + +static void on_print () +{ + App->Print (false); +} + +static void on_print_preview () +{ + App->Print (true); +} + +static void on_page_setup () +{ + new PrintSetupDlg (App, App); +} + +static void on_save_as_image () +{ + App->OnSaveAsImage (); +} + +static void on_mode (GtkRadioAction *action, GtkRadioAction *current) +{ + App->formula.SetParseMode (static_cast (gtk_radio_action_get_current_value (action))); +} + +static void on_page (GtkNotebook *book, GtkNotebookPage *p, int page) +{ + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (App->GetUIManager (), "/MainMenu/FileMenu/SaveAsImage"), page); + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (App->GetUIManager (), "/MainMenu/FileMenu/PageSetup"), page); + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (App->GetUIManager (), "/MainMenu/FileMenu/PrintPreview"), page); + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (App->GetUIManager (), "/MainMenu/FileMenu/Print"), page); + gtk_widget_set_sensitive (gtk_ui_manager_get_widget (App->GetUIManager (), "/MainMenu/EditMenu/Copy"), page); } static GtkActionEntry entries[] = { { "FileMenu", NULL, N_("_File") }, + { "SaveAsImage", GTK_STOCK_SAVE_AS, N_("Save As _Image..."), "I", + N_("Save the current file as an image"), G_CALLBACK (on_save_as_image) }, + { "PageSetup", NULL, N_("Page Set_up..."), NULL, + N_("Setup the page settings for your current printer"), G_CALLBACK (on_page_setup) }, + { "PrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), NULL, + N_("Print preview"), G_CALLBACK (on_print_preview) }, + { "Print", GTK_STOCK_PRINT, N_("_Print..."), "P", + N_("Print the current file"), G_CALLBACK (on_print) }, { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", N_("Quit GChemCalc"), G_CALLBACK (on_quit) }, + { "EditMenu", NULL, N_("_Edit") }, + { "Copy", GTK_STOCK_COPY, N_("_Copy"), "C", + N_("Copy the selection"), G_CALLBACK (on_copy) }, + { "ModeMenu", NULL, N_("_Mode") }, { "HelpMenu", NULL, N_("_Help") }, { "Help", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("View help for the Chemical Calculator"), G_CALLBACK (on_help) }, { "Web", NULL, N_("Gnome Chemistry Utils on the _web"), NULL, N_("Browse the Gnome Chemistry Utils's web site"), G_CALLBACK (on_web) }, + { "LiveAssistance", NULL, N_("Live assistance"), NULL, + N_("Open the Gnome Chemistry Utils IRC channel"), G_CALLBACK (on_live_assistance) }, { "Mail", NULL, N_("_Ask a question"), NULL, N_("Ask a question about the Gnome Chemistry Utils"), G_CALLBACK (on_mail) }, { "Bug", NULL, N_("Report _Bugs"), NULL, @@ -420,43 +654,49 @@ N_("About GChemCalc"), G_CALLBACK (on_about) } }; +static GtkRadioActionEntry radios[] = { + { "Guess", NULL, N_("_Guess"), NULL, + N_("Try to guess what is correct when interpreting ambiguous symbols"), + GCU_FORMULA_PARSE_GUESS }, + { "Atom", NULL, N_("_Atom"), NULL, + N_("Interpreting ambiguous symbols as atoms"), + GCU_FORMULA_PARSE_ATOM }, + { "Residue", NULL, N_("_Nickname"), NULL, + N_("Interpret ambiguous symbols as atoms groups nicknames"), + GCU_FORMULA_PARSE_RESIDUE }, + { "Ask", NULL, N_("As_k"), NULL, + N_("Ask user for the correct interpretation of ambiguous symbols"), + GCU_FORMULA_PARSE_ASK }, +}; + static const char *ui_description = "" " " " " +" " +" " +" " +" " +" " +" " " " " " -" " -" " -" " -" " -" " -" " +" " +" " " " -" " -""; - -static const char *ui_mail_description = -"" -" " -" " -" " -" " -" " +" " +" " +" " +" " +//" " " " -" " -""; - -static const char *ui_web_description = -"" -" " " " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " " " " " ""; @@ -482,7 +722,12 @@ GError *error = NULL; textdomain (GETTEXT_PACKAGE); gtk_init (&argc, &argv); - gnome_vfs_init (); +#ifdef GOFFICE_IS_0_6 + if (!gnome_vfs_init ()) { + printf ("Could not initialize GnomeVFS\n"); + return 1; + } +#endif if (argc > 1 && argv[1][0] == '-') { context = g_option_context_new (_(" [formula]")); g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); @@ -503,41 +748,33 @@ cout << _("For usage see: gchemcalc [-?|--help]") << endl; return -1; } - - /* Initialize libgoffice */ - libgoffice_init (); - /* Initialize plugins manager */ - go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_PLUGIN_LOADER_MODULE_TYPE); App = new GChemCalc (); + + /* Initialize plugins manager */ + go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE); GladeXML *xml = glade_xml_new (GLADEDIR"/gchemcalc.glade", "gchemcalc", NULL); - GtkWidget *window = glade_xml_get_widget (xml, "gchemcalc"); - g_signal_connect (GTK_OBJECT (window), "destroy", + App->window = GTK_WINDOW (glade_xml_get_widget (xml, "gchemcalc")); + g_signal_connect (GTK_OBJECT (App->window), "destroy", G_CALLBACK (gtk_main_quit), NULL); GtkWidget *vbox = glade_xml_get_widget (xml, "vbox1"); GtkUIManager *ui_manager = gtk_ui_manager_new (); + App->SetUIManager (ui_manager); GtkActionGroup *action_group = gtk_action_group_new ("MenuActions"); gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), NULL); + gtk_action_group_add_radio_actions (action_group, radios, G_N_ELEMENTS (radios), 0, G_CALLBACK (on_mode), NULL); gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); GtkAccelGroup *accel_group = gtk_ui_manager_get_accel_group (ui_manager); - gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); + gtk_window_add_accel_group (GTK_WINDOW (App->window), accel_group); if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) { g_message ("building menus failed: %s", error->message); g_error_free (error); exit (EXIT_FAILURE); } - if (App->HasWebBrowser () && !gtk_ui_manager_add_ui_from_string (ui_manager, ui_web_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } - if (App->HasMailAgent () && !gtk_ui_manager_add_ui_from_string (ui_manager, ui_mail_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } GtkWidget *bar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0); gtk_box_reorder_child (GTK_BOX (vbox), bar, 0); @@ -573,20 +810,17 @@ App->mono = GTK_LABEL (glade_xml_get_widget (xml, "mono")); App->monomass = GTK_LABEL (glade_xml_get_widget (xml, "monomass")); App->pattern_page = glade_xml_get_widget (xml, "pattern"); -#ifdef GO_GRAPH_WIDGET_OLD_API - GtkWidget *pw = go_graph_widget_new (); -#else - GtkWidget *pw = go_graph_widget_new (NULL); -#endif - gtk_widget_show (pw); - gtk_box_pack_end (GTK_BOX (App->pattern_page), pw, TRUE, TRUE, 0); - App->chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (pw)); + App->graph_widget = go_graph_widget_new (NULL); + gtk_widget_show (App->graph_widget); + gtk_box_pack_end (GTK_BOX (App->pattern_page), App->graph_widget, TRUE, TRUE, 0); + App->graph = go_graph_widget_get_graph (GO_GRAPH_WIDGET (App->graph_widget)); + App->chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (App->graph_widget)); App->plot = (GogPlot *) gog_plot_new_by_name ("GogXYPlot"); gog_object_add_by_name (GOG_OBJECT (App->chart), "Plot", GOG_OBJECT (App->plot)); // Create a series for the plot and populate it with some simple data App->series = gog_plot_new_series (App->plot); gog_object_add_by_name (GOG_OBJECT (App->series), "Vertical drop lines", NULL); - GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (App->series)); + GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (App->series)); go_marker_set_shape (style->marker.mark, GO_MARKER_NONE); style->marker.auto_shape = false; style->line.dash_type = GO_LINE_NONE; @@ -600,17 +834,21 @@ GtkWidget *w = glade_xml_get_widget (xml, "entry"); g_signal_connect (GTK_OBJECT (w), "activate", G_CALLBACK (cb_entry_active), - window); - gcu_element_load_databases ((char*) "isotopes", NULL); + App->window); + gcu_element_load_databases ("isotopes", NULL); + Element::LoadBODR (); if (argc == 1){ gtk_entry_set_text (GTK_ENTRY (w), argv[0]); - cb_entry_active (GTK_ENTRY (w), window); + cb_entry_active (GTK_ENTRY (w), App->window); } - w = glade_xml_get_widget (xml, "copy"); - g_signal_connect_swapped (w, "clicked", G_CALLBACK (on_copy), pw); + w = glade_xml_get_widget (xml, "notebook1"); + g_signal_connect (w, "switch-page", G_CALLBACK (on_page), NULL); + on_page (NULL, NULL, 0); // force menus deactivation gtk_main (); + if (graph) + g_object_unref (graph); delete App; return 0; } diff -Nru gnome-chemistry-utils-0.8.6/programs/calc/gchemcalc.desktop.in gnome-chemistry-utils-0.10.9/programs/calc/gchemcalc.desktop.in --- gnome-chemistry-utils-0.8.6/programs/calc/gchemcalc.desktop.in 2007-10-14 16:30:32.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/calc/gchemcalc.desktop.in 2009-11-14 11:46:22.000000000 +0100 @@ -1,8 +1,8 @@ [Desktop Entry] Version=1.0 -_Name=Chemical calculator +_Name=Chemical calculator _Comment=A simple calculator for chemistry -Exec=gchemcalc +Exec=gchemcalc-0.10 Icon=gchemcalc Terminal=false Type=Application diff -Nru gnome-chemistry-utils-0.8.6/programs/calc/gchemcalc.desktop.in.in gnome-chemistry-utils-0.10.9/programs/calc/gchemcalc.desktop.in.in --- gnome-chemistry-utils-0.8.6/programs/calc/gchemcalc.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/calc/gchemcalc.desktop.in.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +_Name=Chemical calculator @STABILITY_POSTFIX@ +_Comment=A simple calculator for chemistry +Exec=gchemcalc-@GCU_API_VER@ +Icon=gchemcalc +Terminal=false +Type=Application +Categories=GTK;GNOME;Education;Science;Chemistry; diff -Nru gnome-chemistry-utils-0.8.6/programs/calc/Makefile.am gnome-chemistry-utils-0.10.9/programs/calc/Makefile.am --- gnome-chemistry-utils-0.8.6/programs/calc/Makefile.am 2008-01-19 17:43:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/calc/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -1,21 +1,50 @@ EXTRA_DIST = $(desktop_in_files) -CLEANFILES = $(desktop_DATA) +CLEANFILES = $(desktop_DATA) gchemcalc.desktop -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_srcdir) - -LDADD = $(top_builddir)/gcu/libgcu.la +MAINTAINERCLEANFILES = Makefile.in gchemcalc.dektop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(GCU_CFLAGS) +endif DEFS += -DDATADIR=\"$(datadir)\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade\" + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade\" -bin_PROGRAMS = gchemcalc +bin_PROGRAMS = gchemcalc-@GCU_API_VER@ -gchemcalc_SOURCES = gchemcalc.cc +gchemcalc_@GCU_API_VER@_SOURCES = \ + gchemcalc.cc desktop_in_files = gchemcalc.desktop.in + +gchemcalc-@GCU_API_VER@.desktop: gchemcalc.desktop + cp $< $@ + desktopdir=$(datadir)/applications -desktop_DATA = gchemcalc.desktop +desktop_DATA = gchemcalc-@GCU_API_VER@.desktop @INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchemcalc@STABILITY@ ]; then \ + rm -f gchemcalc@STABILITY@; \ + fi && \ + $(LN_S) gchemcalc-@GCU_API_VER@ gchemcalc@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchemcalc@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchemcalc@STABILITY@; \ + fi diff -Nru gnome-chemistry-utils-0.8.6/programs/calc/Makefile.in gnome-chemistry-utils-0.10.9/programs/calc/Makefile.in --- gnome-chemistry-utils-0.8.6/programs/calc/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/calc/Makefile.in 2009-11-14 11:46:04.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,9 +35,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = gchemcalc$(EXEEXT) +bin_PROGRAMS = gchemcalc-@GCU_API_VER@$(EXEEXT) subdir = programs/calc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gchemcalc.desktop.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -43,35 +46,47 @@ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = gchemcalc.desktop.in +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_gchemcalc_OBJECTS = gchemcalc.$(OBJEXT) -gchemcalc_OBJECTS = $(am_gchemcalc_OBJECTS) -gchemcalc_LDADD = $(LDADD) -gchemcalc_DEPENDENCIES = $(top_builddir)/gcu/libgcu.la -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +am_gchemcalc_@GCU_API_VER@_OBJECTS = gchemcalc.$(OBJEXT) +gchemcalc_@GCU_API_VER@_OBJECTS = \ + $(am_gchemcalc_@GCU_API_VER@_OBJECTS) +gchemcalc_@GCU_API_VER@_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(gchemcalc_SOURCES) -DIST_SOURCES = $(gchemcalc_SOURCES) +SOURCES = $(gchemcalc_@GCU_API_VER@_SOURCES) +DIST_SOURCES = $(gchemcalc_@GCU_API_VER@_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -desktopDATA_INSTALL = $(INSTALL_DATA) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(desktop_DATA) ETAGS = etags CTAGS = ctags @@ -80,7 +95,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -99,28 +113,32 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade\" + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade\" DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -130,35 +148,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -171,14 +175,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -190,6 +201,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -201,31 +214,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -239,31 +277,53 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ EXTRA_DIST = $(desktop_in_files) -CLEANFILES = $(desktop_DATA) -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I$(top_srcdir) -LDADD = $(top_builddir)/gcu/libgcu.la -gchemcalc_SOURCES = gchemcalc.cc +CLEANFILES = $(desktop_DATA) gchemcalc.desktop +MAINTAINERCLEANFILES = Makefile.in gchemcalc.dektop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_vfs_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +gchemcalc_@GCU_API_VER@_SOURCES = \ + gchemcalc.cc + desktop_in_files = gchemcalc.desktop.in desktopdir = $(datadir)/applications -desktop_DATA = gchemcalc.desktop +desktop_DATA = gchemcalc-@GCU_API_VER@.desktop all: all-am .SUFFIXES: @@ -272,14 +332,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/calc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu programs/calc/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/calc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu programs/calc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -297,37 +357,55 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gchemcalc.desktop.in: $(top_builddir)/config.status $(srcdir)/gchemcalc.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -gchemcalc$(EXEEXT): $(gchemcalc_OBJECTS) $(gchemcalc_DEPENDENCIES) - @rm -f gchemcalc$(EXEEXT) - $(CXXLINK) $(gchemcalc_OBJECTS) $(gchemcalc_LDADD) $(LIBS) + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gchemcalc-@GCU_API_VER@$(EXEEXT): $(gchemcalc_@GCU_API_VER@_OBJECTS) $(gchemcalc_@GCU_API_VER@_DEPENDENCIES) + @rm -f gchemcalc-@GCU_API_VER@$(EXEEXT) + $(CXXLINK) $(gchemcalc_@GCU_API_VER@_OBJECTS) $(gchemcalc_@GCU_API_VER@_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -339,21 +417,21 @@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -366,65 +444,72 @@ install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" - @list='$(desktop_DATA)'; for p in $$list; do \ + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ - $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) - @list='$(desktop_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ - rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ - done + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -445,13 +530,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -483,6 +572,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -504,6 +594,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -512,18 +604,29 @@ install-dvi: install-dvi-am -install-exec-am: install-binPROGRAMS +install-dvi-am: +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -545,8 +648,9 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA - -.MAKE: install-am install-strip + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ @@ -554,16 +658,32 @@ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-desktopDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-desktopDATA + uninstall-desktopDATA uninstall-hook + +gchemcalc-@GCU_API_VER@.desktop: gchemcalc.desktop + cp $< $@ @INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchemcalc@STABILITY@ ]; then \ + rm -f gchemcalc@STABILITY@; \ + fi && \ + $(LN_S) gchemcalc-@GCU_API_VER@ gchemcalc@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchemcalc@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchemcalc@STABILITY@; \ + fi + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/application.cc gnome-chemistry-utils-0.10.9/programs/crystal/application.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/application.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/application.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Crystal * application.cc * - * Copyright (C) 2001-2007 Jean Bréfort + * Copyright (C) 2001-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,27 +18,31 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include #include "application.h" #include "globals.h" -#include #include "prefs.h" #include "window.h" +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +#endif +#include +#include +#include +#include +#include #include #include +using namespace gcu; +using namespace std; + static unsigned short nNewDocs = 1; gcApplication::gcApplication(): Application ("gcrystal") @@ -54,7 +58,7 @@ gcDocument* pDoc = new gcDocument (this); gchar buf[32]; g_snprintf (buf, sizeof (buf), _("Untitled%d"), nNewDocs++); - pDoc->SetTitle (buf); + pDoc->SetLabel (buf); m_Docs.push_back (pDoc); new gcWindow (this, pDoc); return pDoc; @@ -64,6 +68,9 @@ { list l; l.push_front ("application/x-gcrystal"); +#ifdef HAVE_OPENBABEL_2_2 + l.push_front ("chemical/x-cif"); +#endif FileChooser (this, false, l); } @@ -92,48 +99,6 @@ return true; } -void gcApplication::OnFilePrint () -{ - GnomePrintConfig* config = gnome_print_config_default (); - GnomePrintContext *pc; - GnomePrintJob *gpj = gnome_print_job_new (config); - int do_preview = 0, copies = 1, collate = 0; - GnomePrintDialog *gpd; - gpd = GNOME_PRINT_DIALOG (gnome_print_dialog_new (gpj, (const guchar*) "Print test", GNOME_PRINT_DIALOG_COPIES)); - gtk_window_set_icon_name (GTK_WINDOW (gpd), "gcrystal"); - gnome_print_dialog_set_copies (gpd, copies, collate); - switch (gtk_dialog_run (GTK_DIALOG (gpd))) { - case GNOME_PRINT_DIALOG_RESPONSE_PRINT: - do_preview = 0; - break; - case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW: - do_preview = 1; - break; - case GNOME_PRINT_DIALOG_RESPONSE_CANCEL: - gtk_widget_destroy (GTK_WIDGET (gpd)); - return; - } - gtk_widget_destroy (GTK_WIDGET (gpd)); - pc = gnome_print_job_get_context (gpj); - gnome_print_beginpage (pc, (const guchar*) ""); - gdouble width, height; - gnome_print_config_get_double (config, (const guchar*) GNOME_PRINT_KEY_PAPER_WIDTH, &width); - gnome_print_config_get_double (config, (const guchar*) GNOME_PRINT_KEY_PAPER_HEIGHT, &height); - m_pActiveDoc->GetActiveView ()->Print (pc, width, height); - gnome_print_showpage (pc); - g_object_unref (pc); - gnome_print_job_close (gpj); - if (do_preview) { - GtkWidget *preview = gnome_print_job_preview_new (gpj, (const guchar*)_("Preview")); - gtk_window_set_icon_name (GTK_WINDOW (preview), "gcrystal"); - gtk_widget_show (preview); - } else { - gnome_print_job_print (gpj); - } - g_object_unref (gpj); - gnome_print_config_unref (config); -} - void gcApplication::OnSaveAsImage () { if (!m_pActiveDoc) @@ -142,6 +107,9 @@ map::iterator i, end = m_SupportedPixbufFormats.end (); for (i = m_SupportedPixbufFormats.begin (); i != end; i++) l.push_front ((*i).first.c_str ()); + l.push_front ("image/x-eps"); + l.push_front ("application/postscript"); + l.push_front ("application/pdf"); l.push_front ("model/vrml"); FileChooser (this, true, l, m_pActiveDoc, _("Save as image"), GetImageSizeWidget ()); } @@ -174,30 +142,64 @@ enum { GCRYSTAL, + CIF, VRML, + PDF, + PS, + EPS, PIXBUF }; +static cairo_status_t cairo_write_func (void *closure, const unsigned char *data, unsigned int length) +{ + gboolean result; + GsfOutput *output = GSF_OUTPUT (closure); + + result = gsf_output_write (output, length, data); + + return result ? CAIRO_STATUS_SUCCESS : CAIRO_STATUS_WRITE_ERROR; +} + bool gcApplication::FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *pDoc) { gcDocument *Doc = static_cast (pDoc); + int type = GCRYSTAL; if (!mime_type) mime_type = "application/x-gcrystal"; string filename2 = filename; if (bSave) { - int type = GCRYSTAL; char const *pixbuf_type = NULL; - if (!strcmp (mime_type, "model/vrml")) + if (!strcmp (mime_type, "chemica/x-cif")) + type = CIF; + else if (!strcmp (mime_type, "model/vrml")) type = VRML; + else if (!strcmp (mime_type, "image/x-eps")) + type = EPS; + else if (!strcmp (mime_type, "application/postscript")) + type = PS; + else if (!strcmp (mime_type, "application/pdf")) + type = PDF; else if ((pixbuf_type = GetPixbufTypeName (filename2, mime_type))) type = PIXBUF; - char *ext = NULL; + char const *ext = NULL; switch (type) { case GCRYSTAL: - ext = (char*) ".gcrystal"; + ext = ".gcrystal"; + break; + case CIF: + ext = ".cif"; break; case VRML: - ext = (char*) ".wrl"; + ext = ".wrl"; + break; + case PDF: + ext = ".pdf"; + break; + case PS: + ext = ".ps"; + break; + case EPS: + ext = ".eps"; break; default: break; @@ -207,20 +209,40 @@ if ((i <= 0) || (strcmp (filename +i, ext))) filename2 += ext; } - GnomeVFSURI *uri = gnome_vfs_uri_new (filename2.c_str ()); - bool err = gnome_vfs_uri_exists (uri); - gnome_vfs_uri_unref (uri); + GFile *file = g_file_new_for_uri (filename2.c_str ()); + bool err = g_file_query_exists (file, NULL); gint result = GTK_RESPONSE_YES; if (err) { - gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), filename2.c_str ()); + char *unescaped = g_uri_unescape_string (filename2.c_str (), NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), unescaped); + g_free (unescaped); GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); gtk_window_set_icon_name (GTK_WINDOW (Box), "gcrystal"); result = gtk_dialog_run (Box); gtk_widget_destroy (GTK_WIDGET (Box)); g_free (message); - if (result == GTK_RESPONSE_YES) - gnome_vfs_unlink (filename2.c_str ()); + if (result == GTK_RESPONSE_YES) { + // destroy the old file if needed + if (err) { + GError *error = NULL; + g_file_delete (file, NULL, &error); + if (error) { + char *unescaped = g_uri_unescape_string (filename2.c_str (), NULL); + gchar * message = g_strdup_printf (_("Error while processing %s:\n%s"), unescaped, error->message); + g_free (unescaped); + g_error_free (error); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gcrystal"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + g_object_unref (file); + return false; + } + } + } } + g_object_unref (file); map options; // not used at the moment if (result == GTK_RESPONSE_YES) switch (type) { @@ -230,23 +252,63 @@ GtkRecentData data; data.display_name = (char*) Doc->GetTitle (); data.description = NULL; - data.mime_type = (char*) "application/x-gcrystal"; - data.app_name = (char*) "gcrystal"; - data.app_exec = (char*) "gcrystal %u"; + data.mime_type = const_cast ("application/x-gcrystal"); + data.app_name = const_cast ("gcrystal"); + data.app_exec = const_cast ("gcrystal %u"); data.groups = NULL; data.is_private = FALSE; gtk_recent_manager_add_full (GetRecentManager (), filename2.c_str (), &data); Doc->RenameViews (); break; + case CIF: + break; case VRML: Doc->OnExportVRML (filename2); break; case PIXBUF: Doc->SaveAsImage (filename2, pixbuf_type, options); break; + default: { + char *fnm = go_mime_to_image_format (mime_type); + GOImageFormat format = go_image_get_format_from_name (fnm); + GError *error = NULL; + GsfOutput *output = gsf_output_gio_new_for_uri (filename2.c_str (), &error); + if (error) { + gchar * mess = g_strdup_printf (_("Could not create stream!\n%s"), error->message); + GtkWidget* message = gtk_message_dialog_new (window, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, mess); + g_free (mess); + gtk_dialog_run (GTK_DIALOG (message)); + gtk_widget_destroy (message); + g_error_free (error); + return true; + } + cairo_surface_t *surface = NULL; + switch (format) { + case GO_IMAGE_FORMAT_EPS: + surface = cairo_ps_surface_create_for_stream (cairo_write_func, output, GetImageWidth (), GetImageHeight ()); + cairo_ps_surface_set_eps (surface, TRUE); + break; + case GO_IMAGE_FORMAT_PDF: + surface = cairo_pdf_surface_create_for_stream (cairo_write_func, output, GetImageWidth (), GetImageHeight ()); + break; + case GO_IMAGE_FORMAT_PS: + surface = cairo_ps_surface_create_for_stream (cairo_write_func, output, GetImageWidth (), GetImageHeight ()); + break; + default: + return true; + } + cairo_t *cr = cairo_create (surface); + cairo_surface_destroy (surface); + Doc->GetView ()->RenderToCairo (cr, GetImageWidth (), GetImageHeight ()); + cairo_destroy (cr); + break; + } } } else { - if (strcmp (mime_type, "application/x-gcrystal")) + if (!strcmp (mime_type, "application/x-gcrystal")); + else if (!strcmp (mime_type, "chemical/x-cif")) + type = CIF; + else return true; gcDocument *xDoc = GetDoc (filename); if (xDoc) @@ -266,13 +328,18 @@ return true; } } - if (Doc->Load (filename)) { + if ((type == GCRYSTAL)? Doc->Load (filename): +#ifdef HAVE_OPENBABEL_2_2 + Doc->Import (filename, mime_type)) { +#else + false) { +#endif GtkRecentData data; data.display_name = (char*) Doc->GetTitle (); data.description = NULL; - data.mime_type = (char*) "application/x-gcrystal"; - data.app_name = (char*) "gcrystal"; - data.app_exec = (char*) "gcrystal %u"; + data.mime_type = const_cast (mime_type); + data.app_name = const_cast ("gcrystal"); + data.app_exec = const_cast ("gcrystal %u"); data.groups = NULL; data.is_private = FALSE; gtk_recent_manager_add_full (GetRecentManager (), filename, &data); @@ -280,7 +347,8 @@ list *Views = Doc->GetViews (); list ::iterator i, iend = Views->end (); int n = 1, max = Views->size (); - char const *title = Doc->GetTitle (); + Doc->RenameViews (); + char const *title = Doc->GetLabel (); for (i = Views->begin (); i != iend; i++) { gcWindow *window = dynamic_cast (*i)->GetWindow (); GtkWindow *w = window->GetWindow (); diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/application.h gnome-chemistry-utils-0.10.9/programs/crystal/application.h --- gnome-chemistry-utils-0.8.6/programs/crystal/application.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/application.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -31,9 +31,7 @@ #include "view.h" #include -using namespace gcu; - -class gcApplication: public Application +class gcApplication: public gcu::Application { public: gcApplication(); @@ -45,20 +43,19 @@ void OnFileSave(); void OnFileSaveAs(); bool OnFileClose(); - void OnFilePrint(); void OnSaveAsImage (); bool IsEmpty() {return m_Views.empty();} gcDocument* GetDoc (const char* filename); void SetOpening() {m_bFileOpening = true;} - bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *pDoc = NULL); + bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, gcu::Document *pDoc = NULL); void SetActiveDocument (gcDocument *doc) {m_pActiveDoc = doc;} void AddDocument (gcDocument *pDoc) {m_Docs.push_front (pDoc);} void RemoveDocument (gcDocument *pDoc); bool OnQuit (); private: - listm_Views; - list m_Docs; + std::listm_Views; + std::list m_Docs; gcDocument* m_pActiveDoc; GtkUIManager* m_UIManager; unsigned m_statusId; diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/atom.cc gnome-chemistry-utils-0.10.9/programs/crystal/atom.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/atom.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/atom.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,18 +18,14 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include "config.h" #include "gcrystal.h" #include "atom.h" -#ifdef GCU_OLD_VER -# include -#else -# include -#endif +#include #include #include #include diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/atom.h gnome-chemistry-utils-0.10.9/programs/crystal/atom.h --- gnome-chemistry-utils-0.8.6/programs/crystal/atom.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/atom.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/atomsdlg.cc gnome-chemistry-utils-0.10.9/programs/crystal/atomsdlg.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/atomsdlg.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/atomsdlg.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -31,7 +31,6 @@ #include #include #include -#include using namespace std; using namespace gcu; @@ -48,6 +47,7 @@ unsigned short Elt; double x, y, z; GcuAtomicRadius Radius; + double EffectiveRadiusRatio; bool CustomColor; double Blue, Red, Green, Alpha; }; @@ -180,7 +180,8 @@ s.y = pAtom->y (); s.z = pAtom->z(); s.Radius = pAtom->GetRadius (); - if (s.CustomColor = pAtom->HasCustomColor ()) + s.EffectiveRadiusRatio = pAtom->GetEffectiveRadiusRatio (); + if ((s.CustomColor = pAtom->HasCustomColor ())) pAtom->GetColor (&s.Red, &s.Green, &s.Blue, &s.Alpha); g_array_append_vals (m_Atoms, &s, 1); gtk_list_store_append (AtomList, &iter); @@ -206,6 +207,9 @@ m_RadiiSignalID = g_signal_connect (G_OBJECT (RadiusMenu), "changed", G_CALLBACK (on_radius_index_changed), this); AtomR = (GtkEntry*) glade_xml_get_widget (xml, "atomr"); g_signal_connect (G_OBJECT (Selection), "changed", GTK_SIGNAL_FUNC (on_select), this); + ScaleBtn = (GtkSpinButton *) glade_xml_get_widget (xml, "scale-btn"); + ApplyBtn = (GtkComboBox *) glade_xml_get_widget (xml, "apply-to-box"); + gtk_combo_box_set_active (ApplyBtn, 1); m_RadiusType = m_Charge = 0; m_Radii = NULL; m_Radius.type = GCU_RADIUS_UNKNOWN; @@ -238,6 +242,36 @@ if ((!GetNumber (AtomR, &(m_Radius.value.value), Min, 0)) || (m_Radius.value.value == 0.0)) { } else g_array_index (m_Atoms, struct AtomStruct, m_AtomSelected).Radius = m_Radius; + g_array_index (m_Atoms, struct AtomStruct, m_AtomSelected).EffectiveRadiusRatio = gtk_spin_button_get_value (ScaleBtn) / 100.; + // now change the radii of other atoms if requested + switch (gtk_combo_box_get_active (ApplyBtn)) { + case 0: // element + for (unsigned i = 0; i < m_Atoms->len; i++) { + if (i == (unsigned) m_AtomSelected) + continue; + struct AtomStruct *s = &g_array_index (m_Atoms, struct AtomStruct, i); + if (s->Elt != g_array_index (m_Atoms, struct AtomStruct, m_AtomSelected).Elt) + continue; + s->Radius = m_Radius; + s->EffectiveRadiusRatio = gtk_spin_button_get_value (ScaleBtn) / 100.; + } + break; + case 2: { // all atoms if possible + GcuAtomicRadius Radius = m_Radius; + for (unsigned i = 0; i < m_Atoms->len; i++) { + if (i == (unsigned) m_AtomSelected) + continue; + struct AtomStruct *s = &g_array_index (m_Atoms, struct AtomStruct, i); + Radius.Z = s->Elt; + if (Element::GetRadius (&Radius)) + s->Radius = m_Radius; + s->EffectiveRadiusRatio = gtk_spin_button_get_value (ScaleBtn) / 100.; + } + break; + } + default: // just the selected atom: nothing to do + break; + } } CrystalAtomList* Atoms = m_pDoc->GetAtomList (); //First, delete old atoms @@ -256,6 +290,7 @@ if (s->CustomColor) pAtom->SetColor ((float) s->Red, (float) s->Green, (float) s->Blue, (float) s->Alpha); Atoms->push_back (pAtom); + pAtom->SetEffectiveRadiusRatio (s->EffectiveRadiusRatio); } m_pDoc->Update (); m_pDoc->SetDirty (true); @@ -277,6 +312,7 @@ s.CustomColor = gtk_toggle_button_get_active (CustomColor); GetNumber (AtomR, &m_Radius.value.value); s.Radius = m_Radius; + s.EffectiveRadiusRatio = gtk_spin_button_get_value (ScaleBtn); g_array_append_vals (m_Atoms, &s, 1); gtk_list_store_append (AtomList, &iter); gtk_list_store_set (AtomList, &iter, @@ -334,6 +370,36 @@ if ((!GetNumber (AtomR, &(m_Radius.value.value), Min, 0)) || (m_Radius.value.value == 0.0)) { } else g_array_index(m_Atoms, struct AtomStruct, m_AtomSelected).Radius = m_Radius; + g_array_index (m_Atoms, struct AtomStruct, m_AtomSelected).EffectiveRadiusRatio = gtk_spin_button_get_value (ScaleBtn) / 100.; + // now change the radii of other atoms if requested + switch (gtk_combo_box_get_active (ApplyBtn)) { + case 0: // element + for (unsigned i = 0; i < m_Atoms->len; i++) { + if (i == (unsigned) m_AtomSelected) + continue; + struct AtomStruct *s = &g_array_index (m_Atoms, struct AtomStruct, i); + if (s->Elt != g_array_index (m_Atoms, struct AtomStruct, m_AtomSelected).Elt) + continue; + s->Radius = m_Radius; + s->EffectiveRadiusRatio = gtk_spin_button_get_value (ScaleBtn) / 100.; + } + break; + case 2: { // all atoms if possible + GcuAtomicRadius Radius = m_Radius; + for (unsigned i = 0; i < m_Atoms->len; i++) { + if (i == (unsigned) m_AtomSelected) + continue; + struct AtomStruct *s = &g_array_index (m_Atoms, struct AtomStruct, i); + Radius.Z = s->Elt; + if (Element::GetRadius (&Radius)) + s->Radius = m_Radius; + s->EffectiveRadiusRatio = gtk_spin_button_get_value (ScaleBtn) / 100.; + } + break; + } + default: // just the selected atom: nothing to do + break; + } } GtkTreeModel* model = GTK_TREE_MODEL (AtomList); GtkTreePath *path; @@ -354,6 +420,7 @@ } else { gtk_toggle_button_set_active (CustomColor, false); } + gtk_spin_button_set_value (ScaleBtn, g_array_index (m_Atoms, struct AtomStruct, m_AtomSelected).EffectiveRadiusRatio * 100.); GcuAtomicRadius r= g_array_index (m_Atoms, struct AtomStruct, m_AtomSelected).Radius; gtk_spin_button_set_value (ChargeBtn, r.charge); gtk_combo_box_set_active (RadiusTypeMenu, (r.type == GCU_RADIUS_UNKNOWN)? 0: r.type - 1); diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/atomsdlg.h gnome-chemistry-utils-0.10.9/programs/crystal/atomsdlg.h --- gnome-chemistry-utils-0.8.6/programs/crystal/atomsdlg.h 2007-11-18 12:18:02.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/atomsdlg.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -70,8 +70,8 @@ gint m_AtomSelected; GtkTreeIter m_Iter; GtkWidget *DeleteBtn, *DeleteAllBtn; - GtkComboBox *RadiusTypeMenu, *RadiusMenu; - GtkSpinButton *ChargeBtn; + GtkComboBox *RadiusTypeMenu, *RadiusMenu, *ApplyBtn; + GtkSpinButton *ChargeBtn, *ScaleBtn; const GcuAtomicRadius **m_Radii; GcuAtomicRadius m_Radius; gint m_RadiusType, m_Charge; diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/celldlg.cc gnome-chemistry-utils-0.10.9/programs/crystal/celldlg.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/celldlg.cc 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/celldlg.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/celldlg.h gnome-chemistry-utils-0.10.9/programs/crystal/celldlg.h --- gnome-chemistry-utils-0.8.6/programs/crystal/celldlg.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/celldlg.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/cleavage.cc gnome-chemistry-utils-0.10.9/programs/crystal/cleavage.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/cleavage.cc 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/cleavage.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/cleavage.h gnome-chemistry-utils-0.10.9/programs/crystal/cleavage.h --- gnome-chemistry-utils-0.8.6/programs/crystal/cleavage.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/cleavage.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/cleavagesdlg.cc gnome-chemistry-utils-0.10.9/programs/crystal/cleavagesdlg.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/cleavagesdlg.cc 2007-05-07 13:59:19.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/crystal/cleavagesdlg.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -95,7 +95,7 @@ g_object_set(G_OBJECT(renderer), "editable", true, NULL); g_object_set_data(G_OBJECT (renderer), "column", (gint *)COLUMN_H); g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); - column = gtk_tree_view_column_new_with_attributes("h", renderer, "text", 0, NULL); + column = gtk_tree_view_column_new_with_attributes(_("h"), renderer, "text", 0, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN (column), 50); @@ -105,7 +105,7 @@ g_object_set(G_OBJECT(renderer), "editable", true, NULL); g_object_set_data(G_OBJECT (renderer), "column", (gint *)COLUMN_K); g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); - column = gtk_tree_view_column_new_with_attributes("k", renderer, "text", 1, NULL); + column = gtk_tree_view_column_new_with_attributes(_("k"), renderer, "text", 1, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN (column), 50); @@ -115,7 +115,7 @@ g_object_set(G_OBJECT(renderer), "editable", true, NULL); g_object_set_data(G_OBJECT (renderer), "column", (gint *)COLUMN_L); g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); - column = gtk_tree_view_column_new_with_attributes("l", renderer, "text", 2, NULL); + column = gtk_tree_view_column_new_with_attributes(_("l"), renderer, "text", 2, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN (column), 50); diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/cleavagesdlg.h gnome-chemistry-utils-0.10.9/programs/crystal/cleavagesdlg.h --- gnome-chemistry-utils-0.8.6/programs/crystal/cleavagesdlg.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/cleavagesdlg.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/docprop.cc gnome-chemistry-utils-0.10.9/programs/crystal/docprop.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/docprop.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/docprop.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,156 @@ +// -*- C++ -*- + +/* + * GChemPaint library + * docprop.cc + * + * Copyright (C) 2002-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "docprop.h" +#include "document.h" +#include "application.h" +#include "window.h" +#include + +using namespace gcu; +using namespace std; + +static void on_title_changed (GtkEntry *entry, gcDocPropDlg *dlg) +{ + dlg->OnTitleChanged (gtk_entry_get_text (entry)); +} + +static bool on_title_focused_out (GtkEntry *entry, GdkEventFocus *event, gcDocPropDlg *dlg) +{ + dlg->OnTitleChanged (gtk_entry_get_text (entry)); + return false; +} + +static void on_name_changed (GtkEntry *entry, gcDocPropDlg *dlg) +{ + dlg->OnNameChanged (gtk_entry_get_text (entry)); +} + +static bool on_name_focused_out (GtkEntry *entry, GdkEventFocus *event, gcDocPropDlg *dlg) +{ + dlg->OnNameChanged (gtk_entry_get_text (entry)); + return false; +} + +static void on_mail_changed (GtkEntry *entry, gcDocPropDlg *dlg) +{ + dlg->OnMailChanged (gtk_entry_get_text (entry)); +} + +static bool on_mail_focused_out (GtkEntry *entry, GdkEventFocus *event, gcDocPropDlg *dlg) +{ + dlg->OnMailChanged (gtk_entry_get_text (entry)); + return false; +} + +static void on_comments_changed (GtkTextBuffer *buffer, gcDocPropDlg *dlg) +{ + GtkTextIter start, end; + gtk_text_buffer_get_bounds (buffer, &start, &end); + char *text = gtk_text_buffer_get_text (buffer, &start, &end, true); + dlg->OnCommentsChanged (text); + g_free (text); +} + +gcDocPropDlg::gcDocPropDlg (gcDocument* pDoc): + Dialog (pDoc->GetApp (), GLADEDIR"/docprop.glade", "properties", pDoc) +{ + if (!xml) { + delete this; + return; + } + m_pDoc = pDoc; + Title = GTK_ENTRY (glade_xml_get_widget (xml, "title")); + const gchar* chn; + chn = m_pDoc->GetTitle (); + if (chn) + gtk_entry_set_text (Title, chn); + g_signal_connect (G_OBJECT (Title), "activate", G_CALLBACK (on_title_changed), this); + g_signal_connect (G_OBJECT (Title), "focus-out-event", G_CALLBACK (on_title_focused_out), this); + Name = GTK_ENTRY (glade_xml_get_widget (xml, "name")); + chn = m_pDoc->GetAuthor (); + if (chn) + gtk_entry_set_text (Name, chn); + g_signal_connect (G_OBJECT (Name), "activate", G_CALLBACK (on_name_changed), this); + g_signal_connect (G_OBJECT (Name), "focus-out-event", G_CALLBACK (on_name_focused_out), this); + Mail = GTK_ENTRY (glade_xml_get_widget (xml, "mail")); + chn = m_pDoc->GetMail (); + if (chn) + gtk_entry_set_text (Mail, chn); + g_signal_connect (G_OBJECT (Mail), "activate", G_CALLBACK (on_mail_changed), this); + g_signal_connect (G_OBJECT (Mail), "focus-out-event", G_CALLBACK (on_mail_focused_out), this); + CreationDate = GTK_LABEL (glade_xml_get_widget(xml, "creation")); + const GDate* Date = pDoc->GetCreationDate (); + gchar tmp[64]; + /* The following format prints date as "Monday, July 8, 2002" */ + if (g_date_valid (Date)) { + g_date_strftime (tmp, sizeof (tmp), _("%A, %B %d, %Y"), Date); + gtk_label_set_text (CreationDate, tmp); + } + RevisionDate = GTK_LABEL (glade_xml_get_widget (xml, "revision")); + Date = pDoc->GetRevisionDate (); + if (g_date_valid(Date)) + { + g_date_strftime (tmp, sizeof (tmp), _("%A, %B %d, %Y"), Date); + gtk_label_set_text (RevisionDate, tmp); + } + Comments = GTK_TEXT_VIEW (glade_xml_get_widget (xml, "comments")); + GtkTextBuffer *Buffer = gtk_text_view_get_buffer (Comments); + chn = m_pDoc->GetComment (); + if(chn) + gtk_text_buffer_set_text (Buffer, chn , -1); + g_signal_connect (G_OBJECT (Buffer), "changed", G_CALLBACK (on_comments_changed), this); + gtk_widget_show_all(GTK_WIDGET (dialog)); +} + +gcDocPropDlg::~gcDocPropDlg () +{ +} + +void gcDocPropDlg::OnTitleChanged (char const *title) +{ + m_pDoc->SetTitle (title); + m_pDoc->RenameViews (); + m_pDoc->SetDirty (); +} + +void gcDocPropDlg::OnNameChanged (char const *name) +{ + m_pDoc->SetAuthor (name); + m_pDoc->SetDirty (); +} + +void gcDocPropDlg::OnMailChanged (char const *mail) +{ + m_pDoc->SetMail (mail); + m_pDoc->SetDirty (); +} + +void gcDocPropDlg::OnCommentsChanged (char const *comment) +{ + m_pDoc->SetComment (comment); + m_pDoc->SetDirty (); +} + diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/docprop.h gnome-chemistry-utils-0.10.9/programs/crystal/docprop.h --- gnome-chemistry-utils-0.8.6/programs/crystal/docprop.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/docprop.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,52 @@ +// -*- C++ -*- + +/* + * Gnome Crystal + * docprop.h + * + * Copyright (C) 2002-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCRYSTAL_DOC_PROP_H +#define GCRYSTAL_DOC_PROP_H + +#include +#include + +class gcDocument; + +class gcDocPropDlg: public gcu::Dialog +{ +public: + gcDocPropDlg (gcDocument* pDoc); + virtual ~gcDocPropDlg (); + + void OnTitleChanged (char const *title); + void OnNameChanged (char const *title); + void OnMailChanged (char const *title); + void OnCommentsChanged (char const *title); + +private: + gcDocument* m_pDoc; + GtkEntry *Title, *Name, *Mail; + GtkLabel *CreationDate, *RevisionDate; + GtkTextView *Comments; + gulong m_ChangedSignal; +}; + +#endif //GCRYSTAL_DOC_PROP_H diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/document.cc gnome-chemistry-utils-0.10.9/programs/crystal/document.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/document.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/document.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Crystal * document.cc * - * Copyright (C) 2000-2007 Jean Bréfort + * Copyright (C) 2000-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -41,28 +41,21 @@ #include #include #include -//#include -#include +#include +#include #include #include -#ifdef HAVE_FSTREAM -# include -#else -# include -#endif -#ifdef HAVE_OSTREAM -# include -#else -# include -#endif -#ifdef HAVE_SSTREAM -# include -#else -# include -#endif +#include +#include +#include +#include #include -#include -#include +#ifdef HAVE_OPENBABEL_2_2 +# include +# include +# include +using namespace OpenBabel; +#endif #include #define SAVE 1 @@ -81,12 +74,15 @@ m_title = NULL; m_bClosing = false; m_ReadOnly = false; + m_Author = m_Mail = m_Label = m_Comment = NULL; + g_date_set_time_t (&m_CreationDate, time (NULL)); + g_date_clear (&m_RevisionDate, 1); } gcDocument::~gcDocument() { - if (m_filename != NULL) g_free(m_filename); - if (m_title) g_free(m_title); + g_free(m_filename); + g_free(m_title); Reinit(); Dialog *dialog; while (!m_Dialogs.empty()) @@ -174,10 +170,20 @@ void gcDocument::SetFileName (const string &filename) { - GnomeVFSFileInfo *info = gnome_vfs_file_info_new (); - gnome_vfs_get_file_info (filename.c_str (), info, GNOME_VFS_FILE_INFO_DEFAULT); - m_ReadOnly = !(info->permissions & (GNOME_VFS_PERM_USER_WRITE | GNOME_VFS_PERM_GROUP_WRITE)); - gnome_vfs_file_info_unref (info); + GFile *file = g_file_new_for_uri (filename.c_str ()); + GError *error = NULL; + GFileInfo *info = g_file_query_info (file, + G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, + G_FILE_QUERY_INFO_NONE, NULL, &error); + if (error) { + g_warning ("GIO error: %s", error->message); + g_error_free (error); + m_ReadOnly = true; + } else + m_ReadOnly = !g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE); + if (info) + g_object_unref (info); + g_object_unref (file); if (m_filename) g_free (m_filename); m_filename = g_strdup (filename.c_str ()); @@ -196,18 +202,34 @@ int j = filename.length () - 1; while ((i < j) && (m_filename[j] != '.')) j--; - gchar* title = (strcmp (m_filename + j, ".gcrystal"))? g_strdup (m_filename + i):g_strndup (m_filename + i, j - i); - SetTitle (title); - g_free (title); + if (!m_title) { + g_free (m_Label); + char *buf = (strcmp (m_filename + j, ".gcrystal"))? g_strdup (m_filename + i): g_strndup (m_filename + i, j - i); + m_Label = g_uri_unescape_string (buf, NULL); + g_free (buf); + } } void gcDocument::SetTitle(const gchar* title) { - if (m_title) g_free(m_title); + g_free(m_title); m_title = g_strdup(title); + g_free(m_Label); + m_Label = g_strdup(title); +} + +static int cb_xml_to_vfs (GOutputStream *output, const char* buf, int nb) +{ + GError *error = NULL; + int n = g_output_stream_write (output, buf, nb, NULL, &error); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + } + return n; } -void gcDocument::Save() +void gcDocument::Save() const { if (!m_filename) return; @@ -216,12 +238,77 @@ try { xml = BuildXMLTree(); - if (xmlSaveFile (m_filename, xml) < 0) - Error (SAVE); - + if (!g_date_valid (&m_CreationDate)) + g_date_set_time_t (&const_cast (this)->m_CreationDate, time (NULL)); + g_date_set_time_t (&const_cast (this)->m_RevisionDate, time (NULL)); + gchar tmp[64]; + g_date_strftime (tmp, sizeof (tmp), "%m/%d/%Y", &m_CreationDate); + xmlNewProp (xml->children, (xmlChar*) "creation", (xmlChar*) tmp); + g_date_strftime (tmp, sizeof (tmp), "%m/%d/%Y", &m_RevisionDate); + xmlNewProp (xml->children, (xmlChar*) "revision", (xmlChar*) tmp); + xmlNodePtr node; + + if (m_title && *m_title) { + node = xmlNewDocNode (xml, NULL, (xmlChar*) "title", (xmlChar*) m_title); + if (node) + xmlAddChild (xml->children, node); + else + throw (int) 0; + } + if ((m_Author && *m_Author) || (m_Mail && *m_Mail)) { + node = xmlNewDocNode (xml, NULL, (xmlChar*) "author", NULL); + if (node) { + if (m_Author && *m_Author) + xmlNewProp (node, (xmlChar*) "name", (xmlChar*) m_Author); + if (m_Mail && *m_Mail) + xmlNewProp (node, (xmlChar*) "e-mail", (xmlChar*) m_Mail); + xmlAddChild (xml->children, node); + } + else + throw (int) 0; + } + if (m_Comment && *m_Comment) { + node = xmlNewDocNode (xml, NULL, (xmlChar*) "comment", (xmlChar*) m_Comment); + if (node) + xmlAddChild (xml->children, node); + else + throw (int) 0; + } + xmlIndentTreeOutput = true; + xmlKeepBlanksDefault (0); + + xmlOutputBufferPtr buf = xmlAllocOutputBuffer (NULL); + GFile *file = g_file_new_for_uri (m_filename); + GError *error = NULL; + if (g_file_query_exists (file, NULL)) { + // FIXME: for now, delete it, but we might make a backup? + g_file_delete (file, NULL, &error); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + g_object_unref (file); + throw (int) 1; + } + } + GOutputStream *output = G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, NULL, &error)); + if (error) { + g_message ("GIO error: %s", error->message); + g_error_free (error); + g_object_unref (file); + throw (int) 1; + } + buf->context = output; + buf->closecallback = NULL; + buf->writecallback = (xmlOutputWriteCallback) cb_xml_to_vfs; + int n = xmlSaveFormatFileTo (buf, xml, NULL, true); + g_output_stream_close (output, NULL, NULL); + g_object_unref (file); + if (n < 0) + throw 1; + xmlFreeDoc (xml); - SetDirty (false); - m_ReadOnly = false; // if saving succeded, the file is not read only... + const_cast (this)->SetDirty (false); + const_cast (this)->m_ReadOnly = false; // if saving succeded, the file is not read only... } catch (int num) { xmlFreeDoc (xml); @@ -229,24 +316,26 @@ } } -void gcDocument::Error (int num) +void gcDocument::Error (int num) const { gchar *mess = NULL; GtkWidget* message; + char *unescaped = g_uri_unescape_string (m_filename, NULL); switch (num) { case SAVE: - mess = g_strdup_printf (_("Could not save file\n%s"), m_filename); + mess = g_strdup_printf (_("Could not save file\n%s"), unescaped); break; case LOAD: - mess = g_strdup_printf (_("Could not load file\n%s"), m_filename); + mess = g_strdup_printf (_("Could not load file\n%s"), unescaped); break; case XML: - mess = g_strdup_printf (_("%s: invalid xml file.\nTree is empty?"), m_filename); + mess = g_strdup_printf (_("%s: invalid xml file.\nTree is empty?"), unescaped); break; case FORMAT: - mess = g_strdup_printf (_("%s: invalid file format."), m_filename); + mess = g_strdup_printf (_("%s: invalid file format."), unescaped); break; } + g_free (unescaped); message = gtk_message_dialog_new (NULL, (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, mess); g_signal_connect_swapped (G_OBJECT (message), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (message)); gtk_widget_show (message); @@ -262,14 +351,14 @@ else oldfilename = NULL; oldtitle = g_strdup (m_title); try { - if (SetFileName (filename), !m_filename || !m_title) - throw (int) 0; - if (!(xml = xmlParseFile (filename.c_str ()))) + if (SetFileName (filename), !m_filename || !m_Label) throw (int) 1; - if (xml->children == NULL) + if (!(xml = xmlParseFile (filename.c_str ()))) throw (int) 2; - if (strcmp ((char*) xml->children->name, "crystal")) + if (xml->children == NULL) throw (int) 3; + if (strcmp ((char*) xml->children->name, "crystal")) + throw (int) 4; if (oldfilename) g_free(oldfilename); g_free (oldtitle); @@ -281,9 +370,10 @@ switch (num) { case 2: + case 3: Error(XML); break; - case 3: + case 4: Error(FORMAT); break; default: @@ -318,6 +408,65 @@ //look for generator node unsigned version = 0xffffff , major, minor, micro; node = xml->children; + if (m_Author) { + g_free (m_Author); + m_Author = NULL; + } + if (m_Mail) { + g_free (m_Mail); + m_Mail = NULL; + } + if (m_Comment) { + g_free (m_Comment); + m_Comment = NULL; + } + g_date_clear (&m_CreationDate, 1); + g_date_clear (&m_RevisionDate, 1); + txt = (char*) xmlGetProp (xml, (xmlChar*) "creation"); + if (txt) { + g_date_set_parse (&m_CreationDate, txt); + if (!g_date_valid (&m_CreationDate)) + g_date_clear (&m_CreationDate, 1); + xmlFree (txt); + } + txt = (char*) xmlGetProp (xml, (xmlChar*) "revision"); + if (txt) { + g_date_set_parse (&m_RevisionDate, txt); + if (!g_date_valid(&m_RevisionDate)) + g_date_clear(&m_RevisionDate, 1); + xmlFree (txt); + } + + node = GetNodeByName (xml, "title"); + if (node) { + txt = (char*) xmlNodeGetContent (node); + if (txt) { + g_free (m_title); + m_title = g_strdup (txt); + xmlFree (txt); + } + } + node = GetNodeByName (xml, "author"); + if (node) { + txt = (char*) xmlGetProp (node, (xmlChar*) "name"); + if (txt) { + m_Author = g_strdup (txt); + xmlFree (txt); + } + txt = (char*) xmlGetProp (node, (xmlChar*) "e-mail"); + if (txt) { + m_Mail = g_strdup (txt); + xmlFree (txt); + } + } + node = GetNodeByName (xml, "comment"); + if (node) { + txt = (char*) xmlNodeGetContent (node); + if (txt) { + m_Comment = g_strdup (txt); + xmlFree (txt); + } + } while (node) { if (!strcmp ((const char*)(node->name), "generator")) break; @@ -422,27 +571,31 @@ typedef struct {int n; std::list l;} sAtom; typedef struct {int n; std::list l;} sLine; -void gcDocument::OnExportVRML (const string &FileName) +void gcDocument::OnExportVRML (const string &FileName) const { char *old_num_locale, tmp[128]; double x0, x1, x2, x3, x4, x5; int n = 0; try { ostringstream file; - GnomeVFSHandle *handle = NULL; - GnomeVFSFileSize fs; - GnomeVFSResult res; + GError *error = NULL; + GFile *stream = g_file_new_for_uri (FileName.c_str ()); + GOutputStream *output = G_OUTPUT_STREAM (g_file_create (stream, G_FILE_CREATE_NONE, NULL, &error)); + if (error) { + cerr << "gio error: " << error->message << endl; + g_error_free (error); + g_object_unref (file); + throw (int) 1; + } std::mapAtomsMap; std::mapLinesMap; - if ((res = gnome_vfs_create (&handle, FileName.c_str (), GNOME_VFS_OPEN_WRITE, true, 0644)) != GNOME_VFS_OK) - throw (int) res; old_num_locale = g_strdup(setlocale(LC_NUMERIC, NULL)); setlocale(LC_NUMERIC, "C"); file << "#VRML V2.0 utf8" << endl; //Create prototypes for atoms - CrystalAtomList::iterator i; + CrystalAtomList::const_iterator i; for (i = Atoms.begin(); i != Atoms.end(); i++) { (*i)->GetColor(&x0, &x1, &x2, &x3); @@ -459,7 +612,7 @@ } //Create prototypes for bonds - CrystalLineList::iterator j; + CrystalLineList::const_iterator j; n = 0; for (j = Lines.begin(); j != Lines.end(); j++) { @@ -539,12 +692,18 @@ setlocale(LC_NUMERIC, old_num_locale); g_free(old_num_locale); - if ((res = gnome_vfs_write (handle, file.str ().c_str (), (GnomeVFSFileSize) file.str ().size (), &fs)) != GNOME_VFS_OK) - throw (int) res; - gnome_vfs_close (handle); + g_output_stream_write (output, file.str ().c_str (), file.str ().size (), NULL, &error); + if (error) { + cerr << "gio error: " << error->message << endl; + g_error_free (error); + g_object_unref (stream); + throw (int) 1; + } + g_output_stream_close (output, NULL, NULL); + g_object_unref (stream); } catch (int n) { - fprintf (stderr, "gnome-vfs error #%d\n",n); + // TODO: implement a meaningful error handler. } } @@ -592,7 +751,7 @@ m_bClosing = true; if (!GetDirty ()) return true; - gchar* str = g_strdup_printf(_("\"%s\" has been modified. Do you wish to save it?"), m_title); + gchar* str = g_strdup_printf(_("\"%s\" has been modified. Do you wish to save it?"), m_Label); GtkWidget* mbox; int res; do @@ -639,7 +798,7 @@ return (CrystalCleavage*) new gcCleavage(); } -const char* gcDocument::GetProgramId() +const char* gcDocument::GetProgramId () const { return "Gnome Crystal "VERSION; } @@ -669,12 +828,131 @@ if (!w) continue; if (max > 1) { - char *t = g_strdup_printf ("%s (%i)", m_title, n++); + char *t = g_strdup_printf ("%s (%i)", m_Label, n++); gtk_window_set_title (w, t); g_free (t); } else - gtk_window_set_title (w, m_title); + gtk_window_set_title (w, m_Label); window->ActivateActionWidget ("ui/MainMenu/FileMenu/Save", !m_ReadOnly); window->ActivateActionWidget ("ui/MainToolbar/Save", !m_ReadOnly); } } + +#ifdef HAVE_OPENBABEL_2_2 +bool gcDocument::Import (const string &filename, const string& mime_type) +{ + gchar *oldfilename, *oldtitle; + if (m_filename) + oldfilename = g_strdup (m_filename); + else oldfilename = NULL; + oldtitle = g_strdup (m_title); + char *old_num_locale; + bool result = false, read_only = false; + GFile *file; + GFileInfo *info = NULL; + GError *error = NULL; + try { + if (!filename.length ()) + throw (int) 0; + file = g_file_new_for_uri (filename.c_str ()); + info = g_file_query_info (file, + G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE","G_FILE_ATTRIBUTE_STANDARD_SIZE, + G_FILE_QUERY_INFO_NONE, NULL, &error); + if (error) { + g_warning ("GIO error: %s", error->message); + g_error_free (error); + if (info) + g_object_unref (info); + g_object_unref (file); + throw (int) 1; + } + gsize size = g_file_info_get_size (info); + read_only = !g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE); + g_object_unref (info); + if (SetFileName (filename), !m_filename) + throw (int) 2; + g_free (oldfilename); + g_free (oldtitle); + char *buf = new char[size + 1]; + GInputStream *input = G_INPUT_STREAM (g_file_read (file, NULL, &error)); + gsize n = 0; + while (n < size) { + n += g_input_stream_read (input, buf, size, NULL, &error); + if (error) { + g_message ("GIO could not read the file: %s", error->message); + g_error_free (error); + delete [] buf; + g_object_unref (input); + g_object_unref (file); + throw (int) 3; + } + } + g_object_unref (input); + g_object_unref (file); + buf[size] = 0; + istringstream iss (buf); + old_num_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + OBMol Mol; + OBConversion Conv; + OBFormat* pInFormat = OBFormat::FormatFromMIME (mime_type.c_str ()); + if (pInFormat == NULL) + throw (int) 4; + Conv.SetInFormat (pInFormat); + Conv.Read (&Mol, &iss); + result = ImportOB (Mol); + Mol.Clear (); + setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + g_free (buf); + if (!result) + throw (int) 5; + UpdateAllViews (); + return true; + } + catch (int num) { + switch (num) + { + default: + Error(LOAD); + } + if (num >= 0) { + if (oldfilename) { + SetFileName (oldfilename); + g_free (oldfilename); + } else { + g_free (m_filename); + m_filename = NULL; + } + SetTitle (oldtitle); + g_free (oldtitle); + } + return false; + } + return false; +} +#endif + +void gcDocument::SetAuthor (char const *author) +{ + g_free (m_Author); + m_Author = g_strdup (author); +} + +void gcDocument::SetMail (char const *mail) +{ + g_free (m_Mail); + m_Mail = g_strdup (mail); +} + +void gcDocument::SetComment (char const *comment) +{ + g_free (m_Comment); + m_Comment = g_strdup (comment); +} + +void gcDocument::SetLabel (char const *label) +{ + g_free (m_Label); + m_Label = g_strdup (label); +} diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/document.h gnome-chemistry-utils-0.10.9/programs/crystal/document.h --- gnome-chemistry-utils-0.8.6/programs/crystal/document.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/document.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -33,12 +33,16 @@ #include "line.h" #include "cleavage.h" -using namespace gcu; +#ifdef HAVE_OPENBABEL_2_2 +namespace OpenBabel { + class OBMol; +} +#endif class gcView; class gcApplication; -class gcDocument: public CrystalDoc +class gcDocument: public gcu::CrystalDoc { //Constructor and destructor public: @@ -59,14 +63,17 @@ void GetCell(gcLattices *lattice, gdouble *a, gdouble *b, gdouble *c, gdouble *alpha, gdouble *beta, gdouble *gamma); void SetCell(gcLattices lattice, gdouble a, gdouble b, gdouble c, gdouble alpha, gdouble beta, gdouble gamma); const gchar* GetFileName() {return m_filename;} - void SetFileName(const string &filename); + void SetFileName(const std::string &filename); gchar* GetTitle() {return m_title;} void SetTitle(const gchar* title); - void Save (); - bool Load (const string &filename); + void Save () const; + bool Load (const std::string &filename); +#ifdef HAVE_OPENBABEL_2_2 + bool Import (const std::string &filename, const std::string& mime_type); +#endif void ParseXMLTree(xmlNode* xml); void OnNewDocument(); - void OnExportVRML (const string &FileName); + void OnExportVRML (const std::string &FileName) const; gcView* GetNewView(); void AddView(gcView* pView); bool RemoveView(gcView* pView); @@ -78,26 +85,37 @@ virtual CrystalAtom* CreateNewAtom(); virtual CrystalLine* CreateNewLine(); virtual CrystalCleavage* CreateNewCleavage(); - virtual const char* GetProgramId(); + virtual const char* GetProgramId() const; void SetActiveView (gcView *pView) {m_pActiveView = pView;} - void SaveAsImage (const string &filename, char const *type, map& options); + void SaveAsImage (const std::string &filename, char const *type, std::map& options); gcView *GetActiveView () {return m_pActiveView;} virtual bool LoadNewView (xmlNodePtr node); - list *GetViews () {return &m_Views;} + std::list *GetViews () {return &m_Views;} void RenameViews (); + void SetAuthor (char const *author); + void SetMail (char const *mail); + void SetComment (char const *comment); + void SetLabel (char const *label); + GDate *GetCreationDate () {return &m_CreationDate;} + GDate *GetRevisionDate () {return &m_RevisionDate;} private: - void Error(int num); + void Error(int num) const; //Implementation private: gchar *m_filename, *m_title; bool m_bClosing; GtkWidget* m_widget; - std::list m_Dialogs; + std::list m_Dialogs; gcView *m_pActiveView; + GDate m_CreationDate, m_RevisionDate; -GCU_RO_PROP (bool, ReadOnly); +GCU_RO_PROP (bool, ReadOnly) +GCU_RO_PROP (char *, Label) +GCU_RO_PROP (char *, Author) +GCU_RO_PROP (char *, Mail) +GCU_RO_PROP (char *, Comment) }; #endif //GCRYSTAL_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/gcrystal.desktop.in gnome-chemistry-utils-0.10.9/programs/crystal/gcrystal.desktop.in --- gnome-chemistry-utils-0.8.6/programs/crystal/gcrystal.desktop.in 2007-10-14 16:30:32.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/crystal/gcrystal.desktop.in 2009-11-14 11:46:22.000000000 +0100 @@ -2,7 +2,7 @@ Version=1.0 _Name=Gnome Crystal Crystalline Structures Viewer _Comment=Edit and display crystalline structures -Exec=gcrystal %U +Exec=gcrystal-0.10 %U Icon=gcrystal Terminal=false Type=Application diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/gcrystal.desktop.in.in gnome-chemistry-utils-0.10.9/programs/crystal/gcrystal.desktop.in.in --- gnome-chemistry-utils-0.8.6/programs/crystal/gcrystal.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/gcrystal.desktop.in.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +_Name=Gnome Crystal Crystalline Structures Viewer @STABILITY_POSTFIX@ +_Comment=Edit and display crystalline structures +Exec=gcrystal-@GCU_API_VER@ %U +Icon=gcrystal +Terminal=false +Type=Application +DocPath=gcrystal/gcrystal.xml +Categories=GTK;GNOME;Education;Science;Chemistry; +MimeType=application/x-gcrystal; diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/gcrystal.h gnome-chemistry-utils-0.10.9/programs/crystal/gcrystal.h --- gnome-chemistry-utils-0.8.6/programs/crystal/gcrystal.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/gcrystal.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/globals.h gnome-chemistry-utils-0.10.9/programs/crystal/globals.h --- gnome-chemistry-utils-0.8.6/programs/crystal/globals.h 2006-05-11 09:21:31.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/crystal/globals.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,11 +18,15 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include -#include +#ifdef HAVE_GO_CONF_SYNC +# include +#else +# include +#endif bool IsEmbedded(); @@ -36,4 +40,8 @@ extern guint FoV; extern gdouble Phi, Theta, Psi; extern gdouble Red, Green, Blue; -extern GConfClient *conf_client; +#ifdef HAVE_GO_CONF_SYNC + extern GOConfNode *node; +#else + extern GConfClient *conf_client; +#endif diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/line.cc gnome-chemistry-utils-0.10.9/programs/crystal/line.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/line.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/line.cc 2009-11-14 11:30:39.000000000 +0100 @@ -2,9 +2,9 @@ /* * Gnome Crystal - * bond.cc + * line.cc * - * Copyright (C) 2000-2004 Jean Bréfort + * Copyright (C) 2000-2007 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -31,14 +31,6 @@ #include #include -static char *TypeName[] = { - (char*) "edges", - (char*) "diagonals", - (char*) "medians", - (char*) "bond", - (char*) "unique" -}; - gcLine::gcLine(): CrystalLine() { } @@ -55,7 +47,7 @@ if (txt) { int i = 0; - while (strcmp(txt, TypeName[i]) && (i < 5)) i++; + while (strcmp(txt, LineTypeName[i]) && (i < 5)) i++; xmlFree(txt); if (i < 5) m_nType = (CrystalLineType)i; else return false; diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/line.h gnome-chemistry-utils-0.10.9/programs/crystal/line.h --- gnome-chemistry-utils-0.8.6/programs/crystal/line.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/line.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/linesdlg.cc gnome-chemistry-utils-0.10.9/programs/crystal/linesdlg.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/linesdlg.cc 2007-05-07 13:59:19.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/crystal/linesdlg.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -28,6 +28,8 @@ #include "application.h" #include +using namespace std; + enum { COLUMN_X1, @@ -116,7 +118,7 @@ g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); g_object_set (G_OBJECT (renderer), "editable", true, NULL); g_object_set_data (G_OBJECT (renderer), "column", (gint *) COLUMN_X1); - column = gtk_tree_view_column_new_with_attributes ("x1", renderer, "text", COLUMN_X1, NULL); + column = gtk_tree_view_column_new_with_attributes (_("x1"), renderer, "text", COLUMN_X1, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50); @@ -126,7 +128,7 @@ g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); g_object_set (G_OBJECT (renderer), "editable", true, NULL); g_object_set_data (G_OBJECT (renderer), "column", (gint *) COLUMN_Y1); - column = gtk_tree_view_column_new_with_attributes ("y1", renderer, "text", COLUMN_Y1, NULL); + column = gtk_tree_view_column_new_with_attributes (_("y1"), renderer, "text", COLUMN_Y1, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50); @@ -136,7 +138,7 @@ g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); g_object_set (G_OBJECT (renderer), "editable", true, NULL); g_object_set_data (G_OBJECT (renderer), "column", (gint *) COLUMN_Z1); - column = gtk_tree_view_column_new_with_attributes ("z1", renderer, "text", COLUMN_Z1, NULL); + column = gtk_tree_view_column_new_with_attributes (_("z1"), renderer, "text", COLUMN_Z1, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50); @@ -146,7 +148,7 @@ g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); g_object_set(G_OBJECT(renderer), "editable", true, NULL); g_object_set_data(G_OBJECT (renderer), "column", (gint *)COLUMN_X2); - column = gtk_tree_view_column_new_with_attributes ("x2", renderer, "text", COLUMN_X2, NULL); + column = gtk_tree_view_column_new_with_attributes (_("x2"), renderer, "text", COLUMN_X2, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50); @@ -156,7 +158,7 @@ g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); g_object_set (G_OBJECT (renderer), "editable", true, NULL); g_object_set_data (G_OBJECT (renderer), "column", (gint *) COLUMN_Y2); - column = gtk_tree_view_column_new_with_attributes ("y2", renderer, "text", COLUMN_Y2, NULL); + column = gtk_tree_view_column_new_with_attributes (_("y2"), renderer, "text", COLUMN_Y2, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50); @@ -166,7 +168,7 @@ g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_edited), this); g_object_set (G_OBJECT (renderer), "editable", true, NULL); g_object_set_data (G_OBJECT (renderer), "column", (gint *) COLUMN_Z2); - column = gtk_tree_view_column_new_with_attributes ("z2", renderer, "text", COLUMN_Z2, NULL); + column = gtk_tree_view_column_new_with_attributes (_("z2"), renderer, "text", COLUMN_Z2, NULL); /* set this column to a fixed sizing (of 50 pixels) */ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50); diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/linesdlg.h gnome-chemistry-utils-0.10.9/programs/crystal/linesdlg.h --- gnome-chemistry-utils-0.8.6/programs/crystal/linesdlg.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/linesdlg.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/main.cc gnome-chemistry-utils-0.10.9/programs/crystal/main.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/main.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/main.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Crystal * main.cc * - * Copyright (C) 2000-2006 Jean Bréfort + * Copyright (C) 2000-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -32,9 +32,13 @@ #include "document.h" #include "view.h" #include "globals.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +#endif +#ifdef GOFFICE_IS_0_6 +# include +#endif #include -#include -#include #include #include #include @@ -47,29 +51,38 @@ gcDocument* pDoc; gcView* pView; GtkWidget *mainwindow, *vbox1 ; -GConfClient *conf_client; +#ifdef HAVE_GO_CONF_SYNC + GOConfNode *node; +#else + GConfClient *conf_client; +#endif guint NotificationId; +// defines used for GCU_GCONF_GET +#define ROOTDIR "/apps/gchemutils/crystal/" +#ifdef HAVE_GO_CONF_SYNC +# define m_ConfNode node +#else +# define m_ConfClient conf_client +#endif + +#ifdef HAVE_GO_CONF_SYNC +static void on_config_changed (GOConfNode *node, gchar const *name, gpointer user_data) +{ +#else static void on_config_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) { g_return_if_fail (client == conf_client); g_return_if_fail (cnxn_id == NotificationId); - if (!strcmp (entry->key,"/apps/gcrystal/printing/resolution")) - PrintResolution = gconf_value_get_int (entry->value); - else if (!strcmp (entry->key,"/apps/gcrystal/views/fov")) - FoV = gconf_value_get_int (entry->value); - else if (!strcmp (entry->key,"/apps/gcrystal/views/psi")) - Psi = gconf_value_get_float (entry->value); - else if (!strcmp (entry->key,"/apps/gcrystal/views/theta")) - Theta = gconf_value_get_float (entry->value); - else if (!strcmp (entry->key,"/apps/gcrystal/views/phi")) - Phi = gconf_value_get_float (entry->value); - else if (!strcmp (entry->key,"/apps/gcrystal/views/red")) - Red = gconf_value_get_float (entry->value); - else if (!strcmp (entry->key,"/apps/gcrystal/views/green")) - Green = gconf_value_get_float (entry->value); - else if (!strcmp (entry->key,"/apps/gcrystal/views/blue")) - Blue = gconf_value_get_float (entry->value); +#endif + GCU_UPDATE_KEY ("printing/resolution", int, PrintResolution, {}) + GCU_UPDATE_KEY ("view/fov", int, FoV, {}) + GCU_UPDATE_KEY ("view/psi", float, Psi, {}) + GCU_UPDATE_KEY ("view/theta", float, Theta, {}) + GCU_UPDATE_KEY ("view/phi", float, Phi, {}) + GCU_UPDATE_KEY ("view/red", float, Red, {}) + GCU_UPDATE_KEY ("view/green", float, Green, {}) + GCU_UPDATE_KEY ("view/blue", float, Blue, {}) } static void cb_print_version (const gchar *option_name, const gchar *value, gpointer data, GError **error) @@ -86,10 +99,6 @@ { NULL } }; -// defines used for GCU_GCONF_GET -#define ROOTDIR "/apps/gchemutils/crystal/" -#define m_ConfClient conf_client - int main(int argc, char *argv[]) { GOptionContext *context; @@ -99,7 +108,9 @@ gtk_init (&argc, &argv); gtk_gl_init (&argc, &argv); +#ifdef GOFFICE_IS_0_6 gnome_vfs_init (); +#endif Element::LoadRadii (); if (argc > 1 && argv[1][0] == '-') { context = g_option_context_new (_(" [file...]")); @@ -118,57 +129,67 @@ } //Configuration loading +#ifdef HAVE_GO_CONF_SYNC + node = go_conf_get_node (Application::GetConfDir (), "crystal"); +#else conf_client = gconf_client_get_default (); gconf_client_add_dir (conf_client, "/apps/gchemutils/crystal/general", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); gconf_client_add_dir (conf_client, "/apps/gchemutils/crystal/printing", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); gconf_client_add_dir (conf_client, "/apps/gchemutils/crystal/views", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); - GCU_GCONF_GET (ROOTDIR"printing/resolution", int, PrintResolution, 300) - GCU_GCONF_GET (ROOTDIR"views/fov", int, FoV, 10) - GCU_GCONF_GET_NO_CHECK (ROOTDIR"views/psi", float, Psi, 70.) - GCU_GCONF_GET_NO_CHECK (ROOTDIR"views/theta", float,Theta, 10.) - GCU_GCONF_GET_NO_CHECK (ROOTDIR"views/phi", float, Phi, -90.) - GCU_GCONF_GET_NO_CHECK (ROOTDIR"views/red", float, Red, 1.) - GCU_GCONF_GET_NO_CHECK (ROOTDIR"views/green", float, Green, 1.) - GCU_GCONF_GET_NO_CHECK (ROOTDIR"views/blue", float, Blue, 1.) +#endif + GCU_GCONF_GET ("printing/resolution", int, PrintResolution, 300) + GCU_GCONF_GET ("views/fov", int, FoV, 10) + GCU_GCONF_GET_NO_CHECK ("views/psi", float, Psi, 70.) + GCU_GCONF_GET_NO_CHECK ("views/theta", float,Theta, 10.) + GCU_GCONF_GET_NO_CHECK ("views/phi", float, Phi, -90.) + GCU_GCONF_GET_NO_CHECK ("views/red", float, Red, 1.) + GCU_GCONF_GET_NO_CHECK ("views/green", float, Green, 1.) + GCU_GCONF_GET_NO_CHECK ("views/blue", float, Blue, 1.) +#ifdef HAVE_GO_CONF_SYNC + NotificationId = go_conf_add_monitor (node, NULL, (GOConfMonitorFunc) on_config_changed, NULL); +#else NotificationId = gconf_client_notify_add (conf_client, "/apps/gchemutils/crystal", on_config_changed, NULL, NULL, NULL); +#endif gcApplication* gcApp = new gcApplication (); gcDocument *pDoc = gcApp->OnFileNew(); gcApp->SetOpening(); - GnomeVFSURI *uri, *auri; - char *path = g_get_current_dir (), *dir; - dir = g_strconcat (path, "/", NULL); - g_free (path); - uri = gnome_vfs_uri_new (dir); + char *path, *uri; bool bres = false; while (*argv) { if (**argv == '-') { printf (_("Invalid or misplaced argument: %s\n"), *argv); delete gcApp; - g_free (dir); - gnome_vfs_uri_unref (uri); exit (-1); } - auri = gnome_vfs_uri_resolve_relative (uri, *argv); - path = gnome_vfs_uri_to_string (auri, GNOME_VFS_URI_HIDE_NONE); + if (strstr (*argv, "://")) + uri = g_strdup (*argv); + else { + path = g_path_is_absolute (*argv)? g_strdup (*argv): g_build_filename (g_get_current_dir (), *argv, NULL); + uri = g_filename_to_uri (path, NULL, NULL); + g_free (path); + } if (bres) pDoc = gcApp->OnFileNew (); - bres = gcApp->FileProcess (path, "application/x-gcrystal", false, NULL, pDoc); - g_free (path); - gnome_vfs_uri_unref (auri); + bres = gcApp->FileProcess (uri, go_get_mime_type (uri), false, NULL, pDoc); + g_free (uri); argv++; } - gnome_vfs_uri_unref (uri); - g_free (dir); gtk_main (); +#ifdef HAVE_GO_CONF_SYNC + go_conf_remove_monitor (NotificationId); + go_conf_free_node (node); +#else gconf_client_notify_remove (conf_client, NotificationId); gconf_client_remove_dir (conf_client, "/apps/gchemutils/crystal/general", NULL); gconf_client_remove_dir (conf_client, "/apps/gchemutils/crystal/printing", NULL); gconf_client_remove_dir (conf_client, "/apps/gchemutils/crystal/views", NULL); g_object_unref (G_OBJECT(conf_client)); +#endif +#ifdef GOFFICE_IS_0_6 gnome_vfs_shutdown (); - +#endif return 0 ; } diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/Makefile.am gnome-chemistry-utils-0.10.9/programs/crystal/Makefile.am --- gnome-chemistry-utils-0.8.6/programs/crystal/Makefile.am 2008-01-19 17:43:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -1,65 +1,89 @@ -EXTRA_DIST = $(desktop_in_files) $(schemas_in_files) +EXTRA_DIST = \ + $(desktop_in_files) \ + $(schemas_in_files) -CLEANFILES = $(desktop_DATA) \ +CLEANFILES = \ + $(desktop_DATA) gcrystal.desktop \ $(schemas_DATA) \ $(kde_mime_desktop_DATA) -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_srcdir) +MAINTAINERCLEANFILES = Makefile.in gcrystal.desktop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gtkglext_CFLAGS) \ + $(openbabel_CFLAGS) \ + $(GCU_CFLAGS) +endif DEFS += -DDATADIR=\"$(datadir)\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade/crystal\" \ - -DPIXMAPSDIR=\"$(datadir)/gchemutils/pixmaps\" - -bin_PROGRAMS = gcrystal + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/crystal\" \ + -DPIXMAPSDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/pixmaps\" -gcrystal_LDADD = $(top_builddir)/gcu/libgcu.la +bin_PROGRAMS = gcrystal-@GCU_API_VER@ -gcrystal_SOURCES = \ - application.cc \ - application.h \ - atom.cc \ - atom.h \ - atomsdlg.cc \ - atomsdlg.h \ - celldlg.cc \ - celldlg.h \ - cleavage.cc \ - cleavage.h \ - cleavagesdlg.cc \ - cleavagesdlg.h \ - document.cc \ - document.h \ - gcrystal.h \ - globals.h \ - line.cc \ - line.h \ - linesdlg.cc \ - linesdlg.h \ - main.cc \ - prefs.cc \ - prefs.h \ - sizedlg.cc \ - sizedlg.h \ - view.cc \ - view.h \ - view-settings.cc \ - view-settings.h \ - window.cc \ - window.h +gcrystal_@GCU_API_VER@_SOURCES = \ + application.cc \ + application.h \ + atom.cc \ + atom.h \ + atomsdlg.cc \ + atomsdlg.h \ + celldlg.cc \ + celldlg.h \ + cleavage.cc \ + cleavage.h \ + cleavagesdlg.cc \ + cleavagesdlg.h \ + docprop.cc \ + docprop.h \ + document.cc \ + document.h \ + gcrystal.h \ + globals.h \ + line.cc \ + line.h \ + linesdlg.cc \ + linesdlg.h \ + main.cc \ + prefs.cc \ + prefs.h \ + sizedlg.cc \ + sizedlg.h \ + view.cc \ + view.h \ + view-settings.cc \ + view-settings.h \ + window.cc \ + window.h desktop_in_files = gcrystal.desktop.in x-gcrystal.desktop.in + +gcrystal-@GCU_API_VER@.desktop: gcrystal.desktop + cp $< $@ + desktopdir=$(datadir)/applications -desktop_DATA = gcrystal.desktop +desktop_DATA = gcrystal-@GCU_API_VER@.desktop @INTLTOOL_DESKTOP_RULE@ if WITH_KDE_MIME kde_mime_desktop_DATA = x-gcrystal.desktop -kde_mime_desktopdir = $(with_kde_mime_dir)/application +kde_mime_desktopdir = $(KDEMIMEDIR)/application endif #WITH_KDE_MIME schemas_in_files = gcrystal.schemas.in + schemasdir = $(GCONF_SCHEMA_FILE_DIR) schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) @INTLTOOL_SCHEMAS_RULE@ @@ -79,3 +103,15 @@ $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ done endif #GCONF_SCHEMAS_INSTALL + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gcrystal@STABILITY@ ]; then \ + rm -f gcrystal@STABILITY@; \ + fi && \ + $(LN_S) gcrystal-@GCU_API_VER@ gcrystal@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gcrystal@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gcrystal@STABILITY@; \ + fi diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/Makefile.in gnome-chemistry-utils-0.10.9/programs/crystal/Makefile.in --- gnome-chemistry-utils-0.8.6/programs/crystal/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/Makefile.in 2009-11-14 11:46:04.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,9 +35,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = gcrystal$(EXEEXT) +bin_PROGRAMS = gcrystal-@GCU_API_VER@$(EXEEXT) subdir = programs/crystal -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gcrystal.desktop.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -43,51 +46,58 @@ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = gcrystal.desktop.in +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" \ "$(DESTDIR)$(kde_mime_desktopdir)" "$(DESTDIR)$(schemasdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_gcrystal_OBJECTS = application.$(OBJEXT) atom.$(OBJEXT) \ - atomsdlg.$(OBJEXT) celldlg.$(OBJEXT) cleavage.$(OBJEXT) \ - cleavagesdlg.$(OBJEXT) document.$(OBJEXT) line.$(OBJEXT) \ - linesdlg.$(OBJEXT) main.$(OBJEXT) prefs.$(OBJEXT) \ - sizedlg.$(OBJEXT) view.$(OBJEXT) view-settings.$(OBJEXT) \ - window.$(OBJEXT) -gcrystal_OBJECTS = $(am_gcrystal_OBJECTS) -gcrystal_DEPENDENCIES = $(top_builddir)/gcu/libgcu.la -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +am_gcrystal_@GCU_API_VER@_OBJECTS = application.$(OBJEXT) \ + atom.$(OBJEXT) atomsdlg.$(OBJEXT) celldlg.$(OBJEXT) \ + cleavage.$(OBJEXT) cleavagesdlg.$(OBJEXT) docprop.$(OBJEXT) \ + document.$(OBJEXT) line.$(OBJEXT) linesdlg.$(OBJEXT) \ + main.$(OBJEXT) prefs.$(OBJEXT) sizedlg.$(OBJEXT) \ + view.$(OBJEXT) view-settings.$(OBJEXT) window.$(OBJEXT) +gcrystal_@GCU_API_VER@_OBJECTS = $(am_gcrystal_@GCU_API_VER@_OBJECTS) +gcrystal_@GCU_API_VER@_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(gcrystal_SOURCES) -DIST_SOURCES = $(gcrystal_SOURCES) +SOURCES = $(gcrystal_@GCU_API_VER@_SOURCES) +DIST_SOURCES = $(gcrystal_@GCU_API_VER@_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -desktopDATA_INSTALL = $(INSTALL_DATA) -kde_mime_desktopDATA_INSTALL = $(INSTALL_DATA) -schemasDATA_INSTALL = $(INSTALL_DATA) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(desktop_DATA) $(kde_mime_desktop_DATA) $(schemas_DATA) ETAGS = etags CTAGS = ctags @@ -96,7 +106,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -115,29 +124,32 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade/crystal\" \ - -DPIXMAPSDIR=\"$(datadir)/gchemutils/pixmaps\" + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/crystal\" \ + -DPIXMAPSDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/pixmaps\" DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -147,35 +159,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -188,14 +186,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -207,6 +212,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -218,31 +225,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -256,68 +288,97 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -EXTRA_DIST = $(desktop_in_files) $(schemas_in_files) -CLEANFILES = $(desktop_DATA) \ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = \ + $(desktop_in_files) \ + $(schemas_in_files) + +CLEANFILES = \ + $(desktop_DATA) gcrystal.desktop \ $(schemas_DATA) \ $(kde_mime_desktop_DATA) -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I$(top_srcdir) -gcrystal_LDADD = $(top_builddir)/gcu/libgcu.la -gcrystal_SOURCES = \ - application.cc \ - application.h \ - atom.cc \ - atom.h \ - atomsdlg.cc \ - atomsdlg.h \ - celldlg.cc \ - celldlg.h \ - cleavage.cc \ - cleavage.h \ - cleavagesdlg.cc \ - cleavagesdlg.h \ - document.cc \ - document.h \ - gcrystal.h \ - globals.h \ - line.cc \ - line.h \ - linesdlg.cc \ - linesdlg.h \ - main.cc \ - prefs.cc \ - prefs.h \ - sizedlg.cc \ - sizedlg.h \ - view.cc \ - view.h \ - view-settings.cc \ - view-settings.h \ - window.cc \ - window.h +MAINTAINERCLEANFILES = Makefile.in gcrystal.desktop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gtkglext_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(openbabel_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_vfs_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +gcrystal_@GCU_API_VER@_SOURCES = \ + application.cc \ + application.h \ + atom.cc \ + atom.h \ + atomsdlg.cc \ + atomsdlg.h \ + celldlg.cc \ + celldlg.h \ + cleavage.cc \ + cleavage.h \ + cleavagesdlg.cc \ + cleavagesdlg.h \ + docprop.cc \ + docprop.h \ + document.cc \ + document.h \ + gcrystal.h \ + globals.h \ + line.cc \ + line.h \ + linesdlg.cc \ + linesdlg.h \ + main.cc \ + prefs.cc \ + prefs.h \ + sizedlg.cc \ + sizedlg.h \ + view.cc \ + view.h \ + view-settings.cc \ + view-settings.h \ + window.cc \ + window.h desktop_in_files = gcrystal.desktop.in x-gcrystal.desktop.in desktopdir = $(datadir)/applications -desktop_DATA = gcrystal.desktop +desktop_DATA = gcrystal-@GCU_API_VER@.desktop @WITH_KDE_MIME_TRUE@kde_mime_desktop_DATA = x-gcrystal.desktop -@WITH_KDE_MIME_TRUE@kde_mime_desktopdir = $(with_kde_mime_dir)/application +@WITH_KDE_MIME_TRUE@kde_mime_desktopdir = $(KDEMIMEDIR)/application schemas_in_files = gcrystal.schemas.in schemasdir = $(GCONF_SCHEMA_FILE_DIR) schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) @@ -329,14 +390,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/crystal/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu programs/crystal/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/crystal/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu programs/crystal/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -354,37 +415,55 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gcrystal.desktop.in: $(top_builddir)/config.status $(srcdir)/gcrystal.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -gcrystal$(EXEEXT): $(gcrystal_OBJECTS) $(gcrystal_DEPENDENCIES) - @rm -f gcrystal$(EXEEXT) - $(CXXLINK) $(gcrystal_OBJECTS) $(gcrystal_LDADD) $(LIBS) + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gcrystal-@GCU_API_VER@$(EXEEXT): $(gcrystal_@GCU_API_VER@_OBJECTS) $(gcrystal_@GCU_API_VER@_DEPENDENCIES) + @rm -f gcrystal-@GCU_API_VER@$(EXEEXT) + $(CXXLINK) $(gcrystal_@GCU_API_VER@_OBJECTS) $(gcrystal_@GCU_API_VER@_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -398,6 +477,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/celldlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleavage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleavagesdlg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/docprop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linesdlg.Po@am__quote@ @@ -410,21 +490,21 @@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -437,99 +517,112 @@ install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" - @list='$(desktop_DATA)'; for p in $$list; do \ + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ - $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) - @list='$(desktop_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ - rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ - done + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files install-kde_mime_desktopDATA: $(kde_mime_desktop_DATA) @$(NORMAL_INSTALL) test -z "$(kde_mime_desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(kde_mime_desktopdir)" - @list='$(kde_mime_desktop_DATA)'; for p in $$list; do \ + @list='$(kde_mime_desktop_DATA)'; test -n "$(kde_mime_desktopdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(kde_mime_desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(kde_mime_desktopdir)/$$f'"; \ - $(kde_mime_desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(kde_mime_desktopdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(kde_mime_desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(kde_mime_desktopdir)" || exit $$?; \ done uninstall-kde_mime_desktopDATA: @$(NORMAL_UNINSTALL) - @list='$(kde_mime_desktop_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(kde_mime_desktopdir)/$$f'"; \ - rm -f "$(DESTDIR)$(kde_mime_desktopdir)/$$f"; \ - done + @list='$(kde_mime_desktop_DATA)'; test -n "$(kde_mime_desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(kde_mime_desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(kde_mime_desktopdir)" && rm -f $$files install-schemasDATA: $(schemas_DATA) @$(NORMAL_INSTALL) test -z "$(schemasdir)" || $(MKDIR_P) "$(DESTDIR)$(schemasdir)" - @list='$(schemas_DATA)'; for p in $$list; do \ + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(schemasDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemasdir)/$$f'"; \ - $(schemasDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemasdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemasdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(schemasdir)" || exit $$?; \ done uninstall-schemasDATA: @$(NORMAL_UNINSTALL) - @list='$(schemas_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(schemasdir)/$$f'"; \ - rm -f "$(DESTDIR)$(schemasdir)/$$f"; \ - done + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(schemasdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(schemasdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -550,13 +643,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -588,6 +685,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -609,6 +707,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -618,18 +718,29 @@ install-dvi: install-dvi-am -install-exec-am: install-binPROGRAMS +install-dvi-am: +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -653,8 +764,9 @@ uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA \ uninstall-kde_mime_desktopDATA uninstall-local \ uninstall-schemasDATA - -.MAKE: install-am install-strip + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ @@ -662,18 +774,21 @@ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-data-local install-desktopDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-info install-info-am \ install-kde_mime_desktopDATA install-man install-pdf \ install-pdf-am install-ps install-ps-am install-schemasDATA \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-desktopDATA \ + uninstall-binPROGRAMS uninstall-desktopDATA uninstall-hook \ uninstall-kde_mime_desktopDATA uninstall-local \ uninstall-schemasDATA + +gcrystal-@GCU_API_VER@.desktop: gcrystal.desktop + cp $< $@ @INTLTOOL_DESKTOP_RULE@ @INTLTOOL_SCHEMAS_RULE@ @@ -688,6 +803,19 @@ @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ @GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ @GCONF_SCHEMAS_INSTALL_TRUE@ done + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gcrystal@STABILITY@ ]; then \ + rm -f gcrystal@STABILITY@; \ + fi && \ + $(LN_S) gcrystal-@GCU_API_VER@ gcrystal@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gcrystal@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gcrystal@STABILITY@; \ + fi + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/prefs.cc gnome-chemistry-utils-0.10.9/programs/crystal/prefs.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/prefs.cc 2007-02-11 17:43:02.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/prefs.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -122,14 +122,25 @@ Red = color.red / 65535.; Green = color.green / 65535.; Blue = color.blue / 65535.; - gconf_client_set_int (conf_client, "/apps/gcrystal/printing/resolution", PrintResolution, NULL); - gconf_client_set_int (conf_client, "/apps/gcrystal/views/fov", FoV, NULL); - gconf_client_set_float (conf_client, "/apps/gcrystal/views/psi", Psi, NULL); - gconf_client_set_float (conf_client, "/apps/gcrystal/views/theta", Theta, NULL); - gconf_client_set_float (conf_client, "/apps/gcrystal/views/phi", Phi, NULL); - gconf_client_set_float (conf_client, "/apps/gcrystal/views/red", Red, NULL); - gconf_client_set_float (conf_client, "/apps/gcrystal/views/green", Green, NULL); - gconf_client_set_float (conf_client, "/apps/gcrystal/views/blue", Blue, NULL); +#ifdef HAVE_GO_CONF_SYNC + go_conf_set_int (node, "printing/resolution", PrintResolution); + go_conf_set_int (node, "views/fov", FoV); + go_conf_set_double (node, "views/psi", Psi); + go_conf_set_double (node, "views/theta", Theta); + go_conf_set_double (node, "views/phi", Phi); + go_conf_set_double (node, "views/red", Red); + go_conf_set_double (node, "views/green", Green); + go_conf_set_double (node, "views/blue", Blue); +#else + gconf_client_set_int (conf_client, "/apps/gchemutils/crystal/printing/resolution", PrintResolution, NULL); + gconf_client_set_int (conf_client, "/apps/gchemutils/crystal/views/fov", FoV, NULL); + gconf_client_set_float (conf_client, "/apps/gchemutils/crystal/views/psi", Psi, NULL); + gconf_client_set_float (conf_client, "/apps/gchemutils/crystal/views/theta", Theta, NULL); + gconf_client_set_float (conf_client, "/apps/gchemutils/crystal/views/phi", Phi, NULL); + gconf_client_set_float (conf_client, "/apps/gchemutils/crystal/views/red", Red, NULL); + gconf_client_set_float (conf_client, "/apps/gchemutils/crystal/views/green", Green, NULL); + gconf_client_set_float (conf_client, "/apps/gchemutils/crystal/views/blue", Blue, NULL); +#endif return true; } diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/prefs.h gnome-chemistry-utils-0.10.9/programs/crystal/prefs.h --- gnome-chemistry-utils-0.8.6/programs/crystal/prefs.h 2006-05-11 09:21:31.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/crystal/prefs.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/sizedlg.cc gnome-chemistry-utils-0.10.9/programs/crystal/sizedlg.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/sizedlg.cc 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/sizedlg.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/sizedlg.h gnome-chemistry-utils-0.10.9/programs/crystal/sizedlg.h --- gnome-chemistry-utils-0.8.6/programs/crystal/sizedlg.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/sizedlg.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/view.cc gnome-chemistry-utils-0.10.9/programs/crystal/view.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/view.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/view.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -51,8 +51,7 @@ } gcView::gcView (gcView *pView): - CrystalView (dynamic_cast (pView->GetDoc ())), - DialogOwner () + CrystalView (dynamic_cast (pView->GetDoc ())) { SetAngle (pView->GetAngle ()); SetRotation (pView->GetPsi (), pView->GetTheta (), pView->GetPhi ()); diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/view.h gnome-chemistry-utils-0.10.9/programs/crystal/view.h --- gnome-chemistry-utils-0.8.6/programs/crystal/view.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/view.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -26,7 +26,6 @@ #define GCRYSTAL_VIEW_H #include -#include #include #include #include @@ -39,7 +38,7 @@ using namespace gcu; -class gcView: public CrystalView, public DialogOwner +class gcView: public CrystalView { public: gcView (gcDocument *pDoc); diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/view-settings.cc gnome-chemistry-utils-0.10.9/programs/crystal/view-settings.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/view-settings.cc 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/view-settings.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/view-settings.h gnome-chemistry-utils-0.10.9/programs/crystal/view-settings.h --- gnome-chemistry-utils-0.8.6/programs/crystal/view-settings.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/view-settings.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/window.cc gnome-chemistry-utils-0.10.9/programs/crystal/window.cc --- gnome-chemistry-utils-0.8.6/programs/crystal/window.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/window.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Crystal * window.cc * - * Copyright (C) 2006-2007 Jean Bréfort + * Copyright (C) 2006-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,17 +18,19 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include "config.h" #include "window.h" #include "application.h" +#include "docprop.h" #include "document.h" #include "prefs.h" #include "view-settings.h" #include +#include #include #include @@ -62,14 +64,29 @@ Win->GetApplication ()->OnFileSaveAs (); } +static void on_properties(GtkWidget* widget, gcWindow* Win) +{ + new gcDocPropDlg (Win->GetDoc ()); +} + static void on_file_close (GtkWidget *widget, gcWindow* Win) { Win->GetApplication ()->OnFileClose (); } +static void on_page_setup (GtkWidget *widget, gcWindow* Win) +{ + new PrintSetupDlg (Win->GetApplication (), Win->GetView ()); +} + +static void on_print_preview (GtkWidget *widget, gcWindow* Win) +{ + Win->GetView ()->Print (true); +} + static void on_file_print (GtkWidget *widget, gcWindow* Win) { - Win->GetApplication ()->OnFilePrint (); + Win->GetView ()->Print (false); } static void on_file_save_as_image(GtkWidget* widget, gcWindow* Win) @@ -100,11 +117,16 @@ new gcPrefsDlg (Win->GetApp ()); } -static void on_about (GtkWidget *widget, void *data) +static void on_about_activate_url (GtkAboutDialog *about, const gchar *url, gpointer data) { - char * authors[] = {(char*) "Jean Bréfort", NULL}; + reinterpret_cast (data)->GetApp ()->OnWeb (url); +} + +static void on_about (GtkWidget *widget, gcWindow* Win) +{ + char const *authors[] = {"Jean Bréfort", NULL}; // char * documentors[] = {NULL}; - char * artists[] = {(char*) "Nestor Diaz", NULL}; + char const *artists[] = {"Nestor Diaz", NULL}; char license[] = "This program is free software; you can redistribute it and/or\n" "modify it under the terms of the GNU General Public License as\n" "published by the Free Software Foundation; either version 2 of the\n" @@ -117,24 +139,21 @@ "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307\n" "USA"; + + gtk_about_dialog_set_url_hook (on_about_activate_url, Win, NULL); /* Note to translators: replace the following string with the appropriate credits for you lang */ - char *translator_credits = _("translator_credits"); - GError *error = NULL; - GdkPixbuf *logo = gdk_pixbuf_new_from_file (PIXMAPSDIR"/gcrystal_logo.png", &error); - if (error) { - g_error_free (error); - error = NULL; - } + char const *translator_credits = _("translator_credits"); + GdkPixbuf *logo = gdk_pixbuf_new_from_file (PIXMAPSDIR"/gcrystal_logo.png", NULL); gtk_show_about_dialog (NULL, "name", _("Gnome Crystal"), "authors", authors, "artists", artists, "comments", _("Gnome Crystal is a lightweight crystal structures viewer for Gnome"), - "copyright", _("Copyright © 1999-2007 by Jean Bréfort"), + "copyright", _("Copyright © 1999-2008 by Jean Bréfort"), "license", license, "logo", logo, "translator_credits", strcmp (translator_credits, "translator_credits") != 0 ? - (const char *)translator_credits : NULL, + translator_credits : NULL, "version", VERSION, "website", "http://www.nongnu.org/gchemutils", NULL); @@ -192,6 +211,11 @@ Win->GetApp ()->OnMail (); } +static void on_live_assistance (GtkWidget *widget, gcWindow *Win) +{ + Win->GetApplication ()->OnLiveAssistance (); +} + static void on_bug (GtkWidget *widget, gcWindow* Win) { Win->GetApplication ()->OnBug (); @@ -264,8 +288,14 @@ N_("Save the current file with a different name"), G_CALLBACK (on_file_save_as) }, { "SaveAsImage", GTK_STOCK_SAVE_AS, N_("Save As _Image..."), "I", N_("Save the current file as an image"), G_CALLBACK (on_file_save_as_image) }, + { "PageSetup", NULL, N_("Page Set_up..."), NULL, + N_("Setup the page settings for your current printer"), G_CALLBACK (on_page_setup) }, + { "PrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), NULL, + N_("Print preview"), G_CALLBACK (on_print_preview) }, { "Print", GTK_STOCK_PRINT, N_("_Print..."), "P", N_("Print the current file"), G_CALLBACK (on_file_print) }, + { "Properties", GTK_STOCK_PROPERTIES, N_("Prope_rties..."), NULL, + N_("Modify the file's properties"), G_CALLBACK (on_properties) }, { "Close", GTK_STOCK_CLOSE, N_("_Close"), "W", N_("Close the current file"), G_CALLBACK (on_file_close) }, { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", @@ -297,6 +327,8 @@ N_("View help for Gnome Crystal"), G_CALLBACK (on_help) }, { "Web", NULL, N_("Gnome Chemistry Utils on the _web"), NULL, N_("Browse the Gnome Chemistry Utils's web site"), G_CALLBACK (on_web) }, + { "LiveAssistance", NULL, N_("Live assistance"), NULL, + N_("Open the Gnome Chemistry Utils IRC channel"), G_CALLBACK (on_live_assistance) }, { "Mail", NULL, N_("_Ask a question"), NULL, N_("Ask a question about the Gnome Chemistry Utils"), G_CALLBACK (on_mail) }, { "Bug", NULL, N_("Report _Bugs"), NULL, @@ -314,9 +346,13 @@ " " " " " " -" " +" " +" " +" " " " " " +" " +" " " " " " " " @@ -339,9 +375,10 @@ " " " " " " -" " -" " -" " +" " +" " +" " +" " " " " " " " @@ -353,31 +390,6 @@ " " ""; -static const char *ui_mail_description = -"" -" " -" " -" " -" " -" " -" " -" " -""; - -static const char *ui_web_description = -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -""; - gcWindow::gcWindow (gcApplication *App, gcDocument *Doc) { GtkWidget *vbox; @@ -416,17 +428,10 @@ g_error_free (error); exit (EXIT_FAILURE); } - if (App->HasWebBrowser () && !gtk_ui_manager_add_ui_from_string (m_UIManager, ui_web_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } - if (App->HasMailAgent () && !gtk_ui_manager_add_ui_from_string (m_UIManager, ui_mail_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } GtkWidget *menu = gtk_ui_manager_get_widget (m_UIManager, "/MainMenu/FileMenu/Open"); GtkWidget *w = gtk_recent_chooser_menu_new_for_manager (App->GetRecentManager ()); + gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (w), GTK_RECENT_SORT_MRU); GtkRecentFilter *filter = gtk_recent_filter_new (); gtk_recent_filter_add_mime_type (filter, "application/x-gcrystal"); gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (w), filter); diff -Nru gnome-chemistry-utils-0.8.6/programs/crystal/window.h gnome-chemistry-utils-0.10.9/programs/crystal/window.h --- gnome-chemistry-utils-0.8.6/programs/crystal/window.h 2007-02-06 06:35:51.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/crystal/window.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/Makefile.am gnome-chemistry-utils-0.10.9/programs/Makefile.am --- gnome-chemistry-utils-0.8.6/programs/Makefile.am 2007-05-07 21:33:06.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -1,3 +1,3 @@ -SUBDIRS = 3d calc crystal table +SUBDIRS = 3d calc crystal paint spectra table MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/programs/Makefile.in gnome-chemistry-utils-0.10.9/programs/Makefile.in --- gnome-chemistry-utils-0.8.6/programs/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/Makefile.in 2009-11-14 11:46:04.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -52,15 +55,42 @@ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -80,26 +110,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -109,35 +142,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -150,14 +169,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -169,6 +195,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -180,31 +208,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -218,23 +271,32 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ -SUBDIRS = 3d calc crystal table +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = 3d calc crystal paint spectra table MAINTAINERCLEANFILES = Makefile.in all: all-recursive @@ -243,14 +305,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu programs/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu programs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -268,6 +330,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -299,7 +362,7 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -333,16 +396,16 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -350,14 +413,14 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -369,39 +432,43 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -422,29 +489,44 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -474,6 +556,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -493,6 +576,8 @@ html: html-recursive +html-am: + info: info-recursive info-am: @@ -501,18 +586,28 @@ install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -533,8 +628,8 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -550,6 +645,7 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/gchempaint.desktop.in gnome-chemistry-utils-0.10.9/programs/paint/gchempaint.desktop.in --- gnome-chemistry-utils-0.8.6/programs/paint/gchempaint.desktop.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/gchempaint.desktop.in 2009-11-14 11:46:22.000000000 +0100 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=GChemPaint Chemical Structures Editor +_Comment=Edit chemical 2D structures +Exec=gchempaint-0.10 %U +Terminal=false +Type=Application +Icon=gchempaint +Categories=GTK;GNOME;Education;Science;Chemistry; +MimeType=application/x-gchempaint; diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/gchempaint.desktop.in.in gnome-chemistry-utils-0.10.9/programs/paint/gchempaint.desktop.in.in --- gnome-chemistry-utils-0.8.6/programs/paint/gchempaint.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/gchempaint.desktop.in.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=GChemPaint Chemical Structures Editor @STABILITY_POSTFIX@ +_Comment=Edit chemical 2D structures +Exec=gchempaint-@GCU_API_VER@ %U +Terminal=false +Type=Application +Icon=gchempaint +Categories=GTK;GNOME;Education;Science;Chemistry; +MimeType=application/x-gchempaint; diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/gchempaint.schemas.in gnome-chemistry-utils-0.10.9/programs/paint/gchempaint.schemas.in --- gnome-chemistry-utils-0.8.6/programs/paint/gchempaint.schemas.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/gchempaint.schemas.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,402 @@ + + + + /schemas/apps/gchemutils/paint/settings/bond-length + /apps/gchemutils/paint/settings/bond-length + gchemutils + float + 140. + + Default bond length + Default bond length in picometers. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/bond-angle + /apps/gchemutils/paint/settings/bond-angle + gchemutils + float + 120. + + Default angle between two bonds. + Default angle between two consecutive bonds in a chain in degrees. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/bond-dist + /apps/gchemutils/paint/settings/bond-dist + gchemutils + float + 5. + + Default distance between two lines in a multiple bond. + Default distance between two lines in pixels (at 100% zoom) in a multiple bond. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/bond-width + /apps/gchemutils/paint/settings/bond-width + gchemutils + float + 1. + + Default bond line width. + Default bond line width in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/arrow-length + /apps/gchemutils/paint/settings/arrow-length + gchemutils + float + 200. + + Default arrow length + Default arrow length in picometers. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/arrow-dist + /apps/gchemutils/paint/settings/arrow-dist + gchemutils + float + 5. + + Default distance between two lines for double arrows. + Default distance between two lines in pixels (at 100% zoom) for double arrows or for retrosynthesis arrows. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/arrow-width + /apps/gchemutils/paint/settings/arrow-width + gchemutils + float + 1. + + Default arrow line width. + Default arrow line width in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/arrow-headA + /apps/gchemutils/paint/settings/arrow-headA + gchemutils + float + 6. + + Default distance from tip of arrowhead to center. + Default distance from tip of arrowhead to center in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/arrow-headB + /apps/gchemutils/paint/settings/arrow-headB + gchemutils + float + 8. + + Default distance from tip of arrowhead to trailing point, measured along shaft. + Default distance from tip of arrowhead to trailing point, measured along shaft, in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/arrow-headC + /apps/gchemutils/paint/settings/arrow-headC + gchemutils + float + 4. + + Default distance of arrowhead trailing points from outside edge of shaft. + Default distance of arrowhead trailing points from outside edge of shaft in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/hash-width + /apps/gchemutils/paint/settings/hash-width + gchemutils + float + 1. + + Default hash line width. + Default line width in pixels for hash bonds (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/hash-dist + /apps/gchemutils/paint/settings/hash-dist + gchemutils + float + 2. + + Default hash lines distance. + Default distance between two lines in pixels for hash bonds (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/stereo-width + /apps/gchemutils/paint/settings/stereo-width + gchemutils + float + 5. + + Default largest width for hash or wedge bonds. + Default largest width for hash or wedge bonds (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/scale + /apps/gchemutils/paint/settings/scale + gchemutils + float + 4. + + Scale (pm per pixel). + Scale used to convert real distance to canvas distance expressed in pm per pixel (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/padding + /apps/gchemutils/paint/settings/padding + gchemutils + float + 2. + + Default padding for texts. + Padding used around text objects such as atoms, texts and other typographic signs in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/arrow-padding + /apps/gchemutils/paint/settings/arrow-padding + gchemutils + float + 16. + + Default padding around arrows. + Default padding between arrows and associated objects in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/stoichiometry-padding + /apps/gchemutils/paint/settings/stoichiometry-padding + gchemutils + float + 1. + + Default extra padding after a stoichiometric coefficient. + Default extra padding between a stoichiometric coefficient and its associated molecule in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/object-padding + /apps/gchemutils/paint/settings/object-padding + gchemutils + float + 16. + + Default padding between aligned objects. + Default padding in pixels added between consecutive objects during an alignment operation (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/sign-padding + /apps/gchemutils/paint/settings/sign-padding + gchemutils + float + 8. + + Default padding between a '+' sign in a reaction equation and reactants symbols. + Default padding between a '+' sign in a reaction equation and reactants symbols in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/charge-sign-size + /apps/gchemutils/paint/settings/charge-sign-size + gchemutils + float + 9. + + Default charge sign size. + Default size of the charge sign in pixels (at 100% zoom). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/font-family + /apps/gchemutils/paint/settings/font-family + gchemutils + string + Bitstream Vera Sans + + Chemical formula font family. + Font family used for chemical formula such as atoms and fragments. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/font-style + /apps/gchemutils/paint/settings/font-style + gchemutils + int + 0 + + Chemical formula font style. + Font style used for chemical formula such as atoms and fragments (0 = normal; 1 = oblique; 2 = italic). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/font-weight + /apps/gchemutils/paint/settings/font-weight + gchemutils + int + 4 + + Chemical formula font weight. + Font weight used for chemical formula such as atoms and fragments (2 = ultra-light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/font-variant + /apps/gchemutils/paint/settings/font-variant + gchemutils + int + 0 + + Chemical formula font variant. + Font variant used for chemical formula such as atoms and fragments (0 = normal; 1 = small caps). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/font-stretch + /apps/gchemutils/paint/settings/font-stretch + gchemutils + int + 4 + + Chemical formula font stretch. + Font stretch used for chemical formula such as atoms and fragments (0 = ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/font-size + /apps/gchemutils/paint/settings/font-size + gchemutils + float + 12. + + Chemical formula font size. + Font size used for chemical formula such as atoms and fragments. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/text-font-family + /apps/gchemutils/paint/settings/text-font-family + gchemutils + string + Bitstream Vera Serif + + Default text font family. + Default font family used for texts. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/text-font-style + /apps/gchemutils/paint/settings/text-font-style + gchemutils + int + 0 + + Default text font style. + Default font style used for texts (0 = normal; 1 = oblique; 2 = italic). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/text-font-weight + /apps/gchemutils/paint/settings/text-font-weight + gchemutils + int + 4 + + Default text font weight. + Default font weight used for texts (2 = ultra-light; 3 = light; 4 = normal; 6 = semi-bold; 7 = bold; 8 = ultra-bold; 9 = heavy). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/text-font-variant + /apps/gchemutils/paint/settings/text-font-variant + gchemutils + int + 0 + + Default text font variant. + Default font variant used for texts (0 = normal; 1 = small caps). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/text-font-stretch + /apps/gchemutils/paint/settings/text-font-stretch + gchemutils + int + 4 + + Default text font stretch. + Default font stretch used for texts (0 = ultra-condensed; 1 = extra-condensed; 2 = condensed; 3 = semi-condensed; 4 = normal; 5 = semi-expanded; 6 = expanded; 7 = extra-expanded; 8 = ultra-expanded). Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/text-font-size + /apps/gchemutils/paint/settings/text-font-size + gchemutils + float + 12. + + Default text font size. + Font size used for texts. Used in the default theme. + + + + /schemas/apps/gchemutils/paint/settings/compression + /apps/gchemutils/paint/settings/compression + gchemutils + int + 0 + + File compression factor. + Compression factor when saving files. Acceptable values are 0 (no compression) to 9. + + + + /schemas/apps/gchemutils/paint/settings/tearable-mendeleiev + /apps/gchemutils/paint/settings/tearable-mendeleiev + gchemutils + bool + FALSE + + Whether the periodic table is tearable. + If TRUE, the periodic table popup widget will be tearable from the tools dialog box. + + + + /schemas/apps/gchemutils/paint/settings/copy-as-text + /apps/gchemutils/paint/settings/copy-as-text + gchemutils + bool + FALSE + + Whether to export simple text when copying. + If TRUE, STRING_UTF8 and STRING are added to the + clipboard formats. + + + + /schemas/apps/gchemutils/paint/settings/default-theme + /apps/gchemutils/paint/settings/default-theme + gchemutils + string + GChemPaint + + Default theme. + Default theme used when creating a new file. + + + + + diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/main.cc gnome-chemistry-utils-0.10.9/programs/paint/main.cc --- gnome-chemistry-utils-0.8.6/programs/paint/main.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/main.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,115 @@ +// -*- C++ -*- + +/* + * GChemPaint + * main.cc + * + * Copyright (C) 2001-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "standaloneapp.h" +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +#endif +#ifdef GOFFICE_IS_0_6 +# include +#endif +#include +#include + +extern "C" { + void gnome_authentication_manager_init (); +} + +// FIXME "the following lines should be removed for stable releases" +#undef PACKAGE +#define PACKAGE "gchempaint-unstable" + +void cb_print_version (const gchar *option_name, const gchar *value, gpointer data, GError **error) +{ + char *version = g_strconcat (_("GChemPaint version: "), VERSION, NULL); + puts (version); + g_free (version); + exit (0); +} + +gcpStandaloneApp* App; + +static GOptionEntry entries[] = +{ + { "version", 'v', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (void*) cb_print_version, "Prints GChemPaint version", NULL }, + { NULL } +}; + +int main(int argc, char *argv[]) +{ + GOptionContext *context; + GError *error = NULL; + textdomain (GETTEXT_PACKAGE); + + gtk_init (&argc, &argv); +#ifdef GOFFICE_IS_0_6 + gnome_vfs_init (); +#endif + App = new gcpStandaloneApp(); + if (argc > 1 && argv[1][0] == '-') { + context = g_option_context_new (_(" [file...]")); + g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); + App->AddOptions (context); + g_option_context_add_group (context, gtk_get_option_group (TRUE)); + g_option_context_set_help_enabled (context, TRUE); + g_option_context_parse (context, &argc, &argv, &error); + if (error) { + puts (error->message); + g_error_free (error); + return -1; + } + } + argv ++; + argc --; + + char *path, *uri; + while (*argv) { + if (**argv == '-') { + printf (_("Invalid or misplaced argument: %s\n"), *argv); + delete App; + exit (-1); + } + if (strstr (*argv, "://")) + uri = g_strdup (*argv); + else { + path = g_path_is_absolute (*argv)? g_strdup (*argv): g_build_filename (g_get_current_dir (), *argv, NULL); + uri = g_filename_to_uri (path, NULL, NULL); + g_free (path); + } + App->FileProcess (uri, go_get_mime_type (uri), false, NULL, NULL); + g_free (uri); + argv++; + } + + if (App->GetDocsNumber () == 0) + App->OnFileNew(); + + gtk_main(); + delete App; + + return 0; +} diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/Makefile.am gnome-chemistry-utils-0.10.9/programs/paint/Makefile.am --- gnome-chemistry-utils-0.8.6/programs/paint/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,84 @@ +EXTRA_DIST = \ + $(desktop_in_files) \ + $(schemas_in_files) + +CLEANFILES = \ + $(desktop_DATA) gchempaint.desktop \ + $(schemas_DATA) \ + $(kde_mime_desktop_DATA) + +MAINTAINERCLEANFILES = Makefile.in gchempaint.desktop.in + +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la \ + $(top_builddir)/libs/gcu/libgcpcanvas-@GCU_API_VER@.la +LIBS = $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +if GCU_NEEDS_GCONF +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(gnome_canvas_CFLAGS) \ + $(goffice_CFLAGS) \ + $(GCU_CFLAGS) +endif +DEFS += -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/paint\" + +bin_PROGRAMS = gchempaint-@GCU_API_VER@ + +gchempaint_@GCU_API_VER@_SOURCES = \ + main.cc \ + standaloneapp.cc \ + standaloneapp.h \ + standalonewin.cc \ + standalonewin.h + +desktop_in_files = gchempaint.desktop.in x-gchempaint.desktop.in + +gchempaint-@GCU_API_VER@.desktop: gchempaint.desktop + cp $< $@ + +desktopdir = $(datadir)/applications +desktop_DATA = gchempaint-@GCU_API_VER@.desktop +@INTLTOOL_DESKTOP_RULE@ + +if WITH_KDE_MIME +kde_mime_desktop_DATA = x-gchempaint.desktop +kde_mime_desktopdir = $(KDEMIMEDIR)/application +endif #WITH_KDE_MIME + +schemas_in_files = gchempaint.schemas.in + +schemasdir = $(GCONF_SCHEMA_FILE_DIR) +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) +@INTLTOOL_SCHEMAS_RULE@ + +install-data-local: +if GCONF_SCHEMAS_INSTALL + for schema in $(schemas_DATA) ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-install-rule $${schema} ; \ + done +endif #GCONF_SCHEMAS_INSTALL + +uninstall-local: +if GCONF_SCHEMAS_INSTALL + for schema in $(schemas_DATA) ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ + done +endif #GCONF_SCHEMAS_INSTALL +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchempaint@STABILITY@ ]; then \ + rm -f gchempaint@STABILITY@; \ + fi && \ + $(LN_S) gchempaint-@GCU_API_VER@ gchempaint@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchempaint@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchempaint@STABILITY@; \ + fi diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/Makefile.in gnome-chemistry-utils-0.10.9/programs/paint/Makefile.in --- gnome-chemistry-utils-0.8.6/programs/paint/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/Makefile.in 2009-11-14 11:46:05.000000000 +0100 @@ -0,0 +1,773 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = gchempaint-@GCU_API_VER@$(EXEEXT) +subdir = programs/paint +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gchempaint.desktop.in.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gchempaint.desktop.in +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" \ + "$(DESTDIR)$(kde_mime_desktopdir)" "$(DESTDIR)$(schemasdir)" +PROGRAMS = $(bin_PROGRAMS) +am_gchempaint_@GCU_API_VER@_OBJECTS = main.$(OBJEXT) \ + standaloneapp.$(OBJEXT) standalonewin.$(OBJEXT) +gchempaint_@GCU_API_VER@_OBJECTS = \ + $(am_gchempaint_@GCU_API_VER@_OBJECTS) +gchempaint_@GCU_API_VER@_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(gchempaint_@GCU_API_VER@_SOURCES) +DIST_SOURCES = $(gchempaint_@GCU_API_VER@_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +DATA = $(desktop_DATA) $(kde_mime_desktop_DATA) $(schemas_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/paint\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = $(top_builddir)/libs/gcp/libgchempaint-@GCU_API_VER@.la +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = \ + $(desktop_in_files) \ + $(schemas_in_files) + +CLEANFILES = \ + $(desktop_DATA) gchempaint.desktop \ + $(schemas_DATA) \ + $(kde_mime_desktop_DATA) + +MAINTAINERCLEANFILES = Makefile.in gchempaint.desktop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la \ + $(top_builddir)/libs/gcu/libgcpcanvas-@GCU_API_VER@.la + +@GCU_NEEDS_GCONF_FALSE@INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_canvas_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_vfs_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +gchempaint_@GCU_API_VER@_SOURCES = \ + main.cc \ + standaloneapp.cc \ + standaloneapp.h \ + standalonewin.cc \ + standalonewin.h + +desktop_in_files = gchempaint.desktop.in x-gchempaint.desktop.in +desktopdir = $(datadir)/applications +desktop_DATA = gchempaint-@GCU_API_VER@.desktop +@WITH_KDE_MIME_TRUE@kde_mime_desktop_DATA = x-gchempaint.desktop +@WITH_KDE_MIME_TRUE@kde_mime_desktopdir = $(KDEMIMEDIR)/application +schemas_in_files = gchempaint.schemas.in +schemasdir = $(GCONF_SCHEMA_FILE_DIR) +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/paint/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu programs/paint/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gchempaint.desktop.in: $(top_builddir)/config.status $(srcdir)/gchempaint.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gchempaint-@GCU_API_VER@$(EXEEXT): $(gchempaint_@GCU_API_VER@_OBJECTS) $(gchempaint_@GCU_API_VER@_DEPENDENCIES) + @rm -f gchempaint-@GCU_API_VER@$(EXEEXT) + $(CXXLINK) $(gchempaint_@GCU_API_VER@_OBJECTS) $(gchempaint_@GCU_API_VER@_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standaloneapp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalonewin.Po@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-desktopDATA: $(desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ + done + +uninstall-desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files +install-kde_mime_desktopDATA: $(kde_mime_desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(kde_mime_desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(kde_mime_desktopdir)" + @list='$(kde_mime_desktop_DATA)'; test -n "$(kde_mime_desktopdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(kde_mime_desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(kde_mime_desktopdir)" || exit $$?; \ + done + +uninstall-kde_mime_desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(kde_mime_desktop_DATA)'; test -n "$(kde_mime_desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(kde_mime_desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(kde_mime_desktopdir)" && rm -f $$files +install-schemasDATA: $(schemas_DATA) + @$(NORMAL_INSTALL) + test -z "$(schemasdir)" || $(MKDIR_P) "$(DESTDIR)$(schemasdir)" + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemasdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(schemasdir)" || exit $$?; \ + done + +uninstall-schemasDATA: + @$(NORMAL_UNINSTALL) + @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(schemasdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(schemasdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(kde_mime_desktopdir)" "$(DESTDIR)$(schemasdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local install-desktopDATA \ + install-kde_mime_desktopDATA install-schemasDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA \ + uninstall-kde_mime_desktopDATA uninstall-local \ + uninstall-schemasDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-exec-am install-strip uninstall-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am \ + install-data-local install-desktopDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-info install-info-am \ + install-kde_mime_desktopDATA install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-schemasDATA \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-desktopDATA uninstall-hook \ + uninstall-kde_mime_desktopDATA uninstall-local \ + uninstall-schemasDATA + + +gchempaint-@GCU_API_VER@.desktop: gchempaint.desktop + cp $< $@ +@INTLTOOL_DESKTOP_RULE@ +@INTLTOOL_SCHEMAS_RULE@ + +install-data-local: +@GCONF_SCHEMAS_INSTALL_TRUE@ for schema in $(schemas_DATA) ; do \ +@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +@GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --makefile-install-rule $${schema} ; \ +@GCONF_SCHEMAS_INSTALL_TRUE@ done + +uninstall-local: +@GCONF_SCHEMAS_INSTALL_TRUE@ for schema in $(schemas_DATA) ; do \ +@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +@GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --makefile-uninstall-rule $${schema} ; \ +@GCONF_SCHEMAS_INSTALL_TRUE@ done +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchempaint@STABILITY@ ]; then \ + rm -f gchempaint@STABILITY@; \ + fi && \ + $(LN_S) gchempaint-@GCU_API_VER@ gchempaint@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchempaint@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchempaint@STABILITY@; \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/standaloneapp.cc gnome-chemistry-utils-0.10.9/programs/paint/standaloneapp.cc --- gnome-chemistry-utils-0.8.6/programs/paint/standaloneapp.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/standaloneapp.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,59 @@ +// -*- C++ -*- + +/* + * GChemPaint + * standaloneapp.cc + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "standaloneapp.h" +#include "standalonewin.h" +#include +#include + +gcpStandaloneApp::gcpStandaloneApp(): gcp::Application() +{ +} + +gcpStandaloneApp::~gcpStandaloneApp() +{ + while (!m_Docs.empty()) + delete *m_Docs.begin(); +} + +void gcpStandaloneApp::OnFileNew(char const *Theme) +{ + gchar tmp[32]; + if (m_pActiveDoc && !m_pActiveDoc->GetView ()->PrepareUnselect ()) + return; + g_snprintf (tmp, sizeof (tmp), _("Untitled %d"), m_NumWindow++); + gcp::Window *win = new gcpStandaloneWindow (this, Theme); + win->GetDocument ()->SetLabel (tmp); +} + +GtkWindow* gcpStandaloneApp::GetWindow() +{ + return m_pActiveTarget->GetWindow (); +} + +void gcpStandaloneApp::NoMoreDocsEvent () +{ + gtk_main_quit (); +} diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/standaloneapp.h gnome-chemistry-utils-0.10.9/programs/paint/standaloneapp.h --- gnome-chemistry-utils-0.8.6/programs/paint/standaloneapp.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/standaloneapp.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,58 @@ +// -*- C++ -*- + +/* + * GChemPaint + * standaloneapp.h + * + * Copyright (C) 2004-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMPAINT_STANDALONEAPP_H +#define GCHEMPAINT_STANDALONEAPP_H + +#include "gcp/application.h" +#include "gcp/document.h" + +using namespace gcp; + +class gcpStandaloneApp: public gcp::Application +{ +public: + gcpStandaloneApp (); + virtual ~gcpStandaloneApp (); + + virtual GtkWindow* GetWindow (); + void OnFileNew (char const *Theme = NULL); + void NoMoreDocsEvent (); + +private: + GtkWidget* CreateView (); + +private: + GtkWindow* m_Window; + GtkUIManager* m_UIManager; + GtkNotebook* m_Book; + GtkWidget* m_Dock; //BonoboDock + GtkWidget* m_Bar; //GtkStatusBar + unsigned m_statusId; + unsigned m_MessageId; //currently displayed message in the status bar + unsigned m_NumDoc; //used to build the name of the action associated with the menu + std::map Groups; +}; + +#endif //GCHEMPAINT_STANDALONEAPP_H diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/standalonewin.cc gnome-chemistry-utils-0.10.9/programs/paint/standalonewin.cc --- gnome-chemistry-utils-0.8.6/programs/paint/standalonewin.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/standalonewin.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,47 @@ +// -*- C++ -*- + +/* + * GChemPaint + * standalonewin.cc + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "standaloneapp.h" +#include "standalonewin.h" + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +""; + +gcpStandaloneWindow::gcpStandaloneWindow (gcpStandaloneApp *App, char const *Theme): + gcp::Window (App, Theme, ui_description) +{ +} + +gcpStandaloneWindow::~gcpStandaloneWindow () +{ +} diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/standalonewin.h gnome-chemistry-utils-0.10.9/programs/paint/standalonewin.h --- gnome-chemistry-utils-0.8.6/programs/paint/standalonewin.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/standalonewin.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,41 @@ +// -*- C++ -*- + +/* + * GChemPaint + * standalonewin.h + * + * Copyright (C) 2006-2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCP_STANDALONE_WIN_H +#define GCP_STANDALONE_WIN_H + +#include + +using namespace gcp; + +class gcpStandaloneApp; + +class gcpStandaloneWindow: public gcp::Window +{ +public: + gcpStandaloneWindow (gcpStandaloneApp *App, char const *Theme); + virtual ~gcpStandaloneWindow (); +}; + +#endif // GCP_STANDALONE_WIN_H diff -Nru gnome-chemistry-utils-0.8.6/programs/paint/x-gchempaint.desktop.in gnome-chemistry-utils-0.10.9/programs/paint/x-gchempaint.desktop.in --- gnome-chemistry-utils-0.8.6/programs/paint/x-gchempaint.desktop.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/paint/x-gchempaint.desktop.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +MimeType=application/x-gchempaint +_Comment=2D Chemical structure +Type=MimeType +Icon=gchempaint +Patterns=*.gchempaint; diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/application.cc gnome-chemistry-utils-0.10.9/programs/spectra/application.cc --- gnome-chemistry-utils-0.8.6/programs/spectra/application.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/application.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,139 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/application.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "document.h" +#include "view.h" +#include "window.h" +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +#endif +#include +#include +#include + +using namespace gcu; +using namespace std; + +gsvApplication::gsvApplication (): Application (_("GSpectrum"), DATADIR, "gspectrum") +{ + SetImageWidth (600); +} + +gsvApplication::~gsvApplication () +{ +} + +gsvDocument *gsvApplication::OnFileNew () +{ + gsvDocument* Doc = new gsvDocument (this); + Doc->SetTitle (_("GSpectrum")); + new gsvWindow (this, Doc); + return Doc; +} + +void gsvApplication::OnFileOpen (gsvDocument *Doc) +{ + list l; + l.push_front ("chemical/x-jcamp-dx"); + FileChooser (this, false, l, Doc); +} + +void gsvApplication::OnQuit () +{ + gsvDocument *Doc; + while (m_Docs.size () > 0) { + Doc = dynamic_cast (*m_Docs.begin ()); + dynamic_cast (Doc->GetView ())->GetWindow ()->OnFileClose (); + } +} + +bool gsvApplication::FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *Doc) +{ + gsvDocument *pDoc = dynamic_cast (Doc); + if(bSave) { + GFile *file = g_file_new_for_uri (filename); + bool err = g_file_query_exists (file, NULL); + gint result = GTK_RESPONSE_YES; + if (err) { + char *unescaped = g_uri_unescape_string (filename, NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), unescaped); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gspectrum"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + } + if (result == GTK_RESPONSE_YES) { + g_file_delete (file, NULL, NULL); + dynamic_cast (pDoc->GetView ())->SaveAsImage (filename, mime_type, GetImageWidth (), GetImageHeight ()); + } + g_object_unref (file); + } else { + char *old_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + if (pDoc && !pDoc->GetEmpty ()) + pDoc = NULL; + if (!pDoc) + pDoc = OnFileNew (); + pDoc->Load (filename, mime_type); + setlocale (LC_NUMERIC, old_locale); + g_free (old_locale); + GtkRecentData data; + data.display_name = (char*) pDoc->GetTitle ().c_str (); + data.description = NULL; + data.mime_type = (char*) mime_type; + data.app_name = const_cast ("gspectrum"); + data.app_exec = const_cast ("gspectrum %u"); + data.groups = NULL; + data.is_private = FALSE; + gtk_recent_manager_add_full (GetRecentManager (), filename, &data); + } + return false; +} + +void gsvApplication::OnSaveAsImage (gsvDocument *Doc) +{ + if (!Doc) + return; + list l; + unsigned n = 0; + char const *mime; + map::iterator i, end = m_SupportedPixbufFormats.end (); + for (i = m_SupportedPixbufFormats.begin (); i != end; i++) + l.push_front ((*i).first.c_str ()); + if (go_image_get_format_from_name ("eps") != GO_IMAGE_FORMAT_UNKNOWN) { + mime = go_image_format_to_mime ("eps"); + if (mime) + l.push_front (mime); + } + l.push_front ("application/postscript"); + l.push_front ("application/pdf"); + l.push_front ("image/svg+xml"); + FileChooser (this, true, l, Doc, _("Save as image"), GetImageSizeWidget ()); +} diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/application.h gnome-chemistry-utils-0.10.9/programs/spectra/application.h --- gnome-chemistry-utils-0.8.6/programs/spectra/application.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/application.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,46 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/application.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + + +#ifndef GSV_APPLICATION_H +#define GSV_APPLICATION_H + +#include + +class gsvDocument; + +class gsvApplication: public gcu::Application +{ +public: + gsvApplication (); + ~gsvApplication (); + + gsvDocument *OnFileNew (); + void OnFileOpen (gsvDocument *Doc); + void OnSaveAsImage (gsvDocument *Doc); + bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, gcu::Document *pDoc = NULL); + void OnQuit (); +}; + +#endif // GSV_APPLICATION_H diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/document.cc gnome-chemistry-utils-0.10.9/programs/spectra/document.cc --- gnome-chemistry-utils-0.8.6/programs/spectra/document.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/document.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,56 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/document.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "document.h" +#include "application.h" +#include "view.h" +#include "window.h" +#include + +using namespace gcu; +using namespace std; + +gsvDocument::gsvDocument (gsvApplication *App): SpectrumDocument (App, new gsvView (this)) +{ +} + +gsvDocument::~gsvDocument () +{ +} + +void gsvDocument::Load (char const *uri, char const *mime_type) +{ + SpectrumDocument::Load (uri, mime_type); + string title = GetTitle (); + if (title.length () == 0) { + title = g_path_get_basename (uri); + char *buf = g_uri_unescape_string (title.c_str (), NULL); + title = buf; + g_free (buf); + } + dynamic_cast (m_View)->GetWindow ()->SetTitle (title); + string dirname = g_path_get_dirname (uri); + m_App->SetCurDir (dirname); +} diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/document.h gnome-chemistry-utils-0.10.9/programs/spectra/document.h --- gnome-chemistry-utils-0.8.6/programs/spectra/document.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/document.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,42 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/document.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSV_DOCUMENT_H +#define GSV_DOCUMENT_H + +#include +#include + +class gsvApplication; + +class gsvDocument: public gcu::SpectrumDocument +{ +public: + gsvDocument (gsvApplication *App); + virtual ~gsvDocument (); + + void Load (char const *uri, char const *mime_type); +}; + +#endif // GSV_DOCUMENT_H diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/gspectrum.cc gnome-chemistry-utils-0.10.9/programs/spectra/gspectrum.cc --- gnome-chemistry-utils-0.8.6/programs/spectra/gspectrum.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/gspectrum.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,101 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/gspectrum.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "document.h" +#ifdef GOFFICE_IS_0_6 +# include +#endif +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +# include +#endif +#include + +#ifndef GO_TYPE_PLUGIN_LOADER_MODULE +# define GO_TYPE_PLUGIN_LOADER_MODULE GO_PLUGIN_LOADER_MODULE_TYPE +#endif + +int main (int argc, char *argv[]) +{ + GError *error = NULL; + GOptionContext *context; + + textdomain (GETTEXT_PACKAGE); + gtk_init (&argc, &argv); +#ifdef GOFFICE_IS_0_6 + if (!gnome_vfs_init ()) { + printf ("Could not initialize GnomeVFS\n"); + return 1; + } +#endif + + if (argc > 1 && argv[1][0] == '-') { + context = g_option_context_new (_(" [file]")); + g_option_context_add_group (context, gtk_get_option_group (TRUE)); + g_option_context_set_help_enabled (context, TRUE); + g_option_context_parse (context, &argc, &argv, &error); + if (error) { + puts (error->message); + g_error_free (error); + return -1; + } + } + + // create a new Application. This initialize Goffice + gsvApplication *App = new gsvApplication (); + // Initialize plugins manager + go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE); + gsvDocument *pDoc = App->OnFileNew(); + char *path, *uri; + bool bres = false; + while (*argv) { + if (**argv == '-') { + printf (_("Invalid or misplaced argument: %s\n"), *argv); + delete App; + exit (-1); + } + if (strstr (*argv, "://")) + uri = g_strdup (*argv); + else { + path = g_path_is_absolute (*argv)? g_strdup (*argv): g_build_filename (g_get_current_dir (), *argv, NULL); + uri = g_filename_to_uri (path, NULL, NULL); + g_free (path); + } + if (bres) + pDoc = App->OnFileNew (); + bres = App->FileProcess (uri, go_get_mime_type (uri), false, NULL, pDoc); + g_free (uri); + argv++; + } + + gtk_main(); + delete App; + + return 0; +} diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/gspectrum.desktop.in gnome-chemistry-utils-0.10.9/programs/spectra/gspectrum.desktop.in --- gnome-chemistry-utils-0.8.6/programs/spectra/gspectrum.desktop.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/gspectrum.desktop.in 2009-11-14 11:46:22.000000000 +0100 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Spectrum viewer +_Comment=A spectrum viewer for the GNOME desktop +Exec=gspectrum-0.10 +Icon=gspectrum +Terminal=false +Type=Application +Categories=GTK;GNOME;Education;Science;Chemistry; +MimeType=chemical/x-jcamp-dx; diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/gspectrum.desktop.in.in gnome-chemistry-utils-0.10.9/programs/spectra/gspectrum.desktop.in.in --- gnome-chemistry-utils-0.8.6/programs/spectra/gspectrum.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/gspectrum.desktop.in.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Spectrum viewer @STABILITY_POSTFIX@ +_Comment=A spectrum viewer for the GNOME desktop +Exec=gspectrum-@GCU_API_VER@ +Icon=gspectrum +Terminal=false +Type=Application +Categories=GTK;GNOME;Education;Science;Chemistry; +MimeType=chemical/x-jcamp-dx; diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/Makefile.am gnome-chemistry-utils-0.10.9/programs/spectra/Makefile.am --- gnome-chemistry-utils-0.8.6/programs/spectra/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,56 @@ +EXTRA_DIST = $(desktop_in_files) + +CLEANFILES = $(desktop_DATA) gspectrum.desktop + +MAINTAINERCLEANFILES = Makefile.in gspectrum.desktop.in + +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +if GCU_NEEDS_GCONF +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) +else +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(GCU_CFLAGS) +endif +DEFS += -DDATADIR=\"$(datadir)\" -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade\" + +bin_PROGRAMS = gspectrum-@GCU_API_VER@ + +gspectrum_@GCU_API_VER@_SOURCES = \ + application.cc \ + application.h \ + document.cc \ + document.h \ + view.cc \ + view.h \ + window.cc \ + window.h \ + gspectrum.cc + +desktop_in_files = gspectrum.desktop.in + +gspectrum-@GCU_API_VER@.desktop: gspectrum.desktop + cp $< $@ + +desktopdir=$(datadir)/applications +desktop_DATA = gspectrum-@GCU_API_VER@.desktop +@INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gspectrum@STABILITY@ ]; then \ + rm -f gspectrum@STABILITY@; \ + fi && \ + $(LN_S) gspectrum-@GCU_API_VER@ gspectrum@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gspectrum@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gspectrum@STABILITY@; \ + fi diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/Makefile.in gnome-chemistry-utils-0.10.9/programs/spectra/Makefile.in --- gnome-chemistry-utils-0.8.6/programs/spectra/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/Makefile.in 2009-11-14 11:46:05.000000000 +0100 @@ -0,0 +1,708 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = gspectrum-@GCU_API_VER@$(EXEEXT) +subdir = programs/spectra +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gspectrum.desktop.in.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gspectrum.desktop.in +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" +PROGRAMS = $(bin_PROGRAMS) +am_gspectrum_@GCU_API_VER@_OBJECTS = application.$(OBJEXT) \ + document.$(OBJEXT) view.$(OBJEXT) window.$(OBJEXT) \ + gspectrum.$(OBJEXT) +gspectrum_@GCU_API_VER@_OBJECTS = \ + $(am_gspectrum_@GCU_API_VER@_OBJECTS) +gspectrum_@GCU_API_VER@_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(gspectrum_@GCU_API_VER@_SOURCES) +DIST_SOURCES = $(gspectrum_@GCU_API_VER@_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +DATA = $(desktop_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ + -DPKGDATADIR=\"$(datadir)/gchemutils/@GCU_API_VER@\" \ + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade\" +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(desktop_in_files) +CLEANFILES = $(desktop_DATA) gspectrum.desktop +MAINTAINERCLEANFILES = Makefile.in gspectrum.desktop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +@GCU_NEEDS_GCONF_FALSE@INCLUDES = \ +@GCU_NEEDS_GCONF_FALSE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_FALSE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_FALSE@ $(GCU_CFLAGS) + +@GCU_NEEDS_GCONF_TRUE@INCLUDES = \ +@GCU_NEEDS_GCONF_TRUE@ -I$(top_srcdir) -I$(top_srcdir)/libs \ +@GCU_NEEDS_GCONF_TRUE@ $(goffice_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(gnome_vfs_CFLAGS) \ +@GCU_NEEDS_GCONF_TRUE@ $(GCU_CFLAGS) + +gspectrum_@GCU_API_VER@_SOURCES = \ + application.cc \ + application.h \ + document.cc \ + document.h \ + view.cc \ + view.h \ + window.cc \ + window.h \ + gspectrum.cc + +desktop_in_files = gspectrum.desktop.in +desktopdir = $(datadir)/applications +desktop_DATA = gspectrum-@GCU_API_VER@.desktop +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/spectra/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu programs/spectra/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gspectrum.desktop.in: $(top_builddir)/config.status $(srcdir)/gspectrum.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gspectrum-@GCU_API_VER@$(EXEEXT): $(gspectrum_@GCU_API_VER@_OBJECTS) $(gspectrum_@GCU_API_VER@_DEPENDENCIES) + @rm -f gspectrum-@GCU_API_VER@$(EXEEXT) + $(CXXLINK) $(gspectrum_@GCU_API_VER@_OBJECTS) $(gspectrum_@GCU_API_VER@_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gspectrum.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Po@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-desktopDATA: $(desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ + done + +uninstall-desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-desktopDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-exec-am install-strip uninstall-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am \ + install-desktopDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-desktopDATA uninstall-hook + + +gspectrum-@GCU_API_VER@.desktop: gspectrum.desktop + cp $< $@ +@INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gspectrum@STABILITY@ ]; then \ + rm -f gspectrum@STABILITY@; \ + fi && \ + $(LN_S) gspectrum-@GCU_API_VER@ gspectrum@STABILITY@ + +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gspectrum@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gspectrum@STABILITY@; \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/view.cc gnome-chemistry-utils-0.10.9/programs/spectra/view.cc --- gnome-chemistry-utils-0.8.6/programs/spectra/view.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/view.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,35 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/view.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "document.h" +#include "view.h" + +gsvView::gsvView (gsvDocument *Doc): gcu::SpectrumView (Doc) +{ +} + +gsvView::~gsvView () +{ +} diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/view.h gnome-chemistry-utils-0.10.9/programs/spectra/view.h --- gnome-chemistry-utils-0.8.6/programs/spectra/view.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/view.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,44 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/view.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSV_VIEW_H +#define GSV_VIEW_H + +#include + + +class gsvDocument; +class gsvWindow; + +class gsvView: public gcu::SpectrumView +{ +public: + gsvView (gsvDocument *Doc); + virtual ~gsvView (); + +// Properties +GCU_PROP (gsvWindow*, Window); +}; + +#endif // GSV_VIEW_H diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/window.cc gnome-chemistry-utils-0.10.9/programs/spectra/window.cc --- gnome-chemistry-utils-0.8.6/programs/spectra/window.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/window.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,377 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/window.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "application.h" +#include "document.h" +#include "view.h" +#include "window.h" +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +# include +# include +# include +#endif +#include +#include + +using namespace std; + +//Callbacks +static bool on_delete_event (GtkWidget* widget, GdkEvent *event, gsvWindow* Win) +{ + delete Win; + return false; +} + +static void on_file_open (GtkWidget *widget, gsvWindow* Win) +{ + Win->OnFileOpen (); +} + +static void on_file_save_as_image(GtkWidget* widget, gsvWindow* Win) +{ + Win->GetApp ()->OnSaveAsImage (Win->GetDoc ()); +} + +static void on_file_close (GtkWidget *widget, gsvWindow* Win) +{ + Win->OnFileClose (); +} + +static void on_page_setup (GtkWidget *widget, gsvWindow* Win) +{ + Win->OnPageSetup (); +} + +static void on_print_preview (GtkWidget *widget, gsvWindow* Win) +{ + Win->GetDoc ()->Print (true); +} + +static void on_file_print (GtkWidget *widget, gsvWindow* Win) +{ + Win->GetDoc ()->Print (false); +} + +static void on_quit (GtkWidget *widget, gsvWindow* Win) +{ + gsvApplication *App = Win->GetApp (); + App->OnQuit (); +} + +static void on_copy (GtkWidget* widget, gsvWindow* Win) +{ + Win->OnCopy (); +} + +static void on_help (GtkWidget *widget, gsvWindow* window) +{ + window->GetApp ()->OnHelp (); +} + +static void on_web (GtkWidget *widget, gsvWindow* window) +{ + window->GetApp ()->OnWeb (); +} + +static void on_live_assistance (GtkWidget *widget, gsvWindow *Win) +{ + Win->GetApp ()->OnLiveAssistance (); +} + +static void on_mail (GtkWidget *widget, gsvWindow* window) +{ + window->GetApp ()->OnMail (); +} + +static void on_bug (GtkWidget *widget, gsvWindow* window) +{ + window->GetApp ()->OnBug (); +} + +static void on_about_activate_url (GtkAboutDialog *about, const gchar *url, gpointer data) +{ + reinterpret_cast (data)->GetApp ()->OnWeb (url); +} + +static void on_about (GtkWidget *widget, gsvWindow *Win) +{ + const gchar * authors[] = {"Jean Bréfort", NULL}; + const gchar * comments = _("GSpectrum is a spectrum viewer for Gnome"); + /* const gchar * documentors[] = {NULL}; */ + const gchar * copyright = _("Copyright © 2007-2008 Jean Bréfort\n"); + const gchar * license = + "This program is free software; you can redistribute it and/or\n" + "modify it under the terms of the GNU General Public License as\n" + "published by the Free Software Foundation; either version 2 of the\n" + "License, or (at your option) any later version.\n\n" + "This program is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n\n" + "You should have received a copy of the GNU General Public License\n" + "along with this program; if not, write to the Free Software\n" + "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307\n" + "USA"; + + gtk_about_dialog_set_url_hook (on_about_activate_url, Win, NULL); + + /* Note to translators: replace the following string with the appropriate credits for you lang */ + const gchar * translator_credits = _("translator_credits"); + gtk_show_about_dialog (NULL, + "name", "GSpectrum", + "authors", authors, + "comments", comments, + "copyright", copyright, + "license", license, + "translator_credits", translator_credits, + "version", VERSION, + "website", "http://www.nongnu.org/gchemutils", + NULL); +} + +static void on_recent (GtkRecentChooser *widget, gsvWindow *Win) +{ + gsvApplication *App = Win->GetApp (); + GtkRecentInfo *info = gtk_recent_chooser_get_current_item (widget); + App->FileProcess (gtk_recent_info_get_uri (info), gtk_recent_info_get_mime_type (info), false, NULL, Win->GetDoc ()); + gtk_recent_info_unref(info); +} + +static GtkActionEntry entries[] = { + { "FileMenu", NULL, N_("_File") }, + { "Open", GTK_STOCK_OPEN, N_("_Open..."), "O", + N_("Open a file"), G_CALLBACK (on_file_open) }, + { "SaveAsImage", GTK_STOCK_SAVE_AS, N_("Save As _Image..."), "I", + N_("Save the current file as an image"), G_CALLBACK (on_file_save_as_image) }, + { "PageSetup", NULL, N_("Page Set_up..."), NULL, + N_("Setup the page settings for your current printer"), G_CALLBACK (on_page_setup) }, + { "PrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), NULL, + N_("Print preview"), G_CALLBACK (on_print_preview) }, + { "Print", GTK_STOCK_PRINT, N_("_Print..."), "P", + N_("Print the current file"), G_CALLBACK (on_file_print) }, + { "Close", GTK_STOCK_CLOSE, N_("_Close"), "W", + N_("Close the current file"), G_CALLBACK (on_file_close) }, + { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", + N_("Quit GSpectrum"), G_CALLBACK (on_quit) }, + { "EditMenu", NULL, N_("_Edit") }, + { "Copy", GTK_STOCK_COPY, N_("_Copy"), "C", + N_("Copy the selection"), G_CALLBACK (on_copy) }, + { "HelpMenu", NULL, N_("_Help") }, + { "Help", GTK_STOCK_HELP, N_("_Contents"), "F1", + N_("View help for the Spectra Viewer"), G_CALLBACK (on_help) }, + { "Web", NULL, N_("Gnome Chemistry Utils on the _web"), NULL, + N_("Browse the Gnome Chemistry Utils's web site"), G_CALLBACK (on_web) }, + { "LiveAssistance", NULL, N_("Live assistance"), NULL, + N_("Open the Gnome Chemistry Utils IRC channel"), G_CALLBACK (on_live_assistance) }, + { "Mail", NULL, N_("_Ask a question"), NULL, + N_("Ask a question about the Gnome Chemistry Utils"), G_CALLBACK (on_mail) }, + { "Bug", NULL, N_("Report _Bugs"), NULL, + N_("Submit a bug report for the Gnome Chemistry Utils"), G_CALLBACK (on_bug) }, + { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, + N_("About GSpectrum"), G_CALLBACK (on_about) } +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +""; + +gsvWindow::gsvWindow (gsvApplication *App, gsvDocument *Doc) +{ + m_App = App; + m_Doc = Doc; + m_Window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL)); + gtk_window_set_default_size (m_Window, 600, 400); + g_signal_connect (G_OBJECT (m_Window), "delete-event", G_CALLBACK (on_delete_event), this); + + GtkWidget *vbox = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (m_Window), vbox); + GtkUIManager *ui_manager = gtk_ui_manager_new (); + GtkActionGroup *action_group = gtk_action_group_new ("MenuActions"); + gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); + gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), this); + gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); + GtkAccelGroup *accel_group = gtk_ui_manager_get_accel_group (ui_manager); + gtk_window_add_accel_group (GTK_WINDOW (m_Window), accel_group); + GError *error = NULL; + if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) { + g_message ("building menus failed: %s", error->message); + g_error_free (error); + exit (EXIT_FAILURE); + } + GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager, "/MainMenu/FileMenu/Open"); + GtkWidget *w = gtk_recent_chooser_menu_new_for_manager (App->GetRecentManager ()); + gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (w), GTK_RECENT_SORT_MRU); + GtkRecentFilter *filter = gtk_recent_filter_new (); + gtk_recent_filter_add_mime_type (filter, "chemical/x-jcamp-dx"); + gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (w), filter); + g_signal_connect (G_OBJECT (w), "item-activated", G_CALLBACK (on_recent), this); + GtkWidget *item = gtk_menu_item_new_with_label (_("Open recent")); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), w); + gtk_widget_show_all (item); + gtk_menu_shell_insert (GTK_MENU_SHELL (gtk_widget_get_parent (menu)), item, 2); + GtkWidget *bar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); + gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0); + m_View = dynamic_cast (m_Doc->GetView ()); + m_View->SetWindow (this); + gtk_box_pack_start (GTK_BOX (vbox), m_View->GetOptionBox (), FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (vbox), m_View->GetWidget ()); + gtk_widget_show_all (GTK_WIDGET (m_Window)); + // Initialize print settings +} + +gsvWindow::~gsvWindow () +{ + delete m_Doc; +} + +void gsvWindow::OnFileOpen () +{ + m_App->OnFileOpen (m_Doc); +} + +void gsvWindow::OnFileClose () +{ + gtk_widget_destroy (GTK_WIDGET (m_Window)); + delete this; +} + +void gsvWindow::OnPageSetup () +{ + new gcu::PrintSetupDlg (m_App, m_Doc); +} + +static GtkTargetEntry const targets[] = { + {(char *) "application/x-goffice-graph", 0, 0}, + {(char *) "image/svg+xml", 0, 2}, + {(char *) "image/svg", 0, 1}, + {(char *) "image/png", 0, 3} +}; + +static void on_get_data (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, GogGraph *graph) +{ + guchar *buffer = NULL; + char *format = NULL; + GsfOutput *output; + GsfOutputMemory *omem; + gsf_off_t osize; + GOImageFormat fmt = GO_IMAGE_FORMAT_UNKNOWN; + double w, h; + gog_graph_get_size (graph, &w, &h); + output = gsf_output_memory_new (); + omem = GSF_OUTPUT_MEMORY (output); + switch (info) { + case 0: { + GsfXMLOut *xout; + char *old_num_locale, *old_monetary_locale; + + old_num_locale = g_strdup (go_setlocale (LC_NUMERIC, NULL)); + go_setlocale (LC_NUMERIC, "C"); + old_monetary_locale = g_strdup (go_setlocale (LC_MONETARY, NULL)); + go_setlocale (LC_MONETARY, "C"); + go_locale_untranslated_booleans (); + + xout = gsf_xml_out_new (output); +#ifdef HAVE_GO_DATA_SERIALIZE + gog_object_write_xml_sax (GOG_OBJECT (graph), xout, NULL); +#else + gog_object_write_xml_sax (GOG_OBJECT (graph), xout); +#endif + g_object_unref (xout); + + /* go_setlocale restores bools to locale translation */ + go_setlocale (LC_MONETARY, old_monetary_locale); + g_free (old_monetary_locale); + go_setlocale (LC_NUMERIC, old_num_locale); + g_free (old_num_locale); + } + break; + case 1: + case 2: + fmt = GO_IMAGE_FORMAT_SVG; + break; + case 3: + fmt = GO_IMAGE_FORMAT_PNG; + break; + } + /* FIXME Add a dpi editor. Default dpi to 150 for now */ + bool res = (fmt != GO_IMAGE_FORMAT_UNKNOWN)? + gog_graph_export_image (graph, fmt, output, 150.0, 150.0): + true; + if (res) { + osize = gsf_output_size (output); + + buffer = (guchar*) g_malloc (osize); + memcpy (buffer, gsf_output_memory_get_bytes (omem), osize); + gsf_output_close (output); + g_object_unref (output); + g_free (format); + gtk_selection_data_set (selection_data, + selection_data->target, 8, + (guchar *) buffer, osize); + g_free (buffer); + } +} + +void gsvWindow::OnCopy () +{ + GtkClipboard* clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + gtk_clipboard_set_with_data (clipboard, targets, 4, + (GtkClipboardGetFunc) on_get_data, NULL, + go_graph_widget_get_graph (GO_GRAPH_WIDGET (m_View->GetWidget ()))); +} + +void gsvWindow::SetTitle (string const &title) +{ + gtk_window_set_title (m_Window, title.c_str ()); +} diff -Nru gnome-chemistry-utils-0.8.6/programs/spectra/window.h gnome-chemistry-utils-0.10.9/programs/spectra/window.h --- gnome-chemistry-utils-0.8.6/programs/spectra/window.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/spectra/window.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,56 @@ +// -*- C++ -*- + +/* + * Gnome Chemistry Utils + * programs/spectra/window.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSV_WINDOW_H +#define GSV_WINDOW_H + +#include +#include +#include + +class gsvApplication; +class gsvDocument; +class gsvView; + +class gsvWindow +{ +public: + gsvWindow (gsvApplication *App, gsvDocument *Doc); + virtual ~gsvWindow (); + + void OnFileOpen (); + void OnPageSetup (); + void OnFileClose (); + void OnCopy (); + void SetTitle (std::string const &title); + +private: + GtkWindow* m_Window; + +GCU_RO_PROP (gsvApplication *, App); +GCU_RO_PROP (gsvView *, View); +GCU_RO_PROP (gsvDocument *, Doc); +}; + +#endif // GSV_WINDOW_H diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-app.cc gnome-chemistry-utils-0.10.9/programs/table/gchemtable-app.cc --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-app.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-app.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Chemistry Utils * programs/gchemtable-app.cc * - * Copyright (C) 2005-2007 Jean Bréfort + * Copyright (C) 2005-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,15 +18,18 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include "config.h" #include "gchemtable-app.h" +#include "gchemtable-curve.h" +#include "gchemtable-data.h" #include "gchemtable-elt.h" #include #include +#include #include #include #include @@ -34,16 +37,26 @@ #include #include #include -#include +#include #include #include +#include +#include -static void on_quit (GtkWidget *widget, void *data) +using namespace std; + +static void on_quit (GtkWidget *widget, GChemTableApp *App) { + delete App; gtk_main_quit(); } -void on_no_colors (GtkWidget *widget, GChemTableApp *App) +static void on_new_chart (GtkWidget *widget, GChemTableApp *App) +{ + App->OnNewChart (); +} + +static void on_no_colors (GtkWidget *widget, GChemTableApp *App) { App->SetColorScheme ("none"); } @@ -53,22 +66,39 @@ App->SetColorScheme ("default"); } -void on_state_colors (GtkWidget *widget, GChemTableApp *App) +static void on_state_colors (GtkWidget *widget, GChemTableApp *App) { App->SetColorScheme ("state"); } -void on_family_colors (GtkWidget *widget, GChemTableApp *App) +static void on_family_colors (GtkWidget *widget, GChemTableApp *App) { App->SetColorScheme ("family"); } +void on_acidity_colors (GtkWidget *widget, GChemTableApp *App) +{ + App->SetColorScheme ("acidity"); +} + +void on_electroneg_colors (GtkWidget *widget, GChemTableApp *App) +{ + App->SetColorScheme ("electroneg"); +} + +static void on_radius_colors (GtkWidget *widget, GChemTableApp *App) +{ + App->SetColorScheme ("radius"); +} + +static void on_block_colors (GtkWidget *widget, GChemTableApp *App) +{ + App->SetColorScheme ("block"); +} + static void on_about_activate_url (GtkAboutDialog *about, const gchar *url, gpointer data) { - GnomeVFSResult error = gnome_vfs_url_show(url); - if (error != GNOME_VFS_OK) { - g_print("GnomeVFSResult while trying to launch URL in about dialog: error %u\n", error); - } + reinterpret_cast (data)->OnWeb (url); } static void on_help (GtkWidget *widget, GChemTableApp *app) @@ -86,6 +116,11 @@ app->OnMail (); } +static void on_live_assistance (GtkWidget *widget, GChemTableApp *app) +{ + app->OnLiveAssistance (); +} + static void on_bug (GtkWidget *widget, GChemTableApp *app) { app->OnBug (); @@ -93,47 +128,18 @@ static void on_about (GtkWidget *widget, GChemTableApp *app) { - const gchar * authors[] = {"Jean Bréfort", NULL}; - const gchar * comments = _("GChemTable is a chemical periodic table of the elements application"); - /* const gchar * documentors[] = {NULL}; */ - const gchar * copyright = _("Copyright © 2005-2007 Jean Bréfort"); - const gchar * license = - "This program is free software; you can redistribute it and/or\n" - "modify it under the terms of the GNU General Public License as\n" - "published by the Free Software Foundation; either version 2 of the\n" - "License, or (at your option) any later version.\n\n" - "This program is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU General Public License for more details.\n\n" - "You should have received a copy of the GNU General Public License\n" - "along with this program; if not, write to the Free Software\n" - "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307\n" - "USA"; - - gtk_about_dialog_set_url_hook(on_about_activate_url, NULL, NULL); - - /* Note to translators: replace the following string with the appropriate credits for you lang */ - const gchar * translator_credits = _("translator_credits"); - gtk_show_about_dialog (app->GetWindow (), - "name", "GChemTable", - "authors", authors, - "comments", comments, - "copyright", copyright, - "license", license, - "translator_credits", translator_credits, - "version", VERSION, - "website", "http://www.nongnu.org/gchemutils", - NULL); + app->OnAbout (); } -void on_changed (GtkPeriodic* periodic, guint Z, GChemTableApp *app) +static void on_changed (GtkPeriodic* periodic, guint Z, GChemTableApp *app) { app->OnElement (Z); } static GtkActionEntry entries[] = { { "FileMenu", NULL, N_("_File") }, + { "NewChart", NULL, N_("New _Chart"), "N", + N_("Create a new chart"), G_CALLBACK (on_new_chart) }, { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", N_("Quit GChemTable"), G_CALLBACK (on_quit) }, { "ViewMenu", NULL, N_("_View") }, @@ -148,11 +154,25 @@ {"FamilyColors", NULL, N_("Family"), NULL, N_("Use colors to display the family grouping of the elements"), G_CALLBACK (on_family_colors) }, + {"AcidityColors", NULL, N_("Acidity"), NULL, + N_("Use colors to display the acidity of the elements"), + G_CALLBACK (on_acidity_colors) }, + {"ElectronegColors", NULL, N_("Electronegativity"), NULL, + N_("Use colors to display the electronegativity of the elements"), + G_CALLBACK (on_electroneg_colors) }, + {"RadiusColors", NULL, N_("Atomic radius"), NULL, + N_("Use colors to display the covalent radii of the elements"), + G_CALLBACK (on_radius_colors) }, + {"BlockColors", NULL, N_("Block"), NULL, + N_("Use colors to display the blocks elements belong to"), + G_CALLBACK (on_block_colors) }, { "HelpMenu", NULL, N_("_Help") }, { "Help", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("View help for the Periodic Table"), G_CALLBACK (on_help) }, { "Web", NULL, N_("Gnome Chemistry Utils on the _web"), NULL, N_("Browse the Gnome Chemistry Utils's web site"), G_CALLBACK (on_web) }, + { "LiveAssistance", NULL, N_("Live assistance"), NULL, + N_("Open the Gnome Chemistry Utils IRC channel"), G_CALLBACK (on_live_assistance) }, { "Mail", NULL, N_("_Ask a question"), NULL, N_("Ask a question about the Gnome Chemistry Utils"), G_CALLBACK (on_mail) }, { "Bug", NULL, N_("Report _Bugs"), NULL, @@ -165,6 +185,9 @@ "" " " " " +" " +" " +" " " " " " " " @@ -173,54 +196,34 @@ " " " " " " +//" " +" " +" " +" " " " " " " " " " -" " -" " -" " +" " +" " +" " +" " " " " " " " ""; -static const char *ui_mail_description = -"" -" " -" " -" " -" " -" " -" " -" " -""; - -static const char *ui_web_description = -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -""; - static void get_state_color (int Z, GdkColor *color, GChemTableApp *App) { App->GetStateColor (Z, color); } -void on_changed_temp (GtkRange *range, GChemTableApp *app) +static void on_changed_temp (GtkRange *range, GChemTableApp *app) { app->SetTemperature (gtk_range_get_value (range)); } -void on_changed_family (GtkComboBox *box, GChemTableApp *app) +static void on_changed_family (GtkComboBox *box, GChemTableApp *app) { app->SetFamily (gtk_combo_box_get_active (box)); } @@ -230,15 +233,41 @@ App->GetFamilyColor (Z, color); } +static void get_acidity_color (int Z, GdkColor *color, GChemTableApp *App) +{ + App->GetAcidityColor (Z, color); +} + +static void get_electroneg_color (int Z, GdkColor *color, GChemTableApp *App) +{ + App->GetElectronegColor (Z, color); +} + +static void get_radius_color (int Z, GdkColor *color, GChemTableApp *App) +{ + App->GetRadiusColor (Z, color); +} + +static void get_block_color (int Z, GdkColor *color, GChemTableApp *App) +{ + App->GetBlockColor (Z, color); +} + +static void on_destroy (GChemTableApp *App) +{ + delete App; + gtk_main_quit (); +} + GChemTableApp::GChemTableApp (): Application ("gchemtable") { GtkVBox* vbox; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW(window), _("Periodic table of the elements")); - g_signal_connect (G_OBJECT (window), "destroy", - G_CALLBACK (gtk_main_quit), - NULL); + g_signal_connect_swapped (G_OBJECT (window), "delete-event", + G_CALLBACK (on_destroy), + this); g_object_set (G_OBJECT(window), "allow-shrink", FALSE, NULL); @@ -257,14 +286,6 @@ g_error_free (error); exit (EXIT_FAILURE); } - if (HasWebBrowser () && !gtk_ui_manager_add_ui_from_string (ui_manager, ui_web_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } - if (HasMailAgent () && !gtk_ui_manager_add_ui_from_string (ui_manager, ui_mail_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } GtkWidget *bar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0); periodic = GTK_PERIODIC (gtk_periodic_new()); @@ -299,10 +320,63 @@ gtk_combo_box_set_active (GTK_COMBO_BOX(familywidget), 0); family = -1; g_signal_connect (G_OBJECT (familywidget), "changed", G_CALLBACK (on_changed_family), this); + + GladeXML *acidityxml = glade_xml_new (GLADEDIR"/acidity.glade", "acidity-legend", NULL); + GtkWidget *aciditylegend = glade_xml_get_widget (acidityxml, "acidity-legend"); + colorschemes["acidity"] = gtk_periodic_add_color_scheme (periodic, (GtkPeriodicColorFunc) get_acidity_color, aciditylegend, this); + gtk_widget_show_all (aciditylegend); + + colorschemes["electroneg"] = gtk_periodic_add_color_scheme (periodic, (GtkPeriodicColorFunc) get_electroneg_color, NULL, this); + + colorschemes["radius"] = gtk_periodic_add_color_scheme (periodic, (GtkPeriodicColorFunc) get_radius_color, NULL, this); + + GladeXML *blockxml = glade_xml_new (GLADEDIR"/block.glade", "block-legend", NULL); + GtkWidget *blocklegend = glade_xml_get_widget (blockxml, "block-legend"); + colorschemes["block"] = gtk_periodic_add_color_scheme (periodic, (GtkPeriodicColorFunc) get_block_color, blocklegend, this); + gtk_widget_show_all (blocklegend); + gct_data_init (); + } GChemTableApp::~GChemTableApp () { + gct_data_clear (); +} + +void GChemTableApp::OnAbout () +{ + const gchar * authors[] = {"Jean Bréfort", NULL}; + const gchar * comments = _("GChemTable is a chemical periodic table of the elements application"); + /* const gchar * documentors[] = {NULL}; */ + const gchar * copyright = _("Copyright © 2005-2008 Jean Bréfort"); + const gchar * license = + "This program is free software; you can redistribute it and/or\n" + "modify it under the terms of the GNU General Public License as\n" + "published by the Free Software Foundation; either version 2 of the\n" + "License, or (at your option) any later version.\n\n" + "This program is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n\n" + "You should have received a copy of the GNU General Public License\n" + "along with this program; if not, write to the Free Software\n" + "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301\n" + "USA"; + + gtk_about_dialog_set_url_hook (on_about_activate_url, this, NULL); + + /* Note to translators: replace the following string with the appropriate credits for you lang */ + const gchar * translator_credits = _("translator_credits"); + gtk_show_about_dialog (GetWindow (), + "name", "GChemTable", + "authors", authors, + "comments", comments, + "copyright", copyright, + "license", license, + "translator_credits", translator_credits, + "version", VERSION, + "website", "http://www.nongnu.org/gchemutils", + NULL); } void GChemTableApp::OnElement (int Z) @@ -454,3 +528,172 @@ return; } } + +void GChemTableApp::GetAcidityColor (int Z, GdkColor *color) +{ + color->red= color->green = color->blue = 0; + Element *elt = Element::GetElement (Z); + int value = elt->GetIntegerProperty ("acidicbehaviour"); + if (value == GCU_ERROR) + return; + +/* + 0 means acidic + 1 means basic + 2 means neutral + 3 means amphoteric +*/ + + switch (value) { + case 0: + color->red = 0xffff; + return; + + case 1: + color->blue = 0xffff; + return; + + case 2: + color->green = 0xffff; + return; + + case 3: + color->red = 0xffff; + color->blue = 0xffff; + return; + } +} + +void GChemTableApp::GetElectronegColor (int Z, GdkColor *color) +{ + double max=3.98; + double min=0.7; + double limit; + + color->red= color->green = color->blue = 0; + Element *elt = Element::GetElement (Z); + Value const *value = elt->GetProperty ("electronegativityPauling"); + if (!value) + return; + + double en = value->GetAsDouble (); + + limit = 0.5 * (max - min); + + if (en < limit) { + color->red = 0xffff; + color->blue = static_cast ((en - min) * 0xffff / (limit - min)); + } else { + color->blue = 0xffff; + color->red= static_cast ((en - max) * 0xffff / (limit - max)); + } + +} + +void GChemTableApp::GetRadiusColor (int Z, GdkColor *color) +{ + double max=2.25; + double min=0.32; + double limit; + + color->red = color->green = color->blue = 0; + Element *elt = Element::GetElement (Z); + Value const *value = elt->GetProperty ("radiusCovalent"); + if (!value) + return; + + double radius = value->GetAsDouble (); + + limit = 0.5 * (max - min); + + if (radius < limit) { + color->red = 0xffff; + color->blue = static_cast ((radius - min) * 0xffff / (limit - min)); + } else { + color->blue = 0xffff; + color->red= static_cast ((radius - max) * 0xffff / (limit - max)); + } + +} + +void GChemTableApp::GetBlockColor (int Z, GdkColor *color) +{ + color->red= color->green = color->blue = 0; + Element *elt = Element::GetElement (Z); + std::string &value = elt->GetStringProperty ("periodTableBlock"); + if (!value.length()) + return; + + if (value == "s") { + color->blue = 0x8eff; + return; + } + + if (value == "p") { + color->red = 0x8eff; + return; + } + + if (value == "d") { + color->green = 0x8eff; + return; + } + + if (value == "f") { + color->blue = 0x8eff; + color->red = 0x8eff; + return; + } +} + +void GChemTableApp::OnNewChart () +{ + new GChemTableCurve (this, NULL); +} + +void GChemTableApp::OnSaveAsImage (GChemTableCurve *curve) +{ + if (!curve) + return; + list l; + unsigned n = 0; + char const *mime; + map::iterator i, end = m_SupportedPixbufFormats.end (); + for (i = m_SupportedPixbufFormats.begin (); i != end; i++) + l.push_front ((*i).first.c_str ()); + if (go_image_get_format_from_name ("eps") != GO_IMAGE_FORMAT_UNKNOWN) { + mime = go_image_format_to_mime ("eps"); + if (mime) + l.push_front (mime); + } + l.push_front ("application/postscript"); + l.push_front ("application/pdf"); + l.push_front ("image/svg+xml"); + FileChooser (this, true, l, reinterpret_cast (curve), _("Save as image"), GetImageSizeWidget ()); +} + +bool GChemTableApp::FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *Doc) +{ + GChemTableCurve *curve = reinterpret_cast (Doc); + if(bSave) { + GFile *file = g_file_new_for_uri (filename); + bool err = g_file_query_exists (file, NULL); + gint result = GTK_RESPONSE_YES; + if (err) { + char *unescaped = g_uri_unescape_string (filename, NULL); + gchar * message = g_strdup_printf (_("File %s\nexists, overwrite?"), unescaped); + g_free (unescaped); + GtkDialog* Box = GTK_DIALOG (gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, message)); + gtk_window_set_icon_name (GTK_WINDOW (Box), "gspectrum"); + result = gtk_dialog_run (Box); + gtk_widget_destroy (GTK_WIDGET (Box)); + g_free (message); + } + if (result == GTK_RESPONSE_YES) { + g_file_delete (file, NULL, NULL); + curve->SaveAsImage (filename, mime_type, GetImageWidth (), GetImageHeight ()); + } + g_object_unref (file); + } + return false; +} diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-app.h gnome-chemistry-utils-0.10.9/programs/table/gchemtable-app.h --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-app.h 2007-10-25 07:11:13.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-app.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -32,6 +32,8 @@ using namespace gcu; +class GChemTableCurve; + class GChemTableApp: public Application { public: @@ -40,6 +42,7 @@ void OnElement (int Z); GtkWindow *GetWindow () {return GTK_WINDOW (window);} + void OnAbout (); void ClearPage (int Z); void SetCurZ (int Z); void SetColorScheme (char const *name); @@ -47,13 +50,21 @@ void SetFamily (int family_N); void GetStateColor (int Z, GdkColor *color); void GetFamilyColor (int Z, GdkColor *color); + void GetAcidityColor (int Z, GdkColor *color); + void GetElectronegColor (int Z, GdkColor *color); + void GetRadiusColor (int Z, GdkColor *color); + void GetBlockColor (int Z, GdkColor *color); + void OnNewChart (); + void OnSaveAsImage (GChemTableCurve *curve); + bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, Document *Doc); + private: Dialog *Pages[118]; GtkWidget *window; GtkPeriodic *periodic; int m_CurZ; - map colorschemes; + std::map colorschemes; double temperature; int family; }; diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-curve.cc gnome-chemistry-utils-0.10.9/programs/table/gchemtable-curve.cc --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-curve.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-curve.cc 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Chemistry Utils * programs/gchemtable-curve.cc * - * Copyright (C) 2005-2007 Jean Bréfort + * Copyright (C) 2005-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,39 +18,50 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include "config.h" #include "gchemtable-curve.h" -#include "gchemtable-app.h" +#include "gchemtable-data.h" +#include "gchemtable-data-allocator.h" #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif #include #include +#include #include #include #include +#ifndef GOG_TYPE_LABEL +# define GOG_TYPE_LABEL GOG_LABEL_TYPE +# define GOG_IS_GRAPH IS_GOG_GRAPH +#endif + using namespace gcu; +using namespace std; map curves; @@ -90,7 +101,11 @@ go_locale_untranslated_booleans (); xout = gsf_xml_out_new (output); +#ifdef HAVE_GO_DATA_SERIALIZE + gog_object_write_xml_sax (GOG_OBJECT (graph), xout, NULL); +#else gog_object_write_xml_sax (GOG_OBJECT (graph), xout); +#endif g_object_unref (xout); /* go_setlocale restores bools to locale translation */ @@ -139,99 +154,228 @@ {(char *) "image/png", 0, 3} }; -static void on_copy (GogGraph *graph) +static void on_copy (GtkWidget *widget, GChemTableCurve *curve) { - GtkClipboard* clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - g_object_ref (graph); - gtk_clipboard_set_with_data (clipboard, targets, 4, - (GtkClipboardGetFunc) on_get_data, (GtkClipboardClearFunc) on_clear_data, graph); + curve->OnCopy (); +} + +static void on_file_save_as_image(GtkWidget* widget, GChemTableCurve *curve) +{ + curve->GetApplication ()->OnSaveAsImage (curve); +} + +static void on_print (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->Print (false); +} + +static void on_print_preview (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->Print (true); +} + +static void on_page_setup (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->OnPageSetup (); +} + +void on_properties (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->OnProperties (); +} + +static void on_close (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->Destroy (); +} + +static void on_help (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->GetApplication ()->OnHelp (); +} + +static void on_curve_help (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->Help (); +} + +static void on_web (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->GetApplication ()->OnWeb (); +} + +static void on_live_assistance (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->GetApplication ()->OnLiveAssistance (); +} + +static void on_mail (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->GetApplication ()->OnMail (); +} + +static void on_bug (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->GetApplication ()->OnBug (); +} + +static void on_about (GtkWidget *widget, GChemTableCurve *curve) +{ + curve->GetApplication ()->OnAbout (); } +static GtkActionEntry entries[] = { + { "FileMenu", NULL, N_("_File") }, + { "SaveAsImage", GTK_STOCK_SAVE_AS, N_("Save As _Image..."), "I", + N_("Save the current file as an image"), G_CALLBACK (on_file_save_as_image) }, + { "PageSetup", NULL, N_("Page Set_up..."), NULL, + N_("Setup the page settings for your current printer"), G_CALLBACK (on_page_setup) }, + { "PrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), NULL, + N_("Print preview"), G_CALLBACK (on_print_preview) }, + { "Print", GTK_STOCK_PRINT, N_("_Print..."), "P", + N_("Print the current file"), G_CALLBACK (on_print) }, + { "Properties", GTK_STOCK_PROPERTIES, N_("Prope_rties..."), NULL, + N_("Modify the graph properties"), G_CALLBACK (on_properties) }, + { "Close", GTK_STOCK_CLOSE, N_("_Close"), "W", + N_("Close the current file"), G_CALLBACK (on_close) }, + { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", + N_("Quit GChemTable"), G_CALLBACK (gtk_main_quit) }, + { "EditMenu", NULL, N_("_Edit") }, + { "Copy", GTK_STOCK_COPY, N_("_Copy"), "C", + N_("Copy the selection"), G_CALLBACK (on_copy) }, + { "HelpMenu", NULL, N_("_Help") }, + { "Help", GTK_STOCK_HELP, N_("_Contents"), "F1", + N_("View help for the Periodic Table"), G_CALLBACK (on_help) }, + { "CurveHelp", GTK_STOCK_HELP, N_("_Help"), "F1", + N_("View help for the Curve Window"), G_CALLBACK (on_curve_help) }, + { "Web", NULL, N_("Gnome Chemistry Utils on the _web"), NULL, + N_("Browse the Gnome Chemistry Utils's web site"), G_CALLBACK (on_web) }, + { "LiveAssistance", NULL, N_("Live assistance"), NULL, + N_("Open the Gnome Chemistry Utils IRC channel"), G_CALLBACK (on_live_assistance) }, + { "Mail", NULL, N_("_Ask a question"), NULL, + N_("Ask a question about the Gnome Chemistry Utils"), G_CALLBACK (on_mail) }, + { "Bug", NULL, N_("Report _Bugs"), NULL, + N_("Submit a bug report for the Gnome Chemistry Utils"), G_CALLBACK (on_bug) }, + { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, + N_("About GChemTable"), G_CALLBACK (on_about) } +}; + +static const char *ui_description = +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +""; + GChemTableCurve::GChemTableCurve (GChemTableApp *App, char const *name): - Dialog (App, GLADEDIR"/curve.glade", "curvedlg") + Dialog (App, GLADEDIR"/curve.glade", "curvedlg", App), + Printable (), + m_Guru (NULL) { - m_Name = name; - GtkWidget *w = glade_xml_get_widget (xml, "vbox1"); -#ifdef GO_GRAPH_WIDGET_OLD_API - GtkWidget *pw = go_graph_widget_new (); -#else - GtkWidget *pw = go_graph_widget_new (NULL); -#endif - gtk_widget_set_size_request (pw, 400, 250); - gtk_widget_show (pw); - gtk_box_pack_end (GTK_BOX (w), pw, TRUE, TRUE, 0); - GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (pw)); + m_GraphBox = glade_xml_get_widget (xml, "vbox1"); + GtkUIManager *ui_manager = gtk_ui_manager_new (); + GtkActionGroup *action_group = gtk_action_group_new ("MenuActions"); + gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); + gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), this); + gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); + GtkAccelGroup *accel_group = gtk_ui_manager_get_accel_group (ui_manager); + gtk_window_add_accel_group (GTK_WINDOW (dialog), accel_group); + GError *error = NULL; + if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) { + g_message ("building menus failed: %s", error->message); + g_error_free (error); + exit (EXIT_FAILURE); + } + GtkWidget *bar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); + gtk_box_pack_start (GTK_BOX (m_GraphBox), bar, FALSE, FALSE, 0); + m_GraphWidget = go_graph_widget_new (NULL); + gtk_widget_set_size_request (m_GraphWidget, 400, 250); + gtk_widget_show (m_GraphWidget); + gtk_box_pack_end (GTK_BOX (m_GraphBox), m_GraphWidget, TRUE, TRUE, 0); + m_Graph = go_graph_widget_get_graph (GO_GRAPH_WIDGET (m_GraphWidget)); + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_GraphWidget)); + if (!name) { + OnProperties (); + return; + } GogPlot *plot = (GogPlot *) gog_plot_new_by_name ("GogXYPlot"); gog_object_add_by_name (GOG_OBJECT (chart), "Plot", GOG_OBJECT (plot)); + m_Name = name; // Create a series for the plot and populate it with some simple data GogSeries *series = gog_plot_new_series (plot); - double *yvals = g_new0 (double, MAX_ELT); - GError *error; GogObject *obj, *label; - GOData *data; + GOData *data, *ydata = NULL; int i; // FIXME: find a better way to do the following things ! if (!strcmp (name, "en/Pauling")) { - GcuElectronegativity en; - en.scale = "Pauling"; - for (i = 1; i <= MAX_ELT; i++) { - en.Z = i; - yvals[i - 1] = (gcu_element_get_electronegativity (&en))? - en.value.value: go_nan; - } + ydata = gct_data_vector_get_from_name (_("Pauling electronegativity")); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (_("Pauling electronegativity"), FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); gtk_window_set_title (dialog, _("Pauling electronegativity")); } else if (!strcmp (name, "ae")) { - GcuDimensionalValue const *val; - Element *elt; - // assuming all data are in kJ/mol - for (i = 1; i <= MAX_ELT; i++) { - elt = Element::GetElement (i); - val = (elt)? elt->GetElectronAffinity (): NULL; - yvals[i - 1] = (val)? val->value: go_nan; - } + ydata = gct_data_vector_get_from_name (_("Electronic affinity")); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (_("Electron affinity (kJ/mol)"), FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); gtk_window_set_title (dialog, _("Electron affinity")); } else if (!strncmp (name, "ei/", 3)) { unsigned rank = strtol (name + 3, NULL, 10); - GcuDimensionalValue const *val; - Element *elt; - // assuming all data are in MJ/mol - for (i = 1; i <= MAX_ELT; i++) { - elt = Element::GetElement (i); - val = (elt)? elt->GetIonizationEnergy (rank): NULL; - yvals[i - 1] = (val)? val->value: go_nan; - } - char *rk, *buf; + char *rk, *buf; switch (rank) { case 1: + ydata = gct_data_vector_get_from_name (_("First ionization energy")); rk = g_strdup (_("1st. ")); break; case 2: + ydata = gct_data_vector_get_from_name (_("Second ionization energy")); rk = g_strdup (_("2nd. ")); break; case 3: + ydata = gct_data_vector_get_from_name (_("Third ionization energy")); rk = g_strdup (_("3rd. ")); break; default: rk = g_strdup_printf (_("%dth. "), rank); + buf = g_strconcat (rk, "ionization energy", NULL); +// ydata = gct_vector_get_ionization_energies (buf); // FIXME: not implemented + g_free (buf); break; } buf = g_strconcat (rk, _("ionization energy (MJ/mol)"), NULL); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (buf, TRUE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); buf = g_strconcat (rk, _("ionization energy"), NULL); @@ -239,92 +383,47 @@ g_free (buf); g_free (rk); } else if (!strcmp (name, "covalent")) { - Element *elt; - GcuAtomicRadius r; - r.type = GCU_COVALENT; - r.charge = 0; - r.scale = NULL; - r.cn = -1; - r.spin = GCU_N_A_SPIN; - for (i = 1; i <= MAX_ELT; i++) { - r.Z = i; - elt = Element::GetElement (i); - yvals[i - 1] = (elt && elt->GetRadius (&r))? r.value.value: go_nan; - } + ydata = gct_data_vector_get_from_name (_("Covalent radius")); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (_("Covalent radii"), FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); gtk_window_set_title (dialog, _("Covalent radii")); } else if (!strcmp (name, "vdw")) { - Element *elt; - GcuAtomicRadius r; - r.type = GCU_VAN_DER_WAALS; - r.charge = 0; - r.scale = NULL; - r.cn = -1; - r.spin = GCU_N_A_SPIN; - for (i = 1; i <= MAX_ELT; i++) { - r.Z = i; - elt = Element::GetElement (i); - yvals[i - 1] = (elt && elt->GetRadius (&r))? r.value.value: go_nan; - } + ydata = gct_data_vector_get_from_name (_("Van der Waals radius")); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (_("Van der Waals radii"), FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); gtk_window_set_title (dialog, _("Van der Waals radii")); } else if (!strcmp (name, "metallic")) { - Element *elt; - GcuAtomicRadius r; - r.type = GCU_METALLIC; - r.charge = 0; - r.scale = NULL; - r.cn = -1; - r.spin = GCU_N_A_SPIN; - for (i = 1; i <= MAX_ELT; i++) { - r.Z = i; - elt = Element::GetElement (i); - yvals[i - 1] = (elt && elt->GetRadius (&r))? r.value.value: go_nan; - } + ydata = gct_data_vector_get_from_name (_("Metallic radius")); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (_("Metallic radii"), FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); gtk_window_set_title (dialog, _("Metallic radii")); } else if (!strcmp (name, "mp")) { - Element *elt; - Value const *prop; - for (i = 1; i <= MAX_ELT; i++) { - elt = Element::GetElement (i); - prop = elt->GetProperty ("meltingpoint"); - yvals[i - 1] = (prop)? prop->GetAsDouble (): go_nan; - } + ydata = gct_data_vector_get_from_name (_("Fusion temperature")); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (_("Melting point"), FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); gtk_window_set_title (dialog, _("Melting point")); } else if (!strcmp (name, "bp")) { - Element *elt; - Value const *prop; - for (i = 1; i <= MAX_ELT; i++) { - elt = Element::GetElement (i); - prop = elt->GetProperty ("boilingpoint"); - yvals[i - 1] = (prop)? prop->GetAsDouble (): go_nan; - } + ydata = gct_data_vector_get_from_name (_("Ebullition temperature")); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); data = go_data_scalar_str_new (_("Boiling point"), FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); gtk_window_set_title (dialog, _("Boiling point")); @@ -333,28 +432,143 @@ return; } i = MAX_ELT - 1; - while (!go_finite (yvals[i])) - i--; - i++; + if (ydata) { + while (!go_finite (go_data_vector_get_value (GO_DATA_VECTOR (ydata), i))) + i--; + i++; + gog_series_set_dim (series, 1, ydata, &error); + } obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "X-Axis")); data = go_data_scalar_val_new ((double) i); gog_dataset_set_dim (GOG_DATASET (obj), GOG_AXIS_ELEM_MAX, data, &error); - data = go_data_vector_val_new (yvals, MAX_ELT, g_free); - gog_series_set_dim (series, 1, data, &error); + gog_series_set_dim (series, 0, gct_data_vector_get_from_name (_("Atomic number")), &error); obj = gog_object_get_child_by_role (GOG_OBJECT (chart), gog_object_find_role_by_name (GOG_OBJECT (chart), "X-Axis")); data = go_data_scalar_str_new ("Z", FALSE); - label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); + label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); gog_object_add_by_name (obj, "Label", label); - //now add copy callback - w = glade_xml_get_widget (xml, "copy"); - g_signal_connect_swapped (w, "clicked", G_CALLBACK (on_copy), - go_graph_widget_get_graph (GO_GRAPH_WIDGET (pw))); } GChemTableCurve::~GChemTableCurve () { + if (m_Guru) + gtk_widget_destroy (m_Guru); curves.erase (m_Name); } + +void GChemTableCurve::DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const +{ + cairo_t *cr; + gdouble width, height; + + cr = gtk_print_context_get_cairo_context (context); + width = gtk_print_context_get_width (context); + height = gtk_print_context_get_height (context); + + int w, h; // size in points + w = m_GraphWidget->allocation.width; + h = m_GraphWidget->allocation.height; + switch (GetScaleType ()) { + case GCU_PRINT_SCALE_NONE: + break; + case GCU_PRINT_SCALE_FIXED: + w *= Printable::GetScale (); + h *= Printable::GetScale (); + break; + case GCU_PRINT_SCALE_AUTO: + if (GetHorizFit ()) + w = width; + if (GetVertFit ()) + h = height; + break; + } + double x = 0., y = 0.; + if (GetHorizCentered ()) + x = (width - w) / 2.; + if (GetVertCentered ()) + y = (height - h) / 2.; + cairo_save (cr); + cairo_translate (cr, x, y); + gog_graph_render_to_cairo (m_Graph, cr, w, h); + cairo_restore (cr); +} + +void GChemTableCurve::OnPageSetup () +{ + new PrintSetupDlg (m_App, this); +} + +void GChemTableCurve::OnCopy () +{ + GtkClipboard* clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + g_object_ref (m_Graph); + gtk_clipboard_set_with_data (clipboard, targets, 4, + (GtkClipboardGetFunc) on_get_data, (GtkClipboardClearFunc) on_clear_data, m_Graph); +} + +static void +graph_user_config_free_data (gpointer data, + GClosure *closure) +{ + GChemTableCurve *curve = gct_control_gui_get_owner (GCT_CONTROL_GUI (data)); + curve->ClearGuru (); + g_object_unref (data); + closure->data = NULL; +} + +static void +on_update_graph (GogGraph *graph, gpointer data) +{ + g_return_if_fail (GOG_IS_GRAPH (graph)); + GctControlGUI *tcg = GCT_CONTROL_GUI (data); + GChemTableCurve *curve = gct_control_gui_get_owner (tcg); + curve->SetGraph (graph); +} + +static void +on_guru_help (Application *app) +{ + app->OnHelp ("customize-curve"); +} + +void GChemTableCurve::OnProperties () +{ + GctControlGUI *tcg = GCT_CONTROL_GUI (g_object_new (GCT_CONTROL_GUI_TYPE, NULL)); + gct_control_gui_set_owner (tcg, this); + GClosure *closure = g_cclosure_new (G_CALLBACK (on_update_graph), tcg, + (GClosureNotify) graph_user_config_free_data); + m_Guru = gog_guru (m_Graph, GOG_DATA_ALLOCATOR (tcg), NULL, closure); + gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (m_Guru)); + g_signal_connect_swapped (G_OBJECT (gog_guru_get_help_button (m_Guru)), "clicked", G_CALLBACK (on_guru_help), m_App); + gtk_widget_show (m_Guru); + g_closure_sink (closure); +} + +void GChemTableCurve::SetGraph (GogGraph *graph) +{ + gtk_widget_destroy (m_GraphWidget); + m_GraphWidget = go_graph_widget_new (graph); + gtk_widget_show (m_GraphWidget); + gtk_box_pack_end (GTK_BOX (m_GraphBox), m_GraphWidget, TRUE, TRUE, 0); + m_Graph = go_graph_widget_get_graph (GO_GRAPH_WIDGET (m_GraphWidget)); +} + +void GChemTableCurve::SaveAsImage (string const &filename, char const *mime_type, unsigned width, unsigned height) const +{ + char *fname = go_mime_to_image_format (mime_type); + GOImageFormat format = go_image_get_format_from_name ((fname)? fname: filename.c_str ()); + if (format == GO_IMAGE_FORMAT_UNKNOWN) + return; + GError *error = NULL; + GsfOutput *output = gsf_output_gio_new_for_uri (filename.c_str (), &error); + if (error) { + g_error_free (error); + return; + } + GogGraph *graph = gog_graph_dup (m_Graph); + gog_graph_set_size (graph, width, height); + gog_graph_export_image (graph, format, output, -1., -1.); + g_object_unref (graph); +} diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-curve.h gnome-chemistry-utils-0.10.9/programs/table/gchemtable-curve.h --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-curve.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-curve.h 2009-11-14 11:30:39.000000000 +0100 @@ -4,7 +4,7 @@ * Gnome Chemistry Utils * programs/gchemtable-curve.h * - * Copyright (C) 2005 Jean Bréfort + * Copyright (C) 2005-2008 Jean Bréfort * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -26,20 +26,42 @@ #define GCHEMTABLE_CURVE_H #include +#include #include +#include "gchemtable-app.h" +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif +#include +#include using namespace gcu; -class GChemTableApp; - -class GChemTableCurve: public Dialog +class GChemTableCurve: public Dialog, public Printable { public: GChemTableCurve (GChemTableApp *App, char const *name); virtual ~GChemTableCurve (); + GChemTableApp *GetApplication () {return dynamic_cast (m_App);} + + void OnPageSetup (); + void OnCopy (); + void OnClose (); + void OnProperties (); + + void DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const; + void SetGraph (GogGraph *graph); + GtkWindow *GetGtkWindow () {return GTK_WINDOW (dialog);} + void ClearGuru () {m_Guru = NULL;} + void SaveAsImage (std::string const &filename, char const *mime_type, unsigned width, unsigned height) const; + private: - string m_Name; + std::string m_Name; + GogGraph *m_Graph; + GtkWidget *m_GraphWidget, *m_GraphBox, *m_Guru; }; #endif // GCHEMTABLE_CURVE_H diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data-allocator.cc gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data-allocator.cc --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data-allocator.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data-allocator.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,318 @@ +/* + * Gnome Chemistry Utils + * programs/gchemtable-data-allocator.cc + * + * Copyright (C) 2007-2008 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gchemtable-data-allocator.h" +#include "gchemtable-curve.h" +#include "gchemtable-data.h" +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +# include +#endif +#include +#include +#include +#include + +#ifndef GOG_TYPE_DATA_ALLOCATOR +# define GOG_TYPE_DATA_ALLOCATOR GOG_DATA_ALLOCATOR_TYPE +# define GOG_IS_SERIES IS_GOG_SERIES +#endif + +struct _GctControlGUI +{ + GObject base; + GChemTableCurve *pCurve; +}; + +// +// GogDataAllocator interface implementation for GChemTableCurve +// + +static void +gct_data_allocator_allocate (GogDataAllocator *dalloc, GogPlot *plot) +{ + // Nothing needed +} + +#ifdef HAVE_GOG_DATA_EDITOR_SET_FORMAT +static void +gct_data_editor_set_format (G_GNUC_UNUSED GogDataEditor *editor, G_GNUC_UNUSED GOFormat const *fmt) +{ +} + +static void +gct_data_editor_set_value_double (G_GNUC_UNUSED GogDataEditor *editor, double val, + G_GNUC_UNUSED GODateConventions const *date_conv) +{ +} + +typedef GtkComboBox GctComboBox; +typedef GtkComboBoxClass GctComboBoxClass; + +static void +gct_data_editor_iface_init (GogDataEditorClass *iface) +{ + iface->set_format = gct_data_editor_set_format; + iface->set_value_double = gct_data_editor_set_value_double; +} + +GSF_CLASS_FULL (GctComboBox, gct_combo_box, + NULL, NULL, NULL, NULL, + NULL, GTK_TYPE_COMBO_BOX, 0, + GSF_INTERFACE (gct_data_editor_iface_init, GOG_TYPE_DATA_EDITOR)) + +GogDataEditor *gct_combo_box_new () +{ + GogDataEditor *editor = GOG_DATA_EDITOR (g_object_new (gct_combo_box_get_type (), NULL)); + // code from gtk_combo_box_new_text + // Copyright (C) 2002, 2003 Kristian Rietveld + GtkCellRenderer *cell; + GtkListStore *store; + + store = gtk_list_store_new (1, G_TYPE_STRING); + gtk_combo_box_set_model (GTK_COMBO_BOX (editor), GTK_TREE_MODEL (store)); + g_object_unref (store); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (editor), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (editor), cell, + "text", 0, + NULL); + + return editor; +} + +static void +gct_entry_set_value_double (GogDataEditor *editor, double val, + G_GNUC_UNUSED GODateConventions const *date_conv) +{ + GtkEntry *entry = GTK_ENTRY (editor); + char *buf = g_strdup_printf ("%g", val); + gtk_entry_set_text (entry, buf); + g_free (buf); +} + +typedef GtkEntry GctEntry; +typedef GtkEntryClass GctEntryClass; + +static void +gct_entry_iface_init (GogDataEditorClass *iface) +{ + iface->set_format = gct_data_editor_set_format; + iface->set_value_double = gct_entry_set_value_double; +} + +GSF_CLASS_FULL (GctEntry, gct_entry, + NULL, NULL, NULL, NULL, + NULL, GTK_TYPE_ENTRY, 0, + GSF_INTERFACE (gct_entry_iface_init, GOG_TYPE_DATA_EDITOR)) + +GogDataEditor *gct_entry_new () +{ + return GOG_DATA_EDITOR (g_object_new (gct_entry_get_type (), NULL)); +} + +typedef GtkLabel GctLabel; +typedef GtkLabelClass GctLabelClass; + +GSF_CLASS_FULL (GctLabel, gct_label, + NULL, NULL, NULL, NULL, + NULL, GTK_TYPE_LABEL, 0, + GSF_INTERFACE (gct_data_editor_iface_init, GOG_TYPE_DATA_EDITOR)) + +GogDataEditor *gct_label_new (char const *label) +{ + return GOG_DATA_EDITOR (g_object_new (gct_label_get_type (), "label", label, NULL)); +} + +#else +# define GogDataEditor GtkWidget +# define GOG_DATA_EDITOR GTK_WIDGET +# define gct_combo_box_new gtk_combo_box_new_text +# define gct_entry_new gtk_entry_new +# define gct_label_new gtk_label_new +#endif + +typedef struct { + GogDataEditor *box; + GogDataset *dataset; + int dim_i; + GogDataType data_type; +} GraphDimEditor; + +static void +on_graph_dim_editor_changed (GtkEntry *box, + GraphDimEditor *editor) +{ + if (!GTK_WIDGET_SENSITIVE (box) || editor->dataset == NULL) + return; + + GOData *data = go_data_scalar_str_new (g_strdup (gtk_entry_get_text (box)), TRUE); + + if (!data) { + g_message (_("Invalid data")); + } else + gog_dataset_set_dim (editor->dataset, editor->dim_i, data, NULL); +} + +static void +on_dim_editor_weakref_notify (GraphDimEditor *editor, GogDataset *dataset) +{ + g_return_if_fail (editor->dataset == dataset); + editor->dataset = NULL; +} + +static void +graph_dim_editor_free (GraphDimEditor *editor) +{ + if (editor->dataset) + g_object_weak_unref (G_OBJECT (editor->dataset), + (GWeakNotify) on_dim_editor_weakref_notify, editor); + g_free (editor); +} + +static void on_vector_data_changed (GtkComboBox *box, GraphDimEditor *editor) +{ + char *name = gtk_combo_box_get_active_text (box); + GOData *data = gct_data_vector_get_from_name (name); + gog_dataset_set_dim (editor->dataset, editor->dim_i, data, NULL); + g_free (name); +} + +#ifdef HAVE_GOG_DATA_EDITOR_SET_FORMAT +static GogDataEditor * +#else +static gpointer +#endif +gct_data_allocator_editor (GogDataAllocator *dalloc, + GogDataset *dataset, int dim_i, GogDataType data_type) +{ + GraphDimEditor *editor; + + editor = g_new (GraphDimEditor, 1); + editor->dataset = dataset; + editor->dim_i = dim_i; + editor->data_type = data_type; + + if (GOG_IS_SERIES (dataset) && data_type != GOG_DATA_SCALAR) { + GogPlot *plot = gog_series_get_plot (GOG_SERIES (dataset)); + if (plot->desc.series.dim[dim_i].priority == GOG_SERIES_ERRORS) { + // FIXME: we might know the errors + editor->box = gct_label_new (_("Not supported")); + g_object_set_data_full (G_OBJECT (editor->box), + "editor", editor, (GDestroyNotify) graph_dim_editor_free); + return editor->box; + } + editor->box = GOG_DATA_EDITOR (gct_combo_box_new ()); + GOData *data = gog_dataset_get_dim (dataset, dim_i), *cur; + int i = 1, sel = 0; + GtkComboBox *box = GTK_COMBO_BOX (editor->box); + gtk_combo_box_append_text (box, _("None")); + if (data_type == GOG_DATA_VECTOR) { + void *closure = NULL; + char const *entry = gct_data_vector_get_first (&cur, &closure); + while (entry) { + gtk_combo_box_append_text (box, entry); + if (cur == data) + sel = i; + i++; + g_object_unref (cur); + entry = gct_data_vector_get_next (&cur, &closure); + }; + } + gtk_combo_box_set_active (box, sel); + g_signal_connect (G_OBJECT (editor->box), "changed", + G_CALLBACK (on_vector_data_changed), editor); + // FIXME: what about matrices? + } else { + editor->box = GOG_DATA_EDITOR (gct_entry_new ()); + GOData *val = gog_dataset_get_dim (dataset, dim_i); + if (val != NULL) { +#ifdef HAVE_GO_DATA_SERIALIZE + char *txt = go_data_serialize (val, NULL); +#else + char *txt = go_data_as_str (val); +#endif + gtk_entry_set_text (GTK_ENTRY (editor->box), txt); + g_free (txt); + } + + g_signal_connect (G_OBJECT (editor->box), + "changed", + G_CALLBACK (on_graph_dim_editor_changed), editor); + } + g_object_weak_ref (G_OBJECT (editor->dataset), + (GWeakNotify) on_dim_editor_weakref_notify, editor); + + g_object_set_data_full (G_OBJECT (editor->box), + "editor", editor, (GDestroyNotify) graph_dim_editor_free); + + return editor->box; +} + +static void +gct_go_plot_data_allocator_init (GogDataAllocatorClass *iface) +{ + iface->allocate = gct_data_allocator_allocate; + iface->editor = gct_data_allocator_editor; +} + +static void +gct_control_gui_init (GObject *object) +{ +} + +static GObjectClass *parent_klass; + +static void +gct_control_gui_finalize (GObject *object) +{ +// GctControlGUI *control = GCT_CONTROL_GUI (object); + (parent_klass->finalize) (object); +} + +static void +gct_control_gui_class_init (GObjectClass *klass) +{ + parent_klass = static_cast (g_type_class_peek_parent (klass)); + klass->finalize = gct_control_gui_finalize; +} + +GSF_CLASS_FULL (GctControlGUI, gct_control_gui, + NULL, NULL, gct_control_gui_class_init, NULL, + gct_control_gui_init, G_TYPE_OBJECT, 0, + GSF_INTERFACE (gct_go_plot_data_allocator_init, GOG_TYPE_DATA_ALLOCATOR)); + +void +gct_control_gui_set_owner (GctControlGUI *gui, GChemTableCurve *curve) +{ + gui->pCurve = curve; +} + +GChemTableCurve * +gct_control_gui_get_owner (GctControlGUI *gui) +{ + return gui->pCurve; +} diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data-allocator.h gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data-allocator.h --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data-allocator.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data-allocator.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,45 @@ +/* + * Gnome Chemistry Utils + * programs/gchemtable-data-allocator.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMTABLE_DATA_ALLOCATOR_H +#define GCHEMTABLE_DATA_ALLOCATOR_H + +#include + +class GChemTableCurve; + +G_BEGIN_DECLS + +typedef struct _GctControlGUI GctControlGUI; +typedef GObjectClass GctControlGUIClass; + +#define GCT_CONTROL_GUI_TYPE (gct_control_gui_get_type ()) +#define GCT_CONTROL_GUI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCT_CONTROL_GUI_TYPE, GctControlGUI)) +#define IS_GCT_CONTROL_GUI(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GCT_CONTROL_GUI_TYPE)) + +GType gct_control_gui_get_type (); +void gct_control_gui_set_owner (GctControlGUI *gui, GChemTableCurve *curve); +GChemTableCurve *gct_control_gui_get_owner (GctControlGUI *gui); + +G_END_DECLS + +#endif /* GCHEMTABLE_DATA_ALLOCATOR_H */ diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data.cc gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data.cc --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,587 @@ +/* + * Gnome Chemistry Utils + * programs/gchemtable-data.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gchemtable-data.h" +#include +#include +#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +#endif +#include +#include + +#ifndef GO_TYPE_DATA_SCALAR +# define GO_TYPE_DATA_SCALAR GO_DATA_SCALAR_TYPE +# define GO_TYPE_DATA_VECTOR GO_DATA_VECTOR_TYPE +# define GO_TYPE_DATA_MATRIX GO_DATA_MATRIX_TYPE +#endif + +using namespace std; +static map GctScalars, GctVectors, GctMatrices; + +static GOData * +gct_data_dup (GOData const *src) +{ + GOData *dst = GO_DATA (g_object_ref (G_OBJECT (src))); + + return dst; +} + +static gboolean +gct_data_eq (GOData const *data_a, GOData const *data_b) +{ + return FALSE; +} + +static GOFormat * +gct_data_preferred_fmt (GOData const *dat) +{ + + return NULL; +} + +static char * +#ifdef HAVE_GO_DATA_SERIALIZE +gct_data_serialize (GOData const *dat, gpointer data) +#else +gct_data_as_str (GOData const *dat) +#endif +{ + return NULL; +} + +static gboolean +#ifdef HAVE_GO_DATA_SERIALIZE +gct_data_unserialize (GOData *dat, char const *str, gpointer data) +#else +gct_data_from_str (GOData *dat, char const *str) +#endif +{ + return FALSE; +} + +/*******************************************/ +// scalar data + +struct _GctDataScalar { + GODataScalar base; + void (*loader) (double *value); + bool loaded; + double data; +}; + +typedef GODataScalarClass GctDataScalarClass; + +static GObjectClass *scalar_parent_klass; + +static double +gct_data_scalar_get_value (GODataScalar *dat) +{ + return 0.; +} + +static char const * +gct_data_scalar_get_str (GODataScalar *dat) +{ + return NULL; +} + +static void +gct_data_scalar_class_init (GObjectClass *gobject_klass) +{ + GODataClass *godata_klass = (GODataClass *) gobject_klass; + GODataScalarClass *scalar_klass = (GODataScalarClass *) gobject_klass; + + scalar_parent_klass = (GObjectClass *) g_type_class_peek_parent (gobject_klass); + godata_klass->dup = gct_data_dup; + godata_klass->eq = gct_data_eq; + godata_klass->preferred_fmt = gct_data_preferred_fmt; +#ifdef HAVE_GO_DATA_SERIALIZE + godata_klass->serialize = gct_data_serialize; + godata_klass->unserialize = gct_data_unserialize; +#else + godata_klass->as_str = gct_data_as_str; + godata_klass->from_str = gct_data_from_str; +#endif + scalar_klass->get_value = gct_data_scalar_get_value; + scalar_klass->get_str = gct_data_scalar_get_str; +} + +static void +gct_data_scalar_init (GObject *obj) +{ +} + +GSF_CLASS (GctDataScalar, gct_data_scalar, + gct_data_scalar_class_init, gct_data_scalar_init, + GO_TYPE_DATA_SCALAR) + +void gct_data_scalar_new (char const *name, void (*loader) (double *value)) +{ + GctDataScalar *sc = GCT_DATA_SCALAR (g_object_new (GCT_DATA_SCALAR_TYPE, NULL)); + sc->loader = loader; + GctScalars[name] = GO_DATA (sc); + +} + +GOData *gct_data_scalar_get_from_name (char const *name) +{ + map ::iterator it = GctScalars.find (name); + return (it != GctScalars.end ())? GO_DATA (g_object_ref (G_OBJECT ((*it).second))): NULL; +} + +/*******************************************/ +// vector data + +struct _GctDataVector { + GODataVector base; + void (*loader) (double **, int *); + bool loaded; + double *data; +}; + +typedef GODataVectorClass GctDataVectorClass; + +static GObjectClass *vector_parent_klass; + +static void +gct_data_vector_load_len (GODataVector *dat) +{ + GctDataVector *vec = GCT_DATA_VECTOR (dat); + if (!vec) + return; + if (!vec->loaded) + vec->loader (&vec->data, &dat->len); + vec->loaded = true; + dat->base.flags |= GO_DATA_VECTOR_LEN_CACHED; +} + +static void +gct_data_vector_load_values (GODataVector *dat) +{ + GctDataVector *vec = GCT_DATA_VECTOR (dat); + if (!vec) + return; + if (!vec->loaded) + vec->loader (&vec->data, &dat->len); + vec->loaded = true; + dat->values = vec->data; + if (dat->len > 0) { + int i = 0; + while (!go_finite (vec->data[i++]) && i < dat->len); + i--; + if (i < dat->len) + dat->minimum = dat->maximum = vec->data[i]; + for (; i < dat->len; i++) + if (go_finite (vec->data[i])) { + if (vec->data[i] < dat->minimum) + dat->minimum = vec->data[i]; + if (vec->data[i] > dat->maximum) + dat->maximum = vec->data[i]; + } + } + dat->base.flags |= GO_DATA_CACHE_IS_VALID; +} + +static double +gct_data_vector_get_value (GODataVector *dat, unsigned i) +{ + GctDataVector *vec = GCT_DATA_VECTOR (dat); + if (!vec) + return NULL; + if (!vec->loaded) + vec->loader (&vec->data, &dat->len); + vec->loaded = true; + return ((int) i < dat->len)? vec->data[i]: go_nan; +} + +static char * +gct_data_vector_get_str (GODataVector *dat, unsigned i) +{ + GctDataVector *vec = GCT_DATA_VECTOR (dat); + if (!vec) + return NULL; + if (!vec->loaded) + vec->loader (&vec->data, &dat->len); + vec->loaded = true; + return ((int) i < dat->len)? g_strdup_printf ("%g", vec->data[i]): NULL; +} + +void +gct_data_vector_finalize (GObject *obj) +{ + GctDataVector *vec = GCT_DATA_VECTOR (obj); + if (!vec) + return; + if (vec->data) + delete [] vec->data; +} + +static void +gct_data_vector_class_init (GObjectClass *gobject_klass) +{ + GODataClass *godata_klass = (GODataClass *) gobject_klass; + GODataVectorClass *vector_klass = (GODataVectorClass *) gobject_klass; + + gobject_klass->finalize = gct_data_vector_finalize; + vector_parent_klass = (GObjectClass *) g_type_class_peek_parent (gobject_klass); + godata_klass->dup = gct_data_dup; + godata_klass->eq = gct_data_eq; + godata_klass->preferred_fmt = gct_data_preferred_fmt; +#ifdef HAVE_GO_DATA_SERIALIZE + godata_klass->serialize = gct_data_serialize; + godata_klass->unserialize = gct_data_unserialize; +#else + godata_klass->as_str = gct_data_as_str; + godata_klass->from_str = gct_data_from_str; +#endif + vector_klass->load_len = gct_data_vector_load_len; + vector_klass->load_values = gct_data_vector_load_values; + vector_klass->get_value = gct_data_vector_get_value; + vector_klass->get_str = gct_data_vector_get_str; +} + +static void +gct_data_vector_init (GObject *obj) +{ +} + +GSF_CLASS (GctDataVector, gct_data_vector, + gct_data_vector_class_init, gct_data_vector_init, + GO_TYPE_DATA_VECTOR) + +void gct_data_vector_new (char const *name, void (*loader) (double **values, int *length)) +{ + GctDataVector *vec = GCT_DATA_VECTOR (g_object_new (GCT_DATA_VECTOR_TYPE, NULL)); + vec->loader = loader; + GctVectors[name] = GO_DATA (vec); +} + +GOData *gct_data_vector_get_from_name (char const *name) +{ + map ::iterator it = GctVectors.find (name); + return (it != GctVectors.end ())? GO_DATA (g_object_ref (G_OBJECT ((*it).second))): NULL; +} + +char const *gct_data_vector_get_first (GOData **data, gpointer *closure) +{ + g_return_val_if_fail (closure && (*closure == NULL), NULL); + if (GctVectors.empty ()) + return NULL; + map ::iterator *it = new map ::iterator; + *it = GctVectors.begin (); + *closure = it; + if (data) + *data = GO_DATA (g_object_ref (G_OBJECT ((**it).second))); + return (**it).first.c_str (); +} + +char const *gct_data_vector_get_next (GOData **data, gpointer *closure) +{ + g_return_val_if_fail (closure, NULL); + map ::iterator *it = reinterpret_cast ::iterator *> (*closure); + ++*it; + if (*it == GctVectors.end ()) { + delete it; + *closure = NULL; + return NULL; + } + if (data) + *data = GO_DATA (g_object_ref (G_OBJECT ((**it).second))); + return (**it).first.c_str (); +} + +/*******************************************/ +// matrix data + +struct _GctDataMatrix { + GODataMatrix base; + void (*loader) (double **, int *, int *); + bool loaded; + double *data; +}; + +typedef GODataMatrixClass GctDataMatrixClass; + +static GObjectClass *matrix_parent_klass; + +static void +gct_data_matrix_load_size (GODataMatrix *dat) +{ +} + +static void +gct_data_matrix_load_values (GODataMatrix *dat) +{ +} + +static double +gct_data_matrix_get_value (GODataMatrix *dat, unsigned i, unsigned j) +{ + return go_nan; +} + +static char * +gct_data_matrix_get_str (GODataMatrix *dat, unsigned i, unsigned j) +{ + return NULL; +} + +static void +gct_data_matrix_class_init (GObjectClass *gobject_klass) +{ + GODataClass *godata_klass = (GODataClass *) gobject_klass; + GODataMatrixClass *matrix_klass = (GODataMatrixClass *) gobject_klass; + + matrix_parent_klass = (GObjectClass *) g_type_class_peek_parent (gobject_klass); + godata_klass->dup = gct_data_dup; + godata_klass->eq = gct_data_eq; + godata_klass->preferred_fmt = gct_data_preferred_fmt; +#ifdef HAVE_GO_DATA_SERIALIZE + godata_klass->serialize = gct_data_serialize; + godata_klass->unserialize = gct_data_unserialize; +#else + godata_klass->as_str = gct_data_as_str; + godata_klass->from_str = gct_data_from_str; +#endif + matrix_klass->load_size = gct_data_matrix_load_size; + matrix_klass->load_values = gct_data_matrix_load_values; + matrix_klass->get_value = gct_data_matrix_get_value; + matrix_klass->get_str = gct_data_matrix_get_str; +} + +static void +gct_data_matrix_init (GObject *obj) +{ +} + +GSF_CLASS (GctDataMatrix, gct_data_matrix, + gct_data_matrix_class_init, gct_data_matrix_init, + GO_TYPE_DATA_MATRIX) + +void gct_data_matrix_new (char const *name, void (*loader) (double **values, int *cols, int *rows)) +{ + GctDataMatrix *mat = GCT_DATA_MATRIX (g_object_new (GCT_DATA_MATRIX_TYPE, NULL)); + mat->loader = loader; + GctMatrices[name] = GO_DATA (mat); +} + +GOData *gct_data_matrix_get_from_name (char const *name) +{ + map ::iterator it = GctMatrices.find (name); + return (it != GctMatrices.end ())? GO_DATA (g_object_ref (G_OBJECT ((*it).second))): NULL; +} + +/******************************************************************************/ +// Data loaders + +static void loadZ (double **values, int *len) +{ + *values = new double[MAX_ELT]; + for (int i = 1; i <= MAX_ELT; i++) + (*values)[i - 1] = (gcu::Element::GetElement (i))? i: go_nan; + *len = MAX_ELT; +} + +static void loadMass (double **values, int *len) +{ + *values = new double[118]; + for (int i = 1; i <= 118; i++) { + gcu::Element *elt = gcu::Element::GetElement (i); + (*values)[i - 1] = (elt)? elt->GetWeight ()->GetAsDouble (): go_nan; + } + *len = MAX_ELT; +} + +static void loadPaulingENeg (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuElectronegativity en; + en.scale = "Pauling"; + for (int i = 1; i <= MAX_ELT; i++) { + en.Z = i; + (*values)[i - 1] = (gcu_element_get_electronegativity (&en))? + en.value.value: go_nan; + } + *len = MAX_ELT; +} + +static void loadIE1 (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuDimensionalValue const *val; + for (int i = 1; i <= MAX_ELT; i++) { + gcu::Element *elt = gcu::Element::GetElement (i); + val = (elt)? elt->GetIonizationEnergy (1): NULL; + (*values)[i - 1] = (val)? val->value: go_nan; + } + *len = MAX_ELT; +} + +static void loadIE2 (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuDimensionalValue const *val; + for (int i = 1; i <= MAX_ELT; i++) { + gcu::Element *elt = gcu::Element::GetElement (i); + val = (elt)? elt->GetIonizationEnergy (2): NULL; + (*values)[i - 1] = (val)? val->value: go_nan; + } + *len = MAX_ELT; +} + +static void loadIE3 (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuDimensionalValue const *val; + for (int i = 1; i <= MAX_ELT; i++) { + gcu::Element *elt = gcu::Element::GetElement (i); + val = (elt)? elt->GetIonizationEnergy (3): NULL; + (*values)[i - 1] = (val)? val->value: go_nan; + } + *len = MAX_ELT; +} + +static void loadEA (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuDimensionalValue const *val; + for (int i = 1; i <= MAX_ELT; i++) { + gcu::Element *elt = gcu::Element::GetElement (i); + val = (elt)? elt->GetElectronAffinity (1): NULL; + (*values)[i - 1] = (val)? val->value: go_nan; + } + *len = MAX_ELT; +} + +static void loadCovRad (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuAtomicRadius r; + r.type = GCU_COVALENT; + r.charge = 0; + r.scale = NULL; + r.cn = -1; + r.spin = GCU_N_A_SPIN; + for (int i = 1; i <= MAX_ELT; i++) { + r.Z = i; + gcu::Element *elt = gcu::Element::GetElement (i); + (*values)[i - 1] = (elt && elt->GetRadius (&r))? r.value.value: go_nan; + } + *len = MAX_ELT; +} + +static void loadVdWRad (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuAtomicRadius r; + r.type = GCU_VAN_DER_WAALS; + r.charge = 0; + r.scale = NULL; + r.cn = -1; + r.spin = GCU_N_A_SPIN; + for (int i = 1; i <= MAX_ELT; i++) { + r.Z = i; + gcu::Element *elt = gcu::Element::GetElement (i); + (*values)[i - 1] = (elt && elt->GetRadius (&r))? r.value.value: go_nan; + } + *len = MAX_ELT; +} + +static void loadMetRad (double **values, int *len) +{ + *values = new double[MAX_ELT]; + GcuAtomicRadius r; + r.type = GCU_METALLIC; + r.charge = 0; + r.scale = NULL; + r.cn = -1; + r.spin = GCU_N_A_SPIN; + for (int i = 1; i <= MAX_ELT; i++) { + r.Z = i; + gcu::Element *elt = gcu::Element::GetElement (i); + (*values)[i - 1] = (elt && elt->GetRadius (&r))? r.value.value: go_nan; + } + *len = MAX_ELT; +} + +static void loadFP (double **values, int *len) +{ + *values = new double[MAX_ELT]; + gcu::Value const *prop; + for (int i = 1; i <= MAX_ELT; i++) { + gcu::Element *elt = gcu::Element::GetElement (i); + prop = (elt)? elt->GetProperty ("meltingpoint"): NULL; + (*values)[i - 1] = (prop)? prop->GetAsDouble (): go_nan; + } + *len = MAX_ELT; +} + +static void loadEP (double **values, int *len) +{ + *values = new double[MAX_ELT]; + gcu::Value const *prop; + for (int i = 1; i <= MAX_ELT; i++) { + gcu::Element *elt = gcu::Element::GetElement (i); + prop = (elt)? elt->GetProperty ("boilingpoint"): NULL; + (*values)[i - 1] = (prop)? prop->GetAsDouble (): go_nan; + } + *len = MAX_ELT; +} + +/******************************************************************************/ +// Initialization and destruction of generic data + +void gct_data_init () +{ + gct_data_vector_new (_("Atomic number"), loadZ); + gct_data_vector_new (_("Atomic mass"), loadMass); + gct_data_vector_new (_("Pauling electronegativity"), loadPaulingENeg); + gct_data_vector_new (_("First ionization energy"), loadIE1); + gct_data_vector_new (_("Second ionization energy"), loadIE2); + gct_data_vector_new (_("Third ionization energy"), loadIE3); + gct_data_vector_new (_("Electronic affinity"), loadEA); + gct_data_vector_new (_("Covalent radius"), loadCovRad); + gct_data_vector_new (_("Van der Waals radius"), loadVdWRad); + gct_data_vector_new (_("Metallic radius"), loadMetRad); + gct_data_vector_new (_("Fusion temperature"), loadFP); + gct_data_vector_new (_("Ebullition temperature"), loadEP); +} + +void gct_data_clear () +{ + map ::iterator it, end; + end = GctScalars.end (); + for (it = GctScalars.begin (); it != end; it++) + g_object_unref ((*it).second); + GctScalars.clear (); + end = GctVectors.end (); + for (it = GctVectors.begin (); it != end; it++) + g_object_unref ((*it).second); + GctVectors.clear (); + end = GctMatrices.end (); + for (it = GctMatrices.begin (); it != end; it++) + g_object_unref ((*it).second); + GctMatrices.clear (); +} diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data.h gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data.h --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-data.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-data.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,73 @@ +/* + * Gnome Chemistry Utils + * programs/gchemtable-data.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMTABLE_DATA_H +#define GCHEMTABLE_DATA_H + +#ifdef GOFFICE_HAS_GLOBAL_HEADER +# include +#else +# include +#endif + +G_BEGIN_DECLS + +typedef struct _GctDataScalar GctDataScalar; + +#define GCT_DATA_SCALAR_TYPE (gct_data_scalar_get_type ()) +#define GCT_DATA_SCALAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCT_DATA_SCALAR_TYPE, GctDataScalar)) +#define IS_GCT_DATA_SCALAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GCT_DATA_SCALAR_TYPE)) + +GType gct_data_scalar_get_type (); +void gct_data_scalar_new (char const *name, void (*loader) (double *value)); +GOData *gct_data_scalar_get_from_name (char const *name); + +typedef struct _GctDataVector GctDataVector; + +#define GCT_DATA_VECTOR_TYPE (gct_data_vector_get_type ()) +#define GCT_DATA_VECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCT_DATA_VECTOR_TYPE, GctDataVector)) +#define IS_GCT_DATA_VECTOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GCT_DATA_VECTOR_TYPE)) + +GType gct_data_vector_get_type (); +void gct_data_vector_new (char const *name, void (*loader) (double **values, int *length)); +GOData *gct_data_vector_get_from_name (char const *name); +char const *gct_data_vector_get_first (GOData **data, gpointer *closure); +char const *gct_data_vector_get_next (GOData **data, gpointer *closure); + +typedef struct _GctDataMatrix GctDataMatrix; + +#define GCT_DATA_MATRIX_TYPE (gct_data_matrix_get_type ()) +#define GCT_DATA_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCT_DATA_MATRIX_TYPE, GctDataMatrix)) +#define IS_GCT_DATA_MATRIX(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GCT_DATA_MATRIX_TYPE)) + +GType gct_data_matrix_get_type (); +void gct_data_matrix_new (char const *name, void (*loader) (double **values, int *cols, int *rows)); +GOData *gct_data_matrix_get_from_name (char const *name); + +void gct_data_init (void); +void gct_data_clear (void); + +G_END_DECLS + +#endif /* GCHEMTABLE_DATA_H */ + + diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable.desktop.in gnome-chemistry-utils-0.10.9/programs/table/gchemtable.desktop.in --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable.desktop.in 2007-10-14 16:30:32.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable.desktop.in 2009-11-14 11:46:22.000000000 +0100 @@ -1,8 +1,8 @@ [Desktop Entry] Version=1.0 -_Name=Periodic table of the elements +_Name=Periodic table of the elements _Comment=A Mendeleiev table of the chemical elements -Exec=gchemtable +Exec=gchemtable-0.10 Icon=gchemtable Terminal=false Type=Application diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable.desktop.in.in gnome-chemistry-utils-0.10.9/programs/table/gchemtable.desktop.in.in --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable.desktop.in.in 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +_Name=Periodic table of the elements @STABILITY_POSTFIX@ +_Comment=A Mendeleiev table of the chemical elements +Exec=gchemtable-@GCU_API_VER@ +Icon=gchemtable +Terminal=false +Type=Application +Categories=GTK;GNOME;Education;Science;Chemistry; diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-elt.cc gnome-chemistry-utils-0.10.9/programs/table/gchemtable-elt.cc --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-elt.cc 2007-12-13 13:18:31.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-elt.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ @@ -30,6 +30,8 @@ #include #include +using namespace std; + extern void on_show_curve (GObject *obj, char const* name); static void on_focus_in (GChemTableElt *dlg) { @@ -51,14 +53,8 @@ w = glade_xml_get_widget (xml, "z"); gtk_label_set_text (GTK_LABEL (w), buf); g_free (buf); - int prec; - double weight = elt->GetWeight (prec); - char *format = (prec > 0)? g_strdup_printf ("%%0.%df",prec): g_strdup ("(%.0f)"); - buf = g_strdup_printf (format, weight); w = glade_xml_get_widget (xml, "weight"); - gtk_label_set_text (GTK_LABEL (w), buf); - g_free (format); - g_free (buf); + gtk_label_set_markup (GTK_LABEL (w), elt->GetWeight ()->GetAsString ()); w = glade_xml_get_widget (xml, "elec-conf-lbl"); /* The markup at the end of the chain is there to ensure that things will be correcly aligned, add the same to the translated string */ @@ -145,6 +141,7 @@ buf = g_strdup_printf ("ei/%d", n); g_object_set_data (G_OBJECT (button), "app", App); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_show_curve), (void*) buf); +// FIXME: clean this on exit n++; } gtk_widget_show_all (GTK_WIDGET (table)); @@ -249,8 +246,8 @@ j = radii_list.begin (); jend = radii_list.end (); while ((j != jend) && (((*j)->charge < (*radii)->charge) || - (((*j)->charge == (*radii)->charge) && ((*j)->cn < (*radii)->cn) || - (((*j)->cn == (*radii)->cn) && ((*j)->spin < (*radii)->spin))))) + (((*j)->charge == (*radii)->charge) && ((*j)->cn < (*radii)->cn)) || + (((*j)->cn == (*radii)->cn) && ((*j)->spin < (*radii)->spin)))) j++; radii_list.insert (j, *radii); if ((*radii)->spin > maxspin) @@ -296,7 +293,8 @@ gtk_tree_view_column_set_spacing (column, 5); gtk_tree_view_append_column (tree, column); jend = radii_list.end (); - char *ion, *cn, *spin; + char *ion, *cn; + char const *spin; for (j = radii_list.begin (); j != jend; j++) { if ((*j)->charge > 1) ion = g_strdup_printf ("%s%d+ ",elt->GetSymbol (),(*j)->charge); @@ -315,7 +313,7 @@ spin = _("High"); break; default: - spin = (char*) ""; + spin = ""; break; } buf = gcu_dimensional_value_get_string (&(*j)->value); diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-elt.h gnome-chemistry-utils-0.10.9/programs/table/gchemtable-elt.h --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-elt.h 2006-02-25 19:07:23.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-elt.h 2009-11-14 11:30:39.000000000 +0100 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-graph-editor.cc gnome-chemistry-utils-0.10.9/programs/table/gchemtable-graph-editor.cc --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-graph-editor.cc 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-graph-editor.cc 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,24 @@ +/* + * Gnome Chemistry Utils + * programs/gchemtable-graph-editor.cc + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "config.h" +#include "gchemtable-graph-editor.h" diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-graph-editor.h gnome-chemistry-utils-0.10.9/programs/table/gchemtable-graph-editor.h --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-graph-editor.h 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-graph-editor.h 2009-11-14 11:30:39.000000000 +0100 @@ -0,0 +1,27 @@ +/* + * Gnome Chemistry Utils + * programs/gchemtable-data-allocator.h + * + * Copyright (C) 2007 Jean Bréfort + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GCHEMTABLE_GRAPH_EDITOR_H +#define GCHEMTABLE_GRAPH_EDITOR_H + + +#endif /* GCHEMTABLE_GRAPH_EDITOR_H */ diff -Nru gnome-chemistry-utils-0.8.6/programs/table/gchemtable-main.cc gnome-chemistry-utils-0.10.9/programs/table/gchemtable-main.cc --- gnome-chemistry-utils-0.8.6/programs/table/gchemtable-main.cc 2007-05-22 08:42:44.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/programs/table/gchemtable-main.cc 2009-11-14 11:30:39.000000000 +0100 @@ -18,31 +18,37 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include "config.h" #include "gchemtable-app.h" -#include -#include -#include -#include +#ifndef GOFFICE_HAS_GLOBAL_HEADER +# include +# include +# include +#endif #include +#ifndef GO_TYPE_PLUGIN_LOADER_MODULE +# define GO_TYPE_PLUGIN_LOADER_MODULE GO_PLUGIN_LOADER_MODULE_TYPE +#endif + using namespace gcu; int main (int argc, char *argv[]) { textdomain (GETTEXT_PACKAGE); gtk_init (&argc, &argv); - gnome_vfs_init (); - /* Initialize libgoffice */ - libgoffice_init (); - /* Initialize plugins manager */ - go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_PLUGIN_LOADER_MODULE_TYPE); new GChemTableApp (); + /* Initialize plugins manager */ + GSList *l = NULL; + l = g_slist_append (l, (void *) "GOffice_plot_xy"); + l = g_slist_append (l, (void *) "GOffice_reg_linear"); + go_plugins_init (NULL, NULL, l, NULL, FALSE, GO_TYPE_PLUGIN_LOADER_MODULE); + g_slist_free (l); gtk_main(); return 0; diff -Nru gnome-chemistry-utils-0.8.6/programs/table/Makefile.am gnome-chemistry-utils-0.10.9/programs/table/Makefile.am --- gnome-chemistry-utils-0.8.6/programs/table/Makefile.am 2008-01-19 17:43:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/Makefile.am 2009-11-14 11:30:39.000000000 +0100 @@ -1,28 +1,52 @@ EXTRA_DIST = $(desktop_in_files) -CLEANFILES = $(desktop_DATA) +CLEANFILES = $(desktop_DATA) gchemtable.desktop -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_srcdir) - -LDADD = $(top_builddir)/gcu/libgcu.la +MAINTAINERCLEANFILES = Makefile.in gchemtable.desktop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) DEFS += -DDATADIR=\"$(datadir)\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade/table\" + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/table\" -bin_PROGRAMS = gchemtable +bin_PROGRAMS = gchemtable-@GCU_API_VER@ -gchemtable_SOURCES = \ - gchemtable-main.cc \ - gchemtable-app.cc \ - gchemtable-app.h \ - gchemtable-elt.cc \ - gchemtable-elt.h \ - gchemtable-curve.cc \ - gchemtable-curve.h +gchemtable_@GCU_API_VER@_SOURCES = \ + gchemtable-main.cc \ + gchemtable-app.cc \ + gchemtable-app.h \ + gchemtable-elt.cc \ + gchemtable-elt.h \ + gchemtable-curve.cc \ + gchemtable-curve.h \ + gchemtable-data-allocator.cc \ + gchemtable-data-allocator.h \ + gchemtable-graph-editor.cc \ + gchemtable-graph-editor.h \ + gchemtable-data.cc \ + gchemtable-data.h desktop_in_files = gchemtable.desktop.in + +gchemtable-@GCU_API_VER@.desktop: gchemtable.desktop + cp $< $@ + desktopdir=$(datadir)/applications -desktop_DATA = gchemtable.desktop +desktop_DATA = gchemtable-@GCU_API_VER@.desktop @INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchemtable@STABILITY@ ]; then \ + rm -f gchemtable@STABILITY@; \ + fi && \ + $(LN_S) gchemtable-@GCU_API_VER@ gchemtable@STABILITY@ +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchemtable@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchemtable@STABILITY@; \ + fi diff -Nru gnome-chemistry-utils-0.8.6/programs/table/Makefile.in gnome-chemistry-utils-0.10.9/programs/table/Makefile.in --- gnome-chemistry-utils-0.8.6/programs/table/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/programs/table/Makefile.in 2009-11-14 11:46:05.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,9 +35,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = gchemtable$(EXEEXT) +bin_PROGRAMS = gchemtable-@GCU_API_VER@$(EXEEXT) subdir = programs/table -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gchemtable.desktop.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -43,46 +46,56 @@ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = gchemtable.desktop.in +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_gchemtable_OBJECTS = gchemtable-main.$(OBJEXT) \ +am_gchemtable_@GCU_API_VER@_OBJECTS = gchemtable-main.$(OBJEXT) \ gchemtable-app.$(OBJEXT) gchemtable-elt.$(OBJEXT) \ - gchemtable-curve.$(OBJEXT) -gchemtable_OBJECTS = $(am_gchemtable_OBJECTS) -gchemtable_LDADD = $(LDADD) -gchemtable_DEPENDENCIES = $(top_builddir)/gcu/libgcu.la -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ + gchemtable-curve.$(OBJEXT) gchemtable-data-allocator.$(OBJEXT) \ + gchemtable-graph-editor.$(OBJEXT) gchemtable-data.$(OBJEXT) +gchemtable_@GCU_API_VER@_OBJECTS = \ + $(am_gchemtable_@GCU_API_VER@_OBJECTS) +gchemtable_@GCU_API_VER@_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(gchemtable_SOURCES) -DIST_SOURCES = $(gchemtable_SOURCES) +SOURCES = $(gchemtable_@GCU_API_VER@_SOURCES) +DIST_SOURCES = $(gchemtable_@GCU_API_VER@_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -desktopDATA_INSTALL = $(INSTALL_DATA) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(desktop_DATA) ETAGS = etags CTAGS = ctags @@ -91,7 +104,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -110,28 +122,31 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ -DDATADIR=\"$(datadir)\" \ - -DGLADEDIR=\"$(datadir)/gchemutils/glade/table\" + -DGLADEDIR=\"$(datadir)/gchemutils/@GCU_API_VER@/glade/table\" DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -141,35 +156,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -182,14 +183,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -201,6 +209,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -212,31 +222,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -250,39 +285,59 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ EXTRA_DIST = $(desktop_in_files) -CLEANFILES = $(desktop_DATA) -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I$(top_srcdir) -LDADD = $(top_builddir)/gcu/libgcu.la -gchemtable_SOURCES = \ - gchemtable-main.cc \ - gchemtable-app.cc \ - gchemtable-app.h \ - gchemtable-elt.cc \ - gchemtable-elt.h \ - gchemtable-curve.cc \ - gchemtable-curve.h +CLEANFILES = $(desktop_DATA) gchemtable.desktop +MAINTAINERCLEANFILES = Makefile.in gchemtable.desktop.in +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +INCLUDES = \ + -I$(top_srcdir) -I$(top_srcdir)/libs \ + $(goffice_CFLAGS) \ + $(gnome_vfs_CFLAGS) \ + $(GCU_CFLAGS) + +gchemtable_@GCU_API_VER@_SOURCES = \ + gchemtable-main.cc \ + gchemtable-app.cc \ + gchemtable-app.h \ + gchemtable-elt.cc \ + gchemtable-elt.h \ + gchemtable-curve.cc \ + gchemtable-curve.h \ + gchemtable-data-allocator.cc \ + gchemtable-data-allocator.h \ + gchemtable-graph-editor.cc \ + gchemtable-graph-editor.h \ + gchemtable-data.cc \ + gchemtable-data.h desktop_in_files = gchemtable.desktop.in desktopdir = $(datadir)/applications -desktop_DATA = gchemtable.desktop +desktop_DATA = gchemtable-@GCU_API_VER@.desktop all: all-am .SUFFIXES: @@ -291,14 +346,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/table/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu programs/table/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu programs/table/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu programs/table/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -316,37 +371,55 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gchemtable.desktop.in: $(top_builddir)/config.status $(srcdir)/gchemtable.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -gchemtable$(EXEEXT): $(gchemtable_OBJECTS) $(gchemtable_DEPENDENCIES) - @rm -f gchemtable$(EXEEXT) - $(CXXLINK) $(gchemtable_OBJECTS) $(gchemtable_LDADD) $(LIBS) + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gchemtable-@GCU_API_VER@$(EXEEXT): $(gchemtable_@GCU_API_VER@_OBJECTS) $(gchemtable_@GCU_API_VER@_DEPENDENCIES) + @rm -f gchemtable-@GCU_API_VER@$(EXEEXT) + $(CXXLINK) $(gchemtable_@GCU_API_VER@_OBJECTS) $(gchemtable_@GCU_API_VER@_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -356,26 +429,29 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gchemtable-app.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gchemtable-curve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gchemtable-data-allocator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gchemtable-data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gchemtable-elt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gchemtable-graph-editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gchemtable-main.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -388,65 +464,72 @@ install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" - @list='$(desktop_DATA)'; for p in $$list; do \ + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ - $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) - @list='$(desktop_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ - rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ - done + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -467,13 +550,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -505,6 +592,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -526,6 +614,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -534,18 +624,29 @@ install-dvi: install-dvi-am -install-exec-am: install-binPROGRAMS +install-dvi-am: +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -567,8 +668,9 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA - -.MAKE: install-am install-strip + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ @@ -576,16 +678,31 @@ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-desktopDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-desktopDATA + uninstall-desktopDATA uninstall-hook + +gchemtable-@GCU_API_VER@.desktop: gchemtable.desktop + cp $< $@ @INTLTOOL_DESKTOP_RULE@ + +install-exec-hook: + cd $(DESTDIR)$(bindir) && \ + if [ -x gchemtable@STABILITY@ ]; then \ + rm -f gchemtable@STABILITY@; \ + fi && \ + $(LN_S) gchemtable-@GCU_API_VER@ gchemtable@STABILITY@ +uninstall-hook: + if [ -x $(DESTDIR)/$(bindir)/gchemtable@STABILITY@ ]; then \ + rm -f $(DESTDIR)/$(bindir)/gchemtable@STABILITY@; \ + fi + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/README gnome-chemistry-utils-0.10.9/README --- gnome-chemistry-utils-0.8.6/README 2007-08-31 12:09:58.000000000 +0200 +++ gnome-chemistry-utils-0.10.9/README 2009-11-14 11:30:40.000000000 +0100 @@ -3,8 +3,8 @@ Copyright 1999-2007 Jean Bréfort jean.brefort@normalesup.org, All Rights Reserved. http://jean.brefort.free.fr -This software is copyrighted under the GNU GPL. Please see the file COPYING, -Or, to obtain a copy of the GNU GPL, please visit: +This software is copyrighted under the GNU GPL version 2 or later. Please see +the file COPYING, or, to obtain a copy of the GNU GPL, please visit: http://www.gnu.org See the file AUTHORS for a list of who has contributed to the application. @@ -26,7 +26,7 @@ (http://bodr.sourceforge.net). The Chemical Mime Data version 0.1.94 or later (http://chemical-mime.sourceforge.net). - OpenBabel-2 version 2.1.x (http://openbabel.sourceforge.net). + OpenBabel-2 version 2.1.0 or later (http://openbabel.sourceforge.net). Further man, xmllint, xsltproc and maybe a local docbook-xsl installation are required for manpage building. We deliver ready-to-use manpages, so you @@ -46,7 +46,8 @@ * GtkChem3DViewer is a 3D molecular structure viewer. Simple samples of their use are provided in the test programs -Four programs are avaible: +Five programs are avaible: +* A 2D chemical editor (GChemPaint). * A 3D molecular structure viewer (GChem3Viewer). * A Crystal structure viewer (GCrystal). * A Chemical calculator (GChemCalc). diff -Nru gnome-chemistry-utils-0.8.6/samples/Makefile.am gnome-chemistry-utils-0.10.9/samples/Makefile.am --- gnome-chemistry-utils-0.8.6/samples/Makefile.am 2008-01-19 17:43:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/samples/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -1,10 +1,10 @@ -EXTRA_DIST = CO2.gcrystal \ - CO2_C.gcrystal \ - CO2_O.gcrystal \ - NaCl.gcrystal \ - diamond.gcrystal \ - graphite.gcrystal \ - nickel.gcrystal \ - zinc.gcrystal - MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = CO2.gcrystal \ + CO2_C.gcrystal \ + CO2_O.gcrystal \ + NaCl.gcrystal \ + diamond.gcrystal \ + graphite.gcrystal \ + nickel.gcrystal \ + zinc.gcrystal diff -Nru gnome-chemistry-utils-0.8.6/samples/Makefile.in gnome-chemistry-utils-0.10.9/samples/Makefile.in --- gnome-chemistry-utils-0.8.6/samples/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/samples/Makefile.in 2009-11-14 11:46:05.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -48,7 +51,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -68,26 +70,29 @@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -97,35 +102,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -138,14 +129,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -157,6 +155,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -168,31 +168,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -206,32 +231,41 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = CO2.gcrystal \ - CO2_C.gcrystal \ - CO2_O.gcrystal \ - NaCl.gcrystal \ - diamond.gcrystal \ - graphite.gcrystal \ - nickel.gcrystal \ - zinc.gcrystal + CO2_C.gcrystal \ + CO2_O.gcrystal \ + NaCl.gcrystal \ + diamond.gcrystal \ + graphite.gcrystal \ + nickel.gcrystal \ + zinc.gcrystal -MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: @@ -239,14 +273,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu samples/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu samples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -264,6 +298,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -293,13 +328,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -327,6 +366,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -346,6 +386,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -354,18 +396,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -399,6 +451,7 @@ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/templates/Makefile.am gnome-chemistry-utils-0.10.9/templates/Makefile.am --- gnome-chemistry-utils-0.8.6/templates/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/templates/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,3 @@ +SUBDIRS = paint + +MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/templates/Makefile.in gnome-chemistry-utils-0.10.9/templates/Makefile.in --- gnome-chemistry-utils-0.8.6/templates/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/templates/Makefile.in 2009-11-14 11:46:05.000000000 +0100 @@ -0,0 +1,651 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = templates +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = paint +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu templates/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu templates/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/templates/paint/haworth.xml.in gnome-chemistry-utils-0.10.9/templates/paint/haworth.xml.in --- gnome-chemistry-utils-0.8.6/templates/paint/haworth.xml.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/templates/paint/haworth.xml.in 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,503 @@ + + + + + + + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/templates/paint/Makefile.am gnome-chemistry-utils-0.10.9/templates/paint/Makefile.am --- gnome-chemistry-utils-0.8.6/templates/paint/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/templates/paint/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,11 @@ +EXTRA_DIST = $(xml_in_files) + +CLEANFILES = $(xml_DATA) + +MAINTAINERCLEANFILES = Makefile.in + +xml_in_files = templates.xml.in haworth.xml.in + +xmldir = $(datadir)/gchemutils/@GCU_API_VER@/paint/templates +xml_DATA = $(xml_in_files:.xml.in=.xml) +@INTLTOOL_XML_RULE@ diff -Nru gnome-chemistry-utils-0.8.6/templates/paint/Makefile.in gnome-chemistry-utils-0.10.9/templates/paint/Makefile.in --- gnome-chemistry-utils-0.8.6/templates/paint/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/templates/paint/Makefile.in 2009-11-14 11:46:05.000000000 +0100 @@ -0,0 +1,503 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = templates/paint +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(xmldir)" +DATA = $(xml_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +EXTRA_DIST = $(xml_in_files) +CLEANFILES = $(xml_DATA) +MAINTAINERCLEANFILES = Makefile.in +xml_in_files = templates.xml.in haworth.xml.in +xmldir = $(datadir)/gchemutils/@GCU_API_VER@/paint/templates +xml_DATA = $(xml_in_files:.xml.in=.xml) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu templates/paint/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu templates/paint/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-xmlDATA: $(xml_DATA) + @$(NORMAL_INSTALL) + test -z "$(xmldir)" || $(MKDIR_P) "$(DESTDIR)$(xmldir)" + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(xmldir)" || exit $$?; \ + done + +uninstall-xmlDATA: + @$(NORMAL_UNINSTALL) + @list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(xmldir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(xmldir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(xmldir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-xmlDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-xmlDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + install-xmlDATA installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-xmlDATA + +@INTLTOOL_XML_RULE@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/templates/paint/templates.xml.in gnome-chemistry-utils-0.10.9/templates/paint/templates.xml.in --- gnome-chemistry-utils-0.8.6/templates/paint/templates.xml.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/templates/paint/templates.xml.in 2009-11-14 11:30:40.000000000 +0100 @@ -0,0 +1,2051 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru gnome-chemistry-utils-0.8.6/tests/Makefile.am gnome-chemistry-utils-0.10.9/tests/Makefile.am --- gnome-chemistry-utils-0.8.6/tests/Makefile.am 2008-01-19 17:43:29.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/tests/Makefile.am 2009-11-14 11:30:40.000000000 +0100 @@ -2,12 +2,15 @@ MAINTAINERCLEANFILES = Makefile.in -AM_CFLAGS = -Werror-implicit-function-declaration -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/gcu - -LDADD = $(top_builddir)/gcu/libgcu.la - -DEFS += -DSRCDIR=\"@TESTSSRCDIR@\" +if GCU_NEEDS_GCONF +INCLUDES = -I$(top_srcdir)/gcu $(gtk_CFLAGS) $(gsf_CFLAGS) $(gnome_vfs_CFLAGS) +else +INCLUDES = -I$(top_srcdir)/gcu $(gtk_CFLAGS) $(gsf_CFLAGS) +endif +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +AM_CFLAGS = -I$(top_srcdir)/libs $(GCU_CFLAGS) -Werror-implicit-function-declaration +DEFS += -DSRCDIR=\"$(TESTSSRCDIR)\" check_PROGRAMS = \ testgtkperiodic \ diff -Nru gnome-chemistry-utils-0.8.6/tests/Makefile.in gnome-chemistry-utils-0.10.9/tests/Makefile.in --- gnome-chemistry-utils-0.8.6/tests/Makefile.in 2008-01-25 21:06:20.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/tests/Makefile.in 2009-11-14 11:46:05.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -43,26 +45,22 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am_testgtkchem3dviewer_OBJECTS = testgtkchem3dviewer.$(OBJEXT) testgtkchem3dviewer_OBJECTS = $(am_testgtkchem3dviewer_OBJECTS) testgtkchem3dviewer_LDADD = $(LDADD) -testgtkchem3dviewer_DEPENDENCIES = $(top_builddir)/gcu/libgcu.la am_testgtkcrystalviewer_OBJECTS = testgtkcrystalviewer.$(OBJEXT) testgtkcrystalviewer_OBJECTS = $(am_testgtkcrystalviewer_OBJECTS) testgtkcrystalviewer_LDADD = $(LDADD) -testgtkcrystalviewer_DEPENDENCIES = $(top_builddir)/gcu/libgcu.la am_testgtkperiodic_OBJECTS = testgtkperiodic.$(OBJEXT) testgtkperiodic_OBJECTS = $(am_testgtkperiodic_OBJECTS) testgtkperiodic_LDADD = $(LDADD) -testgtkperiodic_DEPENDENCIES = $(top_builddir)/gcu/libgcu.la -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -78,7 +76,6 @@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -96,28 +93,31 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ -DEFS = @DEFS@ -DSRCDIR=\"@TESTSSRCDIR@\" +DEFS = @DEFS@ -DSRCDIR=\"$(TESTSSRCDIR)\" DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ GCU_CFLAGS = @GCU_CFLAGS@ -GCU_LIBS = @GCU_LIBS@ GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ @@ -127,35 +127,21 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -168,14 +154,21 @@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -187,6 +180,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ STRIP = @STRIP@ TESTSSRCDIR = @TESTSSRCDIR@ UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ @@ -198,31 +193,56 @@ XMLLINT_FLAGS = @XMLLINT_FLAGS@ XSLTPROC = @XSLTPROC@ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -XULRUNNER_CLIENT = @XULRUNNER_CLIENT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -236,27 +256,37 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -with_kde_mime_dir = @with_kde_mime_dir@ -with_mozilla_libdir = @with_mozilla_libdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ EXTRA_DIST = nickel.gcrystal methane.xyz MAINTAINERCLEANFILES = Makefile.in -AM_CFLAGS = -Werror-implicit-function-declaration -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/gcu -LDADD = $(top_builddir)/gcu/libgcu.la +@GCU_NEEDS_GCONF_FALSE@INCLUDES = -I$(top_srcdir)/gcu $(gtk_CFLAGS) $(gsf_CFLAGS) +@GCU_NEEDS_GCONF_TRUE@INCLUDES = -I$(top_srcdir)/gcu $(gtk_CFLAGS) $(gsf_CFLAGS) $(gnome_vfs_CFLAGS) +DEPS = $(top_builddir)/libs/gcu/libgcu-@GCU_API_VER@.la +AM_CFLAGS = -I$(top_srcdir)/libs $(GCU_CFLAGS) -Werror-implicit-function-declaration testgtkcrystalviewer_SOURCES = testgtkcrystalviewer.c testgtkchem3dviewer_SOURCES = testgtkchem3dviewer.c testgtkperiodic_SOURCES = testgtkperiodic.c @@ -268,14 +298,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -293,13 +323,16 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list testgtkchem3dviewer$(EXEEXT): $(testgtkchem3dviewer_OBJECTS) $(testgtkchem3dviewer_DEPENDENCIES) @rm -f testgtkchem3dviewer$(EXEEXT) $(LINK) $(testgtkchem3dviewer_OBJECTS) $(testgtkchem3dviewer_LDADD) $(LIBS) @@ -322,21 +355,21 @@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -352,45 +385,49 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -411,13 +448,17 @@ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -446,6 +487,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -468,6 +510,8 @@ html: html-am +html-am: + info: info-am info-am: @@ -476,18 +520,28 @@ install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -510,7 +564,7 @@ uninstall-am: -.MAKE: install-am install-strip +.MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ @@ -526,6 +580,7 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/tests/testgtkchem3dviewer.c gnome-chemistry-utils-0.10.9/tests/testgtkchem3dviewer.c --- gnome-chemistry-utils-0.8.6/tests/testgtkchem3dviewer.c 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/tests/testgtkchem3dviewer.c 2009-11-14 11:30:40.000000000 +0100 @@ -1,10 +1,34 @@ +/* + * Gnome Chemisty Utils + * tests/testgtkchem3dviewer.c + * + * Copyright (C) 2008 Jean Bréfort + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA. + */ + #include "config.h" #include #include #include #include #include -#include +#ifdef GOFFICE_IS_0_6 +# include +#endif /*!\file A simple sample of the use of the GtkChem3DViewer widget. @@ -25,10 +49,12 @@ GtkWidget *viewer; gchar* uri; gtk_init (&argc, &argv); +#ifdef GOFFICE_IS_0_6 if (!gnome_vfs_init ()) { printf ("Could not initialize GnomeVFS\n"); return 1; } +#endif gcu_element_load_databases ("radii", NULL); diff -Nru gnome-chemistry-utils-0.8.6/tests/testgtkcrystalviewer.c gnome-chemistry-utils-0.10.9/tests/testgtkcrystalviewer.c --- gnome-chemistry-utils-0.8.6/tests/testgtkcrystalviewer.c 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/tests/testgtkcrystalviewer.c 2009-11-14 11:30:40.000000000 +0100 @@ -1,3 +1,25 @@ +/* + * Gnome Chemisty Utils + * tests/testgtkcrystalviewer.c + * + * Copyright (C) 2008 Jean Bréfort + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA. + */ + #include #include #include diff -Nru gnome-chemistry-utils-0.8.6/tests/testgtkperiodic.c gnome-chemistry-utils-0.10.9/tests/testgtkperiodic.c --- gnome-chemistry-utils-0.8.6/tests/testgtkperiodic.c 2006-12-28 09:16:41.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/tests/testgtkperiodic.c 2009-11-14 11:30:40.000000000 +0100 @@ -1,3 +1,25 @@ +/* + * Gnome Chemisty Utils + * tests/testgtkperiodic.c + * + * Copyright (C) 2008 Jean Bréfort + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA. + */ + #include #include #include diff -Nru gnome-chemistry-utils-0.8.6/themes/Makefile.am gnome-chemistry-utils-0.10.9/themes/Makefile.am --- gnome-chemistry-utils-0.8.6/themes/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/themes/Makefile.am 2009-11-14 11:30:35.000000000 +0100 @@ -0,0 +1,3 @@ +SUBDIRS = paint + +MAINTAINERCLEANFILES = Makefile.in diff -Nru gnome-chemistry-utils-0.8.6/themes/Makefile.in gnome-chemistry-utils-0.10.9/themes/Makefile.in --- gnome-chemistry-utils-0.8.6/themes/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/themes/Makefile.in 2009-11-14 11:46:06.000000000 +0100 @@ -0,0 +1,651 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = themes +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +SUBDIRS = paint +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu themes/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu themes/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/themes/paint/ACS_Document_1996 gnome-chemistry-utils-0.10.9/themes/paint/ACS_Document_1996 --- gnome-chemistry-utils-0.8.6/themes/paint/ACS_Document_1996 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/themes/paint/ACS_Document_1996 2009-11-14 11:30:35.000000000 +0100 @@ -0,0 +1,4 @@ + + + + diff -Nru gnome-chemistry-utils-0.8.6/themes/paint/Makefile.am gnome-chemistry-utils-0.10.9/themes/paint/Makefile.am --- gnome-chemistry-utils-0.8.6/themes/paint/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/themes/paint/Makefile.am 2009-11-14 11:30:35.000000000 +0100 @@ -0,0 +1,6 @@ +MAINTAINERCLEANFILES = Makefile.in + +themesdir = $(datadir)/gchemutils/@GCU_API_VER@/paint/themes +dist_themes_DATA = \ + ACS_Document_1996 \ + Wikipedia diff -Nru gnome-chemistry-utils-0.8.6/themes/paint/Makefile.in gnome-chemistry-utils-0.10.9/themes/paint/Makefile.in --- gnome-chemistry-utils-0.8.6/themes/paint/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/themes/paint/Makefile.in 2009-11-14 11:46:06.000000000 +0100 @@ -0,0 +1,502 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = themes/paint +DIST_COMMON = $(dist_themes_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(themesdir)" +DATA = $(dist_themes_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCU_API_VER = @GCU_API_VER@ +GCU_CFLAGS = @GCU_CFLAGS@ +GCU_VERSION_INFO = @GCU_VERSION_INFO@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@ +GREP = @GREP@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KDECONFIG = @KDECONFIG@ +KDEMIMEDIR = @KDEMIMEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAN = @MAN@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MOZILLA_CFLAGS = @MOZILLA_CFLAGS@ +MOZILLA_CONFIG = @MOZILLA_CONFIG@ +MOZILLA_LIBS = @MOZILLA_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OB22_CFLAGS = @OB22_CFLAGS@ +OB22_LIBS = @OB22_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STABILITY = @STABILITY@ +STABILITY_POSTFIX = @STABILITY_POSTFIX@ +STRIP = @STRIP@ +TESTSSRCDIR = @TESTSSRCDIR@ +UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@ +UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMLLINT = @XMLLINT@ +XMLLINT_FLAGS = @XMLLINT_FLAGS@ +XSLTPROC = @XSLTPROC@ +XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +bodr_CFLAGS = @bodr_CFLAGS@ +bodr_LIBS = @bodr_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cairo_CFLAGS = @cairo_CFLAGS@ +cairo_LIBS = @cairo_LIBS@ +chemical_mime_data_CFLAGS = @chemical_mime_data_CFLAGS@ +chemical_mime_data_LIBS = @chemical_mime_data_LIBS@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gconf_CFLAGS = @gconf_CFLAGS@ +gconf_LIBS = @gconf_LIBS@ +gio_CFLAGS = @gio_CFLAGS@ +gio_LIBS = @gio_LIBS@ +glade_CFLAGS = @glade_CFLAGS@ +glade_LIBS = @glade_LIBS@ +gnome_canvas_CFLAGS = @gnome_canvas_CFLAGS@ +gnome_canvas_LIBS = @gnome_canvas_LIBS@ +gnome_vfs_CFLAGS = @gnome_vfs_CFLAGS@ +gnome_vfs_LIBS = @gnome_vfs_LIBS@ +goffice_CFLAGS = @goffice_CFLAGS@ +goffice_LIBS = @goffice_LIBS@ +goffice_has_global_header_CFLAGS = @goffice_has_global_header_CFLAGS@ +goffice_has_global_header_LIBS = @goffice_has_global_header_LIBS@ +gsf_CFLAGS = @gsf_CFLAGS@ +gsf_LIBS = @gsf_LIBS@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ +gtkglext_CFLAGS = @gtkglext_CFLAGS@ +gtkglext_LIBS = @gtkglext_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +mozlibdir = @mozlibdir@ +need_goffice_with_gnome_CFLAGS = @need_goffice_with_gnome_CFLAGS@ +need_goffice_with_gnome_LIBS = @need_goffice_with_gnome_LIBS@ +oldincludedir = @oldincludedir@ +openbabel_CFLAGS = @openbabel_CFLAGS@ +openbabel_LIBS = @openbabel_LIBS@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_mime_info_CFLAGS = @shared_mime_info_CFLAGS@ +shared_mime_info_LIBS = @shared_mime_info_LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xml_CFLAGS = @xml_CFLAGS@ +xml_LIBS = @xml_LIBS@ +MAINTAINERCLEANFILES = Makefile.in +themesdir = $(datadir)/gchemutils/@GCU_API_VER@/paint/themes +dist_themes_DATA = \ + ACS_Document_1996 \ + Wikipedia + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu themes/paint/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu themes/paint/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_themesDATA: $(dist_themes_DATA) + @$(NORMAL_INSTALL) + test -z "$(themesdir)" || $(MKDIR_P) "$(DESTDIR)$(themesdir)" + @list='$(dist_themes_DATA)'; test -n "$(themesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(themesdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(themesdir)" || exit $$?; \ + done + +uninstall-dist_themesDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_themes_DATA)'; test -n "$(themesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(themesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(themesdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(themesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_themesDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_themesDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dist_themesDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-dist_themesDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gnome-chemistry-utils-0.8.6/themes/paint/Wikipedia gnome-chemistry-utils-0.10.9/themes/paint/Wikipedia --- gnome-chemistry-utils-0.8.6/themes/paint/Wikipedia 1970-01-01 01:00:00.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/themes/paint/Wikipedia 2009-11-14 11:30:35.000000000 +0100 @@ -0,0 +1,4 @@ + + + + diff -Nru gnome-chemistry-utils-0.8.6/TODO gnome-chemistry-utils-0.10.9/TODO --- gnome-chemistry-utils-0.8.6/TODO 2007-02-16 18:53:28.000000000 +0100 +++ gnome-chemistry-utils-0.10.9/TODO 2009-11-14 11:30:40.000000000 +0100 @@ -1,28 +1,55 @@ * Periodic table: - * add more data using bodr. - * add crystal structures. - * allow plotting any property againt another one, i.e. ei vs vdw radius. - * allow charts customization (using the code in goffice). - * write help. + * add more data using bodr (?). + * add crystal structures (? needs reliable crystal structures in bodr). + * write help (0.10). * Calculator: - * accept abbreviations as Ph and others (what about Ac, Pr,...?). + * enhance ambiguous abbreviations support (0.12?). + * a lot of code cleaning (0.12). * 3d viewer: - * display multiple bonds. - * add more display options. - * export encapsulated postscript. + * allow selection of atoms and or bonds, and display or lengths and angles (0.12). + * add a preferences dialog. * Mozilla plugin: - * implement printing. - * support 2d rendering (when gchempaint will be incorporated). - * add a contextual dropdown menu. + * implement printing (?). + * add a contextual dropdown menu (?). + * support for options when displaying a spectrum (?). * Gnome Crystal: - * open files from other formats (cif, cml) using openbabel. - * export encapsulated postscript. + * open cml files (0.12). + * export to cif and cml formats (needs space group sniffing) (?). + +* GChemPaint: + * enhance copy-and-paste support for OpenOffice.org (?). + * plugin to prepare png files of molecules ready for publication in wikipedia (almost done). + * Use a cairo based canvas (0.12). + * New tools: + - delocalized bonds (?), + - week interactions (e.g. H-bonds) (?), + - curved arrows (in mechanisms) (0.12?). + - curved reaction arrows and Tollman's loops (?), + - cluster bonds (as in boranes) (?), + - electron vacancies (?). + * Multi-steps reactions (0.12?). + * Scriptability (?). + * Enhance selection (0.12?). + * Enhance fragments (0.12+). + * Change cursor according to situation (?). + * Allow associating several objects with reaction arrows (0.12?). + +* Goffice component: + * support 3d structures (?). + +* Spectrum viewer: + * support FFT for FIDs. + * support inclusion of zoomed partials. * Library: + * provide clipboard support at the Application level (?). * Other: - * get gchempaint in there after branching for 0.8 + * Make file operation asynchroneous (especially for remote file systems). + * Update documentation (always). + * More code cleaning (always). + * Remove all bugs ;-)