Network/IRC/IrcNetworkManager.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 2992
dbdf27746da5
child 3145
a9de05d4a22f
--- a/Network/IRC/IrcNetworkManager.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Network/IRC/IrcNetworkManager.py	Fri Oct 18 23:00:41 2013 +0200
@@ -24,11 +24,15 @@
     Class implementing the IRC identity object.
     """
     DefaultIdentityName = "0default"
-    DefaultIdentityDisplay = QCoreApplication.translate("IrcIdentity", "Default Identity")
+    DefaultIdentityDisplay = QCoreApplication.translate(
+        "IrcIdentity", "Default Identity")
     
-    DefaultAwayMessage = QCoreApplication.translate("IrcIdentity", "Gone away for now.")
-    DefaultQuitMessage = QCoreApplication.translate("IrcIdentity", "IRC for eric5 IDE")
-    DefaultPartMessage = QCoreApplication.translate("IrcIdentity", "IRC for eric5 IDE")
+    DefaultAwayMessage = QCoreApplication.translate(
+        "IrcIdentity", "Gone away for now.")
+    DefaultQuitMessage = QCoreApplication.translate(
+        "IrcIdentity", "IRC for eric5 IDE")
+    DefaultPartMessage = QCoreApplication.translate(
+        "IrcIdentity", "IRC for eric5 IDE")
     
     def __init__(self, name):
         """
@@ -79,17 +83,20 @@
         self.__nickNames = Preferences.toList(settings.value("NickNames", []))
         self.__serviceName = settings.value("ServiceName", "")
         self.__password = settings.value("Password", "")
-        self.__quitMessage = settings.value("QuitMessage", IrcIdentity.DefaultQuitMessage)
-        self.__partMessage = settings.value("PartMessage", IrcIdentity.DefaultPartMessage)
+        self.__quitMessage = settings.value(
+            "QuitMessage", IrcIdentity.DefaultQuitMessage)
+        self.__partMessage = settings.value(
+            "PartMessage", IrcIdentity.DefaultPartMessage)
         self.__rememberPosOnAway = Preferences.toBool(
             settings.value("RememberAwayPosition", True))
-        self.__awayMessage = settings.value("AwayMessage", IrcIdentity.DefaultAwayMessage)
+        self.__awayMessage = settings.value(
+            "AwayMessage", IrcIdentity.DefaultAwayMessage)
     
     def setName(self, name):
         """
         Public method to set the identity name.
         
-        @param identity name (string)
+        @param name identity name (string)
         """
         self.__name = name
     
@@ -137,7 +144,7 @@
         """
         Public method to set the nick names of the identity.
         
-        @param name nick names (list of string)
+        @param names nick names (list of string)
         """
         self.__nickNames = names[:]
     
@@ -151,7 +158,8 @@
     
     def setServiceName(self, name):
         """
-        Public method to set the service name of the identity used for identification.
+        Public method to set the service name of the identity used for
+        identification.
         
         @param name service name (string)
         """
@@ -159,7 +167,8 @@
     
     def getServiceName(self):
         """
-        Public method to get the service name of the identity used for identification.
+        Public method to get the service name of the identity used for
+        identification.
         
         @return service name (string)
         """
@@ -229,7 +238,8 @@
     
     def rememberAwayPosition(self):
         """
-        Public method to get a flag indicating to remember the chat position upon AWAY.
+        Public method to get a flag indicating to remember the chat position
+        upon AWAY.
         
         @return flag indicating to remember the chat position (boolean)
         """
@@ -342,7 +352,7 @@
         """
         Public method to set the server port number.
         
-        @param server port number (integer)
+        @param port server port number (integer)
         """
         self.__port = port
     
@@ -503,7 +513,8 @@
         @param settings reference to the settings object (QSettings)
         """
         self.__identity = settings.value("Identity", "")
-        self.__autoConnect = Preferences.toBool(settings.value("AutoConnect", False))
+        self.__autoConnect = Preferences.toBool(
+            settings.value("AutoConnect", False))
         
         settings.beginGroup("Server")
         self.__server = IrcServer("")
@@ -522,7 +533,7 @@
         """
         Public method to set the network name.
         
-        @param network name (string)
+        @param name network name (string)
         """
         self.__name = name
     
@@ -654,7 +665,8 @@
     
     def autoConnect(self):
         """
-        Public method to check, if the network should be connected to at start-up.
+        Public method to check, if the network should be connected to at
+        start-up.
         
         @return flag indicating an auto connect (boolean)
         """
@@ -665,7 +677,8 @@
         """
         Class method to create the default network.
         
-        @param ssl flag indicating to create a SSL network configuration (boolean)
+        @param ssl flag indicating to create a SSL network configuration
+            (boolean)
         @return default network object (IrcNetwork)
         """
         # network
@@ -904,7 +917,8 @@
         
         @param name name of the identity to delete (string)
         """
-        if name in self.__identities and name != IrcIdentity.DefaultIdentityName:
+        if name in self.__identities and \
+                name != IrcIdentity.DefaultIdentityName:
             del self.__identities[name]
             self.identityChanged()
     

eric ide

mercurial