diff --git a/TODO b/TODO index 9ea530e..c46fe44 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,13 @@ +Bugs: +* color swatch text doesnt disappear +* X and _ buttons move around all crazy like +* default install to different location +* desktop shortcut +* random doesn't recognize upper + Features: * help menu -- about and forum -* Tray doesn't disappear on windows after close --- release alpha +* copy quirks between profiles? * shared buddy lists - changes to the buddy list should refresh it? multiple clients share buddy list??? * chumList not scaling -- QListView + delegate? diff --git a/convo.pyc b/convo.pyc index 5b825c8..f6ac506 100644 Binary files a/convo.pyc and b/convo.pyc differ diff --git a/dataobjs.py b/dataobjs.py index fb0b62f..dcf4d4b 100644 --- a/dataobjs.py +++ b/dataobjs.py @@ -70,6 +70,9 @@ class pesterQuirk(object): return string def randomrep(mo): choice = random.choice(self.quirk["randomlist"]) + def upperrep(m): + return mo.expand(m.group(1)).upper() + choice = _upperre.sub(upperrep, choice) return mo.expand(choice) return re.sub(self.quirk["from"], randomrep, string) elif self.type == "spelling": diff --git a/pesterchum.js b/pesterchum.js index ddd4159..57d8f08 100644 --- a/pesterchum.js +++ b/pesterchum.js @@ -1 +1 @@ -{"tabs": true, "soundon": true, "server": "irc.tymoon.eu", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "anguillaNuntia", "oilslickOrchid", "confusedTransient", "pretentiousFantasia", "aquaticMarinist", "lyricalKeraunoscopic", "counterRealist", "ectoBiologist", "percipientPedestrian", "asceticClinician", "doctectiveMiracles", "noSense"], "defaultprofile": "ghostDunk", "block": []} \ No newline at end of file +{"tabs": true, "soundon": true, "server": "irc.tymoon.eu", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "anguillaNuntia", "oilslickOrchid", "confusedTransient", "pretentiousFantasia", "aquaticMarinist", "lyricalKeraunoscopic", "counterRealist", "ectoBiologist", "percipientPedestrian", "asceticClinician", "doctectiveMiracles", "noSense", "obliviousCrafter"], "defaultprofile": "ghostDunk", "block": []} \ No newline at end of file diff --git a/pesterchum.py b/pesterchum.py index d9bbd41..32a41fa 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -130,6 +130,8 @@ class pesterTheme(dict): theme = json.load(fp, object_hook=self.pathHook) self.update(theme) fp.close() + if self.has_key("inherits"): + self.inheritedTheme = pesterTheme(self["inherits"]) if not default: self.defaultTheme = pesterTheme("pesterchum", default=True) def __getitem__(self, key): @@ -139,6 +141,8 @@ class pesterTheme(dict): try: v = v[k] except KeyError, e: + if hasattr(self, 'inheritedTheme'): + return self.inheritedTheme[key] if hasattr(self, 'defaultTheme'): return self.defaultTheme[key] else: @@ -152,7 +156,10 @@ class pesterTheme(dict): return d def get(self, key, default): keys = key.split("/") - v = dict.__getitem__(self, keys.pop(0)) + try: + v = dict.__getitem__(self, keys.pop(0)) + except KeyError: + return default for k in keys: try: v = v[k] @@ -161,7 +168,10 @@ class pesterTheme(dict): return v def has_key(self, key): keys = key.split("/") - v = dict.__getitem__(self, keys.pop(0)) + try: + v = dict.__getitem__(self, keys.pop(0)) + except KeyError: + return False for k in keys: try: v = v[k] diff --git a/profiles/ghostDunk.js b/profiles/ghostDunk.js index 338c689..600d8ea 100644 --- a/profiles/ghostDunk.js +++ b/profiles/ghostDunk.js @@ -1 +1 @@ -{"color": "#ff00ff", "theme": "pesterchum", "quirks": [], "handle": "ghostDunk"} \ No newline at end of file +{"color": "#ff00ff", "theme": "pesterchum", "quirks": [{"percentage": 100, "type": "spelling"}], "handle": "ghostDunk"} \ No newline at end of file diff --git a/themes/pesterchum2.5/Thumbs.db b/themes/pesterchum2.5/Thumbs.db new file mode 100644 index 0000000..8517079 Binary files /dev/null and b/themes/pesterchum2.5/Thumbs.db differ diff --git a/themes/pesterchum2.5/abouticon.png b/themes/pesterchum2.5/abouticon.png new file mode 100644 index 0000000..02fa887 Binary files /dev/null and b/themes/pesterchum2.5/abouticon.png differ diff --git a/themes/pesterchum2.5/acceptant.gif b/themes/pesterchum2.5/acceptant.gif new file mode 100644 index 0000000..f549f70 Binary files /dev/null and b/themes/pesterchum2.5/acceptant.gif differ diff --git a/themes/pesterchum2.5/alarm.wav b/themes/pesterchum2.5/alarm.wav new file mode 100644 index 0000000..910abdc Binary files /dev/null and b/themes/pesterchum2.5/alarm.wav differ diff --git a/themes/pesterchum2.5/amazed.gif b/themes/pesterchum2.5/amazed.gif new file mode 100644 index 0000000..9c2f1e6 Binary files /dev/null and b/themes/pesterchum2.5/amazed.gif differ diff --git a/themes/pesterchum2.5/bemused.gif b/themes/pesterchum2.5/bemused.gif new file mode 100644 index 0000000..15a9813 Binary files /dev/null and b/themes/pesterchum2.5/bemused.gif differ diff --git a/themes/pesterchum2.5/blocked.gif b/themes/pesterchum2.5/blocked.gif new file mode 100644 index 0000000..5031b07 Binary files /dev/null and b/themes/pesterchum2.5/blocked.gif differ diff --git a/themes/pesterchum2.5/cease.wav b/themes/pesterchum2.5/cease.wav new file mode 100644 index 0000000..4169e12 Binary files /dev/null and b/themes/pesterchum2.5/cease.wav differ diff --git a/themes/pesterchum2.5/chummy.gif b/themes/pesterchum2.5/chummy.gif new file mode 100644 index 0000000..26c9ad3 Binary files /dev/null and b/themes/pesterchum2.5/chummy.gif differ diff --git a/themes/pesterchum2.5/detestful.gif b/themes/pesterchum2.5/detestful.gif new file mode 100644 index 0000000..c050d31 Binary files /dev/null and b/themes/pesterchum2.5/detestful.gif differ diff --git a/themes/pesterchum2.5/devious.gif b/themes/pesterchum2.5/devious.gif new file mode 100644 index 0000000..06ba8be Binary files /dev/null and b/themes/pesterchum2.5/devious.gif differ diff --git a/themes/pesterchum2.5/discontent.gif b/themes/pesterchum2.5/discontent.gif new file mode 100644 index 0000000..addcf54 Binary files /dev/null and b/themes/pesterchum2.5/discontent.gif differ diff --git a/themes/pesterchum2.5/distraught.gif b/themes/pesterchum2.5/distraught.gif new file mode 100644 index 0000000..0103ac5 Binary files /dev/null and b/themes/pesterchum2.5/distraught.gif differ diff --git a/themes/pesterchum2.5/ecstatic.gif b/themes/pesterchum2.5/ecstatic.gif new file mode 100644 index 0000000..dc3ee61 Binary files /dev/null and b/themes/pesterchum2.5/ecstatic.gif differ diff --git a/themes/pesterchum2.5/estatic.gif b/themes/pesterchum2.5/estatic.gif new file mode 100644 index 0000000..dc3ee61 Binary files /dev/null and b/themes/pesterchum2.5/estatic.gif differ diff --git a/themes/pesterchum2.5/h.gif b/themes/pesterchum2.5/h.gif new file mode 100644 index 0000000..184514e Binary files /dev/null and b/themes/pesterchum2.5/h.gif differ diff --git a/themes/pesterchum2.5/insolent.gif b/themes/pesterchum2.5/insolent.gif new file mode 100644 index 0000000..d642481 Binary files /dev/null and b/themes/pesterchum2.5/insolent.gif differ diff --git a/themes/pesterchum2.5/m.gif b/themes/pesterchum2.5/m.gif new file mode 100644 index 0000000..489abaa Binary files /dev/null and b/themes/pesterchum2.5/m.gif differ diff --git a/themes/pesterchum2.5/manipulative.gif b/themes/pesterchum2.5/manipulative.gif new file mode 100644 index 0000000..642d988 Binary files /dev/null and b/themes/pesterchum2.5/manipulative.gif differ diff --git a/themes/pesterchum2.5/mirthful.gif b/themes/pesterchum2.5/mirthful.gif new file mode 100644 index 0000000..cbf895c Binary files /dev/null and b/themes/pesterchum2.5/mirthful.gif differ diff --git a/themes/pesterchum2.5/mystified.gif b/themes/pesterchum2.5/mystified.gif new file mode 100644 index 0000000..56341d6 Binary files /dev/null and b/themes/pesterchum2.5/mystified.gif differ diff --git a/themes/pesterchum2.5/offline.gif b/themes/pesterchum2.5/offline.gif new file mode 100644 index 0000000..e3c6b53 Binary files /dev/null and b/themes/pesterchum2.5/offline.gif differ diff --git a/themes/pesterchum2.5/op.gif b/themes/pesterchum2.5/op.gif new file mode 100644 index 0000000..bd3ba35 Binary files /dev/null and b/themes/pesterchum2.5/op.gif differ diff --git a/themes/pesterchum2.5/pcbg.png b/themes/pesterchum2.5/pcbg.png new file mode 100644 index 0000000..1f93fa9 Binary files /dev/null and b/themes/pesterchum2.5/pcbg.png differ diff --git a/themes/pesterchum2.5/pccool.gif b/themes/pesterchum2.5/pccool.gif new file mode 100644 index 0000000..bd3ba35 Binary files /dev/null and b/themes/pesterchum2.5/pccool.gif differ diff --git a/themes/pesterchum2.5/perky.gif b/themes/pesterchum2.5/perky.gif new file mode 100644 index 0000000..1d19661 Binary files /dev/null and b/themes/pesterchum2.5/perky.gif differ diff --git a/themes/pesterchum2.5/pleasant.gif b/themes/pesterchum2.5/pleasant.gif new file mode 100644 index 0000000..3233ff4 Binary files /dev/null and b/themes/pesterchum2.5/pleasant.gif differ diff --git a/themes/pesterchum2.5/pranky.gif b/themes/pesterchum2.5/pranky.gif new file mode 100644 index 0000000..e46e45e Binary files /dev/null and b/themes/pesterchum2.5/pranky.gif differ diff --git a/themes/pesterchum2.5/rancorous.gif b/themes/pesterchum2.5/rancorous.gif new file mode 100644 index 0000000..a826c75 Binary files /dev/null and b/themes/pesterchum2.5/rancorous.gif differ diff --git a/themes/pesterchum2.5/relaxed.gif b/themes/pesterchum2.5/relaxed.gif new file mode 100644 index 0000000..55a31a0 Binary files /dev/null and b/themes/pesterchum2.5/relaxed.gif differ diff --git a/themes/pesterchum2.5/sleek.gif b/themes/pesterchum2.5/sleek.gif new file mode 100644 index 0000000..5573aa5 Binary files /dev/null and b/themes/pesterchum2.5/sleek.gif differ diff --git a/themes/pesterchum2.5/smooth.gif b/themes/pesterchum2.5/smooth.gif new file mode 100644 index 0000000..a261759 Binary files /dev/null and b/themes/pesterchum2.5/smooth.gif differ diff --git a/themes/pesterchum2.5/style.js b/themes/pesterchum2.5/style.js new file mode 100644 index 0000000..66b7874 --- /dev/null +++ b/themes/pesterchum2.5/style.js @@ -0,0 +1,116 @@ +{"inherits": "pesterchum", + "main": + {"style": "", + "background-image": "$path/pcbg.png", + "size": [300,620], + "icon": "$path/trayicon.png", + "newmsgicon": "$path/trayicon2.png", + "windowtitle": "PESTERCHUM", + "close": { "image": "$path/x.gif", + "loc": [280, 2]}, + "minimize": { "image": "$path/m.gif", + "loc": [260, 2]}, + "chums": { "loc": [15, 70], + "size": [270, 300] + }, + "mychumhandle": { "label": + { "text": "CHUMHANDLE:", + "loc": [12,430], + "style": "color: black ;font:bold; font-family: 'Courier';" + }, + "handle": { "loc": [35,440], + "size": [240, 21] }, + "colorswatch": { "loc": [260,440], + "size": [30,30], + "text": "C" }, + "currentMood": [15, 440] + }, + "addchum": { "style": "background: rgba(255, 255, 0, 100%); border:2px solid #c48a00; font: bold; color: black; font-family:'Courier';", + "loc": [15,380], + "size": [90, 30], + "text": "ADD CHUM" + }, + "pester": { "style": "background: rgba(255, 255, 0, 100%); border:2px solid #c48a00; font: bold; color: black; font-family:'Courier';", + "loc": [193,380], + "size": [89, 30], + "text": "PESTER!" + }, + "block": { "style": "background: #F00000; border:2px solid #c48a00; font: bold; color: black; font-family:'Courier';", + "loc": [104,380], + "size": [89, 30], + "text": "BLOCK" + }, + "moodlabel": { "style": "font:bold;font-family:'Courier';color:black;", + "loc": [20, 460], + "text": "MOODS:" + }, + "moods": [ + { "style": "text-align:left; background:#ffff00;border:2px solid #c48a00;color: black; font-family:'Courier'; font:bold;", + "selected": "text-align:left; background:white; border:2px solid #c48a00; color: black; font-family:'Courier'; font:bold;", + "loc": [15, 480], + "size": [135, 30], + "text": "CHUMMY", + "icon": "$path/chummy.gif", + "mood": 0 + }, + + { "style": "text-align:left; background:#ffff00;border:2px solid #c48a00;color: black; font-family:'Courier'; font:bold;", + "selected": "text-align:left; background:white; border:2px solid #c48a00; color: black; font-family:'Courier'; font:bold;", + "loc": [15, 508], + "size": [135, 30], + "text": "PLEASANT", + "icon": "$path/pleasant.gif", + "mood": 3 + }, + + { "style": "text-align:left; background:#ffff00;border:2px solid #c48a00;color: black; font-family:'Courier'; font:bold;", + "selected": "text-align:left; background:white; border:2px solid #c48a00; color: black; font-family:'Courier'; font:bold;", + "loc": [15, 536], + "size": [135, 30], + "text": "DISTRAUGHT", + "icon": "$path/distraught.gif", + "mood": 4 + }, + + { "style": "text-align:left; background:#ffff00;border:2px solid #c48a00;color: black; font-family:'Courier'; font:bold;", + "selected": "text-align:left; background:white; border:2px solid #c48a00; color: black; font-family:'Courier'; font:bold;", + "loc": [148, 480], + "size": [135, 30], + "text": "PRANKY", + "icon": "$path/pranky.gif", + "mood": 5 + }, + + { "style": "text-align:left; background:#ffff00;border:2px solid #c48a00;color: black; font-family:'Courier'; font:bold;", + "selected": "text-align:left; background:white; border:2px solid #c48a00; color: black; font-family:'Courier'; font:bold;", + "loc": [148, 508], + "size": [135, 30], + "text": "SMOOTH", + "icon": "$path/smooth.gif", + "mood": 6 + }, + + { "style": "text-align:left; background:#f00000;border:2px solid #c48a00;color: black; font-family:'Courier'; font:bold;", + "selected": "text-align:left; background:white; border:2px solid #c48a00; color: red; font-family:'Courier'; font:bold;", + "loc": [148, 536], + "size": [135, 30], + "text": "RANCOROUS", + "icon": "$path/rancorous.gif", + "mood": 1 + }, + + { "style": "text-align:center; border:2px solid #c48a00; background:black;color: white; font-family:'Courier'; font:bold;", + "selected": "text-align:left; background:white; border:2px solid #c48a00; padding: 5px;color: black; font-family:'Courier'; font:bold;", + "loc": [15, 564], + "size": [270, 30], + "text": "ABSCOND", + "icon": "$path/offline.gif", + "mood": 2 + } + ] + } +} + + + + \ No newline at end of file diff --git a/themes/pesterchum2.5/style.pcs b/themes/pesterchum2.5/style.pcs new file mode 100644 index 0000000..8ea9940 --- /dev/null +++ b/themes/pesterchum2.5/style.pcs @@ -0,0 +1,162 @@ +#PESTERCHUM STYLE + +// The title will appear at the top of the window. +// Instead of a space in the name or title, use an '_'. It will come out as a space. +// The name and author will only be in the 'about' section. +// The name you will enter in the 'options' is the name of the folder this is in. +// The alarm only plays when a message is recieved. +// The mode can be set to 'regular' or 'trollian'. + +name Pesterchum +title Pesterchum +author Grimlive95 +alarm alarm.wav +mode regular + +// Colors are in the format of 'red/green/blue/alpha', alpha being transparency. +// 255 is solid and 000 is invisible. + +// MAIN WINDOW + +// If you have a background image, set 'c 3' alpa to '000'. +// If your background image has a header on it, do the same with the title text color. + +c 1 000 000 000 000 // title text +c 2 000 000 000 255 // chumhandle/ mood label text +c 3 000 000 000 255 // outside menu text +c 4 000 000 000 255 // inside menu text +c 5 255 181 000 000 // main background +c 6 255 181 000 255 // menu background + +// BUTTONS + +// Main buttons are the moods that aren't 'rancorous', the 'pester' and 'add chum' buttons. +// They are also the buttons on the Options, Quirks Manager, and Trollslum. +// Block buttons are the 'rancorous' and 'block' buttons. + +c 7 196 135 000 255 // main button borders +c 8 196 135 000 255 // block button borders +c 9 196 135 000 255 // offline button border + +c 10 255 255 000 255 // main buttons +c 11 240 000 000 255 // block buttons +c 12 000 000 000 255 // offline button + +c 13 000 000 000 255 // main button text +c 14 000 000 000 255 // block button text +c 15 255 255 255 255 // offline button text + +// CHUMROLL & CHUMHANDLE + +c 16 255 255 000 255 // chumroll border +c 17 000 000 000 255 // chumroll background +c 18 150 150 150 255 // chumroll highlight + +c 19 100 100 100 255 // chumroll usertext +c 20 255 255 255 255 // chumroll highlighted usertext + +c 21 255 255 000 255 // my chumhandle border +c 22 000 000 000 255 // my chumhandle background +c 23 255 255 255 255 // my chumhandle usertext + +// PESTER WINDOW + +c 24 255 181 000 255 // pester window background +c 25 255 255 255 255 // pesterlog background +c 26 255 255 255 255 // text field background +c 27 000 000 000 255 // text field text color + +c 28 196 135 000 255 // pesterwindow topbar +c 29 255 255 255 255 // pesterwindow top bar text + +c 30 196 135 000 255 // pesterlog border +c 31 196 135 000 255 // text field border + +// PESTER WINDOW BUTTONS + +c 32 196 135 000 255 // main button borders +c 33 196 135 000 255 // block button border + +c 34 255 255 000 255 // main buttons +c 35 255 000 000 255 // block button + +c 36 000 000 000 255 // pesterwindow button text +c 37 000 000 000 255 // pesterwindow block button text + +// OPTIONS WINDOW + +c 38 255 181 000 255 // background +c 39 000 000 000 255 // text color +c 40 196 135 000 255 // button borders +c 41 255 255 000 255 // buttons +c 42 000 000 000 255 // button text + +// QUIRKS MANAGER WINDOW + +c 43 255 181 000 255 // background +c 44 000 000 000 255 // text color +c 45 196 135 000 255 // button borders +c 46 255 255 000 255 // buttons +c 47 000 000 000 255 // button text + +// TROLLSLUM WINDOW + +c 48 255 181 000 255 // background +c 49 000 000 000 255 // text color +c 50 196 135 000 255 // button borders +c 51 255 255 000 255 // buttons +c 52 000 000 000 255 // button text + +// FONTS (In the format: Font_name MODE size) + +// menu is for the top menu. +// tagandmood is for the CHUMHANDLE and MOOD labels. +// message is for the text field in the pester window. +// topbar is for the ::nameName:: text on the top of the pester window. +// tray is for your tray popups. +// debug is for the debug console. + +f title Courier BOLD 14 +f menu Courier BOLD 12 +f buttons Courier BOLD 14 + +f tagandmood Courier BOLD 14 +f chumroll Courier BOLD 14 +f chumhandle Courier BOLD 14 + +f message Courier BOLD 13 +f topbar Courier BOLD 13 + +f tray Courier BOLD 12 + +f debug Courier BOLD 13 + +// PESTERCHUM MOOD ICONS + +i ichummy chummy.gif +i ipleasant pleasant.gif +i idistraught distraught.gif +i iunruly unruly.gif +i ismooth smooth.gif +i irancorous rancorous.gif +i ioffline offline.gif + +// TROLLIAN MOOD ICONS + +i iestatic estatic.gif +i irelaxed relaxed.gif +i idiscontent discontent.gif +i idevious devious.gif +i isleek sleek.gif +i idetestful detestful.gif + +// ETC. + +// iicon only appears in the about section. +// ticon will appear in both your tray and your pesterwindow. + +i ticon trayicon2.png +i iicon abouticon.png +i iclose x.gif +i ihide m.gif +i ibg pcbg.png \ No newline at end of file diff --git a/themes/pesterchum2.5/trayicon.gif b/themes/pesterchum2.5/trayicon.gif new file mode 100644 index 0000000..926ccc7 Binary files /dev/null and b/themes/pesterchum2.5/trayicon.gif differ diff --git a/themes/pesterchum2.5/trayicon.png b/themes/pesterchum2.5/trayicon.png new file mode 100644 index 0000000..817bf4b Binary files /dev/null and b/themes/pesterchum2.5/trayicon.png differ diff --git a/themes/pesterchum2.5/trayicon2.png b/themes/pesterchum2.5/trayicon2.png new file mode 100644 index 0000000..9fa1daa Binary files /dev/null and b/themes/pesterchum2.5/trayicon2.png differ diff --git a/themes/pesterchum2.5/unruly.gif b/themes/pesterchum2.5/unruly.gif new file mode 100644 index 0000000..09c58ec Binary files /dev/null and b/themes/pesterchum2.5/unruly.gif differ diff --git a/themes/pesterchum2.5/x.gif b/themes/pesterchum2.5/x.gif new file mode 100644 index 0000000..41b47e6 Binary files /dev/null and b/themes/pesterchum2.5/x.gif differ