mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 00:34:40 +01:00
account_add: Use property class in action rows
This commit is contained in:
parent
bc6cd9daaf
commit
4414718ebe
2 changed files with 21 additions and 39 deletions
|
@ -155,51 +155,35 @@
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="algorithm_row">
|
<object class="AdwActionRow" id="algorithm_row">
|
||||||
<property name="title" translatable="yes">Algorithm</property>
|
<property name="title" translatable="yes">Algorithm</property>
|
||||||
<child>
|
<style>
|
||||||
<object class="GtkLabel" id="algorithm_label">
|
<class name="property"/>
|
||||||
<property name="halign">end</property>
|
</style>
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="method_row">
|
<object class="AdwActionRow" id="method_row">
|
||||||
<property name="title" translatable="yes">Computing Method</property>
|
<property name="title" translatable="yes">Computing Method</property>
|
||||||
<child>
|
<style>
|
||||||
<object class="GtkLabel" id="method_label">
|
<class name="property"/>
|
||||||
<property name="halign">end</property>
|
</style>
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="period_row">
|
<object class="AdwActionRow" id="period_row">
|
||||||
<property name="title" translatable="yes">Period</property>
|
<property name="title" translatable="yes">Period</property>
|
||||||
<property name="subtitle" translatable="yes">Duration in seconds until the next password update</property>
|
<property name="subtitle" translatable="yes">Duration in seconds until the next password update</property>
|
||||||
<child>
|
<style>
|
||||||
<object class="GtkLabel" id="period_label">
|
<class name="property"/>
|
||||||
<property name="halign">end</property>
|
</style>
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="digits_row">
|
<object class="AdwActionRow" id="digits_row">
|
||||||
<property name="title" translatable="yes">Digits</property>
|
<property name="title" translatable="yes">Digits</property>
|
||||||
<property name="subtitle" translatable="yes">Length of the generated code</property>
|
<property name="subtitle" translatable="yes">Length of the generated code</property>
|
||||||
<child>
|
<style>
|
||||||
<object class="GtkLabel" id="digits_label">
|
<class name="property"/>
|
||||||
<property name="halign">end</property>
|
</style>
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|
|
@ -46,15 +46,13 @@ mod imp {
|
||||||
#[template_child]
|
#[template_child]
|
||||||
pub more_list: TemplateChild<gtk::ListBox>,
|
pub more_list: TemplateChild<gtk::ListBox>,
|
||||||
#[template_child]
|
#[template_child]
|
||||||
pub period_label: TemplateChild<gtk::Label>,
|
pub digits_row: TemplateChild<adw::ActionRow>,
|
||||||
#[template_child]
|
|
||||||
pub digits_label: TemplateChild<gtk::Label>,
|
|
||||||
#[template_child]
|
#[template_child]
|
||||||
pub provider_entry: TemplateChild<gtk::Entry>,
|
pub provider_entry: TemplateChild<gtk::Entry>,
|
||||||
#[template_child]
|
#[template_child]
|
||||||
pub method_label: TemplateChild<gtk::Label>,
|
pub method_row: TemplateChild<adw::ActionRow>,
|
||||||
#[template_child]
|
#[template_child]
|
||||||
pub algorithm_label: TemplateChild<gtk::Label>,
|
pub algorithm_row: TemplateChild<adw::ActionRow>,
|
||||||
#[template_child]
|
#[template_child]
|
||||||
pub counter_spinbutton: TemplateChild<adw::SpinRow>,
|
pub counter_spinbutton: TemplateChild<adw::SpinRow>,
|
||||||
#[template_child]
|
#[template_child]
|
||||||
|
@ -315,17 +313,17 @@ impl AccountAddDialog {
|
||||||
if let Some(provider) = provider {
|
if let Some(provider) = provider {
|
||||||
imp.more_list.set_visible(true);
|
imp.more_list.set_visible(true);
|
||||||
imp.provider_entry.set_text(&provider.name());
|
imp.provider_entry.set_text(&provider.name());
|
||||||
imp.period_label.set_text(&provider.period().to_string());
|
imp.period_row.set_subtitle(&provider.period().to_string());
|
||||||
|
|
||||||
imp.image.set_provider(Some(&provider));
|
imp.image.set_provider(Some(&provider));
|
||||||
|
|
||||||
imp.method_label
|
imp.method_row
|
||||||
.set_text(&provider.method().to_locale_string());
|
.set_subtitle(&provider.method().to_locale_string());
|
||||||
|
|
||||||
imp.algorithm_label
|
imp.algorithm_row
|
||||||
.set_text(&provider.algorithm().to_locale_string());
|
.set_subtitle(&provider.algorithm().to_locale_string());
|
||||||
|
|
||||||
imp.digits_label.set_text(&provider.digits().to_string());
|
imp.digits_row.set_subtitle(&provider.digits().to_string());
|
||||||
|
|
||||||
if provider.method().is_time_based() {
|
if provider.method().is_time_based() {
|
||||||
imp.counter_spinbutton.set_visible(false);
|
imp.counter_spinbutton.set_visible(false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue