diff options
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | org.gnome.Epiphany.json | 3 | ||||
-rw-r--r-- | src/ephy-header-bar.c | 10 | ||||
-rw-r--r-- | src/ephy-history-dialog.c | 29 | ||||
-rw-r--r-- | src/ephy-main.c | 2 | ||||
-rw-r--r-- | src/preferences/cookies-dialog.c | 7 | ||||
-rw-r--r-- | src/preferences/passwords-dialog.c | 94 | ||||
-rw-r--r-- | src/preferences/prefs-appearance-page.c | 5 | ||||
-rw-r--r-- | src/preferences/prefs-general-page.c | 15 | ||||
-rw-r--r-- | src/resources/gtk/cookies-dialog.ui | 2 | ||||
-rw-r--r-- | src/resources/gtk/history-dialog.ui | 2 | ||||
-rw-r--r-- | src/resources/gtk/passwords-dialog.ui | 2 | ||||
-rw-r--r-- | src/resources/gtk/prefs-appearance-page.ui | 129 | ||||
-rw-r--r-- | src/resources/gtk/prefs-general-page.ui | 21 | ||||
-rw-r--r-- | src/resources/gtk/prefs-privacy-page.ui | 14 | ||||
-rw-r--r-- | src/resources/gtk/prefs-sync-page.ui | 42 | ||||
-rw-r--r-- | src/window-commands.c | 16 |
17 files changed, 170 insertions, 225 deletions
diff --git a/meson.build b/meson.build index f8a7421b6..aef352abd 100644 --- a/meson.build +++ b/meson.build @@ -92,7 +92,7 @@ hogweed_dep = dependency('hogweed', version: nettle_requirement) iso_codes_dep = dependency('iso-codes', version: '>= 0.35') json_glib_dep = dependency('json-glib-1.0', version: '>= 1.2.4') libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.35.3') -libhandy_dep = dependency('libhandy-0.0', version: '>= 0.0.10') +libhandy_dep = dependency('libhandy-1', version: '>= 0.80.0') libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0') libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0') libxml_dep = dependency('libxml-2.0', version: '>= 2.6.12') diff --git a/org.gnome.Epiphany.json b/org.gnome.Epiphany.json index 827642522..a755ce7e1 100644 --- a/org.gnome.Epiphany.json +++ b/org.gnome.Epiphany.json @@ -43,8 +43,7 @@ "sources" : [ { "type" : "git", - "url" : "https://gitlab.gnome.org/GNOME/libhandy.git", - "branch" : "libhandy-0-0" + "url" : "https://gitlab.gnome.org/GNOME/libhandy.git" } ] }, diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c index 71b1f9364..8b8a67cde 100644 --- a/src/ephy-header-bar.c +++ b/src/ephy-header-bar.c @@ -215,16 +215,16 @@ ephy_header_bar_constructed (GObject *object) gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header_bar), GTK_WIDGET (header_bar->title_widget)); } else { - HdyColumn *column; + GtkWidget *column; column = hdy_column_new (); gtk_widget_set_hexpand (GTK_WIDGET (column), TRUE); - gtk_widget_show (GTK_WIDGET (column)); - hdy_column_set_maximum_width (column, 860); - hdy_column_set_linear_growth_width (column, 560); + gtk_widget_show (column); + hdy_column_set_maximum_width (HDY_COLUMN (column), 860); + hdy_column_set_linear_growth_width (HDY_COLUMN (column), 560); gtk_container_add (GTK_CONTAINER (column), GTK_WIDGET (header_bar->title_widget)); - gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header_bar), GTK_WIDGET (column)); + gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header_bar), column); } gtk_widget_show (GTK_WIDGET (header_bar->title_widget)); diff --git a/src/ephy-history-dialog.c b/src/ephy-history-dialog.c index df5dc08f2..677256fed 100644 --- a/src/ephy-history-dialog.c +++ b/src/ephy-history-dialog.c @@ -247,7 +247,7 @@ create_row (EphyHistoryDialog *self, GtkWidget *button; /* Row */ - row = GTK_WIDGET (hdy_action_row_new ()); + row = hdy_action_row_new (); hdy_action_row_set_title (HDY_ACTION_ROW (row), url->title); hdy_action_row_set_subtitle (HDY_ACTION_ROW (row), url->url); gtk_widget_set_tooltip_text (row, url->url); @@ -271,9 +271,9 @@ create_row (EphyHistoryDialog *self, gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); /* Added in reverse order because actions are packed from the end. */ - hdy_action_row_add_action (HDY_ACTION_ROW (row), button); - hdy_action_row_add_action (HDY_ACTION_ROW (row), separator); - hdy_action_row_add_action (HDY_ACTION_ROW (row), date); + gtk_container_add (GTK_CONTAINER (row), date); + gtk_container_add (GTK_CONTAINER (row), separator); + gtk_container_add (GTK_CONTAINER (row), button); gtk_widget_set_sensitive (button, ephy_embed_shell_get_mode (shell) != EPHY_EMBED_SHELL_MODE_INCOGNITO); @@ -659,26 +659,6 @@ ephy_history_dialog_dispose (GObject *object) } static void -box_header_func (GtkListBoxRow *row, - GtkListBoxRow *before, - gpointer user_data) -{ - GtkWidget *current; - - if (!before) { - gtk_list_box_row_set_header (row, NULL); - return; - } - - current = gtk_list_box_row_get_header (row); - if (!current) { - current = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); - gtk_widget_show (current); - gtk_list_box_row_set_header (row, current); - } -} - -static void on_edge_reached (GtkScrolledWindow *scrolled, GtkPositionType pos, gpointer user_data) @@ -769,7 +749,6 @@ ephy_history_dialog_init (EphyHistoryDialog *self) self->urls = NULL; self->sorter_source = 0; - gtk_list_box_set_header_func (GTK_LIST_BOX (self->listbox), box_header_func, NULL, NULL); ephy_gui_ensure_window_group (GTK_WINDOW (self)); gtk_menu_attach_to_widget (GTK_MENU (self->popup_menu), GTK_WIDGET (self), NULL); diff --git a/src/ephy-main.c b/src/ephy-main.c index 2c478d181..ab8efbb43 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -409,8 +409,6 @@ main (int argc, gtk_window_set_default_icon_name (APPLICATION_ID); } - hdy_init (&argc, &argv); - _ephy_shell_create_instance (mode); if (search_term) { diff --git a/src/preferences/cookies-dialog.c b/src/preferences/cookies-dialog.c index b8bb9a57d..fd205ff9c 100644 --- a/src/preferences/cookies-dialog.c +++ b/src/preferences/cookies-dialog.c @@ -127,7 +127,7 @@ static void cookie_add (EphyCookiesDialog *self, WebKitWebsiteData *data) { - HdyActionRow *row; + GtkWidget *row; GtkWidget *button; const char *domain; @@ -135,14 +135,14 @@ cookie_add (EphyCookiesDialog *self, /* Row */ row = hdy_action_row_new (); - hdy_action_row_set_title (row, domain); + hdy_action_row_set_title (HDY_ACTION_ROW (row), domain); button = gtk_button_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_BUTTON); gtk_widget_set_valign (button, GTK_ALIGN_CENTER); g_object_set_data (G_OBJECT (button), "row", row); gtk_widget_set_tooltip_text (button, _("Remove cookie")); g_signal_connect (button, "clicked", G_CALLBACK (forget_clicked), self); - hdy_action_row_add_action (row, button); + gtk_container_add (GTK_CONTAINER (row), button); g_object_set_data (G_OBJECT (row), "data", data); gtk_widget_show_all (GTK_WIDGET (row)); @@ -231,7 +231,6 @@ ephy_cookies_dialog_init (EphyCookiesDialog *self) self->action_group = create_action_group (self); gtk_widget_insert_action_group (GTK_WIDGET (self), "cookies", self->action_group); - gtk_list_box_set_header_func (GTK_LIST_BOX (self->cookies_listbox), hdy_list_box_separator_header, NULL, NULL); gtk_list_box_set_filter_func (GTK_LIST_BOX (self->cookies_listbox), filter_func, self, NULL); } diff --git a/src/preferences/passwords-dialog.c b/src/preferences/passwords-dialog.c index 2979b2058..aa6349263 100644 --- a/src/preferences/passwords-dialog.c +++ b/src/preferences/passwords-dialog.c @@ -278,54 +278,25 @@ populate_model_cb (GList *records, GtkWidget *button; GtkWidget *image; GtkWidget *entry; - GtkWidget *row_switch; - GtkWidget *row_separator; const char *text; - row = GTK_WIDGET (hdy_expander_row_new ()); + row = hdy_expander_row_new (); g_object_set_data (G_OBJECT (row), "record", record); - hdy_action_row_set_title (HDY_ACTION_ROW (row), ephy_password_record_get_origin (record)); - hdy_action_row_set_subtitle (HDY_ACTION_ROW (row), ephy_password_record_get_username (record)); - row_switch = dzl_gtk_widget_find_child_typed (row, GTK_TYPE_SWITCH); - if (row_switch) - gtk_widget_set_no_show_all (row_switch, TRUE); - row_separator = dzl_gtk_widget_find_child_typed (row, GTK_TYPE_SEPARATOR); - if (row_separator) - gtk_widget_set_no_show_all (row_separator, TRUE); + hdy_expander_row_set_title (HDY_EXPANDER_ROW (row), ephy_password_record_get_origin (record)); + hdy_expander_row_set_subtitle (HDY_EXPANDER_ROW (row), ephy_password_record_get_username (record)); hdy_expander_row_set_show_enable_switch (HDY_EXPANDER_ROW (row), FALSE); - separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL); - gtk_widget_set_margin_top (separator, 8); - gtk_widget_set_margin_bottom (separator, 8); - hdy_action_row_add_action (HDY_ACTION_ROW (row), separator); - button = gtk_button_new_from_icon_name ("edit-copy-symbolic", GTK_ICON_SIZE_BUTTON); gtk_widget_set_valign (button, GTK_ALIGN_CENTER); gtk_widget_set_tooltip_text (button, _("Copy password")); - hdy_action_row_add_action (HDY_ACTION_ROW (row), button); + hdy_expander_row_add_action (HDY_EXPANDER_ROW (row), button); g_signal_connect (button, "clicked", G_CALLBACK (copy_password_clicked), (void *)(ephy_password_record_get_password (record))); - separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL); - gtk_widget_set_margin_top (separator, 8); - gtk_widget_set_margin_bottom (separator, 8); - gtk_container_add (GTK_CONTAINER (row), separator); - /* Username */ - sub_row = GTK_WIDGET (hdy_action_row_new ()); + sub_row = hdy_action_row_new (); hdy_action_row_set_title (HDY_ACTION_ROW (sub_row), _("Username")); gtk_container_add (GTK_CONTAINER (row), sub_row); - button = gtk_button_new_from_icon_name ("edit-copy-symbolic", GTK_ICON_SIZE_BUTTON); - g_signal_connect (button, "clicked", G_CALLBACK (copy_username_clicked), (void *)(ephy_password_record_get_username (record))); - gtk_widget_set_tooltip_text (button, _("Copy username")); - gtk_widget_set_valign (button, GTK_ALIGN_CENTER); - hdy_action_row_add_action (HDY_ACTION_ROW (sub_row), button); - - separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL); - gtk_widget_set_margin_top (separator, 8); - gtk_widget_set_margin_bottom (separator, 8); - hdy_action_row_add_action (HDY_ACTION_ROW (sub_row), separator); - entry = gtk_entry_new (); gtk_widget_set_hexpand (entry, TRUE); gtk_widget_set_valign (entry, GTK_ALIGN_CENTER); @@ -337,24 +308,23 @@ populate_model_cb (GList *records, if (text) gtk_entry_set_text (GTK_ENTRY (entry), text); - hdy_action_row_add_action (HDY_ACTION_ROW (sub_row), entry); - - /* Password */ - sub_row = GTK_WIDGET (hdy_action_row_new ()); - hdy_action_row_set_title (HDY_ACTION_ROW (sub_row), _("Password")); - gtk_container_add (GTK_CONTAINER (row), sub_row); - - button = gtk_toggle_button_new (); - image = gtk_image_new_from_icon_name ("dialog-password-symbolic", GTK_ICON_SIZE_BUTTON); - gtk_button_set_image (GTK_BUTTON (button), image); - gtk_widget_set_tooltip_text (button, _("Reveal password")); - gtk_widget_set_valign (button, GTK_ALIGN_CENTER); - hdy_action_row_add_action (HDY_ACTION_ROW (sub_row), button); + gtk_container_add (GTK_CONTAINER (sub_row), entry); separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL); gtk_widget_set_margin_top (separator, 8); gtk_widget_set_margin_bottom (separator, 8); - hdy_action_row_add_action (HDY_ACTION_ROW (sub_row), separator); + gtk_container_add (GTK_CONTAINER (sub_row), separator); + + button = gtk_button_new_from_icon_name ("edit-copy-symbolic", GTK_ICON_SIZE_BUTTON); + g_signal_connect (button, "clicked", G_CALLBACK (copy_username_clicked), (void *)(ephy_password_record_get_username (record))); + gtk_widget_set_tooltip_text (button, _("Copy username")); + gtk_widget_set_valign (button, GTK_ALIGN_CENTER); + gtk_container_add (GTK_CONTAINER (sub_row), button); + + /* Password */ + sub_row = hdy_action_row_new (); + hdy_action_row_set_title (HDY_ACTION_ROW (sub_row), _("Password")); + gtk_container_add (GTK_CONTAINER (row), sub_row); entry = gtk_entry_new (); gtk_widget_set_hexpand (entry, TRUE); @@ -368,17 +338,31 @@ populate_model_cb (GList *records, if (text) gtk_entry_set_text (GTK_ENTRY (entry), text); + gtk_container_add (GTK_CONTAINER (sub_row), entry); + + separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL); + gtk_widget_set_margin_top (separator, 8); + gtk_widget_set_margin_bottom (separator, 8); + gtk_container_add (GTK_CONTAINER (sub_row), separator); + + button = gtk_toggle_button_new (); + image = gtk_image_new_from_icon_name ("dialog-password-symbolic", GTK_ICON_SIZE_BUTTON); + gtk_button_set_image (GTK_BUTTON (button), image); + gtk_widget_set_tooltip_text (button, _("Reveal password")); + gtk_widget_set_valign (button, GTK_ALIGN_CENTER); + g_object_bind_property (G_OBJECT (button), "active", G_OBJECT (entry), "visibility", G_BINDING_DEFAULT); - hdy_action_row_add_action (HDY_ACTION_ROW (sub_row), entry); + gtk_container_add (GTK_CONTAINER (sub_row), button); /* Remove button */ + sub_row = hdy_action_row_new (); + gtk_container_add (GTK_CONTAINER (row), sub_row); + button = gtk_button_new_with_label (_("Remove Password")); - gtk_widget_set_halign (button, GTK_ALIGN_CENTER); - gtk_widget_set_margin_top (button, 18); - gtk_widget_set_margin_bottom (button, 18); + gtk_widget_set_valign (button, GTK_ALIGN_CENTER); dzl_gtk_widget_add_style_class (button, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION); g_signal_connect (button, "clicked", G_CALLBACK (forget_clicked), record); - gtk_container_add (GTK_CONTAINER (row), button); + gtk_container_add (GTK_CONTAINER (sub_row), button); g_object_set_data (G_OBJECT (record), "dialog", dialog); @@ -436,8 +420,7 @@ password_filter (GtkListBoxRow *row, gpointer user_data) { EphyPasswordsDialog *dialog = EPHY_PASSWORDS_DIALOG (user_data); - HdyActionRow *action_row = HDY_ACTION_ROW (row); - EphyPasswordRecord *record = g_object_get_data (G_OBJECT (action_row), "record"); + EphyPasswordRecord *record = g_object_get_data (G_OBJECT (row), "record"); const char *username; const char *origin; gboolean visible = FALSE; @@ -467,7 +450,6 @@ ephy_passwords_dialog_init (EphyPasswordsDialog *dialog) g_signal_connect (GTK_WIDGET (dialog), "show", G_CALLBACK (show_dialog_cb), NULL); - gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->listbox), hdy_list_box_separator_header, NULL, NULL); gtk_list_box_set_filter_func (GTK_LIST_BOX (dialog->listbox), password_filter, dialog, NULL); gtk_list_box_set_selection_mode (GTK_LIST_BOX (dialog->listbox), GTK_SELECTION_NONE); } diff --git a/src/preferences/prefs-appearance-page.c b/src/preferences/prefs-appearance-page.c index 5d2352122..0b12fb604 100644 --- a/src/preferences/prefs-appearance-page.c +++ b/src/preferences/prefs-appearance-page.c @@ -36,7 +36,6 @@ struct _PrefsAppearancePage { /* Fonts */ GtkWidget *use_gnome_fonts_row; - GtkWidget *use_custom_fonts_list; GtkWidget *sans_fontbutton; GtkWidget *serif_fontbutton; GtkWidget *mono_fontbutton; @@ -293,9 +292,6 @@ setup_appearance_page (PrefsAppearancePage *appearance_page) "enable-expansion", G_SETTINGS_BIND_INVERT_BOOLEAN); - gtk_list_box_set_header_func (GTK_LIST_BOX (appearance_page->use_custom_fonts_list), - hdy_list_box_separator_header, NULL, NULL); - g_settings_bind (web_settings, EPHY_PREFS_WEB_SANS_SERIF_FONT, appearance_page->sans_fontbutton, @@ -394,7 +390,6 @@ prefs_appearance_page_class_init (PrefsAppearancePageClass *klass) /* Fonts */ gtk_widget_class_bind_template_child (widget_class, PrefsAppearancePage, use_gnome_fonts_row); - gtk_widget_class_bind_template_child (widget_class, PrefsAppearancePage, use_custom_fonts_list); gtk_widget_class_bind_template_child (widget_class, PrefsAppearancePage, sans_fontbutton); gtk_widget_class_bind_template_child (widget_class, PrefsAppearancePage, serif_fontbutton); gtk_widget_class_bind_template_child (widget_class, PrefsAppearancePage, mono_fontbutton); diff --git a/src/preferences/prefs-general-page.c b/src/preferences/prefs-general-page.c index 104e67f91..7542cecd7 100644 --- a/src/preferences/prefs-general-page.c +++ b/src/preferences/prefs-general-page.c @@ -456,7 +456,7 @@ language_editor_add (PrefsGeneralPage *general_page, const char *desc) { GtkWidget *event_box; - HdyActionRow *row; + GtkWidget *row; GtkWidget *prefix; GtkWidget *action; int len; @@ -478,7 +478,7 @@ language_editor_add (PrefsGeneralPage *general_page, } row = hdy_action_row_new (); - hdy_action_row_set_title (row, desc); + hdy_action_row_set_title (HDY_ACTION_ROW (row), desc); g_object_set_data (G_OBJECT (row), "code", g_strdup (code)); gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (row)), "row"); @@ -489,7 +489,7 @@ language_editor_add (PrefsGeneralPage *general_page, g_signal_connect (event_box, "drag-data-get", G_CALLBACK (drag_data_get), general_page); prefix = gtk_image_new_from_icon_name ("list-drag-handle-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add (GTK_CONTAINER (event_box), prefix); - hdy_action_row_add_prefix (row, event_box); + hdy_action_row_add_prefix (HDY_ACTION_ROW (row), event_box); action = gtk_button_new_from_icon_name ("edit-delete-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_widget_set_tooltip_text (action, _("Delete language")); @@ -497,7 +497,7 @@ language_editor_add (PrefsGeneralPage *general_page, g_object_set_data (G_OBJECT (action), "row", row); g_signal_connect (action, "clicked", G_CALLBACK (language_editor_remove_button_clicked_cb), general_page); gtk_widget_set_valign (action, GTK_ALIGN_CENTER); - hdy_action_row_add_action (row, action); + gtk_container_add (GTK_CONTAINER (row), action); gtk_widget_show_all (GTK_WIDGET (row)); @@ -769,7 +769,7 @@ create_download_path_button (PrefsGeneralPage *general_page) DOWNLOAD_BUTTON_WIDTH); g_signal_connect (button, "selection-changed", G_CALLBACK (download_path_changed_cb), general_page); - hdy_action_row_add_action (HDY_ACTION_ROW (general_page->download_folder_row), button); + gtk_container_add (GTK_CONTAINER (general_page->download_folder_row), button); gtk_widget_set_valign (button, GTK_ALIGN_CENTER); gtk_widget_show (button); @@ -1196,11 +1196,6 @@ init_lang_listbox (PrefsGeneralPage *general_page) char **list = NULL; int i; GtkCssProvider *provider; - GtkStyleContext *style_context; - - style_context = gtk_widget_get_style_context (general_page->lang_listbox); - gtk_style_context_add_class (style_context, "frame"); - gtk_list_box_set_header_func (GTK_LIST_BOX (general_page->lang_listbox), hdy_list_box_separator_header, NULL, NULL); provider = gtk_css_provider_new (); gtk_css_provider_load_from_data (provider, css, -1, NULL); diff --git a/src/resources/gtk/cookies-dialog.ui b/src/resources/gtk/cookies-dialog.ui index c3ac22192..69d390d52 100644 --- a/src/resources/gtk/cookies-dialog.ui +++ b/src/resources/gtk/cookies-dialog.ui @@ -33,7 +33,7 @@ <property name="valign">start</property> <property name="selection_mode">none</property> <style> - <class name="frame"/> + <class name="preferences"/> </style> </object> </child> diff --git a/src/resources/gtk/history-dialog.ui b/src/resources/gtk/history-dialog.ui index 0fcb9553b..c799afcc9 100644 --- a/src/resources/gtk/history-dialog.ui +++ b/src/resources/gtk/history-dialog.ui @@ -38,7 +38,7 @@ <signal name="key-press-event" handler="on_listbox_key_press_event" swapped="no"/> <signal name="row-activated" handler="on_listbox_row_activated" swapped="no"/> <style> - <class name="frame"/> + <class name="preferences"/> </style> </object> </child> diff --git a/src/resources/gtk/passwords-dialog.ui b/src/resources/gtk/passwords-dialog.ui index febdbadbc..e0f2dc6dc 100644 --- a/src/resources/gtk/passwords-dialog.ui +++ b/src/resources/gtk/passwords-dialog.ui @@ -60,7 +60,7 @@ <property name="selection_mode">multiple</property> <property name="activate_on_single_click">False</property> <style> - <class name="frame"/> + <class name="preferences"/> </style> </object> </child> diff --git a/src/resources/gtk/prefs-appearance-page.ui b/src/resources/gtk/prefs-appearance-page.ui index d4b57d1d8..fee398a06 100644 --- a/src/resources/gtk/prefs-appearance-page.ui +++ b/src/resources/gtk/prefs-appearance-page.ui @@ -18,59 +18,46 @@ <property name="title" translatable="yes">Use Custom Fonts</property> <property name="visible">True</property> <child> - <object class="GtkSeparator"> - <property name="margin-start">24</property> - <property name="visible">True</property> - </object> - </child> - <child> - <object class="GtkListBox" id="use_custom_fonts_list"> - <property name="margin-start">24</property> - <property name="selection_mode">none</property> + <object class="HdyActionRow"> + <property name="activatable">False</property> + <property name="title" translatable="yes">Sans serif font</property> <property name="visible">True</property> <child> - <object class="HdyActionRow"> - <property name="activatable">False</property> - <property name="title" translatable="yes">Sans serif font</property> + <object class="GtkFontButton" id="sans_fontbutton"> + <property name="font">Sans 12</property> + <property name="use-font">True</property> + <property name="valign">center</property> <property name="visible">True</property> - <child type="action"> - <object class="GtkFontButton" id="sans_fontbutton"> - <property name="font">Sans 12</property> - <property name="use-font">True</property> - <property name="valign">center</property> - <property name="visible">True</property> - </object> - </child> </object> </child> + </object> + </child> + <child> + <object class="HdyActionRow"> + <property name="activatable">False</property> + <property name="title" translatable="yes">Serif font</property> + <property name="visible">True</property> <child> - <object class="HdyActionRow"> - <property name="activatable">False</property> - <property name="title" translatable="yes">Serif font</property> + <object class="GtkFontButton" id="serif_fontbutton"> + <property name="font">Sans 12</property> + <property name="use-font">True</property> + <property name="valign">center</property> <property name="visible">True</property> - <child type="action"> - <object class="GtkFontButton" id="serif_fontbutton"> - <property name="font">Sans 12</property> - <property name="use-font">True</property> - <property name="valign">center</property> - <property name="visible">True</property> - </object> - </child> </object> </child> + </object> + </child> + <child> + <object class="HdyActionRow"> + <property name="activatable">False</property> + <property name="title" translatable="yes">Monospace font</property> + <property name="visible">True</property> <child> - <object class="HdyActionRow"> - <property name="activatable">False</property> - <property name="title" translatable="yes">Monospace font</property> + <object class="GtkFontButton" id="mono_fontbutton"> + <property name="font">Sans 12</property> + <property name="use-font">True</property> + <property name="valign">center</property> <property name="visible">True</property> - <child type="action"> - <object class="GtkFontButton" id="mono_fontbutton"> - <property name="font">Sans 12</property> - <property name="use-font">True</property> - <property name="valign">center</property> - <property name="visible">True</property> - </object> - </child> </object> </child> </object> @@ -111,32 +98,32 @@ <property name="activatable_widget">css_switch</property> <property name="title" translatable="yes">Use Custom Stylesheet</property> <property name="visible">True</property> - <child type="action"> - <object class="GtkButton" id="css_edit_button"> + <child> + <object class="GtkSwitch" id="css_switch"> <property name="valign">center</property> <property name="visible">True</property> - <style> - <class name="image-button"/> - </style> - <child> - <object class="GtkImage"> - <property name="icon_name">document-edit-symbolic</property> - <property name="visible">True</property> - </object> - </child> </object> </child> - <child type="action"> + <child> <object class="GtkSeparator"> <property name="margin_bottom">8</property> <property name="margin_top">8</property> <property name="visible">True</property> </object> </child> - <child type="action"> - <object class="GtkSwitch" id="css_switch"> + <child> + <object class="GtkButton" id="css_edit_button"> <property name="valign">center</property> <property name="visible">True</property> + <style> + <class name="image-button"/> + </style> + <child> + <object class="GtkImage"> + <property name="icon_name">document-edit-symbolic</property> + <property name="visible">True</property> + </object> + </child> </object> </child> </object> @@ -146,32 +133,32 @@ <property name="activatable_widget">js_switch</property> <property name="title" translatable="yes">Use Custom JavaScript</property> <property name="visible">True</property> - <child type="action"> - <object class="GtkButton" id="js_edit_button"> + <child> + <object class="GtkSwitch" id="js_switch"> <property name="valign">center</property> <property name="visible">True</property> - <style> - <class name="image-button"/> - </style> - <child> - <object class="GtkImage"> - <property name="icon_name">document-edit-symbolic</property> - <property name="visible">True</property> - </object> - </child> </object> </child> - <child type="action"> + <child> <object class="GtkSeparator"> <property name="margin_bottom">8</property> <property name="margin_top">8</property> <property name="visible">True</property> </object> </child> - <child type="action"> - <object class="GtkSwitch" id="js_switch"> + <child> + <object class="GtkButton" id="js_edit_button"> <property name="valign">center</property> <property name="visible">True</property> + <style> + <class name="image-button"/> + </style> + <child> + <object class="GtkImage"> + <property name="icon_name">document-edit-symbolic</property> + <property name="visible">True</property> + </object> + </child> </object> </child> </object> @@ -181,7 +168,7 @@ <property name="activatable">False</property> <property name="title" translatable="yes">Default zoom level</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSpinButton" id="default_zoom_spin_button"> <property name="adjustment">zoom_adjustment</property> <property name="can_focus">True</property> diff --git a/src/resources/gtk/prefs-general-page.ui b/src/resources/gtk/prefs-general-page.ui index ac73441d1..f66fb0744 100644 --- a/src/resources/gtk/prefs-general-page.ui +++ b/src/resources/gtk/prefs-general-page.ui @@ -96,7 +96,7 @@ <property name="title" translatable="yes">_Manage Additional URLs</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkButton" id="webapp_additional_urls_dialog_button"> <property name="valign">center</property> <property name="visible">True</property> @@ -162,7 +162,7 @@ <property name="visible">True</property> </object> </child> - <child type="action"> + <child> <object class="GtkEntry" id="custom_homepage_entry"> <property name="hexpand">True</property> <property name="secondary-icon-name">edit-clear-symbolic</property> @@ -184,7 +184,7 @@ <property name="title" translatable="yes">Ask o_n download</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="ask_on_download_switch"> <property name="margin-start">12</property> <property name="valign">center</property> @@ -213,7 +213,7 @@ <property name="title" translatable="yes">_Manage Search Engines</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkButton" id="search_engine_dialog_button"> <property name="valign">center</property> <property name="visible">True</property> @@ -243,7 +243,7 @@ <property name="title" translatable="yes">Start in _Incognito Mode</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="start_in_incognito_mode_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -257,7 +257,7 @@ <property name="title" translatable="yes">_Restore Tabs on Startup</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="restore_session_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -277,7 +277,7 @@ <property name="title" translatable="yes">Sm_ooth Scrolling</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="enable_smooth_scrolling_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -291,7 +291,7 @@ <property name="title" translatable="yes">Mouse _Gestures</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="enable_mouse_gesture_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -323,6 +323,9 @@ <object class="GtkListBox" id="lang_listbox"> <property name="selection_mode">none</property> <property name="visible">True</property> + <style> + <class name="preferences"/> + </style> </object> </child> </object> @@ -337,7 +340,7 @@ <property name="title" translatable="yes">_Spell Checking</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="enable_spell_checking_switch"> <property name="valign">center</property> <property name="visible">True</property> diff --git a/src/resources/gtk/prefs-privacy-page.ui b/src/resources/gtk/prefs-privacy-page.ui index c3b5d5107..f7e63a81b 100644 --- a/src/resources/gtk/prefs-privacy-page.ui +++ b/src/resources/gtk/prefs-privacy-page.ui @@ -18,7 +18,7 @@ <property name="title" translatable="yes">Try to Block _Advertisements</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="adblock_allow_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -32,7 +32,7 @@ <property name="title" translatable="yes">Block Popup _Windows</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="popups_allow_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -46,7 +46,7 @@ <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"> + <child> <object class="GtkSwitch" id="enable_safe_browsing_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -66,7 +66,7 @@ <property name="title" translatable="yes">Clear _Cookies</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkButton"> <property name="valign">center</property> <property name="visible">True</property> @@ -141,7 +141,7 @@ <property name="title" translatable="yes">_Passwords</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkButton"> <property name="valign">center</property> <property name="visible">True</property> @@ -165,7 +165,7 @@ <property name="title" translatable="yes">_Remember Passwords</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkSwitch" id="remember_passwords_switch"> <property name="valign">center</property> <property name="visible">True</property> @@ -186,7 +186,7 @@ <property name="title" translatable="yes">Clear Personal _Data</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkButton" id="clear_personal_data_button"> <property name="valign">center</property> <property name="visible">True</property> diff --git a/src/resources/gtk/prefs-sync-page.ui b/src/resources/gtk/prefs-sync-page.ui index f79f5bcc4..756df3937 100644 --- a/src/resources/gtk/prefs-sync-page.ui +++ b/src/resources/gtk/prefs-sync-page.ui @@ -37,7 +37,7 @@ <property name="subtitle" translatable="yes">Logged in</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> + <child> <object class="GtkButton" id="sync_sign_out_button"> <property name="label" translatable="yes">Sign _out</property> <property name="use-underline">True</property> @@ -112,7 +112,7 @@ <property name="visible">True</property> </object> </child> - <child type="action"> + <child> <object class="GtkButton" id="synced_tabs_button"> <property name="label" translatable="yes">S_ynced tabs</property> <property name="use-underline">True</property> @@ -127,14 +127,7 @@ <object class="HdyComboRow" id="sync_frequency_row"> <property name="title" translatable="yes">Frequency</property> <property name="visible">True</property> - <child type="action"> - <object class="GtkSeparator"> - <property name="margin_bottom">8</property> - <property name="margin_top">8</property> - <property name="visible">True</property> - </object> - </child> - <child type="action"> + <child> <object class="GtkButton" id="sync_now_button"> <property name="label" translatable="yes">Sync _now</property> <property name="use-underline">True</property> @@ -143,6 +136,13 @@ <signal name="clicked" handler="on_sync_sync_now_button_clicked"/> </object> </child> + <child> + <object class="GtkSeparator"> + <property name="margin_bottom">8</property> + <property name="margin_top">8</property> + <property name="visible">True</property> + </object> + </child> </object> </child> <child> @@ -151,16 +151,16 @@ <property name="title" translatable="yes">Device name</property> <property name="use_underline">True</property> <property name="visible">True</property> - <child type="action"> - <object class="GtkButton" id="sync_device_name_change_button"> - <property name="label" translatable="yes">_Change</property> + <child> + <object class="GtkButton" id="sync_device_name_cancel_button"> + <property name="label" translatable="yes">_Cancel</property> <property name="use-underline">True</property> <property name="valign">center</property> - <property name="visible">True</property> - <signal name="clicked" handler="on_sync_device_name_change_button_clicked"/> + <property name="visible">False</property> + <signal name="clicked" handler="on_sync_device_name_cancel_button_clicked"/> </object> </child> - <child type="action"> + <child> <object class="GtkButton" id="sync_device_name_save_button"> <property name="label" translatable="yes">_Save</property> <property name="use-underline">True</property> @@ -169,13 +169,13 @@ <signal name="clicked" handler="on_sync_device_name_save_button_clicked"/> </object> </child> - <child type="action"> - <object class="GtkButton" id="sync_device_name_cancel_button"> - <property name="label" translatable="yes">_Cancel</property> + <child> + <object class="GtkButton" id="sync_device_name_change_button"> + <property name="label" translatable="yes">_Change</property> <property name="use-underline">True</property> <property name="valign">center</property> - <property name="visible">False</property> - <signal name="clicked" handler="on_sync_device_name_cancel_button_clicked"/> + <property name="visible">True</property> + <signal name="clicked" handler="on_sync_device_name_change_button_clicked"/> </object> </child> <child> diff --git a/src/window-commands.c b/src/window-commands.c index 5b44ff91c..e561f4371 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -551,8 +551,12 @@ window_cmd_import_bookmarks (GSimpleAction *action, GtkTreeModel *tree_model; GtkCellRenderer *cell_renderer; - dialog = hdy_dialog_new (GTK_WINDOW (window)); - gtk_window_set_title (GTK_WINDOW (dialog), _("Import Bookmarks")); + dialog = g_object_new (GTK_TYPE_DIALOG, + "use-header-bar", TRUE, + "modal", TRUE, + "transient-for", window, + "title", _("Import Bookmarks"), + NULL); gtk_dialog_add_buttons (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL, @@ -793,8 +797,12 @@ window_cmd_import_passwords (GSimpleAction *action, GtkTreeModel *tree_model; GtkCellRenderer *cell_renderer; - dialog = hdy_dialog_new (GTK_WINDOW (window)); - gtk_window_set_title (GTK_WINDOW (dialog), _("Import Passwords")); + dialog = g_object_new (GTK_TYPE_DIALOG, + "use-header-bar", TRUE, + "modal", TRUE, + "transient-for", window, + "title", _("Import Passwords"), + NULL); gtk_dialog_add_buttons (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL, |