[gnome-initial-setup/gnome-3-22] privacy: Show Mozilla and distro privacy policies separately
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/gnome-3-22] privacy: Show Mozilla and distro privacy policies separately
- Date: Mon, 10 Oct 2016 16:25:37 +0000 (UTC)
commit a5559e61124f317f57be90f29347d7724b5ee0e1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Sep 23 21:47:59 2016 -0500
privacy: Show Mozilla and distro privacy policies separately
Currently we have a link that purports to display the Mozilla privacy
policy, but it actually shows a distro privacy policy if a distro has
one configured, which is wrong. Fix this by showing both privacy
policies separately.
https://bugzilla.gnome.org/show_bug.cgi?id=761861
.../pages/privacy/gis-privacy-page.c | 29 ++++++++++++++-----
.../pages/privacy/gis-privacy-page.ui | 12 +++++++-
2 files changed, 32 insertions(+), 9 deletions(-)
---
diff --git a/gnome-initial-setup/pages/privacy/gis-privacy-page.c
b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
index 0008993..83cd36e 100644
--- a/gnome-initial-setup/pages/privacy/gis-privacy-page.c
+++ b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
@@ -38,7 +38,8 @@ struct _GisPrivacyPagePrivate
GtkWidget *reporting_row;
GtkWidget *reporting_switch;
GtkWidget *reporting_label;
- GtkWidget *privacy_policy_label;
+ GtkWidget *mozilla_privacy_policy_label;
+ GtkWidget *distro_privacy_policy_label;
GSettings *location_settings;
GSettings *privacy_settings;
guint abrt_watch_id;
@@ -110,12 +111,16 @@ update_os_data (GisPrivacyPage *page)
gtk_label_set_label (GTK_LABEL (priv->reporting_label), text);
g_free (text);
- if (!privacy_policy)
- privacy_policy = g_strdup ("https://location.services.mozilla.com/privacy");
-
- text = g_strdup_printf ("%s <a href='%s'>%s</a>", _("Uses Mozilla Location Service:"), privacy_policy,
_("Privacy Policy"));
- gtk_label_set_markup (GTK_LABEL (priv->privacy_policy_label), text);
- g_free (text);
+ if (privacy_policy)
+ {
+ text = g_strdup_printf ("<a href='%s'>%s</a>", privacy_policy, _("Privacy Policy"));
+ gtk_label_set_markup (GTK_LABEL (priv->distro_privacy_policy_label), text);
+ g_free (text);
+ }
+ else
+ {
+ gtk_widget_hide (priv->distro_privacy_policy_label);
+ }
g_free (name);
g_free (privacy_policy);
@@ -132,6 +137,7 @@ abrt_appeared_cb (GDBusConnection *connection,
gtk_widget_show (priv->reporting_row);
gtk_widget_show (priv->reporting_label);
+ gtk_widget_show (priv->distro_privacy_policy_label);
}
static void
@@ -144,6 +150,7 @@ abrt_vanished_cb (GDBusConnection *connection,
gtk_widget_hide (priv->reporting_row);
gtk_widget_hide (priv->reporting_label);
+ gtk_widget_hide (priv->distro_privacy_policy_label);
}
static void
@@ -151,6 +158,7 @@ gis_privacy_page_constructed (GObject *object)
{
GisPrivacyPage *page = GIS_PRIVACY_PAGE (object);
GisPrivacyPagePrivate *priv = gis_privacy_page_get_instance_private (page);
+ char *text;
G_OBJECT_CLASS (gis_privacy_page_parent_class)->constructed (object);
@@ -164,6 +172,10 @@ gis_privacy_page_constructed (GObject *object)
update_os_data (page);
+ text = g_strdup_printf ("<a href='%s'>%s</a>", "https://location.services.mozilla.com/privacy", _("Privacy
Policy"));
+ gtk_label_set_markup (GTK_LABEL (priv->mozilla_privacy_policy_label), text);
+ g_free (text);
+
priv->abrt_watch_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM,
"org.freedesktop.problems.daemon",
G_BUS_NAME_WATCHER_FLAGS_NONE,
@@ -285,7 +297,8 @@ gis_privacy_page_class_init (GisPrivacyPageClass *klass)
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, reporting_row);
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, reporting_switch);
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, reporting_label);
- gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage,
privacy_policy_label);
+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage,
mozilla_privacy_policy_label);
+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage,
distro_privacy_policy_label);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), activate_link);
page_class->page_id = PAGE_ID;
diff --git a/gnome-initial-setup/pages/privacy/gis-privacy-page.ui
b/gnome-initial-setup/pages/privacy/gis-privacy-page.ui
index 90f6b08..7bc11e8 100644
--- a/gnome-initial-setup/pages/privacy/gis-privacy-page.ui
+++ b/gnome-initial-setup/pages/privacy/gis-privacy-page.ui
@@ -71,7 +71,7 @@
</object>
</child>
<child>
- <object class="GtkLabel" id="privacy_policy_label">
+ <object class="GtkLabel" id="mozilla_privacy_policy_label">
<property name="visible">True</property>
<property name="margin-top">10</property>
<property name="xalign">0</property>
@@ -112,6 +112,16 @@
</object>
</child>
<child>
+ <object class="GtkLabel" id="distro_privacy_policy_label">
+ <property name="visible">True</property>
+ <property name="margin-top">10</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="use-markup">True</property>
+ <signal name="activate-link" handler="activate_link"/>
+ </object>
+ </child>
+ <child>
<object class="GtkLabel" id="footer_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]