diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2025-05-22 02:37:08 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2025-05-22 02:37:08 (GMT) |
commit | c3fb323e06bafe2fa04a00c29cf07a7bf4e44b37 (patch) | |
tree | 7a756b9edce8262c7dfb072ecb8e003754dc0a07 /src/gtkext/dockstation.c | |
parent | 8ef19378427c1b2d88f72817ff2870445bf674d3 (diff) |
Notify panel [de]activations.
Diffstat (limited to 'src/gtkext/dockstation.c')
-rw-r--r-- | src/gtkext/dockstation.c | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/src/gtkext/dockstation.c b/src/gtkext/dockstation.c index 359e3a1..80bae75 100644 --- a/src/gtkext/dockstation.c +++ b/src/gtkext/dockstation.c @@ -259,7 +259,7 @@ GtkWidget *gtk_dock_station_new(void) /****************************************************************************** * * -* Paramètres : station = station d'accueil pour panneau à compléter. * +* Paramètres : station = station d'accueil pour panneaux à compléter. * * panel = nouveau panneau à afficher. * * * * Description : Ajoute un panneau à un groupe de tuiles. * @@ -293,7 +293,7 @@ void gtk_dock_station_add_panel(GtkDockStation *station, GtkTiledPanel *panel) /****************************************************************************** * * -* Paramètres : station = station d'accueil pour panneau à compléter. * +* Paramètres : station = station d'accueil pour panneaux à compléter. * * panel = nouveau panneau à afficher. * * * * Description : Ajoute un panneau à conserver à un groupe de tuiles. * @@ -332,7 +332,7 @@ void gtk_dock_station_keep_panel(GtkDockStation *station, GtkTiledPanel *panel) /****************************************************************************** * * -* Paramètres : station = station d'accueil pour panneau à consulter. * +* Paramètres : station = station d'accueil pour panneaux à consulter. * * * * Description : Indique si la station d'accueil contient au moins un panneau.* * * @@ -361,6 +361,51 @@ bool gtk_dock_station_is_empty(const GtkDockStation *station) } +/****************************************************************************** +* * +* Paramètres : station = station d'accueil pour panneaux à manipuler. * +* main = panneau principal visé par l'opération. * +* activated = nature du changement de statut : ajout, retrait ?* +* * +* Description : Note un ajout ou un retrait de panneau principal. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void gtk_dock_station_notify_new_main_panel_state(const GtkDockStation *station, GtkTiledPanel *main, bool activated) +{ + GListModel *list; /* Liste de pages à parcourir */ + guint count; /* Nombre de pages */ + guint i; /* Boucle de parcours */ + GtkStackPage *page; /* Page à consulter */ + GtkWidget *panel; /* Panneau intégré */ + + list = G_LIST_MODEL(gtk_stack_get_pages(station->stack)); + + count = g_list_model_get_n_items(list); + + for (i = 0; i < count; i++) + { + page = GTK_STACK_PAGE(g_list_model_get_object(list, i)); + if (page == NULL) continue; + + panel = gtk_stack_page_get_child(page); + + gtk_tiled_panel_notify_new_main_panel_state(GTK_TILED_PANEL(panel), main, activated); + + unref_object(page); + + } + + unref_object(list); + +} + + + /* ---------------------------------------------------------------------------------- */ /* IMPLEMENTATION DES FONCTIONS DE CLASSE */ /* ---------------------------------------------------------------------------------- */ |