diff --git a/include/ui.h b/include/ui.h index 283da49..31ed441 100644 --- a/include/ui.h +++ b/include/ui.h @@ -126,5 +126,5 @@ void traverse_list_store (GtkListStore *liststore); void onTreeViewRowActivated (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer userdata); -void tree_c_printing_test(void); +void tree_c_test(void); diff --git a/src/main.c b/src/main.c index b5723f7..8e0a417 100644 --- a/src/main.c +++ b/src/main.c @@ -33,7 +33,7 @@ int main(int argc, char **argv) { - tree_c_printing_test(); + tree_c_test(); g_autoptr(GemGraphClientApplication) app = NULL; int res; diff --git a/src/ui/tree.c b/src/ui/tree.c index ed1838e..ac48935 100644 --- a/src/ui/tree.c +++ b/src/ui/tree.c @@ -32,6 +32,8 @@ GtkListStore *list_store; GtkTreeStore *tree_store; GtkTreeIter iter, child; +static void tree_c_printing_test(void); + /*********************************************************** * * * Going through every row in a list store * @@ -91,7 +93,7 @@ onTreeViewRowActivated (GtkTreeView *view, GtkTreePath *path, } void -tree_c_printing_test(void) +tree_c_test(void) { list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_UINT); @@ -118,14 +120,16 @@ tree_c_printing_test(void) * right away earlier of course, this is just for demonstration purposes) */ if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(tree_store), &iter)) { - /* Child will point to new row */ - gtk_tree_store_append(tree_store, &child, &iter); - } - else - { - g_error("Oops, we should have a first row in the tree store!\n"); + /* Child will point to new row */ + gtk_tree_store_append(tree_store, &child, &iter); } + else g_error("Oops, we should have a first row in the tree store!\n"); + tree_c_printing_test(); +} + +static void tree_c_printing_test(void) +{ printf("tree_c_printing_test() \ ---------------------------------------------------------\n\n\