[gnome-software: 4/7] age-rating-context-dialog: Pass self to add_attribute_row()




commit d8ed1808c7836ab5a219073c8b2d3398fe99dbc0
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Feb 4 09:05:44 2022 +0100

    age-rating-context-dialog: Pass self to add_attribute_row()
    
    This will allow accessing the dialog's fields.

 src/gs-age-rating-context-dialog.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-age-rating-context-dialog.c b/src/gs-age-rating-context-dialog.c
index 3555623a8..ff5046c42 100644
--- a/src/gs-age-rating-context-dialog.c
+++ b/src/gs-age-rating-context-dialog.c
@@ -409,9 +409,9 @@ content_rating_value_get_importance (AsContentRatingValue value)
 }
 
 static void
-add_attribute_row (GtkListBox           *list_box,
-                   const gchar          *attribute,
-                   AsContentRatingValue  value)
+add_attribute_row (GsAgeRatingContextDialog *self,
+                   const gchar              *attribute,
+                   AsContentRatingValue      value)
 {
        GtkListBoxRow *row;
        GsContextDialogRowImportance rating;
@@ -426,7 +426,7 @@ add_attribute_row (GtkListBox           *list_box,
                description = as_content_rating_attribute_get_description (attribute, value);
 
        row = gs_context_dialog_row_new (icon_name, rating, title, description);
-       gtk_list_box_append (list_box, GTK_WIDGET (row));
+       gtk_list_box_append (self->attributes_list, GTK_WIDGET (row));
 }
 
 /**
@@ -570,7 +570,7 @@ add_attribute_rows_cb (const gchar          *attribute,
 {
        GsAgeRatingContextDialog *self = GS_AGE_RATING_CONTEXT_DIALOG (user_data);
 
-       add_attribute_row (self->attributes_list, attribute, value);
+       add_attribute_row (self, attribute, value);
 }
 
 /* Wrapper around as_content_rating_system_format_age() which returns the short


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]