Skip to content

Commit

Permalink
Remove all fake dialogs & preredraw magic
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Aug 3, 2021
1 parent fe709b2 commit 2cce55d
Show file tree
Hide file tree
Showing 19 changed files with 261 additions and 507 deletions.
5 changes: 0 additions & 5 deletions far/REMINDER
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ SetConsoleTitle & Macro

svs 26.01.2007 16:02:00 +0300

TPreRedrawFunc
2SVS: "надо бы описать сей чудный механизм автоматической отрисовки" :)

drkns 28.11.2008 18:34:19 +0200

copy.cpp
При вызовах apiGetDiskSize использовать не Root, а Dest (если Dest существует)
drkns 20.04.2009 14:07:34 +0200
Expand Down
123 changes: 0 additions & 123 deletions far/TPreRedrawFunc.hpp

This file was deleted.

5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
drkns 03.08.2021 02:04:01 +0100 - build 5866

1. Remove all fake dialogs & preredraw magic.

--------------------------------------------------------------------------------
drkns 02.08.2021 21:01:36 +0100 - build 5865

Expand Down
8 changes: 4 additions & 4 deletions far/configdb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ class GeneralConfig : public representable, virtual public transactional
auto ValuesEnumerator(lvalue_string_view const Key) const
{
using value_type = std::pair<string, T>;
return make_inline_enumerator<value_type>([=, this](const bool Reset, value_type& Value)
return make_inline_enumerator<value_type>([=, Self = this](const bool Reset, value_type& Value)
{
return EnumValues(Key, Reset, Value.first, Value.second);
return Self->EnumValues(Key, Reset, Value.first, Value.second);
},
[this]
{
Expand Down Expand Up @@ -452,9 +452,9 @@ class HistoryConfig: public representable, virtual public transactional
auto Enumerator(unsigned int const HistoryType, lvalue_string_view const HistoryName, lvalue_string_view const ItemName = {}, bool const Reverse = false)
{
using value_type = enum_data;
return make_inline_enumerator<value_type>([=, this](const bool Reset, value_type& Value)
return make_inline_enumerator<value_type>([=, Self = this](const bool Reset, value_type& Value)
{
return Enum(Reset, HistoryType, HistoryName, ItemName, Value.Id, Value.Name, Value.Type, Value.Lock, Value.Time, Value.Uuid, Value.File, Value.Data, Reverse);
return Self->Enum(Reset, HistoryType, HistoryName, ItemName, Value.Id, Value.Name, Value.Type, Value.Lock, Value.Time, Value.Uuid, Value.File, Value.Data, Reverse);
},
[this, Reverse]
{
Expand Down
16 changes: 1 addition & 15 deletions far/copy_progress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,8 @@ copy_progress::copy_progress(bool Move, bool Total, bool Time):
ProgressDlgItems[progress_items::pr_doublebox].Y2 -= 2;
}

m_Dialog = Dialog::create(ProgressDlgItems, [](Dialog* const Dlg, intptr_t const Msg, intptr_t const Param1, void* const Param2)
{
if (Msg == DN_RESIZECONSOLE)
{
COORD Position{ -1, -1 };
Dlg->SendMessage(DM_MOVEDIALOG, 1, &Position);
}

return Dlg->DefProc(Msg, Param1, Param2);
});

const int DialogHeight = ProgressDlgItems[progress_items::pr_doublebox].Y2 - ProgressDlgItems[progress_items::pr_doublebox].Y1 + 1 + 2;
m_Dialog->SetPosition({ -1, -1, DlgW, DialogHeight });
m_Dialog->SetCanLoseFocus(true);
m_Dialog->Process();

init(ProgressDlgItems, { -1, -1, DlgW, DialogHeight });
}

size_t copy_progress::CanvasWidth()
Expand Down
2 changes: 0 additions & 2 deletions far/copy_progress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ class copy_progress: progress_impl
unsigned long long Total{};
}
m_BytesCurrent, m_BytesTotal;

dialog_ptr m_Dialog;
};

#endif // COPY_PROGRESS_HPP_3D1EAAD8_8353_459C_8826_33AAAE06D01F
Loading

0 comments on commit 2cce55d

Please sign in to comment.