Fix TDEHotNewStuff interface with OCS providers

This relates to Bug 2127
pull/1/head
Timothy Pearson 10 years ago
parent e4b4d01f65
commit 1c137dacd1

File diff suppressed because it is too large Load Diff

1033
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

@ -1,332 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if Amazon.com searching should be enabled */
#undef AMAZON_SUPPORT
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define to 1 if webcam support is enabled */
#undef ENABLE_WEBCAM
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define if boolean is defined in <sys/types.h> */
#undef HAVE_BOOLEAN
/* Define if you have the CoreAudio API */
#undef HAVE_COREAUDIO
/* Define to 1 if you have the <crt_externs.h> header file. */
#undef HAVE_CRT_EXTERNS_H
/* Defines if your system has the crypt function */
#undef HAVE_CRYPT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
/* Define to 1 if exempi is available */
#undef HAVE_EXEMPI
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have libkcal */
#undef HAVE_KCAL
/* Define to 1 if you have libkcddb */
#undef HAVE_KCDDB
/* Define to 1 if you have the `btparse' library (-lbtparse). */
#undef HAVE_LIBBTPARSE
/* Define if you have libjpeg */
#undef HAVE_LIBJPEG
/* Define if you have libpng */
#undef HAVE_LIBPNG
/* Define if you have a working libpthread (will enable threaded code) */
#undef HAVE_LIBPTHREAD
/* Define if you have libz */
#undef HAVE_LIBZ
/* Define to 1 if you have the <linux/videodev.h> header file. */
#undef HAVE_LINUX_VIDEODEV_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if your system needs _NSGetEnviron to set up the environment */
#undef HAVE_NSGETENVIRON
/* Define to 1 if poppler is available */
#undef HAVE_POPPLER
/* Define if you have res_init */
#undef HAVE_RES_INIT
/* Define if you have the res_init prototype */
#undef HAVE_RES_INIT_PROTO
/* Define to 1 if you have the <sal/config.h> header file. */
#undef HAVE_SAL_CONFIG_H
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if strdup is declared in <string.h> */
#undef HAVE_STRDUP_DECL
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have strlcat */
#undef HAVE_STRLCAT
/* Define if you have the strlcat prototype */
#undef HAVE_STRLCAT_PROTO
/* Define if you have strlcpy */
#undef HAVE_STRLCPY
/* Define if you have the strlcpy prototype */
#undef HAVE_STRLCPY_PROTO
/* Define to 1 if you have the `strlwr' function. */
#undef HAVE_STRLWR
/* Define to 1 if you have the `strupr' function. */
#undef HAVE_STRUPR
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the TagLib library */
#undef HAVE_TAGLIB
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if ushort is defined in <sys/types.h> */
#undef HAVE_USHORT
/* Define if you have the 'std::vector::at(std::size_t)' function */
#undef HAVE_VECTOR_AT
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Define to 1 if you have the yaz library */
#undef HAVE_YAZ
/* Define to 1 if IMDb searching should be enabled */
#undef IMDB_SUPPORT
/* Suffix for lib directories */
#undef KDELIBSUFF
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if the XML loader should use SAX */
#undef SAX_SUPPORT
/* The size of `char', as computed by sizeof. */
#undef SIZEOF_CHAR
/* The size of `char *', as computed by sizeof. */
#undef SIZEOF_CHAR_P
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of `unsigned char', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_CHAR
/* The size of `unsigned int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_INT
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* The size of `unsigned short', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_SHORT
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you want to compile CD-Text support */
#undef USE_CDTEXT
/* Version number of package */
#undef VERSION
/* Defined if compiling without arts */
#undef WITHOUT_ARTS
/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only
* unixware is related
*/
#ifdef _UNIXWARE
#define HAVE_BOOLEAN
#endif
/*
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
* that defines bzero.
*/
#if defined(_AIX)
#include <strings.h>
#endif
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
# include <sys/time.h>
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#endif
#if !defined(HAVE_RES_INIT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
int res_init(void);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCAT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcat(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCPY_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcpy(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
/*
* On HP-UX, the declaration of vsnprintf() is needed every time !
*/
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
#if __STDC__
#include <stdarg.h>
#include <stdlib.h>
#else
#include <varargs.h>
#endif
#ifdef __cplusplus
extern "C"
#endif
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
#ifdef __cplusplus
extern "C"
#endif
int snprintf(char *str, size_t n, char const *fmt, ...);
#endif
#if defined(__SVR4) && !defined(__svr4__)
#define __svr4__ 1
#endif
/* type to use in place of socklen_t if not defined */
#undef kde_socklen_t
/* type to use in place of socklen_t if not defined (deprecated, use
kde_socklen_t) */
#undef ksize_t

@ -1,751 +0,0 @@
dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifh Floor,
dnl Boston, MA 02110-1301, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(tellico, 1.3.6) dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
KDE_USE_QT(3.3)
AC_PATH_KDE
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================
#MIN_CONFIG(3.3)
dnl PACKAGE set before
dnl AM_KDE_MIN_VERSION(MIN-VERSION-MAJOR, MIN-VERSION-MINOR, MIN-VERSION-MICRO)
dnl (taken from KMyMoney2)
dnl
AC_DEFUN([AM_KDE_MIN_VERSION],
[
AC_MSG_CHECKING([for KDE version $1.$2.$3 or later])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -I$srcdir $all_includes"
AC_TRY_COMPILE([
#include "tdeversion.h"
#if !( KDE_IS_VERSION( $1, $2, $3 ) )
#error KDE version does not meet minimum requirement
#endif
], [], AC_MSG_RESULT(yes), AC_MSG_ERROR(no))
CXXFLAGS=$save_CXXFLAGS
AC_LANG_RESTORE
])
AM_KDE_MIN_VERSION(3,3,1)
dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __tdevelop[noopt]__
dnl CFLAGS="$NOOPT_CFLAGS" dnl __tdevelop[noopt]__
dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS -DQT_NO_ASCII_CAST -DQT_NO_TRANSLATION" dnl __tdevelop[exc]__
dnl KDE_NEED_FLEX dnl __tdevelop__
dnl AC_PROG_YACC dnl __tdevelop__
AC_MSG_CHECKING(for ushort in <sys/types.h>)
AC_CACHE_VAL(bt_cv_type_ushort, [
AC_TRY_COMPILE([
#include <sys/types.h>
],[
ushort i;
], bt_cv_type_ushort=yes, bt_cv_type_ushort=no)])
AC_MSG_RESULT($bt_cv_type_ushort)
if test "$bt_cv_type_ushort" = "yes" ; then
AC_DEFINE(HAVE_USHORT, 1, [Define if ushort is defined in <sys/types.h>])
fi
AC_MSG_CHECKING(for boolean in <sys/types.h>)
AC_CACHE_VAL(bt_cv_type_boolean, [
AC_TRY_COMPILE([
#include <sys/types.h>
],[
boolean f;
], bt_cv_type_boolean=yes, bt_cv_type_boolean=no)])
AC_MSG_RESULT($bt_cv_type_boolean)
if test "$bt_cv_type_boolean" = "yes" ; then
AC_DEFINE(HAVE_BOOLEAN, 1, [Define if boolean is defined in <sys/types.h>])
fi
AC_MSG_CHECKING(for strdup declaration in <string.h>)
AC_EGREP_HEADER([strdup *\(], string.h, bt_cv_decl_strdup=yes, bt_cv_decl_strdup=no)
AC_MSG_RESULT($bt_cv_decl_strdup)
if test "$bt_cv_decl_strdup" = "yes" ; then
AC_DEFINE(HAVE_STRDUP_DECL, 1, [Define if strdup is declared in <string.h>])
fi
dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strlwr strupr)
AC_CHECK_SIZEOF(unsigned int, 4)
AC_CHECK_SIZEOF(unsigned short, 2)
AC_CHECK_SIZEOF(unsigned char, 1)
AC_CHECK_SIZEOF(char, 1)
AC_CACHE_CHECK([for std::vector::at(std::size_t)],
ac_cv_cxx_have_vector_at, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include <vector>
],[
std::vector<int> v(1);
v.at(0);
return 0;
],ac_cv_cxx_have_vector_at=yes, ac_cv_cxx_have_vector_at=no)
AC_LANG_RESTORE
])
if test "$ac_cv_cxx_have_vector_at" = "yes"; then
AC_DEFINE(HAVE_VECTOR_AT,1,[Define if you have the 'std::vector::at(std::size_t)' function])
fi
KDE_FIND_PATH(xml2-config, XML_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_ERROR([[Could not find xml2-config anywhere, check ftp://xmlsoft.org/ for libxml >= 2.6.0. If you are using pre-packaged libraries, be sure to have the development files installed as well, which may be called libxml2-devel or something similar.]])
])
if test -n "$XML_CONFIG"; then
vers=`$XML_CONFIG --version 2>/dev/null | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test -n "$vers" && test "$vers" -ge 2006000
then
LIBXML_LIBS="`$XML_CONFIG --libs`"
LIBXML_RPATH=
for args in $LIBXML_LIBS; do
case $args in
-L*)
LIBXML_RPATH="$LIBXML_RPATH $args"
;;
esac
done
LIBXML_RPATH=`echo $LIBXML_RPATH | sed -e "s/-L/-R/g"`
LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
else
AC_MSG_ERROR([[You need at least libxml 2.6.0.]])
fi
fi
AC_SUBST(LIBXML_LIBS)
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_RPATH)
AC_ARG_WITH([xml-catalog],
AC_HELP_STRING([--with-xml-catalog=CATALOG],
[path to XML catalog, default=without-xml-catalog]),,
[with_xml_catalog=no])
if test x"$with_xml_catalog" != xno; then
KDE_FIND_PATH(xmlcatalog, XMLCATALOG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_ERROR([[Could not find xmlcatalog anywhere, check ftp://xmlsoft.org/ for libxml2 >= 2.4.23. If you are using pre-packaged libraries, be sure to have the utility files installed as well, which may be called libxml2-utils or something similar.]])
])
AC_SUBST(XMLCATALOG)
if test x"$with_xml_catalog" = xyes; then
XML_CATALOG_FILE="/etc/xml/catalog"
else
XML_CATALOG_FILE="$with_xml_catalog"
fi
AC_MSG_CHECKING([for XML catalog])
if test -f "$XML_CATALOG_FILE"; then
AC_MSG_RESULT([$XML_CATALOG_FILE])
else
AC_MSG_ERROR([$XML_CATALOG_FILE not found])
fi
AC_SUBST(XML_CATALOG_FILE)
fi
KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_ERROR([[Could not find xslt-config anywhere, check ftp://xmlsoft.org/ for libxslt >= 1.0.19. If you are using pre-packaged libraries, be sure to have the development files installed as well, which may be called libxslt-devel or something similar.]])
])
if test -n "$XSLT_CONFIG"; then
vers=`$XSLT_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test -n "$vers" && test "$vers" -ge 1000019; then
LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
LIBXSLT_RPATH=
for args in $LIBXSLT_LIBS; do
case $args in
-L*)
LIBXSLT_RPATH="$LIBXSLT_RPATH $args"
;;
esac
done
LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | sed -e "s/-L/-R/g"`
LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
else
AC_MSG_ERROR([[You need at least libxslt 1.0.19.]])
fi
fi
AC_SUBST(LIBXSLT_LIBS)
AC_SUBST(LIBXSLT_CFLAGS)
AC_SUBST(LIBXSLT_RPATH)
dnl ---------- TAGLIB CHECK ----------
AC_DEFUN([AC_HAVE_TAGLIB],
[
AC_DEFINE(HAVE_TAGLIB, 1, [Define to 1 if you have the TagLib library])
TAGLIB_CFLAGS=[`$TAGLIB_CONFIG --cflags`]
TAGLIB_LIBS=[`$TAGLIB_CONFIG --libs`]
TAGLIB_RPATH=
for args in $TAGLIB_LIBS; do
case $args in
-L*)
TAGLIB_RPATH="$TAGLIB_RPATH $args"
;;
esac
done
TAGLIB_RPATH=`echo $TAGLIB_RPATH | sed -e "s/-L/-R/g"`
])
AC_DEFUN([AC_NO_TAGLIB],
[
TAGLIB_CFLAGS=""
TAGLIB_LIBS=""
TAGLIB_RPATH=""
])
KDE_FIND_PATH(taglib-config, TAGLIB_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
if test -n "$TAGLIB_CONFIG"; then
AC_HAVE_TAGLIB
else
AC_NO_TAGLIB
fi
AC_SUBST(TAGLIB_CFLAGS)
AC_SUBST(TAGLIB_LIBS)
AC_SUBST(TAGLIB_RPATH)
dnl ---------- END TAGLIB CHECK ----------
dnl ---------- YAZ CHECK ----------
AC_DEFUN([AC_HAVE_YAZ],
[
AC_DEFINE(HAVE_YAZ, 1, [Define to 1 if you have the yaz library])
YAZ_CFLAGS=[`$YAZ_CONFIG --cflags`]
YAZ_LIBS=[`$YAZ_CONFIG --libs`]
YAZ_RPATH=
for args in $YAZ_LIBS; do
case $args in
-L*)
YAZ_RPATH="$YAZ_RPATH $args"
;;
esac
done
YAZ_RPATH=`echo $YAZ_RPATH | sed -e "s/-L/-R/g"`
])
AC_DEFUN([AC_NO_YAZ],
[
YAZ_CFLAGS=""
YAZ_LIBS=""
YAZ_RPATH=""
])
KDE_FIND_PATH(yaz-config, YAZ_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
if test -n "$YAZ_CONFIG"; then
AC_HAVE_YAZ
else
AC_NO_YAZ
fi
AC_SUBST(YAZ_CFLAGS)
AC_SUBST(YAZ_LIBS)
AC_SUBST(YAZ_RPATH)
dnl ---------- END YAZ CHECK ----------
dnl ---------- KCDDB CHECK ----------
AC_ARG_ENABLE(libkcddb,
AC_HELP_STRING([--disable-libkcddb], [disable libkcddb, default=enable if found]),
[enable_libkcddb=$enableval],
[enable_libkcddb=yes]
)
if test x$enable_libkcddb = xyes; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_libs="$LIBS"
ac_save_cxxflags="$CXXFLAGS"
LIBS="$LIBS $all_libraries -lkcddb"
CXXFLAGS="$CXXFLAGS $all_includes"
AC_MSG_CHECKING(for libkcddb library and headers)
AC_TRY_LINK(
[
#ifdef QT_NO_CAST_ASCII
#undef QT_NO_CAST_ASCII
#endif
#include <libkcddb/cddb.h>
],
[KCDDB::CDDB c],
[kcddb=yes],
[kcddb=no]
)
AC_MSG_RESULT($kcddb)
LIBS="$ac_save_libs"
CXXFLAGS="$ac_save_cxxflags"
AC_LANG_RESTORE
if test x$kcddb = xyes; then
AC_DEFINE(HAVE_KCDDB, 1, [Define to 1 if you have libkcddb])
KCDDB_LIBS="-lkcddb"
else
KCDDB_LIBS=
fi
dnl -- kcddb was disabled ---
else
KCDDB_LIBS=
fi
AC_SUBST(KCDDB_LIBS)
dnl ---------- END KCDDB CHECK ----------
dnl ---------- KCAL CHECK ----------
AC_ARG_ENABLE(libkcal,
AC_HELP_STRING([--disable-libkcal], [disable libkcal, default=enable if found]),
[enable_libkcal=$enableval],
[enable_libkcal=yes]
)
if test x$enable_libkcal = xyes; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_libs="$LIBS"
ac_save_cxxflags="$CXXFLAGS"
LIBS="$LIBS $all_libraries -lkcal"
CXXFLAGS="$CXXFLAGS $all_includes"
AC_MSG_CHECKING(for libkcal library and headers)
AC_TRY_LINK(
[
#ifdef QT_NO_CAST_ASCII
#undef QT_NO_CAST_ASCII
#endif
#include <libkcal/todo.h>
],
[KCal::Todo t],
[kcal=yes],
[kcal=no]
)
AC_MSG_RESULT($kcal)
LIBS="$ac_save_libs"
CXXFLAGS="$ac_save_cxxflags"
AC_LANG_RESTORE
if test x$kcal = xyes; then
AC_DEFINE(HAVE_KCAL, 1, [Define to 1 if you have libkcal])
KCAL_LIBS="-lkcal"
else
KCAL_LIBS=
fi
dnl -- libkcal was disabled ---
else
KCAL_LIBS=
fi
AC_SUBST(KCAL_LIBS)
dnl ---------- END KCAL CHECK ----------
AC_ARG_WITH([btparse],
AC_HELP_STRING([--with-btparse], [Link against libbtparse
as a shared lib (shared) or build it statically (static), default=static]),
[case "${withval}" in
shared) btparse=shared ;;
static) btparse=static ;;
yes) btparse=shared ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-btparse) ;;
esac],
[btparse=static])
AM_CONDITIONAL(USE_LIBBTPARSE, test x$btparse = xshared)
if test x$btparse = xshared; then
KDE_CHECK_LIB(btparse, bt_initialize, [], [AC_MSG_ERROR(could not find libbtparse)])
fi
dnl ---------- AMAZON CHECK ----------
AC_ARG_ENABLE(amazon,
AC_HELP_STRING([--disable-amazon], [disable Amazon.com searching, default=enable]),
[enable_amazon=$enableval],
[enable_amazon=yes]
)
if test x$enable_amazon = xyes; then
AC_DEFINE(AMAZON_SUPPORT, 1, [Define to 1 if Amazon.com searching should be enabled])
fi
dnl ---------- END AMAZON CHECK ----------
dnl ---------- IMDB CHECK ----------
AC_ARG_ENABLE(imdb,
AC_HELP_STRING([--disable-imdb], [disable IMDb searching, default=enable]),
[enable_imdb=$enableval],
[enable_imdb=yes]
)
if test x$enable_imdb = xyes; then
AC_DEFINE(IMDB_SUPPORT, 1, [Define to 1 if IMDb searching should be enabled])
fi
dnl ---------- END IMDB CHECK ----------
dnl ---------- CDTEXT CHECK ----------
dnl Not sure if my code for CDText works on all platforms, allow disabling
AC_ARG_ENABLE(cdtext,
AC_HELP_STRING([--disable-cdtext], [disable cdtext, default=enable (Linux only)]),
[enable_cdtext=$enableval],
[enable_cdtext=yes]
)
if test x$enable_cdtext = xyes; then
AC_DEFINE(USE_CDTEXT, 1, [Define to 1 if you want to compile CD-Text support])
fi
dnl ---------- OpenOffice.org CHECK ----------
AC_ARG_ENABLE(ooo,
AC_HELP_STRING([--enable-ooo], [enable support for OpenOffice.org, default=disable]),
[enable_ooo=$enableval],
[enable_ooo=no]
)
AM_CONDITIONAL(WITH_OOO, test x$enable_ooo = xyes)
dnl Options: OpenOffice.org installation
AC_ARG_WITH([ooo-dir],
AC_HELP_STRING([--with-ooo-dir=DIR],
[where the OpenOffice.org program files are installed]),
[ac_ooo_libdir="${withval}/program"
ac_ooo_datadir="${withval}/program"
ac_ooo_basisdir="${withval}/basis3.0"])
AC_ARG_WITH([ooo-libdir],
AC_HELP_STRING([--with-ooo-libdir=DIR],
[where the OpenOffice.org program libraries are installed (<ooo-dir>/program)]),
[ac_ooo_libdir="${withval}"])
AC_ARG_WITH([ooo-datadir],
AC_HELP_STRING([--with-ooo-datadir=DIR],
[where the OpenOffice.org data files are installed (<ooo-dir>/program)]),
[ac_ooo_datadir="${withval}"])
dnl Options: OpenOffice.org SDK
AC_ARG_WITH([ooo-sdk-dir],
AC_HELP_STRING([--with-ooo-sdk-dir=DIR],
[where the OpenOffice.org SDK is installed]),
[ac_ooo_sdk_bindir="${withval}/linux/bin"
ac_ooo_sdk_includes="${withval}/include"])
AC_ARG_WITH([ooo-sdk-bindir],
AC_HELP_STRING([--with-ooo-sdk-bindir=DIR],
[where the OpenOffice.org SDK binaries are installed (<ooo-sdk-dir>/linux/bin)]),
[ac_ooo_sdk_bindir="${withval}"])
AC_ARG_WITH([ooo-sdk-includes],
AC_HELP_STRING([--with-ooo-sdk-includes=DIR],
[where the OpenOffice.org SDK includes are installed (<ooo-sdk-dir>/include)]),
[ac_ooo_sdk_includes="${withval}"])
if test x$enable_ooo = xyes; then
dnl Check for UNO cpp binding
KDE_FIND_PATH(cppumaker, CPPUMAKER, [$ac_ooo_sdk_bindir ${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_ERROR([[cppumaker not found, try '--with-ooo-sdk-dir=location_of_ODK']])
])
dnl Check for ODK includes
ac_cppflags_safe="$CPPFLAGS"
CPPFLAGS="-I$ac_ooo_sdk_includes"
KDE_CHECK_HEADERS([sal/config.h],
[OFFICE_SDK_includes="$CPPFLAGS"],
AC_MSG_ERROR([[OpenOffice.org SDK include files not found, try '--with-ooo-sdk-dir=location_of_ODK']]))
CPPFLAGS="$ac_cppflags_safe"
dnl OpenOffice.org libraries
if test -n "$ac_ooo_libdir" ; then
OFFICE_libadd="-L$ac_ooo_libdir"
OFFICE_libdir="$ac_ooo_libdir"
fi
dnl OpenOffice.org types.rdb
AC_CHECK_FILE([$ac_ooo_datadir/types.rdb],
[OFFICE_registry="$ac_ooo_datadir"/types.rdb],
AC_MSG_ERROR([[types.rdb not found, try '--with-ooo-dir=OpenOffice.org_installation_path']]))
AC_FIND_FILE([offapi.rdb],
[$ac_ooo_basisdir/program $ac_ooo_libdir $ac_ooo_datadir],
offapi_dir)
if test "$offapi_dir" != "NO"; then
OFFICE_registry="$OFFICE_registry $offapi_dir/offapi.rdb"
fi
dnl Substitute the values
AC_SUBST(OFFICE_SDK_includes)
AC_SUBST(OFFICE_libadd)
AC_SUBST(OFFICE_libdir)
AC_SUBST(OFFICE_registry)
AC_SUBST(CPPUMAKER)
fi
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/core"
CXXFLAGS="$CXXFLAGS -I\$(top_srcdir)/src/core"
dnl ---------- EXEMPI CHECK ----------
AC_ARG_ENABLE(exempi,
AC_HELP_STRING([--disable-exempi], [disable exempi, default=enable if found]),
[enable_libexempi=$enableval],
[enable_libexempi=yes]
)
if test x$enable_libexempi = xyes; then
KDE_PKG_CHECK_MODULES(EXEMPI,
[exempi-2.0 >= 1.99.0],
[have_exempi=yes],
[have_exempi=no])
AC_SUBST(EXEMPI_LIBS)
AC_SUBST(EXEMPI_CFLAGS)
else
have_exempi="no (disabled)"
fi
test "$have_exempi" = "yes" && AC_DEFINE(HAVE_EXEMPI, 1, [Define to 1 if exempi is available])
dnl ---------- END EXEMPI CHECK ----------
dnl ---------- POPPLER CHECK ----------
AC_ARG_ENABLE(poppler,
AC_HELP_STRING([--disable-poppler], [disable poppler, default=enable if found]),
[enable_libpoppler=$enableval],
[enable_libpoppler=yes]
)
if test x$enable_libpoppler = xyes; then
KDE_PKG_CHECK_MODULES(POPPLER,
[poppler-tqt >= 0.5],
[have_poppler=yes],
[have_poppler=no])
AC_SUBST(POPPLER_LIBS)
AC_SUBST(POPPLER_CFLAGS)
else
have_poppler="no (disabled)"
fi
test "$have_poppler" = "yes" && AC_DEFINE(HAVE_POPPLER, 1, [Define to 1 if poppler is available])
dnl ---------- END POPPLER CHECK ----------
dnl ---------- WEBCAM CHECK ----------
AC_ARG_ENABLE(webcam,
AC_HELP_STRING([--enable-webcam], [enable support for webcams (experimental), default=disable]),
[enable_webcam=$enableval],
[enable_webcam=no]
)
if test x$enable_webcam = xyes; then
KDE_CHECK_HEADERS([linux/videodev.h],
[],
[enable_webcam="no"])
fi
AM_CONDITIONAL(ENABLE_WEBCAM, test $enable_webcam = yes)
if test x$enable_webcam = xyes; then
AC_DEFINE(ENABLE_WEBCAM, 1, [Define to 1 if webcam support is enabled])
fi
dnl ---------- END WEBCAM CHECK ----------
dnl ---------- SAX CHECK ----------
AC_ARG_ENABLE(sax,
AC_HELP_STRING([--enable-sax], [enable SAX document loading (experimental), default=disable]),
[enable_sax=$enableval],
[enable_sax=no]
)
if test x$enable_sax = xyes; then
AC_DEFINE(SAX_SUPPORT, 1, [Define to 1 if the XML loader should use SAX])
fi
dnl ---------- END SAX CHECK ----------
KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/en/Makefile ])
AC_CONFIG_FILES([ doc/fr/Makefile ])
AC_CONFIG_FILES([ icons/Makefile ])
AC_CONFIG_FILES([ po/Makefile ])
AC_CONFIG_FILES([ src/Makefile ])
AC_CONFIG_FILES([ src/barcode/Makefile ])
AC_CONFIG_FILES([ src/cite/Makefile ])
AC_CONFIG_FILES([ src/cite/ooo/Makefile ])
AC_CONFIG_FILES([ src/collections/Makefile ])
AC_CONFIG_FILES([ src/commands/Makefile ])
AC_CONFIG_FILES([ src/core/Makefile ])
AC_CONFIG_FILES([ src/fetch/Makefile ])
AC_CONFIG_FILES([ src/fetch/scripts/Makefile ])
AC_CONFIG_FILES([ src/gui/Makefile ])
AC_CONFIG_FILES([ src/newstuff/Makefile ])
AC_CONFIG_FILES([ src/rtf2html/Makefile ])
AC_CONFIG_FILES([ src/tests/Makefile ])
AC_CONFIG_FILES([ src/translators/Makefile ])
AC_CONFIG_FILES([ src/translators/btparse/Makefile ])
AC_CONFIG_FILES([ src/translators/pilotdb/Makefile ])
AC_CONFIG_FILES([ src/translators/pilotdb/libflatfile/Makefile ])
AC_CONFIG_FILES([ src/translators/pilotdb/libpalm/Makefile ])
AC_CONFIG_FILES([ xslt/Makefile ])
AC_CONFIG_FILES([ xslt/entry-templates/Makefile ])
AC_CONFIG_FILES([ xslt/report-templates/Makefile ])
AC_OUTPUT
echo ""
if test -z "$TAGLIB_CONFIG"; then
echo " *******************************************************"
echo " *** You don't have the TagLib headers on your system"
echo " *** Support for reading audio files is disabled"
echo " *******************************************************"
echo ""
fi
if test -z "$YAZ_CONFIG"; then
echo " *******************************************************"
echo " *** You don't have the yaz headers on your system"
echo " *** Support for z39.50 searches is disabled"
echo " *******************************************************"
echo ""
fi
if test x$kcddb != xyes; then
echo " *******************************************************"
echo " *** You don't have the kcddb headers on your system"
echo " *** Support for fetching CDDB info is disabled"
echo " *******************************************************"
echo ""
fi
if test x$kcal != xyes; then
echo " *******************************************************"
echo " *** You don't have the kcal headers on your system"
echo " *** Support for interacting with KOrganizer is disabled"
echo " *******************************************************"
echo ""
fi
if test x$have_exempi != xyes; then
echo " *******************************************************"
echo " *** You don't have the exempi headers on your system"
echo " *** Support for importing some PDF metadata is disabled"
echo " *******************************************************"
echo ""
fi
if test x$have_poppler != xyes; then
echo " *******************************************************"
echo " *** You don't have the poppler headers on your system"
echo " *** Support for searching inside PDF files is disabled"
echo " *******************************************************"
echo ""
fi
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
# And if so, warn when they don't match
if test "$kde_libs_prefix" != "$given_prefix"; then
echo ""
echo "Warning: you chose to install this package in $given_prefix,"
echo "but KDE was found in $kde_libs_prefix."
echo "For this to work, you will need to tell KDE about the new prefix,"
echo "by ensuring that TDEDIRS contains it, e.g."
echo " export TDEDIRS=$given_prefix:$kde_libs_prefix"
echo "Then restart KDE."
echo ""
fi
fi
if test "$all_tests" = "bad"; then
if test ! "$cache_file" = "/dev/null"; then
echo ""
echo "Please remove the file $cache_file after changing your setup"
echo "so that configure will find the changes next time."
echo ""
fi
else
echo ""
echo "Good - your configure finished. Start make now"
echo ""
fi

