Commit 32f3c7e9 authored by Adrien Plazas's avatar Adrien Plazas

HdyPreferencesWindow test

parent 5fcdb664
Pipeline #81841 passed with stages
in 5 minutes and 2 seconds
......@@ -61,7 +61,8 @@
"sources" : [
{
"type" : "git",
"url" : "https://source.puri.sm/Librem5/libhandy.git"
"branch" : "preferences",
"url" : "https://source.puri.sm/adrien.plazas/libhandy.git"
}
]
},
......
......@@ -974,7 +974,6 @@ ephy_shell_get_prefs_dialog (EphyShell *shell)
{
if (shell->prefs_dialog == NULL) {
shell->prefs_dialog = g_object_new (EPHY_TYPE_PREFS_DIALOG,
"use-header-bar", TRUE,
NULL);
g_signal_connect (shell->prefs_dialog,
"destroy",
......
......@@ -70,13 +70,12 @@ enum {
};
struct _PrefsDialog {
HdyDialog parent_instance;
HdyPreferencesWindow parent_instance;
GtkWidget *notebook;
/* general */
GtkWidget *homepage_box;
GtkWidget *homepage_list;
GtkWidget *new_tab_homepage_radiobutton;
GtkWidget *blank_homepage_radiobutton;
GtkWidget *custom_homepage_radiobutton;
......@@ -84,51 +83,38 @@ struct _PrefsDialog {
EphyWebApplication *webapp;
guint webapp_save_id;
GtkWidget *webapp_box;
GtkWidget *webapp_list;
GtkWidget *webapp_icon;
GtkWidget *webapp_url;
GtkWidget *webapp_title;
GtkWidget *downloads_list;
GtkWidget *download_folder_row;
GtkWidget *download_box;
GtkWidget *search_box;
GtkWidget *search_engines_list;
GtkWidget *session_box;
GtkWidget *browsing_box;
GtkWidget *browsing_list;
GtkWidget *session_list;
GtkWidget *restore_session_switch;
GtkWidget *popups_allow_switch;
GtkWidget *web_content_list;
GtkWidget *adblock_allow_switch;
GtkWidget *enable_plugins_checkbutton;
GtkWidget *enable_safe_browsing_switch;
GtkWidget *enable_smooth_scrolling_switch;
/* fonts & style */
GtkWidget *fonts_list;
GtkWidget *use_gnome_fonts_row;
GtkWidget *use_custom_fonts_list;
GtkWidget *sans_fontbutton;
GtkWidget *serif_fontbutton;
GtkWidget *mono_fontbutton;
GtkWidget *css_list;
GtkWidget *css_switch;
GtkWidget *css_edit_button;
GtkWidget *default_zoom_spin_button;
GtkWidget *reader_mode_box;
GtkWidget *reader_mode_list;
GtkWidget *reader_mode_font_style;
GtkWidget *reader_mode_color_scheme;
/* stored data */
GtkWidget *cookies_list;
GtkWidget *always;
GtkWidget *no_third_party;
GtkWidget *never;
GtkWidget *passwords_list;
GtkWidget *remember_passwords_switch;
GtkWidget *personal_data_list;
GtkWidget *do_not_track_row;
GtkWidget *do_not_track_switch;
GtkWidget *clear_personal_data_button;
......@@ -139,7 +125,6 @@ struct _PrefsDialog {
GtkWidget *lang_remove_button;
GtkWidget *lang_up_button;
GtkWidget *lang_down_button;
GtkWidget *spell_checking_list;
GtkWidget *enable_spell_checking_switch;
GtkDialog *add_lang_dialog;
......@@ -182,7 +167,7 @@ enum {
NUM_COLS
};
G_DEFINE_TYPE (PrefsDialog, prefs_dialog, HDY_TYPE_DIALOG)
G_DEFINE_TYPE (PrefsDialog, prefs_dialog, HDY_TYPE_PREFERENCES_WINDOW)
static void
prefs_dialog_finalize (GObject *object)
......@@ -994,56 +979,42 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
/* general */
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, homepage_box);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, homepage_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, new_tab_homepage_radiobutton);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, blank_homepage_radiobutton);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, custom_homepage_radiobutton);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, custom_homepage_entry);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, webapp_box);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, webapp_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, webapp_icon);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, webapp_url);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, webapp_title);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, search_box);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, search_engines_list);
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, browsing_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, session_list);
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, web_content_list);
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, downloads_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, download_folder_row);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, download_box);
/* fonts & style */
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, fonts_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, use_gnome_fonts_row);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, use_custom_fonts_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, sans_fontbutton);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, serif_fontbutton);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, mono_fontbutton);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, css_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, css_switch);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, css_edit_button);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, default_zoom_spin_button);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, reader_mode_box);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, reader_mode_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, reader_mode_font_style);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, reader_mode_color_scheme);
/* stored data */
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, cookies_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, always);
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, passwords_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, remember_passwords_switch);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, personal_data_list);
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);
......@@ -1054,7 +1025,6 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, lang_remove_button);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, lang_up_button);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, lang_down_button);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, spell_checking_list);
gtk_widget_class_bind_template_child (widget_class, PrefsDialog, enable_spell_checking_switch);
/* sync */
......@@ -2419,22 +2389,6 @@ prefs_dialog_init (PrefsDialog *dialog)
gtk_widget_init_template (GTK_WIDGET (dialog));
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->browsing_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->homepage_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->downloads_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->webapp_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->search_engines_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->session_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->web_content_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->fonts_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->use_custom_fonts_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->css_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->reader_mode_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->cookies_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->passwords_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->personal_data_list), hdy_list_box_separator_header, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->spell_checking_list), hdy_list_box_separator_header, NULL, NULL);
mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
gtk_widget_set_visible (dialog->webapp_box,
mode == EPHY_EMBED_SHELL_MODE_APPLICATION);
......
......@@ -29,6 +29,6 @@ G_BEGIN_DECLS
#define EPHY_TYPE_PREFS_DIALOG (prefs_dialog_get_type ())
G_DECLARE_FINAL_TYPE (PrefsDialog, prefs_dialog, EPHY, PREFS_DIALOG, HdyDialog)
G_DECLARE_FINAL_TYPE (PrefsDialog, prefs_dialog, EPHY, PREFS_DIALOG, HdyPreferencesWindow)
G_END_DECLS
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment