Commit 02577ddb authored by Matthias Clasen's avatar Matthias Clasen

inspector: Avoid a gratitious use of g_strv_length

No need to count the strings first before iterating over them.
parent 1fb075db
......@@ -64,7 +64,7 @@ gtk_inspector_selector_set_object (GtkInspectorSelector *oh,
GObject *object)
{
GtkTreeIter iter, parent;
gint i, words_len;
gint i;
GtkWidget *widget;
gchar *path, **words;
const gchar *title;
......@@ -85,8 +85,7 @@ gtk_inspector_selector_set_object (GtkInspectorSelector *oh,
path = gtk_widget_path_to_string (gtk_widget_get_path (widget));
words = g_strsplit (path, " ", 0);
words_len = g_strv_length (words);
for (i = 0; i < words_len; i++)
for (i = 0; words[i]; i++)
{
gtk_tree_store_append (oh->priv->model, &iter, i ? &parent : NULL);
gtk_tree_store_set (oh->priv->model, &iter,
......
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