| 140 | } |
| 141 | |
| 142 | void PropColorSchemes::OnSaveCurrentScheme() |
| 143 | { |
| 144 | const String dir = ColorSchemes::GetPrivateColorSchemesFolder(GetOptionsMgr()->GetInt(OPT_USERDATA_LOCATION) != 0); |
| 145 | paths::CreateIfNeeded(dir); |
| 146 | String path; |
| 147 | if (!SelectFile(GetSafeHwnd(), path, false, |
| 148 | dir.c_str(), _("Select file for export"), |
| 149 | _("Options files (*.ini)|*.ini|All Files (*.*)|*.*||"), _T("ini"))) |
| 150 | return; |
| 151 | CIniOptionsMgr optionsMgr(path); |
| 152 | COLORSETTINGS diffColors; |
| 153 | DIRCOLORSETTINGS dirColors; |
| 154 | COLORREF customColors[16]; |
| 155 | SyntaxColors syntaxColors; |
| 156 | Options::CustomColors::Init(&optionsMgr); |
| 157 | Options::CustomColors::Load(GetOptionsMgr(), customColors); |
| 158 | Options::CustomColors::Save(&optionsMgr, customColors); |
| 159 | Options::DiffColors::Init(&optionsMgr); |
| 160 | Options::DiffColors::Load(GetOptionsMgr(), diffColors); |
| 161 | Options::DiffColors::Save(&optionsMgr, diffColors); |
| 162 | Options::DirColors::Init(&optionsMgr); |
| 163 | Options::DirColors::Load(GetOptionsMgr(), dirColors); |
| 164 | Options::DirColors::Save(&optionsMgr, dirColors); |
| 165 | Options::SyntaxColors::Init(&optionsMgr, &syntaxColors); |
| 166 | Options::SyntaxColors::Load(GetOptionsMgr(), &syntaxColors); |
| 167 | Options::SyntaxColors::Save(&optionsMgr, &syntaxColors); |
| 168 | optionsMgr.InitOption(OPT_SYSCOLOR_HOOK_ENABLED, false); |
| 169 | optionsMgr.SaveOption(OPT_SYSCOLOR_HOOK_ENABLED, GetOptionsMgr()->GetBool(OPT_SYSCOLOR_HOOK_ENABLED)); |
| 170 | optionsMgr.InitOption(OPT_SYSCOLOR_HOOK_COLORS, _T("")); |
| 171 | optionsMgr.SaveOption(OPT_SYSCOLOR_HOOK_COLORS, GetOptionsMgr()->GetString(OPT_SYSCOLOR_HOOK_COLORS)); |
| 172 | |
| 173 | ReloadColorSchemes(); |
| 174 | UpdateData(FALSE); |
| 175 | } |
| 176 | |
| 177 | void PropColorSchemes::OnDeleteCurrentScheme() |
| 178 | { |
nothing calls this directly
no test coverage detected