WIP: (micro) cleaning
This commit is contained in:
parent
9898be565d
commit
e5b58345d3
|
@ -126,5 +126,5 @@ void traverse_list_store (GtkListStore *liststore);
|
||||||
void onTreeViewRowActivated (GtkTreeView *view, GtkTreePath *path,
|
void onTreeViewRowActivated (GtkTreeView *view, GtkTreePath *path,
|
||||||
GtkTreeViewColumn *col, gpointer userdata);
|
GtkTreeViewColumn *col, gpointer userdata);
|
||||||
|
|
||||||
void tree_c_printing_test(void);
|
void tree_c_test(void);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
tree_c_printing_test();
|
tree_c_test();
|
||||||
|
|
||||||
g_autoptr(GemGraphClientApplication) app = NULL;
|
g_autoptr(GemGraphClientApplication) app = NULL;
|
||||||
int res;
|
int res;
|
||||||
|
|
|
@ -32,6 +32,8 @@ GtkListStore *list_store;
|
||||||
GtkTreeStore *tree_store;
|
GtkTreeStore *tree_store;
|
||||||
GtkTreeIter iter, child;
|
GtkTreeIter iter, child;
|
||||||
|
|
||||||
|
static void tree_c_printing_test(void);
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
* *
|
* *
|
||||||
* Going through every row in a list store *
|
* Going through every row in a list store *
|
||||||
|
@ -91,7 +93,7 @@ onTreeViewRowActivated (GtkTreeView *view, GtkTreePath *path,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tree_c_printing_test(void)
|
tree_c_test(void)
|
||||||
{
|
{
|
||||||
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_UINT);
|
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) */
|
* right away earlier of course, this is just for demonstration purposes) */
|
||||||
if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(tree_store), &iter))
|
if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(tree_store), &iter))
|
||||||
{
|
{
|
||||||
/* Child will point to new row */
|
/* Child will point to new row */
|
||||||
gtk_tree_store_append(tree_store, &child, &iter);
|
gtk_tree_store_append(tree_store, &child, &iter);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_error("Oops, we should have a first row in the tree store!\n");
|
|
||||||
}
|
}
|
||||||
|
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() \
|
printf("tree_c_printing_test() \
|
||||||
---------------------------------------------------------\n\n\
|
---------------------------------------------------------\n\n\
|
||||||
|
|
Loading…
Reference in New Issue