summaryrefslogtreecommitdiff
path: root/gtk/gtkscale.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-02-20 10:30:14 +0100
committerTimm Bäder <mail@baedert.org>2020-02-20 10:30:14 +0100
commit018870643a985218eae2b7f602ba87d9850297d4 (patch)
treeaab1ef80144d0638420850d59e809458a3c3bcbc /gtk/gtkscale.c
parentaa53fef39c4c58390c5cbe154e89d31fb6c74a6e (diff)
downloadgtk+-018870643a985218eae2b7f602ba87d9850297d4.tar.gz
scale: Remove useless extra local variable
Diffstat (limited to 'gtk/gtkscale.c')
-rw-r--r--gtk/gtkscale.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index b08c30386c..244c095251 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -1066,21 +1066,18 @@ update_value_position (GtkScale *scale)
* gtk_scale_set_draw_value:
* @scale: a #GtkScale
* @draw_value: %TRUE to draw the value
- *
+ *
* Specifies whether the current value is displayed as a string next
* to the slider.
*/
void
gtk_scale_set_draw_value (GtkScale *scale,
- gboolean draw_value)
+ gboolean draw_value)
{
GtkScalePrivate *priv = gtk_scale_get_instance_private (scale);
- GtkWidget *widget;
g_return_if_fail (GTK_IS_SCALE (scale));
- widget = GTK_WIDGET (scale);
-
draw_value = draw_value != FALSE;
if (priv->draw_value != draw_value)
@@ -1101,9 +1098,9 @@ gtk_scale_set_draw_value (GtkScale *scale,
g_free (txt);
if (priv->value_pos == GTK_POS_TOP || priv->value_pos == GTK_POS_LEFT)
- gtk_widget_insert_after (priv->value_widget, widget, NULL);
+ gtk_widget_insert_after (priv->value_widget, GTK_WIDGET (scale), NULL);
else
- gtk_widget_insert_before (priv->value_widget, widget, NULL);
+ gtk_widget_insert_before (priv->value_widget, GTK_WIDGET (scale), NULL);
gtk_range_set_round_digits (GTK_RANGE (scale), priv->digits);
update_value_position (scale);