Network/IRC/IrcNetworkEditDialog.py

changeset 2992
dbdf27746da5
parent 2404
cba0ff902c2b
child 3020
542e97d4ecb3
child 3057
10516539f238
equal deleted inserted replaced
2991:226481ff40d1 2992:dbdf27746da5
25 """ 25 """
26 def __init__(self, manager, networkName, parent=None): 26 def __init__(self, manager, networkName, parent=None):
27 """ 27 """
28 Constructor 28 Constructor
29 29
30 @param manager reference to the IRC network manager object (IrcNetworkManager) 30 @param manager reference to the IRC network manager object
31 (IrcNetworkManager)
31 @param networkName name of the network to work on (string) 32 @param networkName name of the network to work on (string)
32 @param parent reference to the parent widget (QWidget) 33 @param parent reference to the parent widget (QWidget)
33 """ 34 """
34 super().__init__(parent) 35 super().__init__(parent)
35 self.setupUi(self) 36 self.setupUi(self)
36 37
37 self.__manager = manager 38 self.__manager = manager
38 39
39 self.editIdentitiesButton.setIcon(UI.PixmapCache.getIcon("ircConfigure.png")) 40 self.editIdentitiesButton.setIcon(
40 self.editServerButton.setIcon(UI.PixmapCache.getIcon("ircConfigure.png")) 41 UI.PixmapCache.getIcon("ircConfigure.png"))
41 self.editChannelButton.setIcon(UI.PixmapCache.getIcon("ircConfigure.png")) 42 self.editServerButton.setIcon(
43 UI.PixmapCache.getIcon("ircConfigure.png"))
44 self.editChannelButton.setIcon(
45 UI.PixmapCache.getIcon("ircConfigure.png"))
42 self.addChannelButton.setIcon(UI.PixmapCache.getIcon("plus.png")) 46 self.addChannelButton.setIcon(UI.PixmapCache.getIcon("plus.png"))
43 self.deleteChannelButton.setIcon(UI.PixmapCache.getIcon("minus.png")) 47 self.deleteChannelButton.setIcon(UI.PixmapCache.getIcon("minus.png"))
44 48
45 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) 49 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok)
46 50
47 if networkName: 51 if networkName:
48 self.__network = copy.deepcopy(self.__manager.getNetwork(networkName)) 52 self.__network = copy.deepcopy(
53 self.__manager.getNetwork(networkName))
49 else: 54 else:
50 from .IrcNetworkManager import IrcNetwork 55 from .IrcNetworkManager import IrcNetwork
51 self.__network = IrcNetwork("") 56 self.__network = IrcNetwork("")
52 57
53 # network name 58 # network name
176 """ 181 """
177 itm = self.channelList.selectedItems()[0] 182 itm = self.channelList.selectedItems()[0]
178 if itm: 183 if itm:
179 res = E5MessageBox.yesNo(self, 184 res = E5MessageBox.yesNo(self,
180 self.trUtf8("Delete Channel"), 185 self.trUtf8("Delete Channel"),
181 self.trUtf8("""Do you really want to delete channel <b>{0}</b>?""")\ 186 self.trUtf8(
187 """Do you really want to delete channel <b>{0}</b>?""")
182 .format(itm.text(0))) 188 .format(itm.text(0)))
183 if res: 189 if res:
184 self.__network.deleteChannel(itm.text(0)) 190 self.__network.deleteChannel(itm.text(0))
185 191
186 index = self.channelList.indexOfTopLevelItem(itm) 192 index = self.channelList.indexOfTopLevelItem(itm)

eric ide

mercurial