From 5d46a91d980811438aa3dccbe0a0cd1ab3356042 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Wed, 4 Jan 2012 17:36:47 -0800 Subject: [PATCH] Direct pester a handle without adding as chum --- CHANGELOG.mkdn | 1 + TODO.mkdn | 2 +- pesterchum.py | 19 +++++++++++++++++++ themes/enamel/style.js | 1 + themes/gold/style.js | 1 + themes/pesterchum/style.js | 5 +++-- themes/trollian/style.js | 1 + 7 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.mkdn b/CHANGELOG.mkdn index d92dc5d..c98aa0d 100644 --- a/CHANGELOG.mkdn +++ b/CHANGELOG.mkdn @@ -16,6 +16,7 @@ CHANGELOG ## 3.41.4 * Makefile for Linux installing - Kiooeht [evacipatedBox] * Recognize www. as link - Kiooeht [evacipatedBox] +* Pester menu option to just pester a handle - Kiooeht [evacipatedBox] * Bug fixes * Don't require pygame (it's kind of optional, you just don't get sound) - Kiooeht [evacipatedBox] * Allow add chum dialog to open after adding an existing chum - Kiooeht [evacipatedBox] diff --git a/TODO.mkdn b/TODO.mkdn index df8d545..76e29c1 100644 --- a/TODO.mkdn +++ b/TODO.mkdn @@ -21,12 +21,12 @@ Features * Better NickServ registering * Unified data storage, OS-based user data location * Spectation notices (Idea: lexicalNuance) (probly WONTFIX) -* "Pester" menu option to just pester a handle * Auto-login Nickserv * Make toast notifications only on certain chums * Local alisas for chums * Italics/uderline - needed for canon * Don't make new windows be all in your face and shit +* Hide offline friends per group Bugs ---- diff --git a/pesterchum.py b/pesterchum.py index 6873d46..3f61e41 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -1025,6 +1025,10 @@ class PesterWindow(MovingWindow): self.move(100, 100) + talk = QtGui.QAction(self.theme["main/menus/client/talk"], self) + self.talk = talk + self.connect(talk, QtCore.SIGNAL('triggered()'), + self, QtCore.SLOT('openChat()')) logv = QtGui.QAction(self.theme["main/menus/client/logviewer"], self) self.logv = logv self.connect(logv, QtCore.SIGNAL('triggered()'), @@ -1075,6 +1079,7 @@ class PesterWindow(MovingWindow): if not self.randhandler.running: self.rand.setEnabled(False) filemenu.addAction(userlistaction) + filemenu.addAction(talk) filemenu.addAction(self.idleaction) filemenu.addAction(grps) filemenu.addAction(self.importaction) @@ -1511,6 +1516,7 @@ class PesterWindow(MovingWindow): self.miniButton.move(*theme["main/minimize/loc"]) # menus self.menu.move(*theme["main/menu/loc"]) + self.talk.setText(theme["main/menus/client/talk"]) self.logv.setText(theme["main/menus/client/logviewer"]) self.grps.setText(theme["main/menus/client/addgroup"]) self.rand.setText(self.theme["main/menus/client/randen"]) @@ -2115,6 +2121,19 @@ class PesterWindow(MovingWindow): self.quirkmenu.quirktester.close() self.quirkmenu = None @QtCore.pyqtSlot() + def openChat(self): + if not hasattr(self, "openchatdialog"): + self.openchatdialog = None + if not self.openchatdialog: + (chum, ok) = QtGui.QInputDialog.getText(self, "Pester Chum", "Enter a handle to pester:") + try: + if ok: + self.newConversation(unicode(chum)) + except: + pass + finally: + self.openchatdialog = None + @QtCore.pyqtSlot() def openLogv(self): if not hasattr(self, 'logusermenu'): self.logusermenu = None diff --git a/themes/enamel/style.js b/themes/enamel/style.js index e2af79b..699c03d 100644 --- a/themes/enamel/style.js +++ b/themes/enamel/style.js @@ -22,6 +22,7 @@ "randen": "Random Encounter", "userlist": "Userlist", "addgroup": "Add Group", + "talk": "Pester", "import": "Import", "reconnect": "Reconnect", "idle": "Idle", diff --git a/themes/gold/style.js b/themes/gold/style.js index 3691134..cd17bc0 100644 --- a/themes/gold/style.js +++ b/themes/gold/style.js @@ -25,6 +25,7 @@ "randen": "Random Encounter", "userlist": "Userlist", "addgroup": "Add Group", + "talk": "Pester", "import": "Import", "reconnect": "Reconnect", "idle": "Idle", diff --git a/themes/pesterchum/style.js b/themes/pesterchum/style.js index 425fd4e..4f00714 100644 --- a/themes/pesterchum/style.js +++ b/themes/pesterchum/style.js @@ -26,9 +26,10 @@ "randen": "RANDOM ENCOUNTER", "userlist": "USERLIST", "addgroup": "ADD GROUP", + "talk": "PESTER", "import": "IMPORT", "reconnect": "RECONNECT", - "idle": "IDLE", + "idle": "IDLE", "exit": "EXIT"}, "profile": {"_name": "PROFILE", "switch": "SWITCH", @@ -57,7 +58,7 @@ "voiceuser": "GIVE VOICE", "quirkkill": "KILL QUIRK", "quirksoff": "QUIRKS OFF", - "ooc": "OOC", + "ooc": "OOC", "invitechum": "INVITE CHUM", "memosetting": "MEMO SETTINGS", "memonoquirk": "DISABLE QUIRKS", diff --git a/themes/trollian/style.js b/themes/trollian/style.js index 6e01fd5..4bca751 100644 --- a/themes/trollian/style.js +++ b/themes/trollian/style.js @@ -24,6 +24,7 @@ "randen": "Random Encounter", "userlist": "Fresh Targets", "addgroup": "Add Group", + "talk": "Troll", "import": "import U2;", "reconnect": "Reconnect", "idle": "Idle",