diff options
author | Benjamin Otte <otte@redhat.com> | 2011-04-28 00:51:37 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-04-28 00:54:34 +0200 |
commit | 7a322193e85746f69377fc3dff4de8b875f6ed6f (patch) | |
tree | ed5658b5ca7d95d03308d12efc886985006533ae /gtk/gtknotebook.c | |
parent | f6fc81649707eca5f52d78b52bc5e171652d6f9d (diff) | |
download | gtk+-7a322193e85746f69377fc3dff4de8b875f6ed6f.tar.gz |
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.
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index f8f3d1303d..6ab853ac48 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -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) |