diff options
Diffstat (limited to 'src/gui/window.c')
-rw-r--r-- | src/gui/window.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gui/window.c b/src/gui/window.c index 193f1bf..2680c89 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -295,8 +295,40 @@ static void gtk_framework_window_activate_about(GSimpleAction *action, GVariant void gtk_framework_window_add(GtkFrameworkWindow *window, /* __steal */GtkTiledPanel *panel) { + GtkWidget *bar; /* Barre de titre */ + GListStore *list; /* Liste éventuelle à intégrer */ + guint count; /* Nombre d'élements présents */ + guint i; /* Boucle de parcours */ + GtkWidget *widget; /* Composant à intégrer */ + gtk_stack_add_child(window->grid, GTK_WIDGET(panel)); gtk_stack_set_visible_child(window->grid, GTK_WIDGET(panel)); + + + bar = gtk_window_get_titlebar(GTK_WINDOW(window)); + + if (bar == NULL) ////////// REMME + { + bar = gtk_header_bar_new(); + gtk_window_set_titlebar(GTK_WINDOW(window), bar); + } ///////////////////////////// + + list = gtk_tiled_panel_get_title_widgets(panel, false); + + if (list != NULL) + { + count = g_list_model_get_n_items(G_LIST_MODEL(list)); + + for (i = 0; i < count; i++) + { + widget = GTK_WIDGET(g_list_model_get_item(G_LIST_MODEL(list), i)); + gtk_header_bar_pack_end(GTK_HEADER_BAR(bar), widget); + } + + unref_object(list); + + } + } |