Fix #2339 (put the more “important” users at the bottom in the userlist when configured)

(one-line fix, and the others are for reformatting imports to be consistent)
This commit is contained in:
mathieui 2014-04-14 19:51:56 +02:00
parent e3859c2862
commit b884e6d6e2

View file

@ -12,30 +12,28 @@ the text window, the roster window, etc.
A Tab (see tab.py) is composed of multiple Windows
"""
import logging
log = logging.getLogger(__name__)
import collections
import curses
import string
from datetime import datetime
from math import ceil, log10
from config import config
from threading import RLock
import common
import core
import poopt
import singleton
from common import safeJID
from config import config
from contact import Contact, Resource
from roster import RosterGroup
import poopt
from common import safeJID
import common
import core
import singleton
import collections
from theming import get_theme, to_curses_attr, read_tuple, dump_tuple
from user import ROLE_DICT
FORMAT_CHAR = '\x19'
# These are non-printable chars, so they should never appear in the input,
@ -247,7 +245,7 @@ class UserList(Win):
if config.get('user_list_sort', 'desc').lower() == 'asc':
y, x = self._win.getmaxyx()
y -= 1
users = sorted(users, reverse=True)
users = sorted(users)
else:
y = 0
users = sorted(users)