diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-07-24 22:04:04 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-07-24 22:04:04 (GMT) |
commit | 39ead30e3bcb19925946e9e3d752486d6cc1d0cb (patch) | |
tree | f189fa8f301916619aebdcbeac7217928c6ae481 /src/gui/window.c | |
parent | 1596de25f349ca065422074327e208cfca7d8d3f (diff) |
Display new panels inside the main window when needed.
Diffstat (limited to 'src/gui/window.c')
-rw-r--r-- | src/gui/window.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/gui/window.c b/src/gui/window.c index 24716ed..432a8a1 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -207,7 +207,7 @@ bool gtk_framework_window_create(GtkFrameworkWindow *window, GtkApplication *app item = find_item_panel_by_type(G_TYPE_WELCOME_PANEL); panel = g_panel_item_get_panel(item); - gtk_stack_add_child(window->grid, GTK_WIDGET(panel)); + gtk_framework_window_add(window, panel); unref_object(item); @@ -236,3 +236,25 @@ bool gtk_framework_window_create(GtkFrameworkWindow *window, GtkApplication *app return result; } + + +/****************************************************************************** +* * +* Paramètres : window = instance de fenêtre principale à remplir. * +* panel = nouveau panneau à afficher. * +* * +* Description : Ajoute un panneau à la fenêtre principale de Chrysalide. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void gtk_framework_window_add(GtkFrameworkWindow *window, /* __steal */GtkTiledPanel *panel) +{ + gtk_stack_add_child(window->grid, GTK_WIDGET(panel)); + + gtk_stack_set_visible_child(window->grid, GTK_WIDGET(panel)); + +} |