eric6/Preferences/ConfigurationPages/HelpFlashCookieManagerPage.py

changeset 6942
2602857055c5
parent 6645
ad476851d7e0
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2015 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the Flash Cookies Manager configuration page.
8 """
9
10 from __future__ import unicode_literals
11
12 from E5Gui.E5PathPicker import E5PathPickerModes
13
14 from .ConfigurationPageBase import ConfigurationPageBase
15 from .Ui_HelpFlashCookieManagerPage import Ui_HelpFlashCookieManagerPage
16
17 import Preferences
18
19
20 class HelpFlashCookieManagerPage(ConfigurationPageBase,
21 Ui_HelpFlashCookieManagerPage):
22 """
23 Class implementing the Flash Cookies Manager configuration page.
24 """
25 def __init__(self):
26 """
27 Constructor
28 """
29 super(HelpFlashCookieManagerPage, self).__init__()
30 self.setupUi(self)
31 self.setObjectName("HelpFlashCookieManagerPage")
32
33 self.flashDataPathPicker.setMode(E5PathPickerModes.DirectoryMode)
34
35 # set initial values
36 self.flashDataPathPicker.setText(
37 Preferences.getHelp("FlashCookiesDataPath"))
38 self.autoModeGroup.setChecked(
39 Preferences.getHelp("FlashCookieAutoRefresh"))
40 self.notificationGroup.setChecked(
41 Preferences.getHelp("FlashCookieNotify"))
42 self.deleteGroup.setChecked(
43 Preferences.getHelp("FlashCookiesDeleteOnStartExit"))
44
45 def save(self):
46 """
47 Public slot to save the Flash Cookies Manager configuration.
48 """
49 Preferences.setHelp("FlashCookiesDataPath",
50 self.flashDataPathPicker.text())
51 Preferences.setHelp("FlashCookieAutoRefresh",
52 self.autoModeGroup.isChecked())
53 Preferences.setHelp("FlashCookieNotify",
54 self.notificationGroup.isChecked())
55 Preferences.setHelp("FlashCookiesDeleteOnStartExit",
56 self.deleteGroup.isChecked())
57
58
59 def create(dlg):
60 """
61 Module function to create the configuration page.
62
63 @param dlg reference to the configuration dialog
64 @return reference to the instantiated page (ConfigurationPageBase)
65 """
66 page = HelpFlashCookieManagerPage()
67 return page

eric ide

mercurial