Commit 417f1cfb authored by Guido Gunther's avatar Guido Gunther Committed by Guido Gunther
Browse files

home: Use template_callback to bind overview signals



This is less code
Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent cdf2cd17
...@@ -302,19 +302,6 @@ phosh_home_constructed (GObject *object) ...@@ -302,19 +302,6 @@ phosh_home_constructed (GObject *object)
self, self,
G_CONNECT_SWAPPED); G_CONNECT_SWAPPED);
g_signal_connect_swapped (self->overview,
"activity-launched",
G_CALLBACK(fold_cb),
self);
g_signal_connect_swapped (self->overview,
"activity-raised",
G_CALLBACK(fold_cb),
self);
g_signal_connect_swapped (self->overview,
"selection-aborted",
G_CALLBACK(fold_cb),
self);
g_signal_connect (self, g_signal_connect (self,
"configured", "configured",
G_CALLBACK (phosh_home_resize), G_CALLBACK (phosh_home_resize),
...@@ -403,6 +390,7 @@ phosh_home_class_init (PhoshHomeClass *klass) ...@@ -403,6 +390,7 @@ phosh_home_class_init (PhoshHomeClass *klass)
gtk_widget_class_bind_template_child (widget_class, PhoshHome, arrow_home); gtk_widget_class_bind_template_child (widget_class, PhoshHome, arrow_home);
gtk_widget_class_bind_template_child (widget_class, PhoshHome, btn_osk); gtk_widget_class_bind_template_child (widget_class, PhoshHome, btn_osk);
gtk_widget_class_bind_template_child (widget_class, PhoshHome, overview); gtk_widget_class_bind_template_child (widget_class, PhoshHome, overview);
gtk_widget_class_bind_template_callback (widget_class, fold_cb);
gtk_widget_class_bind_template_callback (widget_class, osk_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, osk_clicked_cb);
gtk_widget_class_set_css_name (widget_class, "phosh-home"); gtk_widget_class_set_css_name (widget_class, "phosh-home");
......
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
<object class="PhoshOverview" id="overview"> <object class="PhoshOverview" id="overview">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<signal name="activity-launched" handler="fold_cb" swapped="true"/>
<signal name="activity-raised" handler="fold_cb" swapped="true"/>
<signal name="selection-aborted" handler="fold_cb" swapped="true"/>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment