summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-27 20:11:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-27 20:11:26 +0300
commite525b4bc81dc56749c1cf5df6420ebe9ad6bf6cb (patch)
treef12f3b5295be46dc2bb62d34ca7501f21b7114f4 /src/gui
parentbfd5338c20fcd838f711ea5e96b2f37e012dc884 (diff)
downloadplus-e525b4bc81dc56749c1cf5df6420ebe9ad6bf6cb.tar.gz
plus-e525b4bc81dc56749c1cf5df6420ebe9ad6bf6cb.tar.bz2
plus-e525b4bc81dc56749c1cf5df6420ebe9ad6bf6cb.tar.xz
plus-e525b4bc81dc56749c1cf5df6420ebe9ad6bf6cb.zip
Move tabs replace code from browserbox into browserboxtools.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/browserbox.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index b1793b725..ced262090 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -271,23 +271,7 @@ void BrowserBox::addRow(const std::string &row, const bool atTop)
if (mEnableTabs)
{
- idx1 = newRow.find("\\t");
- while (idx1 != std::string::npos)
- {
- const size_t idx2 = newRow.find(';', idx1);
- if (idx2 == std::string::npos)
- break;
-
- const unsigned int newSize = CAST_U32(
- atoi(newRow.substr(
- idx1 + 2, idx2 - idx1 - 2).c_str()));
- std::string str = newRow.substr(0, idx1);
- while (str.size() < newSize)
- str.append(" ");
- str.append(newRow.substr(idx2 + 1));
- newRow = str;
- idx1 = newRow.find("\\t");
- }
+ BrowserBoxTools::replaceTabs(newRow);
}
if (atTop)