Commit 61b45a8c authored by Yuri N. Sedunov's avatar Yuri N. Sedunov Committed by Girar Builder pender robot

3.0.1-alt1

- 3.0.1 - removed some upstreamed fedora patches
parent 8280c0ab
...@@ -2,4 +2,4 @@ copy: *.keys ...@@ -2,4 +2,4 @@ copy: *.keys
copy: *.mime copy: *.mime
copy: *.patch copy: *.patch
copy: *.xml copy: *.xml
tar.gz: abiword name=abiword-3.0.0 tar.gz: abiword name=abiword-3.0.1
commit e0e81e6c2d7f2478b9effc8476b62425ca2c12cd
Author: Hubert Figuière <hub@figuiere.net>
Date: Wed Oct 16 22:48:36 2013 -0400
Bug 13564 - Fix crash in abw to HTML conversion.
diff --git a/src/wp/impexp/xp/ie_exp_HTML_Listener.cpp b/src/wp/impexp/xp/ie_exp_HTML_Listener.cpp
index 86c57ec..b9dace1 100644
--- a/src/wp/impexp/xp/ie_exp_HTML_Listener.cpp
+++ b/src/wp/impexp/xp/ie_exp_HTML_Listener.cpp
@@ -2232,12 +2232,18 @@ void IE_Exp_HTML_Listener::_openList(PT_AttrPropIndex api, bool recursiveCall)
_openList(api, true);
}
}
-
- }else
+ }
+ else
{
- const gchar* szListStyle;
+ const gchar* szListStyle = NULL;
pAP->getProperty("list-style", szListStyle);
- bool isOrdered = g_ascii_strcasecmp(szListStyle, "Bullet List") != 0;
+ bool isOrdered = szListStyle
+ && (g_ascii_strcasecmp(szListStyle, "Bullet List") != 0);
+#ifdef DEBUG
+ if(!szListStyle) {
+ UT_DEBUGMSG(("***BUG*** szListStyle is NULL - http://bugzilla.abisource.com/show_bug.cgi?id=13564\n"));
+ }
+#endif
ListInfo info;
if (iCurrentLevel == 0)
{
commit f1d711aa84c95430319fd92ffbcb03df36e5e76e
Author: Hubert Figuière <hub@figuiere.net>
Date: Sat Feb 22 10:41:55 2014 -0500
Bug 13582 - Fix redraw region in custom widget.
Cherry-picked from trunk@33870 and reworked for 3.0.x
diff --git a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
index 4c8d23c..15d7a7d 100644
--- a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
+++ b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
@@ -520,7 +520,7 @@ void GR_UnixCairoGraphics::_beginPaint()
{
UT_ASSERT(ev->type == GDK_EXPOSE || ev->type == GDK_DAMAGE);
if (ev->type == GDK_EXPOSE || ev->type == GDK_DAMAGE)
- UT_ASSERT(ev->expose.window == m_pWin);
+ UT_ASSERT(ev->expose.window == m_pWin || ev->expose.window == gdk_window_get_effective_parent (m_pWin));
}
}
#endif
diff --git a/src/af/xap/gtk/xap_UnixCustomWidget.cpp b/src/af/xap/gtk/xap_UnixCustomWidget.cpp
index b0b7015..5150afe 100644
--- a/src/af/xap/gtk/xap_UnixCustomWidget.cpp
+++ b/src/af/xap/gtk/xap_UnixCustomWidget.cpp
@@ -45,16 +45,18 @@ void XAP_UnixCustomWidget::_fe::expose(XAP_UnixCustomWidget *self, GdkEventExpos
#endif
{
#if GTK_CHECK_VERSION(3,0,0)
- GdkEventExpose *ev = reinterpret_cast<GdkEventExpose *>(gtk_get_current_event());
-#endif
+ self->m_cr = cr;
+ double x1, y1, x2, y2;
+ cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
+
+ UT_Rect r(x1, y1, x2 - x1, y2 - y1);
+#else
UT_Rect r(
ev->area.x,
ev->area.y,
ev->area.width,
ev->area.height
);
-#if GTK_CHECK_VERSION(3,0,0)
- self->m_cr = cr;
#endif
self->draw(&r);
}
diff --git a/src/wp/main/gtk/libabiword.cpp b/src/wp/main/gtk/libabiword.cpp
index 7567a54..c4d8e12 100644
--- a/src/wp/main/gtk/libabiword.cpp
+++ b/src/wp/main/gtk/libabiword.cpp
@@ -30,8 +30,8 @@ static AP_UnixApp *_abiword_app = NULL;
/**
* libabiword_init:
- * @argc: (inout): argument count
- * @argv: (array length=argc) (inout) (allow-none): Commandline arguments
+ * @argc: argument count
+ * @argv: (array length=argc): Commandline arguments
*
* Initializes libabiword
*/
diff -up abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.cpp.nogcrypt abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.cpp
--- abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.cpp.nogcrypt 2014-04-22 22:28:24.589947888 +0200
+++ abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.cpp 2014-04-22 22:31:36.729898497 +0200
@@ -49,89 +49,7 @@ typedef boost::shared_ptr<asio::ip::tcp:
typedef boost::shared_ptr<gnutls_session_t> session_ptr_t;
typedef boost::shared_ptr< std::vector<char> > buffer_ptr_t;
-class mutex {
-public:
- mutex() {
-#ifdef WIN32
- repr = CreateMutex(0, FALSE, 0);
-#else
- pthread_mutex_init(&repr, NULL);
-#endif
- }
-
- void lock() {
-#ifdef WIN32
- WaitForSingleObject(repr, INFINITE);
-#else
- pthread_mutex_lock(&repr);
-#endif
- }
-
- void unlock() {
-#ifdef WIN32
- ReleaseMutex(repr);
-#else
- pthread_mutex_unlock(&repr);
-#endif
- }
-
- ~mutex()
- {
-#ifdef WIN32
- CloseHandle(repr);
-#else
- pthread_mutex_destroy(&repr);
-#endif
- }
-
-private:
- mutex( const mutex& );
- const mutex& operator=( const mutex& );
-
-#ifdef WIN32
- HANDLE repr;
-#else
- pthread_mutex_t repr;
-#endif
-};
-
-static int gcry_tunnel_mutex_init(void **priv)
-{
- if (!priv)
- return -1;
- *priv = new mutex();
- return 0;
-}
-
-static int gcry_tunnel_mutex_destroy(void **priv)
-{
- if (!priv || !*priv)
- return -1;
- delete reinterpret_cast<mutex*>(*priv);
- return 0;
-}
-
-static int gcry_tunnel_mutex_lock(void **priv)
-{
- reinterpret_cast<mutex*>(*priv)->lock();
- return 0;
-}
-
-static int gcry_tunnel_mutex_unlock(void **priv)
-{
- reinterpret_cast<mutex*>(*priv)->unlock();
- return 0;
-}
-
-static struct gcry_thread_cbs gcry_threads_tunnel =
-{ GCRY_THREAD_OPTION_USER, NULL,
- gcry_tunnel_mutex_init, gcry_tunnel_mutex_destroy,
- gcry_tunnel_mutex_lock, gcry_tunnel_mutex_unlock,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
-
bool Proxy::tls_tunnel_init() {
- if (gcry_control(GCRYCTL_SET_THREAD_CBS, &tls_tunnel::gcry_threads_tunnel) != 0)
- return false;
if (gnutls_global_init() != 0)
return false;
return true;
diff -up abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.h.nogcrypt abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.h
--- abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.h.nogcrypt 2012-05-25 18:12:56.000000000 +0200
+++ abiword-3.0.0/plugins/collab/backends/service/xp/tls_tunnel.h 2014-04-22 22:32:49.534292862 +0200
@@ -40,7 +40,6 @@
typedef long ssize_t;
typedef int pid_t;
#endif
-#include <gcrypt.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
From ca0495e8c69c53dca85f06ea1f4b063c57717a2b Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 27 May 2014 18:56:38 +0200
Subject: [PATCH] fix build on F-20
---
src/text/ptbl/xp/pd_DocumentRDF.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/text/ptbl/xp/pd_DocumentRDF.cpp b/src/text/ptbl/xp/pd_DocumentRDF.cpp
index 87b372e..798e262 100644
--- a/src/text/ptbl/xp/pd_DocumentRDF.cpp
+++ b/src/text/ptbl/xp/pd_DocumentRDF.cpp
@@ -1884,7 +1884,7 @@ PD_RDFContact::className() const
#ifdef WITH_EVOLUTION_DATA_SERVER
extern "C" {
- #include <libebook/e-book.h>
+ #include <libebook/libebook.h>
};
static std::string get( EVCard* c, const char* v )
--
1.9.3
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
%def_with python %def_with python
Name: %_name-%abi_ver Name: %_name-%abi_ver
Version: %ver_major.0 Version: %ver_major.1
Release: alt7 Release: alt1
Summary: Lean and fast full-featured word processor Summary: Lean and fast full-featured word processor
Group: Office Group: Office
...@@ -20,9 +20,6 @@ License: GPL ...@@ -20,9 +20,6 @@ License: GPL
Url: http://www.abisource.com/ Url: http://www.abisource.com/
Source: http://www.abisource.com/downloads/abiword/%version/source/%_name-%version.tar.gz Source: http://www.abisource.com/downloads/abiword/%version/source/%_name-%version.tar.gz
# http://bugzilla.abisource.com/show_bug.cgi?id=13564
Patch: abiword-3.0-up-13564.patch
Patch2: abiword-boost54.patch
#fedora patches #fedora patches
Source11: abiword.mime Source11: abiword.mime
...@@ -31,11 +28,7 @@ Source13: abiword.xml ...@@ -31,11 +28,7 @@ Source13: abiword.xml
Patch11: abiword-2.8.3-desktop.patch Patch11: abiword-2.8.3-desktop.patch
Patch12: abiword-2.6.0-boolean.patch Patch12: abiword-2.6.0-boolean.patch
Patch13: abiword-3.0.0-fixintrospection.patch
Patch14: abiword-3.0.0-fix-redraw.patch
Patch15: abiword-3.0.0-gnutls-no-libgcrypt.patch
Patch16: abiword-3.0.0-librevenge.patch Patch16: abiword-3.0.0-librevenge.patch
Patch17: abiword-3.0.0-libebook.patch
Patch18: abiword-3.0.0-link-grammar-5.patch Patch18: abiword-3.0.0-link-grammar-5.patch
Patch19: abiword-3.0.0-link-grammar-5-second.patch Patch19: abiword-3.0.0-link-grammar-5-second.patch
...@@ -49,6 +42,7 @@ BuildRequires: libgtk+3-devel librsvg-devel libfribidi-devel libredland-devel li ...@@ -49,6 +42,7 @@ BuildRequires: libgtk+3-devel librsvg-devel libfribidi-devel libredland-devel li
BuildRequires: liblink-grammar-devel libgsf-devel bzlib-devel zlib-devel libjpeg-devel libpng-devel libxslt-devel BuildRequires: liblink-grammar-devel libgsf-devel bzlib-devel zlib-devel libjpeg-devel libpng-devel libxslt-devel
BuildRequires: libwv-devel libwpd10-devel libwpg-devel libwmf-devel libexpat-devel BuildRequires: libwv-devel libwpd10-devel libwpg-devel libwmf-devel libexpat-devel
BuildRequires: telepathy-glib-devel libdbus-glib-devel libgnutls-devel libsoup-devel libgcrypt-devel BuildRequires: telepathy-glib-devel libdbus-glib-devel libgnutls-devel libsoup-devel libgcrypt-devel
#BuildRequires: libaiksaurus-devel
%{?_enable_spell:BuildRequires: libenchant-devel} %{?_enable_spell:BuildRequires: libenchant-devel}
%{?_with_goffice:BuildRequires: libgnomeoffice0.10-devel} %{?_with_goffice:BuildRequires: libgnomeoffice0.10-devel}
%{?_with_champlain:BuildRequires: libchamplain-gtk3-devel} %{?_with_champlain:BuildRequires: libchamplain-gtk3-devel}
...@@ -122,32 +116,15 @@ Python bindings for developing with AbiWord library ...@@ -122,32 +116,15 @@ Python bindings for developing with AbiWord library
%prep %prep
%setup -n %_name-%version %setup -n %_name-%version
%patch -p1
%patch2 -p1
# fedora patches # fedora patches
%patch11 -p1 -b .desktop %patch11 -p1 -b .desktop
%patch12 -p1 -b .boolean %patch12 -p1 -b .boolean
%patch13 -p1 -b .introspection
%patch14 -p1 -b .redraw
%patch15 -p1 -b .nogcrypt
%patch16 -p0 -b .librevenge %patch16 -p0 -b .librevenge
%patch17 -p1 -b .libebook
%patch18 -p1 -b .link-grammar-5 %patch18 -p1 -b .link-grammar-5
%patch19 -p1 -b .link-grammar-5-second %patch19 -p1 -b .link-grammar-5-second
%build %build
find plugins -name Makefile.am | sed 's|.am$||g' > plugin-makefiles.m4
(cd ./plugins && find . -maxdepth 1 -type d | grep -v '^\.$' | grep -v '\./\.' | sed 's|\./||g' | xargs echo) > plugin-list.m4
(for plugin in `cat plugin-list.m4`; do
u=`echo $plugin | tr '[:lower:]' '[:upper:]'`
echo 'AM_CONDITIONAL(['$u'_BUILTIN], test "$enable_'$plugin'_builtin" = "yes")'
done) > plugin-builtin.m4
find plugins -name plugin.m4 | xargs cat > plugin-configure.m4
for f in ` find ./plugins -name '*.m4' | grep -v 'plugin\.m4'`; do
ln -sf $f
done
%autoreconf %autoreconf
%configure \ %configure \
--enable-print \ --enable-print \
...@@ -204,6 +181,10 @@ install -p -m 0644 -D %SOURCE13 %buildroot%_datadir/mime/packages/abiword.xml ...@@ -204,6 +181,10 @@ install -p -m 0644 -D %SOURCE13 %buildroot%_datadir/mime/packages/abiword.xml
%python_sitelibdir/gi/overrides/* %python_sitelibdir/gi/overrides/*
%changelog %changelog
* Sat Jan 17 2015 Yuri N. Sedunov <aris@altlinux.org> 3.0.1-alt1
- 3.0.1
- removed some upstreamed fedora patches
* Tue Dec 02 2014 Yuri N. Sedunov <aris@altlinux.org> 3.0.0-alt7 * Tue Dec 02 2014 Yuri N. Sedunov <aris@altlinux.org> 3.0.0-alt7
- updated fedora patches for link-grammar-5 support - updated fedora patches for link-grammar-5 support
......
Last-Update: 2014-02-05
Forwarded: yes
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Bug-Debian: http://bugs.debian.org/737551
Bug-Abiword: http://bugzilla.abisource.com/13602
Description: fix FTBFS with libboost1.54-dev
--- a/plugins/collab/core/sync/xp/SynchronizedQueue.h
+++ b/plugins/collab/core/sync/xp/SynchronizedQueue.h
@@ -21,8 +21,9 @@
#include <deque>
#include <boost/bind.hpp>
#include <boost/function.hpp>
+#include <boost/noncopyable.hpp>
#include <sync/xp/lock.h>
#include <sync/xp/Synchronizer.h>
class EmptyQueueException {};
--- a/plugins/collab/backends/tcp/xp/Session.h
+++ b/plugins/collab/backends/tcp/xp/Session.h
@@ -21,8 +21,9 @@
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/enable_shared_from_this.hpp>
+#include <boost/noncopyable.hpp>
#include <deque>
#include <sync/xp/lock.h>
#include <sync/xp/Synchronizer.h>
...@@ -12,8 +12,8 @@ without warranty of any kind. ...@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation Basic Installation
================== ==================
Briefly, the shell commands `./configure; make; make install' should Briefly, the shell command `./configure && make && make install'
configure, build, and install this package. The following should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented `INSTALL' file but do not implement all of the features documented
......
ACLOCAL_AMFLAGS = -I . ACLOCAL_AMFLAGS = -I .
DIST_SUBDIRS = goffice-bits goffice-bits2 src plugins po user DIST_SUBDIRS = goffice-bits goffice-bits2 src plugins po user icons tools
if WITH_GOFFICE_BUILTIN if WITH_GOFFICE_BUILTIN
...@@ -14,7 +14,7 @@ endif ...@@ -14,7 +14,7 @@ endif
else else
SUBDIRS = SUBDIRS =
endif endif
SUBDIRS += src plugins po user SUBDIRS += src plugins po user icons
if TOOLKIT_GTK_ALL if TOOLKIT_GTK_ALL
...@@ -33,15 +33,14 @@ dist_man1_MANS = abiword.1 ...@@ -33,15 +33,14 @@ dist_man1_MANS = abiword.1
endif endif
if TOOLKIT_GTK if TOOLKIT_GTK
# we disable introspection for distcheck as it fails because of
# installation needing sudo
DISTCHECK_CONFIGURE_FLAGS = \ DISTCHECK_CONFIGURE_FLAGS = \
--enable-introspection=auto \ --enable-introspection=no \
--with-gir-dir=\$${datadir}/gir-1.0 \ --with-gir-dir=\$${datadir}/gir-1.0 \
--with-typelib-dir=\$${libdir}/girepository-1.0 --with-typelib-dir=\$${libdir}/girepository-1.0
endif endif
icondir= $(ABIWORD_ICONDIR)
icon_DATA = abiword.png
EXTRA_DIST = \ EXTRA_DIST = \
AUTHORS \ AUTHORS \
BiDiReadme.txt \ BiDiReadme.txt \
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -86,8 +86,8 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ ...@@ -86,8 +86,8 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(top_srcdir)/src/wp/ap/gtk/hildon/abiword.desktop.in \ $(top_srcdir)/src/wp/ap/gtk/hildon/abiword.desktop.in \
$(top_srcdir)/src/wp/ap/gtk/hildon/com.abisource.abiword.service.in \ $(top_srcdir)/src/wp/ap/gtk/hildon/com.abisource.abiword.service.in \
$(top_srcdir)/src/wp/main/cocoa/bundle/Info.plist.in \ $(top_srcdir)/src/wp/main/cocoa/bundle/Info.plist.in \
$(dist_man1_MANS) COPYING config.guess config.sub install-sh \ $(dist_man1_MANS) COPYING compile config.guess config.sub \
missing ltmain.sh install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libgcrypt.m4 \ am__aclocal_m4_deps = $(top_srcdir)/libgcrypt.m4 \
$(top_srcdir)/libtool.m4 $(top_srcdir)/ltoptions.m4 \ $(top_srcdir)/libtool.m4 $(top_srcdir)/ltoptions.m4 \
...@@ -163,11 +163,10 @@ am__uninstall_files_from_dir = { \ ...@@ -163,11 +163,10 @@ am__uninstall_files_from_dir = { \
} }
man1dir = $(mandir)/man1 man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" \ am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" \
"$(DESTDIR)$(icondir)" "$(DESTDIR)$(mimedir)" \ "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(pkgconfigdir)"
"$(DESTDIR)$(pkgconfigdir)"
NROFF = nroff NROFF = nroff
MANS = $(dist_man1_MANS) MANS = $(dist_man1_MANS)
DATA = $(desktop_DATA) $(icon_DATA) $(mime_DATA) $(pkgconfig_DATA) DATA = $(desktop_DATA) $(mime_DATA) $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive distclean-recursive maintainer-clean-recursive
am__recursive_targets = \ am__recursive_targets = \
...@@ -256,8 +255,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -256,8 +255,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
...@@ -545,14 +542,14 @@ top_build_prefix = @top_build_prefix@ ...@@ -545,14 +542,14 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I . ACLOCAL_AMFLAGS = -I .
DIST_SUBDIRS = goffice-bits goffice-bits2 src plugins po user DIST_SUBDIRS = goffice-bits goffice-bits2 src plugins po user icons tools
@TOOLKIT_GTK2_FALSE@@WITH_GOFFICE_BUILTIN_TRUE@SUBDIRS = goffice-bits \ @TOOLKIT_GTK2_FALSE@@WITH_GOFFICE_BUILTIN_TRUE@SUBDIRS = goffice-bits \
@TOOLKIT_GTK2_FALSE@@WITH_GOFFICE_BUILTIN_TRUE@ src plugins po \ @TOOLKIT_GTK2_FALSE@@WITH_GOFFICE_BUILTIN_TRUE@ src plugins po \
@TOOLKIT_GTK2_FALSE@@WITH_GOFFICE_BUILTIN_TRUE@ user @TOOLKIT_GTK2_FALSE@@WITH_GOFFICE_BUILTIN_TRUE@ user icons
@TOOLKIT_GTK2_TRUE@@WITH_GOFFICE_BUILTIN_TRUE@SUBDIRS = goffice-bits2 \ @TOOLKIT_GTK2_TRUE@@WITH_GOFFICE_BUILTIN_TRUE@SUBDIRS = goffice-bits2 \
@TOOLKIT_GTK2_TRUE@@WITH_GOFFICE_BUILTIN_TRUE@ src plugins po \ @TOOLKIT_GTK2_TRUE@@WITH_GOFFICE_BUILTIN_TRUE@ src plugins po \
@TOOLKIT_GTK2_TRUE@@WITH_GOFFICE_BUILTIN_TRUE@ user @TOOLKIT_GTK2_TRUE@@WITH_GOFFICE_BUILTIN_TRUE@ user icons
@WITH_GOFFICE_BUILTIN_FALSE@SUBDIRS = src plugins po user @WITH_GOFFICE_BUILTIN_FALSE@SUBDIRS = src plugins po user icons
@EMBEDDED_HILDON_FALSE@@TOOLKIT_GTK_ALL_TRUE@desktopdir = $(datadir)/applications @EMBEDDED_HILDON_FALSE@@TOOLKIT_GTK_ALL_TRUE@desktopdir = $(datadir)/applications
@EMBEDDED_HILDON_FALSE@@TOOLKIT_GTK_ALL_TRUE@desktop_DATA = abiword.desktop @EMBEDDED_HILDON_FALSE@@TOOLKIT_GTK_ALL_TRUE@desktop_DATA = abiword.desktop
@TOOLKIT_GTK_ALL_TRUE@mimedir = @ABIWORD_DATADIR@/mime-info @TOOLKIT_GTK_ALL_TRUE@mimedir = @ABIWORD_DATADIR@/mime-info
...@@ -560,13 +557,14 @@ DIST_SUBDIRS = goffice-bits goffice-bits2 src plugins po user ...@@ -560,13 +557,14 @@ DIST_SUBDIRS = goffice-bits goffice-bits2 src plugins po user
@TOOLKIT_GTK_ALL_TRUE@pkgconfigdir = $(libdir)/pkgconfig @TOOLKIT_GTK_ALL_TRUE@pkgconfigdir = $(libdir)/pkgconfig
@TOOLKIT_GTK_ALL_TRUE@pkgconfig_DATA = abiword-$(ABIWORD_SERIES).pc @TOOLKIT_GTK_ALL_TRUE@pkgconfig_DATA = abiword-$(ABIWORD_SERIES).pc
@TOOLKIT_GTK_ALL_TRUE@dist_man1_MANS = abiword.1 @TOOLKIT_GTK_ALL_TRUE@dist_man1_MANS = abiword.1
# we disable introspection for distcheck as it fails because of
# installation needing sudo
@TOOLKIT_GTK_TRUE@DISTCHECK_CONFIGURE_FLAGS = \ @TOOLKIT_GTK_TRUE@DISTCHECK_CONFIGURE_FLAGS = \
@TOOLKIT_GTK_TRUE@ --enable-introspection=auto \ @TOOLKIT_GTK_TRUE@ --enable-introspection=no \
@TOOLKIT_GTK_TRUE@ --with-gir-dir=\$${datadir}/gir-1.0 \ @TOOLKIT_GTK_TRUE@ --with-gir-dir=\$${datadir}/gir-1.0 \
@TOOLKIT_GTK_TRUE@ --with-typelib-dir=\$${libdir}/girepository-1.0 @TOOLKIT_GTK_TRUE@ --with-typelib-dir=\$${libdir}/girepository-1.0
icondir = $(ABIWORD_ICONDIR)
icon_DATA = abiword.png
EXTRA_DIST = \ EXTRA_DIST = \
AUTHORS \ AUTHORS \
BiDiReadme.txt \ BiDiReadme.txt \
...@@ -631,8 +629,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ...@@ -631,8 +629,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
config.h: stamp-h1 config.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi @test -f $@ || rm -f stamp-h1
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1 @rm -f stamp-h1
...@@ -723,27 +721,6 @@ uninstall-desktopDATA: ...@@ -723,27 +721,6 @@ uninstall-desktopDATA:
@list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir) dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir)
install-iconDATA: $(icon_DATA)
@$(NORMAL_INSTALL)
@list='$(icon_DATA)'; test -n "$(icondir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \
$(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \
fi; \
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)$(icondir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(icondir)" || exit $$?; \
done
uninstall-iconDATA:
@$(NORMAL_UNINSTALL)
@list='$(icon_DATA)'; test -n "$(icondir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(icondir)'; $(am__uninstall_files_from_dir)
install-mimeDATA: $(mime_DATA) install-mimeDATA: $(mime_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
@list='$(mime_DATA)'; test -n "$(mimedir)" || list=; \ @list='$(mime_DATA)'; test -n "$(mimedir)" || list=; \
...@@ -977,10 +954,16 @@ dist-xz: distdir ...@@ -977,10 +954,16 @@ dist-xz: distdir
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-shar: distdir dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
...@@ -1022,9 +1005,10 @@ distcheck: dist ...@@ -1022,9 +1005,10 @@ distcheck: dist
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \ && am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \ && $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \ && ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) check \
...@@ -1082,7 +1066,7 @@ check: check-recursive ...@@ -1082,7 +1066,7 @@ check: check-recursive
all-am: Makefile $(MANS) $(DATA) config.h all-am: Makefile $(MANS) $(DATA) config.h
installdirs: installdirs-recursive installdirs: installdirs-recursive
installdirs-am: installdirs-am:
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-recursive install: install-recursive
...@@ -1138,8 +1122,8 @@ info: info-recursive ...@@ -1138,8 +1122,8 @@ info: info-recursive
info-am: info-am:
install-data-am: install-desktopDATA install-iconDATA install-man \ install-data-am: install-desktopDATA install-man install-mimeDATA \
install-mimeDATA install-pkgconfigDATA install-pkgconfigDATA
install-dvi: install-dvi-recursive install-dvi: install-dvi-recursive
...@@ -1185,8 +1169,8 @@ ps: ps-recursive ...@@ -1185,8 +1169,8 @@ ps: ps-recursive
ps-am: ps-am:
uninstall-am: uninstall-desktopDATA uninstall-iconDATA uninstall-man \ uninstall-am: uninstall-desktopDATA uninstall-man uninstall-mimeDATA \
uninstall-mimeDATA uninstall-pkgconfigDATA uninstall-pkgconfigDATA
uninstall-man: uninstall-man1 uninstall-man: uninstall-man1
...@@ -1202,15 +1186,15 @@ uninstall-man: uninstall-man1 ...@@ -1202,15 +1186,15 @@ uninstall-man: uninstall-man1
dvi-am html html-am info info-am install install-am \ dvi-am html html-am info info-am install install-am \
install-data install-data-am install-desktopDATA install-dvi \ install-data install-data-am install-desktopDATA install-dvi \
install-dvi-am install-exec install-exec-am install-html \ install-dvi-am install-exec install-exec-am install-html \
install-html-am install-iconDATA install-info install-info-am \ install-html-am install-info install-info-am install-man \
install-man install-man1 install-mimeDATA install-pdf \ install-man1 install-mimeDATA install-pdf install-pdf-am \
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \
install-strip installcheck installcheck-am installdirs \ installcheck installcheck-am installdirs installdirs-am \
installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
ps ps-am tags tags-am uninstall uninstall-am \ tags tags-am uninstall uninstall-am uninstall-desktopDATA \
uninstall-desktopDATA uninstall-iconDATA uninstall-man \ uninstall-man uninstall-man1 uninstall-mimeDATA \
uninstall-man1 uninstall-mimeDATA uninstall-pkgconfigDATA uninstall-pkgconfigDATA
abiword-$(ABIWORD_SERIES).pc: libabiword.pc abiword-$(ABIWORD_SERIES).pc: libabiword.pc
......
# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
...@@ -220,6 +220,21 @@ m4_popdef([pkg_default]) ...@@ -220,6 +220,21 @@ m4_popdef([pkg_default])
m4_popdef([pkg_description]) m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR ]) dnl PKG_NOARCH_INSTALLDIR
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR
# Copyright (C) 2002-2013 Free Software Foundation, Inc. # Copyright (C) 2002-2013 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
...@@ -232,10 +247,10 @@ m4_popdef([pkg_description]) ...@@ -232,10 +247,10 @@ m4_popdef([pkg_description])
# generated from the m4 files accompanying Automake X.Y. # generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.) # (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION], AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.13' [am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 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. dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.13.4], [], m4_if([$1], [1.14.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
]) ])
...@@ -251,7 +266,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) ...@@ -251,7 +266,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.13.4])dnl [AM_AUTOMAKE_VERSION([1.14.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
...@@ -618,6 +633,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ...@@ -618,6 +633,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if # 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. # your package does certain things. But this isn't really a big deal.
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])
[_AM_PROG_CC_C_O
])
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS]) # AM_INIT_AUTOMAKE([OPTIONS])
# ----------------------------------------------- # -----------------------------------------------
...@@ -726,7 +747,48 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. ...@@ -726,7 +747,48 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT], [m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 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 add the conditional right here, as _AC_COMPILER_EXEEXT may be further
...@@ -734,7 +796,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. ...@@ -734,7 +796,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT], m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_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. # When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header # This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names. # that is generated. The stamp files are numbered to have different names.
...@@ -976,6 +1037,53 @@ AC_DEFUN([_AM_IF_OPTION], ...@@ -976,6 +1037,53 @@ AC_DEFUN([_AM_IF_OPTION],
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# _AM_PROG_CC_C_O
# ---------------
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
# to automatically call this.
AC_DEFUN([_AM_PROG_CC_C_O],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
AC_LANG_PUSH([C])dnl
AC_CACHE_CHECK(
[whether $CC understands -c and -o together],
[am_cv_prog_cc_c_o],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o=yes
for am_i in 1 2; do
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
&& test -f conftest2.$ac_objext; then
: OK
else
am_cv_prog_cc_c_o=no
break
fi
done
rm -f core conftest*
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 1999-2013 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.
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
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
# 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
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc. # Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2013-06-10' timestamp='2014-03-23'
# This file is free software; you can redistribute it and/or modify it # 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 # under the terms of the GNU General Public License as published by
...@@ -50,7 +50,7 @@ version="\ ...@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright 1992-2013 Free Software Foundation, Inc. Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
...@@ -149,7 +149,7 @@ Linux|GNU|GNU/*) ...@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
LIBC=gnu LIBC=gnu
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;; ;;
esac esac
...@@ -826,7 +826,7 @@ EOF ...@@ -826,7 +826,7 @@ EOF
*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:MSYS*:*) *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys echo ${UNAME_MACHINE}-pc-msys
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
...@@ -969,10 +969,10 @@ EOF ...@@ -969,10 +969,10 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;; ;;
or1k:Linux:*:*) openrisc*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} echo or1k-unknown-linux-${LIBC}
exit ;; exit ;;
or32:Linux:*:*) or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;; exit ;;
padre:Linux:*:*) padre:Linux:*:*)
...@@ -1260,6 +1260,7 @@ EOF ...@@ -1260,6 +1260,7 @@ EOF
if test "$UNAME_PROCESSOR" = unknown ; then if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc UNAME_PROCESSOR=powerpc
fi fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
...@@ -1271,6 +1272,15 @@ EOF ...@@ -1271,6 +1272,15 @@ EOF
esac esac
fi fi
fi fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;; exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*) *:procnto*:*:* | *:QNX:[0123456789]*:*)
...@@ -1361,154 +1371,6 @@ EOF ...@@ -1361,154 +1371,6 @@ EOF
exit ;; exit ;;
esac esac
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
# if !defined (ultrix)
# include <sys/param.h>
# if defined (BSD)
# if BSD == 43
printf ("vax-dec-bsd4.3\n"); exit (0);
# else
# if BSD == 199006
printf ("vax-dec-bsd4.3reno\n"); exit (0);
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# endif
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# else
printf ("vax-dec-ultrix\n"); exit (0);
# endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
c34*)
echo c34-convex-bsd
exit ;;
c38*)
echo c38-convex-bsd
exit ;;
c4*)
echo c4-convex-bsd
exit ;;
esac
fi
cat >&2 <<EOF cat >&2 <<EOF
$0: unable to guess system type $0: unable to guess system type
......
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc. # Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2013-04-24' timestamp='2014-07-28'
# This file is free software; you can redistribute it and/or modify it # 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 # under the terms of the GNU General Public License as published by
...@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." ...@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright 1992-2013 Free Software Foundation, Inc. Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
...@@ -257,7 +257,7 @@ case $basic_machine in ...@@ -257,7 +257,7 @@ case $basic_machine in
| avr | avr32 \ | avr | avr32 \
| be32 | be64 \ | be32 | be64 \
| bfin \ | bfin \
| c4x | clipper \ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| epiphany \ | epiphany \
| fido | fr30 | frv \ | fido | fr30 | frv \
...@@ -265,6 +265,7 @@ case $basic_machine in ...@@ -265,6 +265,7 @@ case $basic_machine in
| hexagon \ | hexagon \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| k1om \
| le32 | le64 \ | le32 | le64 \
| lm32 \ | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
...@@ -282,8 +283,10 @@ case $basic_machine in ...@@ -282,8 +283,10 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \ | mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \ | mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \ | mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \ | mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \ | mipsr5900 | mipsr5900el \
...@@ -295,8 +298,7 @@ case $basic_machine in ...@@ -295,8 +298,7 @@ case $basic_machine in
| nds32 | nds32le | nds32be \ | nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \ | ns16k | ns32k \
| open8 \ | open8 | or1k | or1knd | or32 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \ | pyramid \
...@@ -324,7 +326,7 @@ case $basic_machine in ...@@ -324,7 +326,7 @@ case $basic_machine in
c6x) c6x)
basic_machine=tic6x-unknown basic_machine=tic6x-unknown
;; ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
;; ;;
...@@ -372,7 +374,7 @@ case $basic_machine in ...@@ -372,7 +374,7 @@ case $basic_machine in
| be32-* | be64-* \ | be32-* | be64-* \
| bfin-* | bs2000-* \ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
...@@ -381,6 +383,7 @@ case $basic_machine in ...@@ -381,6 +383,7 @@ case $basic_machine in
| hexagon-* \ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \ | ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \ | le32-* | le64-* \
| lm32-* \ | lm32-* \
| m32c-* | m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
...@@ -400,8 +403,10 @@ case $basic_machine in ...@@ -400,8 +403,10 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \ | mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \ | mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \ | mipsr5900-* | mipsr5900el-* \
...@@ -413,6 +418,7 @@ case $basic_machine in ...@@ -413,6 +418,7 @@ case $basic_machine in
| nios-* | nios2-* | nios2eb-* | nios2el-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \ | open8-* \
| or1k*-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
...@@ -794,7 +800,7 @@ case $basic_machine in ...@@ -794,7 +800,7 @@ case $basic_machine in
os=-mingw64 os=-mingw64
;; ;;
mingw32) mingw32)
basic_machine=i386-pc basic_machine=i686-pc
os=-mingw32 os=-mingw32
;; ;;
mingw32ce) mingw32ce)
...@@ -822,6 +828,10 @@ case $basic_machine in ...@@ -822,6 +828,10 @@ case $basic_machine in
basic_machine=powerpc-unknown basic_machine=powerpc-unknown
os=-morphos os=-morphos
;; ;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos) msdos)
basic_machine=i386-pc basic_machine=i386-pc
os=-msdos os=-msdos
...@@ -830,7 +840,7 @@ case $basic_machine in ...@@ -830,7 +840,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;; ;;
msys) msys)
basic_machine=i386-pc basic_machine=i686-pc
os=-msys os=-msys
;; ;;
mvs) mvs)
...@@ -1367,14 +1377,14 @@ case $os in ...@@ -1367,14 +1377,14 @@ case $os in
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
...@@ -1546,6 +1556,9 @@ case $basic_machine in ...@@ -1546,6 +1556,9 @@ case $basic_machine in
c4x-* | tic4x-*) c4x-* | tic4x-*)
os=-coff os=-coff
;; ;;
c8051-*)
os=-elf
;;
hexagon-*) hexagon-*)
os=-elf os=-elf
;; ;;
...@@ -1589,9 +1602,6 @@ case $basic_machine in ...@@ -1589,9 +1602,6 @@ case $basic_machine in
mips*-*) mips*-*)
os=-elf os=-elf
;; ;;
or1k-*)
os=-elf
;;
or32-*) or32-*)
os=-coff os=-coff
;; ;;
......
m4_define([abi_version_major], [3]) m4_define([abi_version_major], [3])
m4_define([abi_version_minor], [0]) m4_define([abi_version_minor], [0])
m4_define([abi_version_micro], [0]) m4_define([abi_version_micro], [1])
m4_define([abi_series], [abi_version_major.abi_version_minor]) m4_define([abi_series], [abi_version_major.abi_version_minor])
m4_define([abi_version], [abi_version_major.abi_version_minor.abi_version_micro]) m4_define([abi_version], [abi_version_major.abi_version_minor.abi_version_micro])
...@@ -476,7 +476,7 @@ AM_CONDITIONAL([WITH_REDLAND], test "$abi_cv_redland" = "yes") ...@@ -476,7 +476,7 @@ AM_CONDITIONAL([WITH_REDLAND], test "$abi_cv_redland" = "yes")
AM_CONDITIONAL([HAVE_REDLAND], test "$abi_cv_redland" = "yes") AM_CONDITIONAL([HAVE_REDLAND], test "$abi_cv_redland" = "yes")
evolution_data_server_req='libebook-1.2 libecal-1.2' evolution_data_server_req='libebook-1.2 >= 3.6 libecal-1.2'
AC_ARG_WITH([evolution_data_server], AC_ARG_WITH([evolution_data_server],
[AS_HELP_STRING([--with-evolution-data-server], [Use Evolution Data Server to get at contact and calendar information])], [AS_HELP_STRING([--with-evolution-data-server], [Use Evolution Data Server to get at contact and calendar information])],
[ [
...@@ -602,7 +602,7 @@ AM_CONDITIONAL([HAVE_CHAMPLAIN], test "$abi_cv_champlain" = "yes") ...@@ -602,7 +602,7 @@ AM_CONDITIONAL([HAVE_CHAMPLAIN], test "$abi_cv_champlain" = "yes")
AC_ARG_WITH([icondir], AC_ARG_WITH([icondir],
[AS_HELP_STRING([--with-icondir=DIR], [install icon in DIR instead of PREFIX/share/icons/hicolor/48x48/apps])], [AS_HELP_STRING([--with-icondir=DIR], [install icon in DIR instead of PREFIX/share/icons/THEME/SIZE/apps])],
[ [
abi_cv_icondir="$withval" abi_cv_icondir="$withval"
]) ])
...@@ -611,7 +611,7 @@ if test "$abi_cv_icondir" = "" -o \ ...@@ -611,7 +611,7 @@ if test "$abi_cv_icondir" = "" -o \
"$abi_cv_icondir" = "no"; then "$abi_cv_icondir" = "no"; then
abi_cv_prefix="$prefix" abi_cv_prefix="$prefix"
test "$abi_cv_prefix" = "NONE" && abi_cv_prefix="$ac_default_prefix" test "$abi_cv_prefix" = "NONE" && abi_cv_prefix="$ac_default_prefix"
abi_cv_icondir="${abi_cv_prefix}/share/icons/hicolor/48x48/apps" abi_cv_icondir="${abi_cv_prefix}/share/icons"
fi fi
AC_SUBST(ABIWORD_ICONDIR, "$abi_cv_icondir") AC_SUBST(ABIWORD_ICONDIR, "$abi_cv_icondir")
...@@ -716,7 +716,7 @@ elif test "$TOOLKIT" = "cocoa"; then ...@@ -716,7 +716,7 @@ elif test "$TOOLKIT" = "cocoa"; then
AC_CHECK_PROG([CONVERT], [convert], convert, AC_MSG_ERROR(Cannot find ImageMagick convert)) AC_CHECK_PROG([CONVERT], [convert], convert, AC_MSG_ERROR(Cannot find ImageMagick convert))
else else
SYSTEM_CFLAGS=$PNG_CFLAGS SYSTEM_CFLAGS=$PNG_CFLAGS
SYSTEM_LIBS=$PNG_LIBS SYSTEM_LIBS="$PNG_LIBS -ljpeg"
deps_pkgs="$deps_pkgs $gtk_pkgs x11" deps_pkgs="$deps_pkgs $gtk_pkgs x11"
fi fi
...@@ -998,12 +998,18 @@ if test "$abi_cv_plugins" = "auto"; then ...@@ -998,12 +998,18 @@ if test "$abi_cv_plugins" = "auto"; then
eval $(echo "enable_$plugin")="auto" eval $(echo "enable_$plugin")="auto"
done done
else else
default_plugins="opendocument" default_plugins="opendocument openxml"
if test "$abi_cv_disable_default_plugins" != "yes"; then if test "$abi_cv_disable_default_plugins" != "yes"; then
PLUGINS="$default_plugins" PLUGINS="$default_plugins"
fi fi
PLUGINS="$PLUGINS $abi_cv_plugins" for i in $abi_cv_plugins; do
if test -d "plugins/$i"; then
PLUGINS="$PLUGINS $i"
else
AC_MSG_WARN([Plugin $i does not exist.])
fi
done
# which plugins to enable # which plugins to enable
# this creates variables like "enable_wordperfect=yes" # this creates variables like "enable_wordperfect=yes"
...@@ -1159,6 +1165,7 @@ AC_OUTPUT( ...@@ -1159,6 +1165,7 @@ AC_OUTPUT(
Makefile Makefile
goffice-bits/Makefile goffice-bits/Makefile
goffice-bits2/Makefile goffice-bits2/Makefile
icons/Makefile
po/Makefile po/Makefile
src/Makefile src/Makefile
src/af/Makefile src/af/Makefile
...@@ -1226,6 +1233,9 @@ AC_OUTPUT( ...@@ -1226,6 +1233,9 @@ AC_OUTPUT(
user/wp/clipart/Makefile user/wp/clipart/Makefile
user/wp/dictionary/Makefile user/wp/dictionary/Makefile
user/wp/templates/Makefile user/wp/templates/Makefile
tools/Makefile
tools/cdump/Makefile
tools/cdump/xp/Makefile
) )
AC_OUTPUT( AC_OUTPUT(
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -185,8 +185,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -185,8 +185,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
...@@ -602,14 +600,14 @@ distclean-compile: ...@@ -602,14 +600,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -184,8 +184,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -184,8 +184,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
...@@ -592,14 +590,14 @@ distclean-compile: ...@@ -592,14 +590,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......
public_icons_themes = \
hicolor \
$(NULL)
public_icons = \
hicolor_apps_16x16_abiword.png \
hicolor_apps_22x22_abiword.png \
hicolor_apps_32x32_abiword.png \
hicolor_apps_48x48_abiword.png \
hicolor_apps_256x256_abiword.png \
hicolor_apps_512x512_abiword.png \
hicolor_apps_scalable_abiword.svg \
$(NULL)
icondir= $(ABIWORD_ICONDIR)
gtk_update_icon_cache = gtk-update-icon-cache -f -t
install-data-local: install-icons update-icon-cache
uninstall-local: uninstall-icons update-icon-cache
update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
for theme in $(public_icons_themes); do \
$(gtk_update_icon_cache) $(icondir)/$$theme; \
done; \
else \
echo "*** Icon cache not updated. After (un)install, run this:"; \
for theme in $(public_icons_themes); do \
echo "*** $(gtk_update_icon_cache) $(icondir)/$$theme"; \
done; \
fi
install-icons:
for icon in $(public_icons); do \
THEME=`echo $$icon | cut -d_ -f1`; \
CONTEXT=`echo $$icon | cut -d_ -f2`; \
SIZE=`echo $$icon | cut -d_ -f3`; \
ICONFILE=`echo $$icon | cut -d_ -f4`; \
mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(icondir)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
done
uninstall-icons:
-for icon in $(public_icons); do \
THEME=`echo $$icon | cut -d_ -f1`; \
CONTEXT=`echo $$icon | cut -d_ -f2`; \
SIZE=`echo $$icon | cut -d_ -f3`; \
ICONFILE=`echo $$icon | cut -d_ -f4`; \
rm -f $(DESTDIR)$(icondir)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
done
EXTRA_DIST = \
$(public_icons) \
$(NULL)
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1312,7 +1312,7 @@ ia64-*-hpux*) ...@@ -1312,7 +1312,7 @@ ia64-*-hpux*)
rm -rf conftest* rm -rf conftest*
;; ;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*) s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext echo 'int i;' > conftest.$ac_ext
...@@ -1326,7 +1326,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ...@@ -1326,7 +1326,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*) x86_64-*linux*)
LD="${LD-ld} -m elf_i386" LD="${LD-ld} -m elf_i386"
;; ;;
ppc64-*linux*|powerpc64-*linux*) powerpc64le-*linux*)
LD="${LD-ld} -m elf32lppclinux"
;;
powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux" LD="${LD-ld} -m elf32ppclinux"
;; ;;
s390x-*linux*) s390x-*linux*)
...@@ -1345,7 +1348,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ...@@ -1345,7 +1348,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*) x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64" LD="${LD-ld} -m elf_x86_64"
;; ;;
ppc*-*linux*|powerpc*-*linux*) powerpcle-*linux*)
LD="${LD-ld} -m elf64lppc"
;;
powerpc-*linux*)
LD="${LD-ld} -m elf64ppc" LD="${LD-ld} -m elf64ppc"
;; ;;
s390*-*linux*|s390*-*tpf*) s390*-*linux*|s390*-*tpf*)
......
#! /bin/sh #! /bin/sh
# Common wrapper for a few potentially missing GNU programs. # Common wrapper for a few potentially missing GNU programs.
scriptversion=2012-06-26.16; # UTC scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
...@@ -160,7 +160,7 @@ give_advice () ...@@ -160,7 +160,7 @@ give_advice ()
;; ;;
autom4te*) autom4te*)
echo "You might have modified some maintainer files that require" echo "You might have modified some maintainer files that require"
echo "the 'automa4te' program to be rebuilt." echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te' program_details 'autom4te'
;; ;;
bison*|yacc*) bison*|yacc*)
......
...@@ -1424,23 +1424,14 @@ AC_SUBST([APPLIX_LIBS]) ...@@ -1424,23 +1424,14 @@ AC_SUBST([APPLIX_LIBS])
aiksaurus_pkgs="aiksaurus-1.0" aiksaurus_pkgs="aiksaurus-1.0"
aiksaurus_gtk_pkgs="gaiksaurus-1.0" aiksaurus_gtk_pkgs="aiksaurusgtk3-1.0"
aiksaurus_deps="no" aiksaurus_deps="no"
if test "$enable_aiksaurus" != ""; then if test "$enable_aiksaurus" != ""; then
PKG_CHECK_EXISTS([ $aiksaurus_pkgs ], PKG_CHECK_EXISTS([ $aiksaurus_pkgs ],
[ [
if test "$TOOLKIT_IS_GTK2" = "yes"; then
PKG_CHECK_EXISTS([ $aiksaurus_gtk_pkgs ],
[
aiksaurus_deps="yes" aiksaurus_deps="yes"
], [
test "$enable_aiksaurus" = "auto" && AC_MSG_WARN([aiksaurus plugin: dependencies not satisfied - $aiksaurus_gtk_pkgs])
])
else
aiksaurus_deps="yes"
fi
], [ ], [
test "$enable_aiksaurus" = "auto" && AC_MSG_WARN([aiksaurus plugin: dependencies not satisfied - $aiksaurus_pkgs]) test "$enable_aiksaurus" = "auto" && AC_MSG_WARN([aiksaurus plugin: dependencies not satisfied - $aiksaurus_pkgs])
]) ])
...@@ -1450,17 +1441,20 @@ fi ...@@ -1450,17 +1441,20 @@ fi
if test "$enable_aiksaurus" = "yes" || \ if test "$enable_aiksaurus" = "yes" || \
test "$aiksaurus_deps" = "yes"; then test "$aiksaurus_deps" = "yes"; then
use_builtin_aiksaurus_gtk="no"
if test "$TOOLKIT" = "gtk"; then
PKG_CHECK_EXISTS([ $aiksaurus_gtk_pkgs ],
[
aiksaurus_pkgs="$aiksaurus_pkgs $aiksaurus_gtk_pkgs"
], [use_builtin_aiksaurus_gtk="yes"])
fi
if test "$enable_aiksaurus_builtin" = "yes"; then if test "$enable_aiksaurus_builtin" = "yes"; then
AC_MSG_ERROR([aiksaurus plugin: static linking not supported]) AC_MSG_ERROR([aiksaurus plugin: static linking not supported])
fi fi
PKG_CHECK_MODULES(AIKSAURUS,[ $aiksaurus_pkgs ]) PKG_CHECK_MODULES(AIKSAURUS,[ $aiksaurus_pkgs ])
if test "$TOOLKIT_IS_GTK2" = "yes"; then
PKG_CHECK_MODULES(AIKSAURUS_GTK,[ $aiksaurus_gtk_pkgs ])
AIKSAURUS_CFLAGS="$AIKSAURUS_CFLAGS $AIKSAURUS_GTK_CFLAGS"
AIKSAURUS_LIBS="$AIKSAURUS_LIBS $AIKSAURUS_GTK_LIBS"
fi
test "$enable_aiksaurus" = "auto" && PLUGINS="$PLUGINS aiksaurus" test "$enable_aiksaurus" = "auto" && PLUGINS="$PLUGINS aiksaurus"
...@@ -1469,6 +1463,8 @@ AIKSAURUS_LIBS="$AIKSAURUS_LIBS "'${PLUGIN_LIBS}' ...@@ -1469,6 +1463,8 @@ AIKSAURUS_LIBS="$AIKSAURUS_LIBS "'${PLUGIN_LIBS}'
fi fi
AM_CONDITIONAL([WITH_BUILTIN_AIKSAURUS_GTK],[ test "x$use_builtin_aiksaurus_gtk" = "xyes" ])
AC_SUBST([AIKSAURUS_CFLAGS]) AC_SUBST([AIKSAURUS_CFLAGS])
AC_SUBST([AIKSAURUS_LIBS]) AC_SUBST([AIKSAURUS_LIBS])
......
...@@ -129,6 +129,7 @@ plugins/wpg/xp/Makefile ...@@ -129,6 +129,7 @@ plugins/wpg/xp/Makefile
plugins/wpg/Makefile plugins/wpg/Makefile
plugins/applix/xp/Makefile plugins/applix/xp/Makefile
plugins/applix/Makefile plugins/applix/Makefile
plugins/aiksaurus/aiksaurusgtk3/Makefile
plugins/aiksaurus/win/Makefile plugins/aiksaurus/win/Makefile
plugins/aiksaurus/xp/Makefile plugins/aiksaurus/xp/Makefile
plugins/aiksaurus/Makefile plugins/aiksaurus/Makefile
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -190,8 +190,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -190,8 +190,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
SUBDIRS =
DIST_SUBDIRS = win xp if TOOLKIT_GTK
SUBDIRS = xp
if WITH_BUILTIN_AIKSAURUS_GTK
SUBDIRS += aiksaurusgtk3
platform_lib = aiksaurusgtk3/libAiksaurusGtk3.la
endif
endif
DIST_SUBDIRS = win aiksaurusgtk3 xp
SUBDIRS += xp
if TOOLKIT_WIN if TOOLKIT_WIN
SUBDIRS += win SUBDIRS += win
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -78,7 +78,8 @@ PRE_UNINSTALL = : ...@@ -78,7 +78,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
@TOOLKIT_WIN_TRUE@am__append_1 = win @TOOLKIT_GTK_TRUE@@WITH_BUILTIN_AIKSAURUS_GTK_TRUE@am__append_1 = aiksaurusgtk3
@TOOLKIT_WIN_TRUE@am__append_2 = win
subdir = plugins/aiksaurus subdir = plugins/aiksaurus
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
...@@ -252,8 +253,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -252,8 +253,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
...@@ -540,9 +539,10 @@ target_alias = @target_alias@ ...@@ -540,9 +539,10 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
DIST_SUBDIRS = win xp SUBDIRS = $(am__append_1) xp $(am__append_2)
SUBDIRS = xp $(am__append_1) @TOOLKIT_GTK_TRUE@@WITH_BUILTIN_AIKSAURUS_GTK_TRUE@platform_lib = aiksaurusgtk3/libAiksaurusGtk3.la
@TOOLKIT_WIN_TRUE@platform_lib = win/libwin.la @TOOLKIT_WIN_TRUE@platform_lib = win/libwin.la
DIST_SUBDIRS = win aiksaurusgtk3 xp
plugindir = $(ABIWORD_PLUGINSDIR) plugindir = $(ABIWORD_PLUGINSDIR)
plugin_LTLIBRARIES = aiksaurus.la plugin_LTLIBRARIES = aiksaurus.la
aiksaurus_la_LIBADD = \ aiksaurus_la_LIBADD = \
......
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "AiksaurusGTK-C.h"
#include "AiksaurusGTK.h"
#include <new>
static AiksaurusGTK *instance = 0;
int AiksaurusGTK_init()
{
if (!instance)
instance = new(std::nothrow) AiksaurusGTK;
return (instance != 0);
}
void AiksaurusGTK_destroy()
{
delete instance;
instance = 0;
}
void AiksaurusGTK_setTitle(const char* title)
{
if (instance)
instance->setTitle(title);
}
void AiksaurusGTK_setInitialMessage(const char* message)
{
if (instance)
instance->setInitialMessage(message);
}
void AiksaurusGTK_showReplacebar()
{
if (instance)
instance->showReplacebar();
}
void AiksaurusGTK_hideReplacebar()
{
if (instance)
instance->hideReplacebar();
}
const char* AiksaurusGTK_runThesaurus(const char* word)
{
return (instance) ? (instance->runThesaurus(word)) : (word);
}
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_AIKSAURUSGTK_C_H
#define INCLUDED_AIKSAURUSGTK_C_H
#if defined (__cplusplus)
extern "C" {
#endif
int AiksaurusGTK_init();
void AiksaurusGTK_destroy();
void AiksaurusGTK_setTitle(const char* title);
void AiksaurusGTK_setInitialMessage(const char* message);
void AiksaurusGTK_showReplacebar();
void AiksaurusGTK_hideReplacebar();
const char* AiksaurusGTK_runThesaurus(const char* word);
#if defined (__cplusplus)
}
#endif
#endif
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "AiksaurusGTK.h"
#include "DialogMediator.h"
#include "Toolbar.h"
#include "Display.h"
#include "Replacebar.h"
#include "Exception.h"
#include <iostream>
#include <string>
#include <new>
namespace AiksaurusGTK_impl
{
class DialogImpl : public DialogMediator
{
private:
GtkWidget* d_window_ptr;
GtkWidget* d_layout_ptr;
Toolbar* d_toolbar_ptr;
Display* d_display_ptr;
Replacebar* d_replacebar_ptr;
std::string d_replacement;
std::string d_title;
std::string d_initialMessage;
bool d_showreplacebar;
static gint _closeDialog(GtkWidget *w, GdkEventAny *e, gpointer data);
void _init();
public:
DialogImpl();
virtual ~DialogImpl();
const char* runThesaurus(const char* word) throw();
void setTitle(const char* title) throw();
void setReplacebar(bool replacebar) throw();
void setInitialMessage(const char* message) throw(std::bad_alloc);
void eventCancel() throw();
void eventReplace(const char* replacement) throw();
void eventSelectWord(const char* word) throw();
void eventSearch(const char* word) throw();
};
DialogImpl::DialogImpl()
: d_window_ptr(0),
d_title("Aiksaurus"),
d_showreplacebar(true)
{
}
DialogImpl::~DialogImpl()
{
}
void DialogImpl::setReplacebar(bool replacebar) throw()
{
d_showreplacebar = replacebar;
}
void DialogImpl::setInitialMessage(const char* message) throw(std::bad_alloc)
{
d_initialMessage = message;
}
gint DialogImpl::_closeDialog(GtkWidget *, GdkEventAny *, gpointer data)
{
DialogImpl* di = static_cast<DialogImpl*>(data);
di->d_window_ptr = 0;
gtk_main_quit();
return 0;
}
void DialogImpl::_init()
{
if (d_window_ptr)
{
gtk_widget_show(d_window_ptr);
}
else
{
d_window_ptr = gtk_dialog_new();
gtk_widget_realize(d_window_ptr);
d_layout_ptr = gtk_dialog_get_content_area (GTK_DIALOG(d_window_ptr));
d_toolbar_ptr = new Toolbar(*this, d_window_ptr);
d_toolbar_ptr->focus();
d_display_ptr = new Display(*this);
gtk_box_pack_start(
GTK_BOX(d_layout_ptr), d_toolbar_ptr->getToolbar(), 0, 0, 4
);
gtk_box_pack_start(
GTK_BOX(d_layout_ptr), d_display_ptr->getDisplay(), 1, 1, 0
);
if (d_showreplacebar)
{
d_replacebar_ptr = new Replacebar(*this);
gtk_box_pack_start(
GTK_BOX(d_layout_ptr), d_replacebar_ptr->getReplacebar(), 0, 0, 4
);
}
else
{
d_replacebar_ptr = 0;
}
//gtk_container_add(GTK_CONTAINER(d_window_ptr), d_layout_ptr);
gtk_window_set_title(GTK_WINDOW(d_window_ptr), d_title.c_str());
g_signal_connect(
G_OBJECT(d_window_ptr), "delete_event",
G_CALLBACK(_closeDialog), this
);
}
}
const char* DialogImpl::runThesaurus(const char* word) throw()
{
try {
_init();
if (word)
eventSearch(word);
else if (d_initialMessage != "")
d_display_ptr->showMessage(d_initialMessage.c_str());
gtk_widget_show_all(d_window_ptr);
gtk_window_set_modal(GTK_WINDOW(d_window_ptr), true);
gtk_main();
if (d_window_ptr)
{
gtk_window_set_modal(GTK_WINDOW(d_window_ptr), false);
gtk_widget_hide(d_window_ptr);
}
}
catch(...) {
std::cerr << "[AiksaurusGTK] runThesaurus() error, ignoring." << std::endl;
}
return ((d_replacement == "") ? (word) : (d_replacement.c_str()));
}
void DialogImpl::setTitle(const char* word) throw()
{
try {
d_title = (word) ? (word) : ("");
}
catch(...) {
std::cerr << "[AiksaurusGTK] DialogImpl::setTitle() error, ignoring." << std::endl;
}
}
void DialogImpl::eventCancel() throw()
{
gtk_main_quit();
}
void DialogImpl::eventReplace(const char* replacement) throw()
{
try {
d_replacement = replacement;
}
catch(std::bad_alloc) {
std::cerr << Exception::CANNOT_ALLOCATE_MEMORY;
}
gtk_main_quit();
}
void DialogImpl::eventSelectWord(const char* word) throw()
{
if (d_replacebar_ptr)
d_replacebar_ptr->setText(word);
}
void DialogImpl::eventSearch(const char* word) throw()
{
try {
std::string w( (word) ? (word) : ("") );
if (w == "")
d_display_ptr->showMessage(d_initialMessage.c_str());
else {
d_toolbar_ptr->search(w.c_str());
d_display_ptr->search(w.c_str());
if (d_replacebar_ptr)
d_replacebar_ptr->setText(w.c_str());
}
}
catch(std::bad_alloc) {
std::cerr << Exception::CANNOT_ALLOCATE_MEMORY;
}
}
AiksaurusGTK::AiksaurusGTK()
: d_impl_ptr(new DialogImpl())
{
}
AiksaurusGTK::~AiksaurusGTK()
{
delete d_impl_ptr;
}
void AiksaurusGTK::setTitle(const char* title)
{
d_impl_ptr->setTitle(title);
}
void AiksaurusGTK::hideReplacebar()
{
d_impl_ptr->setReplacebar(false);
}
void AiksaurusGTK::showReplacebar()
{
d_impl_ptr->setReplacebar(true);
}
void AiksaurusGTK::setInitialMessage(const char* message)
{
d_impl_ptr->setInitialMessage(message);
}
const char* AiksaurusGTK::runThesaurus(const char* word)
{
return d_impl_ptr->runThesaurus(word);
}
}
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_JARED_GPL_AIKSAURUSGTK_H
#define INCLUDED_JARED_GPL_AIKSAURUSGTK_H
namespace AiksaurusGTK_impl
{
class DialogImpl;
class AiksaurusGTK
{
private:
AiksaurusGTK(const AiksaurusGTK& rhs);
AiksaurusGTK& operator=(const AiksaurusGTK& rhs);
DialogImpl* d_impl_ptr;
public:
AiksaurusGTK();
~AiksaurusGTK();
void setTitle(const char* title);
void setInitialMessage(const char* message);
void showReplacebar();
void hideReplacebar();
const char* runThesaurus(const char* word);
};
}
typedef AiksaurusGTK_impl::AiksaurusGTK AiksaurusGTK;
#endif // INCLUDED_JARED_GPL_AIKSAURUSGTK_H
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "AiksaurusGTK_histlist.h"
#include "AiksaurusGTK_strlist.h"
#ifndef NDEBUG
#include <iostream>
using namespace std;
#endif
AiksaurusGTK_histlist::AiksaurusGTK_histlist(unsigned int maxElements)
{
d_maxElements = maxElements;
d_list_ptr = new AiksaurusGTK_strlist;
}
AiksaurusGTK_histlist::~AiksaurusGTK_histlist()
{
delete d_list_ptr;
}
void AiksaurusGTK_histlist::addItem(const char* str)
{
d_list_ptr->remove_first(str);
d_list_ptr->push_front(str);
if (d_list_ptr->size() > d_maxElements)
{
d_list_ptr->pop_back();
}
}
const GList* AiksaurusGTK_histlist::list() const
{
return d_list_ptr->list();
}
#ifndef NDEBUG
void AiksaurusGTK_histlist::debug()
{
cout << "AiksaurusGTK_histlist::debug() {" << endl;
cout << " MaxElements is " << d_maxElements << endl;
cout << " List information follows: " << endl;
d_list_ptr->debug();
cout << "}" << endl;
}
#endif // NDEBUG
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_JARED_GPL_AIKSAURUSGTK_HISTORYLIST_H
#define INCLUDED_JARED_GPL_AIKSAURUSGTK_HISTORYLIST_H
#include <glib.h>
class AiksaurusGTK_strlist;
class AiksaurusGTK_histlist
{
private:
AiksaurusGTK_strlist* d_list_ptr;
unsigned int d_maxElements;
// Prevent copying and assignment.
AiksaurusGTK_histlist(const AiksaurusGTK_histlist& rhs);
const AiksaurusGTK_histlist& operator=(const AiksaurusGTK_histlist& rhs);
public:
AiksaurusGTK_histlist(unsigned int maxElements);
~AiksaurusGTK_histlist();
void addItem(const char* str);
const GList* list() const;
#ifndef NDEBUG
void debug();
#endif // NDEBUG
};
#endif // INCLUDED_JARED_GPL_AIKSAURUSGTK_HISTLIST_H
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "AiksaurusGTK_history.h"
#include "AiksaurusGTK_strlist.h"
#include "AiksaurusGTK_utils.h"
#include <cassert>
#ifndef NDEBUG
#include <iostream>
using namespace std;
#endif
//////////////////////////////////////////////////////////////////////////
// //
// Creation and Destruction //
// //
//////////////////////////////////////////////////////////////////////////
AiksaurusGTK_history::AiksaurusGTK_history()
{
d_forward_tip_ptr = d_back_tip_ptr = d_current_ptr = static_cast<char*>(NULL);
}
AiksaurusGTK_history::~AiksaurusGTK_history()
{
if (d_current_ptr)
delete[] d_current_ptr;
if (d_forward_tip_ptr)
delete[] d_forward_tip_ptr;
if (d_back_tip_ptr)
delete[] d_back_tip_ptr;
}
const char*
AiksaurusGTK_history::tip_forward() const
{
static const char* forward = "Forward";
static const char* forwardto = "Forward to ";
const char* nextone = d_forward.look_front();
if (!nextone)
{
return forward;
}
if (d_forward_tip_ptr)
delete[] d_forward_tip_ptr;
d_forward_tip_ptr = AiksaurusGTK_strConcat(forwardto, nextone);
return d_forward_tip_ptr;
}
const char*
AiksaurusGTK_history::tip_back() const
{
static const char* back = "Back";
static const char* backto = "Back to ";
const char* backone = d_back.look_front();
if (!backone)
{
return back;
}
if (d_back_tip_ptr)
{
delete[] d_back_tip_ptr;
d_back_tip_ptr = 0;
}
d_back_tip_ptr = AiksaurusGTK_strConcat(backto, backone);
return d_back_tip_ptr;
}
void
AiksaurusGTK_history::search(const char* str)
{
// eliminate all entries which are in forward.
d_forward.clear();
// push current entry to top of back.
if (d_current_ptr != NULL)
{
d_back.push_front(d_current_ptr);
delete[] d_current_ptr;
}
// make current element mirror str.
d_current_ptr = AiksaurusGTK_strCopy(str);
}
void
AiksaurusGTK_history::move_back()
{
// make sure there is something to go back to before continuing.
if (!d_back.size())
return;
// make current element become first element of forward.
d_forward.push_front(d_current_ptr);
while (d_forward.size() > 200)
d_forward.pop_back();
// make first element of back become current.
delete[] d_current_ptr;
d_current_ptr = AiksaurusGTK_strCopy(d_back.look_front());
// pop first element of back
d_back.pop_front();
}
void
AiksaurusGTK_history::move_forward()
{
// make sure there is something to move forward to.
if (!d_forward.size())
return;
// make current element become first element of back.
d_back.push_front(d_current_ptr);
while (d_back.size() > 200)
d_back.pop_back();
// make first element of forward become current.
delete[] d_current_ptr;
d_current_ptr = AiksaurusGTK_strCopy(d_forward.look_front());
// pop first element of forward.
d_forward.pop_front();
}
void
AiksaurusGTK_history::move_back_to(GList* element)
{
int back_steps = 0;
for(GList* itor = const_cast<GList*>(d_back.list()); itor != NULL; itor = itor->next)
{
++back_steps;
if (itor == element)
{
for(int i = 0;i < back_steps;++i)
move_back();
return;
}
}
#ifndef NDEBUG
cout << "AiksaurusGTK_history::move_back_to(" << element << ")\n"
<< "Warning: element is not in back list, and it should be.\n";
debug();
#endif // NDEBUG
}
void
AiksaurusGTK_history::move_forward_to(GList* element)
{
int forward_steps = 0;
for(GList* itor = const_cast<GList*>(d_forward.list()); itor != NULL; itor = itor->next)
{
++forward_steps;
if (itor == element)
{
for(int i = 0;i < forward_steps;++i)
move_forward();
return;
}
}
#ifndef NDEBUG
cout << "AiksaurusGTK_history::move_forward_to(" << element << ")\n"
<< "Warning: element is not in forward list, and it should be.\n";
debug();
#endif // NDEBUG
}
unsigned int
AiksaurusGTK_history::size_back() const
{
return d_back.size();
}
unsigned int
AiksaurusGTK_history::size_forward() const
{
return d_forward.size();
}
const char*
AiksaurusGTK_history::current() const
{
return d_current_ptr;
}
const AiksaurusGTK_strlist&
AiksaurusGTK_history::list_back() const
{
return d_back;
}
const AiksaurusGTK_strlist&
AiksaurusGTK_history::list_forward() const
{
return d_forward;
}
#ifndef NDEBUG
void AiksaurusGTK_history::debug()
{
cout << "History Debug Information ======================" << endl;
cout << tip_back() << " " << tip_forward() << endl;
cout << "Current: " << current() << endl;
cout << "Back ";
d_back.debug();
cout << "Forward: ";
d_forward.debug();
cout << "================================================" << endl;
}
#endif
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_GPL_JARED_AIKSAURUSGTK_HISTORY_H
#define INCLUDED_GPL_JARED_AIKSAURUSGTK_HISTORY_H
#include "AiksaurusGTK_strlist.h"
class AiksaurusGTK_history
{
private:
AiksaurusGTK_strlist d_back;
AiksaurusGTK_strlist d_forward;
AiksaurusGTK_history(const AiksaurusGTK_history& rhs);
const AiksaurusGTK_history& operator=(const AiksaurusGTK_history& rhs);
char* d_current_ptr;
int d_maxentries;
mutable char* d_forward_tip_ptr;
mutable char* d_back_tip_ptr;
public:
AiksaurusGTK_history();
~AiksaurusGTK_history();
void search(const char* str);
void move_back();
void move_forward();
void move_back_to(GList* element);
void move_forward_to(GList* element);
const char* tip_back() const;
const char* tip_forward() const;
const char* current() const;
unsigned int size_back() const;
unsigned int size_forward() const;
const AiksaurusGTK_strlist& list_back() const;
const AiksaurusGTK_strlist& list_forward() const;
#ifndef NDEBUG
void debug();
#endif
};
#endif // INCLUDED_GPL_JARED_AIKSAURUS_HISTORY_H
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_GPL_JARED_AIKSAURUSGTK_PICBUTTON_H
#define INCLUDED_GPL_JARED_AIKSAURUSGTK_PICBUTTON_H
#include <glib.h>
#include <gtk/gtk.h>
#include "AiksaurusGTK_strlist.h"
class AiksaurusGTK_menudata;
class AiksaurusGTK_picbutton
{
private:
// Possible button states
bool d_hashover;
bool d_hasmenu;
bool d_mouseover;
bool d_menushowing;
bool d_enabled;
// Member Widgets
GtkWidget* d_window_ptr;
GtkWidget* d_button_ptr;
GtkWidget* d_pixmap_ptr;
int d_numVisible;
GtkWidget* d_menu_ptr;
GtkWidget* d_menu_button_ptr;
GdkPixbuf* d_menu_mask_ptr;
GtkWidget* d_menu_pixmap_widget_ptr;
GCallback d_onclick_function;
gpointer d_onclick_data;
AiksaurusGTK_menudata* d_menu_data_ptr;
AiksaurusGTK_strlist* d_menu_options_ptr;
// Callback Functions
static void cbHover(GtkWidget* w, gpointer data);
static void cbUnhover(GtkWidget* w, gpointer data);
static void cbPopMenu(GtkWidget* w, gpointer data);
static void cbPopupFunction(GtkMenu* menu, int* x, int* y, gboolean* notUsedBool, gpointer data);
static void cbSelectionDone(GtkMenuShell* menushell, gpointer data);
static void cbMenuActivate(GtkMenuItem* item, gpointer data);
// Mouse Hovering Actions
void handleRelief();
void hover();
void unhover();
// Menu Activation and Deactivation
void popMenu();
void popupFunction(int* x, int* y);
void selectionDone();
void menuActivate(gpointer item);
void menuCreate();
// Prevent Copying and Assignment
AiksaurusGTK_picbutton(const AiksaurusGTK_picbutton&);
const AiksaurusGTK_picbutton& operator=(const AiksaurusGTK_picbutton&);
public:
// Construction and Destruction
AiksaurusGTK_picbutton(GtkWidget *window, const char** normal);
AiksaurusGTK_picbutton(GtkWidget *window, const char* stock);
~AiksaurusGTK_picbutton();
// Manipulation
void setHoverPicture(const char** hover);
void addMenu(const AiksaurusGTK_strlist& options, GCallback onClick, gpointer onClickData);
void updateMenuOptions();
void limitVisibleOptions(int numVisible);
void disable();
void enable();
GtkWidget* getButton();
GtkWidget* getMenuButton();
};
#endif // INCLUDED_GPL_JARED_AIKSAURUSGTK_PICBUTTON_H
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "AiksaurusGTK_strlist.h"
#include "AiksaurusGTK_utils.h"
#include <cstring>
//////////////////////////////////////////////////////////////////////////
// //
// Creation and Destruction //
// //
//////////////////////////////////////////////////////////////////////////
AiksaurusGTK_strlist::AiksaurusGTK_strlist()
{
d_size = 0;
d_front_ptr = d_back_ptr = static_cast<GList*>(NULL);
}
AiksaurusGTK_strlist::~AiksaurusGTK_strlist()
{
clear();
}
//////////////////////////////////////////////////////////////////////////
// //
// Inspection Routines //
// //
//////////////////////////////////////////////////////////////////////////
const GList*
AiksaurusGTK_strlist::list() const
{
return d_front_ptr;
}
unsigned int
AiksaurusGTK_strlist::size() const
{
return d_size;
}
const char*
AiksaurusGTK_strlist::look_back() const
{
return (d_back_ptr)
? (static_cast<char*>(d_back_ptr->data))
: (static_cast<char*>(NULL));
}
const char*
AiksaurusGTK_strlist::look_front() const
{
return (d_front_ptr)
? (static_cast<char*>(d_front_ptr->data))
: (static_cast<char*>(NULL));
}
//////////////////////////////////////////////////////////////////////////
// //
// Node Destruction and Allocation //
// //
//////////////////////////////////////////////////////////////////////////
GList*
AiksaurusGTK_strlist::create_node(const char* str) const
{
char* x = AiksaurusGTK_strCopy(str);
GList* ret = g_list_alloc();
ret->data = x;
ret->prev = ret->next = static_cast<GList*>(NULL);
return ret;
}
void
AiksaurusGTK_strlist::free_data(GList* node) const
{
delete[] static_cast<char*>(node->data);
}
void
AiksaurusGTK_strlist::remove_node(GList* node)
{
// get pointers to the nodes we need to join.
GList* node_next = node->next;
GList* node_prev = node->prev;
// if this is in the middle, we need to reassign both pointers.
if ((node != d_front_ptr) && (node != d_back_ptr))
{
node_next->prev = node_prev;
node_prev->next = node_next;
}
// else if front of list, we want to reassign front to be
// the new front.
if (node == d_front_ptr)
{
d_front_ptr = node_next;
if (node_next)
node_next->prev = static_cast<GList*>(NULL);
}
// similarly, if back of list, we want to reassign
// back to be the new back.
if (node == d_back_ptr)
{
d_back_ptr = node_prev;
if (node_prev)
node_prev->next = static_cast<GList*>(NULL);
}
// delete the node itself.
free_data(node);
node->prev = node->next = static_cast<GList*>(NULL);
g_list_free(node);
// mark that we have deleted the node by reducing our size by one.
d_size--;
}
void
AiksaurusGTK_strlist::clear()
{
for(GList* iterator = d_front_ptr; iterator != static_cast<GList*>(NULL); iterator = iterator->next)
free_data(iterator);
g_list_free(d_front_ptr);
d_front_ptr = d_back_ptr = static_cast<GList*>(NULL);
d_size = 0;
}
//////////////////////////////////////////////////////////////////////////
// //
// Stack-Like Routines //
// //
//////////////////////////////////////////////////////////////////////////
void
AiksaurusGTK_strlist::push_front(const char* str)
{
// create new node from string.
GList* node = create_node(str);
// if nodes exist, prepend node to begin of list.
if (d_front_ptr)
{
node->next = d_front_ptr;
d_front_ptr->prev = node;
d_front_ptr = node;
}
// else if no nodes, init list to single node.
else
{
d_front_ptr = d_back_ptr = node;
}
// we have now added a node, so increase size by 1.
d_size++;
}
void
AiksaurusGTK_strlist::push_back(const char* str)
{
// create new node from string.
GList* node = create_node(str);
// if nodes exist, append node to end of list.
if (d_back_ptr)
{
node->prev = d_back_ptr;
d_back_ptr->next = node;
d_back_ptr = node;
}
// else if no nodes, init list to single node.
else
{
d_front_ptr = d_back_ptr = node;
}
// we have now added a node, so increase size by 1.
d_size++;
}
void
AiksaurusGTK_strlist::pop_front()
{
// first ensure that we have elements. if not, nothing to do.
if (!d_front_ptr)
return;
remove_node(d_front_ptr);
}
void
AiksaurusGTK_strlist::pop_back()
{
// first ensure that we have elements. if not, nothing to do.
if (!d_back_ptr)
return;
remove_node(d_back_ptr);
}
//////////////////////////////////////////////////////////////////////////
// //
// Deletion Routines //
// //
//////////////////////////////////////////////////////////////////////////
GList* AiksaurusGTK_strlist::find_first(const char* str)
{
for(GList* iterator = d_front_ptr; iterator != static_cast<GList*>(NULL); iterator = iterator->next)
{
char* x = static_cast<char*>(iterator->data);
if (AiksaurusGTK_strEquals(x, str))
{
return iterator;
}
}
return static_cast<GList*>(NULL);
}
void AiksaurusGTK_strlist::remove_first(const char* str)
{
GList* node = find_first(str);
if (node)
remove_node(node);
}
//////////////////////////////////////////////////////////////////////////
// //
// Debugging Routines //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef NDEBUG
#include <iostream>
using namespace std;
void AiksaurusGTK_strlist::debug()
{
cout << "Strlist Contents: (" << size() << " elements)\n";
for(GList* i = d_front_ptr;i != static_cast<GList*>(NULL);i = i->next)
{
cout << " " << i << ": " << static_cast<char*>(i->data) << "\n";
}
}
#endif // NDEBUG
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_JARED_GPL_AIKSAURUSGTK_STRLIST_H
#define INCLUDED_JARED_GPL_AIKSAURUSGTK_STRLIST_H
#include <glib.h>
//
// AiksaurusGTK_strlist class
// --------------------------
// This is a wrapper for the GList class which provides string copying
// features so that you can add strings and store them directly in the list
// with a minimum of fuss.
//
// In other words, when you push_back() or push_front() strings to this list,
// a copy of the string will be put in the list. This makes it much easier
// to reuse pointers and so forth, and you don't have to remember to delete
// the strings you've added because the destructor does it for you.
//
class AiksaurusGTK_strlist
{
private:
// d_list_ptr: pointer to the actual list itself.
GList* d_front_ptr;
GList* d_back_ptr;
// d_size: stores number of elements in list.
int d_size;
GList* find_first(const char* str);
// do not allow copying.
AiksaurusGTK_strlist(const AiksaurusGTK_strlist& rhs);
const AiksaurusGTK_strlist& operator=(const AiksaurusGTK_strlist& rhs);
GList* create_node(const char* str) const;
void free_data(GList* node) const;
void remove_node(GList* node);
public:
AiksaurusGTK_strlist();
~AiksaurusGTK_strlist();
// size: returns number of elements in list.
unsigned int size() const;
// getList: returns ptr to actual glist.
const GList* list() const;
// look_back: returns pointer to last element in list
// or NULL if list is empty.
const char* look_back() const;
// look_front: returns pointer to first element in list
// or NULL if list is empty.
const char* look_front() const;
// clear: destroy all data in glist.
void clear();
// push_back: adds str to end of list.
void push_back(const char* str);
// pop_back: removes last element of list, or does
// nothing if list is empty.
void pop_back();
// push_front: adds str to front of list.
void push_front(const char* str);
// pop_front: removes first element from list, or does
// nothing if list is empty.
void pop_front();
// remove_first: removes first instance of str in list if found.
void remove_first(const char* str);
#ifndef NDEBUG
// debug: prints debug information.
void debug();
#endif
};
#endif // INCLUDED_JARED_GPL_AIKSAURUSGTK_STRLIST_H
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
// header file that we are implementing here.
#include "AiksaurusGTK_utils.h"
// cstring needed for strlen.
#include <cstring>
// new needed for nothrow.
#include <new>
bool AiksaurusGTK_strEquals(const char* lhs, const char* rhs)
{
if ((!lhs) || (!rhs))
return (lhs == rhs);
register int i = 0;
while(lhs[i] != '\0')
{
if (rhs[i] != lhs[i])
return false;
++i;
}
return (rhs[i] == '\0');
}
char* AiksaurusGTK_strCopy(const char* str)
{
char* ret;
if (!str)
{
ret = new(std::nothrow) char[1];
if (!ret)
return ret;
ret[0] = '\0';
}
else
{
const int len = strlen(str);
ret = new(std::nothrow) char[len+1];
if (!ret)
return ret;
for(register int i = 0;i < len;++i)
{
ret[i] = str[i];
}
ret[len] = '\0';
}
return ret;
}
char* AiksaurusGTK_strConcat(const char* a, const char* b)
{
int len_a = strlen(a);
int len_b = strlen(b);
char* ret = new(std::nothrow) char[len_a + len_b + 1];
if (!ret)
return ret;
register int i = 0;
while(i < len_a)
{
ret[i] = a[i];
++i;
}
while(i < len_b + len_a)
{
ret[i] = b[i - len_a];
++i;
}
ret[len_a + len_b] = '\0';
return ret;
}
/*
* AiksaurusGTK - A GTK interface to the AikSaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_JARED_GPL_AIKSAURUSGTK_UTILS_H
#define INCLUDED_JARED_GPL_AIKSAURUSGTK_UTILS_H
//
// AiksaurusGTK_strEquals
// ----------------------
// Returns true if lhs == rhs, false otherwise.
//
bool AiksaurusGTK_strEquals(const char* lhs, const char* rhs);
//
// AiksaurusGTK_strCopy
// --------------------
// Creates a copy of the string str. This copy must be
// delete[]'d by the caller, so use this function carefully.
// Returns NULL on memory alloc error.
//
char* AiksaurusGTK_strCopy(const char* str);
//
// AiksaurusGTK_strConcat
// ----------------------
// Creates a string by merging two strings. The new string
// must be delete[]'d by the caller, so use this function
// carefully.
// Returns NULL on memory alloc error.
//
char* AiksaurusGTK_strConcat(const char* a, const char* b);
#endif // INCLUDED_JARED_GPL_AIKSAURUSGTK_UTILS_H
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_AIKSAURUS_GTK_DIALOG_MEDIATOR_H
#define INCLUDED_AIKSAURUS_GTK_DIALOG_MEDIATOR_H
namespace AiksaurusGTK_impl
{
class DialogMediator
{
public:
virtual void eventCancel() throw() = 0;
virtual void eventReplace(const char* replacement) throw() = 0;
virtual void eventSelectWord(const char* word) throw() = 0;
virtual void eventSearch(const char* word) throw() = 0;
};
}
#endif // INCLUDED_AIKSAURUS_GTK_DIALOG_MEDIATOR_H
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include <strings.h>
#include "Display.h"
#include "Meaning.h"
#include "DialogMediator.h"
#include "Exception.h"
using namespace std;
namespace AiksaurusGTK_impl
{
Display::Display(DialogMediator& mediator) throw()
: d_mediator(mediator)
{
// ensure that styles are set up.
// _initResources();
// create our scrollbar. we'll wrap this around all of our
// meanings to create a really nice look. We'll also set up
// an initial size (the usize call) so that it won't start
// out all squnched together.
d_scroller = gtk_scrolled_window_new(0, 0);
gtk_widget_set_size_request(d_scroller, 360, 240);
gtk_scrolled_window_set_policy(
GTK_SCROLLED_WINDOW(d_scroller),
GTK_POLICY_NEVER, // no horizontal scrollbar.
GTK_POLICY_AUTOMATIC // auto vertical scrollbar
);
// our main scrolling widget will be an event box with a white
// background. this way, when the window is larger than all the
// meanings, we don't get a big ugly gray blob at the bottom.
// we must use an event box rather than setting d_layout to
// white because boxes are transparent and you can't set a
// background color on them.
d_white = gtk_event_box_new();
gtk_widget_set_name(d_white, "wbg");
gtk_container_add(GTK_CONTAINER(d_scroller), d_white);
d_layout = 0;
}
Display::~Display() throw()
{
for(int i = 0;i < static_cast<int>(d_meanings.size());++i)
{
delete d_meanings[i];
}
}
void Display::_createMeaning(const string& title, vector<string>& words)
throw(std::bad_alloc)
{
Meaning *mean = new Meaning(title, words, *this);
d_meanings.push_back(mean);
gtk_box_pack_start(GTK_BOX(d_layout), mean->getLayout(), 0, 0, 0);
}
void Display::_resetDisplay() throw()
{
// Recreate our layout widget.
if (d_layout)
gtk_container_remove(GTK_CONTAINER(d_white), d_layout);
d_layout = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(d_white), d_layout);
// Clear out meanings.
for(int i = 0;i < static_cast<int>(d_meanings.size());++i)
{
delete d_meanings[i];
}
d_meanings.clear();
}
void Display::_displayResults(const char* word) throw(Exception, std::bad_alloc)
{
_checkThesaurus();
string title;
vector<string> words;
int meaning, prev_meaning = -1;
for(const char* r = d_thesaurus.next(meaning);
r[0]; r = d_thesaurus.next(meaning))
{
_checkThesaurus();
if (meaning != prev_meaning) // new meaning
{
if (prev_meaning != -1)
{
_createMeaning(title, words);
words.clear();
}
prev_meaning = meaning;
string option1(r);
string option2(d_thesaurus.next(meaning));
title = strcasecmp(option1.c_str(), word)
? (option1) : (option2);
r = d_thesaurus.next(meaning);
_checkThesaurus();
}
words.push_back(r);
}
_createMeaning(title, words);
}
void Display::_checkThesaurus() throw(Exception)
{
if (d_thesaurus.error()[0])
{
showMessage(d_thesaurus.error());
/*
GtkWidget* err = gtk_label_new(d_thesaurus.error());
gtk_label_set_justify(GTK_LABEL(err), GTK_JUSTIFY_LEFT);
gtk_box_pack_start(GTK_BOX(d_layout), err, 0, 0, 0);
gtk_widget_show_all(d_layout);
*/
throw Exception(d_thesaurus.error());
}
}
void Display::_displayAlternatives()
throw(Exception, std::bad_alloc)
{
_checkThesaurus();
vector<string> words;
for(const char* r = d_thesaurus.similar(); r[0]; r = d_thesaurus.similar())
{
_checkThesaurus();
words.push_back(r);
}
_createMeaning("No Synonyms Known. Nearby words:", words);
}
void Display::showMessage(const char* message) throw()
{
_resetDisplay();
GtkWidget* label = gtk_label_new(message);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start(GTK_BOX(d_layout), label, 1, 1, 0);
gtk_widget_show_all(d_layout);
}
void Display::search(const char* word) throw(std::bad_alloc)
{
try
{
_resetDisplay();
_checkThesaurus();
if (d_thesaurus.find(word))
_displayResults(word);
else
_displayAlternatives();
gtk_widget_show_all(d_layout);
}
catch(Exception& e)
{
// ignore, we've processed it already.
}
}
void Display::_handleClick(bool isDoubleClick, const char* text) throw(std::bad_alloc)
{
string str(text); // might throw
if (isDoubleClick)
d_mediator.eventSearch(str.c_str());
else
d_mediator.eventSelectWord(str.c_str());
}
void Display::_handleSelection(GtkWidget* list) throw()
{
for(int i = 0;i < static_cast<int>(d_meanings.size());++i)
{
d_meanings[i]->unselectListsExcept(list);
}
}
GtkWidget* Display::getDisplay() throw()
{
return d_scroller;
}
const Aiksaurus& Display::getThesaurus() const throw()
{
return d_thesaurus;
}
#if 0
//
// We use GTK styles to get the nice colors for our display.
// To do this, we have to set up a resource first so that the
// styles mean what we want them to mean.
//
void Display::_initResources() throw()
{
// Execute this code only once.
static bool done = false;
if (done) return;
done = true;
// Resource string to control colors and fonts of display pane.
const char* rcstring =
"style \"white_background\" {\n"
" bg[NORMAL] = \"#ffffff\" \n"
"}\n"
"style \"meaningset_title\" {\n"
" fg[NORMAL] = \"#600000\" \n"
" font = \"-*-Arial-bold-r-*-*-14-*-*-*-*-*-*-*\" \n"
"}\n"
"style \"yellow_background\" {\n"
" bg[NORMAL] = \"#f0f0e0\" \n"
"}\n"
"widget \"*wbg\" style \"white_background\"\n"
"widget \"*ybg\" style \"yellow_background\"\n"
"widget \"*mst\" style \"meaningset_title\"\n";
// Parse this resource string.
gtk_rc_parse_string(rcstring);
}
#endif
}
#ifndef INCLUDED_DISPLAY_H
#define INCLUDED_DISPLAY_H
#include <Aiksaurus.h>
#include <gtk/gtk.h>
#include <vector>
#include <string>
#include <new>
#include "Exception.h"
namespace AiksaurusGTK_impl
{
class DialogMediator;
class Meaning;
class Display
{
friend class Meaning;
private:
Display(const Display& rhs);
Display& operator=(const Display& rhs);
DialogMediator& d_mediator;
Aiksaurus d_thesaurus;
GtkWidget* d_scroller;
GtkWidget* d_white;
GtkWidget* d_layout;
std::vector<Meaning*> d_meanings;
void _handleSelection(GtkWidget* list) throw();
void _handleClick(bool isDoubleClick, const char* text) throw(std::bad_alloc);
void _resetDisplay() throw();
void _createMeaning(const std::string& title, std::vector<std::string>& words)
throw(std::bad_alloc);
void _displayResults(const char* word) throw(Exception, std::bad_alloc);
void _displayAlternatives() throw(Exception, std::bad_alloc);
void _checkThesaurus() throw(Exception);
// static void _initResources() throw();
public:
Display(DialogMediator& parent) throw();
~Display() throw();
const Aiksaurus& getThesaurus() const throw();
GtkWidget* getDisplay() throw();
void search(const char* word) throw(std::bad_alloc);
void showMessage(const char* message) throw();
};
}
#endif // INCLUDED_DISPLAY_H
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "Exception.h"
namespace AiksaurusGTK_impl
{
const char* Exception::CANNOT_ALLOCATE_MEMORY =
"Critical Error: Cannot Allocate Memory\n"
"A memory request was denied. Please try to close some programs\n"
"and free up some memory.\n";
}
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_AIKSAURUS_GTK_EXCEPTION_H
#define INCLUDED_AIKSAURUS_GTK_EXCEPTION_H
namespace AiksaurusGTK_impl
{
class Exception
{
private:
const char* d_description;
public:
Exception(const char* description) throw()
: d_description(description) { }
const char* getDescription() const throw()
{ return d_description; }
static const char* CANNOT_ALLOCATE_MEMORY;
};
}
#endif // INCLUDED_AIKSAURUS_GTK_EXCEPTION_H
AM_CXXFLAGS = $(AIKSAURUS_CFLAGS) -Wall -I../.. -I$(top_srcdir)/base
lib_LTLIBRARIES = libAiksaurusGtk3.la
libAiksaurusGtk3_la_LDFLAGS = -no-undefined -release $(LT_RELEASE) -export-dynamic
libAiksaurusGtk3_la_LIBADD = $(AIKSAURUS_LIBS)
libAiksaurusGtk3_la_SOURCES = \
AiksaurusGTK.cpp \
AiksaurusGTK_histlist.cpp \
AiksaurusGTK_history.cpp \
AiksaurusGTK_picbutton.cpp \
AiksaurusGTK_strlist.cpp \
AiksaurusGTK_utils.cpp \
Display.cpp \
Exception.cpp \
Meaning.cpp \
Replacebar.cpp \
Toolbar.cpp \
AiksaurusGTK-C.cpp
noinst_HEADERS = \
AiksaurusGTK.h \
AiksaurusGTK-C.h
OTHERHEADERS = \
AiksaurusGTK_histlist.h \
AiksaurusGTK_history.h \
AiksaurusGTK_picbutton.h \
AiksaurusGTK_strlist.h \
AiksaurusGTK_utils.h \
DialogMediator.h \
Display.h \
Exception.h \
Meaning.h \
Replacebar.h \
Toolbar.h
EXTRA_DIST = $(OTHERHEADERS)
// only for clist. todo: use treeview
#undef GTK_DISABLE_DEPRECATED
#include "Meaning.h"
#include "Display.h"
#include <cctype>
using namespace std;
namespace AiksaurusGTK_impl
{
static void ucwords(string& str) throw()
{
bool ws = true;
for(int i = 0;i < static_cast<int>(str.size());++i)
{
if (isspace(str[i]))
ws = true;
else if (ws)
{
str[i] = toupper(str[i]);
ws = false;
}
}
}
Meaning::Meaning(const string& title, vector<string>& words, Display& display)
throw(bad_alloc)
: d_title(title), d_words(words), d_display(display), d_lists(4), d_models(4)
{
d_masterLayout = gtk_event_box_new();
ucwords(d_title);
gtk_widget_set_name(d_masterLayout, "ybg");
d_mainLayout = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add( GTK_CONTAINER(d_masterLayout), d_mainLayout );
d_labelLayout = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_box_pack_start( GTK_BOX(d_mainLayout), d_labelLayout, 0, 0, 2);
d_label = gtk_label_new(d_title.c_str());
gtk_widget_set_name(d_label, "mst");
gtk_label_set_justify( GTK_LABEL(d_label), GTK_JUSTIFY_LEFT );
gtk_box_pack_start( GTK_BOX(d_labelLayout), d_label, 0, 0, 4 );
d_subLayout = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start( GTK_BOX(d_mainLayout), d_subLayout, 0, 0, 0 );
int i;
for(i = 0;i < 4;++i)
{
d_models[i] = gtk_list_store_new (1, G_TYPE_STRING);
d_lists[i] = gtk_tree_view_new_with_model(GTK_TREE_MODEL(d_models[i]));
gtk_container_set_border_width( GTK_CONTAINER(d_lists[i]), 0 );
gtk_widget_set_name(d_lists[i], "wbg"); // <-- this one!!
gtk_box_pack_start( GTK_BOX(d_subLayout), d_lists[i], 1, 1, 0 );
g_signal_connect(
G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(d_lists[i]))), "changed",
G_CALLBACK(_wordclick), this
);
}
int n = d_words.size();
int q = n / 4;
int r = n % 4;
int stop1, stop2, stop3;
switch(r)
{
case 0:
stop1 = q;
stop2 = stop1 + q;
stop3 = stop2 + q;
break;
case 1:
stop1 = q + 1;
stop2 = stop1 + q;
stop3 = stop2 + q;
break;
case 2:
stop1 = q + 1;
stop2 = stop1 + (q + 1);
stop3 = stop2 + q;
break;
default: // r = 3
stop1 = q + 1;
stop2 = stop1 + (q + 1);
stop3 = stop2 + (q + 1);
break;
}
GtkTreeIter iter;
for(i = 0;i < stop1;++i)
{
const char* str = d_words[i].c_str();
gtk_list_store_append(d_models[0], &iter);
gtk_list_store_set (d_models[0], &iter, 0, const_cast<char**>(&str), -1);
}
for(; i < stop2;++i)
{
const char* str = d_words[i].c_str();
gtk_list_store_append(d_models[1], &iter);
gtk_list_store_set (d_models[1], &iter, 0, const_cast<char**>(&str), -1);
}
for(; i < stop3;++i)
{
const char* str = d_words[i].c_str();
gtk_list_store_append(d_models[2], &iter);
gtk_list_store_set (d_models[2], &iter, 0, const_cast<char**>(&str), -1);
}
for(; i < static_cast<int>(d_words.size());++i)
{
const char* str = d_words[i].c_str();
gtk_list_store_append(d_models[3], &iter);
gtk_list_store_set (d_models[3], &iter, 0, const_cast<char**>(&str), -1);
}
}
Meaning::~Meaning() throw()
{
}
GtkWidget* Meaning::getLayout() throw()
{
return d_masterLayout;
}
gint Meaning::_wordclick
(GtkTreeSelection *sel, gpointer data)
throw(std::bad_alloc)
{
Meaning *m = static_cast<Meaning*>(data);
GtkTreeView *tv = gtk_tree_selection_get_tree_view(sel);
GtkTreeModel *model = gtk_tree_view_get_model(tv);
m->d_display._handleSelection(GTK_WIDGET(tv));
GtkTreeIter iter;
if (gtk_tree_selection_get_selected (sel, &model, &iter))
{
char* text;
gtk_tree_model_get (model, 0, &text, -1);
GdkEvent *e = gtk_get_current_event ();
m->d_display._handleClick((e->type == GDK_2BUTTON_PRESS), text);
}
return 0;
}
void Meaning::unselectListsExcept(GtkWidget* list) throw()
{
for(int i = 0;i < static_cast<int>(d_lists.size());++i)
{
if (d_lists[i] != list)
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(d_lists[i])));
}
}
}
#ifndef INCLUDED_MEANING_H
#define INCLUDED_MEANING_H
#include <gtk/gtk.h>
#include <vector>
#include <string>
using namespace std;
namespace AiksaurusGTK_impl
{
class Display;
class Meaning
{
private:
string d_title;
vector<string> d_words;
Display& d_display;
vector<GtkWidget*> d_lists;
vector<GtkListStore*> d_models;
GtkWidget* d_masterLayout;
GtkWidget* d_mainLayout;
GtkWidget* d_labelLayout;
GtkWidget* d_subLayout;
GtkWidget* d_label;
static gint _wordclick(GtkTreeSelection *sel,
gpointer data) throw(std::bad_alloc);
public:
Meaning(const string& title, vector<string>& words, Display& display)
throw(std::bad_alloc);
~Meaning() throw();
GtkWidget* getLayout() throw();
void unselectListsExcept(GtkWidget* me) throw();
};
}
#endif // INCLUDED_MEANING_H
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "Replacebar.h"
#include "DialogMediator.h"
#include <gdk/gdkkeysyms.h>
namespace AiksaurusGTK_impl
{
Replacebar::Replacebar(DialogMediator& mediator) throw()
: d_mediator(mediator)
{
// Build GUI widgets.
d_replacebar_ptr = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
d_replacewith_label_ptr = gtk_label_new(" Replace with:");
d_replacewith_ptr = gtk_entry_new();
d_replacebutton_hold_ptr = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
d_replacebutton_ptr = gtk_button_new_with_label(" Replace ");
d_cancelbutton_ptr = gtk_button_new_with_label("Cancel");
// Add them to the main hbox.
gtk_box_pack_start(GTK_BOX(d_replacebar_ptr), d_replacewith_label_ptr, 0, 0, 0);
gtk_box_pack_start(GTK_BOX(d_replacebar_ptr), d_replacewith_ptr, 0, 0, 2);
gtk_box_pack_end(GTK_BOX(d_replacebar_ptr), d_replacebutton_hold_ptr, 0, 0, 5);
gtk_box_pack_start(GTK_BOX(d_replacebutton_hold_ptr), d_replacebutton_ptr, 0, 0, 0);
gtk_box_pack_start(GTK_BOX(d_replacebutton_hold_ptr), d_cancelbutton_ptr, 1, 1, 0);
// Connect relevant signals.
g_signal_connect(
G_OBJECT(d_replacewith_ptr), "key-press-event",
G_CALLBACK(_keyPressed), this
);
g_signal_connect(
G_OBJECT(d_replacebutton_ptr), "clicked",
G_CALLBACK(_replaceClicked), this
);
g_signal_connect(
G_OBJECT(d_cancelbutton_ptr), "clicked",
G_CALLBACK(_cancelClicked), this
);
}
Replacebar::~Replacebar() throw()
{
}
void Replacebar::_cancelClicked(GtkWidget*, gpointer data)
{
Replacebar* rb = static_cast<Replacebar*>(data);
rb->d_mediator.eventCancel();
}
void Replacebar::_replaceClicked(GtkWidget*, gpointer data)
{
Replacebar* rb = static_cast<Replacebar*>(data);
rb->d_mediator.eventReplace( rb->getText() );
}
void Replacebar::_keyPressed(GtkWidget* w, GdkEventKey* k, gpointer data)
{
if (k->keyval == GDK_KEY_Return)
_replaceClicked(w, data);
}
GtkWidget* Replacebar::getReplacebar() throw()
{
return d_replacebar_ptr;
}
const char* Replacebar::getText() const throw()
{
return gtk_entry_get_text(GTK_ENTRY(d_replacewith_ptr));
}
void Replacebar::setText(const char* word) throw()
{
gtk_entry_set_text(GTK_ENTRY(d_replacewith_ptr), word);
}
}
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_AIKSAURUS_GTK_REPLACEBAR_H
#define INCLUDED_AIKSAURUS_GTK_REPLACEBAR_H
#include <gtk/gtk.h>
namespace AiksaurusGTK_impl
{
class DialogMediator;
class Replacebar
{
private:
DialogMediator& d_mediator;
GtkWidget *d_replacebar_ptr; // layout hbox
GtkWidget *d_replacewith_label_ptr; // says "Replace With"
GtkWidget *d_replacebutton_hold_ptr; // for some padding
GtkWidget *d_replacebutton_ptr; // replace button
GtkWidget *d_cancelbutton_ptr; // cancel button
GtkWidget *d_replacewith_ptr; // text entry
// GUI Callbacks. These will invoke the mediator as needed.
// Note that these functions might throw just about anything.
static void _cancelClicked(GtkWidget* w, gpointer data);
static void _replaceClicked(GtkWidget* w, gpointer data);
static void _keyPressed(GtkWidget* w, GdkEventKey* k, gpointer data);
public:
Replacebar(DialogMediator& mediator) throw();
// Warning: You need to call gtk_widget_destroy on getReplacebar(), or
// destroy whatever widget you put it in. The destructor will NOT free
// up the memory used by the GUI widgets.
~Replacebar() throw();
// getReplacebar(): return layout widget for replace bar.
GtkWidget* getReplacebar() throw();
// getText(): return current text of replace text field.
const char* getText() const throw();
// setText(): reset text of replace text field to something new.
void setText(const char* str) throw();
};
}
#endif // INCLUDED_AIKSAURUS_GTK_REPLACEBAR_H
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#include "Toolbar.h"
#include "AiksaurusGTK_picbutton.h"
#include "DialogMediator.h"
#include <gdk/gdkkeysyms.h>
namespace AiksaurusGTK_impl
{
Toolbar::Toolbar(DialogMediator& mediator, GtkWidget* window) throw(std::bad_alloc)
: d_mediator(mediator),
d_searchbar_words(12),
d_ishistorymove(false),
d_searchhack(false),
d_window_ptr(window)
{
d_toolbar_ptr = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
// Create back button and menu
d_backbutton_box_ptr = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
d_backbutton_ptr = new AiksaurusGTK_picbutton(d_window_ptr, "go-previous");
d_backbutton_ptr->addMenu(d_history.list_back(), G_CALLBACK(_backMenuClicked), this);
d_backbutton_ptr->limitVisibleOptions(10);
_setTooltip(d_backbutton_ptr->getButton(), "Back");
// Create forward button and menu
d_forwardbutton_ptr = new AiksaurusGTK_picbutton(d_window_ptr, "go-next");
d_forwardbutton_ptr->addMenu(d_history.list_forward(),
G_CALLBACK(_forwardMenuClicked), this);
d_forwardbutton_ptr->limitVisibleOptions(10);
_setTooltip(d_forwardbutton_ptr->getButton(), "Forward");
// Create search dropdown bar.
d_searchbar_label_ptr = gtk_label_new(" Look up:");
d_searchbar_ptr = gtk_combo_box_text_new_with_entry();
_setTooltip(GTK_WIDGET(gtk_bin_get_child(GTK_BIN(d_searchbar_ptr))), "Enter word to look up");
// Create search button
d_searchbutton_ptr = new AiksaurusGTK_picbutton(d_window_ptr, "go-jump");
_setTooltip(d_searchbutton_ptr->getButton(), "Find Synonyms");
// Add all widgets to the toolbar layout box.
gtk_box_pack_start(GTK_BOX(d_backbutton_box_ptr), d_backbutton_ptr->getButton(), 0, 0, 0);
gtk_box_pack_start(GTK_BOX(d_backbutton_box_ptr), d_backbutton_ptr->getMenuButton(), 0, 0, 0);
gtk_box_pack_start(GTK_BOX(d_toolbar_ptr), d_backbutton_box_ptr, 0, 0, 4);
gtk_box_pack_start(GTK_BOX(d_toolbar_ptr), d_forwardbutton_ptr->getButton(), 0, 0, 0);
gtk_box_pack_start(GTK_BOX(d_toolbar_ptr), d_forwardbutton_ptr->getMenuButton(), 0, 0, 0);
gtk_box_pack_start(GTK_BOX(d_toolbar_ptr), d_searchbar_label_ptr, 0, 0, 5);
gtk_box_pack_start(GTK_BOX(d_toolbar_ptr), d_searchbar_ptr, 1, 1, 5);
gtk_box_pack_start(GTK_BOX(d_toolbar_ptr), d_searchbutton_ptr->getButton(), 0, 0, 4);
// Connect all relevant signals.
g_signal_connect(G_OBJECT(d_backbutton_ptr->getButton()), "clicked",
G_CALLBACK(_backClicked), this);
g_signal_connect(G_OBJECT(d_forwardbutton_ptr->getButton()), "clicked",
G_CALLBACK(_forwardClicked), this);
g_signal_connect(G_OBJECT(d_searchbutton_ptr->getButton()), "clicked",
G_CALLBACK(_searchClicked), this);
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN(d_searchbar_ptr))), "activate",
G_CALLBACK(_searchBarActivate), this);
g_signal_connect(G_OBJECT(GTK_COMBO_BOX(d_searchbar_ptr)), "popdown",
G_CALLBACK(_searchBarHide), this);
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN(d_searchbar_ptr))), "changed",
G_CALLBACK(_searchBarChanged), this);
_updateNavigation();
}
Toolbar::~Toolbar() throw()
{
}
void Toolbar::_updateNavigation() throw(std::bad_alloc)
{
if (d_history.size_back())
d_backbutton_ptr->enable();
else
d_backbutton_ptr->disable();
if (d_history.size_forward())
d_forwardbutton_ptr->enable();
else
d_forwardbutton_ptr->disable();
_setTooltip(d_backbutton_ptr->getButton(), d_history.tip_back());
_setTooltip(d_forwardbutton_ptr->getButton(), d_history.tip_forward());
d_backbutton_ptr->updateMenuOptions();
d_forwardbutton_ptr->updateMenuOptions();
}
void Toolbar::search(const char* str) throw(std::bad_alloc)
{
if (!d_ishistorymove)
d_history.search(str);
GtkComboBoxText *combo = GTK_COMBO_BOX_TEXT(d_searchbar_ptr);
_updateNavigation();
d_searchbar_words.addItem(str);
gtk_combo_box_text_remove_all(combo);
const GList *ptr = d_searchbar_words.list();
for (; ptr; ptr = ptr->next)
gtk_combo_box_text_append_text(combo, reinterpret_cast<const char*>(ptr->data));
}
void Toolbar::_setTooltip(GtkWidget* w, const char* str) throw()
{
gtk_widget_set_tooltip_text(w, str);
}
void Toolbar::focus() throw()
{
gtk_window_set_focus(GTK_WINDOW(d_window_ptr), gtk_bin_get_child(GTK_BIN(d_searchbar_ptr)));
}
const char* Toolbar::getText() const throw()
{
return gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(d_searchbar_ptr))));
}
GtkWidget* Toolbar::getToolbar() throw()
{
return d_toolbar_ptr;
}
void Toolbar::_backClicked(GtkWidget*, gpointer data) throw()
{
Toolbar* tb = static_cast<Toolbar*>(data);
tb->d_history.move_back();
tb->d_ishistorymove = true;
tb->d_mediator.eventSearch( tb->d_history.current() );
tb->d_ishistorymove = false;
}
void Toolbar::_backMenuClicked(GList* element, gpointer data) throw()
{
Toolbar* tb = static_cast<Toolbar*>(data);
tb->d_history.move_back_to(element);
tb->d_ishistorymove = true;
tb->d_mediator.eventSearch( tb->d_history.current() );
tb->d_ishistorymove = false;
}
void Toolbar::_forwardClicked(GtkWidget*, gpointer data) throw()
{
Toolbar* tb = static_cast<Toolbar*>(data);
tb->d_history.move_forward();
tb->d_ishistorymove = true;
tb->d_mediator.eventSearch( tb->d_history.current() );
tb->d_ishistorymove = false;
}
void Toolbar::_forwardMenuClicked(GList* element, gpointer data) throw()
{
Toolbar* tb = static_cast<Toolbar*>(data);
tb->d_history.move_forward_to(element);
tb->d_ishistorymove = true;
tb->d_mediator.eventSearch( tb->d_history.current() );
tb->d_ishistorymove = false;
}
void Toolbar::_searchBarChanged(GtkWidget*, gpointer data) throw()
{
Toolbar* tb = static_cast<Toolbar*>(data);
bool popup_visible;
g_object_get (tb->d_searchbar_ptr, "popup-shown", &popup_visible, NULL);
if (popup_visible)
tb->d_searchhack = true;
}
void Toolbar::_searchBarHide(GtkWidget*, gpointer data) throw()
{
Toolbar* tb = static_cast<Toolbar*>(data);
if (tb->d_searchhack)
tb->d_mediator.eventSearch( tb->getText() );
tb->d_searchhack = false;
}
void Toolbar::_searchBarActivate(GtkWidget* w, gpointer data) throw()
{
_searchClicked(w, data);
}
void Toolbar::_searchClicked(GtkWidget*, gpointer data) throw()
{
Toolbar* tb = static_cast<Toolbar*>(data);
tb->d_mediator.eventSearch( tb->getText() );
}
}
/*
* AiksaurusGTK - A GTK interface to the Aiksaurus library
* Copyright (C) 2001 by Jared Davis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You 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.
*/
#ifndef INCLUDED_AIKSAURUS_GTK_TOOLBAR_H
#define INCLUDED_AIKSAURUS_GTK_TOOLBAR_H
#include "AiksaurusGTK_history.h"
#include "AiksaurusGTK_histlist.h"
#include <gtk/gtk.h>
#include <new>
class AiksaurusGTK_picbutton;
namespace AiksaurusGTK_impl
{
class DialogMediator;
class Toolbar
{
private:
Toolbar(const Toolbar& rhs);
Toolbar& operator=(const Toolbar& rhs);
DialogMediator& d_mediator;
AiksaurusGTK_history d_history;
AiksaurusGTK_histlist d_searchbar_words;
bool d_ishistorymove;
bool d_searchhack;
GtkWidget* d_window_ptr;
GtkWidget* d_toolbar_ptr;
GtkWidget* d_backbutton_box_ptr;
AiksaurusGTK_picbutton* d_backbutton_ptr;
AiksaurusGTK_picbutton* d_forwardbutton_ptr;
AiksaurusGTK_picbutton* d_searchbutton_ptr;
GtkWidget* d_searchbar_ptr;
GtkWidget* d_searchbar_label_ptr;
void _updateNavigation() throw(std::bad_alloc);
void _setTooltip(GtkWidget* w, const char* str) throw();
static void _backClicked(GtkWidget* w, gpointer data) throw();
static void _backMenuClicked(GList* element, gpointer data) throw();
static void _forwardClicked(GtkWidget* w, gpointer data) throw();
static void _forwardMenuClicked(GList* element, gpointer data) throw();
static void _searchBarChanged(GtkWidget* w, gpointer data) throw();
static void _searchBarShow(GtkWidget* w, gpointer data) throw();
static void _searchBarHide(GtkWidget* w, gpointer data) throw();
static void _searchBarActivate(GtkWidget* w, gpointer d) throw();
static void _searchClicked(GtkWidget* w, gpointer data) throw();
public:
Toolbar(DialogMediator& mediator, GtkWidget* window) throw(std::bad_alloc);
~Toolbar() throw();
GtkWidget* getToolbar() throw();
const char* getText() const throw();
void focus() throw();
void search(const char* str) throw(std::bad_alloc);
};
}
#endif // INCLUDED_AIKSAURUS_GTK_TOOLBAR_H
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -198,8 +198,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -198,8 +198,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#ifdef WIN32 #ifdef WIN32
#include "../win/AiksaurusApp.h" #include "../win/AiksaurusApp.h"
#else #else
#include <AiksaurusGTK.h> #include <../aiksaurusgtk3/AiksaurusGTK.h>
#endif #endif
#include "xap_Module.h" #include "xap_Module.h"
#include "xap_App.h" #include "xap_App.h"
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -181,8 +181,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -181,8 +181,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -257,8 +257,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -257,8 +257,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -200,8 +200,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -200,8 +200,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -257,8 +257,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -257,8 +257,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
...@@ -268,7 +268,7 @@ BabelFish_addToMenus() ...@@ -268,7 +268,7 @@ BabelFish_addToMenus()
// We have to add our EditMethod to the application's EditMethodList // We have to add our EditMethod to the application's EditMethodList
// so that the application will know what callback to call when a call // so that the application will know what callback to call when a call
// to "AiksaurusABI_invoke" is received. // to "BabelFish_invoke" is received.
pEMC->addEditMethod(myEditMethod); pEMC->addEditMethod(myEditMethod);
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -181,8 +181,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -181,8 +181,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -257,8 +257,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -257,8 +257,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
# Makefile.in generated by automake 1.13.4 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2013 Free Software Foundation, Inc.
...@@ -199,8 +199,6 @@ ACLOCAL = @ACLOCAL@ ...@@ -199,8 +199,6 @@ ACLOCAL = @ACLOCAL@
AF_CPPFLAGS = @AF_CPPFLAGS@ AF_CPPFLAGS = @AF_CPPFLAGS@
AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@ AF_TEST_CPPFLAGS = @AF_TEST_CPPFLAGS@
AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@ AIKSAURUS_CFLAGS = @AIKSAURUS_CFLAGS@
AIKSAURUS_GTK_CFLAGS = @AIKSAURUS_GTK_CFLAGS@
AIKSAURUS_GTK_LIBS = @AIKSAURUS_GTK_LIBS@
AIKSAURUS_LIBS = @AIKSAURUS_LIBS@ AIKSAURUS_LIBS = @AIKSAURUS_LIBS@
ALL_PLUGINS = @ALL_PLUGINS@ ALL_PLUGINS = @ALL_PLUGINS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment