widget: Fix measure docs
authorTimm Bäder <mail@baedert.org>
Sat, 12 May 2018 05:50:24 +0000 (07:50 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 19 May 2018 08:18:50 +0000 (10:18 +0200)
Fix a typo and don't ever pass NULL to a ::measure() implementation.

gtk/gtkwidget.c

index 9ff1562367cf196ab47e5ddde7a7a53f952a4684..471f9af06704489dac4cb5a8429a46307029998b 100644 (file)
  *     {
  *        if (i_am_in_height_for_width_mode)
  *          {
- *            int min_width;
+ *            int min_width, dummy;
  *
  *            // First, get the minimum width of our widget
  *            GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_HORIZONTAL, -1,
- *                                                    &min_width, NULL, NULL, NULL);
+ *                                                    &min_width, &dummy, &dummy, &dummy);
  *
- *            // Now use the minimum width to retrieve the minmimum and natural height to display
+ *            // Now use the minimum width to retrieve the minimum and natural height to display
  *            // that width.
  *            GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_VERTICAL, min_width,
- *                                                    minimum_size, natural_size, NULL, NULL);
+ *                                                    minimum_size, natural_size, &dummy, &dummy);
  *          }
  *        else
  *          {