[epiphany/wip/google-safe-browsing: 30/37] prefs-dialog: Add safe browsing checkbutton
- From: Gabriel Ivașcu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/google-safe-browsing: 30/37] prefs-dialog: Add safe browsing checkbutton
- Date: Mon, 2 Oct 2017 18:54:32 +0000 (UTC)
commit cbfc2f0662bc8682a0a3c0ee22493b867d75d699
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..e258499 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">Try to block dangerous
web_sites</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]