]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkaspectframe.c
GtkLabelAccessible: Sanity check _get_text() input values
[~andy/gtk] / gtk / gtkaspectframe.c
index f2eb19fa8171adbd6768bb86c375129ed86175b1..4b77af282a021f8f5911b3243d3de0a61f772bf5 100644 (file)
@@ -17,9 +17,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
  */
 
 #include "config.h"
+
 #include "gtkaspectframe.h"
+
+#include "gtksizerequest.h"
+
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
 
 
-struct _GtkAspectFramePriv
+struct _GtkAspectFramePrivate
 {
   GtkAllocation center_allocation;
 
@@ -128,17 +130,17 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
                                                          TRUE,
                                                          GTK_PARAM_READWRITE));
 
-  g_type_class_add_private (class, sizeof (GtkAspectFramePriv));
+  g_type_class_add_private (class, sizeof (GtkAspectFramePrivate));
 }
 
 static void
 gtk_aspect_frame_init (GtkAspectFrame *aspect_frame)
 {
-  GtkAspectFramePriv *priv;
+  GtkAspectFramePrivate *priv;
 
   aspect_frame->priv = G_TYPE_INSTANCE_GET_PRIVATE (aspect_frame,
                                                     GTK_TYPE_ASPECT_FRAME,
-                                                    GtkAspectFramePriv);
+                                                    GtkAspectFramePrivate);
   priv = aspect_frame->priv;
 
   priv->xalign = 0.5;
@@ -154,7 +156,7 @@ gtk_aspect_frame_set_property (GObject         *object,
                               GParamSpec      *pspec)
 {
   GtkAspectFrame *aspect_frame = GTK_ASPECT_FRAME (object);
-  GtkAspectFramePriv *priv = aspect_frame->priv;
+  GtkAspectFramePrivate *priv = aspect_frame->priv;
   
   switch (prop_id)
     {
@@ -200,7 +202,7 @@ gtk_aspect_frame_get_property (GObject         *object,
                               GParamSpec      *pspec)
 {
   GtkAspectFrame *aspect_frame = GTK_ASPECT_FRAME (object);
-  GtkAspectFramePriv *priv = aspect_frame->priv;
+  GtkAspectFramePrivate *priv = aspect_frame->priv;
   
   switch (prop_id)
     {
@@ -229,8 +231,8 @@ gtk_aspect_frame_get_property (GObject         *object,
  *  the #GtkAspectFrame. This ranges from 0.0 (left aligned)
  *  to 1.0 (right aligned)
  * @yalign: Vertical alignment of the child within the allocation of
- *  the #GtkAspectFrame. This ranges from 0.0 (left aligned)
- *  to 1.0 (right aligned)
+ *  the #GtkAspectFrame. This ranges from 0.0 (top aligned)
+ *  to 1.0 (bottom aligned)
  * @ratio: The desired aspect ratio.
  * @obey_child: If %TRUE, @ratio is ignored, and the aspect
  *  ratio is taken from the requistion of the child.
@@ -247,7 +249,7 @@ gtk_aspect_frame_new (const gchar *label,
                      gboolean     obey_child)
 {
   GtkAspectFrame *aspect_frame;
-  GtkAspectFramePriv *priv;
+  GtkAspectFramePrivate *priv;
 
   aspect_frame = g_object_new (GTK_TYPE_ASPECT_FRAME, NULL);
 
@@ -270,8 +272,8 @@ gtk_aspect_frame_new (const gchar *label,
  *  the #GtkAspectFrame. This ranges from 0.0 (left aligned)
  *  to 1.0 (right aligned)
  * @yalign: Vertical alignment of the child within the allocation of
- *  the #GtkAspectFrame. This ranges from 0.0 (left aligned)
- *  to 1.0 (right aligned)
+ *  the #GtkAspectFrame. This ranges from 0.0 (top aligned)
+ *  to 1.0 (bottom aligned)
  * @ratio: The desired aspect ratio.
  * @obey_child: If %TRUE, @ratio is ignored, and the aspect
  *  ratio is taken from the requistion of the child.
@@ -285,7 +287,7 @@ gtk_aspect_frame_set (GtkAspectFrame *aspect_frame,
                      gfloat          ratio,
                      gboolean        obey_child)
 {
-  GtkAspectFramePriv *priv;
+  GtkAspectFramePrivate *priv;
 
   g_return_if_fail (GTK_IS_ASPECT_FRAME (aspect_frame));
 
@@ -334,7 +336,7 @@ gtk_aspect_frame_compute_child_allocation (GtkFrame      *frame,
                                           GtkAllocation *child_allocation)
 {
   GtkAspectFrame *aspect_frame = GTK_ASPECT_FRAME (frame);
-  GtkAspectFramePriv *priv = aspect_frame->priv;
+  GtkAspectFramePrivate *priv = aspect_frame->priv;
   GtkBin *bin = GTK_BIN (frame);
   GtkWidget *child;
   gdouble ratio;
@@ -348,7 +350,7 @@ gtk_aspect_frame_compute_child_allocation (GtkFrame      *frame,
        {
          GtkRequisition child_requisition;
 
-         gtk_widget_get_child_requisition (child, &child_requisition);
+          gtk_widget_get_preferred_size (child, &child_requisition, NULL);
          if (child_requisition.height != 0)
            {
              ratio = ((gdouble) child_requisition.width /