<?xml version="1.0" encoding="UTF-8"?>
<interface>

    <template class="GtkSecurityTweakPanel" parent="GtkBox">

        <property name="orientation">vertical</property>

        <!-- Conservation de paramètres sécurisée -->
        <child>
            <object class="GtkGrid">
                <property name="margin-start">20</property>
                <property name="margin-end">20</property>
                <property name="margin-top">20</property>
                <property name="margin-bottom">20</property>
                <property name="row-spacing">10</property>
                <property name="column-spacing">10</property>

                <child>
                    <object class="GtkLabel">
                        <property name="label">Secret storage</property>
                        <property name="use-markup">true</property>
                        <property name="xalign">0</property>
                        <layout>
                            <property name="column">0</property>
                            <property name="row">0</property>
                            <property name="column-span">2</property>
                        </layout>
                        <style>
                            <class name="heading"/>
                        </style>
                    </object>
                </child>

                <child>
                    <object class="GtkLabel">
                        <property name="label">Configuration may handle sensitive data (such as passwords or API keys) which can be saved in plain text or stored encrypted using a Primary Password.

If encryption is activated, entering the Primary Password will be asked on need once per session.</property>
                        <property name="wrap">true</property>
                        <property name="xalign">0</property>
                        <layout>
                            <property name="column">0</property>
                            <property name="row">1</property>
                            <property name="column-span">2</property>
                        </layout>
                        <style>
                            <class name="dim-label"/>
                        </style>
                    </object>
                </child>

                <!-- Mot de passe courant -->

                <child>
                    <object class="GtkLabel">
                        <property name="label">Enter current password:</property>
                        <property name="xalign">0</property>
                        <layout>
                            <property name="column">0</property>
                            <property name="row">2</property>
                        </layout>
                    </object>
                </child>

                <child>
                    <object class="GtkPasswordEntry" id="current_primary_passwd">
                        <property name="hexpand">true</property>
                        <property name="show-peek-icon">true</property>
                        <layout>
                            <property name="column">1</property>
                            <property name="row">2</property>
                        </layout>
                    </object>
                </child>

                <!-- Nouveau mot de passe -->

                <child>
                    <object class="GtkLabel" id="new_primary_passwd_lbl">
                        <property name="label">Enter new password:</property>
                        <property name="xalign">0</property>
                        <layout>
                            <property name="column">0</property>
                            <property name="row">3</property>
                        </layout>
                    </object>
                </child>

                <child>
                    <object class="GtkPasswordEntry" id="new_primary_passwd">
                        <property name="hexpand">true</property>
                        <property name="show-peek-icon">true</property>
                        <signal name="changed" handler="gtk_security_tweak_panel_on_new_passwords_changed"/>
                        <layout>
                            <property name="column">1</property>
                            <property name="row">3</property>
                        </layout>
                    </object>
                </child>

                <!-- Confirmation de mot de passe -->

                <child>
                    <object class="GtkLabel" id="new_primary_passwd_2_lbl">
                        <property name="label">Re-enter new password:</property>
                        <property name="xalign">0</property>
                        <layout>
                            <property name="column">0</property>
                            <property name="row">4</property>
                        </layout>
                    </object>
                </child>

                <child>
                    <object class="GtkPasswordEntry" id="new_primary_passwd_2">
                        <property name="hexpand">true</property>
                        <property name="show-peek-icon">true</property>
                        <signal name="changed" handler="gtk_security_tweak_panel_on_new_passwords_changed"/>
                        <layout>
                            <property name="column">1</property>
                            <property name="row">4</property>
                        </layout>
                    </object>
                </child>

                <!-- Boutons de contrôle -->

                <child>
                    <object class="GtkBox">
                        <property name="halign">center</property>
                        <property name="homogeneous">true</property>
                        <property name="spacing">8</property>
                        <layout>
                            <property name="column">0</property>
                            <property name="row">5</property>
                            <property name="column-span">2</property>
                        </layout>

                        <child>
                            <object class="GtkButton" id="set_password">
                                <property name="label">Set</property>
                                <signal name="clicked" handler="gtk_security_tweak_panel_on_set_password_clicked"/>
                            </object>
                        </child>

                        <child>
                            <object class="GtkButton" id="change_password">
                                <property name="label">Change</property>
                                <signal name="clicked" handler="gtk_security_tweak_panel_on_change_password_clicked"/>
                            </object>
                        </child>

                        <child>
                            <object class="GtkButton" id="remove_password">
                                <property name="label">Remove</property>
                                <signal name="clicked" handler="gtk_security_tweak_panel_on_remove_password_clicked"/>
                                <style>
                                    <class name="destructive-action"/>
                                </style>
                            </object>
                        </child>

                    </object>
                </child>

            </object>
        </child>

    </template>
</interface>