summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-06 00:08:38 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-06 00:08:38 +0300
commit863ef6dc13fb3a7fb434ce173a84253f0c4559c5 (patch)
tree8e27d0ae9522e61c6805375cec35014bada1c1d6 /src/gui/popupmenu.cpp
parent44c92542331ea57553978e55585b5687d7034654 (diff)
downloadmv-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.tar.gz
mv-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.tar.bz2
mv-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.tar.xz
mv-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.zip
Allow hide yellow bar.
By default in new configurations yellow bar is hidden.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 6bd384132..e80158227 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -1951,11 +1951,31 @@ void PopupMenu::showPopup(const int x, const int y, const ProgressBar *const b)
mBrowserBox->clearRows();
std::vector <ProgressBar*> bars = miniStatusWindow->getBars();
+ ProgressBar *onlyBar = nullptr;
+ int cnt = 0;
+
+ // search for alone visible bar
+ for (std::vector <ProgressBar*>::const_iterator it = bars.begin(),
+ it_end = bars.end(); it != it_end; ++it)
+ {
+ ProgressBar *const bar = *it;
+ if (!bar)
+ continue;
+
+ if (bar->isVisible())
+ {
+ cnt ++;
+ onlyBar = bar;
+ }
+ }
+ if (cnt > 1)
+ onlyBar = nullptr;
+
for (std::vector <ProgressBar*>::const_iterator it = bars.begin(),
it_end = bars.end(); it != it_end; ++it)
{
ProgressBar *const bar = *it;
- if (!bar || bar->getActionEventId() == "status bar")
+ if (!bar || bar == onlyBar)
continue;
if (bar->isVisible())