diff options
author | Timm Bäder <mail@baedert.org> | 2017-03-20 09:22:13 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-03-20 12:47:42 +0100 |
commit | ae0dadf28afc98425c5bebebfb9a729f94cd7ba3 (patch) | |
tree | aa1b0d4c50d55bd1f2f7530c022a0f0bf5df97fb /gtk/gtkprogressbar.c | |
parent | e307a35c33056dec559874829f4e0debd85a2bd0 (diff) | |
download | gtk+-ae0dadf28afc98425c5bebebfb9a729f94cd7ba3.tar.gz |
progressbar: Remove useless if statement
Both the if and the else block contained exactly the same code.
Diffstat (limited to 'gtk/gtkprogressbar.c')
-rw-r--r-- | gtk/gtkprogressbar.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index ac4fc00187..f13f90d235 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -1026,12 +1026,10 @@ gtk_progress_bar_act_mode_enter (GtkProgressBar *pbar) { GtkProgressBarPrivate *priv = pbar->priv; GtkWidget *widget = GTK_WIDGET (pbar); - GtkOrientation orientation; gboolean inverted; gtk_css_gadget_add_class (priv->progress_gadget, GTK_STYLE_CLASS_PULSE); - orientation = priv->orientation; inverted = priv->inverted; if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) { @@ -1040,32 +1038,15 @@ gtk_progress_bar_act_mode_enter (GtkProgressBar *pbar) } /* calculate start pos */ - - if (orientation == GTK_ORIENTATION_HORIZONTAL) + if (!inverted) { - if (!inverted) - { - priv->activity_pos = 0.0; - priv->activity_dir = 0; - } - else - { - priv->activity_pos = 1.0; - priv->activity_dir = 1; - } + priv->activity_pos = 0.0; + priv->activity_dir = 0; } else { - if (!inverted) - { - priv->activity_pos = 0.0; - priv->activity_dir = 0; - } - else - { - priv->activity_pos = 1.0; - priv->activity_dir = 1; - } + priv->activity_pos = 1.0; + priv->activity_dir = 1; } update_node_classes (pbar); |