devhelp r1172 - in trunk: . src
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1172 - in trunk: . src
- Date: Thu, 9 Oct 2008 17:42:58 +0000 (UTC)
Author: herzi
Date: Thu Oct 9 17:42:58 2008
New Revision: 1172
URL: http://svn.gnome.org/viewvc/devhelp?rev=1172&view=rev
Log:
2008-10-07 Sven Herzberg <sven imendio com>
Added a DhLink field to the DhAssistantView
* src/dh-assistant-view.c,
* src/dh-assistant-view.h: added getter and setter for the link
Modified:
trunk/ChangeLog
trunk/src/dh-assistant-view.c
trunk/src/dh-assistant-view.h
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:58 2008
@@ -32,6 +32,7 @@
WebKitWebView base_instance;
/* private - move to a private structure before publishing this struct */
DhBase *base;
+ DhLink *link;
};
struct _DhAssistantViewClass {
@@ -49,6 +50,10 @@
{
DhAssistantView* self = (DhAssistantView*) object;
+ if (self->link) {
+ g_object_unref (self->link);
+ }
+
if (self->base) {
g_object_unref (self->base);
}
@@ -109,13 +114,21 @@
}
DhBase*
-dh_assistant_view_get_base (DhAssistantView* self)
+dh_assistant_view_get_base (DhAssistantView *self)
{
g_return_val_if_fail (DH_IS_ASSISTANT_VIEW (self), NULL);
return self->base;
}
+DhLink*
+dh_assistant_view_get_link (DhAssistantView *self)
+{
+ g_return_val_if_fail (DH_IS_ASSISTANT_VIEW (self), NULL);
+
+ return self->link;
+}
+
GtkWidget*
dh_assistant_view_new (void)
{
@@ -132,3 +145,23 @@
view->base = g_object_ref (base);
}
+void
+dh_assistant_view_set_link (DhAssistantView *self,
+ DhLink *link)
+{
+ g_return_if_fail (DH_IS_ASSISTANT_VIEW (self));
+
+ if (self->link == link) {
+ return;
+ }
+
+ if (self->link) {
+ dh_link_unref (self->link);
+ self->link = NULL;
+ }
+
+ if (link) {
+ link = dh_link_ref (link);
+ }
+}
+
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:58 2008
@@ -27,6 +27,9 @@
#include <gtk/gtk.h>
#include "dh-base.h"
+#ifndef DROP_AFTER_REFACTORING
+#include "dh-link.h"
+#endif
G_BEGIN_DECLS
@@ -42,9 +45,14 @@
GType dh_assistant_view_get_type (void) G_GNUC_CONST;
GtkWidget* dh_assistant_view_new (void);
-DhBase* dh_assistant_view_get_base (DhAssistantView* self);
+DhBase* dh_assistant_view_get_base (DhAssistantView *self);
void dh_assistant_view_set_base (DhAssistantView *self,
DhBase *base);
+#ifndef DROP_AFTER_REFACTORING
+DhLink* dh_assistant_view_get_link (DhAssistantView *self);
+void dh_assistant_view_set_link (DhAssistantView *self,
+ DhLink *link);
+#endif
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]