Skip to content

Commit

Permalink
"Users file of schemes" may contain path to folder of hrc files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctapmex committed Oct 22, 2021
1 parent c6f2c8f commit 8eabc8a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
3 changes: 3 additions & 0 deletions docs/history.ru.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
 История изменений FarColorer.
Информацию, об изменениях в библиотеке схем (базах) смотрите в файле base\CHANGELOG.md

Версия 1.4.12 . 22.10.2021
1. Параметр "Файл списка схем пользователя" может содержать не только путь до файла, но и путь до папки с hrc файлами. Аналог папки auto в схемах.

Версия 1.4.11 . 17.10.2021
1. Исправлена ошибка включения плагина, если до этого он был выключен.
2. В поставку включены полностью упакованные в архив схемы
Expand Down
2 changes: 1 addition & 1 deletion misc/colorere.hlf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $# FarColorer's settings
Full file path sets default catalog file for FarColorer. If this field is empty FarColorer trying to find the file automatically in a subfolder of "base" parent directory plugin.

#Users file of schemes#
Full file path sets the users file of schemes.
Full file path in this field specifies a file analogous to proto.hrc, or a directory with files containing with user schemes. If a directory is specified, only * .hrc files are processed.

#Users file of color styles#
Full file path sets the users file of color styles.
Expand Down
2 changes: 1 addition & 1 deletion misc/colorerr.hlf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $# Настройки плагина.
Полный путь в этом поле задает базовый файл настроек catalog.xml. При обычной установке плагина FarColorer ищет этот файл в подпапке base папки плагина.

#Файл списка схем пользователя#
Полный путь в этом поле задает файл со списком пользовательских схем.
Полный путь в этом поле задает файл аналог proto.hrc, или директорию с файлами, содержащими пользовательскиe схемы. В случае указания директории обрабатываются только *.hrc файлы.

#Файл цветовых стилей пользователя#
Полный путь в этом поле задает файл со списком цветовых стилей.
Expand Down
16 changes: 5 additions & 11 deletions src/FarEditorSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ INT_PTR WINAPI SettingDialogProc(HANDLE hDlg, intptr_t Msg, intptr_t Param1, voi

bool FarEditorSet::configure()
{
//TODO refactor this
// TODO refactor this
try {
PluginDialogBuilder Builder(Info, MainGuid, PluginConfig, mSetup, L"config", SettingDialogProc, this);
Builder.AddCheckbox(mTurnOff, &Opt.rEnabled);
Expand Down Expand Up @@ -446,7 +446,7 @@ bool FarEditorSet::configure()
}
else {
cons = std::make_unique<HRDNode>();
cons->hrd_name= UnicodeString (Opt.HrdName);
cons->hrd_name = UnicodeString(Opt.HrdName);
hrd_con_instances.push_back(cons.get());
console_style.push_back(Opt.HrdName);
current_style = 0;
Expand All @@ -467,7 +467,7 @@ bool FarEditorSet::configure()
}
else {
rgb = std::make_unique<HRDNode>();
rgb->hrd_name= UnicodeString (Opt.HrdName);
rgb->hrd_name = UnicodeString(Opt.HrdName);
hrd_rgb_instances.push_back(rgb.get());
rgb_style.push_back(Opt.HrdNameTm);
current_rstyle = 0;
Expand Down Expand Up @@ -1066,14 +1066,8 @@ void FarEditorSet::LoadUserHrd(const UnicodeString* filename, ParserFactory* pf)

void FarEditorSet::LoadUserHrc(const UnicodeString* filename, ParserFactory* pf)
{
if (filename && filename->length()) {
HRCParser* hr = pf->getHRCParser();
uXmlInputSource dfis = XmlInputSource::newInstance(filename);
try {
hr->loadSource(dfis.get());
} catch (Exception& e) {
throw Exception(e);
}
if (filename && !filename->isEmpty()) {
pf->loadHrcPath(*filename);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define PLUGIN_VER_MAJOR 1
#define PLUGIN_VER_MINOR 4
#define PLUGIN_VER_PATCH 11
#define PLUGIN_VER_PATCH 12
#define PLUGIN_DESC L"FarColorer - Syntax Highlighting for Far Manager 3" PLATFORM
#define PLUGIN_NAME L"FarColorer"
#define PLUGIN_FILENAME L"colorer.dll"
Expand Down

0 comments on commit 8eabc8a

Please sign in to comment.