[epiphany/wip/google-safe-browsing: 37/37] prefs-dialog: Add safe browsing checkbutton



commit d48a71282d23a82a07f1cc3607b7903a72f3d34f
Author: Gabriel Ivascu <gabrielivascu gnome org>
Date:   Sat Sep 23 11:49:12 2017 +0300

    prefs-dialog: Add safe browsing checkbutton

 src/prefs-dialog.c                |    7 +++++++
 src/resources/gtk/prefs-dialog.ui |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index f16e81d..583292f 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -82,6 +82,7 @@ struct _PrefsDialog {
   GtkWidget *popups_allow_checkbutton;
   GtkWidget *adblock_allow_checkbutton;
   GtkWidget *enable_plugins_checkbutton;
+  GtkWidget *enable_safe_browsing_checkbutton;
 
   /* fonts */
   GtkWidget *use_gnome_fonts_checkbutton;
@@ -733,6 +734,7 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
   gtk_widget_class_bind_template_child (widget_class, PrefsDialog, popups_allow_checkbutton);
   gtk_widget_class_bind_template_child (widget_class, PrefsDialog, adblock_allow_checkbutton);
   gtk_widget_class_bind_template_child (widget_class, PrefsDialog, enable_plugins_checkbutton);
+  gtk_widget_class_bind_template_child (widget_class, PrefsDialog, enable_safe_browsing_checkbutton);
   gtk_widget_class_bind_template_child (widget_class, PrefsDialog, download_button_hbox);
   gtk_widget_class_bind_template_child (widget_class, PrefsDialog, download_button_label);
 
@@ -1686,6 +1688,11 @@ setup_general_page (PrefsDialog *dialog)
                    dialog->enable_plugins_checkbutton,
                    "active",
                    G_SETTINGS_BIND_DEFAULT);
+  g_settings_bind (web_settings,
+                   EPHY_PREFS_WEB_ENABLE_SAFE_BROWSING,
+                   dialog->enable_safe_browsing_checkbutton,
+                   "active",
+                   G_SETTINGS_BIND_DEFAULT);
 
   g_settings_bind (web_settings,
                    EPHY_PREFS_WEB_ENABLE_ADBLOCK,
diff --git a/src/resources/gtk/prefs-dialog.ui b/src/resources/gtk/prefs-dialog.ui
index b991326..b2a2ca7 100644
--- a/src/resources/gtk/prefs-dialog.ui
+++ b/src/resources/gtk/prefs-dialog.ui
@@ -281,6 +281,13 @@
                             <property name="use-underline">True</property>
                           </object>
                         </child>
+                        <child>
+                          <object class="GtkCheckButton" id="enable_safe_browsing_checkbutton">
+                            <property name="label" translatable="yes">Enable _safe browsing</property>
+                            <property name="visible">True</property>
+                            <property name="use-underline">True</property>
+                          </object>
+                        </child>
                       </object>
                     </child>
                   </object>


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