Network/IRC/IrcNetworkEditDialog.py

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

eric ide

mercurial