[gtk+/treeview-refactor] 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+/treeview-refactor] Added a runtime warning if any class is implementing the ->size_request() vfunc.
- Date: Sat, 30 Oct 2010 08:35:17 +0000 (UTC)
commit 731853a7ec97be6060507157230f2e3b2b998b1b
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]