I'm working on a C application that uses GTK 4 with libadwaita, and I'm adding some code that dynamically creates a user interface based on some factors. As part of this, I want to create an AdwActionRow and give it a certain title and subtitle. The subtitle part was easy as the documentation for the widget mentions adw_action_row_set_subtitle ()
which does exactly that. However, I cannot find any adw_action_row_set_title ()
. There is adw_action_row_set_title_lines ()
, but it does something else.
So, how do I go about setting the title of an AdwActionRow in a C program?
Looking at the documentation for AdwActionRow, you can see that it inherit from AdwPreferencesRow. If we in turn look at the documentation for that, we can see that it has a function called adw_preferences_row_set_title ()
. Since AdwActionRow inherits from AdwPreferencesRow, we can also use this function to set the title for an AdwActionRow.