Skip to content
Permalink
Browse files

Рефакторинг.

  • Loading branch information...
shmuz committed Jan 22, 2015
1 parent a97ac00 commit 78cc6c8b0a823a34b438dbc221b42f66e00ce327
Showing with 88 additions and 84 deletions.
  1. +1 −1 far/PluginA.cpp
  2. +5 −1 far/changelog
  3. +1 −1 far/dialog.cpp
  4. +1 −1 far/editcontrol.cpp
  5. +2 −2 far/fileedit.cpp
  6. +1 −1 far/filelist.cpp
  7. +1 −1 far/filepanels.cpp
  8. +1 −1 far/filepanels.hpp
  9. +5 −5 far/keyboard.cpp
  10. +56 −56 far/macro.cpp
  11. +6 −6 far/macro.hpp
  12. +1 −1 far/manager.cpp
  13. +2 −2 far/plugapi.cpp
  14. +1 −1 far/vbuild.m4
  15. +2 −2 far/window.cpp
  16. +2 −2 far/window.hpp
@@ -5551,7 +5551,7 @@ void* PluginA::Open(OpenInfo* Info)
break;

case OPEN_FROMMACRO:
OpenFromA = oldfar::OPEN_FROMMACRO|Global->CtrlObject->Macro.GetMode();
OpenFromA = oldfar::OPEN_FROMMACRO|Global->CtrlObject->Macro.GetArea();
Buffer.reset(UnicodeToAnsi(reinterpret_cast<OpenMacroInfo*>(Info->Data)->Count ? reinterpret_cast<OpenMacroInfo*>(Info->Data)->Values[0].String : L""));
Ptr = reinterpret_cast<intptr_t>(Buffer.get());
break;
@@ -1,4 +1,8 @@
shmuel 21.01.2015 23:58:16 +0200 - build 4252
shmuel 22.01.2015 13:21:30 +0200 - build 4253

1. Рефакторинг.

shmuel 21.01.2015 23:58:16 +0200 - build 4252

1. Рефакторинг.

@@ -370,7 +370,7 @@ void Dialog::Init()
DialogMode.Set(DMODE_OLDSTYLE);
}

