Skip to content

Commit

Permalink
1. уточнение 4818: при нажатии enter на панели multiarc задавался воп…
Browse files Browse the repository at this point in the history
…рос на распаковку.

2. уточнение 4818: аналогичное поведение для запуска по enter встроенных ассоциаций.
  • Loading branch information
zg0 committed Oct 11, 2016
1 parent 71a6f14 commit b7fc1c6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
6 changes: 6 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
zg 11.10.2016 18:16:57 +0200 - build 4820

1. уточнение 4818: при нажатии enter на панели multiarc задавался вопрос на распаковку.

2. уточнение 4818: аналогичное поведение для запуска по enter встроенных ассоциаций.

drkns 10.10.2016 23:09:35 +0200 - build 4819

1. Сократим немного копипасту в проверке времени изменения файла.
Expand Down
42 changes: 21 additions & 21 deletions far/filelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,7 @@ void FileList::ProcessEnter(bool EnableExec,bool SeparateWindow,bool EnableAssoc
PluginPanelItemHolder PanelItem;
FileListToPluginItem(CurItem, PanelItem);

if (!Global->CtrlObject->Plugins->GetFile(m_hPlugin, &PanelItem.Item, strTempDir, strFileName, OPM_EDIT))
if (!Global->CtrlObject->Plugins->GetFile(m_hPlugin, &PanelItem.Item, strTempDir, strFileName, OPM_SILENT | OPM_EDIT))
return;

strShortFileName = ConvertNameToShort(strFileName);
Expand All @@ -2657,31 +2657,31 @@ void FileList::ProcessEnter(bool EnableExec,bool SeparateWindow,bool EnableAssoc
if (!SetCurPath())
return;

if (!SeparateWindow && ProcessLocalFileTypes(strFileName, strShortFileName, FILETYPE_EXEC, PluginMode, true, RunAs))
return;

const auto IsItExecutable = IsExecutable(strFileName);
if (SeparateWindow || !ProcessLocalFileTypes(strFileName, strShortFileName, FILETYPE_EXEC, PluginMode, true, RunAs))
{
const auto IsItExecutable = IsExecutable(strFileName);

if (!IsItExecutable && !SeparateWindow && (OpenedPlugin = OpenFilePlugin(strFileName, TRUE, Type)) != nullptr)
return;
if (!IsItExecutable && !SeparateWindow && (OpenedPlugin = OpenFilePlugin(strFileName, TRUE, Type)) != nullptr)
return;

if (IsItExecutable || SeparateWindow || Global->Opt->UseRegisteredTypes)
{
execute_info Info;
Info.Command = strFileName;
Info.WaitMode = PluginMode? execute_info::wait_mode::wait_finish : execute_info::wait_mode::no_wait;
Info.NewWindow = SeparateWindow;
Info.SourceMode = execute_info::source_mode::known;
Info.RunAs = RunAs;
if (IsItExecutable || SeparateWindow || Global->Opt->UseRegisteredTypes)
{
execute_info Info;
Info.Command = strFileName;
Info.WaitMode = PluginMode? execute_info::wait_mode::wait_finish : execute_info::wait_mode::no_wait;
Info.NewWindow = SeparateWindow;
Info.SourceMode = execute_info::source_mode::known;
Info.RunAs = RunAs;

Info.Command = ConvertNameToFull(Info.Command);
QuoteSpace(Info.Command);
Info.Command = ConvertNameToFull(Info.Command);
QuoteSpace(Info.Command);

Parent()->GetCmdLine()->ExecString(Info);
Parent()->GetCmdLine()->ExecString(Info);

const auto ExclusionFlag = IsItExecutable? EXCLUDECMDHISTORY_NOTPANEL : EXCLUDECMDHISTORY_NOTWINASS;
if (!(Global->Opt->ExcludeCmdHistory & ExclusionFlag) && !PluginMode)
Global->CtrlObject->CmdHistory->AddToHistory(strFileName, HR_DEFAULT, nullptr, nullptr, m_CurDir.data());
const auto ExclusionFlag = IsItExecutable? EXCLUDECMDHISTORY_NOTPANEL : EXCLUDECMDHISTORY_NOTWINASS;
if (!(Global->Opt->ExcludeCmdHistory & ExclusionFlag) && !PluginMode)
Global->CtrlObject->CmdHistory->AddToHistory(strFileName, HR_DEFAULT, nullptr, nullptr, m_CurDir.data());
}
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m4_define(BUILD,4819)m4_dnl
m4_define(BUILD,4820)m4_dnl

0 comments on commit b7fc1c6

Please sign in to comment.