progressbar: Remove useless if statement

Both the if and the else block contained exactly the same code.
This commit is contained in:
Timm Bäder
2017-03-20 09:22:13 +01:00
committed by Daniel Boles
parent a92ca3518b
commit d689ee7d7e

View File

@ -1260,12 +1260,10 @@ gtk_progress_bar_act_mode_enter (GtkProgressBar *pbar)
{ {
GtkProgressBarPrivate *priv = pbar->priv; GtkProgressBarPrivate *priv = pbar->priv;
GtkWidget *widget = GTK_WIDGET (pbar); GtkWidget *widget = GTK_WIDGET (pbar);
GtkOrientation orientation;
gboolean inverted; gboolean inverted;
gtk_css_gadget_add_class (priv->progress_gadget, GTK_STYLE_CLASS_PULSE); gtk_css_gadget_add_class (priv->progress_gadget, GTK_STYLE_CLASS_PULSE);
orientation = priv->orientation;
inverted = priv->inverted; inverted = priv->inverted;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
{ {
@ -1274,9 +1272,6 @@ gtk_progress_bar_act_mode_enter (GtkProgressBar *pbar)
} }
/* calculate start pos */ /* calculate start pos */
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
if (!inverted) if (!inverted)
{ {
priv->activity_pos = 0.0; priv->activity_pos = 0.0;
@ -1287,20 +1282,6 @@ gtk_progress_bar_act_mode_enter (GtkProgressBar *pbar)
priv->activity_pos = 1.0; priv->activity_pos = 1.0;
priv->activity_dir = 1; priv->activity_dir = 1;
} }
}
else
{
if (!inverted)
{
priv->activity_pos = 0.0;
priv->activity_dir = 0;
}
else
{
priv->activity_pos = 1.0;
priv->activity_dir = 1;
}
}
update_node_classes (pbar); update_node_classes (pbar);
/* No fixed schedule for pulses, will adapt after calls to update_pulse. Just /* No fixed schedule for pulses, will adapt after calls to update_pulse. Just