Box
This commit is contained in:
parent
9745671f3b
commit
e84647260a
2 changed files with 7 additions and 3 deletions
8
memos.py
8
memos.py
|
@ -622,13 +622,14 @@ class PesterMemo(PesterConvo):
|
|||
color = self.mainwindow.profile().color
|
||||
else:
|
||||
color = chumdb.getColor(handle, defaultcolor)
|
||||
item.box = (handle == "evacipatedBox")
|
||||
item.setTextColor(color)
|
||||
item.founder = founder
|
||||
item.op = op
|
||||
item.halfop = halfop
|
||||
item.admin = admin
|
||||
item.voice = voice
|
||||
self.umodes = ["founder", "op", "halfop", "admin", "voice"]
|
||||
self.umodes = ["box", "founder", "op", "halfop", "admin", "voice"]
|
||||
self.iconCrap(item)
|
||||
self.userlist.addItem(item)
|
||||
self.sortUsers()
|
||||
|
@ -639,7 +640,7 @@ class PesterMemo(PesterConvo):
|
|||
while listing is not None:
|
||||
users.append(self.userlist.takeItem(0))
|
||||
listing = self.userlist.item(0)
|
||||
users.sort(key=lambda x: ((0 if x.founder else (1 if x.op else (2 if x.halfop else (3 if x.admin else (4 if x.voice else 5))))), x.text()))
|
||||
users.sort(key=lambda x: ((-1 if x.box else (0 if x.founder else (1 if x.op else (2 if x.halfop else (3 if x.admin else (4 if x.voice else 5)))))), x.text()))
|
||||
for u in users:
|
||||
self.userlist.addItem(u)
|
||||
|
||||
|
@ -870,6 +871,9 @@ class PesterMemo(PesterConvo):
|
|||
def iconCrap(self, c, down=True):
|
||||
for m in (self.umodes if down else reversed(self.umodes)):
|
||||
if eval("c."+m):
|
||||
if m == "box":
|
||||
icon = PesterIcon("smilies/box.png")
|
||||
else:
|
||||
icon = PesterIcon(self.mainwindow.theme["memos/"+m+"/icon"])
|
||||
c.setIcon(icon)
|
||||
return
|
||||
|
|
BIN
smilies/box.png
Normal file
BIN
smilies/box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 555 B |
Loading…
Reference in a new issue