//_SVS(SysLog(L"Dialog =%d",Global->CtrlObject->Macro.GetMode()));
//_SVS(SysLog(L"Dialog =%d",Global->CtrlObject->Macro.GetArea()));
// çàïîìèíàåì ïðåäûäóùèé çàãîëîâîê êîíñîëè
OldTitle = std::make_unique<ConsoleTitle>();
IdExist=false;
@@ -343,7 +343,7 @@ int EditControl::AutoCompleteProc(bool Manual,bool DelBlock,int& BackKey, FARMAC
string CurrentLine;
size_t EventsCount = 0;
Console().GetNumberOfInputEvents(EventsCount);
if(ECFlags.Check(EC_ENABLEAUTOCOMPLETE) && *m_Str && !Reenter && !EventsCount && (Global->CtrlObject->Macro.GetCurRecord() == MACROSTATE_NOMACRO || Manual))
if(ECFlags.Check(EC_ENABLEAUTOCOMPLETE) && *m_Str && !Reenter && !EventsCount && (Global->CtrlObject->Macro.GetState() == MACROSTATE_NOMACRO || Manual))
{
Reenter++;

@@ -948,11 +948,11 @@ int FileEditor::ReProcessKey(int Key,int CalledFromControl)
_SVS(if (Key=='n' || Key=='m'))
_SVS(SysLog(L"%d Key='%c'",__LINE__,Key));

if (!CalledFromControl && (Global->CtrlObject->Macro.IsRecording() == MACROSTATE_RECORDING_COMMON || Global->CtrlObject->Macro.IsExecuting() == MACROSTATE_EXECUTING_COMMON || Global->CtrlObject->Macro.GetCurRecord() == MACROSTATE_NOMACRO))
if (!CalledFromControl && (Global->CtrlObject->Macro.IsRecording() == MACROSTATE_RECORDING_COMMON || Global->CtrlObject->Macro.IsExecuting() == MACROSTATE_EXECUTING_COMMON || Global->CtrlObject->Macro.GetState() == MACROSTATE_NOMACRO))
{

_SVS(if (Global->CtrlObject->Macro.IsRecording() == MACROSTATE_RECORDING_COMMON || Global->CtrlObject->Macro.IsExecuting() == MACROSTATE_EXECUTING_COMMON))
_SVS(SysLog(L"%d !!!! Global->CtrlObject->Macro.GetCurRecord() != MACROSTATE_NOMACRO !!!!",__LINE__));
_SVS(SysLog(L"%d !!!! Global->CtrlObject->Macro.GetState() != MACROSTATE_NOMACRO !!!!",__LINE__));

ProcessedNext=!ProcessEditorInput(Global->WindowManager->GetLastInputRecord());
}
@@ -709,7 +709,7 @@ int FileList::SendKeyToPlugin(DWORD Key,bool Pred)
_ALGO(SysLog(L"Key=%s Pred=%d",_FARKEY_ToName(Key),Pred));

if (m_PanelMode==PLUGIN_PANEL &&
(Global->CtrlObject->Macro.IsRecording() == MACROSTATE_RECORDING_COMMON || Global->CtrlObject->Macro.IsExecuting() == MACROSTATE_EXECUTING_COMMON || Global->CtrlObject->Macro.GetCurRecord() == MACROSTATE_NOMACRO)
(Global->CtrlObject->Macro.IsRecording() == MACROSTATE_RECORDING_COMMON || Global->CtrlObject->Macro.IsExecuting() == MACROSTATE_EXECUTING_COMMON || Global->CtrlObject->Macro.GetState() == MACROSTATE_NOMACRO)
)
{
_ALGO(SysLog(L"call Plugins.ProcessKey() {"));
@@ -1216,7 +1216,7 @@ void FilePanels::GoToFile(const string& FileName)
}


FARMACROAREA FilePanels::GetMacroMode() const
FARMACROAREA FilePanels::GetMacroArea() const
{
switch (m_ActivePanel->GetType())
{
@@ -57,7 +57,7 @@ class FilePanels:public window,public ViewerContainer
virtual void ResizeConsole() override;
virtual bool CanFastHide() const override;
virtual void Refresh() override;
virtual FARMACROAREA GetMacroMode() const override;
virtual FARMACROAREA GetMacroArea() const override;
virtual Viewer* GetViewer(void) override;
virtual Viewer* GetById(int ID) override;

@@ -624,10 +624,10 @@ DWORD GetInputRecord(INPUT_RECORD *rec,bool ExcludeMacro,bool ProcessMouse,bool

DWORD GetInputRecordNoMacroArea(INPUT_RECORD *rec,bool AllowSynchro)
{
FARMACROAREA MMode = Global->CtrlObject->Macro.GetMode();
Global->CtrlObject->Macro.SetMode(MACROAREA_LAST); // ÷òîáû íå ñðàáàòûâàëè ìàêðîñû :-)
FARMACROAREA MArea = Global->CtrlObject->Macro.GetArea();
Global->CtrlObject->Macro.SetArea(MACROAREA_LAST); // ÷òîáû íå ñðàáàòûâàëè ìàêðîñû :-)
DWORD Key = GetInputRecord(rec, false, false, AllowSynchro);
Global->CtrlObject->Macro.SetMode(MMode);
Global->CtrlObject->Macro.SetArea(MArea);
return Key;
}

@@ -733,7 +733,7 @@ static DWORD __GetInputRecord(INPUT_RECORD *rec,bool ExcludeMacro,bool ProcessMo
}

int EnableShowTime=Global->Opt->Clock && (Global->WaitInMainLoop || (Global->CtrlObject &&
Global->CtrlObject->Macro.GetMode()==MACROAREA_SEARCH));
Global->CtrlObject->Macro.GetArea()==MACROAREA_SEARCH));

if (EnableShowTime)
ShowTime(1);
@@ -2893,7 +2893,7 @@ DWORD CalcKeyCode(const INPUT_RECORD* rec, int RealKey, int *NotMacros, bool Pro
if (KeyCode>='0' && KeyCode<='9')
{
if (Global->WaitInFastFind > 0 &&
Global->CtrlObject->Macro.GetCurRecord() < MACROSTATE_RECORDING &&
Global->CtrlObject->Macro.GetState() < MACROSTATE_RECORDING &&
!Global->CtrlObject->Macro.MacroExists(KEY_ALTSHIFT0+KeyCode-'0',MACROAREA_SEARCH,true))
{
return Modif|Char;
Oops, something went wrong.

0 comments on commit 78cc6c8

Please sign in to comment.
You can’t perform that action at this time.