summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-13 00:14:55 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-13 00:14:55 (EDT)
commitf4faadcbd076b053ae9d1b4fddef35f5115c85ca (patch)
tree85a23290e21a0850a94a300b54a72583dbc4d576
parent88b2313b6918833cb88cf2baf1ffdebcbfbb70d3 (diff)
downloadmarquee-f4faadcbd076b053ae9d1b4fddef35f5115c85ca.zip
marquee-f4faadcbd076b053ae9d1b4fddef35f5115c85ca.tar.gz
marquee-f4faadcbd076b053ae9d1b4fddef35f5115c85ca.tar.bz2
MqBackForwardButtonBox: Connect list change signal on property setting
We don't need a constructed method for this.
-rw-r--r--src/back-forward-button-box.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/back-forward-button-box.c b/src/back-forward-button-box.c
index d206905..744c5ba 100644
--- a/src/back-forward-button-box.c
+++ b/src/back-forward-button-box.c
@@ -325,20 +325,13 @@ event_box_button_press_cb(GtkWidget *widget,
}
static void
-constructed(GObject *object)
+set_web_view(MqBackForwardButtonBox *back_forward_button_box,
+ MqWebView *web_view)
{
- MqBackForwardButtonBox *back_forward_button_box;
-
- if (G_OBJECT_CLASS(mq_back_forward_button_box_parent_class)->
- constructed) {
- G_OBJECT_CLASS(mq_back_forward_button_box_parent_class)->
- constructed(object);
- }
-
- back_forward_button_box = MQ_BACK_FORWARD_BUTTON_BOX(object);
+ back_forward_button_box->web_view = web_view;
g_signal_connect(webkit_web_view_get_back_forward_list(
- WEBKIT_WEB_VIEW(back_forward_button_box->web_view)),
+ WEBKIT_WEB_VIEW(web_view)),
"changed", G_CALLBACK(back_forward_list_changed_cb),
back_forward_button_box);
}
@@ -381,8 +374,8 @@ set_property(GObject *object, guint property_id, const GValue *value,
g_value_get_pointer(value);
break;
case PROP_WEB_VIEW:
- back_forward_button_box->web_view =
- g_value_get_object(value);
+ set_web_view(back_forward_button_box,
+ g_value_get_object(value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id,
@@ -396,7 +389,6 @@ mq_back_forward_button_box_class_init(MqBackForwardButtonBoxClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
- object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->set_property = set_property;