From f6b800a482205f2666e6ee89d68fdb30b40d6c20 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Wed, 6 Jul 2011 20:46:03 -0700 Subject: [PATCH] Bug fix: Exit dumps bluh --- TODO.mkdn | 1 + dataobjs.py | 21 ++++----------------- memos.py | 8 ++------ 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/TODO.mkdn b/TODO.mkdn index 2b68f1f..6ba9e07 100644 --- a/TODO.mkdn +++ b/TODO.mkdn @@ -30,6 +30,7 @@ Bugs * Closing a timeclone doesn't actually cease for everyone else * Alt characters break quirks * +q(~) and +a(&) do weird things +* Kill Zalgo Windows Bugs ------------ diff --git a/dataobjs.py b/dataobjs.py index a1ae24e..fd2a556 100644 --- a/dataobjs.py +++ b/dataobjs.py @@ -232,23 +232,10 @@ class PesterProfile(object): def idlemsg(self, syscolor, verb): return "-- %s [%s] %s --" % (syscolor.name(), self.handle, self.colorhtml(), self.initials(), verb) def memoclosemsg(self, syscolor, initials, verb): - msg = "" % (syscolor.name(), self.colorhtml()) - for i,n in initials.iteritems(): - msg += i - if len(n) == 1: - if n[0] != 0: - msg += str(n[0]) - elif len(n) > 1: - n.sort() - msg += str(n[0]) - last = n[0] - pos = 1 - while n[pos] == last+1: - - last += 1 - msg += "%s-%s" % (min(n), max(n)) - msg += ", " - return msg[:-2] + " %s." % (verb) + if type(initials) == type(list()): + return "%s %s." % (syscolor.name(), self.colorhtml(), ", ".join(initials), verb) + else: + return "%s%s%s %s." % (syscolor.name(), self.colorhtml(), initials.pcf, self.initials(), initials.number, verb) def memoopenmsg(self, syscolor, td, timeGrammar, verb, channel): (temporal, pcf, when) = (timeGrammar.temporal, timeGrammar.pcf, timeGrammar.when) timetext = timeDifference(td) diff --git a/memos.py b/memos.py index 889f75e..f942202 100644 --- a/memos.py +++ b/memos.py @@ -791,15 +791,11 @@ class PesterMemo(PesterConvo): self.userlist.takeItem(self.userlist.row(c)) if not self.times.has_key(h): self.times[h] = TimeTracker(timedelta(0)) - allinitials = {} + allinitials = [] while self.times[h].getTime() is not None: t = self.times[h] grammar = t.getGrammar() - #allinitials.append("%s%s%s" % (grammar.pcf, chum.initials(), grammar.number)) - if "%s%s" % (grammar.pcf, chum.initials()) in allinitials: - allinitials["%s%s" % (grammar.pcf, chum.initials())].append(int(grammar.number) if grammar.number.isdigit() else 0) - else: - allinitials["%s%s" % (grammar.pcf, chum.initials())] = [int(grammar.number) if grammar.number.isdigit() else 0] + allinitials.append("%s%s%s" % (grammar.pcf, chum.initials(), grammar.number)) self.times[h].removeTime(t.getTime()) msg = chum.memoclosemsg(systemColor, allinitials, self.mainwindow.theme["convo/text/closememo"]) self.textArea.append(convertTags(msg))