diff options
author | Daniel Boles <dboles.src@gmail.com> | 2017-07-31 19:33:38 +0100 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2017-07-31 20:01:30 +0100 |
commit | e74be1728e21c04ff044a5ee33af855c6714bbe7 (patch) | |
tree | 2e263fdda1ba7517bfa3543a25eaa5196ad7514f /tests | |
parent | 1eb8d2ad09412ac397c6039c56354f72f4996bad (diff) | |
download | gtk+-e74be1728e21c04ff044a5ee33af855c6714bbe7.tar.gz |
testentryicons: Set tooltips on all icons
Just to test tooltips in all cases; what was already here
should have been sufficient, but this doesn't hurt.
While here, also add some instructive placeholder text.
https://bugzilla.gnome.org/show_bug.cgi?id=780938
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testentryicons.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/testentryicons.c b/tests/testentryicons.c index a6e21c060d..41196a2158 100644 --- a/tests/testentryicons.c +++ b/tests/testentryicons.c @@ -190,14 +190,25 @@ main (int argc, char **argv) gtk_widget_set_hexpand (entry, TRUE); gtk_grid_attach (GTK_GRID (grid), entry, 1, 2, 1, 1); + gtk_entry_set_placeholder_text (GTK_ENTRY (entry), + "Type some text, then click an icon"); + gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, "edit-find-symbolic"); + gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry), + GTK_ENTRY_ICON_PRIMARY, + "Clicking the other icon is more interesting!"); + gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, "edit-clear-symbolic"); + gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry), + GTK_ENTRY_ICON_SECONDARY, + "Clear"); + g_signal_connect (entry, "icon-press", G_CALLBACK (clear_pressed), NULL); /* @@ -221,6 +232,10 @@ main (int argc, char **argv) GTK_ENTRY_ICON_PRIMARY, FALSE); + gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry), + GTK_ENTRY_ICON_PRIMARY, + "The password is hidden for security"); + /* Name - Does not set any icons. */ label = gtk_label_new ("Name:"); gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1); @@ -229,6 +244,11 @@ main (int argc, char **argv) entry = gtk_entry_new (); gtk_widget_set_hexpand (entry, TRUE); + gtk_entry_set_placeholder_text (GTK_ENTRY (entry), + "Use the RadioButtons to choose an icon"); + gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry), + GTK_ENTRY_ICON_SECONDARY, + "Use the RadioButtons to change this icon"); gtk_grid_attach (GTK_GRID (grid), entry, 1, 4, 1, 1); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); |