[evolution] Reference a link where Google calendars to synchronize can be enabled
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Reference a link where Google calendars to synchronize can be enabled
- Date: Wed, 18 Jan 2017 11:50:34 +0000 (UTC)
commit 03244380de96c44dacdf5bad1697270603e5b800
Author: Milan Crha <mcrha redhat com>
Date: Wed Jan 18 12:50:00 2017 +0100
Reference a link where Google calendars to synchronize can be enabled
This is shown in a Summary page of a new Mail Account wizard and also
in a Google Calendar properties.
.../cal-config-google/e-cal-config-google.c | 16 +++++++++++-
.../mail-config/e-mail-config-google-summary.c | 25 ++++++++++++++++----
2 files changed, 34 insertions(+), 7 deletions(-)
---
diff --git a/src/modules/cal-config-google/e-cal-config-google.c
b/src/modules/cal-config-google/e-cal-config-google.c
index 675a210..419de98 100644
--- a/src/modules/cal-config-google/e-cal-config-google.c
+++ b/src/modules/cal-config-google/e-cal-config-google.c
@@ -26,6 +26,8 @@
#include "e-google-chooser-button.h"
#include "module-cal-config-google.h"
+#define GOOGLE_CALENDAR_URI "https://calendar.google.com/calendar/syncselect"
+
typedef ESourceConfigBackend ECalConfigGoogle;
typedef ESourceConfigBackendClass ECalConfigGoogleClass;
@@ -76,6 +78,7 @@ cal_config_google_insert_widgets (ESourceConfigBackend *backend,
GtkWidget *widget;
Context *context;
const gchar *uid;
+ gchar *markup;
context = g_slice_new0 (Context);
uid = e_source_get_uid (scratch_source);
@@ -91,11 +94,20 @@ cal_config_google_insert_widgets (ESourceConfigBackend *backend,
context->user_entry = g_object_ref (e_source_config_add_user_entry (config, scratch_source));
widget = e_google_chooser_button_new (scratch_source, config);
- e_source_config_insert_widget (
- config, scratch_source, _("Calendar:"), widget);
+ e_source_config_insert_widget (config, scratch_source, _("Calendar:"), widget);
context->google_button = g_object_ref (widget);
gtk_widget_show (widget);
+ markup = g_markup_printf_escaped ("<a href=\"%s\">%s</a>", GOOGLE_CALENDAR_URI, _("Enable Calendars
to synchronize"));
+
+ widget = gtk_label_new (markup);
+ gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
+ e_source_config_insert_widget (config, scratch_source, NULL, widget);
+ gtk_widget_show (widget);
+
+ g_free (markup);
+
e_source_config_add_refresh_interval (config, scratch_source);
}
diff --git a/src/modules/mail-config/e-mail-config-google-summary.c
b/src/modules/mail-config/e-mail-config-google-summary.c
index af33744..52db263 100644
--- a/src/modules/mail-config/e-mail-config-google-summary.c
+++ b/src/modules/mail-config/e-mail-config-google-summary.c
@@ -28,8 +28,8 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_MAIL_CONFIG_GOOGLE_SUMMARY, EMailConfigGoogleSummaryPrivate))
-#define GOOGLE_HELP_URI \
- "http://support.google.com/mail/bin/answer.py?hl=en&answer=77695"
+#define GOOGLE_IMAP_URI "http://support.google.com/mail/bin/answer.py?hl=en&answer=77695"
+#define GOOGLE_CALENDAR_URI "https://calendar.google.com/calendar/syncselect"
struct _EMailConfigGoogleSummaryPrivate {
ESource *collection_source;
@@ -243,7 +243,7 @@ mail_config_google_summary_constructed (GObject *object)
GtkWidget *widget;
const gchar *extension_name;
const gchar *text;
- gchar *markup;
+ gchar *markup, *imap_url, *cal_url;
extension = E_MAIL_CONFIG_GOOGLE_SUMMARY (object);
@@ -307,15 +307,30 @@ mail_config_google_summary_constructed (GObject *object)
gtk_widget_show (widget);
}
- text = _("You may need to enable IMAP access");
- widget = gtk_link_button_new_with_label (GOOGLE_HELP_URI, text);
+ /* Translators: This is part of a sentence "You may need to enable IMAP access and Calendars to
synchronize",
+ where the 'IMAP access' and 'Calendars to synchronize' are clickable. */
+ imap_url = g_markup_printf_escaped ("<a href=\"%s\">%s</a>", GOOGLE_IMAP_URI, C_("GoggleSummary",
"IMAP access"));
+ /* Translators: This is part of a sentence "You may need to enable IMAP access and Calendars to
synchronize",
+ where the 'IMAP access' and 'Calendars to synchronize' are clickable. */
+ cal_url = g_markup_printf_escaped ("<a href=\"%s\">%s</a>", GOOGLE_CALENDAR_URI, C_("GoggleSummary",
"Calendars to synchronize"));
+ /* Translators: This is part of a sentence "You may need to enable IMAP access and Calendars to
synchronize",
+ where the 'IMAP access' and 'Calendars to synchronize' are clickable. */
+ markup = g_strdup_printf (C_("GoggleSummary", "You may need to enable %s and %s"), imap_url, cal_url);
+
+ widget = gtk_label_new (markup);
+ gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
gtk_widget_set_margin_left (widget, 12);
+ gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
if (e_source_credentials_google_is_supported ())
gtk_grid_attach (GTK_GRID (container), widget, 0, 3, 1, 1);
else
gtk_grid_attach (GTK_GRID (container), widget, 0, 2, 1, 1);
gtk_widget_show (widget);
+ g_free (imap_url);
+ g_free (cal_url);
+ g_free (markup);
+
source = extension->priv->collection_source;
extension_name = E_SOURCE_EXTENSION_COLLECTION;
collection_extension = e_source_get_extension (source, extension_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]