summaryrefslogtreecommitdiff
path: root/src/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/preferences.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/dialogs/preferences.c b/src/gui/dialogs/preferences.c
index aca562a..68e7fd9 100644
--- a/src/gui/dialogs/preferences.c
+++ b/src/gui/dialogs/preferences.c
@@ -37,6 +37,8 @@
#include "prefs/security.h"
#include "../../common/cpp.h"
#include "../../gtkext/tweak.h"
+#include "../../plugins/pglist.h"
+#include "../../plugins/tweakable.h"
@@ -133,6 +135,8 @@ static void gtk_preferences_dialog_init(GtkPreferencesDialog *dialog)
const tweak_info_t *info; /* Informations à considérer */
GtkListBox *navigation; /* Liste de sections à afficher*/
GtkTweakSection *section; /* Nouvelle section à présenter*/
+ tweak_info_t *dyn_infos; /* Informations supplémentaires*/
+ size_t dyn_count; /* Quantité de ces informations*/
tweak_info_t infos[] = {
TWEAK_SIMPLE_DEF("root", "Basics",
@@ -158,6 +162,26 @@ static void gtk_preferences_dialog_init(GtkPreferencesDialog *dialog)
}
+ /* Chargement des sections dynamiques */
+
+ dyn_infos = get_tweakable_plugins_info(&dyn_count);
+
+ for (i = 0; i < dyn_count; i++)
+ {
+ info = &dyn_infos[i];
+
+ navigation = gtk_preferences_dialog_get_navigation(dialog, info->parent, true);
+ assert(navigation != NULL);
+
+ section = gtk_tweak_section_new(info);
+
+ gtk_list_box_append(navigation, GTK_WIDGET(section));
+
+ }
+
+ if (dyn_infos != NULL)
+ free(dyn_infos);
+
/* Affichage de la liste racine */
navigation = gtk_preferences_dialog_get_navigation(dialog, "root", false);