gnome-control-center/panels/user-accounts/cc-password-dialog.ui
Ondrej Holy 29367abbb0 user-accounts: Fix password dialog crashes
Currently, the password_entry_timeout() callback can be called even after
the dialog disposal, which leads to segfaults. This is because the
corresponding source ids can be cleared in some cases without removing
the sources. Let's prevent direct calls of password_entry_timeout()
without destroying the source ids in order to fix this issue.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/760
2019-11-11 03:51:12 +00:00

305 lines
15 KiB
XML

<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy toplevel-contextual -->
<template class="CcPasswordDialog" parent="GtkDialog">
<property name="border_width">6</property>
<property name="title" translatable="yes">Change Password</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="icon_name">system-users</property>
<property name="type_hint">dialog</property>
<child internal-child="headerbar">
<object class="GtkHeaderBar" id="dialog-header-bar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="show_close_button">False</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="valign">center</property>
<style>
<class name="text-button"/>
</style>
</object>
<packing>
<property name="pack_type">start</property>
</packing>
</child>
<child>
<object class="GtkButton" id="ok_button">
<property name="label" translatable="yes">Ch_ange</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</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>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
<child internal-child="vbox">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<property name="hexpand">True</property>
<child>
<object class="GtkEntry" id="verify_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="input_purpose">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"/>
<signal name="focus-out-event" handler="password_entry_focus_out_cb" after="yes" object="CcPasswordDialog" swapped="yes"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="password_hint_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes"></property>
<property name="width-chars">35</property>
<property name="max-width-chars">35</property>
<property name="height-request">50</property>
<property name="wrap">True</property>
<property name="hexpand">True</property>
<property name="wrap_mode">word-char</property>
<style>
<class name="dim-label"/>
</style>
<attributes>
<attribute name="scale" value="0.83"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="verify_hint_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes"></property>
<property name="width-chars">35</property>
<property name="max-width-chars">35</property>
<property name="wrap">True</property>
<property name="hexpand">True</property>
<property name="wrap_mode">word-char</property>
<style>
<class name="dim-label"/>
</style>
<attributes>
<attribute name="scale" value="0.83"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Confirm New Password</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">verify_entry</property>
<property name="margin_start">25</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_New Password</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">password_entry</property>
<property name="margin_start">25</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="password_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="input_purpose">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"/>
<signal name="focus-out-event" handler="password_entry_focus_out_cb" after="yes" object="CcPasswordDialog" swapped="yes"/>
<signal name="key-press-event" handler="password_entry_key_press_cb" object="CcPasswordDialog" swapped="yes"/>
<signal name="icon-press" handler="password_entry_icon_press_cb" object="CcPasswordDialog" swapped="yes"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkLevelBar" id="strength_indicator">
<property name="visible">True</property>
<property name="mode">discrete</property>
<property name="max-value">5</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>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="old_password_label">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Current _Password</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">old_password_entry</property>
<property name="margin_start">25</property>
<property name="margin_bottom">12</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="old_password_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="margin_bottom">12</property>
<property name="input_purpose">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"/>
<signal name="focus-out-event" handler="old_password_entry_focus_out_cb" after="yes" object="CcPasswordDialog" swapped="yes"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="action_radio_box">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkRadioButton" id="action_login_radio">
<property name="label" translatable="yes">Allow user to change their password on next login</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="action_now_radio">
<property name="label" translatable="yes">Set a password now</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">action_login_radio</property>
<signal name="toggled" handler="action_now_radio_toggled_cb" object="CcPasswordDialog" swapped="yes"/>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">3</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">cancel_button</action-widget>
</action-widgets>
</template>
</interface>