Commit 84c9458c authored by Kristof Vansant's avatar Kristof Vansant Committed by Mikael Hallendal

reviewed by: Mikael Hallendal


2005-03-25  Kristof Vansant  <de_lupus@pandora.be>

	reviewed by: Mikael Hallendal

	* autogen.sh:
	* configure.in:
	- Depend on GTK+ 2.6
	- Remove dependency on libgnome(ui).
	* src/dh-html.c:
	* src/dh-keyword-model.c:
	* src/dh-main.c: (main):
	* src/dh-parser.c:
	* src/dh-search.c:
	* src/dh-util.c: (dh_dot_dir):
	* src/dh-window.c: (window_activate_about):
	- Use GTK+ for about box instead of libgnomeui.
	- Fixed #167213.
parent 039a2ffa
2005-03-25 Kristof Vansant <de_lupus@pandora.be>
reviewed by: Mikael Hallendal
* autogen.sh:
* configure.in:
- Depend on GTK+ 2.6
- Remove dependency on libgnome(ui).
* src/dh-html.c:
* src/dh-keyword-model.c:
* src/dh-main.c: (main):
* src/dh-parser.c:
* src/dh-search.c:
* src/dh-util.c: (dh_dot_dir):
* src/dh-window.c: (window_activate_about):
- Use GTK+ for about box instead of libgnomeui.
- Fixed #167213.
2004-12-01 Mikael Hallendal <micke@imendio.com>
* src/dh-html.c:
......
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
......@@ -8,20 +14,27 @@ various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
......@@ -55,14 +68,16 @@ Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
......@@ -75,11 +90,11 @@ directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
......@@ -122,22 +137,32 @@ you can use the `configure' options `--x-includes=DIR' and
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
need to know the machine type.
If you are building compiler tools for cross-compiling, you can also
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
......@@ -150,20 +175,44 @@ default values for variables like `CC', `cache_file', and `prefix'.
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
......@@ -175,8 +224,6 @@ operates.
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
`configure' also accepts some other, not widely useful, options.
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
: ${AUTOCONF=autoconf}
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake-1.7}
: ${ACLOCAL=aclocal-1.7}
: ${LIBTOOLIZE=libtoolize}
: ${INTLTOOLIZE=intltoolize}
: ${LIBTOOL=libtool}
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.7
PKG_NAME=devhelp
ORIGDIR=`pwd`
cd $srcdir
PROJECT=devhelp
TEST_TYPE=-f
FILE=src/dh-main.c
CONFIGURE=configure.in
DIE=0
# if GNOME2_DIR set, modify ACLOCAL_FLAGS ...
if [ -n "$GNOME2_DIR" ]; then
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
fi
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have \`intltoolize' installed to compile $PROJECT."
echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.22.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.8.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
(grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
(test -f $srcdir/configure.in \
&& test -f $srcdir/src/dh-main.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
GETTEXTIZE=""
else
if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
GETTEXTIZE="glib-gettextize"
GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
else
GETTEXTIZE="gettextize"
GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
fi
$GETTEXTIZE --version < /dev/null > /dev/null 2>&1
if test $? -ne 0; then
echo
echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
echo "Get $GETTEXTIZE_URL"
echo "(or a newer version if it is available)"
DIE=1
fi
fi
fi
if test "$DIE" -eq 1; then
exit 1
fi
test $TEST_TYPE $FILE || {
echo "You must run this script in the top-level $PROJECT directory"
which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME CVS"
exit 1
}
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
case $CC in
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
for coin in .
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
for k in $macrodirs; do
if test -d $k; then
aclocalinclude="$aclocalinclude -I $k"
##else
## echo "**Warning**: No such directory \`$k'. Ignored."
fi
done
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
if grep "sed.*POTFILES" configure.in >/dev/null; then
: do nothing -- we still have an old unmodified configure.in
else
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
fi
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
echo "Running $LIBTOOLIZE..."
$LIBTOOLIZE --force --copy
fi
echo "Running $ACLOCAL $aclocalinclude ..."
$ACLOCAL $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running $AUTOHEADER..."
$AUTOHEADER
fi
echo "Running $AUTOMAKE --gnu $am_opt ..."
$AUTOMAKE --add-missing --gnu $am_opt
echo "Running $AUTOCONF ..."
$AUTOCONF
)
fi
done
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
cd "$ORIGDIR"
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PROJECT || exit 1
else
echo Skipping configure process.
fi
USE_GNOME2_MACROS=1 . gnome-autogen.sh
\ No newline at end of file
AC_INIT(src/Makefile.am)
AM_INIT_AUTOMAKE(devhelp, 0.9.3)
AM_INIT_AUTOMAKE(devhelp, 0.10)
AM_CONFIG_HEADER(config.h)
AM_SANITY_CHECK
......@@ -31,8 +31,7 @@ PKG_CHECK_MODULES(DEVHELP, [
gtk+-2.0 >= 2.2.0])
PKG_CHECK_MODULES(LIBDEVHELP, [
gtk+-2.0 >= 2.3.1
libgnomeui-2.0 >= 2.2.0
gtk+-2.0 >= 2.6.0
gnome-vfs-2.0 >= 2.2.0
libglade-2.0 >= 2.0.0
])
......
......@@ -24,8 +24,6 @@
#include <string.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-init.h>
#include <gtkmozembed.h>
#include "dh-util.h"
......
......@@ -20,7 +20,6 @@
*/
#include <gtk/gtktreemodel.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
#include "dh-link.h"
......
......@@ -29,11 +29,9 @@
#include <sys/un.h>
#include <libxml/parser.h>
#include <gconf/gconf.h>
#include <glib/gi18n.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtkmain.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-program.h>
#include <libgnomeui/gnome-ui-init.h>
#include <libgnomevfs/gnome-vfs-init.h>
#include <gtkmozembed.h>
......@@ -68,56 +66,54 @@ main (int argc, char **argv)
{
gchar *option_search = NULL;
gboolean option_quit = FALSE;
GnomeProgram *program;
/*GnomeProgram *program;*/
BaconMessageConnection *message_conn;
DhBase *base;
GtkWidget *window;
struct poptOption options[] = {
GOptionEntry options[] = {
{
"geometry",
'g',
POPT_ARG_STRING,
&geometry,
0,
G_OPTION_ARG_STRING,
&geometry,
N_("Specify the size and location of the window"),
N_("WIDTHxHEIGHT+XOFF+YOFF")
},
{
"search",
's',
POPT_ARG_STRING,
&option_search,
0,
G_OPTION_ARG_STRING,
&option_search,
_("Search for a function"),
NULL
},
{
"quit",
'q',
POPT_ARG_NONE,
&option_quit,
0,
G_OPTION_ARG_NONE,
&option_quit,
_("Quit any running Devhelp"),
NULL
},
{ NULL, '\0', 0, NULL, 0, NULL, NULL }
{ NULL, '\0', 0, 0, NULL, NULL, NULL }
};
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (PACKAGE);
/* Initialize i18n support */
gtk_set_locale ();
/* Initialize the widget set */
gtk_init_with_args (&argc, &argv,NULL,options,NULL,NULL);
g_thread_init (NULL);
program = gnome_program_init (PACKAGE, VERSION,
LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PROGRAM_STANDARD_PROPERTIES,
GNOME_PARAM_POPT_TABLE, options,
NULL);
LIBXML_TEST_VERSION;
gnome_vfs_init ();
dh_gecko_utils_init_services ();
//gtk_moz_embed_set_comp_path (MOZILLA_HOME);
......@@ -159,6 +155,7 @@ main (int argc, char **argv)
dh_window_search (DH_WINDOW (window), option_search);
}
gtk_widget_show (window);
gtk_main ();
......
......@@ -23,11 +23,12 @@
#include <string.h>
#include <errno.h>
#include <glib/gi18n.h>
#ifdef HAVE_LIBZ
#include "zlib.h"
#endif
#include <libgnome/gnome-i18n.h>
#include "dh-error.h"
#include "dh-link.h"
......
......@@ -21,6 +21,7 @@
#include <config.h>
#include <string.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkaccessible.h>
#include <gtk/gtkcellrenderertext.h>
......@@ -32,7 +33,7 @@
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtktreeview.h>
#include <gtk/gtktreeselection.h>
#include <libgnome/gnome-i18n.h>
#include "dh-marshal.h"
#include "dh-keyword-model.h"
......
......@@ -24,7 +24,6 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <libgnome/gnome-init.h>
#include <gtk/gtklabel.h>
#include "dh-util.h"
......@@ -105,7 +104,7 @@ dh_dot_dir (void)
{
if (!dot_dir) {
dot_dir = g_build_filename (g_get_home_dir (),
GNOME_DOT_GNOME,
".gnome2",
"devhelp",
NULL);
}
......
......@@ -20,22 +20,12 @@
#include <config.h>
#include <string.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkactiongroup.h>
#include <gtk/gtkframe.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkhpaned.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkmain.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtkuimanager.h>
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-about.h>
#include <libgnomeui/gnome-href.h>
#include <libgnomeui/gnome-stock-icons.h>
#include "dh-book-tree.h"
#include "dh-html.h"
......@@ -139,7 +129,7 @@ static GtkActionEntry actions[] = {
G_CALLBACK (window_activate_forward) },
/* About menu */
{ "About", GNOME_STOCK_ABOUT, NULL, NULL, NULL,
{ "About", GTK_STOCK_ABOUT, NULL, NULL, NULL,
G_CALLBACK (window_activate_about) }
};
......@@ -439,9 +429,7 @@ static void window_activate_forward (GtkAction *action, DhWindow *window)
static void window_activate_about (GtkAction *action,
DhWindow *window)
{
static GtkWidget *about = NULL;
GtkWidget *hbox;
GtkWidget *href;
const gchar *authors[] = {
"Mikael Hallendal <micke@imendio.com>",
......@@ -451,38 +439,22 @@ static void window_activate_about (GtkAction *action,
NULL
};
if (about != NULL) {
gtk_window_present (GTK_WINDOW (about));
return;
}
const gchar *documenters[] = {
NULL
};
about = gnome_about_new ("Devhelp", VERSION,
"",
_("A developer's help browser for GNOME 2"),
authors,
NULL,
NULL,
NULL);
const gchar *translator_credits = _("translator_credits");
gtk_window_set_transient_for (GTK_WINDOW (about), GTK_WINDOW (window));
g_signal_connect (about,
"destroy",
G_CALLBACK (gtk_widget_destroyed),
&about);
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (about)->vbox),
hbox, FALSE, FALSE, 0);
href = gnome_href_new ("http://www.imendio.com/projects/devhelp/",
_("Devhelp project page"));
gtk_box_pack_start (GTK_BOX (hbox), href,
TRUE, TRUE, 0);
href = gnome_href_new ("http://bugzilla.gnome.org/",
_("Bug report Devhelp"));
gtk_box_pack_start (GTK_BOX (hbox), href,
TRUE, TRUE, 0);
gtk_show_about_dialog(GTK_WINDOW (window),
"name",_("Devhelp"),
"version", VERSION,
"comments", _("A developer's help browser for GNOME 2"),
"authors", authors,
"documenters", documenters,
"translator-credits", strcmp(translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
"website", "http://www.imendio.com/projects/devhelp/",
NULL);
gtk_widget_show_all (about);
}
static void
......
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