[evolution] mail_config_provider_page_add_checkspin: Correct mnemonic widget setting



commit eb00f949ebd681f9934e8424b53cd70c96c97a78
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jan 16 09:16:47 2020 +0100

    mail_config_provider_page_add_checkspin: Correct mnemonic widget setting
    
    When the checkspin is without the check the 'prefix' is a label, not a checkbox,
    and it should have set the mnemonic widget to have mnemonics working.

 src/mail/e-mail-config-provider-page.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/mail/e-mail-config-provider-page.c b/src/mail/e-mail-config-provider-page.c
index 0e46b12718..20d8164ede 100644
--- a/src/mail/e-mail-config-provider-page.c
+++ b/src/mail/e-mail-config-provider-page.c
@@ -294,6 +294,9 @@ mail_config_provider_page_add_checkspin (EMailConfigProviderPage *page,
        gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0);
        gtk_widget_show (spin);
 
+       if (!use_pspec)
+               gtk_label_set_mnemonic_widget (GTK_LABEL (prefix), spin);
+
        e_binding_bind_property (
                settings, entry->name,
                spin, "value",
@@ -308,7 +311,7 @@ mail_config_provider_page_add_checkspin (EMailConfigProviderPage *page,
 
        if (post != NULL) {
                GtkWidget *label = gtk_label_new_with_mnemonic (post);
-               gtk_label_set_mnemonic_widget (GTK_LABEL (label), prefix);
+               gtk_label_set_mnemonic_widget (GTK_LABEL (label), use_pspec ? prefix : spin);
                gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
                gtk_widget_show (label);
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]