11 from PyQt6.QtCore import pyqtSlot |
11 from PyQt6.QtCore import pyqtSlot |
12 from PyQt6.QtWidgets import QDialog |
12 from PyQt6.QtWidgets import QDialog |
13 |
13 |
14 from .Ui_BookmarkActionSelectionDialog import Ui_BookmarkActionSelectionDialog |
14 from .Ui_BookmarkActionSelectionDialog import Ui_BookmarkActionSelectionDialog |
15 |
15 |
16 import UI.PixmapCache |
16 from eric7.EricGui import EricPixmapCache |
17 |
17 |
18 |
18 |
19 class BookmarkActionSelectionDialog(QDialog, Ui_BookmarkActionSelectionDialog): |
19 class BookmarkActionSelectionDialog(QDialog, Ui_BookmarkActionSelectionDialog): |
20 """ |
20 """ |
21 Class implementing a dialog to select the action to be performed on |
21 Class implementing a dialog to select the action to be performed on |
38 super().__init__(parent) |
38 super().__init__(parent) |
39 self.setupUi(self) |
39 self.setupUi(self) |
40 |
40 |
41 self.__action = self.Undefined |
41 self.__action = self.Undefined |
42 |
42 |
43 self.icon.setPixmap(UI.PixmapCache.getPixmap("bookmark32")) |
43 self.icon.setPixmap(EricPixmapCache.getPixmap("bookmark32")) |
44 |
44 |
45 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
45 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
46 |
46 |
47 if WebBrowserWindow.bookmarksManager().bookmarkForUrl(url) is None: |
47 if WebBrowserWindow.bookmarksManager().bookmarkForUrl(url) is None: |
48 self.__bmAction = self.AddBookmark |
48 self.__bmAction = self.AddBookmark |
49 self.bookmarkPushButton.setText(self.tr("Add Bookmark")) |
49 self.bookmarkPushButton.setText(self.tr("Add Bookmark")) |
50 else: |
50 else: |