Commit 4580b5c2 authored by Adrien Plazas's avatar Adrien Plazas
Browse files

header-group: Fix the type of the focus property

This also fixes the types of the accessor functions.

Fixes Librem5/libhandy#46
parent baa525d5
......@@ -70,7 +70,7 @@ update (ExampleWindow *self)
g_assert (header_child == NULL || GTK_IS_HEADER_BAR (header_child));
hdy_header_group_set_focus (self->header_group, fold == HDY_FOLD_FOLDED ? header_child : NULL);
hdy_header_group_set_focus (self->header_group, fold == HDY_FOLD_FOLDED ? GTK_HEADER_BAR (header_child) : NULL);
}
static void
......
......@@ -11,7 +11,7 @@
typedef struct
{
GSList *header_bars;
GtkWidget *focus;
GtkHeaderBar *focus;
} HdyHeaderGroupPrivate;
......@@ -151,7 +151,7 @@ hdy_header_group_add_header_bar (HdyHeaderGroup *self,
void
hdy_header_group_set_focus (HdyHeaderGroup *self,
GtkWidget *child)
GtkHeaderBar *header_bar)
{
HdyHeaderGroupPrivate *priv;
......@@ -159,7 +159,7 @@ hdy_header_group_set_focus (HdyHeaderGroup *self,
priv = hdy_header_group_get_instance_private (self);
priv->focus = child;
priv->focus = header_bar;
update_decoration_layouts (self);
......@@ -172,7 +172,7 @@ hdy_header_group_set_focus (HdyHeaderGroup *self,
*
* Returns: (transfer none): The currently focused child
*/
GtkWidget *
GtkHeaderBar *
hdy_header_group_get_focus (HdyHeaderGroup *self)
{
HdyHeaderGroupPrivate *priv;
......@@ -486,11 +486,11 @@ hdy_header_group_class_init (HdyHeaderGroupClass *klass)
* %TRUE if the header group is focused on a single headerbar.
*/
props[PROP_FOCUS] =
g_param_spec_boolean ("focus",
_("Focus"),
_("The child that should have the focus"),
FALSE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_param_spec_object ("focus",
_("Focus"),
_("The header bar that should have the focus"),
GTK_TYPE_HEADER_BAR,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, N_PROPS, props);
}
......
......@@ -33,9 +33,9 @@ HdyHeaderGroup *hdy_header_group_new (void);
void hdy_header_group_add_header_bar (HdyHeaderGroup *self,
GtkHeaderBar *header_bar);
GtkWidget *hdy_header_group_get_focus (HdyHeaderGroup *self);
void hdy_header_group_set_focus (HdyHeaderGroup *self,
GtkWidget *child);
GtkHeaderBar *hdy_header_group_get_focus (HdyHeaderGroup *self);
void hdy_header_group_set_focus (HdyHeaderGroup *self,
GtkHeaderBar *header_bar);
G_END_DECLS
......
Supports Markdown
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