[gtk: 19/19] scale: Remove useless extra local variable
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 19/19] scale: Remove useless extra local variable
- Date: Thu, 20 Feb 2020 09:57:17 +0000 (UTC)
commit 018870643a985218eae2b7f602ba87d9850297d4
Author: Timm Bäder <mail baedert org>
Date: Thu Feb 20 10:30:14 2020 +0100
scale: Remove useless extra local variable
gtk/gtkscale.c | 11 ++++-------
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]