summaryrefslogtreecommitdiff
path: root/gtk/inspector/action-editor.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-08 02:19:18 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-11 22:21:39 -0400
commit88141103cdf5fd294b19d4473245f42201aa6b93 (patch)
tree362ab942aad3cb7da2158ca34e865e00a14489c5 /gtk/inspector/action-editor.c
parentff91ce9eb45f0aac43b218b05cbf8e5b89ed8e32 (diff)
downloadgtk+-88141103cdf5fd294b19d4473245f42201aa6b93.tar.gz
Don't use container api on GtkListBox
Diffstat (limited to 'gtk/inspector/action-editor.c')
-rw-r--r--gtk/inspector/action-editor.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gtk/inspector/action-editor.c b/gtk/inspector/action-editor.c
index ba8f227c92..fa74f2cfee 100644
--- a/gtk/inspector/action-editor.c
+++ b/gtk/inspector/action-editor.c
@@ -143,13 +143,10 @@ variant_editor_set_value (GtkWidget *editor,
}
else
{
- GList *children;
- GtkEntry *entry;
+ GtkWidget *entry;
gchar *text;
- children = gtk_container_get_children (GTK_CONTAINER (editor));
- entry = children->data;
- g_list_free (children);
+ entry = gtk_widget_get_first_child (editor);
text = g_variant_print (value, FALSE);
gtk_editable_set_text (GTK_EDITABLE (entry), text);
@@ -178,14 +175,11 @@ variant_editor_get_value (GtkWidget *editor)
}
else
{
- GList *children;
- GtkEntry *entry;
+ GtkWidget *entry;
const gchar *text;
- children = gtk_container_get_children (GTK_CONTAINER (editor));
- entry = children->data;
+ entry = gtk_widget_get_first_child (editor);
text = gtk_editable_get_text (GTK_EDITABLE (entry));
- g_list_free (children);
value = g_variant_parse (type, text, NULL, NULL, NULL);
}