diff --git a/src/main.c b/src/main.c index da36c5e..8949a2e 100644 --- a/src/main.c +++ b/src/main.c @@ -41,6 +41,7 @@ int main(int argc, char **argv) app = gem_graph_client_application_new("org.alec.gemgraph", G_APPLICATION_DEFAULT_FLAGS); + Hello(); res = g_application_run(G_APPLICATION(app), argc, argv); return res; diff --git a/src/ui/tree.c b/src/ui/tree.c index 4636c08..5185f88 100644 --- a/src/ui/tree.c +++ b/src/ui/tree.c @@ -29,3 +29,51 @@ #include "../../include/ui.h" +enum +{ + COL_NAME = 0, + COL_AGE, + NUM_COLS +} ; + +static GtkTreeModel * +create_and_fill_model (void) +{ + GtkListStore *store = gtk_list_store_new (NUM_COLS, + G_TYPE_STRING, + G_TYPE_UINT); + + /* Append a row and fill in some data */ + GtkTreeIter iter; + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + COL_NAME, "Heinz El-Mann", + COL_AGE, 51, + -1); + + /* append another row and fill in some data */ + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + COL_NAME, "Jane Doe", + COL_AGE, 23, + -1); + + /* ... and a third row */ + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + COL_NAME, "Joe Bungop", + COL_AGE, 91, + -1); + + return GTK_TREE_MODEL (store); +} + +void Hello(void) +{ + GtkWidget *view; // = gtk_tree_view_new (); + printf("Hello, from src/ui/tree.c ! -------------------------\n"); + return NULL; +} + + +