diff --git a/include/ui.h b/include/ui.h index 31ed441..2eb1f25 100644 --- a/include/ui.h +++ b/include/ui.h @@ -128,3 +128,5 @@ void onTreeViewRowActivated (GtkTreeView *view, GtkTreePath *path, void tree_c_test(void); +GtkWidget *create_tree_label(void); + diff --git a/src/main.c b/src/main.c index c5941c4..c14cf64 100644 --- a/src/main.c +++ b/src/main.c @@ -32,8 +32,6 @@ int main(int argc, char **argv) { - tree_c_test(); - g_autoptr(GemGraphClientApplication) app = NULL; int res; diff --git a/src/ui/gemgraph.ui b/src/ui/gemgraph.ui index 5bab8c7..48b050d 100644 --- a/src/ui/gemgraph.ui +++ b/src/ui/gemgraph.ui @@ -81,15 +81,6 @@ vertical - - - center - <b>Here must be a label (then a tree)</b> - True - 50 - 50 - - diff --git a/src/ui/window.c b/src/ui/window.c index ddbce57..25f1539 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -119,12 +119,22 @@ void ui_set_stack(const char *mode) // Switch on the first letter of the mode, because switch is soooo simple :) switch(mode[0]) { - case 'e': gtk_menu_button_set_icon_name(window->main_button_mode, "document-edit-symbolic"); break; - case 'r': gtk_menu_button_set_icon_name(window->main_button_mode, "system-run-symbolic"); break; - case 'p': gtk_menu_button_set_icon_name(window->main_button_mode, "x-office-presentation-symbolic");break; - case 'h': gtk_paned_set_position(window->main_paned, 0); - gtk_menu_button_set_icon_name(window->main_button_mode, "user-home-symbolic"); break; - default: break; + case 'e': + gtk_menu_button_set_icon_name(window->main_button_mode, "document-edit-symbolic"); + break; + case 'r': + gtk_menu_button_set_icon_name(window->main_button_mode, "system-run-symbolic"); + create_tree_label(); + break; + case 'p': + gtk_menu_button_set_icon_name(window->main_button_mode, "x-office-presentation-symbolic"); + break; + case 'h': + gtk_paned_set_position(window->main_paned, 0); + gtk_menu_button_set_icon_name(window->main_button_mode, "user-home-symbolic"); + break; + default: + break; } } @@ -220,3 +230,16 @@ void ui_toggle_sidebar(void) else gtk_paned_set_position(window->main_paned, 400); } +GtkWidget *create_tree_label(void) +{ + GtkWidget *label, *slider; + GtkAdjustment *adj; + const char *text = "HELLO !"; + + label = gtk_label_new(text); + gtk_box_append(GTK_BOX(window->runlib_objects), label); + gtk_widget_show(label); + + return label; +} +