From: Jürgen Vigna Date: Mon, 14 Aug 2000 15:17:54 +0000 (+0000) Subject: Added patches from John and applied some fixes. X-Git-Tag: 1.6.10~22039 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d6e574e17b751b74855fe7e52a43f67e763f0a14;p=features.git Added patches from John and applied some fixes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@968 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index 92b2bfc545..3db7996ac6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2000-08-14 Juergen Vigna + * src/frontends/kde/Dialogs.C (Dialogs): added missing dialogs. + + * config/kde.m4: addes some features + + * src/frontends/kde/Makefile.am (libkde_la_OBJADD): modified to + include missing xforms dialogs. + + * src/Timeout.h: a hack to be able to compile with qt/kde. + * sigc++/.cvsignore: added acinclude.m4 * lib/.cvsignore: added listerros diff --git a/config/kde.m4 b/config/kde.m4 index 624fab18a9..9dc24cf128 100644 --- a/config/kde.m4 +++ b/config/kde.m4 @@ -686,13 +686,33 @@ else kde_includes="" fi +AC_ARG_WITH(kde-dir, + [ --with-kde-dir where the KDE root is ], + [ + ac_kde_includes="$withval"/include + ac_kde_libraries="$withval"/lib + ]) + +AC_ARG_WITH(kde-includes, + [ --with-kde-includes where the KDE includes are. ], + [ + ac_kde_includes="$withval" + ]) + +AC_ARG_WITH(kde-libraries, + [ --with-kde-libraries where the KDE library is installed.], + [ + ac_kde_libraries="$withval" + ]) + AC_CACHE_VAL(ac_cv_have_kde, [#try to guess kde locations if test -z "$1"; then -kde_incdirs="$ac_kde_includes /usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes" +kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes" test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR $kde_incdirs" +kde_incdirs="$ac_kde_includes $kde_incdirs" AC_FIND_FILE(ksock.h, $kde_incdirs, kde_incdir) ac_kde_includes="$kde_incdir" @@ -702,8 +722,9 @@ in the prefix, you've chosen, are no kde headers installed. This will fail. So, check this please and use another prefix!]) fi -kde_libdirs="$ac_kde_libraries /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde/lib /usr/X11R6/kde/lib" +kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde/lib /usr/X11R6/kde/lib" test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs" +kde_libdirs="$ac_kde_libraries $kde_libdirs" AC_FIND_FILE(libkdecore.la, $kde_libdirs, kde_libdir) ac_kde_libraries="$kde_libdir" @@ -712,7 +733,6 @@ AC_MSG_ERROR([ in the prefix, you've chosen $ac_kde_libraries, are no kde libraries installed. This will fail. So, check this please and use another prefix!]) fi -ac_kde_libraries="$kde_libdir" if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then ac_cv_have_kde="have_kde=no" @@ -775,62 +795,11 @@ fi AC_SUBST(KDE_LDFLAGS) AC_SUBST(KDE_INCLUDES) -KDE_CHECK_EXTRA_LIBS - AC_SUBST(all_includes) AC_SUBST(all_libraries) ]) -AC_DEFUN(KDE_CHECK_EXTRA_LIBS, -[ -AC_MSG_CHECKING(for extra includes) -AC_ARG_WITH(extra-includes, [ --with-extra-includes adds non standard include paths], - kde_use_extra_includes="$withval", - kde_use_extra_includes=NONE -) -if test -n "$kde_use_extra_includes" && \ - test "$kde_use_extra_includes" != "NONE"; then - - ac_save_ifs=$IFS - IFS=':' - for dir in $kde_use_extra_includes; do - all_includes="$all_includes -I$dir" - USER_INCLUDES="$USER_INCLUDES -I$dir" - done - IFS=$ac_save_ifs - kde_use_extra_includes="added" -else - kde_use_extra_includes="no" -fi - -AC_MSG_RESULT($kde_use_extra_includes) - -AC_MSG_CHECKING(for extra libs) -AC_ARG_WITH(extra-libs, [ --with-extra-libs adds non standard library paths], - kde_use_extra_libs=$withval, - kde_use_extra_libs=NONE -) -if test -n "$kde_use_extra_libs" && \ - test "$kde_use_extra_libs" != "NONE"; then - - ac_save_ifs=$IFS - IFS=':' - for dir in $kde_use_extra_libs; do - all_libraries="$all_libraries -L$dir" - KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -rpath $dir" - USER_LDFLAGS="$USER_LDFLAGS -L$dir" - done - IFS=$ac_save_ifs - kde_use_extra_libs="added" -else - kde_use_extra_libs="no" -fi - -AC_MSG_RESULT($kde_use_extra_libs) - -]) - AC_DEFUN(KDE_CHECK_KIMGIO, [ AC_REQUIRE([AC_FIND_TIFF]) @@ -1420,7 +1389,6 @@ AC_DEFUN(KDE_DO_IT_ALL, [ AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) KDE_PROG_LIBTOOL -AM_KDE_WITH_NLS AC_PATH_KDE ]) @@ -1450,52 +1418,6 @@ AC_SUBST(KDE_RPATH) AC_MSG_RESULT($USE_RPATH) ]) -dnl This is a merge of some macros out of the gettext aclocal.m4 -dnl since we don't need anything, I took the things we need -AC_DEFUN(AM_KDE_WITH_NLS, - [AC_MSG_CHECKING([whether NLS is requested]) - AC_LANG_CPLUSPLUS - 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) - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS) - - AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt, - [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - - if test -z "`$MSGFMT --version 2>&1 | grep 'GNU gettext'`"; then - AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it]) - msgfmt=":" - fi - AC_SUBST(MSGFMT) - - AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - AC_SUBST(XGETTEXT) - fi - - ]) - # Search path for a program which passes the given test. # Ulrich Drepper , 1996. @@ -1586,7 +1508,6 @@ AC_DEFUN(AM_KDE_GNU_GETTEXT, AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([AM_KDE_WITH_NLS])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h alloca.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ diff --git a/po/POTFILES.in b/po/POTFILES.in index b59f6b666e..18e7c4644c 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -27,6 +27,7 @@ src/filedlg.C src/FontLoader.C src/form1.C src/frontends/gnome/FormPrint.C +src/frontends/kde/FormCopyright.C src/frontends/xforms/FormCitation.C src/frontends/xforms/form_citation.C src/frontends/xforms/FormCopyright.C diff --git a/src/Timeout.h b/src/Timeout.h index 178aed8d41..3233b72e92 100644 --- a/src/Timeout.h +++ b/src/Timeout.h @@ -12,11 +12,20 @@ #ifndef TIMEOUT_H #define TIMEOUT_H +#include + #ifdef __GNUG__ #pragma interface #endif #include +/* ugly hack to prevent Qt's '#define emit ...' from + * screwing us up below - jbl 2000/8/10 + */ +#ifdef KDEGUI +#undef emit +#endif + #ifdef SIGC_CXX_NAMESPACES using SigC::Signal0; diff --git a/src/frontends/Makefile.am b/src/frontends/Makefile.am index eae524cab1..82b65b4092 100644 --- a/src/frontends/Makefile.am +++ b/src/frontends/Makefile.am @@ -6,7 +6,7 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in # here. SUBDIRS = xforms @FRONTEND@ ETAGS_ARGS = --lang=c++ -INCLUDES = ${FRONTEND_INCLUDES} -I${srcdir}/.. -I${srcdir}/@FRONTEND@ -I${srcdir}/xfroms ${SIGC_CFLAGS} +INCLUDES = ${FRONTEND_INCLUDES} -I${srcdir}/.. -I${srcdir}/@FRONTEND@ -I${srcdir}/xforms ${SIGC_CFLAGS} LIBS = noinst_LTLIBRARIES = libfrontends.la libfrontends_la_SOURCES=\ diff --git a/src/frontends/kde/.cvsignore b/src/frontends/kde/.cvsignore index 5f7bf56cca..1e006fafea 100644 --- a/src/frontends/kde/.cvsignore +++ b/src/frontends/kde/.cvsignore @@ -4,3 +4,4 @@ Makefile *.lo .libs libkde.la +*moc.C diff --git a/src/frontends/kde/Dialogs.C b/src/frontends/kde/Dialogs.C index e785c3e47c..e388e3f1b6 100644 --- a/src/frontends/kde/Dialogs.C +++ b/src/frontends/kde/Dialogs.C @@ -1,8 +1,18 @@ #include +#include FORMS_H_LOCATION #include "Dialogs.h" +#include "FormCitation.h" #include "FormCopyright.h" - +#include "FormDocument.h" +#include "FormGraphics.h" +#include "FormIndex.h" +#include "FormPreferences.h" +#include "FormPrint.h" +#include "FormRef.h" +#include "FormTabular.h" +#include "FormToc.h" +#include "FormUrl.h" #ifdef __GNUG__ #pragma implementation @@ -11,7 +21,17 @@ Dialogs::Dialogs(LyXView * lv) { + dialogs_.push_back(new FormCitation(lv, this)); dialogs_.push_back(new FormCopyright(lv, this)); + dialogs_.push_back(new FormDocument(lv, this)); + dialogs_.push_back(new FormGraphics(lv, this)); + dialogs_.push_back(new FormIndex(lv, this)); + dialogs_.push_back(new FormPreferences(lv, this)); + dialogs_.push_back(new FormPrint(lv, this)); + dialogs_.push_back(new FormRef(lv, this)); + dialogs_.push_back(new FormTabular(lv, this)); + dialogs_.push_back(new FormToc(lv, this)); + dialogs_.push_back(new FormUrl(lv, this)); // reduce the number of connections needed in // dialogs by a simple connection here. diff --git a/src/frontends/kde/FormCopyright.C b/src/frontends/kde/FormCopyright.C index 1f1ca1a197..0711e1cbfd 100644 --- a/src/frontends/kde/FormCopyright.C +++ b/src/frontends/kde/FormCopyright.C @@ -15,18 +15,20 @@ * * ***************************************************************************/ +#include + +#include "Dialogs.h" #include "FormCopyright.h" #include "formcopyrightdialog.h" -#include "Dialogs.h" +#include "gettext.h" -FormCopyright::FormCopyright(LyXFunc *c, Dialogs *d) - : dialog_(0), lf_(c), d_(d), h_(0) +FormCopyright::FormCopyright(LyXView *v, Dialogs *d) + : dialog_(0), lv_(v), d_(d), h_(0) { // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. d->showCopyright.connect(slot(this, &FormCopyright::show)); - dialog_ = 0; } FormCopyright::~FormCopyright() @@ -37,7 +39,7 @@ FormCopyright::~FormCopyright() void FormCopyright::show() { if (!dialog_) - dialog_ = new FormCopyrightDialog(0, "Copyright and Warranty", + dialog_ = new FormCopyrightDialog(0, _("Copyright and Warranty"), false); if (!dialog_->isVisible()) h_ = d_->hideAll.connect(slot(this, &FormCopyright::hide)); diff --git a/src/frontends/kde/FormCopyright.h b/src/frontends/kde/FormCopyright.h index 359fa0822b..0aabe4ea74 100644 --- a/src/frontends/kde/FormCopyright.h +++ b/src/frontends/kde/FormCopyright.h @@ -19,18 +19,18 @@ #define FORMCOPYRIGHT_H #include "DialogBase.h" - +#include "support/utility.hpp" class Dialogs; -class LyXFunc; +class LyXView; class FormCopyrightDialog; /** @author Jürgen Vigna */ -class FormCopyright : public DialogBase { +class FormCopyright : public DialogBase, public noncopyable { public: - FormCopyright(LyXFunc *, Dialogs *); + FormCopyright(LyXView *, Dialogs *); ~FormCopyright(); private: @@ -47,13 +47,13 @@ private: We could modify Dialogs to have a visible LyXFunc* instead and save a couple of bytes per dialog. */ - LyXFunc * lf_; + LyXView * lv_; /** Which Dialogs do we belong to? Used so we can get at the signals we have to connect to. */ Dialogs * d_; /// Hide connection. - SigC::Connection h_; + Connection h_; }; #endif diff --git a/src/frontends/kde/Makefile.am b/src/frontends/kde/Makefile.am index 912a9028f8..22f15e5f6c 100644 --- a/src/frontends/kde/Makefile.am +++ b/src/frontends/kde/Makefile.am @@ -2,14 +2,41 @@ AUTOMAKE_OPTIONS = foreign 1.4 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in noinst_LTLIBRARIES = libkde.la INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \ - ${SIGC_CFLAGS} ${FRONTEND_INCLUDES} + ${SIGC_CFLAGS} ${FRONTEND_INCLUDES} -I${top_srcdir}/src/frontends/xforms # just to make sure, automake makes them BUILTSOURCES = formcopyrightdialog_moc.C DISTCLEANFILES = $(BUILTSOURCES) *.orig *.rej *~ *.bak core +libkde_la_OBJADD = \ + ../xforms/FormCitation.lo \ + ../xforms/form_citation.lo \ + ../xforms/FormCommand.lo \ + ../xforms/FormDocument.lo \ + ../xforms/form_document.lo \ + ../xforms/FormGraphics.lo \ + ../xforms/form_graphics.lo \ + ../xforms/FormIndex.lo \ + ../xforms/form_index.lo \ + ../xforms/FormPreferences.lo \ + ../xforms/form_preferences.lo \ + ../xforms/FormPrint.lo \ + ../xforms/form_print.lo \ + ../xforms/FormRef.lo \ + ../xforms/form_ref.lo \ + ../xforms/FormTabular.lo \ + ../xforms/form_tabular.lo \ + ../xforms/FormToc.lo \ + ../xforms/form_toc.lo \ + ../xforms/FormUrl.lo \ + ../xforms/form_url.lo \ + ../xforms/input_validators.lo \ + ../xforms/RadioButtonGroup.lo \ + ../xforms/Toolbar_pimpl.lo \ + ../xforms/Menubar_pimpl.lo + LIBS= -LDFLAGS= +LDFLAGS= $(libkde_la_OBJADD) LYXDATADIRS = dlg ETAGS_ARGS = --lang=c++ libkde_la_SOURCES = \