WIP: manifest restauré; GtkWidget *create_a_button(GemGraphClientWindow *my_window) < arf... (in window.c, line 268)
This commit is contained in:
parent
effc5b83ff
commit
b8ef224742
|
@ -124,6 +124,5 @@ void ui_toggle_sidebar ();
|
||||||
|
|
||||||
void print_test_in_tree_dot_c(void);
|
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_to_click_on(GemGraphClientWindow *window);
|
|
||||||
//GtkWidget *create_a_button_in_the_tab(GemGraphClientWindow *window);
|
|
||||||
|
|
18
manifest.scm
18
manifest.scm
|
@ -5,6 +5,24 @@
|
||||||
|
|
||||||
(specifications->manifest
|
(specifications->manifest
|
||||||
(list
|
(list
|
||||||
|
"bash"
|
||||||
|
"coreutils"
|
||||||
|
"gcc-toolchain"
|
||||||
|
"pkg-config"
|
||||||
|
"valgrind"
|
||||||
|
"findutils"
|
||||||
|
"gdb"
|
||||||
"make"
|
"make"
|
||||||
|
"gtk"
|
||||||
|
"libxml2"
|
||||||
|
"glew"
|
||||||
|
"glfw"
|
||||||
|
"libepoxy"
|
||||||
|
"pango@1.90.0"
|
||||||
|
"xorgproto"
|
||||||
|
"glib"
|
||||||
|
"mesa-headers"
|
||||||
|
"mesa"
|
||||||
|
"libadwaita"
|
||||||
)
|
)
|
||||||
)
|
)
|
|
@ -255,7 +255,7 @@ struct _TreeItem
|
||||||
TreeItem *children;
|
TreeItem *children;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tree data */
|
// tree data
|
||||||
/* static TreeItem E[] = {NULL}, F[] = {NULL}, G[] = {NULL}, H[] = {NULL}; */
|
/* static TreeItem E[] = {NULL}, F[] = {NULL}, G[] = {NULL}, H[] = {NULL}; */
|
||||||
/* static TreeItem I[] = {NULL}, K[] = {NULL}, N[] = {NULL}, M[] = {NULL}; */
|
/* static TreeItem I[] = {NULL}, K[] = {NULL}, N[] = {NULL}, M[] = {NULL}; */
|
||||||
/* static TreeItem L[] = {{"M", M}, {"N", N}, {NULL }}, J[] = {{"L", L}, {NULL}}; */
|
/* static TreeItem L[] = {{"M", M}, {"N", N}, {NULL }}, J[] = {{"L", L}, {NULL}}; */
|
||||||
|
@ -271,13 +271,16 @@ struct _TreeItem
|
||||||
/* GtkTreeIter *iter_parent, */
|
/* GtkTreeIter *iter_parent, */
|
||||||
/* int depth) */
|
/* int depth) */
|
||||||
/* { */
|
/* { */
|
||||||
|
/* if (model == NULL) */
|
||||||
|
/* printf("tree.c > print test() create_node_recursive\n"); */
|
||||||
|
|
||||||
/* GtkTreeIter iter; */
|
/* GtkTreeIter iter; */
|
||||||
|
|
||||||
/* if (model == NULL) */
|
/* if (model == NULL) */
|
||||||
/* model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING); */
|
/* model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING); */
|
||||||
|
|
||||||
/* while (current_item->label) { */
|
/* 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_append (model, &iter, iter_parent); */
|
||||||
/* gtk_tree_store_set (model, &iter, STRING_COLUMN, current_item->label, -1); */
|
/* gtk_tree_store_set (model, &iter, STRING_COLUMN, current_item->label, -1); */
|
||||||
|
|
||||||
|
@ -297,29 +300,33 @@ struct _TreeItem
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
/* static void */
|
||||||
print_hello (GtkWidget *widget,
|
/* print_hello (GtkWidget *widget, */
|
||||||
gpointer data)
|
/* gpointer data) */
|
||||||
{
|
/* { */
|
||||||
static int nb;
|
/* static int nb; */
|
||||||
nb++;
|
/* nb++; */
|
||||||
printf("Button clicked (n = %d)\n", nb);
|
/* printf("Button clicked (n = %d)\n", nb); */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *my_window)
|
/* GtkWidget *create_a_button_to_click_on(GemGraphClientWindow *my_window) */
|
||||||
{
|
/* { */
|
||||||
GtkWidget *button;
|
/* GtkWidget *button; */
|
||||||
const char *text = "Hello ! I'm the new button. Click me !";
|
/* const char *text = "Hello ! I'm the new button. Click me !"; */
|
||||||
|
|
||||||
button = gtk_button_new_with_label(text);
|
/* button = gtk_button_new_with_label(text); */
|
||||||
gtk_box_append(GTK_BOX(my_window->runlib_objects), button);
|
/* gtk_box_append(GTK_BOX(my_window->runlib_objects), button); */
|
||||||
gtk_widget_show(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() \
|
printf("tree.c > print test() \
|
||||||
------------------------------------\nClick the 'new button' in the GtkBox.\n");
|
------------------------------------\nClick the 'new button' in the GtkBox.\n");
|
||||||
|
|
||||||
return button;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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)
|
void ui_set_stack(const char *mode)
|
||||||
{
|
{
|
||||||
|
@ -142,6 +142,8 @@ void ui_set_stack(const char *mode)
|
||||||
case 'r':
|
case 'r':
|
||||||
gtk_menu_button_set_icon_name(window->main_button_mode, "system-run-symbolic");
|
gtk_menu_button_set_icon_name(window->main_button_mode, "system-run-symbolic");
|
||||||
create_a_button_to_click_on(window);
|
create_a_button_to_click_on(window);
|
||||||
|
// let_s_scroll_it_guys();
|
||||||
|
print_test_in_tree_dot_c();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
|
@ -252,3 +254,28 @@ void ui_toggle_sidebar(void)
|
||||||
else gtk_paned_set_position(window->main_paned, 400);
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue