[gtk+: 43/43] Added a runtime warning if any class is implementing the ->size_request() vfunc.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+: 43/43] Added a runtime warning if any class is implementing the ->size_request() vfunc.
- Date: Thu, 28 Oct 2010 06:37:27 +0000 (UTC)
commit 18f46adb7da78f6e0592e54f7cd2083d5b11cb09
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Thu Oct 28 15:41:00 2010 +0900
Added a runtime warning if any class is implementing the ->size_request() vfunc.
gtk/gtksizerequest.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index a5a3103..9b467b4 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]