summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web-view.c62
1 files changed, 36 insertions, 26 deletions
diff --git a/src/web-view.c b/src/web-view.c
index 9604b17..5fbd672 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -558,37 +558,15 @@ button_press_event(GtkWidget *widget, GdkEventButton *event)
}
static void
-mq_web_view_class_init(MqWebViewClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
-
- object_class->get_property = get_property;
- object_class->set_property = set_property;
- widget_class->button_press_event = button_press_event;
- PARENT_CLASS->context_menu = context_menu;
- PARENT_CLASS->mouse_target_changed = mouse_target_changed;
-
- obj_properties[PROP_TAB] = g_param_spec_pointer(
- "tab", "MqTab", "Parent MqTab instance",
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
- obj_properties[PROP_URI] = g_param_spec_string(
- "uri", "URI", "URI to load",
- "",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
- g_object_class_install_properties(object_class, N_PROPERTIES,
- obj_properties);
-}
-
-static void
-mq_web_view_init(MqWebView *web_view)
+constructed(GObject *object)
{
+ MqWebView *web_view;
gchar *rw_uri;
MqConfig *config;
gchar *new_tab_page;
+ web_view = MQ_WEB_VIEW(object);
+
webkit_web_view_set_settings(WEBKIT_WEB_VIEW(web_view),
mq_application_get_webkit_settings(
mq_tab_get_application(web_view->tab)));
@@ -628,6 +606,38 @@ mq_web_view_init(MqWebView *web_view)
/* FIXME: This doesn't seem to be working. */
gtk_widget_grab_focus(GTK_WIDGET(web_view));
+ G_OBJECT_CLASS(mq_web_view_parent_class)->constructed(object);
+}
+
+static void
+mq_web_view_class_init(MqWebViewClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
+
+ object_class->constructed = constructed;
+ object_class->get_property = get_property;
+ object_class->set_property = set_property;
+ widget_class->button_press_event = button_press_event;
+ PARENT_CLASS->context_menu = context_menu;
+ PARENT_CLASS->mouse_target_changed = mouse_target_changed;
+
+ obj_properties[PROP_TAB] = g_param_spec_pointer(
+ "tab", "MqTab", "Parent MqTab instance",
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
+ obj_properties[PROP_URI] = g_param_spec_string(
+ "uri", "URI", "URI to load",
+ "",
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
+ g_object_class_install_properties(object_class, N_PROPERTIES,
+ obj_properties);
+}
+
+static void
+mq_web_view_init(MqWebView *web_view)
+{
web_view->hit_test_result = NULL;
}