View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001891 | Far Manager | Panel.Panel Modes | public | 2011-09-24 09:39 | 2012-05-11 11:42 |
Reporter | samlyukov | Assigned To | vskirdin | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Fixed in Version | 3.0 | ||||
Summary | 0001891: Выравнивание расширения по правому краю | ||||
Description | Для колонки Х сделан сабж. Кроме того, удален неиспользуемый аргумент StatusLine в ViewSettingsToText/TextToViewSettings. | ||||
Tags | No tags attached. | ||||
Build | 2671 | ||||
|
Align.diff (9,688 bytes)
Index: config.cpp =================================================================== --- config.cpp (revision 6723) +++ config.cpp (working copy) @@ -1035,7 +1035,7 @@ { if (Opt.FindOpt.strSearchOutFormatWidth.IsEmpty()) Opt.FindOpt.strSearchOutFormatWidth=L"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; - TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(),false, + TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(), Opt.FindOpt.OutColumnTypes,Opt.FindOpt.OutColumnWidths,Opt.FindOpt.OutColumnWidthType, Opt.FindOpt.OutColumnCount); } Index: flshow.cpp =================================================================== --- flshow.cpp (revision 6723) +++ flshow.cpp (working copy) @@ -639,7 +639,7 @@ { TextToViewSettings(Info.PanelModesArray[ViewMode].ColumnTypes, Info.PanelModesArray[ViewMode].ColumnWidths, - false,ViewSettings.ColumnType,ViewSettings.ColumnWidth, + ViewSettings.ColumnType,ViewSettings.ColumnWidth, ViewSettings.ColumnWidthType,ViewSettings.ColumnCount); if (Info.PanelModesArray[ViewMode].StatusColumnTypes && @@ -647,7 +647,7 @@ { TextToViewSettings(Info.PanelModesArray[ViewMode].StatusColumnTypes, Info.PanelModesArray[ViewMode].StatusColumnWidths, - true,ViewSettings.StatusColumnType,ViewSettings.StatusColumnWidth, + ViewSettings.StatusColumnType,ViewSettings.StatusColumnWidth, ViewSettings.StatusColumnWidthType,ViewSettings.StatusColumnCount); } else if (Info.PanelModesArray[ViewMode].Flags&PMFLAGS_DETAILEDSTATUS) @@ -1159,7 +1159,7 @@ } if (ExtPtr && *ExtPtr) ExtPtr++; else ExtPtr = L""; - FS<<fmt::LeftAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; + FS<<fmt::RightAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; if (!ShowStatus && StrLength(ExtPtr) > ColumnWidth) { Index: flplugin.cpp =================================================================== --- flplugin.cpp (revision 6723) +++ flplugin.cpp (working copy) @@ -1096,7 +1096,7 @@ void FileList::PluginGetColumnTypesAndWidths(string& strColumnTypes,string& strColumnWidths) { ViewSettingsToText(ViewSettings.ColumnType,ViewSettings.ColumnWidth,ViewSettings.ColumnWidthType, - ViewSettings.ColumnCount,false,strColumnTypes,strColumnWidths); + ViewSettings.ColumnCount,strColumnTypes,strColumnWidths); } void FileList::PluginBeginSelection() Index: panelmix.cpp =================================================================== --- panelmix.cpp (revision 6723) +++ panelmix.cpp (working copy) @@ -261,7 +261,7 @@ } -void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths,bool StatusLine, +void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths, unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int &ColumnCount) { const wchar_t *TextPtr=ColumnTitles; @@ -425,7 +425,7 @@ void ViewSettingsToText(unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int ColumnCount, - bool StatusLine,string &strColumnTitles,string &strColumnWidths) + string &strColumnTitles,string &strColumnWidths) { strColumnTitles.Clear(); strColumnWidths.Clear(); Index: flmodes.cpp =================================================================== --- flmodes.cpp (revision 6723) +++ flmodes.cpp (working copy) @@ -163,9 +163,9 @@ ModeDlg[MD_CHECKBOX_FILESLOWERCASE].Selected=(NewSettings.Flags&PVS_FILELOWERCASE)?1:0; ModeDlg[MD_CHECKBOX_UPPERTOLOWERCASE].Selected=(NewSettings.Flags&PVS_FILEUPPERTOLOWERCASE)?1:0; ViewSettingsToText(NewSettings.ColumnType,NewSettings.ColumnWidth,NewSettings.ColumnWidthType, - NewSettings.ColumnCount,false,ModeDlg[2].strData,ModeDlg[4].strData); + NewSettings.ColumnCount,ModeDlg[2].strData,ModeDlg[4].strData); ViewSettingsToText(NewSettings.StatusColumnType,NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType, - NewSettings.StatusColumnCount,true,ModeDlg[6].strData,ModeDlg[8].strData); + NewSettings.StatusColumnCount,ModeDlg[6].strData,ModeDlg[8].strData); { Dialog Dlg(ModeDlg,ARRAYSIZE(ModeDlg)); Dlg.SetPosition(-1,-1,76,17); @@ -190,9 +190,9 @@ NewSettings.Flags|=PVS_FILELOWERCASE; if (ModeDlg[MD_CHECKBOX_UPPERTOLOWERCASE].Selected) NewSettings.Flags|=PVS_FILEUPPERTOLOWERCASE; - TextToViewSettings(ModeDlg[MD_EDITTYPES].strData,ModeDlg[MD_EDITWIDTHS].strData,false,NewSettings.ColumnType, + TextToViewSettings(ModeDlg[MD_EDITTYPES].strData,ModeDlg[MD_EDITWIDTHS].strData,NewSettings.ColumnType, NewSettings.ColumnWidth,NewSettings.ColumnWidthType,NewSettings.ColumnCount); - TextToViewSettings(ModeDlg[MD_EDITSTATUSTYPES].strData,ModeDlg[MD_EDITSTATUSWIDTHS].strData,true,NewSettings.StatusColumnType, + TextToViewSettings(ModeDlg[MD_EDITSTATUSTYPES].strData,ModeDlg[MD_EDITSTATUSWIDTHS].strData,NewSettings.StatusColumnType, NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType,NewSettings.StatusColumnCount); ViewSettingsArray[ModeNumber]=NewSettings; CtrlObject->Cp()->LeftPanel->SortFileList(TRUE); @@ -240,11 +240,11 @@ PanelViewSettings NewSettings=ViewSettingsArray[VIEW_0+I]; if (!strColumnTitles.IsEmpty()) - TextToViewSettings(strColumnTitles,strColumnWidths,false,NewSettings.ColumnType, + TextToViewSettings(strColumnTitles,strColumnWidths,NewSettings.ColumnType, NewSettings.ColumnWidth,NewSettings.ColumnWidthType,NewSettings.ColumnCount); if (!strStatusColumnTitles.IsEmpty()) - TextToViewSettings(strStatusColumnTitles,strStatusColumnWidths,true,NewSettings.StatusColumnType, + TextToViewSettings(strStatusColumnTitles,strStatusColumnWidths,NewSettings.StatusColumnType, NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType,NewSettings.StatusColumnCount); NewSettings.Flags = (DWORD)Flags; @@ -267,9 +267,9 @@ PanelViewSettings NewSettings=ViewSettingsArray[VIEW_0+I]; ViewSettingsToText(NewSettings.ColumnType,NewSettings.ColumnWidth,NewSettings.ColumnWidthType, - NewSettings.ColumnCount,false,strColumnTitles,strColumnWidths); + NewSettings.ColumnCount,strColumnTitles,strColumnWidths); ViewSettingsToText(NewSettings.StatusColumnType,NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType, - NewSettings.StatusColumnCount,true,strStatusColumnTitles,strStatusColumnWidths); + NewSettings.StatusColumnCount,strStatusColumnTitles,strStatusColumnWidths); FormatString strMode; strMode<<I; Index: filelist.cpp =================================================================== --- filelist.cpp (revision 6723) +++ filelist.cpp (working copy) @@ -3141,7 +3141,7 @@ string strColumnTypes,strColumnWidths; // SetScreenPosition(); ViewSettingsToText(ViewSettings.ColumnType,ViewSettings.ColumnWidth,ViewSettings.ColumnWidthType, - ViewSettings.ColumnCount,false,strColumnTypes,strColumnWidths); + ViewSettings.ColumnCount,strColumnTypes,strColumnWidths); ProcessPluginEvent(FE_CHANGEVIEWMODE,(void*)strColumnTypes.CPtr()); } Index: findfile.cpp =================================================================== --- findfile.cpp (revision 6723) +++ findfile.cpp (working copy) @@ -828,7 +828,7 @@ if (Opt.FindOpt.strSearchOutFormatWidth.IsEmpty()) Opt.FindOpt.strSearchOutFormatWidth=L"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; - TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(),false, + TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(), Opt.FindOpt.OutColumnTypes,Opt.FindOpt.OutColumnWidths,Opt.FindOpt.OutColumnWidthType, Opt.FindOpt.OutColumnCount); } Index: panelmix.hpp =================================================================== --- panelmix.hpp (revision 6723) +++ panelmix.hpp (working copy) @@ -43,7 +43,7 @@ const string FormatStr_Attribute(DWORD FileAttributes,int Width=-1); const string FormatStr_DateTime(const FILETIME *FileTime,int ColumnType,unsigned __int64 Flags,int Width); const string FormatStr_Size(__int64 UnpSize, __int64 PackSize, __int64 StreamsSize, const string& strName,DWORD FileAttributes,DWORD ShowFolderSize,DWORD ReparseTag,int ColumnType,unsigned __int64 Flags,int Width); -void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths,bool StatusLine, +void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths, unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int &ColumnCount); void ViewSettingsToText(unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int ColumnCount, - bool StatusLine,string &strColumnTitles,string &strColumnWidths); + string &strColumnTitles,string &strColumnWidths); |
|
Зашибись. 1. Ну и нафига мне в колонке X видеть невнятное "ent" вместо "tor"? Или я чё не понял? Если уж взялся - делай с настройкой. В любом случае, я хочу видеть выравнивание по левому краю. 2. Удалил StatusLine. Ага, а потом я буду его обратно добавлять, да? Он для "многострочной" области зарезервирован. |
|
ух как разволновался :) 1.настройку щас гляну. 2.конечно да. он сейчас не нужен. и не факт что понадобится. |
|
хотя... зачем настройка, если и так нормально кажет: "tor}", или все ж настаиваешь? |
|
Я хочу "c " а не " c". Выравнивание влево. |
|
Align_2.diff (10,625 bytes)
Index: config.cpp =================================================================== --- config.cpp (revision 6723) +++ config.cpp (working copy) @@ -1035,7 +1035,7 @@ { if (Opt.FindOpt.strSearchOutFormatWidth.IsEmpty()) Opt.FindOpt.strSearchOutFormatWidth=L"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; - TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(),false, + TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(), Opt.FindOpt.OutColumnTypes,Opt.FindOpt.OutColumnWidths,Opt.FindOpt.OutColumnWidthType, Opt.FindOpt.OutColumnCount); } Index: flshow.cpp =================================================================== --- flshow.cpp (revision 6723) +++ flshow.cpp (working copy) @@ -639,7 +639,7 @@ { TextToViewSettings(Info.PanelModesArray[ViewMode].ColumnTypes, Info.PanelModesArray[ViewMode].ColumnWidths, - false,ViewSettings.ColumnType,ViewSettings.ColumnWidth, + ViewSettings.ColumnType,ViewSettings.ColumnWidth, ViewSettings.ColumnWidthType,ViewSettings.ColumnCount); if (Info.PanelModesArray[ViewMode].StatusColumnTypes && @@ -647,7 +647,7 @@ { TextToViewSettings(Info.PanelModesArray[ViewMode].StatusColumnTypes, Info.PanelModesArray[ViewMode].StatusColumnWidths, - true,ViewSettings.StatusColumnType,ViewSettings.StatusColumnWidth, + ViewSettings.StatusColumnType,ViewSettings.StatusColumnWidth, ViewSettings.StatusColumnWidthType,ViewSettings.StatusColumnCount); } else if (Info.PanelModesArray[ViewMode].Flags&PMFLAGS_DETAILEDSTATUS) @@ -1159,7 +1159,11 @@ } if (ExtPtr && *ExtPtr) ExtPtr++; else ExtPtr = L""; - FS<<fmt::LeftAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; + unsigned __int64 ViewFlags=ColumnTypes[K]; + if (ViewFlags&COLUMN_RIGHTALIGN) + FS<<fmt::RightAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; + else + FS<<fmt::LeftAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; if (!ShowStatus && StrLength(ExtPtr) > ColumnWidth) { Index: flplugin.cpp =================================================================== --- flplugin.cpp (revision 6723) +++ flplugin.cpp (working copy) @@ -1096,7 +1096,7 @@ void FileList::PluginGetColumnTypesAndWidths(string& strColumnTypes,string& strColumnWidths) { ViewSettingsToText(ViewSettings.ColumnType,ViewSettings.ColumnWidth,ViewSettings.ColumnWidthType, - ViewSettings.ColumnCount,false,strColumnTypes,strColumnWidths); + ViewSettings.ColumnCount,strColumnTypes,strColumnWidths); } void FileList::PluginBeginSelection() Index: panelmix.cpp =================================================================== --- panelmix.cpp (revision 6723) +++ panelmix.cpp (working copy) @@ -261,7 +261,7 @@ } -void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths,bool StatusLine, +void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths, unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int &ColumnCount) { const wchar_t *TextPtr=ColumnTitles; @@ -383,6 +383,14 @@ if (strArgName.At(1)==L'L') ColumnType|=COLUMN_FULLOWNER; } + else if (strArgName.At(0)==L'X') + { + unsigned __int64 &ColumnType=ViewColumnTypes[ColumnCount]; + ColumnType=EXTENSION_COLUMN; + + if (strArgName.At(1)==L'R') + ColumnType|=COLUMN_RIGHTALIGN; + } else { for (unsigned I=0; I<ARRAYSIZE(ColumnSymbol); I++) @@ -425,7 +433,7 @@ void ViewSettingsToText(unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int ColumnCount, - bool StatusLine,string &strColumnTitles,string &strColumnWidths) + string &strColumnTitles,string &strColumnWidths) { strColumnTitles.Clear(); strColumnWidths.Clear(); @@ -485,6 +493,12 @@ strType += L"L"; } + if (ColumnType==EXTENSION_COLUMN) + { + if (ViewColumnTypes[I] & COLUMN_RIGHTALIGN) + strType += L"R"; + } + strColumnTitles += strType; wchar_t *lpwszWidth = strType.GetBuffer(20); _itow(ViewColumnWidths[I],lpwszWidth,10); Index: flmodes.cpp =================================================================== --- flmodes.cpp (revision 6723) +++ flmodes.cpp (working copy) @@ -163,9 +163,9 @@ ModeDlg[MD_CHECKBOX_FILESLOWERCASE].Selected=(NewSettings.Flags&PVS_FILELOWERCASE)?1:0; ModeDlg[MD_CHECKBOX_UPPERTOLOWERCASE].Selected=(NewSettings.Flags&PVS_FILEUPPERTOLOWERCASE)?1:0; ViewSettingsToText(NewSettings.ColumnType,NewSettings.ColumnWidth,NewSettings.ColumnWidthType, - NewSettings.ColumnCount,false,ModeDlg[2].strData,ModeDlg[4].strData); + NewSettings.ColumnCount,ModeDlg[2].strData,ModeDlg[4].strData); ViewSettingsToText(NewSettings.StatusColumnType,NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType, - NewSettings.StatusColumnCount,true,ModeDlg[6].strData,ModeDlg[8].strData); + NewSettings.StatusColumnCount,ModeDlg[6].strData,ModeDlg[8].strData); { Dialog Dlg(ModeDlg,ARRAYSIZE(ModeDlg)); Dlg.SetPosition(-1,-1,76,17); @@ -190,9 +190,9 @@ NewSettings.Flags|=PVS_FILELOWERCASE; if (ModeDlg[MD_CHECKBOX_UPPERTOLOWERCASE].Selected) NewSettings.Flags|=PVS_FILEUPPERTOLOWERCASE; - TextToViewSettings(ModeDlg[MD_EDITTYPES].strData,ModeDlg[MD_EDITWIDTHS].strData,false,NewSettings.ColumnType, + TextToViewSettings(ModeDlg[MD_EDITTYPES].strData,ModeDlg[MD_EDITWIDTHS].strData,NewSettings.ColumnType, NewSettings.ColumnWidth,NewSettings.ColumnWidthType,NewSettings.ColumnCount); - TextToViewSettings(ModeDlg[MD_EDITSTATUSTYPES].strData,ModeDlg[MD_EDITSTATUSWIDTHS].strData,true,NewSettings.StatusColumnType, + TextToViewSettings(ModeDlg[MD_EDITSTATUSTYPES].strData,ModeDlg[MD_EDITSTATUSWIDTHS].strData,NewSettings.StatusColumnType, NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType,NewSettings.StatusColumnCount); ViewSettingsArray[ModeNumber]=NewSettings; CtrlObject->Cp()->LeftPanel->SortFileList(TRUE); @@ -240,11 +240,11 @@ PanelViewSettings NewSettings=ViewSettingsArray[VIEW_0+I]; if (!strColumnTitles.IsEmpty()) - TextToViewSettings(strColumnTitles,strColumnWidths,false,NewSettings.ColumnType, + TextToViewSettings(strColumnTitles,strColumnWidths,NewSettings.ColumnType, NewSettings.ColumnWidth,NewSettings.ColumnWidthType,NewSettings.ColumnCount); if (!strStatusColumnTitles.IsEmpty()) - TextToViewSettings(strStatusColumnTitles,strStatusColumnWidths,true,NewSettings.StatusColumnType, + TextToViewSettings(strStatusColumnTitles,strStatusColumnWidths,NewSettings.StatusColumnType, NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType,NewSettings.StatusColumnCount); NewSettings.Flags = (DWORD)Flags; @@ -267,9 +267,9 @@ PanelViewSettings NewSettings=ViewSettingsArray[VIEW_0+I]; ViewSettingsToText(NewSettings.ColumnType,NewSettings.ColumnWidth,NewSettings.ColumnWidthType, - NewSettings.ColumnCount,false,strColumnTitles,strColumnWidths); + NewSettings.ColumnCount,strColumnTitles,strColumnWidths); ViewSettingsToText(NewSettings.StatusColumnType,NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType, - NewSettings.StatusColumnCount,true,strStatusColumnTitles,strStatusColumnWidths); + NewSettings.StatusColumnCount,strStatusColumnTitles,strStatusColumnWidths); FormatString strMode; strMode<<I; Index: filelist.cpp =================================================================== --- filelist.cpp (revision 6723) +++ filelist.cpp (working copy) @@ -3141,7 +3141,7 @@ string strColumnTypes,strColumnWidths; // SetScreenPosition(); ViewSettingsToText(ViewSettings.ColumnType,ViewSettings.ColumnWidth,ViewSettings.ColumnWidthType, - ViewSettings.ColumnCount,false,strColumnTypes,strColumnWidths); + ViewSettings.ColumnCount,strColumnTypes,strColumnWidths); ProcessPluginEvent(FE_CHANGEVIEWMODE,(void*)strColumnTypes.CPtr()); } Index: findfile.cpp =================================================================== --- findfile.cpp (revision 6723) +++ findfile.cpp (working copy) @@ -828,7 +828,7 @@ if (Opt.FindOpt.strSearchOutFormatWidth.IsEmpty()) Opt.FindOpt.strSearchOutFormatWidth=L"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; - TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(),false, + TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(), Opt.FindOpt.OutColumnTypes,Opt.FindOpt.OutColumnWidths,Opt.FindOpt.OutColumnWidthType, Opt.FindOpt.OutColumnCount); } Index: panelmix.hpp =================================================================== --- panelmix.hpp (revision 6723) +++ panelmix.hpp (working copy) @@ -43,7 +43,7 @@ const string FormatStr_Attribute(DWORD FileAttributes,int Width=-1); const string FormatStr_DateTime(const FILETIME *FileTime,int ColumnType,unsigned __int64 Flags,int Width); const string FormatStr_Size(__int64 UnpSize, __int64 PackSize, __int64 StreamsSize, const string& strName,DWORD FileAttributes,DWORD ShowFolderSize,DWORD ReparseTag,int ColumnType,unsigned __int64 Flags,int Width); -void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths,bool StatusLine, +void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths, unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int &ColumnCount); void ViewSettingsToText(unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int ColumnCount, - bool StatusLine,string &strColumnTitles,string &strColumnWidths); + string &strColumnTitles,string &strColumnWidths); |
|
а мне так не нравится :) добавил буковку - 'XR' |
|
> 2.конечно да. он сейчас не нужен. и не факт что понадобится. Некошерно, если в настройке колонок панели появится "B" (разрыв строки). Он допустим только в области статуса. |
|
0. Что должен увидеть? Пару мелких скриншотов приаттач - как до, как после. 1. Все же - зачем удален статус? 2. патч не полный - про хелп нишиша не сказано. |
|
0. что-то типа такого для колонки в 4 символа: | срр| сейчас так: |cpp | 1. как я понял, StatusLine в ViewSettingsToText/TextToViewSettings взялся от Maximus, когда он рисовал это http://bugs.farmanager.com/view.php?id=1492 кто-то применил какой-то его патч, а эту беду не убрал. как по мне, то статус не нужен безразмерно многострочный, вполне хватит и трех строк. для ютого достаточно добавить еще две строки в настройки режима (как- нибудь нарисую патч). StatusLine - не нужен и не используется. 2. угу. |
|
> вполне хватит и трех строк про Гейцовы "640Kb" помнишь? :-) |
|
добавил в хелп. |
|
Align_3.diff (11,682 bytes)
Index: config.cpp =================================================================== --- config.cpp (revision 7976) +++ config.cpp (working copy) @@ -1392,7 +1392,7 @@ { if (Opt.FindOpt.strSearchOutFormatWidth.IsEmpty()) Opt.FindOpt.strSearchOutFormatWidth=L"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; - TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(),false, + TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(), Opt.FindOpt.OutColumnTypes,Opt.FindOpt.OutColumnWidths,Opt.FindOpt.OutColumnWidthType, Opt.FindOpt.OutColumnCount); } Index: FarRus.hlf.m4 =================================================================== --- FarRus.hlf.m4 (revision 7976) +++ FarRus.hlf.m4 (working copy) @@ -3723,7 +3723,8 @@ N - не отображать расширения файлов; Эти символы можно комбинировать, например NMR - X - расширение файла + X[R] - расширение файла + где: R - выравнивать по правому краю; S[C,T,F,E] - размер файла P[C,T,F,E] - выделенный размер файла Index: flshow.cpp =================================================================== --- flshow.cpp (revision 7976) +++ flshow.cpp (working copy) @@ -642,7 +642,7 @@ { TextToViewSettings(Info.PanelModesArray[ViewMode].ColumnTypes, Info.PanelModesArray[ViewMode].ColumnWidths, - false,ViewSettings.ColumnType,ViewSettings.ColumnWidth, + ViewSettings.ColumnType,ViewSettings.ColumnWidth, ViewSettings.ColumnWidthType,ViewSettings.ColumnCount); if (Info.PanelModesArray[ViewMode].StatusColumnTypes && @@ -650,7 +650,7 @@ { TextToViewSettings(Info.PanelModesArray[ViewMode].StatusColumnTypes, Info.PanelModesArray[ViewMode].StatusColumnWidths, - true,ViewSettings.StatusColumnType,ViewSettings.StatusColumnWidth, + ViewSettings.StatusColumnType,ViewSettings.StatusColumnWidth, ViewSettings.StatusColumnWidthType,ViewSettings.StatusColumnCount); } else if (Info.PanelModesArray[ViewMode].Flags&PMFLAGS_DETAILEDSTATUS) @@ -1162,7 +1162,11 @@ } if (ExtPtr && *ExtPtr) ExtPtr++; else ExtPtr = L""; - FS<<fmt::LeftAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; + unsigned __int64 ViewFlags=ColumnTypes[K]; + if (ViewFlags&COLUMN_RIGHTALIGN) + FS<<fmt::RightAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; + else + FS<<fmt::LeftAlign()<<fmt::Width(ColumnWidth)<<fmt::Precision(ColumnWidth)<<ExtPtr; if (!ShowStatus && StrLength(ExtPtr) > ColumnWidth) { Index: flplugin.cpp =================================================================== --- flplugin.cpp (revision 7976) +++ flplugin.cpp (working copy) @@ -1162,7 +1162,7 @@ void FileList::PluginGetColumnTypesAndWidths(string& strColumnTypes,string& strColumnWidths) { ViewSettingsToText(ViewSettings.ColumnType,ViewSettings.ColumnWidth,ViewSettings.ColumnWidthType, - ViewSettings.ColumnCount,false,strColumnTypes,strColumnWidths); + ViewSettings.ColumnCount,strColumnTypes,strColumnWidths); } void FileList::PluginBeginSelection() Index: panelmix.cpp =================================================================== --- panelmix.cpp (revision 7976) +++ panelmix.cpp (working copy) @@ -269,7 +269,7 @@ } -void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths,bool StatusLine, +void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths, unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int &ColumnCount) { const wchar_t *TextPtr=ColumnTitles; @@ -391,6 +391,14 @@ if (strArgName.At(1)==L'L') ColumnType|=COLUMN_FULLOWNER; } + else if (strArgName.At(0)==L'X') + { + unsigned __int64 &ColumnType=ViewColumnTypes[ColumnCount]; + ColumnType=EXTENSION_COLUMN; + + if (strArgName.At(1)==L'R') + ColumnType|=COLUMN_RIGHTALIGN; + } else { for (unsigned I=0; I<ARRAYSIZE(ColumnSymbol); I++) @@ -433,7 +441,7 @@ void ViewSettingsToText(unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int ColumnCount, - bool StatusLine,string &strColumnTitles,string &strColumnWidths) + string &strColumnTitles,string &strColumnWidths) { strColumnTitles.Clear(); strColumnWidths.Clear(); @@ -493,6 +501,12 @@ strType += L"L"; } + if (ColumnType==EXTENSION_COLUMN) + { + if (ViewColumnTypes[I] & COLUMN_RIGHTALIGN) + strType += L"R"; + } + strColumnTitles += strType; wchar_t *lpwszWidth = strType.GetBuffer(20); _itow(ViewColumnWidths[I],lpwszWidth,10); Index: flmodes.cpp =================================================================== --- flmodes.cpp (revision 7976) +++ flmodes.cpp (working copy) @@ -166,9 +166,9 @@ ModeDlg[MD_CHECKBOX_FILESLOWERCASE].Selected=(NewSettings.Flags&PVS_FILELOWERCASE)?1:0; ModeDlg[MD_CHECKBOX_UPPERTOLOWERCASE].Selected=(NewSettings.Flags&PVS_FILEUPPERTOLOWERCASE)?1:0; ViewSettingsToText(NewSettings.ColumnType,NewSettings.ColumnWidth,NewSettings.ColumnWidthType, - NewSettings.ColumnCount,false,ModeDlg[2].strData,ModeDlg[4].strData); + NewSettings.ColumnCount,ModeDlg[2].strData,ModeDlg[4].strData); ViewSettingsToText(NewSettings.StatusColumnType,NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType, - NewSettings.StatusColumnCount,true,ModeDlg[6].strData,ModeDlg[8].strData); + NewSettings.StatusColumnCount,ModeDlg[6].strData,ModeDlg[8].strData); { Dialog Dlg(ModeDlg,ARRAYSIZE(ModeDlg)); Dlg.SetPosition(-1,-1,76,17); @@ -193,9 +193,9 @@ NewSettings.Flags|=PVS_FILELOWERCASE; if (ModeDlg[MD_CHECKBOX_UPPERTOLOWERCASE].Selected) NewSettings.Flags|=PVS_FILEUPPERTOLOWERCASE; - TextToViewSettings(ModeDlg[MD_EDITTYPES].strData,ModeDlg[MD_EDITWIDTHS].strData,false,NewSettings.ColumnType, + TextToViewSettings(ModeDlg[MD_EDITTYPES].strData,ModeDlg[MD_EDITWIDTHS].strData,NewSettings.ColumnType, NewSettings.ColumnWidth,NewSettings.ColumnWidthType,NewSettings.ColumnCount); - TextToViewSettings(ModeDlg[MD_EDITSTATUSTYPES].strData,ModeDlg[MD_EDITSTATUSWIDTHS].strData,true,NewSettings.StatusColumnType, + TextToViewSettings(ModeDlg[MD_EDITSTATUSTYPES].strData,ModeDlg[MD_EDITSTATUSWIDTHS].strData,NewSettings.StatusColumnType, NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType,NewSettings.StatusColumnCount); ViewSettingsArray[ModeNumber]=NewSettings; CtrlObject->Cp()->LeftPanel->SortFileList(TRUE); @@ -240,11 +240,11 @@ PanelViewSettings NewSettings=ViewSettingsArray[VIEW_0+I]; if (!strColumnTitles.IsEmpty()) - TextToViewSettings(strColumnTitles,strColumnWidths,false,NewSettings.ColumnType, + TextToViewSettings(strColumnTitles,strColumnWidths,NewSettings.ColumnType, NewSettings.ColumnWidth,NewSettings.ColumnWidthType,NewSettings.ColumnCount); if (!strStatusColumnTitles.IsEmpty()) - TextToViewSettings(strStatusColumnTitles,strStatusColumnWidths,true,NewSettings.StatusColumnType, + TextToViewSettings(strStatusColumnTitles,strStatusColumnWidths,NewSettings.StatusColumnType, NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType,NewSettings.StatusColumnCount); NewSettings.Flags = (DWORD)Flags; @@ -272,9 +272,9 @@ PanelViewSettings NewSettings=ViewSettingsArray[VIEW_0+I]; ViewSettingsToText(NewSettings.ColumnType,NewSettings.ColumnWidth,NewSettings.ColumnWidthType, - NewSettings.ColumnCount,false,strColumnTitles,strColumnWidths); + NewSettings.ColumnCount,strColumnTitles,strColumnWidths); ViewSettingsToText(NewSettings.StatusColumnType,NewSettings.StatusColumnWidth,NewSettings.StatusColumnWidthType, - NewSettings.StatusColumnCount,true,strStatusColumnTitles,strStatusColumnWidths); + NewSettings.StatusColumnCount,strStatusColumnTitles,strStatusColumnWidths); unsigned __int64 id = PanelModeCfg->CreateKey(0, FormatString() << I); if (!id) Index: FarEng.hlf.m4 =================================================================== --- FarEng.hlf.m4 (revision 7976) +++ FarEng.hlf.m4 (working copy) @@ -3609,7 +3609,8 @@ These modifiers may be used in combination, for example NMR - X - file extension + X[R] - file extension + where: R - right align file extension; S[C,T,F,E] - file size P[C,T,F,E] - allocation file size Index: filelist.cpp =================================================================== --- filelist.cpp (revision 7976) +++ filelist.cpp (working copy) @@ -3133,7 +3133,7 @@ string strColumnTypes,strColumnWidths; // SetScreenPosition(); ViewSettingsToText(ViewSettings.ColumnType,ViewSettings.ColumnWidth,ViewSettings.ColumnWidthType, - ViewSettings.ColumnCount,false,strColumnTypes,strColumnWidths); + ViewSettings.ColumnCount,strColumnTypes,strColumnWidths); ProcessPluginEvent(FE_CHANGEVIEWMODE,(void*)strColumnTypes.CPtr()); } Index: findfile.cpp =================================================================== --- findfile.cpp (revision 7976) +++ findfile.cpp (working copy) @@ -827,7 +827,7 @@ if (Opt.FindOpt.strSearchOutFormatWidth.IsEmpty()) Opt.FindOpt.strSearchOutFormatWidth=L"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; - TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(),false, + TextToViewSettings(Opt.FindOpt.strSearchOutFormat.CPtr(),Opt.FindOpt.strSearchOutFormatWidth.CPtr(), Opt.FindOpt.OutColumnTypes,Opt.FindOpt.OutColumnWidths,Opt.FindOpt.OutColumnWidthType, Opt.FindOpt.OutColumnCount); } Index: panelmix.hpp =================================================================== --- panelmix.hpp (revision 7976) +++ panelmix.hpp (working copy) @@ -45,7 +45,7 @@ const string FormatStr_Size(__int64 FileSize, __int64 AllocationSize, __int64 StreamsSize, const string& strName, DWORD FileAttributes,DWORD ShowFolderSize,DWORD ReparseTag,int ColumnType, unsigned __int64 Flags,int Width,const wchar_t *CurDir=nullptr); -void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths,bool StatusLine, +void TextToViewSettings(const wchar_t *ColumnTitles,const wchar_t *ColumnWidths, unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int &ColumnCount); void ViewSettingsToText(unsigned __int64 *ViewColumnTypes,int *ViewColumnWidths,int *ViewColumnWidthsTypes,int ColumnCount, - bool StatusLine,string &strColumnTitles,string &strColumnWidths); + string &strColumnTitles,string &strColumnWidths); |
|
build 2671 |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-09-24 09:39 | samlyukov | New Issue | |
2011-09-24 09:39 | samlyukov | File Added: Align.diff | |
2011-09-24 10:30 | Maximus | Note Added: 0007734 | |
2011-09-24 10:32 | Maximus | Note Edited: 0007734 | |
2011-09-24 11:23 | samlyukov | Note Added: 0007735 | |
2011-09-24 11:27 | samlyukov | Note Added: 0007736 | |
2011-09-24 11:31 | Maximus | Note Added: 0007737 | |
2011-09-24 11:31 | samlyukov | File Added: Align_2.diff | |
2011-09-24 11:33 | samlyukov | Note Added: 0007738 | |
2011-09-24 12:03 | Maximus | Note Added: 0007739 | |
2012-01-13 05:44 | vskirdin | Note Added: 0008396 | |
2012-01-13 10:30 | samlyukov | Note Added: 0008410 | |
2012-01-13 11:58 | vskirdin | Note Added: 0008412 | |
2012-04-29 04:43 | samlyukov | Note Added: 0009075 | |
2012-04-29 04:43 | samlyukov | File Added: Align_3.diff | |
2012-05-11 08:57 | vskirdin | Note Added: 0009149 | |
2012-05-11 08:57 | vskirdin | Assigned To | => vskirdin |
2012-05-11 08:57 | vskirdin | Status | new => feedback |
2012-05-11 11:08 | samlyukov | Status | feedback => resolved |
2012-05-11 11:42 | vskirdin | Build | => 2671 |
2012-05-11 11:42 | vskirdin | Status | resolved => closed |
2012-05-11 11:42 | vskirdin | Resolution | open => fixed |
2012-05-11 11:42 | vskirdin | Fixed in Version | => 3.0 |