sip-account-widget: Use GtkPasswordEntry
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
@@ -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
|
* Stop "insert-text" signal emission if any undesired port
|
||||||
* value occurs
|
* 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_delete_clicked);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, on_apply_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_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_insert_text);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, on_port_entry_after_insert_text);
|
gtk_widget_class_bind_template_callback (widget_class, on_port_entry_after_insert_text);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,14 +99,10 @@
|
|||||||
<object class="AdwActionRow">
|
<object class="AdwActionRow">
|
||||||
<property name="title" translatable="yes">Password</property>
|
<property name="title" translatable="yes">Password</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEntry" id="password">
|
<object class="GtkPasswordEntry" id="password">
|
||||||
<property name="valign">center</property>
|
<property name="valign">center</property>
|
||||||
<property name="input-purpose">password</property>
|
<property name="show-peek-icon">True</property>
|
||||||
<property name="visibility">False</property>
|
|
||||||
<property name="primary_icon_sensitive">False</property>
|
|
||||||
<property name="secondary_icon_name">view-reveal-symbolic</property>
|
|
||||||
<signal name="changed" handler="on_user_changed" swapped="yes"/>
|
<signal name="changed" handler="on_user_changed" swapped="yes"/>
|
||||||
<signal name="icon-press" handler="on_password_visibility_changed" swapped="yes"/>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
Reference in New Issue
Block a user