From fe84a02af27b9b1c824cc26c248689094dc29dd6 Mon Sep 17 00:00:00 2001 From: Mohammed Sadiq Date: Sun, 25 Jul 2021 21:26:06 +0530 Subject: [PATCH] history-box: Use content style for listbox So as to match the design and less code to maintain --- src/calls-history-box.c | 24 ------------------------ src/ui/history-box.ui | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/calls-history-box.c b/src/calls-history-box.c index 48602a6..962e311 100644 --- a/src/calls-history-box.c +++ b/src/calls-history-box.c @@ -78,25 +78,6 @@ update (CallsHistoryBox *self) } -static void -header_cb (GtkListBoxRow *row, - GtkListBoxRow *before, - CallsHistoryBox *self) -{ - if (!before) - { - return; - } - - if (!gtk_list_box_row_get_header (row)) - { - GtkWidget *header = - gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); - - gtk_list_box_row_set_header (row, header); - } -} - static void delete_call_cb (CallsCallRecord *record, CallsHistoryBox *self) @@ -178,11 +159,6 @@ constructed (GObject *object) (self->model, "items-changed", G_CALLBACK (update), self); g_assert (self->model_changed_handler_id != 0); - gtk_list_box_set_header_func (self->history, - (GtkListBoxUpdateHeaderFunc)header_cb, - self, - NULL); - gtk_list_box_bind_model (self->history, self->model, (GtkListBoxCreateWidgetFunc)create_row_cb, diff --git a/src/ui/history-box.ui b/src/ui/history-box.ui index fa48c37..8e6b4ce 100644 --- a/src/ui/history-box.ui +++ b/src/ui/history-box.ui @@ -53,7 +53,7 @@ 12 start