devhelp r1165 - in trunk: . src
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1165 - in trunk: . src
- Date: Thu, 9 Oct 2008 17:42:41 +0000 (UTC)
Author: herzi
Date: Thu Oct 9 17:42:40 2008
New Revision: 1165
URL: http://svn.gnome.org/viewvc/devhelp?rev=1165&view=rev
Log:
2008-10-07 Sven Herzberg <sven imendio com>
Implemented the DhAssistantView type (with blind type prototypes)
* src/dh-assistant-view.c,
* src/dh-assistant-view.h: implement DhAssistantView; put the struct
definitions into the .c file so we don't have to include webkit in the
header
* src/dh-assistant.c: use the new DhAssistantView instead of a plain
WebKitWebView
Modified:
trunk/ChangeLog
trunk/src/dh-assistant-view.c
trunk/src/dh-assistant-view.h
trunk/src/dh-assistant.c
Modified: trunk/src/dh-assistant-view.c
==============================================================================
--- trunk/src/dh-assistant-view.c (original)
+++ trunk/src/dh-assistant-view.c Thu Oct 9 17:42:40 2008
@@ -24,3 +24,30 @@
#include "dh-assistant-view.h"
+#include <webkit/webkit.h>
+
+struct _DhAssistantView {
+ WebKitWebView base_instance;
+};
+
+struct _DhAssistantViewClass {
+ WebKitWebViewClass base_class;
+};
+
+G_DEFINE_TYPE (DhAssistantView, dh_assistant_view, WEBKIT_TYPE_WEB_VIEW);
+
+static void
+dh_assistant_view_init (DhAssistantView* self)
+{}
+
+static void
+dh_assistant_view_class_init (DhAssistantViewClass* self_class)
+{}
+
+GtkWidget*
+dh_assistant_view_new (void)
+{
+ return g_object_new (DH_TYPE_ASSISTANT_VIEW, NULL);
+}
+
+
Modified: trunk/src/dh-assistant-view.h
==============================================================================
--- trunk/src/dh-assistant-view.h (original)
+++ trunk/src/dh-assistant-view.h Thu Oct 9 17:42:40 2008
@@ -25,5 +25,23 @@
#ifndef __DH_ASSISTANT_VIEW_H__
#define __DH_ASSISTANT_VIEW_H__
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+typedef struct _DhAssistantView DhAssistantView;
+typedef struct _DhAssistantViewClass DhAssistantViewClass;
+
+#define DH_TYPE_ASSISTANT_VIEW (dh_assistant_view_get_type ())
+#define DH_ASSISTANT_VIEW(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), DH_TYPE_ASSISTANT_VIEW, DhAssistantView))
+#define DH_ASSISTANT_VIEW_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), DH_TYPE_ASSISTANT_VIEW, DhAssistantViewClass))
+#define DH_IS_ASSISTANT_VIEW(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), DH_TYPE_ASSISTANT_VIEW))
+#define DH_IS_ASSISTANT_VIEW_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), DH_ASSISTANT_VIEW))
+#define DH_ASSISTANT_VIEW_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), DH_TYPE_ASSISTANT_VIEW, DhAssistantView))
+
+GType dh_assistant_view_get_type (void) G_GNUC_CONST;
+GtkWidget* dh_assistant_view_new (void);
+
+G_END_DECLS
#endif /* !__DH_ASSISTANT_VIEW_H__ */
Modified: trunk/src/dh-assistant.c
==============================================================================
--- trunk/src/dh-assistant.c (original)
+++ trunk/src/dh-assistant.c Thu Oct 9 17:42:40 2008
@@ -28,6 +28,7 @@
#include "dh-link.h"
#include "dh-util.h"
#include "dh-assistant.h"
+#include "dh-assistant-view.h"
typedef struct {
DhBase *base;
@@ -139,7 +140,7 @@
gtk_window_set_icon_name (GTK_WINDOW (assistant), "devhelp");
gtk_window_set_default_size (GTK_WINDOW (assistant), 400, 400);
- priv->web_view = webkit_web_view_new ();
+ priv->web_view = dh_assistant_view_new ();
g_signal_connect (priv->web_view, "navigation-requested",
G_CALLBACK (assistant_navigation_requested_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]