SOURCES: anjuta-devhelp.patch (NEW) - support for devhelp 0.22 from trunk v...

hawk hawk at pld-linux.org
Mon Dec 8 00:43:13 CET 2008


Author: hawk                         Date: Sun Dec  7 23:43:13 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- support for devhelp 0.22 from trunk version of anjuta

---- Files affected:
SOURCES:
   anjuta-devhelp.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/anjuta-devhelp.patch
diff -u /dev/null SOURCES/anjuta-devhelp.patch:1.1
--- /dev/null	Mon Dec  8 00:43:14 2008
+++ SOURCES/anjuta-devhelp.patch	Mon Dec  8 00:43:08 2008
@@ -0,0 +1,1006 @@
+diff -urN anjuta-2.24.2/configure.in trunk/configure.in
+--- anjuta-2.24.2/configure.in	2008-11-24 15:10:28.000000000 +0100
++++ trunk/configure.in	2008-12-07 23:31:30.579285390 +0100
+@@ -22,7 +22,7 @@
+ VTE_NEW_REQUIRED=0.13.1
+ LIBXML_REQUIRED=2.4.23
+ PANGO_REQUIRED=1.1.1
+-LIBDEVHELP_REQUIRED=0.13
++LIBDEVHELP_REQUIRED=0.22
+ GDL_REQUIRED=0.7.3
+ GNOMEBUILD_REQUIRED=0.3.0
+ GLADEUI_REQUIRED=3.2.0
+@@ -235,33 +195,15 @@
+ 	devhelp_enabled="no"
+ else
+ 	AC_MSG_RESULT(no)
+-	devhelp_old=yes
+ 	PKG_CHECK_MODULES(PLUGIN_DEVHELP, 
+-				[libdevhelp-1.0 >= $LIBDEVHELP_REQUIRED],
+-					 [
+-					    devhelp_old=no
+-						devhelp_enabled=yes
+-					 ], [
+-						   AC_MSG_RESULT([version >= 0.11 not found])
+-						   devhelp_old=yes
+-						   devhelp_enabled=no
+-					 ])
+-	if test x$devhelp_old = xyes; then
+-	  PKG_CHECK_MODULES(PLUGIN_DEVHELP, [libdevhelp-1.0 >= 0.9], [devhelp_enabled=yes], [devhelp_enabled=no])
+-		if test x$devhelp_enabled = xyes; then
+-	      AC_DEFINE(HAVE_OLD_DEVHELP, 1, [If old devhelp (>= 0.9 < 0.11) is installed])
+-		fi
+-	fi
++				[libdevhelp-1.0 >= $LIBDEVHELP_REQUIRED webkit-1.0],
++				[
++				    devhelp_enabled=yes
++				], [
++				    devhelp_enabled=no
++				])
+ fi
+ 
+-if test x$devhelp_enabled = xyes; then
+-	GECKO_HOME=`$PKGCONFIG_CONFIG --variable=gecko_home libdevhelp-1.0`
+-	if test x$GECKO_HOME != x; then
+-		ANJUTA_LDFLAGS="$ANJUTA_LDFLAGS -R$GECKO_HOME"
+-	fi
+-fi
+-AC_SUBST(ANJUTA_LDFLAGS)
+-
+ AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
+ 
+ dnl Check for Gnome Build
+@@ -1133,7 +1075,7 @@
+        echo "Building devhelp plugin: ...............................YES"
+ else
+        echo "Building devhelp plugin: ...............................NO"
+-       echo "        Requires devhelp"
++       echo "        Requires devhelp >= 0.22"
+ fi
+ 
+ if [ test x$libgraphviz_found = xyes ]; then
+diff -urN anjuta-2.24.2/plugins/devhelp/anjuta-devhelp.plugin trunk/plugins/devhelp/anjuta-devhelp.plugin
+--- anjuta-2.24.2/plugins/devhelp/anjuta-devhelp.plugin	2008-11-24 14:49:19.000000000 +0100
++++ trunk/plugins/devhelp/anjuta-devhelp.plugin	1970-01-01 01:00:00.000000000 +0100
+@@ -1,77 +0,0 @@
+-[Anjuta Plugin]
+-Name=API Help
+-Name[ar]=مساعدة واجهة برمجة التطبيقات
+-Name[be at latin]=Daviednik API
+-Name[ca]=Ajuda de l'API
+-Name[cs]=Nápověda k API
+-Name[da]=API-hjælp
+-Name[de]=API-Hilfe
+-Name[dz]=ཨེ་པི་ཨའི་གྲོགས་རམ།
+-Name[el]=Βοήθεια API
+-Name[en_GB]=API Help
+-Name[es]=Ayuda
+-Name[fi]=API-ohje
+-Name[fr]=Aide API
+-Name[gl]=Axuda de API
+-Name[hi]=API मद
+-Name[hu]=API súgó
+-Name[it]=Aiuto API
+-Name[ja]=APIヘルプ
+-Name[kn]=API ಸಹಾಯ
+-Name[ko]=API 도움말
+-Name[mk]=API помош
+-Name[ml]=എപിഐ സഹായം
+-Name[mr]=API मदत
+-Name[nb]=API-hjelp
+-Name[ne]=API मद्दत
+-Name[nl]=API-hulp
+-Name[pl]=Pomoc API
+-Name[pt]=Ajuda de API
+-Name[pt_BR]=Ajuda da API
+-Name[ru]=Справка по API
+-Name[sl]=API Pomoč
+-Name[sv]=API-hjälp
+-Name[th]=วิธีใช้ API
+-Name[tr]=API Yardımı
+-Name[vi]=Trợ giúp API
+-Name[zh_HK]=API求助
+-Name[zh_TW]=API求助
+-Description=Devhelp Plugin for Anjuta.
+-Description[ar]=ملحق Devhelp لأنجوتا.
+-Description[be at latin]=Plugin Devhelp dla Anjuty.
+-Description[ca]=Connector del DevHelp per a l'Anjuta.
+-Description[cs]=Zásuvný modul Devhelp pro Anjutu.
+-Description[da]=Devhelp-modul til Anjuta.
+-Description[de]=Devhelp-Komponente für Anjuta
+-Description[dz]=ཨན་ཇུ་ཊ་གི་དོན་ལུ་ཌེབ་གྲོགས་རམ་པ་ལག་ཨིན།
+-Description[el]=Πρόσθετη λειτουργία του devhelp για το Anjuta.
+-Description[en_GB]=Devhelp Plugin for Anjuta.
+-Description[es]=Complemento Devhelp para Anjuta.
+-Description[fi]=Anjutan devhelp-liitännäinen.
+-Description[fr]=Greffon Devhelp pour Anjuta
+-Description[gl]=Complemento Devhelp para Anjuta.
+-Description[he]=תוסף Devhelp ל-Anjuta
+-Description[hi]=अंजुटा के लिए डेव वहेल्प प्लगिन
+-Description[hu]=Devhelp bővítmény az Anjuta-hoz
+-Description[it]=Plugin Devhelp per Anjuta.
+-Description[ja]=Devhelp を利用するためのプラグインです
+-Description[kn]=Anjuta ಗಾಗಿನ ಪ್ಲಗ್ಇನ್ Devhelp.
+-Description[ko]=Anjuta 개발자 도움말(Devhelp) 플러그인.
+-Description[mk]=Devhelp приклучок за Anjuta.
+-Description[ml]=അഞ്ചുതയ്ക്കുള്ള Devhelp പ്ലഗ്ഗിന്‍
+-Description[mr]=Anjuta करीता डेव्हमदत प्लगइन.
+-Description[ne]=अन्जुताका लागि Devhelp प्लगइन ।
+-Description[pl]=Wtyczka Devhelp dla Anjuty.
+-Description[pt]=Plugin Devhelp para o Anjuta.
+-Description[pt_BR]=Plug-in Devhelp para Anjuta.
+-Description[ru]=Справка разработчика для Anjuta.
+-Description[sl]=Vstavek Anjute za Devhelp
+-Description[sv]=Devhelp-instick för Anjuta.
+-Description[th]=ปลั๊กอิน Devhelp สำหรับแอนจูตา
+-Description[tr]=Anjuta için Devhelp Eklentisi.
+-Description[vi]=Phần bổ sung Trợ giúp Phát triển cho Anjuta
+-Description[zh_HK]=給 Anjuta 的 Devhelp 外掛程式。
+-Description[zh_TW]=給 Anjuta 的 Devhelp 外掛程式。
+-Location=anjuta-devhelp:AnjutaDevhelp
+-Icon=anjuta-devhelp-plugin-48.png
+-Interfaces=IAnjutaHelp
+diff -urN anjuta-2.24.2/plugins/devhelp/anjuta-devhelp.ui trunk/plugins/devhelp/anjuta-devhelp.ui
+--- anjuta-2.24.2/plugins/devhelp/anjuta-devhelp.ui	2008-10-19 17:35:29.000000000 +0200
++++ trunk/plugins/devhelp/anjuta-devhelp.ui	2008-12-07 23:31:25.922619748 +0100
+@@ -1,14 +1,6 @@
+ <!--*- xml -*-->
+ <ui>
+ 	<menubar name="MenuMain">
+-		<menu name="MenuView" action="ActionMenuView">
+-			<menu name="Goto" action="ActionMenuGoto">
+-				<placeholder name="PlaceholderGotoMenus">
+-					<menuitem name="BackHelp" action="ActionDevhelpBack" />
+-					<menuitem name="ForwardHelp" action="ActionDevhelpForward" />
+-				</placeholder>
+-			</menu>
+-		</menu>
+ 		<placeholder name="PlaceHolderHelpMenus" >
+ 			<menu name="MenuHelp" action="ActionMenuHelp" >
+ 				<placeholder name="PlaceHolderHelpDevel" >
+@@ -24,7 +16,5 @@
+ 	</toolbar>
+ 	<toolbar name="ToolbarBrowser">		
+ 		<toolitem name="Context" action="ActionHelpContext" />
+-		<toolitem name="BackHelp" action="ActionDevhelpBack" />
+-		<toolitem name="ForwardHelp" action="ActionDevhelpForward" />
+ 	</toolbar>
+ </ui>
+diff -urN anjuta-2.24.2/plugins/devhelp/htmlview.c trunk/plugins/devhelp/htmlview.c
+--- anjuta-2.24.2/plugins/devhelp/htmlview.c	2008-10-19 17:35:29.000000000 +0200
++++ trunk/plugins/devhelp/htmlview.c	1970-01-01 01:00:00.000000000 +0100
+@@ -1,182 +0,0 @@
+-/*
+- *  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 Library 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "htmlview.h"
+-
+-#include <devhelp/dh-book-tree.h>
+-#include <devhelp/dh-html.h>
+-#include <devhelp/dh-preferences.h>
+-#include <devhelp/dh-search.h>
+-#include <devhelp/dh-base.h>
+-
+-static void html_view_class_init(HtmlViewClass *klass);
+-static void html_view_init(HtmlView *sp);
+-static void html_view_finalize(GObject *object);
+-
+-struct _HtmlViewPrivate {
+-	DhHtml* html;
+-	AnjutaDevhelp* devhelp;
+-	gchar* uri;
+-	guint idle_realize;
+-};
+-
+-G_DEFINE_TYPE(HtmlView, html_view, GTK_TYPE_HBOX)
+-
+-static gboolean
+-devhelp_html_open_uri_cb (DhHtml      *html,
+-			 const gchar *uri,
+-			 AnjutaDevhelp    *widget)
+-{
+-#ifdef HAVE_OLD_DEVHELP
+-	dh_book_tree_show_uri (DH_BOOK_TREE (widget->book_tree), uri);
+-#else
+-	dh_book_tree_select_uri (DH_BOOK_TREE (widget->book_tree), uri);
+-#endif
+-	return FALSE;
+-}
+-
+-static void
+-devhelp_html_location_changed_cb (DhHtml      *html,
+-				 const gchar *location,
+-				 AnjutaDevhelp    *widget)
+-{	
+-	anjuta_devhelp_check_history (widget);
+-}
+-
+-static gboolean
+-html_view_create_html(HtmlView* html_view)
+-{
+-	GtkWidget* view;
+-	HtmlViewPrivate* priv = html_view->priv;
+-
+-	priv->html = dh_html_new();
+-	
+-	if (!priv->html || !DH_IS_HTML(priv->html))	
+-		return TRUE; /* I think the idea is to wait until we get a widget? */
+-	
+-	view = dh_html_get_widget(priv->html);
+-	gtk_box_pack_start(GTK_BOX(html_view), dh_html_get_widget(priv->html), TRUE, TRUE, 1);
+-	
+-	g_signal_connect (priv->html, "open-uri",
+-			  G_CALLBACK (devhelp_html_open_uri_cb),
+-			  priv->devhelp);
+-	g_signal_connect (priv->html, "location-changed",
+-			  G_CALLBACK (devhelp_html_location_changed_cb),
+-			  priv->devhelp);
+-	
+-	/* Hack to get GtkMozEmbed to work properly. */
+-	gtk_widget_realize (view);
+-
+-	if (priv->uri)
+-		dh_html_open_uri(priv->html, priv->uri);
+-	else
+-		dh_html_clear(priv->html);
+-	
+-	gtk_widget_show (view);
+-	
+-	return FALSE;
+-}
+-
+-static void
+-html_view_realize(GtkWidget* widget)
+-{
+-	HtmlView* html_view = HTML_VIEW(widget);
+-	
+-	if (html_view->priv->idle_realize == 0)
+-	{
+-		html_view->priv->idle_realize =
+-			g_idle_add((GSourceFunc) html_view_create_html, html_view);
+-	}	
+-	(* GTK_WIDGET_CLASS (html_view_parent_class)->realize)(widget);
+-}
+-
+-static void
+-html_view_unrealize(GtkWidget* widget)
+-{
+-	HtmlView* html_view = HTML_VIEW(widget);
+-	
+-	if (html_view->priv->idle_realize > 0)
+-	{
+-		g_source_remove (html_view->priv->idle_realize);
+-		html_view->priv->idle_realize = 0;
+-	}
+-	
+-	if (html_view->priv->html != NULL)
+-	{
+-		g_free(html_view->priv->uri);
+-		html_view->priv->uri = dh_html_get_location(html_view->priv->html);
+-	}
+-	else
+-		html_view->priv->uri = NULL;
+-	
+-	if (gtk_container_get_children(GTK_CONTAINER(html_view)))
+-	{
+-		gtk_container_remove(GTK_CONTAINER(widget), dh_html_get_widget(html_view->priv->html));
+-		html_view->priv->html = NULL;
+-	}
+-
+-	(* GTK_WIDGET_CLASS (html_view_parent_class)->unrealize)(widget);
+-}
+-
+-static void
+-html_view_class_init(HtmlViewClass *klass)
+-{
+-	GObjectClass *object_class = G_OBJECT_CLASS(klass);
+-	GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(klass);
+-
+-	object_class->finalize = html_view_finalize;
+-	
+-	widget_class->realize = html_view_realize;
+-	widget_class->unrealize = html_view_unrealize;
+-}
+-
+-static void
+-html_view_init(HtmlView *obj)
+-{
+-	obj->priv = g_new0(HtmlViewPrivate, 1);
+-	gtk_widget_show(GTK_WIDGET(obj));
+-}
+-
+-static void
+-html_view_finalize(GObject *object)
+-{
+-	HtmlView *cobj;
+-	cobj = HTML_VIEW(object);
+-	
+-	/* Free private members, etc. */
+-	if (cobj->priv->html)
+-		gtk_widget_destroy(dh_html_get_widget(cobj->priv->html));
+-	g_free (cobj->priv->uri);	
+-	g_free(cobj->priv);
+-	G_OBJECT_CLASS(html_view_parent_class)->finalize(object);
+-}
+-
+-GtkWidget*
+-html_view_new(AnjutaDevhelp* devhelp)
+-{
+-	HtmlView *obj;
+-	
+-	obj = HTML_VIEW(g_object_new(HTML_TYPE_VIEW, NULL));
+-	
+-	obj->priv->devhelp = devhelp;
+-	
+-	return GTK_WIDGET(obj);
+-}
+-
+-DhHtml* html_view_get_dh_html(HtmlView* view)
+-{
+-	return view->priv->html;
+-}
+diff -urN anjuta-2.24.2/plugins/devhelp/htmlview.h trunk/plugins/devhelp/htmlview.h
+--- anjuta-2.24.2/plugins/devhelp/htmlview.h	2008-10-19 17:35:29.000000000 +0200
++++ trunk/plugins/devhelp/htmlview.h	1970-01-01 01:00:00.000000000 +0100
+@@ -1,57 +0,0 @@
+-/*
+- *  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 Library 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef HTMLVIEW_H
+-#define HTMLVIEW_H
+-
+-#include <glib.h>
+-#include <glib-object.h>
+-#include <gtk/gtk.h>
+-
+-#include <devhelp/dh-html.h>
+-
+-#include "plugin.h"
+-
+-G_BEGIN_DECLS
+-
+-#define HTML_TYPE_VIEW         (html_view_get_type ())
+-#define HTML_VIEW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), HTML_TYPE_VIEW, HtmlView))
+-#define HTML_VIEW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), HTML_TYPE_VIEW, HtmlViewClass))
+-#define HTML_IS_VIEW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), HTML_TYPE_VIEW))
+-#define HTML_IS_VIEW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), HTML_TYPE_VIEW))
+-#define HTML_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), HTML_TYPE_VIEW, HtmlViewClass))
+-
+-typedef struct _HtmlView HtmlView;
+-typedef struct _HtmlViewPrivate HtmlViewPrivate;
+-typedef struct _HtmlViewClass HtmlViewClass;
+-
+-struct _HtmlView {
+-	GtkHBox parent;
+-	HtmlViewPrivate *priv;
+-};
+-
+-struct _HtmlViewClass {
+-	GtkHBoxClass parent_class;
+-};
+-
+-GType html_view_get_type(void);
+-GtkWidget *html_view_new(AnjutaDevhelp* devhelp);
+-
+-DhHtml* html_view_get_dh_html(HtmlView* html_view);
+-
+-G_END_DECLS
+-
+-#endif /* HTMLVIEW_H */
+diff -urN anjuta-2.24.2/plugins/devhelp/Makefile.am trunk/plugins/devhelp/Makefile.am
+--- anjuta-2.24.2/plugins/devhelp/Makefile.am	2008-10-19 17:35:29.000000000 +0200
++++ trunk/plugins/devhelp/Makefile.am	2008-12-07 23:31:25.935952354 +0100
+@@ -8,11 +8,7 @@
+ devhelp_pixmapsdir = $(anjuta_image_dir)
+ devhelp_pixmaps_DATA = \
+ 	anjuta-devhelp-plugin.svg \
+-	anjuta-devhelp-plugin-48.png \
+-	anjuta-go-help-next-24.png \
+-	anjuta-go-help-next-16.png \
+-	anjuta-go-help-prev-24.png \
+-	anjuta-go-help-prev-16.png
++	anjuta-devhelp-plugin-48.png
+ 
+ # Plugin description file
+ plugin_in_files = anjuta-devhelp.plugin.in
+@@ -46,20 +42,11 @@
+ 	plugin.c \
+ 	plugin.h
+ 
+-if HAVE_PLUGIN_DEVHELP
+-libanjuta_devhelp_la_SOURCES += \
+-	htmlview.c \
+-	htmlview.h
+-endif
+-
+ # Plugin dependencies
+ libanjuta_devhelp_la_LIBADD = \
+ 	$(GTK_LIBS) \
+-	$(LIBANJUTA_LIBS)
+-
+-if HAVE_PLUGIN_DEVHELP
+-libanjuta_devhelp_la_LIBADD += $(PLUGIN_DEVHELP_LIBS)
+-endif
++	$(LIBANJUTA_LIBS) \
++	$(PLUGIN_DEVHELP_LIBS)
+ 
+ EXTRA_DIST = \
+ 	$(plugin_in_files) \
+diff -urN anjuta-2.24.2/plugins/devhelp/plugin.c trunk/plugins/devhelp/plugin.c
+--- anjuta-2.24.2/plugins/devhelp/plugin.c	2008-10-19 17:35:29.000000000 +0200
++++ trunk/plugins/devhelp/plugin.c	2008-12-07 23:31:25.922619748 +0100
+@@ -34,11 +34,12 @@
+ #ifndef DISABLE_EMBEDDED_DEVHELP
+ 
+ #include <devhelp/dh-book-tree.h>
+-#include <devhelp/dh-html.h>
+-#include <devhelp/dh-preferences.h>
+ #include <devhelp/dh-search.h>
+ #include <devhelp/dh-base.h>
+-#include "htmlview.h"
++#include <webkit/webkit.h>
++
++#define ONLINE_API_DOCS "http://library.gnome.org/devel"
++
+ #define UI_FILE PACKAGE_DATA_DIR"/ui/anjuta-devhelp.ui"
+ 
+ #else /* DISABLE_EMBEDDED_DEVHELP */
+@@ -51,12 +52,8 @@
+ 
+ #ifndef DISABLE_EMBEDDED_DEVHELP
+ 
+-#define ANJUTA_PIXMAP_HELP_NEXT "anjuta-go-help-next-24.png"
+-#define ANJUTA_PIXMAP_HELP_PREV "anjuta-go-help-prev-24.png"
+ #define ANJUTA_PIXMAP_DEVHELP "anjuta-devhelp-plugin-48.png"
+ 
+-#define ANJUTA_STOCK_HELP_NEXT "anjuta-help-next"
+-#define ANJUTA_STOCK_HELP_PREV "anjuta-help-prev"
+ #define ANJUTA_STOCK_DEVHELP "anjuta-devhelp"
+ 
+ static void
+@@ -74,76 +71,71 @@
+ 	/* Register stock icons */
+ 	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+ 	icon_factory = anjuta_ui_get_icon_factory (ui);
+-	REGISTER_ICON (ANJUTA_PIXMAP_HELP_NEXT, ANJUTA_STOCK_HELP_NEXT);
+-	REGISTER_ICON (ANJUTA_PIXMAP_HELP_PREV, ANJUTA_STOCK_HELP_PREV);
+ 	REGISTER_ICON (ANJUTA_PIXMAP_DEVHELP, ANJUTA_STOCK_DEVHELP);
+ }
+ 
+ static void
+-devhelp_tree_link_selected_cb (GObject       *ignored,
+-			      DhLink        *link,
+-			      AnjutaDevhelp *widget)
++devhelp_tree_link_selected_cb (GObject       *ignored, DhLink *link,
++							   AnjutaDevhelp *widget)
+ {
++	gchar *uri;
+ 	
+-	DhHtml       *html;
+-
+ 	anjuta_shell_present_widget (ANJUTA_PLUGIN (widget)->shell,
+-								 widget->htmlview, NULL);
++								 widget->view_sw, NULL);
+ 
+-	html = html_view_get_dh_html(HTML_VIEW(widget->htmlview));
+-	
+-	if (!DH_IS_HTML(html))
+-		return;
++	uri = dh_link_get_uri (link);
++	webkit_web_view_open (WEBKIT_WEB_VIEW (widget->view), uri);
++	g_free (uri);
+ 	
+-	dh_html_open_uri (html, link->uri);
+-
+ 	anjuta_devhelp_check_history (widget);
+ }
+ 
+ static void
+-devhelp_search_link_selected_cb (GObject  *ignored,
+-				DhLink   *link,
+-				 AnjutaDevhelp *widget)
++devhelp_search_link_selected_cb (GObject  *ignored, DhLink *link,
++								 AnjutaDevhelp *widget)
+ {
+-	DhHtml       *html;
+-
++	gchar *uri;
++	
+ 	anjuta_shell_present_widget (ANJUTA_PLUGIN (widget)->shell,
+-								 widget->htmlview, NULL);
+-
+-	html = html_view_get_dh_html(HTML_VIEW(widget->htmlview));
+-
+-	if (!DH_IS_HTML(html))
+-		return;
+-
+-	dh_html_open_uri (html, link->uri);
++								 widget->view_sw, NULL);
+ 
++	uri = dh_link_get_uri (link);
++	webkit_web_view_open (WEBKIT_WEB_VIEW (widget->view), uri);
++	g_free (uri);
++	
+ 	anjuta_devhelp_check_history (widget);
+ }
+ 
+ static void
+-on_go_back_activate (GtkAction *action, AnjutaDevhelp *plugin)
++on_go_back_clicked (GtkWidget *widget, AnjutaDevhelp *plugin)
+ {
+-	DhHtml* html;
++	anjuta_shell_present_widget (ANJUTA_PLUGIN (plugin)->shell,
++								 plugin->view_sw, NULL);
+ 
+-	html = html_view_get_dh_html(HTML_VIEW(plugin->htmlview));
++	webkit_web_view_go_back (WEBKIT_WEB_VIEW (plugin->view));
+ 	
+-	if (!DH_IS_HTML(html))
+-		return;
+-		
+-	dh_html_go_back(html);
++	anjuta_devhelp_check_history (plugin);
+ }
+ 
+ static void
+-on_go_forward_activate (GtkAction *action, AnjutaDevhelp *plugin)
++on_go_forward_clicked (GtkWidget *widget, AnjutaDevhelp *plugin)
+ {
+-	DhHtml* html;
++	anjuta_shell_present_widget (ANJUTA_PLUGIN (plugin)->shell,
++								 plugin->view_sw, NULL);
+ 
+-	html = html_view_get_dh_html(HTML_VIEW(plugin->htmlview));
+-	
+-	if (!DH_IS_HTML(html))
+-		return;
++	webkit_web_view_go_forward (WEBKIT_WEB_VIEW (plugin->view));
+ 	
+-	dh_html_go_forward(html);
++	anjuta_devhelp_check_history (plugin);
++}
++
++static void
++on_online_clicked (GtkWidget* widget, AnjutaDevhelp* plugin)
++{
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list