summaryrefslogtreecommitdiff
path: root/src/gui/panels/bintree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels/bintree.c')
-rw-r--r--src/gui/panels/bintree.c73
1 files changed, 48 insertions, 25 deletions
diff --git a/src/gui/panels/bintree.c b/src/gui/panels/bintree.c
index eb2debc..db5e774 100644
--- a/src/gui/panels/bintree.c
+++ b/src/gui/panels/bintree.c
@@ -117,7 +117,10 @@ static void g_bintree_panel_dispose(GBintreePanel *);
static void g_bintree_panel_finalize(GBintreePanel *);
/* Fournit le nom interne attribué à l'élément réactif. */
-static char *g_bintree_panel_get_key(const GBintreePanel *);
+static char *g_bintree_panel_class_get_key(const GBintreePanelClass *);
+
+/* Indique le chemin initial de la localisation d'un panneau. */
+static char *g_bintree_panel_class_get_path(const GBintreePanelClass *);
/* Modifie la profondeur affichée des portions présentes. */
static void on_depth_spin_value_changed(GtkSpinButton *, const GBintreePanel *);
@@ -215,7 +218,7 @@ G_DEFINE_TYPE_WITH_CODE(GBintreePanel, g_bintree_panel, G_TYPE_PANEL_ITEM,
/******************************************************************************
* *
-* Paramètres : klass = classe à initialiser. *
+* Paramètres : class = classe à initialiser. *
* *
* Description : Initialise la classe des panneaux d'affichage des portions. *
* *
@@ -225,24 +228,26 @@ G_DEFINE_TYPE_WITH_CODE(GBintreePanel, g_bintree_panel, G_TYPE_PANEL_ITEM,
* *
******************************************************************************/
-static void g_bintree_panel_class_init(GBintreePanelClass *klass)
+static void g_bintree_panel_class_init(GBintreePanelClass *class)
{
GObjectClass *object; /* Autre version de la classe */
GEditorItemClass *item; /* Encore une autre vision... */
GPanelItemClass *panel; /* Version parente de la classe*/
- object = G_OBJECT_CLASS(klass);
+ object = G_OBJECT_CLASS(class);
object->dispose = (GObjectFinalizeFunc/* ! */)g_bintree_panel_dispose;
object->finalize = (GObjectFinalizeFunc)g_bintree_panel_finalize;
- item = G_EDITOR_ITEM_CLASS(klass);
+ item = G_EDITOR_ITEM_CLASS(class);
- item->get_key = (get_item_key_fc)g_bintree_panel_get_key;
+ item->get_key = (get_item_key_fc)g_bintree_panel_class_get_key;
item->change_content = (change_item_content_fc)change_bintree_panel_current_content;
- panel = G_PANEL_ITEM_CLASS(klass);
+ panel = G_PANEL_ITEM_CLASS(class);
+
+ panel->get_path = (get_panel_path_fc)g_bintree_panel_class_get_path;
panel->gid = setup_tiny_global_work_group(1);
@@ -273,15 +278,10 @@ static void g_bintree_panel_init(GBintreePanel *panel)
pitem = G_PANEL_ITEM(panel);
- pitem->personality = PIP_SINGLETON;
-
pitem->widget = G_NAMED_WIDGET(gtk_built_named_widget_new_for_panel(_("Binary tree"),
_("Tree of the binary layout"),
PANEL_BINTREE_ID));
- pitem->dock_at_startup = true;
- pitem->path = strdup("MEN");
-
/* Compléments propres */
panel->binary = NULL;
@@ -415,44 +415,44 @@ static void g_bintree_panel_finalize(GBintreePanel *panel)
/******************************************************************************
* *
-* Paramètres : - *
+* Paramètres : class = classe à consulter. *
* *
-* Description : Crée un panneau présentant l'arborescence des portions. *
+* Description : Fournit le nom interne attribué à l'élément réactif. *
* *
-* Retour : Adresse de la structure mise en place. *
+* Retour : Désignation (courte) de l'élément de l'éditeur. *
* *
* Remarques : - *
* *
******************************************************************************/
-GPanelItem *g_bintree_panel_new(void)
+static char *g_bintree_panel_class_get_key(const GBintreePanelClass *class)
{
- GBintreePanel *result; /* Structure à retourner */
+ char *result; /* Description à renvoyer */
- result = g_object_new(G_TYPE_BINTREE_PANEL, NULL);
+ result = strdup(PANEL_BINTREE_ID);
- return G_PANEL_ITEM(result);
+ return result;
}
/******************************************************************************
* *
-* Paramètres : panel = instance à consulter. *
+* Paramètres : class = classe à consulter. *
* *
-* Description : Fournit le nom interne attribué à l'élément réactif. *
+* Description : Indique le chemin initial de la localisation d'un panneau. *
* *
-* Retour : Désignation (courte) de l'élément de l'éditeur. *
+* Retour : Chemin fixé associé à la position initiale. *
* *
* Remarques : - *
* *
******************************************************************************/
-static char *g_bintree_panel_get_key(const GBintreePanel *panel)
+static char *g_bintree_panel_class_get_path(const GBintreePanelClass *class)
{
- char *result; /* Description à renvoyer */
+ char *result; /* Emplacement à retourner */
- result = strdup(PANEL_BINTREE_ID);
+ result = strdup("MEN");
return result;
@@ -461,6 +461,29 @@ static char *g_bintree_panel_get_key(const GBintreePanel *panel)
/******************************************************************************
* *
+* Paramètres : - *
+* *
+* Description : Crée un panneau présentant l'arborescence des portions. *
+* *
+* Retour : Adresse de la structure mise en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GPanelItem *g_bintree_panel_new(void)
+{
+ GBintreePanel *result; /* Structure à retourner */
+
+ result = g_object_new(G_TYPE_BINTREE_PANEL, NULL);
+
+ return G_PANEL_ITEM(result);
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : button = bouton de réglage de l'affichage. *
* treeview = arborescence dont l'affichage est à moduler. *
* *