[gtk+] gadget: Add more information to warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gadget: Add more information to warnings
- Date: Wed, 16 Dec 2015 22:53:45 +0000 (UTC)
commit 09d9674d696c417d23a498c460cb4ad9c5323d02
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 16 17:41:04 2015 -0500
gadget: Add more information to warnings
We have the gadget at hand, so we should print out some
information that helps tracking down where it comes from.
gtk/gtkcssgadget.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssgadget.c b/gtk/gtkcssgadget.c
index a1e381e..e5cf17e 100644
--- a/gtk/gtkcssgadget.c
+++ b/gtk/gtkcssgadget.c
@@ -552,20 +552,26 @@ gtk_css_gadget_allocate (GtkCssGadget *gadget,
if (content_allocation.width < 0)
{
- g_warning ("Negative content width while allocating gadget\n");
+ g_warning ("Negative content width while allocating gadget (node %s, owner %s)\n",
+ gtk_css_node_get_name (gtk_css_gadget_get_node (gadget)),
+ G_OBJECT_TYPE_NAME (gtk_css_gadget_get_owner (gadget)));
content_allocation.width = 0;
}
if (content_allocation.height < 0)
{
- g_warning ("Negative content height while allocating gadget\n");
+ g_warning ("Negative content height while allocating gadget (node %s, owner %s)\n",
+ gtk_css_node_get_name (gtk_css_gadget_get_node (gadget)),
+ G_OBJECT_TYPE_NAME (gtk_css_gadget_get_owner (gadget)));
content_allocation.width = 0;
}
GTK_CSS_GADGET_GET_CLASS (gadget)->allocate (gadget, &content_allocation, baseline, &content_clip);
if (content_clip.width == 0 || content_clip.height == 0)
- g_warning ("GtkCssAllocateFunc did not set clip\n");
+ g_warning ("GtkCssAllocateFunc did not set clip for gadget (node %s, owner %s)\n",
+ gtk_css_node_get_name (gtk_css_gadget_get_node (gadget)),
+ G_OBJECT_TYPE_NAME (gtk_css_gadget_get_owner (gadget)));
_gtk_css_shadows_value_get_extents (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BOX_SHADOW), &shadow);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]