Fire a warning if there are any handlers connected to the deprecated "size-request" signal.
This commit is contained in:
@ -104,6 +104,8 @@ get_cached_size (SizeRequestCache *cache,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
extern guint size_request_signal_id;
|
||||
static void
|
||||
do_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
@ -115,6 +117,11 @@ do_size_request (GtkWidget *widget,
|
||||
"will be removed in the next release",
|
||||
G_OBJECT_TYPE_NAME (widget));
|
||||
|
||||
if (g_signal_has_handler_pending (widget, size_request_signal_id, 0, TRUE))
|
||||
g_warning ("A %s (%p) has handler(s) connected to the GtkWidgetClass::size-request signal which is "
|
||||
"deprecated and will be removed in the next release",
|
||||
G_OBJECT_TYPE_NAME (widget), 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);
|
||||
|
||||
Reference in New Issue
Block a user