112 index = self.identityCombo.findText(currentIdentity) |
112 index = self.identityCombo.findText(currentIdentity) |
113 if index == -1: |
113 if index == -1: |
114 index = 0 |
114 index = 0 |
115 self.identityCombo.setCurrentIndex(index) |
115 self.identityCombo.setCurrentIndex(index) |
116 |
116 |
117 @pyqtSlot(int) |
117 @pyqtSlot(str) |
118 def on_identityCombo_currentIndexChanged(self, index): |
118 def on_identityCombo_currentTextChanged(self, identity): |
119 """ |
119 """ |
120 Private slot to handle the selection of an identity. |
120 Private slot to handle the selection of an identity. |
121 |
121 |
122 @param index index of the selected entry |
122 @param identity selected identity |
123 @type int |
123 @type str |
124 """ |
124 """ |
125 from .IrcNetworkManager import IrcIdentity |
125 from .IrcNetworkManager import IrcIdentity |
126 |
126 |
127 identity = self.identitiesCombo.itemText(index) |
|
128 if identity == IrcIdentity.DefaultIdentityDisplay: |
127 if identity == IrcIdentity.DefaultIdentityDisplay: |
129 identity = IrcIdentity.DefaultIdentityName |
128 identity = IrcIdentity.DefaultIdentityName |
130 self.__network.setIdentityName(identity) |
129 self.__network.setIdentityName(identity) |
131 |
130 |
132 @pyqtSlot() |
131 @pyqtSlot() |