summaryrefslogtreecommitdiff
path: root/tests/testentryicons.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-12-18 14:21:10 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-12-18 19:38:59 -0500
commit8de65c5aca4518d0d0358bb086774c3fa8a32af0 (patch)
tree343477a97a2e9b43e460f7e406cdfee91845934d /tests/testentryicons.c
parent7acb670e708bc2931d6f8e1afec423b9d7b3c15c (diff)
downloadgtk+-wip/matthiasc/password-indicator.tar.gz
entry: Add a password indicatorwip/matthiasc/password-indicator
This adds a password-indicator property to GtkEntry. When set on a password entry, the entry shows an icon indicating it is in password mode, which can be clicked to reveal the text. We are careful to not interfere with the Caps Lock warning, which uses the same icon position.
Diffstat (limited to 'tests/testentryicons.c')
-rw-r--r--tests/testentryicons.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/testentryicons.c b/tests/testentryicons.c
index d9921edc9a..cc80b3c294 100644
--- a/tests/testentryicons.c
+++ b/tests/testentryicons.c
@@ -214,13 +214,7 @@ main (int argc, char **argv)
gtk_grid_attach (GTK_GRID (grid), entry, 1, 3, 1, 1);
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
- gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_PRIMARY,
- "dialog-password-symbolic");
-
- gtk_entry_set_icon_activatable (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_PRIMARY,
- FALSE);
+ g_object_set (entry, "password-indicator", TRUE, NULL);
/* Name - Does not set any icons. */
label = gtk_label_new ("Name:");