[epiphany/carlosgc/no-search-suggestions-web-app-mode: 2/2] web-app: do not show the search suggestions settings in web app mode
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/carlosgc/no-search-suggestions-web-app-mode: 2/2] web-app: do not show the search suggestions settings in web app mode
- Date: Thu, 28 Jul 2022 12:26:13 +0000 (UTC)
commit 57e55123dd71ae9b1b94f4092648deb537d6edb6
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Thu Jul 28 14:25:22 2022 +0200
web-app: do not show the search suggestions settings in web app mode
src/preferences/prefs-privacy-page.c | 7 +++++++
src/resources/gtk/prefs-privacy-page.ui | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/preferences/prefs-privacy-page.c b/src/preferences/prefs-privacy-page.c
index d8caea0e9..94f95efb0 100644
--- a/src/preferences/prefs-privacy-page.c
+++ b/src/preferences/prefs-privacy-page.c
@@ -45,6 +45,7 @@ struct _PrefsPrivacyPage {
GtkWidget *enable_website_data_storage_switch;
/* Search Suggestions */
+ GtkWidget *search_suggestions_box;
GtkWidget *enable_google_search_suggestions_switch;
/* Passwords */
@@ -152,6 +153,7 @@ prefs_privacy_page_class_init (PrefsPrivacyPageClass *klass)
gtk_widget_class_bind_template_child (widget_class, PrefsPrivacyPage, enable_website_data_storage_switch);
/* Search Suggestions */
+ gtk_widget_class_bind_template_child (widget_class, PrefsPrivacyPage, search_suggestions_box);
gtk_widget_class_bind_template_child (widget_class, PrefsPrivacyPage,
enable_google_search_suggestions_switch);
/* Passwords */
@@ -165,7 +167,12 @@ prefs_privacy_page_class_init (PrefsPrivacyPageClass *klass)
static void
prefs_privacy_page_init (PrefsPrivacyPage *privacy_page)
{
+ EphyEmbedShellMode mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
+
gtk_widget_init_template (GTK_WIDGET (privacy_page));
setup_privacy_page (privacy_page);
+
+ gtk_widget_set_visible (privacy_page->search_suggestions_box,
+ mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
}
diff --git a/src/resources/gtk/prefs-privacy-page.ui b/src/resources/gtk/prefs-privacy-page.ui
index 45122815d..0634c0080 100644
--- a/src/resources/gtk/prefs-privacy-page.ui
+++ b/src/resources/gtk/prefs-privacy-page.ui
@@ -61,7 +61,7 @@
</object>
</child>
<child>
- <object class="HdyPreferencesGroup">
+ <object class="HdyPreferencesGroup" id="search_suggestions_box">
<property name="title" translatable="yes">Search Suggestions</property>
<property name="visible">True</property>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]