Skip to content

Commit

Permalink
1. убран неиспользуемый код.
Browse files Browse the repository at this point in the history
  • Loading branch information
zg0 committed Apr 26, 2016
1 parent 6bcaa88 commit da6afd9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 82 deletions.
6 changes: 5 additions & 1 deletion far/changelog
@@ -1,4 +1,8 @@
zg 25.04.2016 23:43:02 +0200 - build 4638
zg 26.04.2016 03:41:23 +0200 - build 4639

1. убран неиспользуемый код.

zg 25.04.2016 23:43:02 +0200 - build 4638

1. при открытом комбобоксе не работал граббер.

Expand Down
54 changes: 1 addition & 53 deletions far/modal.cpp
Expand Up @@ -41,11 +41,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "lockscrn.hpp"
#include "keyboard.hpp"

SimpleModal::SimpleModal():
m_ReadRec(INPUT_RECORD()),
m_EndLoop(false),
m_ReadKey(-1),
m_WriteKey(-1)
SimpleModal::SimpleModal(): m_EndLoop(false)
{
}

Expand All @@ -56,54 +52,6 @@ void SimpleModal::Process()
Global->WindowManager->ExecuteModal(shared_from_this());
}

int SimpleModal::ReadInput(INPUT_RECORD *GetReadRec)
{
if (GetReadRec)
ClearStruct(*GetReadRec);

if (m_WriteKey>=0)
{
m_ReadKey=m_WriteKey;
m_WriteKey=-1;
}
else
{
m_ReadKey=GetInputRecord(&m_ReadRec);

if (GetReadRec)
{
*GetReadRec=m_ReadRec;
}
}

if (m_ReadKey == KEY_CONSOLE_BUFFER_RESIZE)
{
SCOPED_ACTION(LockScreen);
Hide();
Show();
}

if (Global->CloseFARMenu)
{
SetExitCode(-1);
}

return m_ReadKey;
}

void SimpleModal::WriteInput(int Key)
{
m_WriteKey=Key;
}

void SimpleModal::ProcessInput()
{
if (m_ReadRec.EventType==MOUSE_EVENT && !(m_ReadKey==KEY_MSWHEEL_UP || m_ReadKey==KEY_MSWHEEL_DOWN || m_ReadKey==KEY_MSWHEEL_RIGHT || m_ReadKey==KEY_MSWHEEL_LEFT))
ProcessMouse(&m_ReadRec.Event.MouseEvent);
else
ProcessKey(Manager::Key(m_ReadKey));
}

bool SimpleModal::Done() const
{
return m_EndLoop;
Expand Down
6 changes: 0 additions & 6 deletions far/modal.hpp
Expand Up @@ -49,14 +49,11 @@ class Modal: public window
class SimpleModal: public Modal
{
public:
virtual int ReadInput(INPUT_RECORD *GetReadRec = nullptr);
virtual void SetExitCode(int Code) override;

bool Done() const;
void ClearDone();
void Process();
void WriteInput(int Key);
void ProcessInput();
void SetHelp(const wchar_t *Topic);
void ShowHelp();

Expand All @@ -67,13 +64,10 @@ class SimpleModal: public Modal
void SetDone(void);
void Close(int Code);

INPUT_RECORD m_ReadRec;
string m_HelpTopic;

private:
bool m_EndLoop;
int m_ReadKey;
int m_WriteKey;
};

#endif // MODAL_HPP_A6E3BDC6_D983_486E_98E6_E5956E64CC15
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4638)m4_dnl
m4_define(BUILD,4639)m4_dnl
20 changes: 0 additions & 20 deletions far/vmenu.cpp
Expand Up @@ -759,26 +759,6 @@ bool VMenu::ShouldSendKeyToFilter(int Key) const
return false;
}

int VMenu::ReadInput(INPUT_RECORD *GetReadRec)
{
int ReadKey;

for (;;)
{
ReadKey = SimpleModal::ReadInput(GetReadRec);

//фильтр должен обрабатывать нажатия раньше "пользователя" меню
if (ShouldSendKeyToFilter(ReadKey))
{
ProcessInput();
continue;
}
break;
}

return ReadKey;
}

__int64 VMenu::VMProcess(int OpCode,void *vParam,__int64 iParam)
{
switch (OpCode)
Expand Down
1 change: 0 additions & 1 deletion far/vmenu.hpp
Expand Up @@ -194,7 +194,6 @@ class VMenu: public SimpleModal
virtual int ProcessKey(const Manager::Key& Key) override;
virtual int ProcessMouse(const MOUSE_EVENT_RECORD *MouseEvent) override;
virtual __int64 VMProcess(int OpCode, void *vParam = nullptr, __int64 iParam = 0) override;
virtual int ReadInput(INPUT_RECORD *GetReadRec = nullptr) override;
virtual void ResizeConsole() override;
virtual void SetDeleting(void) override;
virtual void ShowConsoleTitle() override;
Expand Down

0 comments on commit da6afd9

Please sign in to comment.