10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QXmlStreamReader |
10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QXmlStreamReader |
11 from PyQt6.QtGui import QCursor |
11 from PyQt6.QtGui import QCursor |
12 from PyQt6.QtWidgets import QDialog, QTreeWidgetItem, QMenu, QApplication |
12 from PyQt6.QtWidgets import QDialog, QTreeWidgetItem, QMenu, QApplication |
13 from PyQt6.QtNetwork import QNetworkRequest, QNetworkReply |
13 from PyQt6.QtNetwork import QNetworkRequest, QNetworkReply |
14 |
14 |
15 from E5Gui import E5MessageBox |
15 from E5Gui import EricMessageBox |
16 |
16 |
17 from .Ui_FeedsManager import Ui_FeedsManager |
17 from .Ui_FeedsManager import Ui_FeedsManager |
18 |
18 |
19 import Preferences |
19 import Preferences |
20 import UI.PixmapCache |
20 import UI.PixmapCache |
177 dlg = FeedEditDialog(origUrlString, origTitle) |
177 dlg = FeedEditDialog(origUrlString, origTitle) |
178 if dlg.exec() == QDialog.DialogCode.Accepted: |
178 if dlg.exec() == QDialog.DialogCode.Accepted: |
179 urlString, title = dlg.getData() |
179 urlString, title = dlg.getData() |
180 for feed in self.__feeds: |
180 for feed in self.__feeds: |
181 if feed[0] == urlString: |
181 if feed[0] == urlString: |
182 E5MessageBox.critical( |
182 EricMessageBox.critical( |
183 self, |
183 self, |
184 self.tr("Duplicate Feed URL"), |
184 self.tr("Duplicate Feed URL"), |
185 self.tr( |
185 self.tr( |
186 """A feed with the URL {0} exists already.""" |
186 """A feed with the URL {0} exists already.""" |
187 """ Aborting...""".format(urlString))) |
187 """ Aborting...""".format(urlString))) |
199 """ |
199 """ |
200 Private slot to delete the selected feed. |
200 Private slot to delete the selected feed. |
201 """ |
201 """ |
202 itm = self.feedsTree.selectedItems()[0] |
202 itm = self.feedsTree.selectedItems()[0] |
203 title = itm.text(0) |
203 title = itm.text(0) |
204 res = E5MessageBox.yesNo( |
204 res = EricMessageBox.yesNo( |
205 self, |
205 self, |
206 self.tr("Delete Feed"), |
206 self.tr("Delete Feed"), |
207 self.tr( |
207 self.tr( |
208 """<p>Do you really want to delete the feed""" |
208 """<p>Do you really want to delete the feed""" |
209 """ <b>{0}</b>?</p>""".format(title))) |
209 """ <b>{0}</b>?</p>""".format(title))) |