Skip to content

Commit

Permalink
1. 0003401: Странный баг с часами в редакторе.
Browse files Browse the repository at this point in the history
  • Loading branch information
zg0 committed Mar 6, 2017
1 parent da6ee23 commit 81b0d93
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 12 deletions.
4 changes: 4 additions & 0 deletions far/changelog
@@ -1,3 +1,7 @@
zg 06.03.2017 14:02:30 +0200 - build 4906

1. 0003401: Странный баг с часами в редакторе.

drkns 05.03.2017 16:01:22 +0000 - build 4905

1. С форума: при работе по сети с NAS QNAP почему-то при заходе на любую шару текущий и родительский каталоги дополнительно добавляются в список.
Expand Down
4 changes: 2 additions & 2 deletions far/cmdline.cpp
Expand Up @@ -995,7 +995,7 @@ static bool ProcessFarCommands(const string& Command, const std::function<void(b
Global->Opt->AdvancedConfig();
return true;
}

if (!StrCmpI(Command.data(), L"far:about"))
{
string strOut = concat(L'\n', Global->Version(), L'\n', Global->Copyright(), L'\n');
Expand Down Expand Up @@ -1060,7 +1060,7 @@ void CommandLine::ExecString(execute_info& Info)
}
}
if (Global->Opt->Clock)
ShowTime();
ShowTimeInBackground();

if (!Silent)
{
Expand Down
2 changes: 1 addition & 1 deletion far/dialog.cpp
Expand Up @@ -415,7 +415,7 @@ Dialog::~Dialog()
if (Global)
{
if (Global->Opt->Clock && Global->WindowManager->IsPanelsActive(true))
ShowTime();
ShowTimeInBackground();

if (!CheckDialogMode(DMODE_ISMENU))
Global->ScrBuf->Flush();
Expand Down
10 changes: 8 additions & 2 deletions far/interf.cpp
Expand Up @@ -592,9 +592,15 @@ void UpdateScreenSize()
Global->ScrBuf->AllocBuf(NewSize.Y, NewSize.X);
}

void ShowTimeInBackground()
{
if (!Global->SuppressClock)
ShowTime();
}

void ShowTime()
{
if (Global->ScreenSaverActive || Global->SuppressClock)
if (Global->ScreenSaverActive)
return;

Global->CurrentTime.update();
Expand All @@ -613,7 +619,7 @@ void ShowTime()
int ModType=CurrentWindow->GetType();
SetColor(ModType==windowtype_viewer?COL_VIEWERCLOCK:(ModType==windowtype_editor?COL_EDITORCLOCK:COL_CLOCK));
Text(Global->CurrentTime.get());
Global->LastShownTimeSize = Global->CurrentTime.size();
Global->LastShownTimeSize = Global->CurrentTime.size();
}
}

Expand Down
1 change: 1 addition & 0 deletions far/interf.hpp
Expand Up @@ -111,6 +111,7 @@ enum BOX_DEF_SYMBOLS
};

void ShowTime();
void ShowTimeInBackground();

/*$ 14.02.2001 SKV
Инитить ли палитру default значениями.
Expand Down
6 changes: 3 additions & 3 deletions far/keyboard.cpp
Expand Up @@ -792,7 +792,7 @@ static DWORD GetInputRecordImpl(INPUT_RECORD *rec,bool ExcludeMacro,bool Process
const auto EnableShowTime = Global->Opt->Clock && (Global->WaitInMainLoop || (Global->CtrlObject && Global->CtrlObject->Macro.GetArea() == MACROAREA_SEARCH));

if (EnableShowTime)
ShowTime();
ShowTimeInBackground();

Global->ScrBuf->Flush();

Expand Down Expand Up @@ -864,7 +864,7 @@ static DWORD GetInputRecordImpl(INPUT_RECORD *rec,bool ExcludeMacro,bool Process
clock_t CurTime=clock();

if (EnableShowTime)
ShowTime();
ShowTimeInBackground();

if (Global->WaitInMainLoop)
{
Expand Down Expand Up @@ -983,7 +983,7 @@ static DWORD GetInputRecordImpl(INPUT_RECORD *rec,bool ExcludeMacro,bool Process
}

if (EnableShowTime)
ShowTime();
ShowTimeInBackground();

if (rec->EventType == FOCUS_EVENT)
{
Expand Down
2 changes: 1 addition & 1 deletion far/manager.cpp
Expand Up @@ -1056,7 +1056,7 @@ void Manager::RefreshCommit(const window_ptr& Param)
||
(Global->WaitInMainLoop && Global->Opt->Clock)
)
ShowTime();
ShowTimeInBackground();
});
}

Expand Down
2 changes: 1 addition & 1 deletion far/scrbuf.cpp
Expand Up @@ -365,7 +365,7 @@ void ScreenBuf::Flush(flush_type FlushType)
{
if (Global->WaitInMainLoop && Global->Opt->Clock)
{
ShowTime();
ShowTimeInBackground();
}

std::vector<SMALL_RECT>WriteList;
Expand Down
2 changes: 1 addition & 1 deletion far/setcolor.cpp
Expand Up @@ -67,7 +67,7 @@ void GetColor(PaletteColors PaletteIndex)
Global->WindowManager->PluginCommit(); // коммитим.

if (Global->Opt->Clock)
ShowTime();
ShowTimeInBackground();

Global->ScrBuf->Unlock(); // разрешаем прорисовку
Global->WindowManager->PluginCommit(); // коммитим.
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4905)m4_dnl
m4_define(BUILD,4906)m4_dnl

0 comments on commit 81b0d93

Please sign in to comment.