Helpviewer/Feeds/FeedsManager.py

changeset 3020
542e97d4ecb3
parent 3002
6ffc581f00f1
child 3034
7ce719013078
child 3058
0a02c433f52d
equal deleted inserted replaced
3019:7912530a33e2 3020:542e97d4ecb3
170 dlg = FeedEditDialog(origUrlString, origTitle) 170 dlg = FeedEditDialog(origUrlString, origTitle)
171 if dlg.exec_() == QDialog.Accepted: 171 if dlg.exec_() == QDialog.Accepted:
172 urlString, title = dlg.getData() 172 urlString, title = dlg.getData()
173 for feed in self.__feeds: 173 for feed in self.__feeds:
174 if feed[0] == urlString: 174 if feed[0] == urlString:
175 E5MessageBox.critical(self, 175 E5MessageBox.critical(
176 self,
176 self.trUtf8("Duplicate Feed URL"), 177 self.trUtf8("Duplicate Feed URL"),
177 self.trUtf8( 178 self.trUtf8(
178 """A feed with the URL {0} exists already.""" 179 """A feed with the URL {0} exists already."""
179 """ Aborting...""".format(urlString))) 180 """ Aborting...""".format(urlString)))
180 return 181 return
191 """ 192 """
192 Private slot to delete the selected feed. 193 Private slot to delete the selected feed.
193 """ 194 """
194 itm = self.feedsTree.selectedItems()[0] 195 itm = self.feedsTree.selectedItems()[0]
195 title = itm.text(0) 196 title = itm.text(0)
196 res = E5MessageBox.yesNo(self, 197 res = E5MessageBox.yesNo(
198 self,
197 self.trUtf8("Delete Feed"), 199 self.trUtf8("Delete Feed"),
198 self.trUtf8( 200 self.trUtf8(
199 """<p>Do you really want to delete the feed""" 201 """<p>Do you really want to delete the feed"""
200 """ <b>{0}</b>?</p>""".format(title))) 202 """ <b>{0}</b>?</p>""".format(title)))
201 if res: 203 if res:
420 if itm is None: 422 if itm is None:
421 return 423 return
422 424
423 errorStr = itm.data(0, FeedsManager.ErrorDataRole) 425 errorStr = itm.data(0, FeedsManager.ErrorDataRole)
424 if errorStr: 426 if errorStr:
425 E5MessageBox.critical(self, 427 E5MessageBox.critical(
428 self,
426 self.trUtf8("Error loading feed"), 429 self.trUtf8("Error loading feed"),
427 "{0}".format(errorStr)) 430 "{0}".format(errorStr))

eric ide

mercurial