14 |
14 |
15 from E5Gui import E5MessageBox |
15 from E5Gui import E5MessageBox |
16 |
16 |
17 from .Ui_IrcNetworkEditDialog import Ui_IrcNetworkEditDialog |
17 from .Ui_IrcNetworkEditDialog import Ui_IrcNetworkEditDialog |
18 |
18 |
19 from .IrcNetworkManager import IrcIdentity, IrcChannel |
19 from .IrcNetworkManager import IrcIdentity, IrcNetwork, IrcChannel |
20 from .IrcChannelEditDialog import IrcChannelEditDialog |
20 from .IrcChannelEditDialog import IrcChannelEditDialog |
21 from .IrcServerEditDialog import IrcServerEditDialog |
21 from .IrcServerEditDialog import IrcServerEditDialog |
22 from .IrcIdentitiesEditDialog import IrcIdentitiesEditDialog |
22 from .IrcIdentitiesEditDialog import IrcIdentitiesEditDialog |
23 |
23 |
24 import UI.PixmapCache |
24 import UI.PixmapCache |
47 self.addChannelButton.setIcon(UI.PixmapCache.getIcon("plus.png")) |
47 self.addChannelButton.setIcon(UI.PixmapCache.getIcon("plus.png")) |
48 self.deleteChannelButton.setIcon(UI.PixmapCache.getIcon("minus.png")) |
48 self.deleteChannelButton.setIcon(UI.PixmapCache.getIcon("minus.png")) |
49 |
49 |
50 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
50 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
51 |
51 |
52 # TODO: add the ADD mode |
52 if networkName: |
53 self.__network = copy.deepcopy(self.__manager.getNetwork(networkName)) |
53 self.__network = copy.deepcopy(self.__manager.getNetwork(networkName)) |
|
54 else: |
|
55 self.__network = IrcNetwork("") |
54 |
56 |
55 # network name |
57 # network name |
56 self.networkEdit.setText(networkName) |
58 self.networkEdit.setText(networkName) |
57 |
59 |
58 # identities |
60 # identities |
129 """ |
131 """ |
130 currentIdentity = self.identityCombo.currentText() |
132 currentIdentity = self.identityCombo.currentText() |
131 dlg = IrcIdentitiesEditDialog(self.__manager, currentIdentity, self) |
133 dlg = IrcIdentitiesEditDialog(self.__manager, currentIdentity, self) |
132 dlg.exec_() |
134 dlg.exec_() |
133 self.__refreshIdentityCombo(currentIdentity) |
135 self.__refreshIdentityCombo(currentIdentity) |
|
136 |
|
137 @pyqtSlot(str) |
|
138 def on_serverEdit_textChanged(self, txt): |
|
139 """ |
|
140 Private slot to handle changes of the server name. |
|
141 |
|
142 @param txt text entered into the server name edit (string) |
|
143 """ |
|
144 self.__updateOkButton() |
134 |
145 |
135 @pyqtSlot() |
146 @pyqtSlot() |
136 def on_editServerButton_clicked(self): |
147 def on_editServerButton_clicked(self): |
137 """ |
148 """ |
138 Private slot to edit the server configuration. |
149 Private slot to edit the server configuration. |