66 self.serverEdit.setText(self.__network.getServerName()) |
66 self.serverEdit.setText(self.__network.getServerName()) |
67 |
67 |
68 # channels |
68 # channels |
69 for channelName in sorted(self.__network.getChannelNames()): |
69 for channelName in sorted(self.__network.getChannelNames()): |
70 channel = self.__network.getChannel(channelName) |
70 channel = self.__network.getChannel(channelName) |
71 if channel.autoJoin(): |
71 autoJoin = self.tr("Yes") if channel.autoJoin() else self.tr("No") |
72 autoJoin = self.tr("Yes") |
|
73 else: |
|
74 autoJoin = self.tr("No") |
|
75 QTreeWidgetItem(self.channelList, [channelName, autoJoin]) |
72 QTreeWidgetItem(self.channelList, [channelName, autoJoin]) |
76 |
73 |
77 self.__updateOkButton() |
74 self.__updateOkButton() |
78 self.on_channelList_itemSelectionChanged() |
75 self.on_channelList_itemSelectionChanged() |
79 |
76 |
213 def on_channelList_itemSelectionChanged(self): |
210 def on_channelList_itemSelectionChanged(self): |
214 """ |
211 """ |
215 Private slot to handle changes of the selection of channels. |
212 Private slot to handle changes of the selection of channels. |
216 """ |
213 """ |
217 selectedItems = self.channelList.selectedItems() |
214 selectedItems = self.channelList.selectedItems() |
218 if len(selectedItems) == 0: |
215 enable = bool(selectedItems) |
219 enable = False |
|
220 else: |
|
221 enable = True |
|
222 self.editChannelButton.setEnabled(enable) |
216 self.editChannelButton.setEnabled(enable) |
223 self.deleteChannelButton.setEnabled(enable) |
217 self.deleteChannelButton.setEnabled(enable) |
224 |
218 |
225 def __editChannel(self, itm): |
219 def __editChannel(self, itm): |
226 """ |
220 """ |