Preferences/ConfigurationPages/HelpFlashCookieManagerPage.py

changeset 4576
a258569d44db
parent 4543
2e6a880670e9
child 4582
3a1d1d4c6f4f
--- a/Preferences/ConfigurationPages/HelpFlashCookieManagerPage.py	Wed Nov 25 19:01:45 2015 +0100
+++ b/Preferences/ConfigurationPages/HelpFlashCookieManagerPage.py	Thu Nov 26 19:47:09 2015 +0100
@@ -9,17 +9,12 @@
 
 from __future__ import unicode_literals
 
-from PyQt5.QtCore import pyqtSlot
-
-from E5Gui.E5Completers import E5DirCompleter
-from E5Gui import E5FileDialog
+from E5Gui.E5PathPicker import E5PathPickerModes
 
 from .ConfigurationPageBase import ConfigurationPageBase
 from .Ui_HelpFlashCookieManagerPage import Ui_HelpFlashCookieManagerPage
 
 import Preferences
-import Utilities
-import UI.PixmapCache
 
 
 class HelpFlashCookieManagerPage(ConfigurationPageBase,
@@ -35,12 +30,10 @@
         self.setupUi(self)
         self.setObjectName("HelpFlashCookieManagerPage")
         
-        self.flashDataPathButton.setIcon(UI.PixmapCache.getIcon("open.png"))
-        
-        self.flashDataPathCompleter = E5DirCompleter(self.flashDataPathEdit)
+        self.flashDataPathPicker.setMode(E5PathPickerModes.DiretoryMode)
         
         # set initial values
-        self.flashDataPathEdit.setText(
+        self.flashDataPathPicker.setText(
             Preferences.getHelp("FlashCookiesDataPath"))
         self.autoModeGroup.setChecked(
             Preferences.getHelp("FlashCookieAutoRefresh"))
@@ -54,7 +47,7 @@
         Public slot to save the Flash Cookies Manager configuration.
         """
         Preferences.setHelp("FlashCookiesDataPath",
-                            self.flashDataPathEdit.text())
+                            self.flashDataPathPicker.text())
         Preferences.setHelp("FlashCookieAutoRefresh",
                             self.autoModeGroup.isChecked())
         Preferences.setHelp("FlashCookieNotify",
@@ -62,20 +55,6 @@
         Preferences.setHelp("FlashCookiesDeleteOnStartExit",
                             self.deleteGroup.isChecked())
     
-    @pyqtSlot()
-    def on_flashDataPathButton_clicked(self):
-        """
-        Private slot to handle the flash data path selection.
-        """
-        path = E5FileDialog.getExistingDirectory(
-            self,
-            self.tr("Select Flash Cookies Data Path"),
-            self.flashDataPathEdit.text(),
-            E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
-        
-        if path:
-            self.flashDataPathEdit.setText(Utilities.toNativeSeparators(path))
-    
 
 def create(dlg):
     """

eric ide

mercurial