Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gtk
Commits
5d121a8a
Commit
5d121a8a
authored
Jul 04, 2013
by
Kalev Lember
Browse files
GtkListBox: Add g_return_if_fail checks to public row functions
parent
1f9fd5a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
gtk/gtklistbox.c
View file @
5d121a8a
...
...
@@ -2623,6 +2623,8 @@ gtk_list_box_row_changed (GtkListBoxRow *row)
{
GtkListBox
*
list_box
=
gtk_list_box_row_get_box
(
row
);
g_return_if_fail
(
GTK_IS_LIST_BOX_ROW
(
row
));
if
(
list_box
)
gtk_list_box_got_row_changed
(
GTK_LIST_BOX
(
list_box
),
row
);
}
...
...
@@ -2644,6 +2646,8 @@ gtk_list_box_row_get_header (GtkListBoxRow *row)
{
GtkListBoxRowPrivate
*
priv
=
gtk_list_box_row_get_instance_private
(
row
);
g_return_val_if_fail
(
GTK_IS_LIST_BOX_ROW
(
row
),
NULL
);
return
priv
->
header
;
}
...
...
@@ -2664,6 +2668,9 @@ gtk_list_box_row_set_header (GtkListBoxRow *row,
{
GtkListBoxRowPrivate
*
priv
=
gtk_list_box_row_get_instance_private
(
row
);
g_return_if_fail
(
GTK_IS_LIST_BOX_ROW
(
row
));
g_return_if_fail
(
header
==
NULL
||
GTK_IS_WIDGET
(
header
));
if
(
priv
->
header
)
g_object_unref
(
priv
->
header
);
...
...
@@ -2688,6 +2695,8 @@ gtk_list_box_row_get_index (GtkListBoxRow *row)
{
GtkListBoxRowPrivate
*
priv
=
gtk_list_box_row_get_instance_private
(
row
);
g_return_val_if_fail
(
GTK_IS_LIST_BOX_ROW
(
row
),
-
1
);
if
(
priv
->
iter
!=
NULL
)
return
g_sequence_iter_get_position
(
priv
->
iter
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment