[epiphany] prefs-dialog: Port the General prefs page to list boxes
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] prefs-dialog: Port the General prefs page to list boxes
- Date: Tue, 25 Jun 2019 20:06:56 +0000 (UTC)
commit 779ceb1303175011e588719e7a2fb0e19899329e
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Dec 15 21:21:04 2018 +0100
prefs-dialog: Port the General prefs page to list boxes
This also sorts the sections alphabetically.
src/prefs-dialog.c | 86 ++++---
src/resources/gtk/prefs-dialog.ui | 520 +++++++++++++++++---------------------
2 files changed, 279 insertions(+), 327 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index f7d3ea37e..3995e0265 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -54,6 +54,8 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#define HANDY_USE_UNSTABLE_API
+#include <handy.h>
#include <JavaScriptCore/JavaScript.h>
#include <json-glib/json-glib.h>
#include <math.h>
@@ -84,20 +86,20 @@ struct _PrefsDialog {
GtkWidget *webapp_icon;
GtkWidget *webapp_url;
GtkWidget *webapp_title;
- GtkWidget *download_button_hbox;
- GtkWidget *download_button_label;
+ GtkWidget *download_folder_row;
GtkWidget *download_box;
GtkWidget *search_box;
GtkWidget *session_box;
GtkWidget *browsing_box;
- GtkWidget *restore_session_checkbutton;
- GtkWidget *popups_allow_checkbutton;
- GtkWidget *adblock_allow_checkbutton;
+ GtkWidget *restore_session_row;
+ GtkWidget *restore_session_switch;
+ GtkWidget *popups_allow_switch;
+ GtkWidget *adblock_allow_switch;
GtkWidget *enable_plugins_checkbutton;
- GtkWidget *enable_safe_browsing_checkbutton;
- GtkWidget *enable_smooth_scrolling_checkbutton;
- GtkWidget *ask_on_download_checkbutton;
- GtkWidget *start_in_incognito_mode_checkbutton;
+ GtkWidget *enable_safe_browsing_switch;
+ GtkWidget *enable_smooth_scrolling_switch;
+ GtkWidget *ask_on_download_switch;
+ GtkWidget *start_in_incognito_mode_switch;
/* fonts & style */
GtkWidget *use_gnome_fonts_checkbutton;
@@ -117,7 +119,8 @@ struct _PrefsDialog {
GtkWidget *no_third_party;
GtkWidget *never;
GtkWidget *remember_passwords_checkbutton;
- GtkWidget *do_not_track_checkbutton;
+ GtkWidget *do_not_track_row;
+ GtkWidget *do_not_track_switch;
GtkWidget *clear_personal_data_button;
/* language */
@@ -986,16 +989,18 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, search_box);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, session_box);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, browsing_box);
- gtk_widget_class_bind_template_child (widget_class, PrefsDialog, restore_session_checkbutton);
- 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_safe_browsing_checkbutton);
- gtk_widget_class_bind_template_child (widget_class, PrefsDialog, enable_smooth_scrolling_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);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, restore_session_row);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, restore_session_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, popups_allow_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, adblock_allow_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, enable_safe_browsing_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, enable_smooth_scrolling_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, ask_on_download_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, start_in_incognito_mode_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, download_folder_row);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, download_box);
- gtk_widget_class_bind_template_child (widget_class, PrefsDialog, ask_on_download_checkbutton);
- gtk_widget_class_bind_template_child (widget_class, PrefsDialog, start_in_incognito_mode_checkbutton);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, ask_on_download_switch);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, start_in_incognito_mode_switch);
/* fonts & style */
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, use_gnome_fonts_checkbutton);
@@ -1015,7 +1020,8 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, no_third_party);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, never);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, remember_passwords_checkbutton);
- gtk_widget_class_bind_template_child (widget_class, PrefsDialog, do_not_track_checkbutton);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, do_not_track_row);
+ gtk_widget_class_bind_template_child (widget_class, PrefsDialog, do_not_track_switch);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, clear_personal_data_button);
/* language */
@@ -1664,8 +1670,8 @@ create_download_path_button (PrefsDialog *dialog)
DOWNLOAD_BUTTON_WIDTH);
g_signal_connect (button, "selection-changed",
G_CALLBACK (download_path_changed_cb), dialog);
- gtk_label_set_mnemonic_widget (GTK_LABEL (dialog->download_button_label), button);
- gtk_box_pack_start (GTK_BOX (dialog->download_button_hbox), button, TRUE, TRUE, 0);
+ hdy_action_row_add_action (HDY_ACTION_ROW (dialog->download_folder_row), button);
+ gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
gtk_widget_show (button);
g_settings_bind_writable (EPHY_SETTINGS_STATE,
@@ -1688,14 +1694,14 @@ prefs_dialog_response_cb (GtkWidget *widget,
}
static void
-do_not_track_button_clicked_cb (GtkWidget *button,
- PrefsDialog *dialog)
+do_not_track_switch_activated_cb (GtkWidget *sw,
+ PrefsDialog *dialog)
{
char **filters;
char **new_filters;
filters = g_settings_get_strv (EPHY_SETTINGS_MAIN, EPHY_PREFS_ADBLOCK_FILTERS);
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
+ if (gtk_switch_get_active (GTK_SWITCH (sw)))
new_filters = ephy_strv_append ((const char * const *)filters, ADBLOCK_PRIVACY_FILTER_URL);
else
new_filters = ephy_strv_remove ((const char * const *)filters, ADBLOCK_PRIVACY_FILTER_URL);
@@ -1987,7 +1993,7 @@ setup_general_page (PrefsDialog *dialog)
g_settings_bind_with_mapping (settings,
EPHY_PREFS_RESTORE_SESSION_POLICY,
- dialog->restore_session_checkbutton,
+ dialog->restore_session_switch,
"active",
G_SETTINGS_BIND_DEFAULT,
restore_session_get_mapping,
@@ -1995,56 +2001,56 @@ setup_general_page (PrefsDialog *dialog)
NULL, NULL);
g_settings_bind (web_settings,
EPHY_PREFS_WEB_ENABLE_POPUPS,
- dialog->popups_allow_checkbutton,
+ dialog->popups_allow_switch,
"active",
G_SETTINGS_BIND_INVERT_BOOLEAN);
g_settings_bind (web_settings,
EPHY_PREFS_WEB_ENABLE_SAFE_BROWSING,
- dialog->enable_safe_browsing_checkbutton,
+ dialog->enable_safe_browsing_switch,
"active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (web_settings,
EPHY_PREFS_WEB_ENABLE_ADBLOCK,
- dialog->adblock_allow_checkbutton,
+ dialog->adblock_allow_switch,
"active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (web_settings,
EPHY_PREFS_WEB_ENABLE_ADBLOCK,
- dialog->do_not_track_checkbutton,
+ dialog->do_not_track_row,
"sensitive",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (web_settings,
EPHY_PREFS_WEB_DO_NOT_TRACK,
- dialog->do_not_track_checkbutton,
+ dialog->do_not_track_switch,
"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),
+ g_signal_connect (dialog->do_not_track_switch,
+ "notify::active",
+ G_CALLBACK (do_not_track_switch_activated_cb),
dialog);
g_settings_bind (web_settings,
EPHY_PREFS_WEB_ENABLE_SMOOTH_SCROLLING,
- dialog->enable_smooth_scrolling_checkbutton,
+ dialog->enable_smooth_scrolling_switch,
"active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (web_settings,
EPHY_PREFS_WEB_ASK_ON_DOWNLOAD,
- dialog->ask_on_download_checkbutton,
+ dialog->ask_on_download_switch,
"active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (settings,
EPHY_PREFS_START_IN_INCOGNITO_MODE,
- dialog->start_in_incognito_mode_checkbutton,
+ dialog->start_in_incognito_mode_switch,
"active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (settings,
EPHY_PREFS_START_IN_INCOGNITO_MODE,
- dialog->restore_session_checkbutton,
+ dialog->restore_session_row,
"sensitive",
G_SETTINGS_BIND_INVERT_BOOLEAN);
@@ -2416,9 +2422,9 @@ 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_checkbutton,
+ gtk_widget_set_visible (dialog->do_not_track_switch,
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
- gtk_widget_set_visible (dialog->enable_smooth_scrolling_checkbutton,
+ gtk_widget_set_visible (dialog->enable_smooth_scrolling_switch,
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 a6c6b1e60..7b7af1dd4 100644
--- a/src/resources/gtk/prefs-dialog.ui
+++ b/src/resources/gtk/prefs-dialog.ui
@@ -25,37 +25,24 @@
<property name="visible">True</property>
<property name="show_border">False</property>
<child>
- <object class="GtkBox">
+ <object class="HdyPreferencesPage">
+ <property name="icon_name">applications-system-symbolic</property>
+ <property name="title" translatable="yes">General</property>
<property name="visible">True</property>
- <property name="border-width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">18</property>
<child>
- <object class="GtkBox" id="browsing_box">
- <property name="visible">False</property>
- <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">Browsing</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
+ <object class="HdyPreferencesGroup">
+ <property name="title" translatable="yes">Browsing</property>
+ <property name="visible">True</property>
<child>
- <object class="GtkBox">
+ <object class="HdyActionRow">
+ <property name="activatable_widget">enable_smooth_scrolling_switch</property>
+ <property name="title" translatable="yes">Enable sm_ooth scrolling</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="margin-start">12</property>
- <child>
- <object class="GtkCheckButton" id="enable_smooth_scrolling_checkbutton">
- <property name="label" translatable="yes">Enable sm_ooth scrolling</property>
+ <child type="action">
+ <object class="GtkSwitch" id="enable_smooth_scrolling_switch">
+ <property name="valign">center</property>
<property name="visible">True</property>
- <property name="use-underline">True</property>
</object>
</child>
</object>
@@ -63,223 +50,193 @@
</object>
</child>
<child>
- <object class="GtkBox" id="homepage_box">
- <property name="visible">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">18</property>
+ <object class="HdyPreferencesGroup" id="download_box">
+ <property name="title" translatable="yes">Downloads</property>
+ <property name="visible">True</property>
<child>
- <object class="GtkBox">
+ <object class="HdyActionRow">
+ <property name="activatable_widget">ask_on_download_switch</property>
+ <property name="title" translatable="yes">Always ask o_n download</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <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">Homepage</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <child type="action">
+ <object class="GtkSwitch" id="ask_on_download_switch">
<property name="margin-start">12</property>
- <child>
- <object class="GtkRadioButton" id="new_tab_homepage_radiobutton">
- <property name="label" translatable="yes">Most _visited pages</property>
- <property name="visible">True</property>
- <property name="use-underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkRadioButton" id="blank_homepage_radiobutton">
- <property name="label" translatable="yes">_Blank page</property>
- <property name="visible">True</property>
- <property name="use-underline">True</property>
- <property name="group">new_tab_homepage_radiobutton</property>
- </object>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkRadioButton" id="custom_homepage_radiobutton">
- <property name="label" translatable="yes">_Custom:</property>
- <property name="visible">True</property>
- <property name="use-underline">True</property>
- <property name="group">new_tab_homepage_radiobutton</property>
- </object>
- </child>
- <child>
- <object class="GtkEntry" id="custom_homepage_entry">
- <property name="visible">True</property>
- <property name="hexpand">True</property>
- <property name="secondary-icon-name">edit-clear-symbolic</property>
- </object>
- </child>
- </object>
- </child>
+ <property name="valign">center</property>
+ <property name="visible">True</property>
</object>
</child>
</object>
</child>
+ <child>
+ <object class="HdyActionRow" id="download_folder_row">
+ <property name="sensitive" bind-source="ask_on_download_switch"
bind-property="active" bind-flags="sync-create|invert-boolean"/>
+ <property name="title" translatable="yes">_Download folder</property>
+ <property name="use_underline">True</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="GtkBox" id="webapp_box">
- <property name="visible">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">18</property>
+ <object class="HdyPreferencesGroup" id="homepage_box">
+ <property name="title" translatable="yes">Homepage</property>
+ <property name="visible">True</property>
<child>
- <object class="GtkBox">
+ <object class="HdyActionRow">
+ <property name="activatable_widget">new_tab_homepage_radiobutton</property>
+ <property name="title" translatable="yes">Most _visited pages</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <child>
- <object class="GtkLabel">
+ <child type="prefix">
+ <object class="GtkRadioButton" id="new_tab_homepage_radiobutton">
+ <property name="valign">center</property>
<property name="visible">True</property>
- <property name="halign">start</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Web Application</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
</object>
</child>
- <child>
- <object class="GtkButton" id="webapp_additional_urls_dialog_button">
- <property name="label" translatable="yes">_Manage Additional URLs</property>
+ </object>
+ </child>
+ <child>
+ <object class="HdyActionRow">
+ <property name="activatable_widget">blank_homepage_radiobutton</property>
+ <property name="title" translatable="yes">_Blank page</property>
+ <property name="use_underline">True</property>
+ <property name="visible">True</property>
+ <child type="prefix">
+ <object class="GtkRadioButton" id="blank_homepage_radiobutton">
+ <property name="valign">center</property>
+ <property name="group">new_tab_homepage_radiobutton</property>
<property name="visible">True</property>
- <property name="use-underline">True</property>
- <signal name="clicked"
handler="on_manage_webapp_additional_urls_button_clicked"/>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkGrid">
+ <object class="HdyActionRow">
+ <property name="activatable_widget">custom_homepage_radiobutton</property>
+ <property name="title" translatable="yes">_Custom</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <property name="column-spacing">12</property>
- <property name="row-spacing">6</property>
- <property name="margin-start">12</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">
+ <child type="prefix">
+ <object class="GtkRadioButton" id="custom_homepage_radiobutton">
+ <property name="valign">center</property>
+ <property name="group">new_tab_homepage_radiobutton</property>
<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>
+ <child type="action">
+ <object class="GtkEntry" id="custom_homepage_entry">
<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="secondary-icon-name">edit-clear-symbolic</property>
+ <property name="valign">center</property>
<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="GtkBox" id="download_box">
+ <object class="HdyPreferencesGroup" id="webapp_box">
+ <property name="title" translatable="yes">Web Application</property>
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkBox">
+ <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>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel">
+ <child type="action">
+ <object class="GtkButton" id="webapp_additional_urls_dialog_button">
+ <property name="valign">center</property>
<property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Downloads</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <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="GtkCheckButton" id="ask_on_download_checkbutton">
- <property name="label" translatable="yes">Always ask where to dow_nload
files</property>
- <property name="visible">True</property>
- <property name="use-underline">True</property>
+ <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>
- </object>
- </child>
- <child>
- <object class="GtkBox">
+ <property name="margin-top">8</property>
+ <property name="row-spacing">6</property>
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="margin-start">24</property>
- <property name="sensitive" bind-source="ask_on_download_checkbutton"
bind-property="active" bind-flags="sync-create|invert-boolean"/>
<child>
- <object class="GtkBox" id="download_button_hbox">
- <property name="visible">True</property>
- <property name="spacing">12</property>
+ <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="GtkLabel" id="download_button_label">
+ <object class="GtkImage" id="webapp_icon">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Download folder:</property>
- <property name="use-underline">True</property>
</object>
</child>
- <child>
- <placeholder/>
- </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>
@@ -288,85 +245,65 @@
</object>
</child>
<child>
- <object class="GtkBox" id="search_box">
- <property name="visible">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <object class="HdyPreferencesGroup" id="search_box">
+ <property name="title" translatable="yes">Search Engines</property>
+ <property name="visible">True</property>
<child>
- <object class="GtkBox">
+ <object class="HdyActionRow">
+ <property name="activatable">False</property>
+ <property name="subtitle" translatable="yes">You can select different search engines
to use</property>
+ <property name="title" translatable="yes">_Manage Search Engines</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Search Engines</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- <child>
+ <child type="action">
<object class="GtkButton" id="search_engine_dialog_button">
- <property name="label" translatable="yes">_Manage Search Engines</property>
+ <property name="valign">center</property>
<property name="visible">True</property>
- <property name="use-underline">True</property>
<signal name="clicked" handler="on_search_engine_dialog_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="GtkLabel">
- <property name="visible">True</property>
- <property name="margin_left">12</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">You can select different search engines to
use.</property>
- <attributes>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
<child>
- <object class="GtkBox" id="session_box">
- <property name="visible">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <object class="HdyPreferencesGroup" id="session_box">
+ <property name="title" translatable="yes">Session</property>
+ <property name="visible">True</property>
<child>
- <object class="GtkLabel">
+ <object class="HdyActionRow">
+ <property name="activatable_widget">start_in_incognito_mode_switch</property>
+ <property name="title" translatable="yes">Always start browser in _incognito
mode</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Session</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <child type="action">
+ <object class="GtkSwitch" id="start_in_incognito_mode_switch">
+ <property name="valign">center</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="GtkBox">
+ <object class="HdyActionRow" id="restore_session_row">
+ <property name="activatable_widget">restore_session_switch</property>
+ <property name="margin-start">24</property>
+ <property name="title" translatable="yes">_Remember previous tabs on
startup</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="margin-start">12</property>
- <child>
- <object class="GtkCheckButton" id="start_in_incognito_mode_checkbutton">
- <property name="label" translatable="yes">Always start browser in _incognito
mode</property>
- <property name="visible">True</property>
- <property name="use-underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckButton" id="restore_session_checkbutton">
- <property name="label" translatable="yes">_Remember previous tabs on
startup</property>
+ <child type="action">
+ <object class="GtkSwitch" id="restore_session_switch">
+ <property name="valign">center</property>
<property name="visible">True</property>
- <property name="use-underline">True</property>
- <property name="margin-start">12</property>
</object>
</child>
</object>
@@ -374,53 +311,62 @@
</object>
</child>
<child>
- <object class="GtkBox">
+ <object class="HdyPreferencesGroup" id="browsing_box">
+ <property name="title" translatable="yes">Web Content</property>
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkLabel">
+ <object class="HdyActionRow" id="adblock_allow_row">
+ <property name="activatable_widget">adblock_allow_switch</property>
+ <property name="title" translatable="yes">Try to block _advertisements</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Web Content</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <child type="action">
+ <object class="GtkSwitch" id="adblock_allow_switch">
+ <property name="valign">center</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="GtkBox">
+ <object class="HdyActionRow" id="do_not_track_row">
+ <property name="activatable_widget">do_not_track_switch</property>
+ <property name="margin-start">24</property>
+ <property name="title" translatable="yes">Try to block web _trackers</property>
+ <property name="use_underline">True</property>
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="margin-start">12</property>
- <child>
- <object class="GtkCheckButton" id="adblock_allow_checkbutton">
- <property name="label" translatable="yes">Try to block _advertisements</property>
+ <child type="action">
+ <object class="GtkSwitch" id="do_not_track_switch">
+ <property name="valign">center</property>
<property name="visible">True</property>
- <property name="use-underline">True</property>
</object>
</child>
- <child>
- <object class="GtkCheckButton" id="do_not_track_checkbutton">
- <property name="label" translatable="yes">Try to block web _trackers</property>
- <property name="visible">False</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>
+ </object>
+ </child>
+ <child>
+ <object class="HdyActionRow">
+ <property name="activatable_widget">popups_allow_switch</property>
+ <property name="title" translatable="yes">Block popup _windows</property>
+ <property name="use_underline">True</property>
+ <property name="visible">True</property>
+ <child type="action">
+ <object class="GtkSwitch" id="popups_allow_switch">
+ <property name="valign">center</property>
<property name="visible">True</property>
- <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>
+ </object>
+ </child>
+ <child>
+ <object class="HdyActionRow">
+ <property name="activatable_widget">enable_safe_browsing_switch</property>
+ <property name="title" translatable="yes">Try to block dangerous web_sites</property>
+ <property name="use_underline">True</property>
+ <property name="visible">True</property>
+ <child type="action">
+ <object class="GtkSwitch" id="enable_safe_browsing_switch">
+ <property name="valign">center</property>
<property name="visible">True</property>
- <property name="use-underline">True</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]