gtk_scale_set_value_pos (GtkScale *scale,
GtkPositionType pos)
{
+ GtkWidget *widget;
+
g_return_if_fail (GTK_IS_SCALE (scale));
if (scale->value_pos != pos)
{
scale->value_pos = pos;
+ widget = GTK_WIDGET (scale);
_gtk_scale_clear_layout (scale);
- if (GTK_WIDGET_VISIBLE (scale) && GTK_WIDGET_MAPPED (scale))
- gtk_widget_queue_resize (GTK_WIDGET (scale));
+ if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget))
+ gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (scale), "value-pos");
}
GTK_WIDGET_CLASS (gtk_scale_parent_class)->expose_event (widget, event);
state_type = GTK_STATE_NORMAL;
- if (!GTK_WIDGET_IS_SENSITIVE (widget))
+ if (!gtk_widget_is_sensitive (widget))
state_type = GTK_STATE_INSENSITIVE;
if (priv->marks)
/**
* gtk_scale_get_layout_offsets:
* @scale: a #GtkScale
- * @x: location to store X offset of layout, or %NULL
- * @y: location to store Y offset of layout, or %NULL
+ * @x: (allow-none): location to store X offset of layout, or %NULL
+ * @y: (allow-none): location to store Y offset of layout, or %NULL
*
* Obtains the coordinates where the scale will draw the
* #PangoLayout representing the text in the scale. Remember
* is drawn above the scale, anything else below. For a vertical scale,
* #GTK_POS_LEFT is drawn to the left of the scale, anything else to the
* right.
- * @markup: Text to be shown at the mark, using <link linkend="PangoMarkupFormat">Pango markup</link>, or %NULL
+ * @markup: (allow-none): Text to be shown at the mark, using <link linkend="PangoMarkupFormat">Pango markup</link>, or %NULL
*
*
* Adds a mark at @value.
mark->markup = g_strdup (markup);
mark->position = position;
- priv->marks = g_slist_insert_sorted (priv->marks, mark, compare_marks);
+ priv->marks = g_slist_insert_sorted (priv->marks, mark,
+ (GCompareFunc) compare_marks);
n = g_slist_length (priv->marks);
values = g_new (gdouble, n);