[gtk+] testentryicons: Set tooltips on all icons
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testentryicons: Set tooltips on all icons
- Date: Mon, 31 Jul 2017 19:06:12 +0000 (UTC)
commit e74be1728e21c04ff044a5ee33af855c6714bbe7
Author: Daniel Boles <dboles src gmail com>
Date: Mon Jul 31 19:33:38 2017 +0100
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
tests/testentryicons.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/tests/testentryicons.c b/tests/testentryicons.c
index a6e21c0..41196a2 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]