44 self.editChannelButton.setIcon( |
44 self.editChannelButton.setIcon( |
45 UI.PixmapCache.getIcon("ircConfigure")) |
45 UI.PixmapCache.getIcon("ircConfigure")) |
46 self.addChannelButton.setIcon(UI.PixmapCache.getIcon("plus")) |
46 self.addChannelButton.setIcon(UI.PixmapCache.getIcon("plus")) |
47 self.deleteChannelButton.setIcon(UI.PixmapCache.getIcon("minus")) |
47 self.deleteChannelButton.setIcon(UI.PixmapCache.getIcon("minus")) |
48 |
48 |
49 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
49 self.__okButton = self.buttonBox.button( |
|
50 QDialogButtonBox.StandardButton.Ok) |
50 |
51 |
51 if networkName: |
52 if networkName: |
52 self.__network = copy.deepcopy( |
53 self.__network = copy.deepcopy( |
53 self.__manager.getNetwork(networkName)) |
54 self.__manager.getNetwork(networkName)) |
54 else: |
55 else: |
114 index = self.identityCombo.findText(currentIdentity) |
115 index = self.identityCombo.findText(currentIdentity) |
115 if index == -1: |
116 if index == -1: |
116 index = 0 |
117 index = 0 |
117 self.identityCombo.setCurrentIndex(index) |
118 self.identityCombo.setCurrentIndex(index) |
118 |
119 |
119 @pyqtSlot(str) |
120 @pyqtSlot(int) |
120 def on_identityCombo_currentIndexChanged(self, identity): |
121 def on_identityCombo_currentIndexChanged(self, index): |
121 """ |
122 """ |
122 Private slot to handle the selection of an identity. |
123 Private slot to handle the selection of an identity. |
123 |
124 |
124 @param identity selected entity (string) |
125 @param index index of the selected entry |
|
126 @type int |
125 """ |
127 """ |
126 from .IrcNetworkManager import IrcIdentity |
128 from .IrcNetworkManager import IrcIdentity |
|
129 |
|
130 identity = self.identitiesCombo.itemText(index) |
127 if identity == IrcIdentity.DefaultIdentityDisplay: |
131 if identity == IrcIdentity.DefaultIdentityDisplay: |
128 identity = IrcIdentity.DefaultIdentityName |
132 identity = IrcIdentity.DefaultIdentityName |
129 self.__network.setIdentityName(identity) |
133 self.__network.setIdentityName(identity) |
130 |
134 |
131 @pyqtSlot() |
135 @pyqtSlot() |
153 """ |
157 """ |
154 Private slot to edit the server configuration. |
158 Private slot to edit the server configuration. |
155 """ |
159 """ |
156 from .IrcServerEditDialog import IrcServerEditDialog |
160 from .IrcServerEditDialog import IrcServerEditDialog |
157 dlg = IrcServerEditDialog(self.__network.getServer()) |
161 dlg = IrcServerEditDialog(self.__network.getServer()) |
158 if dlg.exec() == QDialog.Accepted: |
162 if dlg.exec() == QDialog.DialogCode.Accepted: |
159 self.__network.setServer(dlg.getServer()) |
163 self.__network.setServer(dlg.getServer()) |
160 self.serverEdit.setText(self.__network.getServerName()) |
164 self.serverEdit.setText(self.__network.getServerName()) |
161 |
165 |
162 @pyqtSlot() |
166 @pyqtSlot() |
163 def on_addChannelButton_clicked(self): |
167 def on_addChannelButton_clicked(self): |
235 key = "" |
239 key = "" |
236 autoJoin = False |
240 autoJoin = False |
237 |
241 |
238 from .IrcChannelEditDialog import IrcChannelEditDialog |
242 from .IrcChannelEditDialog import IrcChannelEditDialog |
239 dlg = IrcChannelEditDialog(name, key, autoJoin, itm is not None, self) |
243 dlg = IrcChannelEditDialog(name, key, autoJoin, itm is not None, self) |
240 if dlg.exec() == QDialog.Accepted: |
244 if dlg.exec() == QDialog.DialogCode.Accepted: |
241 from .IrcNetworkManager import IrcChannel |
245 from .IrcNetworkManager import IrcChannel |
242 name, key, autoJoin = dlg.getData() |
246 name, key, autoJoin = dlg.getData() |
243 channel = IrcChannel(name) |
247 channel = IrcChannel(name) |
244 channel.setKey(key) |
248 channel.setKey(key) |
245 channel.setAutoJoin(autoJoin) |
249 channel.setAutoJoin(autoJoin) |