summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan F <ajf@eth0.org.uk>2013-10-22 20:20:06 +0100
committerGravatar Alan F <ajf@eth0.org.uk>2013-10-22 20:20:06 +0100
commit8064c4775c2ea89f9a01d342045e5d7d61717410 (patch)
tree3d8cc5129bd28d175413ae9a814b6b0db773c3e3
parent9044e0971b9186cd7697988527090e4ee1f1e046 (diff)
issue 227 - in statusbar alt limits should supercede normal limits if active. thanks for the patch!
-rw-r--r--src/trg-status-bar.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/trg-status-bar.c b/src/trg-status-bar.c
index 34454df..20ab27a 100644
--- a/src/trg-status-bar.c
+++ b/src/trg-status-bar.c
@@ -200,19 +200,19 @@ trg_status_bar_update_speed(TrgStatusBar * sb,
gchar downRateTotalString[32], upRateTotalString[32];
gchar uplimit[64], downlimit[64];
- if (session_get_speed_limit_down_enabled(session))
- downlimitraw = session_get_speed_limit_down(session);
- else if (altLimits)
+ if (altLimits) {
downlimitraw = session_get_alt_speed_limit_down(session);
- else
- downlimitraw = -1;
-
- if (session_get_speed_limit_up_enabled(session))
- uplimitraw = session_get_speed_limit_up(session);
- else if (altLimits)
uplimitraw = session_get_alt_speed_limit_up(session);
- else
- uplimitraw = -1;
+ } else {
+ if (session_get_speed_limit_down_enabled(session))
+ downlimitraw = session_get_speed_limit_down(session);
+ else
+ downlimitraw = -1;
+ if (session_get_speed_limit_up_enabled(session))
+ uplimitraw = session_get_speed_limit_up(session);
+ else
+ uplimitraw = -1;
+ }
trg_strlspeed(downRateTotalString, stats->downRateTotal / disk_K);
trg_strlspeed(upRateTotalString, stats->upRateTotal / disk_K);