forked from AuroraMiddleware/gtk
notebook: Warn if builder file defines multiple tab widgets per page
Glade causes such files when a notebook page has no content. And it's especially bad because the last tab widget wins, so the label displayed in Glade will not be what you see when you run the app.
This commit is contained in:
parent
f6fc816497
commit
7a322193e8
@ -1228,6 +1228,9 @@ gtk_notebook_buildable_add_child (GtkBuildable *buildable,
|
||||
/* To set the tab label widget, we must have already a child
|
||||
* inside the tab container. */
|
||||
g_assert (page != NULL);
|
||||
/* warn when Glade tries to overwrite label */
|
||||
if (gtk_notebook_get_tab_label (notebook, page))
|
||||
g_warning ("Overriding tab label for notebook");
|
||||
gtk_notebook_set_tab_label (notebook, page, GTK_WIDGET (child));
|
||||
}
|
||||
else if (type && strcmp (type, "action-start") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user