|
1 | 1 | import re |
2 | 2 | from functools import partial |
3 | | -from pathlib import PurePath, Path, PureWindowsPath |
| 3 | +from pathlib import PurePath, Path |
4 | 4 | from typing import TYPE_CHECKING |
5 | 5 | import wx |
6 | 6 | import wx.lib.colourselect as csel |
@@ -100,21 +100,17 @@ def CreatePage(self, page): |
100 | 100 |
|
101 | 101 | ##### |
102 | 102 | # Convenience / JIT accessors |
103 | | - def ProfileName(self) : return self.Data.Filepath.stem if self.Data.Filepath else '' |
| 103 | + def ProfileName(self) : return self.Data.ProfileName() |
104 | 104 | def Archetype(self) : return self.Data['General']['Archetype'] |
105 | 105 | def Primary(self) : return self.Data['General']['Primary'] |
106 | 106 | def Secondary(self) : return self.Data['General']['Secondary'] |
107 | 107 | def ResetFile(self) : return self.GetBindFile("reset.txt") |
108 | | - def ProfileIDFile(self) : return self.BindsDir() / 'bcprofileid.txt' |
| 108 | + def ProfileIDFile(self) : return self.Data.ProfileIDFile() |
109 | 109 | def Server(self) : return self.Data['General']['Server'] |
110 | 110 | def Filepath(self) : return self.Data.Filepath |
111 | 111 | def ProfileBindsDir(self) : return self.Data['ProfileBindsDir'] |
112 | | - def BindsDir(self) : return Path(wx.ConfigBase.Get().Read('BindPath')) / self.Data['ProfileBindsDir'] |
113 | | - def GameBindsDir(self) : |
114 | | - if gbp := wx.ConfigBase.Get().Read('GameBindPath'): |
115 | | - return PureWindowsPath(gbp) / self.Data['ProfileBindsDir'] |
116 | | - else: |
117 | | - return self.BindsDir() |
| 112 | + def BindsDir(self) : return self.Data.BindsDir() |
| 113 | + def GameBindsDir(self) : return self.Data.GameBindsDir() |
118 | 114 |
|
119 | 115 | def HasPowerPool(self, poolname): |
120 | 116 | for picker in ['Pool1', 'Pool2', 'Pool3', 'Pool4']: |
|
0 commit comments