@ -235,10 +235,10 @@ static const int CollectionInterface_fhash = 11;
static const char* const CollectionInterface_ftable[9][3] = { static const char* const CollectionInterface_ftable[9][3] = {
{ "long", "addEntry()", "addEntry()" }, { "long", "addEntry()", "addEntry()" },
{ "bool", "removeEntry(long)", "removeEntry(long entryID)" }, { "bool", "removeEntry(long)", "removeEntry(long entryID)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "values(TQString)", "values(TQString fieldName)" }, { "TQStringList", "values(TQString)", "values(TQString fieldName)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "values(long,TQString)", "values(long entryID,TQString fieldName)" }, { "TQStringList", "values(long,TQString)", "values(long entryID,TQString fieldName)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "bibtexKeys()", "bibtexKeys()" }, { "TQStringList", "bibtexKeys()", "bibtexKeys()" },
{ TQSTRING_OBJECT_NAME_STRING, "bibtexKey(long)", "bibtexKey(long entryID)" }, { "TQString", "bibtexKey(long)", "bibtexKey(long entryID)" },
{ "bool", "setFieldValue(long,TQString,TQString)", "setFieldValue(long entryID,TQString fieldName,TQString value)" }, { "bool", "setFieldValue(long,TQString,TQString)", "setFieldValue(long entryID,TQString fieldName,TQString value)" },
{ "bool", "addFieldValue(long,TQString,TQString)", "addFieldValue(long entryID,TQString fieldName,TQString value)" }, { "bool", "addFieldValue(long,TQString,TQString)", "addFieldValue(long entryID,TQString fieldName,TQString value)" },
{ 0, 0, 0 } { 0, 0, 0 }

@ -2,7 +2,7 @@ noinst_LIBRARIES = libnewstuff.a
libnewstuff_a_METASOURCES = AUTO libnewstuff_a_METASOURCES = AUTO
libnewstuff_a_SOURCES = manager.cpp dialog.cpp newscript.cpp providerloader.cpp libnewstuff_a_SOURCES = manager.cpp dialog.cpp newscript.cpp
CLEANFILES = *~ CLEANFILES = *~

@ -1,6 +1,9 @@
/*************************************************************************** /***************************************************************************
copyright : (C) 2006 by Robby Stephenson copyright : (C) 2006 by Robby Stephenson
email : robby@periapsis.org email : robby@periapsis.org
Copyright (c) 2014 Timothy Pearson <kb9vqf@pearsoncomputing.net>
***************************************************************************/ ***************************************************************************/
/*************************************************************************** /***************************************************************************
@ -12,7 +15,6 @@
***************************************************************************/ ***************************************************************************/
#include "dialog.h" #include "dialog.h"
#include "providerloader.h"
#include "../gui/listview.h" #include "../gui/listview.h"
#include "../latin1literal.h" #include "../latin1literal.h"
#include "../tellico_utils.h" #include "../tellico_utils.h"
@ -50,6 +52,9 @@
#define ENTRYEMAIL(e) TQString() #define ENTRYEMAIL(e) TQString()
#endif #endif
#define OPENDESKTOP_REDIRECT_URL "opendesktop.org/content/download.php?content="
#define OPENDESKTOP_REDIRECT_TEXT "If the download does not start in 3 seconds:</span><span class=\"defaulttext\">&nbsp;<a href=\""
namespace { namespace {
static const int NEW_STUFF_MIN_WIDTH = 600; static const int NEW_STUFF_MIN_WIDTH = 600;
static const int NEW_STUFF_MIN_HEIGHT = 400; static const int NEW_STUFF_MIN_HEIGHT = 400;
@ -223,10 +228,10 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
setStatus(i18n("Downloading information...")); setStatus(i18n("Downloading information..."));
ProviderLoader* loader = new Tellico::NewStuff::ProviderLoader(this); KNS::ProviderLoader* loader = new KNS::ProviderLoader(this);
connect(loader, TQT_SIGNAL(providersLoaded(TQPtrList<KNS::Provider>*)), TQT_SLOT(slotProviders(TQPtrList<KNS::Provider>*))); connect(loader, TQT_SIGNAL(providersLoaded(Provider::List*)), this, TQT_SLOT(slotProviders(Provider::List*)));
connect(loader, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)), TQT_SLOT(slotShowPercent(TDEIO::Job*, unsigned long))); connect(loader, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)), this, TQT_SLOT(slotShowPercent(TDEIO::Job*, unsigned long)));
connect(loader, TQT_SIGNAL(error()), TQT_SLOT(slotProviderError())); connect(loader, TQT_SIGNAL(error()), this, TQT_SLOT(slotProviderError()));
TDEConfigGroup config(TDEGlobal::config(), "TDENewStuff"); TDEConfigGroup config(TDEGlobal::config(), "TDENewStuff");
TQString prov = config.readEntry("ProvidersUrl"); TQString prov = config.readEntry("ProvidersUrl");
@ -262,7 +267,7 @@ void Dialog::slotProviderError() {
} }
} }
void Dialog::slotProviders(TQPtrList<KNS::Provider>* list_) { void Dialog::slotProviders(Provider::List* list_) {
for(KNS::Provider* prov = list_->first(); prov; prov = list_->next()) { for(KNS::Provider* prov = list_->first(); prov; prov = list_->next()) {
TDEIO::TransferJob* job = TDEIO::get(prov->downloadUrl()); TDEIO::TransferJob* job = TDEIO::get(prov->downloadUrl());
m_jobs[job] = prov; m_jobs[job] = prov;
@ -296,14 +301,25 @@ void Dialog::slotResult(TDEIO::Job* job_) {
} }
TQDomElement tdenewstuff = dom.documentElement(); TQDomElement tdenewstuff = dom.documentElement();
TQDomElement content;
for(TQDomNode pn = tdenewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling())
{
TQDomElement stuff = pn.toElement();
if(stuff.tagName() == "data")
{
content = pn.toElement();
}
}
for(TQDomNode pn = tdenewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling()) { for(TQDomNode pn = content.firstChild(); !pn.isNull(); pn = pn.nextSibling()) {
TQDomElement stuff = pn.toElement(); TQDomElement stuff = pn.toElement();
if(stuff.isNull()) { if(stuff.isNull()) {
continue; continue;
} }
if(stuff.tagName() == Latin1Literal("stuff")) { if(stuff.tagName() == Latin1Literal("content")) {
KNS::Entry* entry = new KNS::Entry(stuff); KNS::Entry* entry = new KNS::Entry(stuff);
if(!entry->type().isEmpty() && entry->type() != m_typeName) { if(!entry->type().isEmpty() && entry->type() != m_typeName) {
myLog() << "NewStuff::Dialog::slotResult() - type mismatch, skipping " << ENTRYNAME(entry) << endl; myLog() << "NewStuff::Dialog::slotResult() - type mismatch, skipping " << ENTRYNAME(entry) << endl;
@ -408,11 +424,78 @@ void Dialog::slotInstall() {
m_progress->show(); m_progress->show();
m_timer->start(100); m_timer->start(100);
connect(m_manager, TQT_SIGNAL(signalInstalled(KNS::Entry*)), TQT_SLOT(slotDoneInstall(KNS::Entry*))); connect(m_manager, TQT_SIGNAL(signalInstalled(KNS::Entry*)), TQT_SLOT(slotDoneInstall(KNS::Entry*)));
m_manager->install(m_type, entry); mJobEntry = entry;
// OpenDesktop.org broke the basic functionality of TDEHNS by forcing
// downloads though an advertising display page. This in turn forces
// the user to download and manually install the wallpaper, which
// is relatively complex and negates much of the benefit of TDEHNS.
// Therefore, if the download URL contains OPENDESKTOP_REDIRECT_URL
// then download the raw HTML page and extract the real download URL for use below.
// In the future we may want to figure out how to display unobtrusive ads
// during the download process, but OpenDesktop.org would need to add back
// in the direct download ability for this to even be considered.
if (entry->payload().url().contains(OPENDESKTOP_REDIRECT_URL)) {
TDEIO::TransferJob *job = TDEIO::get( KURL( entry->payload() ), false, false );
connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
TQT_SLOT( slotJobResult( TDEIO::Job * ) ) );
connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ),
TQT_SLOT( slotJobData( TDEIO::Job *, const TQByteArray & ) ) );
}
else {
slotInstallPhase2();
}
}
void Dialog::slotInstallPhase2() {
m_manager->install(m_type, mJobEntry);
delete m_cursorSaver; delete m_cursorSaver;
m_cursorSaver = 0; m_cursorSaver = 0;
} }
void Dialog::slotJobData( TDEIO::Job *, const TQByteArray &data )
{
kdDebug() << "DownloadDialog::slotJobData()" << endl;
if ( data.size() == 0 ) return;
TQCString str( data, data.size() + 1 );
mJobData.append( TQString::fromUtf8( str ) );
}
void Dialog::slotJobResult( TDEIO::Job *job )
{
if ( job->error() ) {
job->showErrorDialog( this );
slotInstallPhase2();
return;
}
// See previous note regarding OpenDesktop.org
if (mJobEntry->payload().url().contains(OPENDESKTOP_REDIRECT_URL)) {
int pos = mJobData.find("<a href=\"/CONTENT/content-files/");
if (pos >= 0) {
TQString realURL = mJobData.mid(pos);
realURL = realURL.mid(0, realURL.find("\">"));
realURL = realURL.mid(strlen("<a href=\""));
realURL = mJobEntry->payload().protocol() + "://opendesktop.org" + realURL;
mJobEntry->setPayload(realURL);
}
else if ((pos = mJobData.find(OPENDESKTOP_REDIRECT_TEXT)) > 0) {
pos = pos + strlen(OPENDESKTOP_REDIRECT_TEXT);
TQString realURL = mJobData.mid(pos);
realURL = realURL.mid(0, realURL.find("\">"));
mJobEntry->setPayload(realURL);
}
}
// Reset for next load
mJobData = TQString::null;
slotInstallPhase2();
}
void Dialog::slotDoneInstall(KNS::Entry* entry_) { void Dialog::slotDoneInstall(KNS::Entry* entry_) {
TQMap<TQListViewItem*, KNS::Entry*>::Iterator it; TQMap<TQListViewItem*, KNS::Entry*>::Iterator it;
for(it = m_entryMap.begin(); entry_ && it != m_entryMap.end(); ++it) { for(it = m_entryMap.begin(); entry_ && it != m_entryMap.end(); ++it) {

@ -1,6 +1,8 @@
/*************************************************************************** /***************************************************************************
copyright : (C) 2006 by Robby Stephenson copyright : (C) 2006 by Robby Stephenson
email : robby@periapsis.org email : robby@periapsis.org
Copyright (c) 2014 Timothy Pearson <kb9vqf@pearsoncomputing.net>
***************************************************************************/ ***************************************************************************/
/*************************************************************************** /***************************************************************************
@ -17,16 +19,13 @@
#include "manager.h" #include "manager.h"
#include <kdialogbase.h> #include <kdialogbase.h>
#include <tdenewstuff/provider.h>
class KPushButton; class KPushButton;
class KStatusBar; class KStatusBar;
namespace TDEIO { namespace TDEIO {
class Job; class Job;
} }
namespace KNS {
class Entry;
class Provider;
}
class TQProgressBar; class TQProgressBar;
class TQSplitter; class TQSplitter;
@ -39,7 +38,9 @@ namespace Tellico {
class CursorSaver; class CursorSaver;
} }
namespace NewStuff { using namespace KNS;
namespace NewStuff {
class Dialog : public KDialogBase { class Dialog : public KDialogBase {
Q_OBJECT Q_OBJECT
@ -52,15 +53,18 @@ public:
TQPtrList<DataSourceInfo> dataSourceInfo() const { return m_manager->dataSourceInfo(); } TQPtrList<DataSourceInfo> dataSourceInfo() const { return m_manager->dataSourceInfo(); }
private slots: private slots:
void slotProviders(TQPtrList<KNS::Provider>* list); void slotProviders(Provider::List* list);
void slotData(TDEIO::Job* job, const TQByteArray& data); void slotData(TDEIO::Job* job, const TQByteArray& data);
void slotResult(TDEIO::Job* job); void slotResult(TDEIO::Job* job);
void slotJobData( TDEIO::Job *, const TQByteArray & );
void slotJobResult( TDEIO::Job * );
void slotPreviewResult(TDEIO::Job* job); void slotPreviewResult(TDEIO::Job* job);
void slotShowPercent(TDEIO::Job* job, unsigned long percent); void slotShowPercent(TDEIO::Job* job, unsigned long percent);
void slotSelected(TQListViewItem* item); void slotSelected(TQListViewItem* item);
void slotInstall(); void slotInstall();
void slotInstallPhase2();
void slotDoneInstall(KNS::Entry* entry); void slotDoneInstall(KNS::Entry* entry);
void slotProviderError(); void slotProviderError();
@ -95,6 +99,9 @@ private:
TQMap<TQListViewItem*, KNS::Entry*> m_entryMap; TQMap<TQListViewItem*, KNS::Entry*> m_entryMap;
TQListViewItem* m_lastPreviewItem; TQListViewItem* m_lastPreviewItem;
KNS::Entry* mJobEntry;
TQString mJobData;
}; };
} }

@ -367,7 +367,12 @@ void Manager::slotDownloadJobResult(TDEIO::Job* job_) {
bool deleteTempFile = true; bool deleteTempFile = true;
if(type == EntryTemplate) { if(type == EntryTemplate) {
installTemplate(job->destURL(), entry->name()); if (installTemplate(job->destURL(), entry->name())) {
emit signalInstalled(entry);
}
else {
emit signalInstalled(0);
}
} else { } else {
#if KDE_IS_VERSION(3,3,90) #if KDE_IS_VERSION(3,3,90)
// needed so the GPG signature can be checked // needed so the GPG signature can be checked

@ -1,102 +0,0 @@
/***************************************************************************
copyright : (C) 2006 by Robby Stephenson
email : robby@periapsis.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License as *
* published by the Free Software Foundation; *
* *
***************************************************************************/
// this class is largely copied from tdelibs/tdenewstuff/provider.cpp
// which is Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
// and licensed under GPL v2, just like Tellico
#include "providerloader.h"
#include "../tellico_debug.h"
#include "../latin1literal.h"
#include <tdeio/job.h>
#include <tdenewstuff/provider.h>
#include <tdeglobal.h>
#include <tdeconfig.h>
#include <tdemessagebox.h>
#include <tdelocale.h>
#include <tqdom.h>
using Tellico::NewStuff::ProviderLoader;
ProviderLoader::ProviderLoader( TQWidget *parentWidget ) :
mParentWidget( parentWidget ), mTryAlt(true)
{
mProviders.setAutoDelete( true );
}
void ProviderLoader::load( const TQString &type, const TQString &providersList )
{
mProviders.clear();
mJobData.truncate(0);
// myLog() << "ProviderLoader::load(): providersList: " << providersList << endl;
TDEIO::TransferJob *job = TDEIO::get( KURL( providersList ), false, false );
connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
TQT_SLOT( slotJobResult( TDEIO::Job * ) ) );
connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ),
TQT_SLOT( slotJobData( TDEIO::Job *, const TQByteArray & ) ) );
connect( job, TQT_SIGNAL( percent (TDEIO::Job *, unsigned long) ),
TQT_SIGNAL( percent (TDEIO::Job *, unsigned long) ) );
// job->dumpObjectInfo();
}
void ProviderLoader::slotJobData( TDEIO::Job *, const TQByteArray &data )
{
if ( data.size() == 0 ) return;
TQCString str( data, data.size() + 1 );
mJobData.append( TQString::fromUtf8( str ) );
}
void ProviderLoader::slotJobResult( TDEIO::Job *job )
{
if ( job->error() ) {
job->showErrorDialog( mParentWidget );
if(mTryAlt && !mAltProvider.isEmpty()) {
mTryAlt = false;
load(TQString(), mAltProvider);
} else {
emit error();
}
return;
}
TQDomDocument doc;
if ( !doc.setContent( mJobData ) ) {
myDebug() << "ProviderLoader::slotJobResult() - error parsing providers list." << endl;
if(mTryAlt && !mAltProvider.isEmpty()) {
mTryAlt = false;
load(TQString(), mAltProvider);
} else {
emit error();
}
return;
}
TQDomElement providers = doc.documentElement();
TQDomNode n;
for ( n = providers.firstChild(); !n.isNull(); n = n.nextSibling() ) {
TQDomElement p = n.toElement();
if ( p.tagName() == Latin1Literal("provider") ) {
mProviders.append( new KNS::Provider( p ) );
}
}
emit providersLoaded( &mProviders );
}
#include "providerloader.moc"

@ -1,85 +0,0 @@
/***************************************************************************
copyright : (C) 2006 by Robby Stephenson
email : robby@periapsis.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License as *
* published by the Free Software Foundation; *
* *
***************************************************************************/
// this class is largely copied from tdelibs/tdenewstuff/provider.h
// which is Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
// and licensed under GPL v2, just like Tellico
//
// I want progress info for the download, and this was the
// easiest way to get it
#ifndef TELLICO_NEWSTUFF_PROVIDERLOADER_H
#define TELLICO_NEWSTUFF_PROVIDERLOADER_H
#include <tqobject.h>
#include <tqptrlist.h>
namespace TDEIO {
class Job;
}
namespace KNS {
class Provider;
}
namespace Tellico {
namespace NewStuff {
class ProviderLoader : public TQObject {
Q_OBJECT
public:
/**
* Constructor.
*
* @param parentWidget the parent widget
*/
ProviderLoader( TQWidget *parentWidget );
/**
* Starts asynchronously loading the list of providers of the
* specified type.
*
* @param type data type such as 'kdesktop/wallpaper'.
* @param providerList the URl to the list of providers; if empty
* we first try the ProvidersUrl from TDEGlobal::config, then we
* fall back to a hardcoded value.
*/
void load( const TQString &type, const TQString &providerList = TQString() );
void setAlternativeProvider(const TQString& alt) { mAltProvider = alt; }
signals:
/**
* Indicates that the list of providers has been successfully loaded.
*/
void providersLoaded( TQPtrList<KNS::Provider>* );
void percent(TDEIO::Job *job, unsigned long percent);
void error();
protected slots:
void slotJobData( TDEIO::Job *, const TQByteArray & );
void slotJobResult( TDEIO::Job * );
private:
TQWidget *mParentWidget;
TQString mJobData;
TQPtrList<KNS::Provider> mProviders;
TQString mAltProvider;
bool mTryAlt;
};
}
}
#endif
Loading…
Cancel
Save