summaryrefslogtreecommitdiff
path: root/src/gtkext/dockstation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext/dockstation.c')
-rw-r--r--src/gtkext/dockstation.c51
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 */
/* ---------------------------------------------------------------------------------- */