summaryrefslogtreecommitdiff
path: root/src/gui/panels/regedit.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-03-09 12:55:20 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-03-09 12:55:20 (GMT)
commitf8f804cf7ff9a62404b843cf303c762101572784 (patch)
treec35edc5dc8fb5ded9cc8d975d12a1eac2c3e330a /src/gui/panels/regedit.c
parent235b34006d734d55333a182ffd8bbe7fbf8f54bc (diff)
Reorganized the whole code dealing with dockable panels.
Diffstat (limited to 'src/gui/panels/regedit.c')
-rw-r--r--src/gui/panels/regedit.c51
1 files changed, 15 insertions, 36 deletions
diff --git a/src/gui/panels/regedit.c b/src/gui/panels/regedit.c
index cb4fe85..a62f824 100644
--- a/src/gui/panels/regedit.c
+++ b/src/gui/panels/regedit.c
@@ -215,8 +215,20 @@ static void g_regedit_panel_init(GRegeditPanel *panel)
GtkTreeViewColumn *column; /* Colonne de la liste */
GtkTreeSortable *sortable; /* Autre vision de la liste */
+ /* Eléments de base */
+
base = G_EDITOR_ITEM(panel);
+ base->name = PANEL_REGEDIT_ID;
+
+ pitem = G_PANEL_ITEM(panel);
+
+ pitem->personality = PIP_SINGLETON;
+ pitem->lname = _("Configuration parameters");
+ pitem->path = "N";
+
+ /* Représentation graphique */
+
base->widget = gtk_grid_new();
gtk_widget_show(base->widget);
@@ -225,10 +237,6 @@ static void g_regedit_panel_init(GRegeditPanel *panel)
ref = G_OBJECT(base->widget);
g_object_set_data(ref, "panel", panel);
- pitem = G_PANEL_ITEM(panel);
-
- pitem->personality = PIP_SINGLETON;
-
/* Partie recherche */
label = qck_create_label(NULL, NULL, _("Look for:"));
@@ -374,7 +382,7 @@ static void g_regedit_panel_finalize(GRegeditPanel *panel)
/******************************************************************************
* *
-* Paramètres : ref = espace de référencement global. *
+* Paramètres : - *
* *
* Description : Crée un panneau d'affichage des paramètres de configuration. *
* *
@@ -384,15 +392,12 @@ static void g_regedit_panel_finalize(GRegeditPanel *panel)
* *
******************************************************************************/
-GEditorItem *g_regedit_panel_new(GObject *ref)
+GPanelItem *g_regedit_panel_new(void)
{
- GEditorItem *result; /* Structure à retourner */
+ GPanelItem *result; /* Structure à retourner */
result = g_object_new(G_TYPE_REGEDIT_PANEL, NULL);
- g_panel_item_init_ext(G_PANEL_ITEM(result), ref, PANEL_REGEDIT_ID,
- _("Configuration parameters"), G_EDITOR_ITEM(result)->widget, "N");
-
reload_config_into_treeview(G_REGEDIT_PANEL(result), get_main_configuration());
return result;
@@ -400,32 +405,6 @@ GEditorItem *g_regedit_panel_new(GObject *ref)
}
-/******************************************************************************
-* *
-* Paramètres : ref = espace de référencement global. *
-* *
-* Description : Construit le panneau d'affichage des messages système. *
-* *
-* Retour : Adresse du panneau mis en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GPanelItem *create_regedit_panel(GObject *ref)
-{
- GEditorItem *result; /* Elément réactif à renvoyer */
-
- result = g_regedit_panel_new(ref);
-
- /* Enregistre correctement le tout */
- register_editor_item(result);
-
- return G_PANEL_ITEM(result);
-
-}
-
-
/* ---------------------------------------------------------------------------------- */
/* AFFICHAGE A L'AIDE D'UNE LISTE */