[gtk+/widget-padding: 5/11] Use _gtk_widget_get_aux_info_or_defaults() when possible in gtkwidget.c



commit 8c914ce4cca8a4e5b24a4ff1cb7f2e9abaa78368
Author: Havoc Pennington <hp pobox com>
Date:   Sun Sep 5 12:14:40 2010 -0400

    Use _gtk_widget_get_aux_info_or_defaults() when possible in gtkwidget.c
    
    Did not update uses in other files because the plan is to
    get rid of those other uses anyhow. So don't want to make
    this function available in the header.

 gtk/gtkwidget.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b73ec78..1e2f03e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7879,17 +7879,17 @@ gtk_widget_get_size_request (GtkWidget *widget,
                              gint      *width,
                              gint      *height)
 {
-  GtkWidgetAuxInfo *aux_info;
+  const GtkWidgetAuxInfo *aux_info;
 
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  aux_info = _gtk_widget_get_aux_info (widget, FALSE);
+  aux_info = _gtk_widget_get_aux_info_or_defaults (widget);
 
   if (width)
-    *width = aux_info ? aux_info->width : -1;
+    *width = aux_info->width;
 
   if (height)
-    *height = aux_info ? aux_info->height : -1;
+    *height = aux_info->height;
 }
 
 /**



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