12 from PyQt6.QtCore import QUrl |
12 from PyQt6.QtCore import QUrl |
13 from PyQt6.QtWidgets import QDialog, QLabel, QPushButton |
13 from PyQt6.QtWidgets import QDialog, QLabel, QPushButton |
14 |
14 |
15 from eric7.EricGui import EricPixmapCache |
15 from eric7.EricGui import EricPixmapCache |
16 from eric7.UI.NotificationWidget import NotificationTypes |
16 from eric7.UI.NotificationWidget import NotificationTypes |
|
17 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
17 |
18 |
18 from .Ui_FeedsDialog import Ui_FeedsDialog |
19 from .Ui_FeedsDialog import Ui_FeedsDialog |
19 |
20 |
20 |
21 |
21 class FeedsDialog(QDialog, Ui_FeedsDialog): |
22 class FeedsDialog(QDialog, Ui_FeedsDialog): |
70 if not url.isValid(): |
71 if not url.isValid(): |
71 return |
72 return |
72 |
73 |
73 title = button.feed[0] if button.feed[0] else self.__browser.url().host() |
74 title = button.feed[0] if button.feed[0] else self.__browser.url().host() |
74 |
75 |
75 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
|
76 |
|
77 feedsManager = WebBrowserWindow.feedsManager() |
76 feedsManager = WebBrowserWindow.feedsManager() |
78 if feedsManager.addFeed(urlString, title, self.__browser.icon()): |
77 if feedsManager.addFeed(urlString, title, self.__browser.icon()): |
79 WebBrowserWindow.showNotification( |
78 WebBrowserWindow.showNotification( |
80 EricPixmapCache.getPixmap("rss48"), |
79 EricPixmapCache.getPixmap("rss48"), |
81 self.tr("Add RSS Feed"), |
80 self.tr("Add RSS Feed"), |