From e84647260a4aadb81b4b16638662f496c4e8e165 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Tue, 16 Aug 2011 00:40:49 -0700 Subject: [PATCH] Box --- memos.py | 10 +++++++--- smilies/box.png | Bin 0 -> 555 bytes 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 smilies/box.png diff --git a/memos.py b/memos.py index 586c9eb..ba21b9a 100644 --- a/memos.py +++ b/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,7 +871,10 @@ class PesterMemo(PesterConvo): def iconCrap(self, c, down=True): for m in (self.umodes if down else reversed(self.umodes)): if eval("c."+m): - icon = PesterIcon(self.mainwindow.theme["memos/"+m+"/icon"]) + if m == "box": + icon = PesterIcon("smilies/box.png") + else: + icon = PesterIcon(self.mainwindow.theme["memos/"+m+"/icon"]) c.setIcon(icon) return icon = QtGui.QIcon() diff --git a/smilies/box.png b/smilies/box.png new file mode 100644 index 0000000000000000000000000000000000000000..8443c23eb944cf8ef49c9d13cd496502f46f1885 GIT binary patch literal 555 zcmV+`0@VG9P)i3lOYrtSl@<#7b-w zf}j{s!5HvocfT|9z82@(O@vrwU^wRt=bd>tXQpGD!`Kvuv@XEI8~tgUP2L`{+*)U@I@ zrVtr5X14??iAF(=0+k>q)v`Scm$9&=i`*knBsnaUVL1>ti*O1xfzmiD$%Md-h*6M( z@*iB)icu3eU424Ok{kp%Y!1dvp%f0`ac9vcupx^$vU0xuKpJcBvej0UYk%)EV>mIx2hV}QRf#LX^Uh(%`7hZ~|KEf#uQ31s002ovPDHLkV1hgQ{`mj^ literal 0 HcmV?d00001