Skip to content

Commit

Permalink
#3490, #3491, folder shortcuts refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Sep 14, 2017
1 parent cec3d40 commit b413200
Show file tree
Hide file tree
Showing 10 changed files with 344 additions and 381 deletions.
8 changes: 8 additions & 0 deletions far/changelog
@@ -1,3 +1,11 @@
drkns 15.09.2017 00:48:00 +0100 - build 5030

1. 0003490: Падение при нажатии F4 в пустом подменю

2. 0003491: Нелогичное создание подменю после отменённого редактирования

3. Folder shortcuts в целом упрощён и частично переделан.

drkns 13.09.2017 20:19:28 +0100 - build 5029

1. Откат 5027.2 и 5028.1.
Expand Down
3 changes: 1 addition & 2 deletions far/clipboard.cpp
Expand Up @@ -253,7 +253,7 @@ class internal_clipboard: public clipboard, public singleton<internal_clipboard>
//-----------------------------------------------------------------------------
static thread_local clipboard* OverridenInternalClipboard;

void clipboard_restorer::operator()(clipboard* Clip) const
void clipboard_restorer::operator()(const clipboard* Clip) const
{
OverridenInternalClipboard = nullptr;
delete Clip;
Expand Down Expand Up @@ -492,4 +492,3 @@ bool CopyData(const clipboard_accessor& From, const clipboard_accessor& To)

return false;
}

2 changes: 1 addition & 1 deletion far/clipboard.hpp
Expand Up @@ -108,7 +108,7 @@ bool CopyData(const clipboard_accessor& From, const clipboard_accessor& To);

struct clipboard_restorer
{
void operator()(clipboard* Clip) const;
void operator()(const clipboard* Clip) const;
};

std::unique_ptr<clipboard, clipboard_restorer> OverrideClipboard();
Expand Down
4 changes: 2 additions & 2 deletions far/far.vc14.sln
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.21730.1
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "far", "far.vcxproj", "{62F794C9-5F4C-40F6-B358-5DC1A9D6D2CB}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Far", "far.vcxproj", "{62F794C9-5F4C-40F6-B358-5DC1A9D6D2CB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
20 changes: 10 additions & 10 deletions far/farlang.templ.m4
Expand Up @@ -6302,16 +6302,16 @@ l:
"Посилання на папки"

MFolderShortcutBottom
"Редактирование: Del,Ins,Shift+Ins,F4"
"Edit: Del,Ins,Shift+Ins,F4"
"Změnit: Del,Ins,Shift+Ins,F4"
"Bearb.: Entf,Einf,Shift+Einf,F4"
"Szerk.: Del,Ins,Shift+Ins,F4"
"Edycja: Del,Ins,Shift+Ins,F4"
"Editar: Del,Ins,Shift+Ins,F4"
"Upraviť: Del,Ins,ShiftIns,F4"
"Edita: [DEL] [INS] [SHIFT-INS] [F4]"
"Редагування: Del,Ins,Shift+Ins,F4"
"Редактирование: Del,Ins,F4"
"Edit: Del,Ins,F4"
"Změnit: Del,Ins,F4"
"Bearb.: Entf,Einf,F4"
"Szerk.: Del,Ins,F4"
"Edycja: Del,Ins,F4"
"Editar: Del,Ins,F4"
"Upraviť: Del,Ins,F4"
"Edita: [DEL] [INS] [F4]"
"Редагування: Del,Ins,F4"

MFolderShortcutBottomSub
"Редактирование: Del,Ins,F4"
Expand Down
4 changes: 2 additions & 2 deletions far/panel.cpp
Expand Up @@ -1321,12 +1321,12 @@ int Panel::ProcessShortcutFolder(int Key,bool ProcTreePanel)
}
*/

bool Panel::ExecShortcutFolder(int Pos, bool raw)
bool Panel::ExecShortcutFolder(int Pos)
{
string strShortcutFolder,strPluginFile,strPluginData;
GUID PluginGuid;

if (Shortcuts().Get(Pos,&strShortcutFolder, &PluginGuid, &strPluginFile, &strPluginData, raw))
if (Shortcuts().Get(Pos,&strShortcutFolder, &PluginGuid, &strPluginFile, &strPluginData))
{
return ExecShortcutFolder(strShortcutFolder,PluginGuid,strPluginFile,strPluginData,true);
}
Expand Down
2 changes: 1 addition & 1 deletion far/panel.hpp
Expand Up @@ -249,7 +249,7 @@ class Panel: public ScreenObject, public std::enable_shared_from_this<Panel>
bool GetShowShortNamesMode() const { return m_ShowShortNames; }
void SetShowShortNamesMode(bool Mode) {m_ShowShortNames=Mode;}
void InitCurDir(const string& CurDir);
bool ExecShortcutFolder(int Pos, bool raw=false);
bool ExecShortcutFolder(int Pos);
bool ExecShortcutFolder(string& strShortcutFolder, const GUID& PluginGuid, const string& strPluginFile, const string& strPluginData, bool CheckType, bool TryClosest = true, bool Silent = false);
bool SaveShortcutFolder(int Pos, bool Add) const;
int SetPluginCommand(int Command,int Param1,void* Param2);
Expand Down

0 comments on commit b413200

Please sign in to comment.