[gnome-builder] GbDevhelpView: wire up web view
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbDevhelpView: wire up web view
- Date: Thu, 11 Dec 2014 00:13:42 +0000 (UTC)
commit 977db0bab57825289a1a35e19974afd058419acb
Author: Christian Hergert <christian hergert me>
Date: Tue Dec 9 17:38:26 2014 -0800
GbDevhelpView: wire up web view
src/devhelp/gb-devhelp-view.c | 7 +++++++
src/resources/gnome-builder.gresource.xml | 1 +
src/resources/ui/gb-devhelp-view.ui | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/devhelp/gb-devhelp-view.c b/src/devhelp/gb-devhelp-view.c
index 56cfad2..364aa06 100644
--- a/src/devhelp/gb-devhelp-view.c
+++ b/src/devhelp/gb-devhelp-view.c
@@ -25,7 +25,11 @@
struct _GbDevhelpViewPrivate
{
+ /* References owned by view */
GbDevhelpDocument *document;
+
+ /* References owned by Gtk template */
+ WebKitWebView *web_view;
};
G_DEFINE_TYPE_WITH_PRIVATE (GbDevhelpView, gb_devhelp_view,
@@ -134,6 +138,9 @@ gb_devhelp_view_class_init (GbDevhelpViewClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/builder/ui/gb-devhelp-view.ui");
+ gtk_widget_class_bind_template_child_private (widget_class, GbDevhelpView, web_view);
+
+ g_type_ensure (WEBKIT_TYPE_WEB_VIEW);
}
static void
diff --git a/src/resources/gnome-builder.gresource.xml b/src/resources/gnome-builder.gresource.xml
index 8a8539f..d4fb423 100644
--- a/src/resources/gnome-builder.gresource.xml
+++ b/src/resources/gnome-builder.gresource.xml
@@ -22,6 +22,7 @@
<file>ui/gb-command-bar-item.ui</file>
<file>ui/gb-credits-widget.ui</file>
<file>ui/gb-devhelp-tab.ui</file>
+ <file>ui/gb-devhelp-view.ui</file>
<file>ui/gb-document-stack.ui</file>
<file>ui/gb-document-menu-button.ui</file>
<file>ui/gb-editor-settings-widget.ui</file>
diff --git a/src/resources/ui/gb-devhelp-view.ui b/src/resources/ui/gb-devhelp-view.ui
index 90ed6e7..75c0628 100644
--- a/src/resources/ui/gb-devhelp-view.ui
+++ b/src/resources/ui/gb-devhelp-view.ui
@@ -13,6 +13,7 @@
<child>
<object class="WebKitWebView" id="web_view">
<property name="visible">true</property>
+ <property name="expand">true</property>
</object>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]