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);
|
||||
|
||||
//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);
|
||||
|
||||
|
|
20
manifest.scm
20
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"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue