Commit c1fe89b1 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

removed check for gtkhtml2 and added a check for wekbit instead.

2008-06-10  Sven Neumann  <sven@gimp.org>

	* configure.in: removed check for gtkhtml2 and added a check for
	wekbit instead.

	* INSTALL: document the changed dependency.

	* plug-ins/help-browser/Makefile.am
	* plug-ins/help-browser/dialog.[ch]: ported the help-browser to
	webkit. Offers the same functionality as before and some more.

	* plug-ins/help-browser/help-browser.c: some cleanup.

svn path=/trunk/; revision=25913
parent 65de2f5d
2008-06-10 Sven Neumann <sven@gimp.org>
* configure.in: removed check for gtkhtml2 and added a check for
wekbit instead.
* INSTALL: document the changed dependency.
* plug-ins/help-browser/Makefile.am
* plug-ins/help-browser/dialog.[ch]: ported the help-browser to
webkit. Offers the same functionality as before and some more.
* plug-ins/help-browser/help-browser.c: some cleanup.
2008-06-10 Sven Neumann <sven@gimp.org>
* plug-ins/help/gimphelplocale.c: added some sanity checks.
......
......@@ -56,7 +56,7 @@ header files installed.
7. You may want to install other third party libraries or programs
that are needed for some of the available plugins. We recommend
to check that the following libraries are installed: libpng,
libjpeg, libpoppler, libtiff, gtkhtml-2, libmng, librsvg, libwmf.
libjpeg, libpoppler, libtiff, webkit, libmng, librsvg, libwmf.
8. The Python extension requires Python development headers to be
present. You will also need PyGTK and the respective development
......@@ -150,8 +150,8 @@ These are:
use --without-mng to disable it expliticely. The same switch exists
for aalib, use --without-aa if you run into problems.
--without-gtkhtml2. If for some reason you don't want to build the
helpbrowser plug-in, you can use --without-gtkhtml2 to disable
--without-webkit. If for some reason you don't want to build the
helpbrowser plug-in, you can use --without-webkit to disable
it explicitly.
--without-svg. If for some reason you want to build GIMP without
......
......@@ -49,7 +49,7 @@ m4_define([pangoft2_required_version], [1.18.0])
m4_define([fontconfig_required_version], [2.2.0])
m4_define([cairo_required_version], [1.4.10])
m4_define([gtkdoc_required_version], [1.0])
m4_define([gtkhtml2_required_version], [2.0.0])
m4_define([webkit_required_version], [0.1])
m4_define([alsa_required_version], [1.0.0])
m4_define([rsvg_required_version], [2.14.0])
m4_define([wmf_required_version], [0.2.8])
......@@ -1202,23 +1202,29 @@ AC_SUBST(XPM)
AC_SUBST(LIBXPM)
####################
# Check for gtkhtml2
####################
######################
# Check for webkit-1.0
######################
AC_ARG_WITH(gtkhtml2, [ --without-gtkhtml2 build without gtkhtml2 support])
AC_ARG_WITH(webkit, [ --without-webkit don't build the help-browser plug-in])
have_gtkhtml2=no
if test "x$with_gtkhtml2" != xno; then
PKG_CHECK_MODULES(GTKHTML2, libgtkhtml-2.0 >= gtkhtml2_required_version,
have_gtkhtml2=yes,
have_webkit=no
if test "x$with_webkit" != xno; then
PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= webkit_required_version,
have_webkit=yes,
AC_MSG_RESULT([no])
have_gtkhtml2="no (GtkHtml2 not found)")
have_webkit="no (WebKit not found)")
else
have_gtkhtml2="no (GtkHtml2 support disabled)"
have_webkit="no (WebKit support disabled)"
fi
if test "x$have_webkit" = xyes; then
AC_CHECK_LIB(webkit-1.0, webkit_web_view_set_zoom_level,
[AC_DEFINE(HAVE_WEBKIT_ZOOM_API, 1,
[Define to 1 if webkit has zoom API])])
fi
AM_CONDITIONAL(BUILD_HELP_BROWSER, test "x$have_gtkhtml2" = xyes)
AM_CONDITIONAL(BUILD_HELP_BROWSER, test "x$have_webkit" = xyes)
###################
......@@ -2095,7 +2101,7 @@ Optional Features:
Optional Plug-Ins:
Ascii Art: $have_libaa
Help Browser: $have_gtkhtml2
Help Browser: $have_webkit
LCMS: $have_lcms
JPEG: $jpeg_ok
MNG: $have_libmng
......
## Process this file with automake to produce Makefile.in
libgimphelp = $(top_builddir)/plug-ins/help/libgimphelp.a
libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
libgimphelp = $(top_builddir)/plug-ins/help/libgimphelp.a
if OS_WIN32
mwindows = -mwindows
......@@ -21,7 +22,7 @@ libexec_PROGRAMS = help-browser
INCLUDES = \
-I$(top_srcdir) \
$(GTKHTML2_CFLAGS) \
$(WEBKIT_CFLAGS) \
-I$(includedir)
LDADD = \
......@@ -33,7 +34,7 @@ LDADD = \
$(libgimpcolor) \
$(libgimpmath) \
$(libgimpbase) \
$(GTKHTML2_LIBS) \
$(WEBKIT_LIBS) \
$(GIO_LIBS) \
$(RT_LIBS) \
$(INTLLIBS)
......@@ -46,8 +47,6 @@ help_browser_sources = \
help-browser.c \
dialog.c \
dialog.h \
queue.c \
queue.h \
uri.c \
uri.h
......
This diff is collapsed.
......@@ -27,12 +27,10 @@
void browser_dialog_open (void);
void browser_dialog_load (const gchar *ref,
gboolean add_to_queue);
void browser_dialog_load (const gchar *uri);
void browser_dialog_make_index (GimpHelpDomain *domain,
GimpHelpLocale *locale);
void browser_dialog_goto_index (const gchar *ref);
#endif /* ! __DIALOG_H__ */
......@@ -46,19 +46,23 @@
/* forward declarations */
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void temp_proc_install (void);
static void temp_proc_run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void temp_proc_install (void);
static void temp_proc_run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gboolean help_browser_show_help (const gchar *help_domain,
const gchar *help_locales,
const gchar *help_id);
/* local variables */
......@@ -110,7 +114,7 @@ run (const gchar *name,
GimpParam **return_vals)
{
GimpRunMode run_mode = param[0].data.d_int32;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
static GimpParam values[1];
......@@ -209,7 +213,6 @@ temp_proc_run (const gchar *name,
/* make sure all the arguments are there */
if (nparams == 3)
{
GimpHelpDomain *domain;
const gchar *help_domain = GIMP_HELP_DEFAULT_DOMAIN;
const gchar *help_locales = NULL;
const gchar *help_id = GIMP_HELP_DEFAULT_ID;
......@@ -223,36 +226,51 @@ temp_proc_run (const gchar *name,
if (param[2].data.d_string && strlen (param[2].data.d_string))
help_id = param[2].data.d_string;
domain = gimp_help_lookup_domain (help_domain);
if (domain)
if (! help_browser_show_help (help_domain, help_locales, help_id))
{
GList *locales = gimp_help_parse_locales (help_locales);
GimpHelpLocale *locale;
gchar *full_uri;
gboolean fatal_error;
gtk_main_quit ();
}
}
full_uri = gimp_help_domain_map (domain, locales, help_id, NULL,
&locale, &fatal_error);
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
}
if (full_uri)
{
browser_dialog_load (full_uri, TRUE);
browser_dialog_make_index (domain, locale);
browser_dialog_goto_index (full_uri);
static gboolean
help_browser_show_help (const gchar *help_domain,
const gchar *help_locales,
const gchar *help_id)
{
GimpHelpDomain *domain;
gboolean success = TRUE;
g_free (full_uri);
}
else if (fatal_error)
{
gtk_main_quit ();
}
domain = gimp_help_lookup_domain (help_domain);
if (domain)
{
GList *locales = gimp_help_parse_locales (help_locales);
GimpHelpLocale *locale;
gchar *uri;
gboolean fatal_error;
uri = gimp_help_domain_map (domain, locales, help_id, NULL,
&locale, &fatal_error);
if (uri)
{
browser_dialog_make_index (domain, locale);
browser_dialog_load (uri);
g_list_foreach (locales, (GFunc) g_free, NULL);
g_list_free (locales);
g_free (uri);
}
else if (fatal_error)
{
success = FALSE;
}
g_list_foreach (locales, (GFunc) g_free, NULL);
g_list_free (locales);
}
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
return success;
}
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