Index: Makefile.am =================================================================== RCS file: /cvs/gnome/yelp/Makefile.am,v retrieving revision 1.12 diff -p -u -u -p -r1.12 Makefile.am --- Makefile.am 28 Oct 2004 15:25:54 -0000 1.12 +++ Makefile.am 29 Nov 2005 11:45:49 -0000 @@ -1,29 +1,29 @@ SUBDIRS = src stylesheets po data -@INTLTOOL_DESKTOP_RULE@ +ACLOCAL_AMFLAGS = -I m4 -DESKTOP_IN_FILES=yelp.desktop.in -DESKTOP_FILES=$(DESKTOP_IN_FILES:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ -Applicationsdir = $(datadir)/applications -Applications_DATA = $(DESKTOP_FILES) +desktopdir = $(datadir)/applications +desktop_in_files=yelp.desktop.in +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) yelpdatadir = $(datadir)/yelp yelpdata_DATA = important_docs.xml - EXTRA_DIST = \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ idl/GNOME_Yelp.idl \ important_docs.xml \ - $(DESKTOP_IN_FILES) \ - $(DESKTOP_FILES) + $(desktop_in_files) DISTCLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update -CLEANFILES = yelp.desktop +CLEANFILES = $(desktop_DATA) + +DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper Index: configure.in =================================================================== RCS file: /cvs/gnome/yelp/configure.in,v retrieving revision 1.194 diff -p -u -u -p -r1.194 configure.in --- configure.in 27 Nov 2005 22:10:57 -0000 1.194 +++ configure.in 29 Nov 2005 11:45:49 -0000 @@ -3,10 +3,11 @@ AC_INIT([yelp], [2.13.1], GNOME_COMMON_INIT -AC_CONFIG_SRCDIR(src/yelp-main.c) -AC_CONFIG_HEADERS(config.h) +AC_CONFIG_SRCDIR([src/yelp-main.c]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip]) AM_MAINTAINER_MODE AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}") @@ -16,6 +17,7 @@ AC_PATH_PROG(GCONFTOOL, gconftool-2) AM_GCONF_SOURCE_2 +AC_PROG_LN_S AC_PROG_CC AC_PROG_CXX AM_PROG_CC_STDC @@ -29,6 +31,16 @@ GNOME_DEBUG_CHECK GNOME_COMPILE_WARNINGS([maximum]) GNOME_CXX_WARNINGS +MORE_WARN_FLAGS= +DEPRECATION_FLAGS= +MOZILLA_WARN_CXXFLAGS="-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor" + +if test "x$enable_maintainer_mode" = "xyes"; then + AC_DEFINE([MAINTAINER_MODE],[1],[Define to enable 'maintainer-only' behaviour]) +# DEPRECATION_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED" + MOZILLA_WARN_CXXFLAGS="-Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth $MOZILLA_WARN_CXXFLAGS" +fi + if test "x$enable_debug" = "xyes"; then AC_DEFINE([YELP_DEBUG],[1],[Enable Yelp debugging]) AM_CFLAGS="$AM_CFLAGS -pedantic -ansi" @@ -134,73 +146,36 @@ fi AC_SUBST([YELP_SEARCH_CFLAGS]) AC_SUBST([YELP_SEARCH_LIBS]) -dnl ******* -dnl Mozilla -dnl ******* - -AC_MSG_CHECKING([which gecko to use]) - -AC_ARG_WITH([mozilla], - AS_HELP_STRING([--with-mozilla@<:@=mozilla|firefox|xulrunner|thunderbird@:>@], - [Which gecko engine to use (default: autodetect)])) - -GECKOS="firefox mozilla-firefox seamonkey mozilla xulrunner thunderbird mozilla-thunderbird" -gecko=$with_mozilla - -if test "x$gecko" = "x"; then - dnl Autodetect gecko - for g in $GECKOS; do - if $PKG_CONFIG --exists $g-xpcom; then - gecko=$g - break; - fi - done -fi - -if test "x$gecko" = "x"; then - AC_MSG_ERROR([No gecko found]) -elif ! ( echo "$GECKOS" | egrep "(^| )$gecko(\$| )" > /dev/null); then - AC_MSG_ERROR([Unknown gecko "$gecko" specified]) -fi - -AC_MSG_RESULT([$gecko]) - -case "$gecko" in -mozilla) min_version=1.7 flavour=mozilla ;; -seamonkey) min_version=1.0 flavour=mozilla ;; -*firefox) min_version=1.0 flavour=toolkit ;; -*thunderbird) min_version=1.0 flavour=toolkit ;; -xulrunner) min_version=1.8 flavour=toolkit ;; -esac +# ***** +# Gecko +# ***** -MOZILLA=$gecko -AC_SUBST([MOZILLA]) +GECKO_INIT([MOZILLA]) -PKG_CHECK_MODULES(MOZILLA_COMPONENT, $MOZILLA-gtkmozembed) +AC_SUBST([MOZILLA]) +AC_SUBST([MOZILLA_INCLUDE_ROOT]) +AC_SUBST([MOZILLA_HOME]) -MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-gtkmozembed`" -AC_SUBST(MOZILLA_INCLUDE_ROOT) +case "$MOZILLA" in +mozilla) gecko_min_version=1.7 ;; +seamonkey) gecko_min_version=1.0 ;; +*firefox) gecko_min_version=1.0 ;; +*thunderbird) gecko_min_version=1.0 ;; +xulrunner) gecko_min_version=1.8 ;; +esac -MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $MOZILLA-gtkmozembed`" -AC_SUBST(MOZILLA_HOME) +PKG_CHECK_MODULES([MOZILLA_COMPONENT],[$MOZILLA-gtkmozembed >= $gecko_min_version $MOZILLA-xpcom >= $gecko_min_version]) dnl Needed since gecko 1.8b2 AC_DEFINE([MOZILLA_INTERNAL_API],[1],[Define to have access to internal Mozilla APIs]) -AC_ARG_ENABLE([cpp-rtti], - AC_HELP_STRING([--enable-cpp-rtti],[Enable C++ RTTI]),[], - [enable_cpp_rtti=no]) - -if test "x$enable_cpp_rtti" = "xno"; then - AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS" -fi - AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/fastfind/nsITypeAheadFind.h], [AC_DEFINE([TYPEAHEADFIND],[1],[Define if we have toolkit's nsITypeAheadFind])]) -AC_DEFINE([MOZILLA_INTERNAL_API],[1],[Define to have access to internal mozilla APIs]) - +dnl ================= dnl Check for whereis +dnl ================= + case $host in *-linux-gnu | *-irix6*) AC_DEFINE(HAVE_MAN_WHEREIS, 1, [man(1) understands -w option]);; *-solaris*) AC_DEFINE(HAVE_MAN_DEBUG, 1, [man(1) has a -d debug option]);; @@ -246,14 +221,15 @@ dnl <= Check for bzip2 > 1.0.0 dnl => AC_SUBST(BZ_LIBS) -dnl Set flags - -AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS" -AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor" +# Set flags +AM_CPPFLAGS="$AM_CPPFLAGS $DEPRECATION_FLAGS" +AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS" +AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS $MOZILLA_WARN_CXXFLAGS" AC_SUBST([AM_CPPFLAGS]) AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_CXXFLAGS]) +AC_SUBST([AM_LDFLAGS]) AC_CONFIG_FILES([ Makefile Index: data/Makefile.am =================================================================== RCS file: /cvs/gnome/yelp/data/Makefile.am,v retrieving revision 1.12 diff -p -u -u -p -r1.12 Makefile.am --- data/Makefile.am 7 May 2005 16:44:29 -0000 1.12 +++ data/Makefile.am 29 Nov 2005 11:45:49 -0000 @@ -22,13 +22,13 @@ EXTRA_DIST = \ scrollkeeper.xml default.css \ yelp.js +install-data-local: $(schemas_DATA) if GCONF_SCHEMAS_INSTALL -install-data-local: if test -z "$(DESTDIR)"; then \ - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/data/yelp.schemas ; \ + for p in $^ ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p >&1 > /dev/null; \ + done \ fi -else -install-data-local: endif -CLEANFILES = yelp.schemas toc.xml man.xml +CLEANFILES = $(schemas_DATA) toc.xml man.xml Index: src/Makefile.am =================================================================== RCS file: /cvs/gnome/yelp/src/Makefile.am,v retrieving revision 1.85 diff -p -u -u -p -r1.85 Makefile.am --- src/Makefile.am 28 Oct 2005 20:37:37 -0000 1.85 +++ src/Makefile.am 29 Nov 2005 11:45:49 -0000 @@ -89,7 +89,7 @@ yelp_LDADD = \ $(BZ_LIBS) \ $(MOZILLA_COMPONENT_LIBS) -yelp_LDFLAGS = -R$(MOZILLA_HOME) +yelp_LDFLAGS = -R$(MOZILLA_HOME) $(AM_LDFLAGS) check_PROGRAMS = test-man-parser test-pager test-uri @@ -110,6 +110,8 @@ test_man_parser_CFLAGS = \ test_man_parser_LDADD = $(YELP_LIBS) $(Z_LIBS) $(BZ_LIBS) +test_man_parser_LDFLAGS = $(AM_LDFLAGS) + test_pager_SOURCES = \ yelp-db-pager.c yelp-db-pager.h \ yelp-error.c yelp-error.h \ @@ -132,6 +134,8 @@ test_pager_CFLAGS = \ test_pager_LDADD = $(YELP_LIBS) $(POPT_LIBS) $(Z_LIBS) $(BZ_LIBS) +test_pager_LDFLAGS = $(AM_LDFLAGS) + test_uri_SOURCES = \ yelp-utils.c yelp-utils.h \ test-uri.c @@ -146,6 +150,8 @@ test_uri_CFLAGS = \ test_uri_LDADD = $(YELP_LIBS) +test_uri_LDFLAGS = $(AM_LDFLAGS) + serverdir = $(libdir)/bonobo/servers server_in_files = GNOME_Yelp.server.in server_DATA = $(server_in_files:.server.in=.server) @@ -191,8 +197,8 @@ EXTRA_DIST = \ $(server_in_files) install-exec-local: - rm -f $(DESTDIR)$(bindir)/gnome-help - ln -s yelp $(DESTDIR)$(bindir)/gnome-help + rm -f $(DESTDIR)$(bindir)/gnome-help && \ + $(LN_S) yelp $(DESTDIR)$(bindir)/gnome-help distclean-local: if test $(srcdir) != .; then \ Index: src/Yelper.cpp =================================================================== RCS file: /cvs/gnome/yelp/src/Yelper.cpp,v retrieving revision 1.1 diff -p -u -u -p -r1.1 Yelper.cpp --- src/Yelper.cpp 16 May 2005 21:02:33 -0000 1.1 +++ src/Yelper.cpp 29 Nov 2005 11:45:50 -0000 @@ -31,11 +31,13 @@ #include "nsEmbedString.h" #define MOZILLA_INTERNAL_API 1 +#include #include #include #include #include #include +#include #include #include #include @@ -79,8 +81,13 @@ Yelper::Init () getter_AddRefs (mWebBrowser)); NS_ENSURE_TRUE (mWebBrowser, rv); - mWebBrowser->GetContentDOMWindow (getter_AddRefs (mDOMWindow)); - NS_ENSURE_TRUE (mDOMWindow, rv); + nsCOMPtr setup (do_QueryInterface (mWebBrowser, &rv)); + NS_ENSURE_SUCCESS (rv, rv); + + setup->SetProperty (nsIWebBrowserSetup::SETUP_USE_GLOBAL_HISTORY, PR_FALSE); + + rv = mWebBrowser->GetContentDOMWindow (getter_AddRefs (mDOMWindow)); + NS_ENSURE_SUCCESS (rv, rv); /* This will instantiate an about:blank doc if necessary */ nsCOMPtr domDocument; Index: src/yelp-window.c =================================================================== RCS file: /cvs/gnome/yelp/src/yelp-window.c,v retrieving revision 1.182 diff -p -u -u -p -r1.182 yelp-window.c --- src/yelp-window.c 22 Nov 2005 17:28:48 -0000 1.182 +++ src/yelp-window.c 29 Nov 2005 11:45:51 -0000 @@ -978,8 +978,8 @@ window_populate (YelpWindow *window) NULL); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (search_activated), window); -#endif gtk_action_group_add_action (priv->action_group, action); +#endif priv->ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (priv->ui_manager, priv->action_group, 0);