11 import os |
11 import os |
12 import re |
12 import re |
13 |
13 |
14 from PyQt6.QtCore import QObject |
14 from PyQt6.QtCore import QObject |
15 |
15 |
16 from eric7 import Globals, Preferences |
16 from eric7 import EricUtilities, Preferences |
17 from eric7.EricWidgets import EricFileDialog, EricMessageBox |
17 from eric7.EricWidgets import EricFileDialog, EricMessageBox |
18 from eric7.Globals import getConfig |
18 from eric7.Globals import getConfig |
19 |
19 |
20 |
20 |
21 class ThemeManager(QObject): |
21 class ThemeManager(QObject): |
84 return False |
84 return False |
85 |
85 |
86 # step 1: process stylesheet data |
86 # step 1: process stylesheet data |
87 stylesheetDict = themeDict["stylesheet"] |
87 stylesheetDict = themeDict["stylesheet"] |
88 if stylesheetDict["name"]: |
88 if stylesheetDict["name"]: |
89 stylesheetsDir = os.path.join(Globals.getConfigDir(), "stylesheets") |
89 stylesheetsDir = os.path.join( |
|
90 EricUtilities.getConfigDir(), "stylesheets" |
|
91 ) |
90 if not os.path.exists(stylesheetsDir): |
92 if not os.path.exists(stylesheetsDir): |
91 os.makedirs(stylesheetsDir) |
93 os.makedirs(stylesheetsDir) |
92 stylesheetFile = os.path.join(stylesheetsDir, stylesheetDict["name"]) |
94 stylesheetFile = os.path.join(stylesheetsDir, stylesheetDict["name"]) |
93 ok = ( |
95 ok = ( |
94 EricMessageBox.yesNo( |
96 EricMessageBox.yesNo( |