[gimp] Don't touch widget->requisition in size_request()



commit 2abca796bfbf1386b7b01c5255575f16d51e351e
Author: Michael Natterer <mitch gimp org>
Date:   Sat Aug 1 18:57:58 2009 +0200

    Don't touch widget->requisition in size_request()
    
    gimp_ruler_size_request(): modify the passed GtkRequisition, not
    widget->requisition.

 libgimpwidgets/gimpruler.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libgimpwidgets/gimpruler.c b/libgimpwidgets/gimpruler.c
index 7791ba8..0df4357 100644
--- a/libgimpwidgets/gimpruler.c
+++ b/libgimpwidgets/gimpruler.c
@@ -589,13 +589,13 @@ gimp_ruler_size_request (GtkWidget      *widget,
 
   if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
     {
-      widget->requisition.width  = style->xthickness * 2 + 1;
-      widget->requisition.height = style->ythickness * 2 + size;
+      requisition->width  = style->xthickness * 2 + 1;
+      requisition->height = style->ythickness * 2 + size;
     }
   else
     {
-      widget->requisition.width  = style->xthickness * 2 + size;
-      widget->requisition.height = style->ythickness * 2 + 1;
+      requisition->width  = style->xthickness * 2 + size;
+      requisition->height = style->ythickness * 2 + 1;
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]