diff options
author | Milan Crha <mcrha@redhat.com> | 2023-04-18 13:55:37 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2023-04-18 13:55:37 +0200 |
commit | 199787af388e744f6d9a5ad1d6f1a29d0c310f82 (patch) | |
tree | 6cd106d9a5867eabf2a5612d4d282636afe33bf8 | |
parent | 7742d1d9efa9b0ff7eea631c94342e9c41630ef0 (diff) | |
download | evolution-199787af388e744f6d9a5ad1d6f1a29d0c310f82.tar.gz |
EMailConfigSecurityPage: Add hint for OpenPGP Key ID
The OpenPGP Key ID can be left empty, in which case sender's e-mail
address is used as the key ID, but it's not discoverable by the users,
thus let's hint it as a placeholder text for the entry.
-rw-r--r-- | src/mail/e-mail-config-security-page.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mail/e-mail-config-security-page.c b/src/mail/e-mail-config-security-page.c index 6660726b23..8a356c62dd 100644 --- a/src/mail/e-mail-config-security-page.c +++ b/src/mail/e-mail-config-security-page.c @@ -343,7 +343,7 @@ compare_by_display_name (gconstpointer v1, static GtkWidget * mail_security_page_get_openpgpg_combo (void) { - GtkWidget *widget; + GtkWidget *widget, *child; GtkListStore *store; GtkCellRenderer *cell; GHashTable *keys_hash; @@ -397,6 +397,10 @@ mail_security_page_get_openpgpg_combo (void) gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), cell, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), cell, "text", 1, NULL); + child = gtk_bin_get_child (GTK_BIN (widget)); + if (GTK_IS_ENTRY (child)) + gtk_entry_set_placeholder_text (GTK_ENTRY (child), _("Use sender e-mail address")); + return widget; } @@ -505,8 +509,10 @@ mail_config_security_page_constructed (GObject *object) label = GTK_LABEL (widget); widget = mail_security_page_get_openpgpg_combo (); - if (!widget) + if (!widget) { widget = gtk_entry_new (); + gtk_entry_set_placeholder_text (GTK_ENTRY (widget), _("Use sender e-mail address")); + } gtk_widget_set_hexpand (widget, TRUE); gtk_label_set_mnemonic_widget (label, widget); |