[epiphany] adblock: Do not modify filter URIs when toggling DNT switch



commit 5502dac10e4a7a1bd9033931c3acbbed7b1432cc
Author: Adrian Perez de Castro <aperez igalia com>
Date:   Tue Jul 9 15:24:54 2019 +0300

    adblock: Do not modify filter URIs when toggling DNT switch
    
    There is no publicly available version of EasyPrivacy in JSON WebKit
    format, therefore prevent the "Try to block web trackers" option from
    modifying the setting with the list of URIs for filter rule sets. The
    setting is still available as it is still used by the Web process
    extension to determine whether to remove tracking parameters in URLs.

 src/prefs-dialog.c | 22 ----------------------
 1 file changed, 22 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index ee9d3259f..b35f6d9a4 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1671,24 +1671,6 @@ prefs_dialog_response_cb (GtkWidget   *widget,
   gtk_widget_destroy (widget);
 }
 
-static void
-do_not_track_switch_activated_cb (GtkWidget   *sw,
-                                  PrefsDialog *dialog)
-{
-  char **filters;
-  char **new_filters;
-
-  filters = g_settings_get_strv (EPHY_SETTINGS_MAIN, EPHY_PREFS_ADBLOCK_FILTERS);
-  if (gtk_switch_get_active (GTK_SWITCH (sw)))
-    new_filters = ephy_strv_append ((const char * const *)filters, ADBLOCK_PRIVACY_FILTER_URL);
-  else
-    new_filters = ephy_strv_remove ((const char * const *)filters, ADBLOCK_PRIVACY_FILTER_URL);
-  g_settings_set_strv (EPHY_SETTINGS_MAIN, EPHY_PREFS_ADBLOCK_FILTERS, (const char * const *)new_filters);
-
-  g_strfreev (filters);
-  g_strfreev (new_filters);
-}
-
 static void
 clear_personal_data_button_clicked_cb (GtkWidget   *button,
                                        PrefsDialog *dialog)
@@ -2015,10 +1997,6 @@ setup_general_page (PrefsDialog *dialog)
                    "active",
                    /* Teensy hack: don't override the previous binding. */
                    G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_signal_connect (dialog->do_not_track_switch,
-                    "notify::active",
-                    G_CALLBACK (do_not_track_switch_activated_cb),
-                    dialog);
   g_settings_bind (web_settings,
                    EPHY_PREFS_WEB_ENABLE_SMOOTH_SCROLLING,
                    dialog->enable_smooth_scrolling_switch,


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