summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-03-10 04:57:26 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-03-10 04:57:26 +0100
commit36eed51b90d4a5c3c79a317fe59e828050c7e3a0 (patch)
treef9aa5b3aab53da52297ebc7958f5d80f63c9954e /src/windows.py
parenta519b90cbac7cc2b7cc95a7623c597c1d20b8f8c (diff)
downloadpoezio-36eed51b90d4a5c3c79a317fe59e828050c7e3a0.tar.gz
poezio-36eed51b90d4a5c3c79a317fe59e828050c7e3a0.tar.bz2
poezio-36eed51b90d4a5c3c79a317fe59e828050c7e3a0.tar.xz
poezio-36eed51b90d4a5c3c79a317fe59e828050c7e3a0.zip
use config.get() only once instead of doing it at each iteration
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index 3e073f9e..1b414b37 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -1257,8 +1257,9 @@ class RosterWin(Win):
self._win.erase()
self.draw_roster_information(roster)
y = 1
+ show_offline = config.get('roster_show_offline', 'false') == 'true'
for group in roster.get_groups():
- if config.get('roster_show_offline', 'false') == 'false' and group.get_nb_connected_contacts() == 0:
+ if not show_offline and group.get_nb_connected_contacts() == 0:
continue # Ignore empty groups
# This loop is really REALLY ugly :^)
if y-1 == self.pos: