diff --git a/include/ui.h b/include/ui.h index 6c2b887..4770240 100644 --- a/include/ui.h +++ b/include/ui.h @@ -124,6 +124,5 @@ void ui_toggle_sidebar (); void print_test_in_tree_dot_c(void); -//GtkWidget *create_tree_label(void); -GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *window); -//GtkWidget *create_a_button_in_the_tab(GemGraphClientWindow *window); +// GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *window); + diff --git a/manifest.scm b/manifest.scm index 783fa88..c19b4d9 100644 --- a/manifest.scm +++ b/manifest.scm @@ -5,6 +5,24 @@ (specifications->manifest (list + "bash" + "coreutils" + "gcc-toolchain" + "pkg-config" + "valgrind" + "findutils" + "gdb" "make" + "gtk" + "libxml2" + "glew" + "glfw" + "libepoxy" + "pango@1.90.0" + "xorgproto" + "glib" + "mesa-headers" + "mesa" + "libadwaita" ) -) \ No newline at end of file +) diff --git a/src/ui/tree.c b/src/ui/tree.c index bef5ac8..8a9b7b9 100644 --- a/src/ui/tree.c +++ b/src/ui/tree.c @@ -255,7 +255,7 @@ struct _TreeItem TreeItem *children; }; -/* tree data */ +// tree data /* static TreeItem E[] = {NULL}, F[] = {NULL}, G[] = {NULL}, H[] = {NULL}; */ /* static TreeItem I[] = {NULL}, K[] = {NULL}, N[] = {NULL}, M[] = {NULL}; */ /* static TreeItem L[] = {{"M", M}, {"N", N}, {NULL }}, J[] = {{"L", L}, {NULL}}; */ @@ -267,17 +267,20 @@ struct _TreeItem /* static GListStore *create_node_recursive (GListModel *model, // GListStore* g_list_store_new (GType item_type) */ -/* TreeItem *current_item, */ -/* GtkTreeIter *iter_parent, */ -/* int depth) */ +/* TreeItem *current_item, */ +/* GtkTreeIter *iter_parent, */ +/* int depth) */ /* { */ +/* if (model == NULL) */ +/* printf("tree.c > print test() create_node_recursive\n"); */ + /* GtkTreeIter iter; */ /* if (model == NULL) */ /* model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING); */ /* while (current_item->label) { */ -/* if (0) printf("[%d] Current label : %s\n", depth, current_item->label); */ +/* if (1) printf("[%d] Current label : %s\n", depth, current_item->label); */ /* gtk_tree_store_append (model, &iter, iter_parent); */ /* gtk_tree_store_set (model, &iter, STRING_COLUMN, current_item->label, -1); */ @@ -297,29 +300,33 @@ struct _TreeItem -static void -print_hello (GtkWidget *widget, - gpointer data) -{ - static int nb; - nb++; - printf("Button clicked (n = %d)\n", nb); -} +/* static void */ +/* print_hello (GtkWidget *widget, */ +/* gpointer data) */ +/* { */ +/* static int nb; */ +/* nb++; */ +/* printf("Button clicked (n = %d)\n", nb); */ +/* } */ -GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *my_window) -{ - GtkWidget *button; - const char *text = "Hello ! I'm the new button. Click me !"; +/* GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *my_window) */ +/* { */ +/* GtkWidget *button; */ +/* const char *text = "Hello ! I'm the new button. Click me !"; */ - button = gtk_button_new_with_label(text); - gtk_box_append(GTK_BOX(my_window->runlib_objects), button); - gtk_widget_show(button); +/* button = gtk_button_new_with_label(text); */ +/* gtk_box_append(GTK_BOX(my_window->runlib_objects), button); */ +/* gtk_widget_show(button); */ - g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL); +/* g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL); */ +/* printf("tree.c > print test() \ */ +/* ------------------------------------\nClick the 'new button' in the GtkBox.\n"); */ + +/* return button; */ +/* } */ + +void print_test_in_tree_dot_c() { printf("tree.c > print test() \ ------------------------------------\nClick the 'new button' in the GtkBox.\n"); - - return button; } - diff --git a/src/ui/window.c b/src/ui/window.c index d2c09f0..6f4f55a 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -124,7 +124,7 @@ static void gem_graph_client_window_init(GemGraphClientWindow *self) /* -------------------------------------------------------------------------- */ -GtkWidget *create_a_button_to_click_on(void); +GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *my_window); void ui_set_stack(const char *mode) { @@ -142,6 +142,8 @@ void ui_set_stack(const char *mode) case 'r': gtk_menu_button_set_icon_name(window->main_button_mode, "system-run-symbolic"); create_a_button_to_click_on(window); + // let_s_scroll_it_guys(); + print_test_in_tree_dot_c(); break; case 'p': @@ -252,3 +254,28 @@ void ui_toggle_sidebar(void) else gtk_paned_set_position(window->main_paned, 400); } + + +static void +print_hello (GtkWidget *widget, + gpointer data) +{ + static int nb; + nb++; + printf("Button clicked (n = %d)\n", nb); +} + +GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *my_window) +{ + GtkWidget *button; + const char *text = "Hello ! I'm the new button. Click me !"; + + button = gtk_button_new_with_label(text); + gtk_box_append(GTK_BOX(my_window->runlib_objects), button); + gtk_widget_show(button); + + g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL); + + return button; +} +