mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
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
This commit is contained in:
parent
c29851030b
commit
d6e574e17b
@ -1,5 +1,14 @@
|
||||
2000-08-14 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* 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
|
||||
|
125
config/kde.m4
125
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 <drepper@cygnus.com>, 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 \
|
||||
|
@ -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
|
||||
|
@ -12,11 +12,20 @@
|
||||
#ifndef TIMEOUT_H
|
||||
#define TIMEOUT_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
/* 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;
|
||||
|
@ -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=\
|
||||
|
@ -4,3 +4,4 @@ Makefile
|
||||
*.lo
|
||||
.libs
|
||||
libkde.la
|
||||
*moc.C
|
||||
|
@ -1,8 +1,18 @@
|
||||
#include <config.h>
|
||||
#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.
|
||||
|
@ -15,18 +15,20 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#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));
|
||||
|
@ -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
|
||||
|
@ -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 = \
|
||||
|
Loading…
Reference in New Issue
Block a user