From 36034459927f1642dc99a62345256ad00245440f Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 21 Jun 2007 18:56:15 +0000 Subject: [PATCH] unlimited max connections show as unlimited in status bar, not -1 --- src/interface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interface.py b/src/interface.py index b31aeccd1..d5ec290b6 100644 --- a/src/interface.py +++ b/src/interface.py @@ -837,7 +837,10 @@ class DelugeGTK: # Update Statusbar and Tray Tips core_state = self.manager.get_state() connections = core_state['num_peers'] - max_connections = int(self.config.get("max_connections")) + if (int(self.config.get("max_connections")) == -1): + max_connections = _("Unlimited") + else: + max_connections = int(self.config.get("max_connections")) dlrate = common.frate(core_state['download_rate']) ulrate = common.frate(core_state['upload_rate']) if self.config.get("max_download_rate") < 0: