diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-28 15:41:00 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-28 15:41:00 +0900 |
commit | 18f46adb7da78f6e0592e54f7cd2083d5b11cb09 (patch) | |
tree | c8d8a1806bcc34477bc0e4f86e2b19d7276893a5 /gtk/gtksizerequest.c | |
parent | 2f3e51389e485ecb888e3102f5bebc0086d5abc5 (diff) | |
download | gtk+-18f46adb7da78f6e0592e54f7cd2083d5b11cb09.tar.gz |
Added a runtime warning if any class is implementing the ->size_request() vfunc.
Diffstat (limited to 'gtk/gtksizerequest.c')
-rw-r--r-- | gtk/gtksizerequest.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c index a5a3103d49..9b467b429e 100644 --- a/gtk/gtksizerequest.c +++ b/gtk/gtksizerequest.c @@ -108,6 +108,13 @@ static void do_size_request (GtkWidget *widget, GtkRequisition *requisition) { + GtkWidgetClass *widget_class = g_type_class_peek (GTK_TYPE_WIDGET); + + if (GTK_WIDGET_GET_CLASS (widget)->size_request != widget_class->size_request) + g_warning ("%s implements GtkWidgetClass::size_request which is deprecated and " + "will be removed in the next release", + G_OBJECT_TYPE_NAME (widget)); + /* Now we dont bother caching the deprecated "size-request" returns, * just unconditionally invoke here just in case we run into legacy stuff */ gtk_widget_ensure_style (widget); |