diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-06-03 10:23:16 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-06-03 10:23:16 -0500 |
commit | 10f9ea69fa1a99c77880a7226e149f1ba2d1e857 (patch) | |
tree | ac967bca1c7d4bb6356ff236b68289ec6c159c9e /src/ephy-history-dialog.c | |
parent | 134db920b5f7d5716ee788de4e2b58b52ac6cb63 (diff) | |
download | epiphany-10f9ea69fa1a99c77880a7226e149f1ba2d1e857.tar.gz |
Revert "Port to libhandy master"
This reverts commit 83040372c8e6dfb3d3d47959f8c295bf71335993.
Diffstat (limited to 'src/ephy-history-dialog.c')
-rw-r--r-- | src/ephy-history-dialog.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/ephy-history-dialog.c b/src/ephy-history-dialog.c index 677256fed..df5dc08f2 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 = hdy_action_row_new (); + row = GTK_WIDGET (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. */ - gtk_container_add (GTK_CONTAINER (row), date); - gtk_container_add (GTK_CONTAINER (row), separator); - gtk_container_add (GTK_CONTAINER (row), button); + 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_widget_set_sensitive (button, ephy_embed_shell_get_mode (shell) != EPHY_EMBED_SHELL_MODE_INCOGNITO); @@ -659,6 +659,26 @@ 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) @@ -749,6 +769,7 @@ 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); |