diff options
author | elfmz <fenix1905@tut.by> | 2022-10-29 23:45:12 +0300 |
---|---|---|
committer | elfmz <fenix1905@tut.by> | 2022-10-29 23:45:12 +0300 |
commit | f0dc969e1d9006c5120ccbd6d26c9b80bc60e077 (patch) | |
tree | 6cafab6da53e287225fb8234468f13f8814d0d7f | |
parent | 5f4ea8b9cf7eef926d32da2142eabec48936c2fc (diff) |
cosmetic
-rw-r--r-- | far2l/src/Mounts.cpp | 21 | ||||
-rw-r--r-- | far2l/src/Mounts.hpp | 10 | ||||
-rw-r--r-- | far2l/src/panel.cpp | 8 | ||||
-rw-r--r-- | multiarc/src/ArcMix.cpp | 1 |
4 files changed, 19 insertions, 21 deletions
diff --git a/far2l/src/Mounts.cpp b/far2l/src/Mounts.cpp index 7e890117..f8c49ee8 100644 --- a/far2l/src/Mounts.cpp +++ b/far2l/src/Mounts.cpp @@ -1,7 +1,6 @@ #include "headers.hpp" #include <crc64.h> -#include <wordexp.h> #include <fstream> #include "Mounts.hpp" #include "lang.hpp" @@ -83,10 +82,10 @@ namespace Mounts for (auto &m : *this) { if (max_path < m.path.GetLength()) max_path = m.path.GetLength(); - if (max_info < m.info.GetLength()) - max_info = m.info.GetLength(); - if (max_usage < m.usage.GetLength()) - max_usage = m.usage.GetLength(); + if (max_col3 < m.col3.GetLength()) + max_col3 = m.col3.GetLength(); + if (max_col2 < m.col2.GetLength()) + max_col2 = m.col2.GetLength(); wchar_t def_hk[] = {DefaultHotKey(m.id, m.path), 0}; auto hk = cfg_reader.GetString(SettingsKey(m.id), def_hk); m.hotkey = hk.IsEmpty() ? 0 : *hk.CPtr(); @@ -147,10 +146,10 @@ namespace Mounts emplace_back(); auto &e = back(); e.path = mp.path; - e.usage = Opt.ChangeDriveColumn2; - e.info = Opt.ChangeDriveColumn3; - ExpandMountpointInfo(mp, e.usage); - ExpandMountpointInfo(mp, e.info); + e.col2 = Opt.ChangeDriveColumn2; + e.col3 = Opt.ChangeDriveColumn3; + ExpandMountpointInfo(mp, e.col2); + ExpandMountpointInfo(mp, e.col3); if (e.path == L"/") { has_rootfs = true; @@ -182,9 +181,9 @@ namespace Mounts auto &e = back(); e.path = parts.front(); if (parts.size() > 1) { - e.info = parts.back(); + e.col3 = parts.back(); if (parts.size() > 2) { - e.usage = parts[1]; + e.col2 = parts[1]; } } e.id = GenerateIdFromPath(e.path); diff --git a/far2l/src/Mounts.hpp b/far2l/src/Mounts.hpp index 6c029cc7..0849b4fc 100644 --- a/far2l/src/Mounts.hpp +++ b/far2l/src/Mounts.hpp @@ -9,15 +9,15 @@ namespace Mounts Entry() = default; Entry(const Entry&) = default; - inline Entry(FARString path_, const wchar_t *info_, bool unmountable_ = false, INT_PTR id_ = -1) : path(path_), info(info_) + inline Entry(FARString path_, const wchar_t *col3_, bool unmountable_ = false, INT_PTR id_ = -1) : path(path_), col3(col3_) { unmountable = unmountable_; id = id_; } FARString path; - FARString usage; - FARString info; + FARString col2; + FARString col3; bool unmountable = false; WCHAR hotkey = 0; int id = -1; @@ -32,8 +32,8 @@ namespace Mounts Enum(FARString &another_curdir); size_t max_path = 4; - size_t max_usage = 0; - size_t max_info = 4; + size_t max_col2 = 0; + size_t max_col3 = 4; }; bool Unmount(const FARString &path, bool force); diff --git a/far2l/src/panel.cpp b/far2l/src/panel.cpp index 2b3f9ef8..747865ce 100644 --- a/far2l/src/panel.cpp +++ b/far2l/src/panel.cpp @@ -459,7 +459,7 @@ int Panel::ChangeDiskMenu(int Pos,int FirstCall) ChDiskItem.Clear(); if (m.path == L"-" ) { - ChDiskItem.strName = m.info; + ChDiskItem.strName = m.col3; ChDiskItem.Flags|= LIF_SEPARATOR; ChDisk.AddItem(&ChDiskItem); ChDiskItem.Flags&= ~LIF_SEPARATOR; @@ -469,17 +469,17 @@ int Panel::ChangeDiskMenu(int Pos,int FirstCall) const wchar_t HotKeyStr[] = {m.hotkey ? L'&' : L' ', m.hotkey ? m.hotkey : L' ', m.hotkey ? L' ' : 0, 0}; ChDiskItem.strName = HotKeyStr; ChDiskItem.strName+= FixedSizeStr(m.path, std::min(mounts.max_path, (size_t)48), true); - if (mounts.max_usage) + if (mounts.max_col2) { ChDiskItem.strName+= L' '; ChDiskItem.strName+= BoxSymbols[BS_V1]; ChDiskItem.strName+= L' '; - ChDiskItem.strName+= FixedSizeStr(m.usage, std::min(mounts.max_usage, (size_t)24), false); + ChDiskItem.strName+= FixedSizeStr(m.col2, std::min(mounts.max_col2, (size_t)24), false); } ChDiskItem.strName+= L' '; ChDiskItem.strName+= BoxSymbols[BS_V1]; ChDiskItem.strName+= L' '; - ChDiskItem.strName+= FixedSizeStr(m.info, std::min(mounts.max_info, (size_t)24), false); + ChDiskItem.strName+= FixedSizeStr(m.col3, std::min(mounts.max_col3, (size_t)24), false); PanelMenuItem item; wcsncpy(item.location.path, m.path.CPtr(), ARRAYSIZE(item.location.path) - 1); diff --git a/multiarc/src/ArcMix.cpp b/multiarc/src/ArcMix.cpp index 83a0e616..196eb032 100644 --- a/multiarc/src/ArcMix.cpp +++ b/multiarc/src/ArcMix.cpp @@ -4,7 +4,6 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <wordexp.h> #include <sys/stat.h> #include <windows.h> #include <string> |