Adding the 'error' css class to icons visually indicates that there's an issue with the input. This is the same purpose served by the status icons. Another reason to remove the status icons is that with the error class added to entries the entries dim except for the status icons.
182 lines
9 KiB
XML
182 lines
9 KiB
XML
<?xml version="1.0"?>
|
|
<interface>
|
|
<template class="CcPasswordDialog" parent="AdwPreferencesWindow">
|
|
<property name="title" translatable="yes">Change Password</property>
|
|
<property name="modal">True</property>
|
|
<property name="hide-on-close">True</property>
|
|
<property name="icon_name">system-users</property>
|
|
<property name="default-height">420</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<child>
|
|
<object class="AdwHeaderBar">
|
|
<property name="show-start-title-buttons">False</property>
|
|
<property name="show-end-title-buttons">False</property>
|
|
<child type="start">
|
|
<object class="GtkButton">
|
|
<property name="label" translatable="yes">_Cancel</property>
|
|
<property name="visible">True</property>
|
|
<property name="visible">True</property>
|
|
<property name="receives_default">True</property>
|
|
<property name="use_underline">True</property>
|
|
<property name="valign">center</property>
|
|
<signal name="clicked" handler="gtk_window_destroy" object="CcPasswordDialog" swapped="yes"/>
|
|
<style>
|
|
<class name="text-button"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child type="end">
|
|
<object class="GtkButton" id="ok_button">
|
|
<property name="label" translatable="yes">Ch_ange</property>
|
|
<property name="receives_default">True</property>
|
|
<property name="use_underline">True</property>
|
|
<property name="valign">center</property>
|
|
<signal name="clicked" handler="ok_button_clicked_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
<style>
|
|
<class name="text-button"/>
|
|
<class name="suggested-action"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwPreferencesPage">
|
|
<child>
|
|
<object class="AdwPreferencesGroup" id="password_group">
|
|
<child>
|
|
<object class="AdwPasswordEntryRow" id="old_password_entry">
|
|
<property name="title" translatable="yes">Current Password</property>
|
|
<signal name="notify::text" handler="old_password_entry_changed" object="CcPasswordDialog" swapped="yes"/>
|
|
<signal name="activate" handler="old_password_entry_focus_out_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
<style>
|
|
<class name="error"/>
|
|
</style>
|
|
<child>
|
|
<object class="GtkEventControllerFocus">
|
|
<signal name="leave" handler="old_password_entry_focus_out_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwPasswordEntryRow" id="password_entry">
|
|
<property name="title" translatable="yes">New Password</property>
|
|
<signal name="notify::text" handler="password_entry_changed" object="CcPasswordDialog" swapped="yes"/>
|
|
<signal name="activate" handler="password_entry_focus_out_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
<style>
|
|
<class name="error"/>
|
|
</style>
|
|
<child>
|
|
<object class="GtkEventControllerKey">
|
|
<signal name="key-pressed" handler="password_entry_key_press_cb" object="CcPasswordDialog" swapped="no"/>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkEventControllerFocus">
|
|
<signal name="leave" handler="password_entry_focus_out_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
</object>
|
|
</child>
|
|
<child type="suffix">
|
|
<object class="GtkButton" id="generate_password_button">
|
|
<property name="visible">False</property>
|
|
<property name="icon-name">emblem-system-symbolic</property>
|
|
<property name="valign">center</property>
|
|
<signal name="clicked" handler="generate_password" object="CcPasswordDialog" swapped="yes"/>
|
|
<style>
|
|
<class name="flat"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwPasswordEntryRow" id="verify_entry">
|
|
<property name="title" translatable="yes">Confirm Password</property>
|
|
<signal name="notify::text" handler="verify_entry_changed" object="CcPasswordDialog" swapped="yes"/>
|
|
<signal name="activate" handler="password_entry_focus_out_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
<style>
|
|
<class name="error"/>
|
|
</style>
|
|
<child>
|
|
<object class="GtkEventControllerFocus">
|
|
<signal name="leave" handler="password_entry_focus_out_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel" id="verify_label">
|
|
<property name="label" translatable="yes">The passwords do not match.</property>
|
|
<property name="visible">False</property>
|
|
<property name="margin-top">12</property>
|
|
<style>
|
|
<class name="error"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLevelBar" id="strength_indicator">
|
|
<property name="mode">continuous</property>
|
|
<property name="max-value">5</property>
|
|
<property name="margin-top">12</property>
|
|
<offsets>
|
|
<offset name="strength-weak" value="1"/>
|
|
<offset name="strength-low" value="2"/>
|
|
<offset name="strength-medium" value="3"/>
|
|
<offset name="strength-good" value="4"/>
|
|
<offset name="strength-high" value="5"/>
|
|
</offsets>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel" id="password_hint_label">
|
|
<property name="halign">start</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="wrap">True</property>
|
|
<style>
|
|
<class name="dim-label"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwPreferencesGroup" id="password_on_next_login_group">
|
|
<property name="visible">False</property>
|
|
<child>
|
|
<object class="AdwActionRow" id="action_login_row">
|
|
<property name="title" translatable="yes">Allow user to change their password on next login</property>
|
|
<property name="activatable_widget">action_login_radio</property>
|
|
<child type="prefix">
|
|
<object class="GtkCheckButton" id="action_login_radio">
|
|
<property name="receives_default">False</property>
|
|
<property name="active">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwActionRow" id="action_now_row">
|
|
<property name="title" translatable="yes">Set a password now</property>
|
|
<property name="activatable_widget">action_now_radio</property>
|
|
<child type="prefix">
|
|
<object class="GtkCheckButton" id="action_now_radio">
|
|
<property name="receives_default">False</property>
|
|
<property name="active">True</property>
|
|
<property name="group">action_login_radio</property>
|
|
<signal name="toggled" handler="action_now_radio_toggled_cb" object="CcPasswordDialog" swapped="yes"/>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|