devhelp r1166 - in trunk: . src
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1166 - in trunk: . src
- Date: Thu, 9 Oct 2008 17:42:43 +0000 (UTC)
Author: herzi
Date: Thu Oct 9 17:42:43 2008
New Revision: 1166
URL: http://svn.gnome.org/viewvc/devhelp?rev=1166&view=rev
Log:
2008-10-07 Sven Herzberg <sven imendio com>
Added a DhBase field to the DhAssistantView
* src/dh-assistant-view.c,
* src/dh-assistant-view.h: added the field to the view (for the code
moving)
* src/dh-assistant.c: set the base of the DhAssistantView
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:43 2008
@@ -28,6 +28,8 @@
struct _DhAssistantView {
WebKitWebView base_instance;
+ /* private - move to a private structure before publishing this struct */
+ DhBase *base;
};
struct _DhAssistantViewClass {
@@ -41,8 +43,24 @@
{}
static void
+view_finalize (GObject *object)
+{
+ DhAssistantView* self = (DhAssistantView*) object;
+
+ if (self->base) {
+ g_object_unref (self->base);
+ }
+
+ G_OBJECT_CLASS (dh_assistant_view_parent_class)->finalize (object);
+}
+
+static void
dh_assistant_view_class_init (DhAssistantViewClass* self_class)
-{}
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (self_class);
+
+ object_class->finalize = view_finalize;
+}
GtkWidget*
dh_assistant_view_new (void)
@@ -50,4 +68,13 @@
return g_object_new (DH_TYPE_ASSISTANT_VIEW, NULL);
}
+void
+dh_assistant_view_set_base (DhAssistantView *view,
+ DhBase *base)
+{
+ g_return_if_fail (DH_IS_ASSISTANT_VIEW (view));
+ g_return_if_fail (DH_IS_BASE (base));
+
+ view->base = g_object_ref (base);
+}
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:43 2008
@@ -26,6 +26,7 @@
#define __DH_ASSISTANT_VIEW_H__
#include <gtk/gtk.h>
+#include "dh-base.h"
G_BEGIN_DECLS
@@ -41,6 +42,8 @@
GType dh_assistant_view_get_type (void) G_GNUC_CONST;
GtkWidget* dh_assistant_view_new (void);
+void dh_assistant_view_set_base (DhAssistantView *self,
+ DhBase *base);
G_END_DECLS
Modified: trunk/src/dh-assistant.c
==============================================================================
--- trunk/src/dh-assistant.c (original)
+++ trunk/src/dh-assistant.c Thu Oct 9 17:42:43 2008
@@ -179,6 +179,8 @@
priv = GET_PRIVATE (assistant);
priv->base = g_object_ref (base);
+ dh_assistant_view_set_base (DH_ASSISTANT_VIEW (priv->web_view),
+ base);
return GTK_WIDGET (assistant);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]