7 Module implementing a dialog to manage the flash cookies. |
7 Module implementing a dialog to manage the flash cookies. |
8 """ |
8 """ |
9 |
9 |
10 |
10 |
11 from PyQt5.QtCore import pyqtSlot, Qt, QPoint, QTimer |
11 from PyQt5.QtCore import pyqtSlot, Qt, QPoint, QTimer |
12 from PyQt5.QtWidgets import QDialog, QTreeWidgetItem, QApplication, QMenu, \ |
12 from PyQt5.QtWidgets import ( |
13 QInputDialog, QLineEdit |
13 QDialog, QTreeWidgetItem, QApplication, QMenu, QInputDialog, QLineEdit |
|
14 ) |
14 |
15 |
15 from E5Gui import E5MessageBox |
16 from E5Gui import E5MessageBox |
16 |
17 |
17 from .Ui_FlashCookieManagerDialog import Ui_FlashCookieManagerDialog |
18 from .Ui_FlashCookieManagerDialog import Ui_FlashCookieManagerDialog |
18 |
19 |
162 self.cookiesList.topLevelItem(index).setExpanded(False) |
163 self.cookiesList.topLevelItem(index).setExpanded(False) |
163 else: |
164 else: |
164 # show matching in expanded state |
165 # show matching in expanded state |
165 filterStr = filterStr.lower() |
166 filterStr = filterStr.lower() |
166 for index in range(self.cookiesList.topLevelItemCount()): |
167 for index in range(self.cookiesList.topLevelItemCount()): |
167 txt = "." + self.cookiesList.topLevelItem(index)\ |
168 txt = ( |
168 .text(0).lower() |
169 "." + |
|
170 self.cookiesList.topLevelItem(index).text(0).lower() |
|
171 ) |
169 self.cookiesList.topLevelItem(index).setHidden( |
172 self.cookiesList.topLevelItem(index).setHidden( |
170 filterStr not in txt) |
173 filterStr not in txt) |
171 self.cookiesList.topLevelItem(index).setExpanded(True) |
174 self.cookiesList.topLevelItem(index).setExpanded(True) |
172 |
175 |
173 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) |
176 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) |
360 if cookie.path.startswith( |
363 if cookie.path.startswith( |
361 self.__manager.flashPlayerDataPath() + |
364 self.__manager.flashPlayerDataPath() + |
362 "/macromedia.com/support/flashplayer/sys"): |
365 "/macromedia.com/support/flashplayer/sys"): |
363 suffix = self.tr(" (settings)") |
366 suffix = self.tr(" (settings)") |
364 |
367 |
365 if cookie.path + "/" + cookie.name in \ |
368 if cookie.path + "/" + cookie.name in ( |
366 self.__manager.newCookiesList(): |
369 self.__manager.newCookiesList() |
|
370 ): |
367 suffix += self.tr(" [new]") |
371 suffix += self.tr(" [new]") |
368 font = itm.font(0) |
372 font = itm.font(0) |
369 font.setBold(True) |
373 font.setBold(True) |
370 itm.setFont(font) |
374 itm.setFont(font) |
371 itm.parent().setExpanded(True) |
375 itm.parent().setExpanded(True) |