Skip to content

Commit

Permalink
Set a default widget name on all GtkBuilder widgets. (#2469)
Browse files Browse the repository at this point in the history
Allows selecting individual widgets in Gtk CSS using #name selector.
  • Loading branch information
codebrainz committed Jun 5, 2020
1 parent ea649d8 commit 2b6d595
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui_utils.c
Expand Up @@ -2491,6 +2491,11 @@ void ui_init_builder(void)
g_warning("Unable to get name from GtkBuilder object");
continue;
}
else
{
/* Set a default name for use from CSS by name */
gtk_widget_set_name(widget, name);
}

toplevel = ui_get_top_parent(widget);
if (toplevel)
Expand Down

0 comments on commit 2b6d595

Please sign in to comment.