[gnome-software/1723-installed-updates-papercuts] gs-update-list: The list box has missing CSS class
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1723-installed-updates-papercuts] gs-update-list: The list box has missing CSS class
- Date: Tue, 19 Apr 2022 12:22:49 +0000 (UTC)
commit e5b7f5f848d6e2c0abb79cd65e5503b770a50a78
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 19 14:20:29 2022 +0200
gs-update-list: The list box has missing CSS class
As the comment in the .ui file suggests, this did not work, it needs
the CSS property to be set directly on the list box.
Related to https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1723
src/gs-update-dialog.ui | 4 ----
src/gs-update-list.c | 1 +
2 files changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/gs-update-dialog.ui b/src/gs-update-dialog.ui
index 7d6c1d9de..d4be842fb 100644
--- a/src/gs-update-dialog.ui
+++ b/src/gs-update-dialog.ui
@@ -86,10 +86,6 @@
<object class="AdwPreferencesGroup">
<child>
<object class="GsUpdateList" id="list_box_installed_updates">
- <style>
- <!-- FIXME: It's not a GtkListBox, will this work nonetheless‽ -->
- <class name="boxed-list" />
- </style>
</object>
</child>
</object>
diff --git a/src/gs-update-list.c b/src/gs-update-list.c
index facfd71f5..c98099eb2 100644
--- a/src/gs-update-list.c
+++ b/src/gs-update-list.c
@@ -106,6 +106,7 @@ gs_update_list_init (GsUpdateList *update_list)
gtk_list_box_set_selection_mode (priv->listbox, GTK_SELECTION_NONE);
gtk_widget_set_parent (GTK_WIDGET (priv->listbox), GTK_WIDGET (update_list));
gtk_list_box_set_sort_func (priv->listbox, list_sort_func, update_list, NULL);
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (priv->listbox)), "boxed-list");
g_signal_connect (priv->listbox, "row-activated",
G_CALLBACK (installed_updates_row_activated_cb), update_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]