mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 20:07:36 +00:00
sip-account-widget: Use GtkPasswordEntry
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
parent
7cf7fc02d6
commit
1e862ffc67
2 changed files with 2 additions and 23 deletions
|
@ -197,22 +197,6 @@ set_password_visibility (CallsSipAccountWidget *self, gboolean visible)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
on_password_visibility_changed (CallsSipAccountWidget *self,
|
||||
GtkEntryIconPosition icon_pos,
|
||||
GdkEvent *event,
|
||||
GtkEntry *entry)
|
||||
{
|
||||
gboolean visible;
|
||||
|
||||
g_assert (CALLS_IS_SIP_ACCOUNT_WIDGET (self));
|
||||
g_assert (GTK_IS_ENTRY (entry));
|
||||
g_assert (icon_pos == GTK_ENTRY_ICON_SECONDARY);
|
||||
|
||||
visible = !gtk_entry_get_visibility (entry);
|
||||
set_password_visibility (self, visible);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stop "insert-text" signal emission if any undesired port
|
||||
* value occurs
|
||||
|
@ -647,7 +631,6 @@ calls_sip_account_widget_class_init (CallsSipAccountWidgetClass *klass)
|
|||
gtk_widget_class_bind_template_callback (widget_class, on_delete_clicked);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_apply_clicked);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_user_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_password_visibility_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_port_entry_insert_text);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_port_entry_after_insert_text);
|
||||
}
|
||||
|
|
|
@ -99,14 +99,10 @@
|
|||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Password</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="password">
|
||||
<object class="GtkPasswordEntry" id="password">
|
||||
<property name="valign">center</property>
|
||||
<property name="input-purpose">password</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="primary_icon_sensitive">False</property>
|
||||
<property name="secondary_icon_name">view-reveal-symbolic</property>
|
||||
<property name="show-peek-icon">True</property>
|
||||
<signal name="changed" handler="on_user_changed" swapped="yes"/>
|
||||
<signal name="icon-press" handler="on_password_visibility_changed" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
Loading…
Reference in a new issue