[epiphany] Fix web applications preferences dialog
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix web applications preferences dialog
- Date: Tue, 23 Jul 2019 10:45:26 +0000 (UTC)
commit 6f81c34657580e5667988ad74e2c1c0aabb9ca55
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue Jul 23 12:40:31 2019 +0200
Fix web applications preferences dialog
- Hide browsing section
- Show web content section
- Hide do not track row instead of only the switch
- Move web application section to the top
- Make web application grid container a HdyPreferencesGroup to ensure
it's added to the GtkListBox instead of the parent GtkBox
- Move the option to handle additional URLs after the web application
general settings
src/prefs-dialog.c | 6 +-
src/resources/gtk/prefs-dialog.ui | 220 +++++++++++++++++++-------------------
2 files changed, 111 insertions(+), 115 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index ed565f992..28d861948 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -2379,11 +2379,7 @@ prefs_dialog_init (PrefsDialog *dialog)
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
gtk_widget_set_visible (dialog->browsing_box,
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
- gtk_widget_set_visible (dialog->do_not_track_switch,
- mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
- gtk_widget_set_visible (dialog->enable_smooth_scrolling_switch,
- mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
- gtk_widget_set_visible (dialog->enable_mouse_gesture_switch,
+ gtk_widget_set_visible (dialog->do_not_track_row,
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
gtk_widget_set_visible (dialog->reader_mode_box,
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
diff --git a/src/resources/gtk/prefs-dialog.ui b/src/resources/gtk/prefs-dialog.ui
index 1009a56a8..ac04087ec 100644
--- a/src/resources/gtk/prefs-dialog.ui
+++ b/src/resources/gtk/prefs-dialog.ui
@@ -36,7 +36,115 @@
<class name="background"/>
</style>
<child>
- <object class="HdyPreferencesGroup">
+ <object class="HdyPreferencesGroup" id="webapp_box">
+ <property name="title" translatable="yes">Web Application</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="HdyPreferencesRow">
+ <property name="activatable">False</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkGrid">
+ <property name="column-spacing">12</property>
+ <property name="margin-bottom">8</property>
+ <property name="margin-end">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">8</property>
+ <property name="row-spacing">6</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="webapp_icon_button">
+ <property name="visible">true</property>
+ <property name="halign">center</property>
+ <signal name="clicked" handler="on_webapp_icon_button_clicked"/>
+ <child>
+ <object class="GtkImage" id="webapp_icon">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="height">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Homepage:</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="webapp_url">
+ <property name="visible">True</property>
+ <property name="hexpand">True</property>
+ <signal name="changed" handler="on_webapp_entry_changed"/>
+ </object>
+ <packing>
+ <property name="left-attach">2</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Title:</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="webapp_title">
+ <property name="visible">True</property>
+ <property name="hexpand">True</property>
+ <signal name="changed" handler="on_webapp_entry_changed"/>
+ </object>
+ <packing>
+ <property name="left-attach">2</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="HdyActionRow">
+ <property name="activatable">False</property>
+ <property name="title" translatable="yes">_Manage Additional URLs</property>
+ <property name="use_underline">True</property>
+ <property name="visible">True</property>
+ <child type="action">
+ <object class="GtkButton" id="webapp_additional_urls_dialog_button">
+ <property name="valign">center</property>
+ <property name="visible">True</property>
+ <signal name="clicked"
handler="on_manage_webapp_additional_urls_button_clicked"/>
+ <style>
+ <class name="image-button"/>
+ </style>
+ <child>
+ <object class="GtkImage">
+ <property name="icon_name">emblem-system-symbolic</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="HdyPreferencesGroup" id="browsing_box">
<property name="title" translatable="yes">Browsing</property>
<property name="visible">True</property>
<child>
@@ -156,114 +264,6 @@
</child>
</object>
</child>
- <child>
- <object class="HdyPreferencesGroup" id="webapp_box">
- <property name="title" translatable="yes">Web Application</property>
- <property name="visible">True</property>
- <child>
- <object class="HdyActionRow">
- <property name="activatable">False</property>
- <property name="title" translatable="yes">_Manage Additional URLs</property>
- <property name="use_underline">True</property>
- <property name="visible">True</property>
- <child type="action">
- <object class="GtkButton" id="webapp_additional_urls_dialog_button">
- <property name="valign">center</property>
- <property name="visible">True</property>
- <signal name="clicked"
handler="on_manage_webapp_additional_urls_button_clicked"/>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage">
- <property name="icon_name">emblem-system-symbolic</property>
- <property name="visible">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkListBoxRow">
- <property name="activatable">False</property>
- <property name="visible">True</property>
- <child>
- <object class="GtkGrid">
- <property name="column-spacing">12</property>
- <property name="margin-bottom">8</property>
- <property name="margin-end">12</property>
- <property name="margin-start">12</property>
- <property name="margin-top">8</property>
- <property name="row-spacing">6</property>
- <property name="visible">True</property>
- <child>
- <object class="GtkButton" id="webapp_icon_button">
- <property name="visible">true</property>
- <property name="halign">center</property>
- <signal name="clicked" handler="on_webapp_icon_button_clicked"/>
- <child>
- <object class="GtkImage" id="webapp_icon">
- <property name="visible">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">0</property>
- <property name="height">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Homepage:</property>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="webapp_url">
- <property name="visible">True</property>
- <property name="hexpand">True</property>
- <signal name="changed" handler="on_webapp_entry_changed"/>
- </object>
- <packing>
- <property name="left-attach">2</property>
- <property name="top-attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Title:</property>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="webapp_title">
- <property name="visible">True</property>
- <property name="hexpand">True</property>
- <signal name="changed" handler="on_webapp_entry_changed"/>
- </object>
- <packing>
- <property name="left-attach">2</property>
- <property name="top-attach">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
<child>
<object class="HdyPreferencesGroup" id="search_box">
<property name="title" translatable="yes">Search Engines</property>
@@ -331,7 +331,7 @@
</object>
</child>
<child>
- <object class="HdyPreferencesGroup" id="browsing_box">
+ <object class="HdyPreferencesGroup">
<property name="title" translatable="yes">Web Content</property>
<property name="visible">True</property>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]