]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkscale.c
Deprecate widget flag: GTK_WIDGET_VISIBLE
[~andy/gtk] / gtk / gtkscale.c
index 4c3f478506e66201dc59584375de2dcc49ebe4de..02222a08e0bac05f0398eca0f6449e3063774c4e 100644 (file)
@@ -654,15 +654,18 @@ void
 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");
     }
@@ -973,7 +976,7 @@ gtk_scale_expose (GtkWidget      *widget,
   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)
@@ -1297,8 +1300,8 @@ gtk_scale_get_layout (GtkScale *scale)
 /**
  * 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
@@ -1394,7 +1397,7 @@ compare_marks (gpointer a, gpointer b)
  *   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. 
@@ -1426,7 +1429,8 @@ gtk_scale_add_mark (GtkScale        *scale,
   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);