diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-05-26 11:05:44 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-05-26 11:05:44 -0500 |
commit | 5a9e76f676dd4ea98841ac5f1348f146f00d034f (patch) | |
tree | ce8d8da3675222d8bc6e8c0a0d152b0907244ff5 /src/ephy-history-dialog.c | |
parent | 30f6dc422cca0137b1a8ce67e3f607c80fcbe3e9 (diff) | |
download | epiphany-5a9e76f676dd4ea98841ac5f1348f146f00d034f.tar.gz |
Revert "Port to libhandy master"
This reverts commit ec7b23332b75612c88a4914ffd9019aa16be8e47.
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 f3c65bb0f..486d6393a 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); @@ -660,6 +660,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) @@ -750,6 +770,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); |