[evolution] I#2030 - New-Mail-Account: 'Skip Lookup' button not removed
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#2030 - New-Mail-Account: 'Skip Lookup' button not removed
- Date: Fri, 16 Sep 2022 09:50:39 +0000 (UTC)
commit 832e62e1261c4a2f2da751dad17b6e724400046d
Author: Milan Crha <mcrha redhat com>
Date: Fri Sep 16 11:48:02 2022 +0200
I#2030 - New-Mail-Account: 'Skip Lookup' button not removed
This also fixes the 'back-button' not being recognized.
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/2030
src/mail/e-mail-config-assistant.c | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/src/mail/e-mail-config-assistant.c b/src/mail/e-mail-config-assistant.c
index e7e114eb24..1d76b3a6e2 100644
--- a/src/mail/e-mail-config-assistant.c
+++ b/src/mail/e-mail-config-assistant.c
@@ -45,7 +45,7 @@
((obj), E_TYPE_MAIL_CONFIG_ASSISTANT, EMailConfigAssistantPrivate))
/* GtkAssistant's back button label. */
-#define BACK_BUTTON_LABEL N_("Go _Back")
+#define BACK_BUTTON_LABEL g_dgettext ("gtk30", "_Back")
typedef struct _ConfigLookupContext ConfigLookupContext;
@@ -144,8 +144,10 @@ config_lookup_context_new (GtkAssistant *assistant,
static void
config_lookup_context_free (ConfigLookupContext *context)
{
- gtk_assistant_remove_action_widget (
- context->assistant, context->skip_button);
+ /* Cannot use gtk_assistant_remove_action_widget(), because
+ it doesn't work with the header bar. See:
+ https://gitlab.gnome.org/GNOME/gtk/-/issues/5185 */
+ gtk_widget_destroy (context->skip_button);
g_object_unref (context->assistant);
g_object_unref (context->cancellable);
@@ -715,16 +717,6 @@ mail_config_assistant_constructed (GObject *object)
session = e_mail_config_assistant_get_session (assistant);
registry = e_mail_session_get_registry (session);
- /* XXX Locate the GtkAssistant's internal "Go Back" button so
- * we can temporarily rename it for autoconfigure results.
- * Walking the container like this is an extremely naughty
- * and brittle hack, but GtkAssistant does not provide API
- * to access it directly. */
- gtk_container_forall (
- GTK_CONTAINER (assistant),
- mail_config_assistant_find_back_button_cb,
- assistant);
-
/* Configure a new identity source. */
identity_source = e_source_new (NULL, NULL, NULL);
@@ -1006,6 +998,18 @@ mail_config_assistant_prepare (GtkAssistant *assistant,
first_visit = TRUE;
}
+ if (!priv->back_button) {
+ /* XXX Locate the GtkAssistant's internal "Go Back" button so
+ * we can temporarily rename it for autoconfigure results.
+ * Walking the container like this is an extremely naughty
+ * and brittle hack, but GtkAssistant does not provide API
+ * to access it directly. */
+ gtk_container_forall (
+ GTK_CONTAINER (assistant),
+ mail_config_assistant_find_back_button_cb,
+ assistant);
+ }
+
/* Are we viewing autoconfiguration results? If so, temporarily
* rename the back button to clarify that account details can be
* revised. Otherwise reset the button to its original label. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]