diff --git a/far/changelog b/far/changelog index fea38e06f4..cc89d34f72 100644 --- a/far/changelog +++ b/far/changelog @@ -1,3 +1,12 @@ +-------------------------------------------------------------------------------- +drkns 16.08.2021 17:34:55 +0100 - build 5876 + +1. Forum: some visual distinction for the "Inherit" flag in the Color dialog & hotkeys. + +2. Minor executor correction. + +3. Stop looking for GetColorDialog in extendedconsole.dll. + -------------------------------------------------------------------------------- drkns 12.08.2021 00:11:15 +0100 - build 5875 diff --git a/far/console.cpp b/far/console.cpp index aaedb6795c..b58d584c1a 100644 --- a/far/console.cpp +++ b/far/console.cpp @@ -265,7 +265,6 @@ namespace console_detail DECLARE_IMPORT_FUNCTION(GetTextAttributes, BOOL(WINAPI*)(FarColor* Attributes)); DECLARE_IMPORT_FUNCTION(SetTextAttributes, BOOL(WINAPI*)(const FarColor* Attributes)); DECLARE_IMPORT_FUNCTION(ClearExtraRegions, BOOL(WINAPI*)(const FarColor* Color, int Mode)); - DECLARE_IMPORT_FUNCTION(GetColorDialog, BOOL(WINAPI*)(FarColor* Color, BOOL Centered, BOOL AddTransparent)); #undef DECLARE_IMPORT_FUNCTION } @@ -1564,14 +1563,6 @@ namespace console_detail SetCursorPosition({ 0, static_cast(WindowRect.height() - 1) }); } - bool console::GetColorDialog(FarColor& Color, bool const Centered, const FarColor* const BaseColor) const - { - if (ExternalConsole.Imports.pGetColorDialog) - return ExternalConsole.Imports.pGetColorDialog(&Color, Centered, BaseColor != nullptr) != FALSE; - - return GetColorDialogInternal(Color, Centered, BaseColor); - } - short console::GetDelta() const { CONSOLE_SCREEN_BUFFER_INFO csbi; diff --git a/far/console.hpp b/far/console.hpp index 15deab6000..cf946fe474 100644 --- a/far/console.hpp +++ b/far/console.hpp @@ -164,8 +164,6 @@ namespace console_detail bool ResetPosition() const; bool ResetViewportPosition() const; - bool GetColorDialog(FarColor& Color, bool Centered = false, const FarColor* BaseColor = nullptr) const; - bool ScrollNonClientArea(size_t NumLines, const FAR_CHAR_INFO& Fill) const; bool IsViewportVisible() const; diff --git a/far/filefilterparams.cpp b/far/filefilterparams.cpp index 5dc6bf6c9c..971117b213 100644 --- a/far/filefilterparams.cpp +++ b/far/filefilterparams.cpp @@ -47,7 +47,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "interf.hpp" #include "datetime.hpp" #include "strmix.hpp" -#include "console.hpp" +#include "setcolor.hpp" #include "flink.hpp" #include "lang.hpp" #include "locale.hpp" @@ -788,7 +788,7 @@ static intptr_t FileFilterConfigDlgProc(Dialog* Dlg,intptr_t Msg,intptr_t Param1 static const PaletteColors BaseIndices[]{ COL_PANELTEXT, COL_PANELSELECTEDTEXT, COL_PANELCURSOR, COL_PANELSELECTEDCURSOR }; const auto BaseColor = colors::PaletteColorToFarColor(BaseIndices[(Param1 - ID_HER_NORMALFILE) / 2]); - if (console.GetColorDialog(((Param1-ID_HER_NORMALFILE)&1)? Context->Colors->Color[(Param1-ID_HER_NORMALFILE)/2].MarkColor : Context->Colors->Color[(Param1-ID_HER_NORMALFILE)/2].FileColor, true, &BaseColor)) + if (GetColorDialog(((Param1-ID_HER_NORMALFILE)&1)? Context->Colors->Color[(Param1-ID_HER_NORMALFILE)/2].MarkColor : Context->Colors->Color[(Param1-ID_HER_NORMALFILE)/2].FileColor, true, &BaseColor)) Dlg->SendMessage(DM_REFRESHCOLORS, 0, nullptr); } diff --git a/far/plugapi.cpp b/far/plugapi.cpp index bbf944a2cf..fdb5ac14d3 100644 --- a/far/plugapi.cpp +++ b/far/plugapi.cpp @@ -89,6 +89,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "global.hpp" #include "lockscrn.hpp" #include "exception_handler.hpp" +#include "setcolor.hpp" // Platform: #include "platform.fs.hpp" @@ -3085,7 +3086,7 @@ BOOL WINAPI apiColorDialog(const UUID* PluginId, COLORDIALOGFLAGS Flags, FarColo return cpp_try( [&] { - return !Global->WindowManager->ManagerIsDown() && console.GetColorDialog(*Color, true); + return !Global->WindowManager->ManagerIsDown() && GetColorDialog(*Color, true); }, [] { diff --git a/far/setcolor.cpp b/far/setcolor.cpp index 8cbf5d7589..4f05db7b26 100644 --- a/far/setcolor.cpp +++ b/far/setcolor.cpp @@ -75,7 +75,7 @@ static void ChangeColor(PaletteColors PaletteIndex, PaletteColors const* const B auto NewColor = Global->Opt->Palette[PaletteIndex]; const auto BottomColor = BottomPaletteIndex? &Global->Opt->Palette[*BottomPaletteIndex] : nullptr; - if (!console.GetColorDialog(NewColor, false, BottomColor)) + if (!GetColorDialog(NewColor, false, BottomColor)) return; Global->Opt->Palette.Set(PaletteIndex, { &NewColor, 1 }); @@ -768,7 +768,7 @@ static intptr_t GetColorDlgProc(Dialog* Dlg, intptr_t Msg, intptr_t Param1, void return Dlg->DefProc(Msg, Param1, Param2); } -bool GetColorDialogInternal(FarColor& Color, bool const bCentered, const FarColor* const BaseColor) +bool GetColorDialog(FarColor& Color, bool const bCentered, const FarColor* const BaseColor) { auto ColorDlg = MakeDialogItems( { diff --git a/far/setcolor.hpp b/far/setcolor.hpp index e580b879d4..f7dcd30a81 100644 --- a/far/setcolor.hpp +++ b/far/setcolor.hpp @@ -48,6 +48,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. struct FarColor; void SetColors(); -bool GetColorDialogInternal(FarColor& Color, bool bCentered, const FarColor* BaseColor); +bool GetColorDialog(FarColor& Color, bool bCentered, const FarColor* BaseColor = {}); #endif // SETCOLOR_HPP_6E3A8440_946E_46AA_AAE1_372CAD23A7E6 diff --git a/far/vbuild.m4 b/far/vbuild.m4 index 1c3de1ed95..a6d3bf90fe 100644 --- a/far/vbuild.m4 +++ b/far/vbuild.m4 @@ -1 +1 @@ -5875 +5876