summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-06 21:10:09 +0100
committermathieui <mathieui@mathieui.net>2011-11-06 21:10:09 +0100
commitc3c67b5e0afec8b322b8f08aa76b8e35c24bc23b (patch)
treefdc82387aafafb2220411ebd631ef10844499b0a /src/windows.py
parent0315b05f5122f1f4697699fc09de1b0860203177 (diff)
downloadpoezio-c3c67b5e0afec8b322b8f08aa76b8e35c24bc23b.tar.gz
poezio-c3c67b5e0afec8b322b8f08aa76b8e35c24bc23b.tar.bz2
poezio-c3c67b5e0afec8b322b8f08aa76b8e35c24bc23b.tar.xz
poezio-c3c67b5e0afec8b322b8f08aa76b8e35c24bc23b.zip
Code cleanup (unused import, variables, undefined names, etc…)
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/windows.py b/src/windows.py
index 790dd858..612f78ec 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -14,26 +14,23 @@ A Tab (see tab.py) is composed of multiple Windows
from gettext import (bindtextdomain, textdomain, bind_textdomain_codeset,
gettext as _)
-from os.path import isfile
import logging
log = logging.getLogger(__name__)
-import shlex
import curses
import string
from config import config
from threading import RLock
-from contact import Contact, Resource
-from roster import RosterGroup, roster
+from contact import Contact
+from roster import RosterGroup
from poopt import cut_text
from sleekxmpp.xmlstream.stanzabase import JID
import core
-import common
import wcwidth
import singleton
import collections
@@ -1471,11 +1468,9 @@ class RosterWin(Win):
if not resource:
# There's no online resource
presence = 'unavailable'
- folder = ' '
nb = ''
else:
presence = resource.get_presence()
- folder = '[+]' if contact._folded else '[-]'
nb = ' (%s)' % (contact.get_nb_resources(),)
color = RosterWin.color_show[presence]
if contact.get_name():
@@ -1519,11 +1514,11 @@ class ContactInfoWin(Win):
"""
draw the contact information
"""
+ resource = contact.get_highest_priority_resource()
if contact:
jid = contact.get_bare_jid()
else:
jid = jid or resource.get_jid().full
- resource = contact.get_highest_priority_resource()
if resource:
presence = resource.get_presence()
else: