[epiphany] prefs-dialog: Move do not track setting to general tab



commit 2bcb8588532f2a9869ebd265270e3735469917da
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Jan 22 22:46:53 2017 -0600

    prefs-dialog: Move do not track setting to general tab
    
    Its is now dependent on the enable-adblock setting, because the minor
    anti-tracking features are not very useful without the adblocker.

 src/prefs-dialog.c                |   34 ++++++++++++++++++-----------
 src/resources/gtk/prefs-dialog.ui |   42 ++++++++++--------------------------
 2 files changed, 33 insertions(+), 43 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index cf26237..d1c16a4 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1641,18 +1641,35 @@ setup_general_page (PrefsDialog *dialog)
                    EPHY_PREFS_WEB_ENABLE_POPUPS,
                    dialog->popups_allow_checkbutton,
                    "active",
+                   G_SETTINGS_BIND_INVERT_BOOLEAN);
+  g_settings_bind (web_settings,
+                   EPHY_PREFS_WEB_ENABLE_PLUGINS,
+                   dialog->enable_plugins_checkbutton,
+                   "active",
                    G_SETTINGS_BIND_DEFAULT);
+
   g_settings_bind (web_settings,
                    EPHY_PREFS_WEB_ENABLE_ADBLOCK,
                    dialog->adblock_allow_checkbutton,
                    "active",
-                   G_SETTINGS_BIND_INVERT_BOOLEAN);
+                   G_SETTINGS_BIND_DEFAULT);
   g_settings_bind (web_settings,
-                   EPHY_PREFS_WEB_ENABLE_PLUGINS,
-                   dialog->enable_plugins_checkbutton,
-                   "active",
+                   EPHY_PREFS_WEB_ENABLE_ADBLOCK,
+                   dialog->do_not_track_checkbutton,
+                   "sensitive",
                    G_SETTINGS_BIND_DEFAULT);
 
+  g_settings_bind (web_settings,
+                   EPHY_PREFS_WEB_DO_NOT_TRACK,
+                   dialog->do_not_track_checkbutton,
+                   "active",
+                   /* Teensy hack: don't override the previous binding. */
+                   G_SETTINGS_BIND_NO_SENSITIVITY);
+  g_signal_connect (dialog->do_not_track_checkbutton,
+                    "clicked",
+                    G_CALLBACK (do_not_track_button_clicked_cb),
+                    dialog);
+
   create_download_path_button (dialog);
   create_search_engine_combo (GTK_COMBO_BOX (dialog->search_engine_combo));
 }
@@ -1747,15 +1764,6 @@ setup_stored_data_page (PrefsDialog *dialog)
                    dialog->remember_passwords_checkbutton,
                    "active",
                    G_SETTINGS_BIND_DEFAULT);
-  g_settings_bind (web_settings,
-                   EPHY_PREFS_WEB_DO_NOT_TRACK,
-                   dialog->do_not_track_checkbutton,
-                   "active",
-                   G_SETTINGS_BIND_DEFAULT);
-  g_signal_connect (dialog->do_not_track_checkbutton,
-                    "clicked",
-                    G_CALLBACK (do_not_track_button_clicked_cb),
-                    dialog);
 
   g_signal_connect (dialog->clear_personal_data_button,
                     "clicked",
diff --git a/src/resources/gtk/prefs-dialog.ui b/src/resources/gtk/prefs-dialog.ui
index 7245892..f6ada45 100644
--- a/src/resources/gtk/prefs-dialog.ui
+++ b/src/resources/gtk/prefs-dialog.ui
@@ -266,15 +266,23 @@
                         <property name="spacing">6</property>
                         <property name="margin-start">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="popups_allow_checkbutton">
-                            <property name="label" translatable="yes">Allow popup _windows</property>
+                          <object class="GtkCheckButton" id="adblock_allow_checkbutton">
+                            <property name="label" translatable="yes">Try to block _advertisements</property>
                             <property name="visible">True</property>
                             <property name="use-underline">True</property>
                           </object>
                         </child>
                         <child>
-                          <object class="GtkCheckButton" id="adblock_allow_checkbutton">
-                            <property name="label" translatable="yes">Allow _advertisements</property>
+                          <object class="GtkCheckButton" id="do_not_track_checkbutton">
+                            <property name="label" translatable="yes">Try to block web _trackers</property>
+                            <property name="visible">True</property>
+                            <property name="use-underline">True</property>
+                            <property name="margin-start">12</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="popups_allow_checkbutton">
+                            <property name="label" translatable="yes">Block popup _windows</property>
                             <property name="visible">True</property>
                             <property name="use-underline">True</property>
                           </object>
@@ -550,32 +558,6 @@
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="halign">start</property>
-                        <property name="label" translatable="yes">Tracking</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="do_not_track_checkbutton">
-                        <property name="label" translatable="yes">Block selected web _trackers</property>
-                        <property name="visible">True</property>
-                        <property name="use-underline">True</property>
-                        <property name="halign">start</property>
-                        <property name="margin-start">12</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkBox">
-                    <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
-                    <child>
                       <object class="GtkBox">
                         <property name="visible">True</property>
                         <child>


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