IrcChannelWidget: added some commands to the user list context menu.

Wed, 03 Oct 2018 19:52:35 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 03 Oct 2018 19:52:35 +0200
changeset 6534
1a3e3d857467
parent 6533
b7df503cb673
child 6535
6e8b59db4c70

IrcChannelWidget: added some commands to the user list context menu.

Network/IRC/IrcChannelWidget.py file | annotate | diff | comparison | revisions
--- a/Network/IRC/IrcChannelWidget.py	Wed Oct 03 19:51:29 2018 +0200
+++ b/Network/IRC/IrcChannelWidget.py	Wed Oct 03 19:52:35 2018 +0200
@@ -1477,23 +1477,43 @@
         """
         Private slot to send a private message to a specific user.
         """
-        # TODO: code me
+        from E5Gui import E5TextInputDialog
+        
         user = self.usersList.selectedItems()[0].text()
-        
+        ok, message = E5TextInputDialog.getText(
+            self, self.tr("Send Message"),
+            self.tr("Enter the message to be sent:"),
+            minimumWidth=400)
+        if ok and message:
+            self.__processUserMessage("/MSG {0} {1}".format(user, message))
     
     def __sendUserQuery(self):
         """
         Private slot to send a query message to a specific user.
         """
-        # TODO: code me
+        from E5Gui import E5TextInputDialog
+        
         user = self.usersList.selectedItems()[0].text()
+        ok, message = E5TextInputDialog.getText(
+            self, self.tr("Send Query"),
+            self.tr("Enter the message to be sent:"),
+            minimumWidth=400)
+        if ok and message:
+            self.__processUserMessage("/QUERY {0} {1}".format(user, message))
     
     def __sendUserNotice(self):
         """
         Private slot to send a notice message to a specific user.
         """
-        # TODO: code me
+        from E5Gui import E5TextInputDialog
+        
         user = self.usersList.selectedItems()[0].text()
+        ok, message = E5TextInputDialog.getText(
+            self, self.tr("Send Notice"),
+            self.tr("Enter the message to be sent:"),
+            minimumWidth=400)
+        if ok and message:
+            self.__processUserMessage("/NOTICE {0} {1}".format(user, message))
     
     def __pingUser(self):
         """

eric ide

mercurial